clipper-2.1/0000777000374100011300000000000011372264352010016 500000000000000clipper-2.1/config/0000777000374100011300000000000011372264352011263 500000000000000clipper-2.1/config/depcomp0000755000374100011300000004426711372264332012567 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: clipper-2.1/config/utimbuf.m40000644000374100011300000000250211372264321013107 00000000000000dnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared -- dnl usually in . dnl Some systems have utime.h but don't declare the struct anywhere. AC_DEFUN([jm_STRUCT_UTIMBUF], [ AC_CHECK_HEADERS(utime.h) AC_REQUIRE([AC_HEADER_TIME]) AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf, [AC_TRY_COMPILE( [ #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #ifdef HAVE_UTIME_H # include #endif ], [static struct utimbuf x; x.actime = x.modtime;], fu_cv_sys_struct_utimbuf=yes, fu_cv_sys_struct_utimbuf=no) ]) if test $fu_cv_sys_struct_utimbuf = yes; then if test x = y; then # This code is deliberately never run via ./configure. # This is a hack to make autoheader put the corresponding # HAVE_* undef for this symbol in config.h.in. This saves me the # trouble of having to maintain the #undef in acconfig.h manually. AC_CHECK_FUNCS(STRUCT_UTIMBUF) fi # Defining it this way (rather than via AC_DEFINE) short-circuits the # autoheader check -- autoheader doesn't know it's already been taken # care of by the hack above. ac_kludge=HAVE_STRUCT_UTIMBUF AC_DEFINE_UNQUOTED($ac_kludge) fi ]) clipper-2.1/config/config.guess0000755000374100011300000013226411372264332013525 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2009-04-27' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd | genuineintel) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: clipper-2.1/config/gpp4.m40000644000374100011300000000323111372264321012306 00000000000000# -*- mode: sh; mode: font-lock -*- # AM_PATH_GPP4([ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]) AC_DEFUN([AM_PATH_GPP4], [ AC_PROVIDE([AM_PATH_GPP4]) AC_ARG_WITH(gpp4, AC_HELP_STRING( [--with-gpp4=PFX], [use gpp4 library (default is NO) and set prefix]), [ test "$withval" = no || with_gpp4=yes test "$withval" = yes || gpp4_prefix="$withval" ], [ with_gpp4="$enable_gpp4" ] ) #dnl default is no for now if test x$with_gpp4 = xyes ; then #user override AS_IF([test "x$CCP4_LIBS" != x && test "x$CCP4_CXXFLAGS" != x ], [ have_gpp4=yes ], [ AC_MSG_CHECKING([for ccp4_errno in GPP4]) saved_LIBS="$LIBS" saved_CXXFLAGS="$CXXFLAGS" CCP4_LIBS="" CCP4_CXXFLAGS="" if test "x$gpp4_prefix" != x; then # ie. gpp4=thing was given (thing is what we're checking for) ac_CCP4_CXXFLAGS="-I$gpp4_prefix/include/gpp4" ac_CCP4_LDOPTS="-L$gpp4_prefix/lib -lgpp4" else # treat as standard lib/include ac_CCP4_CXXFLAGS="" ac_CCP4_LDOPTS="-lgpp4" fi LIBS="$ac_CCP4_LDOPTS $saved_LIBS" CXXFLAGS="$ac_CCP4_CXXFLAGS $saved_CXXFLAGS" # # AC_TRY_LINK uses the c compiler (set by AC_LANG), so we will # temporarily reassign $CC to the c++ compiler. # AC_LANG_PUSH(C++) AC_TRY_LINK([#include "ccp4/ccp4_errno.h"], [int a = ccp4_errno; CCP4::ccp4_error("conftest"); ], have_gpp4=yes, have_gpp4=no) AC_LANG_POP(C++) # the language we have just quit AC_MSG_RESULT($have_gpp4) LIBS="$saved_LIBS" CXXFLAGS="$saved_CXXFLAGS" ]) #user override AS_IF([test x$have_gpp4 = xyes], [ CCP4_CXXFLAGS="$ac_CCP4_CXXFLAGS" CCP4_LIBS="$ac_CCP4_LDOPTS" ifelse([$1], , :, [$1]) ], [ ifelse([$2], , :, [$2]) ] ) fi #dnl --with-gpp4 AC_SUBST(CCP4_CXXFLAGS) AC_SUBST(CCP4_LIBS) ]) clipper-2.1/config/missing0000755000374100011300000002623311372264332012602 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: clipper-2.1/config/clipper.m40000644000374100011300000000263011372264321013074 00000000000000# AC_CLIPPER_OPTIONS # ------------------ # target compilation optons # AC_DEFUN([AC_CLIPPER_OPTIONS], [ #specifics for various machines test "${target:+set}" = set || target="$host_os" case "$target" in *osf* | *64* ) if test "`basename $CXX`" = cxx; then case "$CXXFLAGS" in *strict_ansi* ) ;; * ) CXXFLAGS="$CXXFLAGS -ieee -std strict_ansi -alternative_tokens -timplicit_local -no_implicit_include" esac fi ;; *linux* ) ;; *irix* ) if test "`basename $CXX`" = CC; then case "$CXXFLAGS" in *LANG:std* ) ;; * ) CXXFLAGS="$CXXFLAGS -LANG:std -ptused" esac fi ;; *darwin* ) if test "`basename $CXX`" = gcc || test "`basename $CXX`" = g++; then case `$CXX -v 2>&1` in *3.1*) # problem with PIC relocation tables for 3.1 case "$CXXFLAGS" in *-O* | *-O1* | *-O2* | *-O3* ) CXXFLAGS=`echo $CXXFLAGS | sed s%-O[\ 123]%-O0%g` ;; *-O0* ) ;; * ) CXXFLAGS="$CXXFLAGS -O0" esac ;; *) esac fi ;; *solaris* ) if test "`basename $CXX`" = CC; then AR=CC AR_FLAGS="-xar -o" fi ;; * ) esac # disable strict aliasing in all versions of gcc if test "`basename $CXX`" = gcc || test "`basename $CXX`" = g++; then CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" fi ] ) # AC_CLIPPER_OPTIONS clipper-2.1/config/Makefile.am0000644000374100011300000000000011372264322013216 00000000000000clipper-2.1/config/ccp4.m40000644000374100011300000000370611372264321012274 00000000000000# -*- mode: sh ; mode: font-lock -*- # AM_PATH_CCP4([ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]) AC_DEFUN([AM_PATH_CCP4], [ AC_PROVIDE([AM_PATH_CCP4]) AC_ARG_WITH(ccp4, AC_HELP_STRING( [--with-ccp4=PFX], [use ccp4c library (default is NO) and set prefix] ), [ test "$withval" = no || with_ccp4=yes test "$withval" = yes || ccp4_prefix="$withval" ], [ with_ccp4="$enable_ccp4" ] ) #dnl default is yes for now if test x$with_ccp4 = xyes ; then #user override AS_IF([test "x$CCP4_LIBS" != x && test "x$CCP4_CXXFLAGS" != x ], [ have_ccp4=yes ], [ AC_MSG_CHECKING([for ccp4_errno in CCP4]) saved_LIBS="$LIBS" saved_CXXFLAGS="$CXXFLAGS" CCP4_LIBS="" CCP4_CXXFLAGS="" if test "x$ccp4_prefix" != x; then ac_ccp4_dirs=' . include include/ccp4 lib lib/src' for ac_dir in $ac_ccp4_dirs; do if test -r "$ccp4_prefix/$ac_dir/ccp4/ccp4_errno.h"; then ac_CCP4_CXXFLAGS="-I$ccp4_prefix/$ac_dir" break fi done for ac_dir in $ac_ccp4_dirs; do for ac_extension in a so sl dylib; do if test -r "$ccp4_prefix/$ac_dir/libccp4c.$ac_extension"; then ac_CCP4_LDOPTS="-L$ccp4_prefix/$ac_dir -lccp4c" break 2 fi done done else ac_CCP4_CXXFLAGS="" ac_CCP4_LDOPTS="-lccp4c" fi LIBS="$ac_CCP4_LDOPTS $saved_LIBS" CXXFLAGS="$ac_CCP4_CXXFLAGS $saved_CXXFLAGS" # # AC_TRY_LINK uses the c compiler (set by AC_LANG), so we will # temporarily reassign $CC to the c++ compiler. # AC_LANG_PUSH(C++) AC_TRY_LINK([#include "ccp4/ccp4_errno.h"], [int a = ccp4_errno; CCP4::ccp4_error("conftest"); ], have_ccp4=yes, have_ccp4=no) AC_LANG_POP(C++) # the language we have just quit AC_MSG_RESULT($have_ccp4) LIBS="$saved_LIBS" CXXFLAGS="$saved_CXXFLAGS" ]) # user override AS_IF([test x$have_ccp4 = xyes], [ test "x$CCP4_CXXFLAGS" = x && CCP4_CXXFLAGS="$ac_CCP4_CXXFLAGS" test "x$CCP4_LIBS" = x && CCP4_LIBS="$ac_CCP4_LDOPTS" ifelse([$1], , :, [$1]) ], [ ifelse([$2], , :, [$2]) ] ) fi #dnl --with-ccp4 AC_SUBST(CCP4_CXXFLAGS) AC_SUBST(CCP4_LIBS) ]) clipper-2.1/config/Makefile.in0000644000374100011300000002337211372264333013252 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = config DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in config.guess \ config.sub depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ccp4.m4 \ $(top_srcdir)/config/clipper.m4 $(top_srcdir)/config/fftw.m4 \ $(top_srcdir)/config/gpp4.m4 $(top_srcdir)/config/mmdb.m4 \ $(top_srcdir)/config/utimbuf.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AR = @AR@ AR_FLAGS = @AR_FLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCP4_CXXFLAGS = @CCP4_CXXFLAGS@ CCP4_LIBS = @CCP4_LIBS@ CFLAGS = @CFLAGS@ CLIPPER_CCP4_DIR = @CLIPPER_CCP4_DIR@ CLIPPER_CIF_DIR = @CLIPPER_CIF_DIR@ CLIPPER_CNS_DIR = @CLIPPER_CNS_DIR@ CLIPPER_CONTRIB_DIR = @CLIPPER_CONTRIB_DIR@ CLIPPER_LT_VERSION = @CLIPPER_LT_VERSION@ CLIPPER_MINIMOL_DIR = @CLIPPER_MINIMOL_DIR@ CLIPPER_MMDB_DIR = @CLIPPER_MMDB_DIR@ CLIPPER_PHS_DIR = @CLIPPER_PHS_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_CXXFLAGS = @FFTW_CXXFLAGS@ FFTW_LIBS = @FFTW_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMDB_CXXFLAGS = @MMDB_CXXFLAGS@ MMDB_LIBS = @MMDB_LIBS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu config/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: clipper-2.1/config/ltmain.sh0000644000374100011300000055262211372264321013027 00000000000000# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.5.16 TIMESTAMP=" (1.1220.2.235 2005/04/25 18:13:26)" # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" quote_scanset='[[~#^*{};<>?'"'"' ]' ##################################### # Shell function definitions: # This seems to be the best place for them # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` if test "X$win32_nmres" = "Ximport" ; then win32_libid_type="x86 archive import" else win32_libid_type="x86 archive static" fi fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 exit $EXIT_FAILURE fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xdir="$my_gentop/$my_xlib" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" status=$? if test "$status" -ne 0 && test ! -d "$my_xdir"; then exit $status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` lipo -create -output "$darwin_file" $darwin_files done # $darwin_filelist ${rm}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo $echo "Copyright (C) 2005 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $? ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $? ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case "$arg_mode" in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, and some SunOS ksh mistreat backslash-escaping # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") qlibobj="\"$qlibobj\"" ;; esac if test "X$libobj" != "X$qlibobj"; then $echo "$modename: libobj name \`$libobj' may not contain shell special characters." exit $EXIT_FAILURE fi objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") qsrcfile="\"$qsrcfile\"" ;; esac $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi fi build_libtool_libs=no build_old_libs=yes prefer_static_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; darwin_framework) compiler_flags="$compiler_flags $arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=darwin_framework compiler_flags="$compiler_flags $arg" continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 exit $EXIT_FAILURE fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-mingw* | *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. -model) compile_command="$compile_command $arg" compiler_flags="$compiler_flags $arg" finalize_command="$finalize_command $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -module) module=yes continue ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" if test "$with_gcc" = "yes" ; then compiler_flags="$compiler_flags $arg" fi continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test "$status" -ne 0 && test ! -d "$output_objdir"; then exit $status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $dir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5* ) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else convenience="$convenience $dir/$old_library" old_convenience="$old_convenience $dir/$old_library" deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) major=`expr $current - $age + 1` case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. for path in $notinst_path; do lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name="`expr $a_deplib : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$echo "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) $echo >> "$output_objdir/$dlsyms" "\ /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs */ struct { " ;; * ) $echo >> "$output_objdir/$dlsyms" "\ const struct { " ;; esac $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) cwrappersource=`$echo ${objdir}/lt-${outputname}.c` cwrapper=`$echo ${output}.exe` $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR #define DIR_SEPARATOR '/' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) #define HAVE_DOS_BASED_FILE_SYSTEM #ifndef DIR_SEPARATOR_2 #define DIR_SEPARATOR_2 '\\' #endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); char * basename (const char *name); char * fnqualify(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup ((char *) basename (argv[0])); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = fnqualify(argv[0]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } char * basename (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha (name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return (char *) base; } char * fnqualify(const char *path) { size_t size; char *p; char tmp[LT_PATHMAX + 1]; assert(path != NULL); /* Is it qualified already? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha (path[0]) && path[1] == ':') return xstrdup (path); #endif if (IS_DIR_SEPARATOR (path[0])) return xstrdup (path); /* prepend the current directory */ /* doesn't handle '~' */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ p = XMALLOC(char, size); sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); return p; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \$progdir\\\\\$program \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \$progdir/\$program \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "copying selected object files to avoid basename conflicts..." if test -z "$gentop"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi fi save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" $run ln "$obj" "$gentop/$newobj" || $run cp "$obj" "$gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg="$nonopt" fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest="$arg" continue fi case $arg in -d) isdir=yes ;; -f) prev="-f" ;; -g) prev="-g" ;; -m) prev="-m" ;; -o) prev="-o" ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest="$arg" continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir="$tmpdir/libtool-$$" save_umask=`umask` umask 0077 if $mkdir "$tmpdir"; then umask $save_umask else umask $save_umask $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyways case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "----------------------------------------------------------------------" $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "----------------------------------------------------------------------" exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" if test "$mode" = uninstall; then if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. fi fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: clipper-2.1/config/fftw.m40000644000374100011300000000635211372264321012411 00000000000000# AM_PATH_FFTW([ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]) # ---------------------------------------------------------- # set up for FFTW # AC_DEFUN([AM_PATH_FFTW], [ AC_PROVIDE([AM_PATH_FFTW]) AC_ARG_WITH(fftw, AC_HELP_STRING([--with-fftw=PFX], [Prefix where FFTW has been installed] ), [ test "$withval" = no && AC_MSG_ERROR([fftw is a required package]) test "$withval" = yes || fftw_prefix="$withval" with_fftw=yes ], [ with_fftw=yes ] ) if test $with_fftw = yes ; then #user override AS_IF([test "x$FFTW_LIBS" != x && test "x$FFTW_CXXFLAGS" != x ], [ have_fftw=yes ], [ saved_LIBS="$LIBS" saved_CXXFLAGS="$CXXFLAGS" FFTW_LIBS="" FFTW_CXXFLAGS="" if test x$fftw_prefix != x; then # very likely the majority of cases, we will have been configured with: # --with-fftw=/some/thing # # should be ac_FFTW_CXXFLAGS="-I$FFTW_prefix/include" # ac_FFTW_CXXFLAGS="-I$fftw_prefix/include" # # Similarly for fftw, the uninstalled library position is simply in # $fftw_prefix, but the installed is in the standard prefixed subdirectory. # # SGI compiler CC (CXX=CC) needs -lm to link maths library, but # GCC c++ does not. # ac_FFTW_LDOPTS="-L$fftw_prefix/lib" else # the compiler looks in the "standard" places for FFTW. In real life, # it would be quite possible that FFTW would not be installed in # /usr/include, /usr/lib etc. so the defaults will not usually find # the right dependencies. ac_FFTW_CXXFLAGS="" ac_FFTW_LDOPTS="" fi #dnl test fftw_prefix fftwname="fftw" rfftwname="rfftw" AC_MSG_CHECKING([for fftw_print_max_memory_usage in $fftwname]) LIBS="$ac_FFTW_LDOPTS $saved_LIBS -l$rfftwname -l$fftwname" CXXFLAGS="$ac_FFTW_CXXFLAGS $saved_CXXFLAGS" # # AC_TRY_LINK uses the c compiler (set by AC_LANG), so we will # temporarily reassign $CC to the c++ compiler. # AC_LANG_PUSH(C++) AC_TRY_LINK([#include <$fftwname.h>] ,[ fftw_print_max_memory_usage(); ], have_fftw=yes, have_fftw=no) if test x$have_fftw=xyes; then AC_TRY_LINK( [#include <$fftwname.h>] ,[ fftw_real *fftwp = 0; float *fftp = 0; fftp = fftwp; ], have_fftw=yes, have_fftw=no) fi AC_MSG_RESULT($have_fftw) if test $have_fftw = no; then fftwname="sfftw" rfftwname="srfftw" AC_MSG_CHECKING([for fftw_print_max_memory_usage in $fftwname]) LIBS="$ac_FFTW_LDOPTS $saved_LIBS -l$rfftwname -l$fftwname" CXXFLAGS="$ac_FFTW_CXXFLAGS $saved_CXXFLAGS" AC_TRY_LINK([#include <$fftwname.h>] ,[ fftw_print_max_memory_usage(); ], have_fftw=yes, have_fftw=no) if test x$have_fftw=xyes; then AC_TRY_LINK( [#include <$fftwname.h>] ,[ fftw_real *fftwp = 0; float *fftp = 0; fftp = fftwp; ], have_fftw=yes, have_fftw=no) fi AC_MSG_RESULT($have_fftw) fi AC_LANG_POP(C++) LIBS="$saved_LIBS" CXXFLAGS="$saved_CXXFLAGS" ]) #dnl user override AS_IF([test x$have_fftw = xyes], [ test "x$FFTW_CXXFLAGS" = x && FFTW_CXXFLAGS="$ac_FFTW_CXXFLAGS" test "x$FFTW_LIBS" = x && FFTW_LIBS="$ac_FFTW_LDOPTS -l$rfftwname -l$fftwname" ifelse([$1], , :, [$1]) ], [ AC_MSG_ERROR([If fftw exist on you system, are you sure you are using the fftw libraries that was configured with --enable-float?]) ifelse([$2], , :, [$2]) ]) fi # --with-fftw AC_SUBST(FFTW_CXXFLAGS) AC_SUBST(FFTW_LIBS) ]) clipper-2.1/config/install-sh0000755000374100011300000003253711372264332013213 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: clipper-2.1/config/mmdb.m40000644000374100011300000000572111372264321012361 00000000000000 # Note that mmdb as distributed by Eugene does not install and does # conform to normal unix standard notions of the behaviour of include # and libraries. # # So we will depend on you doing something by hand, and that is to link # (or copy) mmdb.a to libmmdb.a (and that it is in the top directory of # mmdb). # # AM_PATH_MMDB([ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]) # ---------------------------------------------------------- # set up for MMDB # AC_DEFUN([AM_PATH_MMDB], [ AC_PROVIDE([AM_PATH_MMDB]) AC_ARG_WITH(mmdb, AC_HELP_STRING( [--with-mmdb=PFX], [use mmdb library (default NO) and set prefix] ), [ test "$withval" = no || with_mmdb=yes test "$withval" = yes || mmdb_prefix="$withval" ], [ with_mmdb="$enable_mmdb" test $enable_mmdbold = yes && with_mmdb=yes test $enable_cif = yes && with_mmdb=yes test $enable_minimol = yes && with_mmdb=yes] ) if test x$with_mmdb = xyes ; then #user override AS_IF([test "x$MMDB_LIBS" != x && test "x$MMDB_CXXFLAGS" != x ], [ have_mmdb=yes ], [ saved_LIBS="$LIBS" saved_CXXFLAGS="$CXXFLAGS" MMDB_CXXFLAGS="" MMDB_LIBS="" if test x$mmdb_prefix != x; then # very likely the majority of cases, we will try to configure with: # --with-mmdb=/some/thing # # should ideally be MMDB_CXXFLAGS="-I$MMDB_prefix/include", and the like # when MMDB and dependencies get installed # ac_mmdb_dirs=' . include include/mmdb lib src lib/src lib/src/mmdb' for ac_dir in $ac_mmdb_dirs; do if test -r "$mmdb_prefix/$ac_dir/mmdb/mmdb_manager.h"; then ac_MMDB_CXXFLAGS="-I$mmdb_prefix/$ac_dir" break fi done # # SGI compiler CC (CXX=CC) needs -lm to link maths library, but # GCC c++ does not. # for ac_dir in $ac_mmdb_dirs; do for ac_extension in a so sl dylib; do if test -r "$mmdb_prefix/$ac_dir/libmmdb.$ac_extension"; then ac_MMDB_LDOPTS="-L$mmdb_prefix/$ac_dir -lmmdb" break 2 fi done done else # the compiler looks in the "standard" places for MMDB. In real life, # it would be quite unlikely that MMDB would be installed in /usr/include, # /usr/lib etc. so this code will not usually find the right dependencies. ac_MMDB_CXXFLAGS="" ac_MMDB_LDOPTS="" fi AC_MSG_CHECKING([for CMMDBManager in MMDB]) LIBS="$ac_MMDB_LDOPTS $saved_LIBS" CXXFLAGS="$ac_MMDB_CXXFLAGS $saved_CXXFLAGS" # # AC_TRY_LINK uses the c compiler (set by AC_LANG), so we will # temporarily reassign $CC to the c++ compiler. # AC_LANG_PUSH(C++) AC_TRY_LINK([#include "mmdb/mmdb_manager.h"] ,[ CMMDBManager a; ], have_mmdb=yes, have_mmdb=no) AC_LANG_POP(C++) # the language we have just quit LIBS="$saved_LIBS" CXXFLAGS="$saved_CXXFLAGS" ]) # user override AS_IF([test "x$have_mmdb" = xyes], [ test "x$MMDB_CXXFLAGS" = x && MMDB_CXXFLAGS=$ac_MMDB_CXXFLAGS test "x$MMDB_LIBS" = x && MMDB_LIBS=$ac_MMDB_LDOPTS AC_MSG_RESULT($have_mmdb) ifelse([$1], , :, [$1])], [ AC_MSG_RESULT($have_mmdb) ifelse([$2], , :, [$2])] ) fi #dnl --with-mmdb AC_SUBST(MMDB_CXXFLAGS) AC_SUBST(MMDB_LIBS) ]) clipper-2.1/config/config.sub0000755000374100011300000010224011372264332013157 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2009-04-17' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: clipper-2.1/dox/0000777000374100011300000000000011372264353010611 500000000000000clipper-2.1/dox/donors.eps0000644000374100011300000002067010736662154012553 00000000000000%!PS-Adobe-2.0 %%Creator: dot version 1.7.11 (Fri Nov 16 14:55:37 GMT 2001) %%For: (cowtan) Kevin Cowtan %%Title: G %%Pages: (atend) %%BoundingBox: 35 35 351 307 %%EndComments %%BeginProlog save /DotDict 200 dict def DotDict begin %%BeginResource: procset /coord-font-family /Times-Roman def /default-font-family /Times-Roman def /coordfont coord-font-family findfont 8 scalefont def /InvScaleFactor 1.0 def /set_scale { dup 1 exch div /InvScaleFactor exch def dup scale } bind def % styles /solid { } bind def /dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def /dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def /invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def /bold { 2 setlinewidth } bind def /filled { } bind def /unfilled { } bind def /rounded { } bind def /diagonals { } bind def % hooks for setting color /nodecolor { sethsbcolor } bind def /edgecolor { sethsbcolor } bind def /graphcolor { sethsbcolor } bind def /nopcolor {pop pop pop} bind def /beginpage { % i j npages /npages exch def /j exch def /i exch def /str 10 string def npages 1 gt { gsave coordfont setfont 0 0 moveto (\() show i str cvs show (,) show j str cvs show (\)) show grestore } if } bind def /set_font { findfont exch scalefont setfont } def % draw aligned label in bounding box aligned to current point % alignfactor tells what fraction to place on the left. % -.5 is centered. /alignedtext { % text labelwidth fontsz alignfactor /alignfactor exch def /fontsz exch def /width exch def /text exch def gsave % even if node or edge is dashed, don't paint text with dashes [] 0 setdash currentpoint newpath moveto text stringwidth pop alignfactor mul fontsz -.3 mul rmoveto text show grestore } def /boxprim { % xcorner ycorner xsize ysize 4 2 roll moveto 2 copy exch 0 rlineto 0 exch rlineto pop neg 0 rlineto closepath } bind def /ellipse_path { /ry exch def /rx exch def /y exch def /x exch def matrix currentmatrix newpath x y translate rx ry scale 0 0 1 0 360 arc setmatrix } bind def /endpage { showpage } bind def /layercolorseq [ % layer color sequence - darkest to lightest [0 0 0] [.2 .8 .8] [.4 .8 .8] [.6 .8 .8] [.8 .8 .8] ] def /setlayer {/maxlayer exch def /curlayer exch def layercolorseq curlayer get aload pop sethsbcolor /nodecolor {nopcolor} def /edgecolor {nopcolor} def /graphcolor {nopcolor} def } bind def /onlayer { curlayer ne {invis} if } def /onlayers { /myupper exch def /mylower exch def curlayer mylower lt curlayer myupper gt or {invis} if } def /curlayer 0 def %%EndResource %%EndProlog %%BeginSetup 14 default-font-family set_font 1 setmiterlimit % /arrowlength 10 def % /arrowwidth 5 def % make sure pdfmark is harmless for PS-interpreters other than Distiller /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse % make '<<' and '>>' safe on PS Level 1 devices /languagelevel where {pop languagelevel}{1} ifelse 2 lt { userdict (<<) cvn ([) cvn load put userdict (>>) cvn ([) cvn load put } if %%EndSetup %%Page: 1 1 %%PageBoundingBox: 36 36 351 307 %%PageOrientation: Portrait gsave 35 35 316 272 boxprim clip newpath 36 36 translate 0 0 1 beginpage 0 0 translate 0 rotate [ /CropBox [36 36 351 307] /PAGES pdfmark 0.000 0.000 0.000 graphcolor 12.00 /Helvetica set_font % Spacegroup gsave 10 dict begin newpath 162 262 moveto 76 262 lineto 76 240 lineto 162 240 lineto closepath stroke gsave 10 dict begin 119 252 moveto (Spacegroup) 56 12.00 -0.50 alignedtext end grestore end grestore % Cell gsave 10 dict begin newpath 162 204 moveto 76 204 lineto 76 182 lineto 162 182 lineto closepath stroke gsave 10 dict begin 119 194 moveto (Cell) 20 12.00 -0.50 alignedtext end grestore end grestore % Spacegroup -> Cell gsave 10 dict begin bold newpath 119 240 moveto 119 233 119 222 119 213 curveto stroke newpath 117 214 moveto 119 204 lineto 122 214 lineto closepath fill end grestore % HKL_info gsave 10 dict begin newpath 96 88 moveto 10 88 lineto 10 66 lineto 96 66 lineto closepath stroke gsave 10 dict begin 53 78 moveto (HKL_info) 49 12.00 -0.50 alignedtext end grestore end grestore % Spacegroup -> HKL_info gsave 10 dict begin solid 0.000 1.000 1.000 edgecolor newpath 102 240 moveto 90 231 75 218 67 204 curveto 53 181 57 172 54 146 curveto 52 129 52 110 53 96 curveto stroke newpath 51 98 moveto 53 88 lineto 56 98 lineto closepath fill end grestore % Grid_sampling gsave 10 dict begin newpath 200 88 moveto 114 88 lineto 114 66 lineto 200 66 lineto closepath stroke gsave 10 dict begin 157 78 moveto (Grid_sampling) 72 12.00 -0.50 alignedtext end grestore end grestore % Spacegroup -> Grid_sampling gsave 10 dict begin solid 0.000 1.000 1.000 edgecolor newpath 135 240 moveto 147 231 162 218 171 204 curveto 189 172 191 159 184 124 curveto 181 111 179 104 175 96 curveto stroke newpath 173 98 moveto 170 88 lineto 177 95 lineto closepath fill end grestore % Xmap<> gsave 10 dict begin newpath 200 30 moveto 114 30 lineto 114 8 lineto 200 8 lineto closepath stroke gsave 10 dict begin 157 20 moveto (Xmap<>) 42 12.00 -0.50 alignedtext end grestore end grestore % Spacegroup -> Xmap<> gsave 10 dict begin solid 0.000 1.000 1.000 edgecolor newpath 153 240 moveto 168 232 175 223 188 204 curveto 216 158 214 141 222 88 curveto 225 63 219 48 204 36 curveto stroke newpath 203 38 moveto 196 30 lineto 206 34 lineto closepath fill end grestore % Resolution gsave 10 dict begin newpath 162 146 moveto 76 146 lineto 76 124 lineto 162 124 lineto closepath stroke gsave 10 dict begin 119 136 moveto (Resolution) 52 12.00 -0.50 alignedtext end grestore end grestore % Cell -> Resolution gsave 10 dict begin bold newpath 119 182 moveto 119 175 119 164 119 155 curveto stroke newpath 117 156 moveto 119 146 lineto 122 156 lineto closepath fill end grestore % Cell -> HKL_info gsave 10 dict begin solid 0.667 1.000 1.000 edgecolor newpath 106 182 moveto 91 168 67 147 67 146 curveto 59 130 55 111 54 96 curveto stroke newpath 52 98 moveto 53 88 lineto 57 98 lineto closepath fill end grestore % Cell -> Grid_sampling gsave 10 dict begin solid 0.667 1.000 1.000 edgecolor newpath 134 182 moveto 147 171 167 155 171 146 curveto 174 137 172 133 171 124 curveto 170 114 166 105 164 97 curveto stroke newpath 162 98 moveto 161 88 lineto 167 97 lineto closepath fill end grestore % Cell -> Xmap<> gsave 10 dict begin solid 0.667 1.000 1.000 edgecolor newpath 147 182 moveto 151 179 154 175 160 170 curveto 170 159 175 158 184 146 curveto 199 122 203 115 209 88 curveto 210 78 212 74 209 66 curveto 203 54 193 43 183 35 curveto stroke newpath 183 38 moveto 176 30 lineto 186 34 lineto closepath fill end grestore % Resolution -> HKL_info gsave 10 dict begin solid 0.333 1.000 1.000 edgecolor newpath 101 124 moveto 90 116 77 104 67 94 curveto stroke newpath 66 97 moveto 61 88 lineto 70 93 lineto closepath fill end grestore % Resolution -> HKL_info gsave 10 dict begin bold newpath 112 124 moveto 104 116 90 104 79 94 curveto stroke newpath 78 96 moveto 71 88 lineto 81 92 lineto closepath fill end grestore % Resolution -> Grid_sampling gsave 10 dict begin solid 0.333 1.000 1.000 edgecolor newpath 121 124 moveto 125 116 132 105 138 96 curveto stroke newpath 136 95 moveto 144 88 lineto 140 98 lineto closepath fill end grestore % Resolution -> Grid_sampling gsave 10 dict begin bold newpath 132 124 moveto 139 116 146 105 151 96 curveto stroke newpath 148 96 moveto 155 88 lineto 153 98 lineto closepath fill end grestore % HKL_data<> gsave 10 dict begin newpath 96 30 moveto 10 30 lineto 10 8 lineto 96 8 lineto closepath stroke gsave 10 dict begin 53 20 moveto (HKL_data<>) 63 12.00 -0.50 alignedtext end grestore end grestore % HKL_info -> HKL_data<> gsave 10 dict begin solid 0.000 0.745 0.647 edgecolor newpath 48 66 moveto 47 59 46 48 47 39 curveto stroke newpath 44 40 moveto 48 30 lineto 49 40 lineto closepath fill end grestore % HKL_info -> HKL_data<> gsave 10 dict begin bold newpath 58 66 moveto 59 59 60 48 59 39 curveto stroke newpath 57 40 moveto 58 30 lineto 62 40 lineto closepath fill end grestore % Grid_sampling -> Xmap<> gsave 10 dict begin solid 0.000 0.000 0.753 edgecolor newpath 152 66 moveto 151 59 150 48 151 39 curveto stroke newpath 148 40 moveto 152 30 lineto 153 40 lineto closepath fill end grestore % Grid_sampling -> Xmap<> gsave 10 dict begin bold newpath 162 66 moveto 163 59 164 48 163 39 curveto stroke newpath 161 40 moveto 162 30 lineto 166 40 lineto closepath fill end grestore endpage grestore %%PageTrailer %%EndPage: 1 %%Trailer %%Pages: 1 end restore %%EOF clipper-2.1/dox/map_p2.eps0000644000374100011300000002272510736662154012430 00000000000000%!PS-Adobe-1.0 %%BoundingBox: 0 460 280 840 %%Creator: KIllustrator %%Title: %%CreationDate: Wed Jan 30 13:09:32 2002 %%Orientation: Portrait %%Pages: 1 %%DocumentFonts: %%EndComments %%BeginProlog % Prolog copyright 1994-2000 Trolltech. You may copy this prolog in any way % that is directly related to this document. For other use of this prolog, % see your licensing agreement for Qt. /d/def load def/D{bind d}bind d/d2{dup dup}D/B{0 d2}D/W{255 d2}D/ED{exch d}D/D0 {0 ED}D/LT{lineto}D/MT{moveto}D/ND/.notdef d/S{stroke}D/F{setfont}D/SW{ setlinewidth}D/CP{closepath}D/RL{rlineto}D/NP{newpath}D/CM{currentmatrix}D/SM{ setmatrix}D/TR{translate}D/SC{aload pop setrgbcolor}D/BSt 0 d/LWi 1 d/PSt 1 d /Cx 0 d/Cy 0 d/WFi false d/OMo false d/BCol[1 1 1]d/PCol[0 0 0]d/BkCol[1 1 1]d /nS 0 d/LArr[[][][10 3][3 10][3 3][3 3][5 3 3 3][3 5 3 3][5 3 3 3 3 3][3 5 3 3 3 3]]d/GPS{PSt 1 ge PSt 5 le and{{LArr PSt 1 sub 2 mul get}{LArr PSt 2 mul 1 sub get}ifelse}{[]}ifelse}D/QS{PSt 0 ne{LWi SW gsave PCol SC true GPS 0 setdash S OMo PSt 1 ne and{grestore BkCol SC false GPS dup 0 get setdash S}{grestore} ifelse}if}D/BDArr[0.06 0.12 0.37 0.50 0.63 0.88 0.94]d/r28{{currentfile read pop dup 32 gt{exit}if pop}loop 3{currentfile read pop}repeat 0 4{7 bitshift exch dup 128 gt{84 sub}if 42 sub 127 and add}repeat}D/rA 0 d/rL 0 d/rB{rL 0 eq{ /rA r28 d/rL 28 d}if dup rL gt{rA exch rL sub rL exch/rA 0 d/rL 0 d rB exch bitshift add}{dup rA 16#fffffff 3 -1 roll bitshift not and exch dup rL exch sub /rL ED neg rA exch bitshift/rA ED}ifelse}D/rC{/rL 0 d 0{dup 2 index length ge{ exit}if 1 rB 1 eq{3 rB dup 4 ge{dup rB 1 index 5 ge{1 index 6 ge{1 index 7 ge{ 64 add}if 32 add}if 16 add}if 4 add exch pop}if 1 add 3 mul exch 10 rB 1 add 3 mul{dup 3 index lt{dup}{2 index}ifelse 4 index 3 index 3 index sub 2 index getinterval 5 index 4 index 3 -1 roll putinterval dup 4 -1 roll add 3 1 roll 4 -1 roll exch sub dup 0 eq{exit}if 3 1 roll}loop pop pop}{3 rB 1 add 3 mul{2 copy 8 rB put 1 add}repeat}ifelse}loop pop}D/rG{/rL 0 d 0{dup 2 index length ge {exit}if 1 rB 1 eq{3 rB dup 4 ge{dup rB 1 index 5 ge{1 index 6 ge{1 index 7 ge{ 64 add}if 32 add}if 16 add}if 4 add exch pop}if 1 add exch 10 rB 1 add{dup 3 index lt{dup}{2 index}ifelse 4 index 3 index 3 index sub 2 index getinterval 5 index 4 index 3 -1 roll putinterval dup 4 -1 roll add 3 1 roll 4 -1 roll exch sub dup 0 eq{exit}if 3 1 roll}loop pop pop}{3 rB 1 add{2 copy 8 rB put 1 add} repeat}ifelse}loop pop}D/sl D0/QCIgray D0/QCIcolor D0/QCIindex D0/QCI{ /colorimage where{pop false 3 colorimage}{exec/QCIcolor ED/QCIgray QCIcolor length 3 idiv string d 0 1 QCIcolor length 3 idiv 1 sub{/QCIindex ED/x QCIindex 3 mul d QCIgray QCIindex QCIcolor x get 0.30 mul QCIcolor x 1 add get 0.59 mul QCIcolor x 2 add get 0.11 mul add add cvi put}for QCIgray image}ifelse}D/defM matrix d/BF{gsave BSt 1 eq{BCol SC WFi{fill}{eofill}ifelse}if BSt 2 ge BSt 8 le and{BDArr BSt 2 sub get setgray fill}if BSt 9 ge BSt 14 le and{WFi{clip}{eoclip }ifelse defM SM pathbbox 3 index 3 index translate 4 2 roll 3 2 roll exch sub/h ED sub/w ED OMo{NP 0 0 MT 0 h RL w 0 RL 0 h neg RL CP BkCol SC fill}if BCol SC 0.3 SW NP BSt 9 eq BSt 11 eq or{0 4 h{dup 0 exch MT w exch LT}for}if BSt 10 eq BSt 11 eq or{0 4 w{dup 0 MT h LT}for}if BSt 12 eq BSt 14 eq or{w h gt{0 6 w h add{dup 0 MT h sub h LT}for}{0 6 w h add{dup 0 exch MT w sub w exch LT}for} ifelse}if BSt 13 eq BSt 14 eq or{w h gt{0 6 w h add{dup h MT h sub 0 LT}for}{0 6 w h add{dup w exch MT w sub 0 exch LT}for}ifelse}if S}if BSt 24 eq{}if grestore}D/mat matrix d/ang1 D0/ang2 D0/w D0/h D0/x D0/y D0/ARC{/ang2 ED/ang1 ED/h ED/w ED/y ED/x ED mat CM pop x w 2 div add y h 2 div add TR 1 h w div neg scale ang2 0 ge{0 0 w 2 div ang1 ang1 ang2 add arc}{0 0 w 2 div ang1 ang1 ang2 add arcn}ifelse mat SM}D/C D0/P{NP MT 0.5 0.5 rmoveto 0 -1 RL -1 0 RL 0 1 RL CP PCol SC fill}D/M{/Cy ED/Cx ED}D/L{NP Cx Cy MT/Cy ED/Cx ED Cx Cy LT QS}D/DL{NP MT LT QS}D/HL{1 index DL}D/VL{2 index exch DL}D/R{/h ED/w ED/y ED/x ED NP x y MT 0 h RL w 0 RL 0 h neg RL CP BF QS}D/ACR{/h ED/w ED/y ED/x ED x y MT 0 h RL w 0 RL 0 h neg RL CP}D/CLSTART{/clipTmp matrix CM d defM SM NP}D/CLEND{clip NP clipTmp SM}D/CLO{grestore gsave defM SM}D/xr D0/yr D0/rx D0/ry D0/rx2 D0/ry2 D0 /RR{/yr ED/xr ED/h ED/w ED/y ED/x ED xr 0 le yr 0 le or{x y w h R}{xr 100 ge yr 100 ge or{x y w h E}{/rx xr w mul 200 div d/ry yr h mul 200 div d/rx2 rx 2 mul d/ry2 ry 2 mul d NP x rx add y MT x y rx2 ry2 180 -90 x y h add ry2 sub rx2 ry2 270 -90 x w add rx2 sub y h add ry2 sub rx2 ry2 0 -90 x w add rx2 sub y rx2 ry2 90 -90 ARC ARC ARC ARC CP BF QS}ifelse}ifelse}D/E{/h ED/w ED/y ED/x ED mat CM pop x w 2 div add y h 2 div add translate 1 h w div scale NP 0 0 w 2 div 0 360 arc mat SM BF QS}D/A{16 div exch 16 div exch NP ARC QS}D/PIE{/ang2 ED/ang1 ED/h ED/w ED/y ED/x ED NP x w 2 div add y h 2 div add MT x y w h ang1 16 div ang2 16 div ARC CP BF QS}D/CH{16 div exch 16 div exch NP ARC CP BF QS}D/BZ{curveto QS}D /CRGB{255 div 3 1 roll 255 div 3 1 roll 255 div 3 1 roll}D/SV{BSt LWi PSt Cx Cy WFi OMo BCol PCol BkCol/nS nS 1 add d gsave}D/RS{nS 0 gt{grestore/BkCol ED/PCol ED/BCol ED/OMo ED/WFi ED/Cy ED/Cx ED/PSt ED/LWi ED/BSt ED/nS nS 1 sub d}if}D/BC {CRGB BkCol astore pop}D/BR{CRGB BCol astore pop/BSt ED}D/WB{1 W BR}D/NB{0 B BR }D/PE{setlinejoin setlinecap CRGB PCol astore pop/LWi ED/PSt ED LWi 0 eq{0.25 /LWi ED}if}D/P1{1 0 5 2 roll 0 0 PE}D/ST{defM setmatrix concat}D/qtfindfont{ true exch true exch{exch pop exch pop dup 0 get dup findfont dup/FontName get 3 -1 roll eq{exit}if}forall exch}d/qtdefinefont{dup 1 get/fxscale exch def 2 get /fslant exch def exch/fencoding exch def[fxscale 0 fslant 1 0 0]makefont fencoding false eq{}{dup maxlength dict begin{1 index/FID ne{def}{pop pop} ifelse}forall/Encoding fencoding def currentdict end}ifelse definefont pop}d/MF {qtfindfont qtdefinefont}D/MSF{findfont exch/slant exch d[1 0 slant 1 0 0] makefont definefont pop}D/DF{findfont/FONTSIZE 3 -1 roll d[FONTSIZE 0 0 FONTSIZE -1 mul 0 0]makefont d}D/ty 0 d/Y{/ty ED}D/Tl{NP 1 index exch MT 1 index 0 rlineto QS}D/T{PCol SC ty MT 1 index dup length exch stringwidth pop 3 -1 roll exch sub exch div exch 0 exch ashow}D/QI{/C save d pageinit/Cx 0 d/Cy 0 d/OMo false d}D/QP{C restore showpage}D %%EndProlog %%BeginSetup /pageinit { % 210*297mm (portrait) 0 842 translate 1 -1 scale/defM matrix CM d } d %%EndSetup %%Page: 1 1 %%BeginPageSetup QI %%EndPageSetup W BC /OMo false d [1 0 0 1 -349 -19]ST [1 0 0 1 -349 -19]ST CLSTART 0 0 266 352 ACR CLEND 0 1 B 0 0 PE 1 216 d2 BR 365 340 10 20 E [1 0 0 1 -349 -179]ST 0 1 B 0 0 PE 1 216 d2 BR 365 340 10 20 E [1 0 0 1 -349 -339]ST 0 1 B 0 0 PE 1 216 d2 BR 365 340 10 20 E [1 0 0 1 -229 -19]ST 0 1 B 0 0 PE 1 216 d2 BR 365 340 10 20 E [1 0 0 1 -229 -179]ST 0 1 B 0 0 PE 1 216 d2 BR 365 340 10 20 E [1 0 0 1 -229 -339]ST 0 1 B 0 0 PE 1 216 d2 BR 365 340 10 20 E [1 0 0 1 -109 -339]ST 0 1 B 0 0 PE 1 216 d2 BR 365 340 10 20 E [1 0 0 1 -109 -179]ST 0 1 B 0 0 PE 1 216 d2 BR 365 340 10 20 E [1 0 0 1 -109 -19]ST 0 1 B 0 0 PE 1 216 d2 BR 365 340 10 20 E [1 0 0 1 -59 -89]ST 1 1 B 0 0 PE NB 80 100 240 320 R [1 0 0 1 -59 -89]ST CLO [1 0 0 1 -59 -89]ST CLSTART 0 0 266 352 ACR CLEND 1 1 B 0 0 PE NB 200 420 100 VL [1 0 0 1 -59 -89]ST 1 1 B 0 0 PE 160 420 100 VL [1 0 0 1 -59 -89]ST 1 1 B 0 0 PE 120 420 100 VL [1 0 0 1 -59 -89]ST 1 1 B 0 0 PE 240 420 100 VL [1 0 0 1 -59 -89]ST 1 1 B 0 0 PE 280 420 100 VL [1 0 0 1 -59 -89]ST 1 1 B 0 0 PE 320 140 80 HL [1 0 0 1 -59 -89]ST 1 1 B 0 0 PE 320 180 80 HL [1 0 0 1 -59 -89]ST 1 1 B 0 0 PE 320 220 80 HL [1 0 0 1 -59 -89]ST 1 1 B 0 0 PE 320 260 80 HL [1 0 0 1 -59 -89]ST 1 1 B 0 0 PE 320 300 80 HL [1 0 0 1 -59 -89]ST 1 1 B 0 0 PE 320 340 80 HL [1 0 0 1 -59 -89]ST 1 1 B 0 0 PE 320 380 80 HL [0.666667 0 0 1 -39 -89]ST 2 1 B 0 0 PE 60 120 240 320 R [1 0 0 1 -59 -89]ST CLO [1 0 0 1 -59 -89]ST CLSTART 0 0 266 352 ACR CLEND 1 1 B 0 0 PE NB 75 415 10 10 E [1 0 0 1 -19 -89]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 21 -89]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 61 -89]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -59 -129]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -19 -129]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 21 -129]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 61 -129]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -59 -169]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -19 -169]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 21 -169]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 61 -169]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -59 -209]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -19 -209]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 21 -209]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 61 -209]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -59 -249]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -19 -249]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 21 -249]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 61 -249]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -19 -289]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 21 -289]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -19 -329]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 21 -329]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -19 -369]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 21 -369]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -58 -90]ST 1 2 B 0 0 PE 85 135 75 145 DL [1 0 0 1 -58 -90]ST 1 2 B 0 0 PE 85 145 75 135 DL [1 0 0 1 -58 -50]ST 1 2 B 0 0 PE 85 135 75 145 DL [1 0 0 1 -58 -50]ST 1 2 B 0 0 PE 85 145 75 135 DL [1 0 0 1 -58 -10]ST 1 2 B 0 0 PE 85 135 75 145 DL [1 0 0 1 -58 -10]ST 1 2 B 0 0 PE 85 145 75 135 DL [1 0 0 1 61 -89]ST 1 2 B 0 0 PE 85 135 75 145 DL [1 0 0 1 61 -89]ST 1 2 B 0 0 PE 85 145 75 135 DL [1 0 0 1 61 -49]ST 1 2 B 0 0 PE 85 135 75 145 DL [1 0 0 1 61 -49]ST 1 2 B 0 0 PE 85 145 75 135 DL [1 0 0 1 61 -9]ST 1 2 B 0 0 PE 85 135 75 145 DL [1 0 0 1 61 -9]ST 1 2 B 0 0 PE 85 145 75 135 DL QP %%Trailer %%EOF clipper-2.1/dox/donors.png0000644000374100011300000002513010736662154012544 00000000000000‰PNG  IHDR<¢ _)×IDATxÚíÏÏäÆyçfe[JdØ0¶G [ `ÃvÃs!¡¹möÀF’Kغ䰗-}$ÿdrða+ÖX,š û=–&°JàÀ1ÔŒä…5p@b!#YöÖž~iÎû6ÙUüÑ,v?Ìáæ®®î/Ÿª§žç)sAL‡ß»AÈA¢%ˆ‰A¢%ˆ‰A¢%ˆ‰A¢%ˆ‰A¢%ˆ‰A¢%ˆ‰A¢%ˆ‰ñÔØ œ,Ë’$»#ã8Žišc·‚è‡ó·´I’dY6v+Æ„[gÆù[Z0MÓ÷ý±[1žçÝ¢OÎßÒÄ™A¢%ˆ‰A¢%ˆ‰A¢Ý“eÙr¹Ô4MÓ4š*C¢Ýãyžaœó<Ï ‚±[D‡!ÑîIÓ=̺®û¾_Å)ßýÄoGLíÃ0V«Õn·Ãÿ–KD¶mÛ¶­iÚ|>ÇõÞr­iÚjµÂÓ<Ï›Ífš¦Íf³4M Š¢ù|ޝDQEQ”§- Û¶GãQÝ8Z®-kšV6²üûv«ˆËD»'Žã¢(‹Å|>_­V¥éKÓÔ²,ιã8(QÇq8çœóív‹jÄ9pžçœs×u³,Ãx†ÍfÃ9gŒá…8äÎó<ÏsÓ4QÛxCÆÞd»ÝrÎ-Ë*¹Ý*ârÐξFŠA<¸"MS´{ëõ4í·]„£ ‹¢@qrΫç”ozcV¼Ùl‹EyZš¦¶mW¯½q“ƒ¯7¿ØWŠC– I’ÒclYVÇ¥¼Íb±ÐuÝqœÍfS¾XZf30Æx ýmž»–ƒs‚h€D `FE¥Poˆm¦çyŽãà+®ëZ–Uß–óá ¢(r'I|%MÓù|ŽW-—K|ñv0põhõ½ÊöÜXˆºÝ*âRàçcì†Ñ;H††a`Ÿ†Q^h$ ÃÀ9ªëºø_ü# Ã<Ïñop'·a꺎—ã…yž[–º®ãùx|£êM,Ë›`ûñE×u]×­kU÷ ¦ÍiptÆXŠó(h0ñѦ©çyÕv¿­ê±Õ áqW »Ýn±Xìv;\Ý¡a-Ñíé°,‹1¶X,f³þ=v‹ˆIrù´]èwú€ÓKÕZEL ²´11H´11H´11.bN›eY_)²/=xðö / ÝàvïòïÿéŸþáóŸ?øñ©ã9ñï¾ñoŒÝ†aÑu½¯Ä·ûWW÷¿÷½·ÿèþõÙgů ‚àûßÿþW¿úUÁó?ûðá_}ë[Ï|øáÛ/¾(þ.³Gþê[ßzéÁƒŸûÜã§Ÿ®zþùçÇyþùç{ébtÎ?¸¢Š–KØí ŽAÒja>\?g,—`Ç ¼ E«¤)¸.P(ÅùBsZ² æs€ÍFV±-1MÀ`©ùÄÓeuââ’ ‰ ‰IA¢=FÁb® 뵄Ñ뎮Ãz ® ‹D‘Ä…–› X,ày@51αƒŸÕÆu¹®ó8îr®ýÇ\×ùuª€› 7MnÛO¨Íik( °m€0ì8$n3§½A––§haí=¢, Âð¤#b0hx|œÄ¬×'šÄ6cš°^ƒaÀ|õÙù‡ñ}Øl (h–{6hoQNb¥<·CƒN&ÆÀ¶å¦¸û§em“nϱÇ犆€‡a·ì¹ŸÃë:÷ý6×2Æu¯×=~:âôh+ ÛéX!Yú8n6-]S|§qb."ŒQˆÕ ’D•Il38ÅE?™ïËá±¢ ºµ®«ÛÓ‚¼Ç×D»]wGñAzð×5uÛÂ¥œ¦°\RàÔD¹xÑvùé‹1”h;6>ËÀ¶Áq ‡øÔÄp\¶÷x·ÛÞÇ©ã(G×÷‘•RÑŽޱÓhƒ‚©qÁ¢Í2X,ö¿Ý)*¶$ ÁqÚ,ç`„s’mí9).U´g68 C`L:J®#œ£HúBbDÆv_.™´[ê”çtýÜz9×~û^ë"âò–|J{~LËåÃË’»§÷Ûí´g —Á…y1£çOÅ€ÞãƒDx^›gÌòŸú ÿ¸¤9-.œV±#€«¯-üRØ-ä”Rž‹±´å’fÛísZsjK‹´ ðÚí`±ÆÎpîpF\Ìœv¹X¯ÇnÇ©@³iÛrºÅªT¶ †´Õª\†hW+(Š‹›­•º•r/áô½Yê‡a_$0<Æâf×ÛÏž˜q†ÇÕŸeÒ¬vW'áÜQž·ŸÚ¤ØñÁ,Û–«ð†V:Æn=q€³¶´­?zedK mp¸ 1’„Jœ¯¥ÝíÀóʶ‹Ìf³q±Š ¹œcšÀØÞ@¨ÄùŠv¹ËÝJX•Ȥ1·~×uCˆ"H‰«Ó¤4 Õ8SÑb‘n‚(ª;_YR¡…4|Ÿî/NCšÒäV)ÎQ´YA H™_£âY´àºà8û%kAÐD•qT‡³-ÖŽaL.b~0JKë8Ž®ÀCd__Fjrë8àº4HV‡³-ä”)}TŠV•bËÉ­T-cP–¬ cçöÊzÍTË ÅQñv»»!Z$Ðn6€j&«ÀYZÜBÖ÷U ¾3MÓ4MC©èœÜJ-çÐ 2œ‘hW«ýK1 Ãßu›“[ßàÉíèœKDT’Àju0À8˲Djq²o>|wïÞ± Žã˜T·ˆyÂÜ= “•³°´¥ÇøÐ4I’lÔ劻wØÚÇL¤6ž6 $ÎYXZÌ Ønkzà+ãO>=Gz`>Ç‘ó·cÉž îÒq™¾¥Ýí ŠT~š*¾Q$g9}‚@.²Šèé‹6À4 ¥˜$ަ)¨ˆAÝ´l;-šY§u„1iËéû$ÒÛÒ}0qÑ®Vàºê,ÌA0ŸÏ1 Ïk4DÕ”½±[ `Y`YrÆ=RdlÇ`Ê¢MSÈ2ufƒ ‚ CÎyÇišFÚkc¥Œ-cû‘qZ¦,ZÏ×U§ŽL’$¾ïc…eYŒ±)‰Ö0¤³t|_nňèƒÉŠ6I`·SÇÌ@–e7RÞ7› DQTŽ™•–1c¦rÓT|hR¶íi™¬h£\W…ŒÙ*FM<Öf³áœ3ÆV*Çâ4UV´üsr¦)ÚÝÒt¿ß”¤iš$Iš¦³ÙLÓ4tMžuÆ ËäŒ--ÿœœiŠ6”šÍ"¦iV£³,³mcÕ¼*Uk¢ëàºÒ ô}éq5Ñ Š¶( I X·,Ëó¼4M (Š cŽã$I²Ûí MÓù|>v3>a)¢‹Œí©˜ h£HzÿÕ“À3MÓ¶mMÓæó¹a¾ï›¦É[,8<Žãxìf­ìÌK[¨ìf;#&¸—O)å4.Ñuý &]×uoM¿ye‡ø±~ Å0ŸC–ID­èú>ÖÂqTóžS³´YE¡¾ jÚàpWÖlbh-ÿ ÏÔD›$ ŒÏƤ¤Ê«(Öb`H´Ä!pZY³iYdlOÀ¤D»ÛÁn§ ßø<Á²¬Ù$c;<“m’€i’ŸãD´Hý2¶§`R¢MS2³'…Œ­’LªF”¦Áv+åy^–eCÄ!=|øÙ»wÿoï·}ðà¥^x»ÇwÇß²JÖ|ŒI»ë[Ô"„™Ž¥MSÐõ¡‹‡«‡væ­·¾ôÍoþõƒ/=óloûàÁKßþö_^]Ý?zÚ7¿ù×o½õ%‘{š¦Ù~—MÇiŸHÆvPÆÞâ@ßç–5v#ö0ÆuDZÐɲý¼Ùp]ç®Ëó¼é´õšë:2®y¶[À[ìibÃ7îB™Ž¥- EÊʬVE°^5¿6MØlö…Äl•eÁz Q4pÅÃÓ”ÛŠAcK ÀtD›e*¤õ¬V$°^û1 X¯Á0öÑ„u˜&¬×ûÍÄuÛˆ³I·C0¶©fì-Ûòœ».7MéMùºô³È8<ϹirÓ<2œîôÉÛíE†Ü0†iÓE3ÑâÌj<º£ãÃ1 9÷ý¡š'„ã´œ ÃaÚt¹Ldx¼Û86. °m€õz„È×…õ‚ i ¬ëû¶5OƒÛcYmFÈmê×ǘˆh‹b,Ñf,ûÙãX±Xès–ÔiukšG¦Á-q](Š6k?¸ÀK3Û^™ˆhGª«„.\Ë‚09z²|jØvSgà”Í紤݂-^H¢í•‰ˆàôë=i ¶ ®«Êæ^¥-µí&ù ¥[ÃhyG,Gåûc"¢=ùWE`ÛàûÊ…â…!0¶Ýd½ÊsúÜLÛ²ZZZ]'cÛ3c{Âݬ#þÓ^A‡m_^Ï!ú9 ‡Cõû)8ç\×[®ºÅ1×õ~{à’™ŽhOµH‹K£=¾Û@G‘hÇžuÛåÑi¢aŸÄ1&2<>UMÝ2DQýò"ÑŽ8!ÇÕÏ[¶ž(;N¯ƒõËf짆ÇCaÀ“a´‰ü9Ööû9ϹeqÓl éïÍÞbŽB;Z'·˜Žh‡ öá|àˆ¢<]—ëzÓã¦7ÝvÞigÌD†Ç퓎ðÔ a®Û´ÔÛ8Ù4ÛOUȇÜSí‘Yóù~~8QÅ"¸:Õ°Ôn £ýò›ã´ «"žd ; V½8Ž£JøDG0d·Ô9X_Äæ–õÞ»“â‚-ÁíÎØãsÖë!2¼D–:{áÄý\. òÁëT?d³Ú=q Lax Ýð‡À‚ |ÞPKÇqnOªƒù¢¨i*A)¸›‘ãô]EË;ª4q˜Ê[ZšAy0vØÆ&I’ú8¿{÷îÝ»wGl@ÝcK×ÁueL|V+(оwBëR“õ‚QÞÒfÙÑñnšBQ4™ Ó4ýóËv¦ÁÈ[,—ÇïÀ¤)x„FÖ³hi#Ly¦`i‰6ŠÀq.. , ŠBÈÚ…!D¤ÿç÷û-¾=ù¢$Q^´»]³w;H`lìvNÁµ ƒÕÿú=?i„,ÏDÛHe¸Müä1MQSÇÀ¯íýðÏz~{­$Ê‹ŽTKhv~¶C{Û¶»»²Ê½ŽçôŽxùq]‡ðÎŽ2³Ïñ,­úÈ£¶h}Q´/¦Û;eœgžçEQ º`Sj•_×[=%R¥Ú¬ŸÿëËï·)ãXYZyÔí±šC˜Ù躾^¯Ó“<Í»Üú€Â§„±žeý Š»ÂˆkÔ-4Ó²ì1ÆY–aHSEóùkPD×)§žçá(:@³<›Í4M[,7ÆÕÕ0þmÛö¿ëî iZù^«þŒDY–€®c×˶}µ€D+ƒÚ¢mü.“\w¨•žêœvµZÅqŒ! ›Í†sÎ+e¤1ºÒÛí–snYÖQu­×kxr`ÜpÓ49çÛí6e'«¢Àg(c`ý­°Š»ÂP=¸¢>ŧ( Šà:YµJE±\.ÑŠ¦iZ­ó”e™išŽã, ˲\×€(ŠÊk}ßoá[j¸¦ –{eå×›}¹n~{àòåR¨mi¡6ð8À²N‘ ëºiš8FeOn€ƒÑ¼qcy ÜÀ®³Ýè~™÷>5ûm8”eë¶ÚXä64<–DmÑÖ—Irê8sÇq’$A9¥i:ŸÏ Š¢ LÓdŒá!×u—Ë%þíyÞí4ÚòPݽC¿HTàÚíª.߇~ˆU3Õ©6¢6Ê[ÚC?å$Q.Ó½ó§-ÝáXp÷55éV¾AÐÙûÛeƒùËCyÑÞ—â)qº/ŠBì Xsz¤ºŒußAó’P[´‡¾H4³”!Ði*lik:1H’nsRZª•az¢MSµê¶Mô! õgšÖ‰³ö:ÅZPÚ€ j‹öiJcãÞU >=ëÅÍX·åx“±cb¢ÅŸÅ™y¡FäÉ•×zŽýÁrSf¶ä‹Fí0F¸ùtoç‚ʲ¬—ܺ/=xáíêŽ>|øð'?ùɽ{÷êNx4{t'¿Ópÿ«««¯|å+ŸøÄ'úè¸'>~Ýþ®ãc^ßß×Äl¹pƒÁŒ4ó`z–Vök=X=´W÷¯¾ý—ß~øÙ‡>|øðõ×_óÍ7¯®®žðÖ—Þzýë¯øÌ‡µ÷¿ºzóÍ7_ýõÞ; ¤ ‡;¯ÓÌ–†O⌽™P#O6wZ;ýÖs9ÏMnšÜÜðƒ;RñÍfƒ ­¦inïZÅ9ç7guGË­º\×=ÙGÓu±Í´DÏã†Ñvß3ßç–u²>ií­ÝGùZ×|­sÝáNÎ?-ªŠmÞÌ2æ±Îõºûðʾ˜áI6üÛnÅ6$”Ù–2 ¹a´jÍzÍuýŸú PX´¸MjË:õ~³>÷ƒÏkß5ŽcAÅî?·Œ-ç¼ Hn°Ø}†Ü4EzAîaÙÒØŠ>BˆI‰VxŒÖ9Ïîè\_óÚ·, £ b9çk¾[Þ´9,ÎÀu]zjƸÐHÜq8cçíñý¶Æ€ÿ¨:&#ÚS>ˆ7|ƒ“ØuµP,bqËåMZÉóÓÜM!;ØÓ3‰’Ë<çºÞÊØšæéžÊSf2¢c±±\gpæÙ¬«R±–eÉÚÃ-߇:ŸRΓ™Œ‰“EȰÉLhKkå}°,)“~±LF´¢c¹n„<!o2ìz;ƒÖn^Æ™Åü¨ËLºõ0ÆGÔï†-ô‡Ã¢íVò2ÆH´"LF´'ðB¹ÜmžÄòŠ£¨ËÂLÎsëÍÎ9.®4¹õ.¹n;!IN„9ç­ ôÅ1Ñê…B·“Á†QkžçeˆB÷QkÈÃæå|G$;ŽÓûG•®ó8nqÿ8æº.¹¨¾^Ÿh 4q¦!ÚA½PeìDƒ„òød4m€æúËU‚ã™vÐC]ÜM.É–²áEû©Q>¨9çx¡g:×cÞäb ð QìqhzŸûG=R¼ïA²PXE·lú-¢‘’%mÕ…¢åû,ŸÞ½P¸´Ó<™lðÔ‚£1RÚy«ó¢ˆè"jú‘!w›E_m¿ "Š­†O ­X~#Õ¼>Ìûó$‹Z¿¶‹=7p™yqÓRíQ& Ú¾2òrž[ÜjŽ(æ=…OÈÂ83¸!>Hîò(Z¡íclŒÈoe‰·Q»ƒxž÷â:\Œµ®ëb ô{æù²…˜KÐú‚ãÕã^ð6MMï(1B¥ÐÁ¤P^´ëu÷¹ÕXáR`ÖÞÑeÛøz7”v1ÉBTT٢ȅ ž2sšL`ÉG´øX d X˜`n`£ÃáeY†{®ëºDZ;Ʀ2X ˜GuÇÁhÊv›Á  M0Œ‹6ÉíeI…Ë2öS£Ãàëu—,Ë2à©éœ!Ã'¤ÀD‚†BûÓ®c’[Œá…¼K}§Èm62•dhÕçj‹Ö²øz ÐR´"Š­.ÆŽ«Xƒ´š]e¼í²­xZ¦ÕAbÌK«>ǘ†h[ ¨Xnœ`1V‡;Gc9ç-‘D(Ëj»OÁE °h³`]þÔêÜ™9Ï n‡¯ñ¯5(ÖuÝ×^{m*Šåœ3Î*B;\*ùÆzrÝÀ¡*Z]?Ô“¦)ôtì†Ä´¶¿x¬³Daцa)ZçÏ>¬;«úãþÿZÍ~›1;úb¬ .w«¢=áX8@}ÚQüw 2 GÏå¿Á&ùÓZZõiDaÑn6.„øCª›g¡£µúã¾½ÆSUìÓO?ýÝï~wì& ŽöñŸÁÏéoèöà9¥h‹Ú÷O XÄ0Ħ̴êӈ¢åœÀß/êN¸aŽ nÜ—ÑNGÍ‘š`ÑFütuî¨êg<8ˆpÝú1çÜqN£X.ìD«>(Ý5ìÅÿÀÙkÅÁ£˜†Šÿt®3ÎnäÜV¬ã8ñ`ÞÑÀ¬wTõ“œ«[VÍÀ˜_¯¯œD±\<Ë’V}QZ´YQ炲¸U‰o§ïTdža0Ɔ+34¸·PóÎ]8 8苲¬z©ÄñÉË¥j¤ÒªO=j‹ö?ýOçå·âkà`qëàï¸TìMëA0»°9á6 ÃÿÚ1*h±Ñ dZõ©GãÅpˆ,˹Zz=óôöÿ½û//>÷åwnzã?¾ñò?¼üÂÛ/¼ðêê ^yå•;wîtlƒã8²Eê·ŸùðÍ{oÞûν†sÞxãW_}õÆ‹?üá½/ùêàù÷¯®¾s¯é†­©ë·å ®7*ªGô¼K䩆cI’dYÖ{ÝPq>˜ÿÎsówzõ¿¿Úp὞~ˆY–€l ÔoŸxü‰fÅÀmÅ@b` Å6ô›a@QÜ¢÷’¹gÄS͇MÓô/øi׺Î0õ[Ý!ì„LÜb•+ˆsB¢9U-¯DKœÑá1Q‰–8)8W%#Ú…¡D«iZÝ+ÕCY–Íf³(Š^"xç*žçÍf³Áº«=I’, MÓf³Ùjµ*jÌMC¿’ƒ_V_Û.µüÎ1-mQ¶mû¾/Uý°a ‚ (³LÕ!I’Õj… ÷›ÍlÛnñéNÏíšÖŽ·f¡>£‰ë8Žl½Ò4M›OÐÕ{HAàº.~RÃ0Â0,ŠâÆZ.ÚÞ£ŸîÄ ÑÓ¤im'Æ-*Ö4Íj Ž ¥Ò4Íóu/Þ¸•àûêÛWl@Ý©þ7ÏóæÆc´`5b³Ù0Æ\×Å€$Á«{ñvÞ~¥|V öÛz-P~™²óêgxŒcÅ0 ƒ hìÚÝŒ÷ˆã87ÚÓlšÄÇ1N1Êêb±ÐuÝqôx GÑvbJsÚŽŒé=ÆX¿!Æ®®ë.—Küé{žçß¾fX\×õ<¯|<¡3Y¤ñåLõ QA€–¶ªs×u-˲â»HuTµ‘²Ùê9 'ÆÈÁŒ1]×ËPÕê|¯uÜ/ø¾ošæ|>×4-˲î®~±,ËqtÍf³,Ë|߯›¯ú¾o6¾(Іi­eYI’à=«aÏf³ù|ŽZ*§µ àM’$)o"ÒÃ0ŸÏ‡Z§%ŸzšRóP6ø.ÛJõ[QÍk`šÖô¨mlé]ó<¯:?ÚšÇßSè¤KDÝ0ÆŽÖƒ^è ¡KW ´j½Ûí‹Ån·Ãµ© ˆbKÑÓC]ÑÖU`»]Ôû&1Æ‹Ål6ÿÇî¤ â©î· &MkñãºN‹ ³ Ž-?SøEêZZâ\É27“ÐI ‰–85i*`iI´õh‰“’ePb¢¥2Q5™ÓfYÖe½tê´®ÏFýV×oBf² ȹUC“hOHôÙ¿ÿûß|ìcïýÉŸ<Š;¯½öZ÷¨‚˜¦Ù¢Nßo_üâ?ú裟þô§ªÓoEA Pu·3Ç—ÊØÁÏOð¿¿þõÿÝßÕÅ%Ç5ž¿Å[o½õÎ;ïÔU§ßD7šcá]1/µæ´ïÿìg³/~±î(ޏ”ÊP„>øà“ŸüdÝQEú-Ë ÄÆ¼ä…jD1ѾûîÇ?õ©º£h1Fÿñ)ÈãÇŸzªv¦£H¿y¸®ð„–¼Põ($Ú÷ö3˜}á u'`¤k댰såƒ>€gŸ}¶îú-I Ë„wù KÛˆZ¢ýx£§D‹¡|ðÁÇ>ö±†Fï·¢ÏÆÄ’òD….…D fä÷Ô¹Ì,(ÐoAº.¼‚Cfö Å¿÷ƒˆœ¦Z½ÂÑ÷ŽÕo»¬×2hQËÒ6x¡@ÉÚ¨ŠÐà…‚±ûmµÇ‘í¦)y¡šQÈÒÀ³Ÿû\ÃÑчyÊòÌ3Ï4±ß<² $ªÇ§)ìv0vy ÅQÈÒ¾ÿgŽ^ÇX)?~,xæ‰û-M! ŽeŠB¸.YÚf²´¿úå/ϤUŸ*¿þõ¯ÏY#'ŠB–>ý§Ú|ÂÑâÝ—ÉÑYëéûͶÁ²$cþÑÌ’çâj‰–8<Šäj`bÕH5ªá)ŽBÃcâX­ Ëä A åH¥%:³ZA’Àv+¯Ø(‚$·äSþݰœÓ±ßV«}՘ŠCru/&ÅöŠsÚgÿàþðÕWßyã ÁóÇ1hqàé§Ÿ~î¹ç~ñ‹_žß¢ßÐE ó7ð!Ÿ"‹b{D K •rCm·òGcã’r„ÜPÛ­u¿¡D~óÉL€êÅŸúùŠ{D!Ñ¢\îåc‰¶ä¹çžC¹ÝËG¶ß² ª;ìþÛ¿ÁrÙöâ_þRæb⪈„ÝQ¤Øº£dkÛPÈÈ’ít1!ÀØ{mþ–}÷Ýÿú…/üü?¨;a½^Àv»»¥jñøñãï}ï{EQÔ ÛoyÎM“pnœ1.Ñå.&„PÂ… ;ªùrAÝÝQÍçˆ÷®ëd8ÎþŸ.&Di ®È²,I’S¶æÎÏþøÎ_ýîï<úèÑ£÷Þ{ïóŸÿü)›ä8ŽlœýéûíÓŸþô£GêêÎHõÛÕÕ}xå•ݹ“Ë6ãþÕüè•Wò;wZô!H“¥M’$˲Svý£ÊÂãmîܹsG8}¯0dW¶Nßoï½÷^ÃQ©~»wï;­›ñë¬výFrdxlš¦Á…-½ª Tê·±›pÎ(ä=&B-AL -ALŒN¢­æ|Ýx¥z(˲ÙlEÑÁKZ¼Ëy“¦©¦ieañ¢(f³Ù‰ÝÑ„Ê ni‹¢°mÛ÷ýòrÎOÒ–e1ÆV×»žçY–Eq`DɰÁ¨XÇq(“N ÆØb±H’D×õ$I(ÝŸ¨2 ¥EÅš¦Ê%tAQ«ÕJÓ4MÓæóyùúr¹Ô®ACdÛ6\ÛÛGoT8Iß¶G×õ0 =Ïó‚@åÚŽøÁ‹¢¸10ö}?¯ëºyžçyž¦i]ÿ@š¦–eqÎÇ©>Ë&Ú-t߈‚¬êÖu]×u‹…çyR‘Q•·õ}¿üý†áy^Q-Æí£»Ý.‚,ËÇÙl6¥½ ð(Š(Š‹N Œg.í^EÕÉEf„ª®¬¨ëÆö$~;“îãO- Cü‰H]{Ð>/ ]×ñ§&r4MÓ4MqF}£‹®ëøL‰¢¨´Tꀄ0 q,8Ziév î=Æ€¾ƒ“Ì:\×].—øK ‚àÆ!˲ê~O7Žº®‹?ßÅb±Z­ÊG–e«Õ §‚yž+è$[­VøY,Ër]W¼÷öö¡çy8Òžn·{ÒöcŒ±†n_^¾rã·ng¼žçåD…ø:þŒ Ã(m8ç\×u]×뎖ÄqlY–ïû¾ï[–DZHââÑèñªß÷ ÃÀ)=ö†aåTöv÷–ì¸Q†±Ùln¼W»nºˆfšRó0ì[ÙÀ÷¢(ptWþqðhÚõ€"ý†= i#”¶V¤Ε‘Ã1úç6"×–š<(NÚYzà\¹r}Ç”0pæÐ3ñü ÑÄÄ ÑÄÄ ÑÄÄ8âˆÊ²ì’ëý´®ÏFýFU݆£I´”Ãišf‹N ~k×o„ Jl*M„84§%ˆ‰A¢%ˆ‰A¢%ˆ‰A¢%ˆ‰A¢%ˆ‰A¢%ˆ‰ñÿwY¼ºD.O™ %%CreationDate: Wed Jan 30 13:09:23 2002 %%Orientation: Portrait %%Pages: 1 %%DocumentFonts: Helvetica-Bold %%EndComments %%BeginProlog % Prolog copyright 1994-2000 Trolltech. You may copy this prolog in any way % that is directly related to this document. For other use of this prolog, % see your licensing agreement for Qt. /d/def load def/D{bind d}bind d/d2{dup dup}D/B{0 d2}D/W{255 d2}D/ED{exch d}D/D0 {0 ED}D/LT{lineto}D/MT{moveto}D/ND/.notdef d/S{stroke}D/F{setfont}D/SW{ setlinewidth}D/CP{closepath}D/RL{rlineto}D/NP{newpath}D/CM{currentmatrix}D/SM{ setmatrix}D/TR{translate}D/SC{aload pop setrgbcolor}D/BSt 0 d/LWi 1 d/PSt 1 d /Cx 0 d/Cy 0 d/WFi false d/OMo false d/BCol[1 1 1]d/PCol[0 0 0]d/BkCol[1 1 1]d /nS 0 d/LArr[[][][10 3][3 10][3 3][3 3][5 3 3 3][3 5 3 3][5 3 3 3 3 3][3 5 3 3 3 3]]d/GPS{PSt 1 ge PSt 5 le and{{LArr PSt 1 sub 2 mul get}{LArr PSt 2 mul 1 sub get}ifelse}{[]}ifelse}D/QS{PSt 0 ne{LWi SW gsave PCol SC true GPS 0 setdash S OMo PSt 1 ne and{grestore BkCol SC false GPS dup 0 get setdash S}{grestore} ifelse}if}D/BDArr[0.06 0.12 0.37 0.50 0.63 0.88 0.94]d/r28{{currentfile read pop dup 32 gt{exit}if pop}loop 3{currentfile read pop}repeat 0 4{7 bitshift exch dup 128 gt{84 sub}if 42 sub 127 and add}repeat}D/rA 0 d/rL 0 d/rB{rL 0 eq{ /rA r28 d/rL 28 d}if dup rL gt{rA exch rL sub rL exch/rA 0 d/rL 0 d rB exch bitshift add}{dup rA 16#fffffff 3 -1 roll bitshift not and exch dup rL exch sub /rL ED neg rA exch bitshift/rA ED}ifelse}D/rC{/rL 0 d 0{dup 2 index length ge{ exit}if 1 rB 1 eq{3 rB dup 4 ge{dup rB 1 index 5 ge{1 index 6 ge{1 index 7 ge{ 64 add}if 32 add}if 16 add}if 4 add exch pop}if 1 add 3 mul exch 10 rB 1 add 3 mul{dup 3 index lt{dup}{2 index}ifelse 4 index 3 index 3 index sub 2 index getinterval 5 index 4 index 3 -1 roll putinterval dup 4 -1 roll add 3 1 roll 4 -1 roll exch sub dup 0 eq{exit}if 3 1 roll}loop pop pop}{3 rB 1 add 3 mul{2 copy 8 rB put 1 add}repeat}ifelse}loop pop}D/rG{/rL 0 d 0{dup 2 index length ge {exit}if 1 rB 1 eq{3 rB dup 4 ge{dup rB 1 index 5 ge{1 index 6 ge{1 index 7 ge{ 64 add}if 32 add}if 16 add}if 4 add exch pop}if 1 add exch 10 rB 1 add{dup 3 index lt{dup}{2 index}ifelse 4 index 3 index 3 index sub 2 index getinterval 5 index 4 index 3 -1 roll putinterval dup 4 -1 roll add 3 1 roll 4 -1 roll exch sub dup 0 eq{exit}if 3 1 roll}loop pop pop}{3 rB 1 add{2 copy 8 rB put 1 add} repeat}ifelse}loop pop}D/sl D0/QCIgray D0/QCIcolor D0/QCIindex D0/QCI{ /colorimage where{pop false 3 colorimage}{exec/QCIcolor ED/QCIgray QCIcolor length 3 idiv string d 0 1 QCIcolor length 3 idiv 1 sub{/QCIindex ED/x QCIindex 3 mul d QCIgray QCIindex QCIcolor x get 0.30 mul QCIcolor x 1 add get 0.59 mul QCIcolor x 2 add get 0.11 mul add add cvi put}for QCIgray image}ifelse}D/defM matrix d/BF{gsave BSt 1 eq{BCol SC WFi{fill}{eofill}ifelse}if BSt 2 ge BSt 8 le and{BDArr BSt 2 sub get setgray fill}if BSt 9 ge BSt 14 le and{WFi{clip}{eoclip }ifelse defM SM pathbbox 3 index 3 index translate 4 2 roll 3 2 roll exch sub/h ED sub/w ED OMo{NP 0 0 MT 0 h RL w 0 RL 0 h neg RL CP BkCol SC fill}if BCol SC 0.3 SW NP BSt 9 eq BSt 11 eq or{0 4 h{dup 0 exch MT w exch LT}for}if BSt 10 eq BSt 11 eq or{0 4 w{dup 0 MT h LT}for}if BSt 12 eq BSt 14 eq or{w h gt{0 6 w h add{dup 0 MT h sub h LT}for}{0 6 w h add{dup 0 exch MT w sub w exch LT}for} ifelse}if BSt 13 eq BSt 14 eq or{w h gt{0 6 w h add{dup h MT h sub 0 LT}for}{0 6 w h add{dup w exch MT w sub 0 exch LT}for}ifelse}if S}if BSt 24 eq{}if grestore}D/mat matrix d/ang1 D0/ang2 D0/w D0/h D0/x D0/y D0/ARC{/ang2 ED/ang1 ED/h ED/w ED/y ED/x ED mat CM pop x w 2 div add y h 2 div add TR 1 h w div neg scale ang2 0 ge{0 0 w 2 div ang1 ang1 ang2 add arc}{0 0 w 2 div ang1 ang1 ang2 add arcn}ifelse mat SM}D/C D0/P{NP MT 0.5 0.5 rmoveto 0 -1 RL -1 0 RL 0 1 RL CP PCol SC fill}D/M{/Cy ED/Cx ED}D/L{NP Cx Cy MT/Cy ED/Cx ED Cx Cy LT QS}D/DL{NP MT LT QS}D/HL{1 index DL}D/VL{2 index exch DL}D/R{/h ED/w ED/y ED/x ED NP x y MT 0 h RL w 0 RL 0 h neg RL CP BF QS}D/ACR{/h ED/w ED/y ED/x ED x y MT 0 h RL w 0 RL 0 h neg RL CP}D/CLSTART{/clipTmp matrix CM d defM SM NP}D/CLEND{clip NP clipTmp SM}D/CLO{grestore gsave defM SM}D/xr D0/yr D0/rx D0/ry D0/rx2 D0/ry2 D0 /RR{/yr ED/xr ED/h ED/w ED/y ED/x ED xr 0 le yr 0 le or{x y w h R}{xr 100 ge yr 100 ge or{x y w h E}{/rx xr w mul 200 div d/ry yr h mul 200 div d/rx2 rx 2 mul d/ry2 ry 2 mul d NP x rx add y MT x y rx2 ry2 180 -90 x y h add ry2 sub rx2 ry2 270 -90 x w add rx2 sub y h add ry2 sub rx2 ry2 0 -90 x w add rx2 sub y rx2 ry2 90 -90 ARC ARC ARC ARC CP BF QS}ifelse}ifelse}D/E{/h ED/w ED/y ED/x ED mat CM pop x w 2 div add y h 2 div add translate 1 h w div scale NP 0 0 w 2 div 0 360 arc mat SM BF QS}D/A{16 div exch 16 div exch NP ARC QS}D/PIE{/ang2 ED/ang1 ED/h ED/w ED/y ED/x ED NP x w 2 div add y h 2 div add MT x y w h ang1 16 div ang2 16 div ARC CP BF QS}D/CH{16 div exch 16 div exch NP ARC CP BF QS}D/BZ{curveto QS}D /CRGB{255 div 3 1 roll 255 div 3 1 roll 255 div 3 1 roll}D/SV{BSt LWi PSt Cx Cy WFi OMo BCol PCol BkCol/nS nS 1 add d gsave}D/RS{nS 0 gt{grestore/BkCol ED/PCol ED/BCol ED/OMo ED/WFi ED/Cy ED/Cx ED/PSt ED/LWi ED/BSt ED/nS nS 1 sub d}if}D/BC {CRGB BkCol astore pop}D/BR{CRGB BCol astore pop/BSt ED}D/WB{1 W BR}D/NB{0 B BR }D/PE{setlinejoin setlinecap CRGB PCol astore pop/LWi ED/PSt ED LWi 0 eq{0.25 /LWi ED}if}D/P1{1 0 5 2 roll 0 0 PE}D/ST{defM setmatrix concat}D/qtfindfont{ true exch true exch{exch pop exch pop dup 0 get dup findfont dup/FontName get 3 -1 roll eq{exit}if}forall exch}d/qtdefinefont{dup 1 get/fxscale exch def 2 get /fslant exch def exch/fencoding exch def[fxscale 0 fslant 1 0 0]makefont fencoding false eq{}{dup maxlength dict begin{1 index/FID ne{def}{pop pop} ifelse}forall/Encoding fencoding def currentdict end}ifelse definefont pop}d/MF {qtfindfont qtdefinefont}D/MSF{findfont exch/slant exch d[1 0 slant 1 0 0] makefont definefont pop}D/DF{findfont/FONTSIZE 3 -1 roll d[FONTSIZE 0 0 FONTSIZE -1 mul 0 0]makefont d}D/ty 0 d/Y{/ty ED}D/Tl{NP 1 index exch MT 1 index 0 rlineto QS}D/T{PCol SC ty MT 1 index dup length exch stringwidth pop 3 -1 roll exch sub exch div exch 0 exch ashow}D/QI{/C save d pageinit/Cx 0 d/Cy 0 d/OMo false d}D/QP{C restore showpage}D %%EndProlog %%BeginSetup /pageinit { % 210*297mm (portrait) 0 842 translate 1 -1 scale/defM matrix CM d } d % Fonts and encodings used /Helvetica-BoldList [ [ /Helvetica-Bold 1.0 0.0 ] [ /Helvetica-Bold 0.936266 0 ] ] d % No embeddable font for Helvetica-Bold found /FE15[/.notdef/empty/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND /ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/space/exclam/quotedbl/numbersign/dollar /percent/ampersand/quotesingle/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X /Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore/grave/a/b/c/d/e /f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde /ND/U0080/U0081/U0082/U0083/U0084/U0085/U0086/U0087/U0088/U0089/U008a/U008b /U008c/U008d/U008e/U008f/U0090/U0091/U0092/U0093/U0094/U0095/U0096/U0097/U0098 /U0099/U009a/U009b/U009c/U009d/U009e/U009f/space/exclamdown/cent/sterling/Euro /yen/Scaron/section/scaron/copyright/ordfeminine/guillemotleft/logicalnot /hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior/Zcaron/mu /paragraph/periodcentered/zcaron/onesuperior/ordmasculine/guillemotright/OE/oe /Ydieresis/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply /Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls/agrave /aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute /ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve /oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex /udieresis/yacute/thorn/ydieresis]d /F1 FE15 Helvetica-BoldList MF /F2 11/F1 DF %%EndSetup %%Page: 1 1 %%BeginPageSetup QI %%EndPageSetup W BC /OMo false d [1 0 0 1 -59 -82]ST [1 0 0 1 -59 -82]ST CLSTART 0 0 272 359 ACR CLEND 1 1 B 0 0 PE NB 80 100 240 320 R [1 0 0 1 -59 -82]ST CLO [1 0 0 1 -59 -82]ST CLSTART 0 0 272 359 ACR CLEND 1 1 B 0 0 PE NB 200 420 100 VL [1 0 0 1 -59 -82]ST 1 1 B 0 0 PE 160 420 100 VL [1 0 0 1 -59 -82]ST 1 1 B 0 0 PE 120 420 100 VL [1 0 0 1 -59 -82]ST 1 1 B 0 0 PE 240 420 100 VL [1 0 0 1 -59 -82]ST 1 1 B 0 0 PE 280 420 100 VL [1 0 0 1 -59 -82]ST 1 1 B 0 0 PE 320 140 80 HL [1 0 0 1 -59 -82]ST 1 1 B 0 0 PE 320 180 80 HL [1 0 0 1 -59 -82]ST 1 1 B 0 0 PE 320 220 80 HL [1 0 0 1 -59 -82]ST 1 1 B 0 0 PE 320 260 80 HL [1 0 0 1 -59 -82]ST 1 1 B 0 0 PE 320 300 80 HL [1 0 0 1 -59 -82]ST 1 1 B 0 0 PE 320 340 80 HL [1 0 0 1 -59 -82]ST 1 1 B 0 0 PE 320 380 80 HL [1 0 0 1 -59 -82]ST 2 1 B 0 0 PE 60 120 240 320 R [1 0 0 1 -59 -82]ST CLO [1 0 0 1 -59 -82]ST CLSTART 0 0 272 359 ACR CLEND 1 1 B 0 0 PE NB 75 415 10 10 E [1 0 0 1 -19 -82]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 21 -82]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 61 -82]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 101 -82]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 141 -82]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -59 -122]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -19 -122]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 21 -122]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 61 -122]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 101 -122]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 141 -122]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -59 -162]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -19 -162]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 21 -162]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 61 -162]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 101 -162]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 141 -162]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -59 -202]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -19 -202]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 21 -202]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 61 -202]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 101 -202]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 141 -202]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -59 -242]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -19 -242]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 21 -242]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 61 -242]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 101 -242]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 141 -242]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -59 -282]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -19 -282]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 21 -282]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 61 -282]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 101 -282]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 141 -282]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -59 -322]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -19 -322]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 21 -322]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 61 -322]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 101 -322]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 141 -322]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -59 -362]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 -19 -362]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 21 -362]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 61 -362]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 101 -362]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 141 -362]ST 1 1 B 0 0 PE 75 415 10 10 E [1 0 0 1 26 338]ST 1 1 B 0 0 PE F2 F 14 Y(0)6 0 T [1 0 0 1 263 338]ST 1 1 B 0 0 PE (1)6 0 T [1 0 0 1 8 1]ST 1 1 B 0 0 PE (1)6 0 T [1 0 0 1 8 321]ST 1 1 B 0 0 PE (0)6 0 T QP %%Trailer %%EOF clipper-2.1/dox/container.png0000644000374100011300000001005310736662154013220 00000000000000‰PNG  IHDRÝ´Ÿ]¾ßªIDATxÚíoˆgÇ¿{xXüS›=ªÅ^ÕfÁƒ®l9’ nQ*LÊJj%«/Û-4iQè íÎУ‚•Ä®/ µ×Láä–}Q¶ªÜr™b©T/¹£‹9¹…Lm{]ðÚËtWW*÷"÷âÉŽ³Iv7&ó<3ù}È‹dþ<Ïo~ùÎóû=Ï<3ÓQ,A‚ñ ÞDH—„ˆ. !]"Bº$D„tIˆé’Ò%!"¤KBD–ñ6À5ütïßßù™·-çÑU<´ü—¼­ ]ÖÌ÷w~þWáo+œ@]R'D„tIˆé’Ò%!"¤KBDH—„ˆ. !]6Â'ž9$mÛ·yý‹O=1:|Ò\®ç&N¿Ý·yý¾Íë­Ë‰z!]ÖÍ'ž9¯ž‰ž8569uäÝÄÄ•/ÒçFÙªÑá“ëÛ8695’¹Á¶äm¬[!]ÖÍ•?:pôÍžÞízz·ï6uùÕ—_ }ÀÊ× }óÎô´Ã¶ÍÎ8]c‹ ]ÖMþúDOïó綾ݧ>gßÙ°1qlèÖwß²ŸL£N 81x`ßæõ‡¤mzn‚-4#þ¾ÍëdžŒŸ|ñ©'Xz0qå2€ô¹Q3a`ꟙ67z¡ïÄàVËÒçFË6`ÕíÛ¼Þ4Øü^Õ*A ]6ºÇ6T]~äÝÄéé¡úIÛdžÌÖë«/¿èéÝ>69µ­oÏo ±…½»öŒMNMN½ÿÙ_ÿòÑ(ËGÿô·ŽMN…öè¹ =7quü©ÇÇ&§öF±Ï«gØf#™][z¾úò ³öÞ]»ŸåÐèðÛÞÿìêØäTOﳺJªZ%tÿxäþ{›ÍÛØ·yýØä”uÕÄ•Ë,¬[—°¦ëØÙÊv1¿ë¹‰+¾0;óSþúDþú€²bG‡OžWß³.yçüø{ûÌÍ&®\>þÒ~öÓ,¶Ì<ö³ªUþ¦sU÷¯Vóv6µ—õÓµ¥çêøó§ž›8þÒ~WÇ/˜}ðžÞíGÞMX³JÞØÛ·jÍšm}{Ì4Àl_gg¦Y`Ý9ÌÚTöñw÷ †$ÒL$Ü é²nzzwŒ¿Íò¿Ù™éó꙽‘ÃÖ=¶!}n”-G…8Xß|tødï®=æÂÐþžÞíl—Þ]{>x«”›žWϤÏöîÚ}uüS¶dâÊåCÒ6Ï8ýz”-¼:þi¥yÏ8ýz„m`­Î\²¤UBP$jãú3¬ÑÉÜ0ÿÅUk²6i¯þþÔ#6²UlØh®е¥‡-|çü8[øì¶„}yùwÇÙ¦Ñ‘Ì Vàª5±ÝÙŽ#™O>½ƒUͶ7«0Í3Ëyòé¬væ0Õ>{``«®ÿ8ÃÛÓÅb±Hùe­˜ùeT¦¤•ÌÎL¯|pÍ’E±fu¼&®\~ÛLl±ŠòKbµˆÀ­ï¾z¡ïÖwßÎÎL¿-\üµ ºÂeôônß94ôBßéŸöF?ÿÊ!ÞµŠãµÒLwÇ bAH—„ˆ. !]"Bº$D„tIˆé’W¯•GW=`{™ÿþææ¯7nâµ»c‡Ù¼/з/…BÁçó%“ÉÆvO&“>Ÿ¯P(ð>Ž–@×{¸ÑßßoF:n¸„P(Ä”ÍûPZï£Ma­]>Ÿo¦|>ßL‹+2¤K°‹Åš/*‹y2šSç@óÜŠ7£9ï£íH§ÓÍGp+,š§ÓiÞGf'4~é(†aD£QY–ý~¿]eúý~Y–£Ñ¨a¼Ï6(Ž;н܊ע9ï»°¥¾뛓.ÂÆ>øBx©oNqÜ!ZÁ­x'šó>1Ú‚D"Ѻn…EóD"Áûˆ›…tÙrÎüZšÅ:Åñ–ã|lu&gh-¼O Ã¥/â@«Õ.[H&“Àeì†5Ï™L†·„âx ƒ’$Åb1.µ+Š¢i;7\]‡lŠ¢†!Ë2/dY6 CQÞžhÞ ¶7a}îa”5–nœÒAqÜ~ Ãáp˜W·¢(J*•Êd2>Ÿ·-u@º´Ñ;¾inƒðn°½† ÜŠ£9éÒN„8tÝ”Šãv"ò…—Méà}bxÁ/L»k‚&éÒ„àV\ÍI—M‘L&%I* ápX’$Þæ,$Iáp¸P(H’$rÛIºlŠp8 `õêÕ«W¯6‚[ÉçóÌZáp˜·9 B×!G×õT*àöíÛ·oßVU•·EK£ª*³@*•Òu·EÕ!]6N™]q›l™‘âžK¼lc½ÜE·.$ Ól¿ßÏÛœê.Ätãý4ì~#f¿˜½Òeƒ°Ïçê’cí˜39Äìý.!ŸÏ.%#“ÉŽ$P¿§TU étšý¯.Å<{?¤ËaeãmE³°Áñ¶¢ ®™·‘E6…o+ZBáêkw=ï ×¼"…TqÞV´ŠzuéyoP'D„tIˆé’Ò%!"¤KBDH—„ˆ. i]Æ. è”šW•ÑQñ¥ · r;ã¦ñº.ã@HE h€ZêzÑ—ú#ÁoD޹O>ñº.S@  [ܽȪºˆ]€ ÷#8ë ÈE ¤›8Ͻ¯Ë윯a SÃ*ÕÑ–t.kc\ÞˆÌ}in¢•×u À_çª,2@(oû]ä iN—:²h´~Ú@—ehK­JÐiɲ¼mv—7 H@óº.ó{ÊY TÃ*y.IbÏýuÜAÀ2M‰Þ×¥(s§¾Äy©Ua 5×Ñ€.Þ‡à"o¨€HMO˜öº.e „€  ð[Îã…VÎE.—<ÿLoè€f'jbtÓ5ó‚Ä·°+Y©ÈÙ‹_°À"ÓjoÄš ß&^o/ wBº$D„tIˆé’Ò%!"¤KBDH—„ˆ. !]"Bº$DÄ5×!ÃÛUÔ­ì­uu"Òð¡Ùè Ñ(ïp: {Nn“/ñdtõCYÇ5Ï´Ã0B¡P °>û¾1¢Ñh6›õÆS0¤½tÉÄd×›ÁƒÁ -'ªÀ»ÁvöŸ%ÎÞ꺗Q¸‚vÑ%k#m'{[ %š¶ÓqÜ0Œ`0‡c1›¦­ZP%•J™¯!l¡-tÙß߯ëº]ie%Á`Ðï÷»æ•ónÀûãêñx\Ó´–Š&™Ljš{öçàH´ÖF69ZY ìm#”hÚ…—ãxKÓÊJ(Ñ´/ë2 pò½IÎ×èU<›_*Š’Ífî‹$“Él6«(®xè ØðN$Zk±H+…ªÚKxP—…BÁçóÅb1^Äb1ŸÏW(x{ÂÅx-¿d33¸&²SšÕÑ0^Ë/YnÇ}.3€ÍÆáÝ`Û  ‚¼åÍêà˜N¸ïè’n¡:¬dûd‘vÀ#ºd£ÙN9c“ëè:P½x¡ßîëH’Ä=­¬J4Õ4®Õ…t)þUñ- ×÷ǣѨ®ë‚Ï1K&“º®G£{·E+áH4…‹²7a3`1q±.]×ÛpÄ@XܪK—Ž 5Â*2®ì÷Øx¸óÐçµàJ]ºúê³ WðÇMºTU5›Íú|>UUYçmQƒ†ÑÕÕ‰D ÑH/Rô*¼‰Z) ~¿ÀòåË]Ñ_œL&³|ùr~¿ŸfÄUâšñËx<®ë:€{÷î©jo¶UUïÝ»@×uº‘²wèÒ0 «ÝÁ«‚ªª†að¶H0x7Ø5af`Í?"P¬ý¶H$ÂÛ±p.óù<ûó$IòX*V($IbGGƒšV\ KöÏɲÌÛV!Ë2;ëx"¢ë’;ÏÄî6?ÌڽߣiZ>Ÿ7ƒW‘$)ŸÏkšÆÛQè(þ]æm?6†Ñ¨o—BߤxÛÍ<ÖËp½½Ïêõò7)ò˜•ˆljö„tIˆé’Ò%!"¤KBDH—„ˆ. ©¢ËøEtEÇAt¾% Z¡ÿPÚÀ¸‹Î׺Örã”$:_€Žƒ¼ý´(âx¬G åär]Æ/"~‰AG< -õsHÝw#z¶´rR7Â[[n\üò§ÙÑI å1ÏP®ËÔ5ÄöCê©òsP/€¼úº-‡Ô5$^vÈ>ß ÞZ Ñ<æ –•ýÎ~ éðýŸá­¥³Ü·‰ADÏ·‰Áûré8i ´ë¥µŒYH[€þ÷î¯ÈN$ t ´ëð¯Eò0›Êmb»¨Ÿ—Ê/Ž”–w¿õŒYGbMUª`åwDòpɪ–"ŽÇX½¡S÷·ô¯­â±ªn¬,‡/UòKÿÃÕ7eM‚1[nw¬¿$ÈNþ€Â%§³#,Ž 8‚üéR+Âü+u£8‚ðÖû‘LvÑuZþµ¥ÿÉ%åäO£8©»´oeæŽÇ¡åÐuñ‹0î¶Ð‰‚x̬ÔܲªÇª.d8æ±%Y¶äZ®ä_ó. Generally T will be the floating point type, but in some cases vectors of \c int are used. Vec3<> also defines various simple arithmetic operations, including addition, subtraction, negation, and scaling. Any coordinate type may be constructed from a Vec3<> by using an explicit constructor. (Implicit conversion is not allowed, since this would allow accidental type conversion between coordinate types). The elements of the vector may be accessed as v[0], v[1], and v[2], however the coordinate types all define type-specific names for the members. Similarly, clipper::Mat33 provides a template class for a 3x3 matrix of values. Matrix-vector and matrix-matrix products are defined. If a vector pre-multiplies a matrix, it is assumed that the vector is a row rather than column vector. Symmetric matrices are common on crystallography, so a type is defined for these; clipper::Mat33sym. This does not define any operations except conversion to or from Mat33. This form is therefore used mainly for packed storage of some quantities, such as anisotropic U values. Rotation-translation operators are provided by the clipper::RTop template class. A rotation-translation operator consists of a rotation defined by a Mat33, and a translation defined by a Vec3. The matrix and vector components may be accessed through the rot() and trn() methods. RTop's may be applied to vectors or combined using the '*' operator. \section s_ctcoord Coordinate types \subsection s_ctrecip Reciprocal space coordinate types \par HKL The integral index (sometimes referred to as a Miller index) of a reflection. It has components h, k, and l. \par Coord_reci_frac Reciprocal space fractional coordinate. This is identical to an HKL, except that the values are floating point. This would commonly be used in rotation function calculations when interpolation is required in reciprocal space. \par Coord_reci_orth Reciprocal space orthogonal coordinate. This is a coordinate defined in inverse Angstroms along three orthogonal axes. The exact convention for selection of these axes is defined by the clipper::Cell class. \subsection ss_ctreal Real space coordinate types \par Coord_orth Orthogonal coordinate in Angstroms. This is a coordinate defined in Angstroms along three orthogonal axes. The exact convention for selection of these axes is defined by the clipper::Cell class. \par Coord_frac Fractional (crystal) coordinate. This is defined as the fractional position in the unit cell, with each component traversing a unique cell over the range (0..1). \par Coord_map Map coordinate. This is a floating point coordinate representing a position in the frame of a map. In the case of a crystallographic map, this will simply be the fractional coordinate scaled by the grid sampling of the unit cell (not the asymmetric unit). However in most cases Coord_frac is used in preference for crystallographic maps. In the case of a non-crystallographic map, fractional coordinates are undefined, but the NXmap will define a conversion between orthogonal and map coordinates. \par Coord_grid Map grid coordinate. This is the integer version of a Coord_map, and represents the index of a grid point in a map. The origin is always at the origin of the coordinate frame of the map, thus for crystallographic maps the origin is the crystallographic origin. For non-crystallographic maps, the origin is the first grid point in the map. \section s_ctderiv Derivative types Derivatives and curvatures may be with respect to orthogonal, fractional, or map coordinates. When performing calculations on a crystallographic map, derivatives are usually with respect to fractional coordinates, however map coordinates may be used if preferred. The resulting derivatives may then be converted to orthogonal coordinates if necessary. When performing calculations on a non-crystallographic map, derivatives are calculated with respect to map coordinates. Derivatives are stored as Vec3<> with the template type matching the type of the map. Curvatures are stored as a Mat33<>. \section s_ctops Operator Types Two types of rotation-translation operators are defined as special cases of RTop<> with a floating point template type. \par RTop_frac This is a rotation-translation operator defined on fractional coordinates. A Crystallographic symmetry operator is an example of this type, and in fact Symop is derived from this class. \par RTop_orth This is a rotation-translation operator defined on orthogonal coordinates. A non-crystallographic symmetry operator is an example of this type. \section s_ctother Other types Anisotropic atomic displacement parameters (ADPs) are also defined. These are derived from Mat33sym<> with a floating point template type. There are two types: \par U_aniso_orth Anisotropic atomic displacement parameters defined on orthogonal Angstrom coordinates, as used in PDB files. The terms have units of inverse angstroms squared. \par U_aniso_frac Anisotropic atomic displacement parameters defined on fractional coordinates. \section s_ctconv Conversion of coordinates and related types Coordinates and related types are converted by the following means: - Any fraction coordinate, gradient, curvature, operator, or ADP (with the \c _frac suffix) may be converted to an orthogonal coordinate, etc. (with the \c _orth suffix) or vice-versa using the appropriate method of the Cell class. The name of the required method is always the return type in lower case. e.g. to convert a clipper::Coord_orth to a clipper::Coord_frac, call the clipper::Cell::coord_frac() method of the appropriate clipper::Cell object. - A real space fractional coordinate, gradient, or curvature may be converted to a map coordinate, gradient, or curvature or vice-versa, by using the appropriate method of the clipper::Grid_sampling class. The name of the required method is always the return type in lower case. Fractional coordinates may also be converted directly to grid coordinates and vice-versa. - Coord_grid can be converted directly to Coord_map using the appropriate constructor. Coord_map can be converted to Coord_grid using a method specifying the type of rounding required. - Coord_map for a non-crystallographic map may be converted to a Coord_orth or vice-versa using the methods of the clipper::NXmap object concerned. */ clipper-2.1/dox/img_container.eps0000644000374100011300000001302110736662154014055 00000000000000%!PS-Adobe-2.0 %%Creator: dot version gviz 1.7.3b (Mon Feb 26 14:10:22 EST 2001) %%For: (cowtan) Kevin Cowtan %%Title: G %%Pages: (atend) %%BoundingBox: 36 36 251 233 %%EndComments %%BeginProlog save /DotDict 200 dict def DotDict begin %%BeginResource: procset /coord-font-family /Times-Roman def /default-font-family /Times-Roman def /coordfont coord-font-family findfont 8 scalefont def /InvScaleFactor 1.0 def /set_scale { dup 1 exch div /InvScaleFactor exch def dup scale } bind def % styles /solid { } bind def /dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def /dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def /invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def /bold { 2 setlinewidth } bind def /filled { } bind def /unfilled { } bind def /rounded { } bind def /diagonals { } bind def % hooks for setting color /nodecolor { sethsbcolor } bind def /edgecolor { sethsbcolor } bind def /graphcolor { sethsbcolor } bind def /nopcolor {pop pop pop} bind def /beginpage { % i j npages /npages exch def /j exch def /i exch def /str 10 string def npages 1 gt { gsave coordfont setfont 0 0 moveto (\() show i str cvs show (,) show j str cvs show (\)) show grestore } if } bind def /set_font { findfont exch scalefont setfont } def % draw aligned label in bounding box aligned to current point % alignfactor tells what fraction to place on the left. % -.5 is centered. /alignedtext { % text labelwidth fontsz alignfactor /alignfactor exch def /fontsz exch def /width exch def /text exch def gsave % even if node or edge is dashed, don't paint text with dashes [] 0 setdash currentpoint newpath moveto text stringwidth pop alignfactor mul fontsz -.3 mul rmoveto text show grestore } def /boxprim { % xcorner ycorner xsize ysize 4 2 roll moveto 2 copy exch 0 rlineto 0 exch rlineto pop neg 0 rlineto closepath } bind def /ellipse_path { /ry exch def /rx exch def /y exch def /x exch def matrix currentmatrix newpath x y translate rx ry scale 0 0 1 0 360 arc setmatrix } bind def /endpage { showpage } bind def /layercolorseq [ % layer color sequence - darkest to lightest [0 0 0] [.2 .8 .8] [.4 .8 .8] [.6 .8 .8] [.8 .8 .8] ] def /setlayer {/maxlayer exch def /curlayer exch def layercolorseq curlayer get aload pop sethsbcolor /nodecolor {nopcolor} def /edgecolor {nopcolor} def /graphcolor {nopcolor} def } bind def /onlayer { curlayer ne {invis} if } def /onlayers { /myupper exch def /mylower exch def curlayer mylower lt curlayer myupper gt or {invis} if } def /curlayer 0 def %%EndProlog %%BeginSetup 14 default-font-family set_font 1 setmiterlimit % /arrowlength 10 def % /arrowwidth 5 def % make sure pdfmark is harmless for PS-interpreters other than Distiller /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse % make '<<' and '>>' safe on PS Level 1 devices /languagelevel where {pop languagelevel}{1} ifelse 2 lt { userdict (<<) cvn ([) cvn load put userdict (>>) cvn ([) cvn load put } if %%EndResource %%EndSetup %%Page: 1 1 %%PageBoundingBox: 36 36 251 233 %%PageOrientation: Portrait gsave 35 35 216 198 boxprim clip newpath 36 36 translate 0 0 1 beginpage 0 0 translate 0 rotate [ /CropBox [36 36 251 233] /PAGES pdfmark 0.000 0.000 0.000 graphcolor 14.00 /Times-Roman set_font % CSpacegroup gsave 10 dict begin newpath 188 188 moveto 100 188 lineto 100 152 lineto 188 152 lineto closepath stroke gsave 10 dict begin 144 171 moveto (CSpacegroup) 75 14.00 -0.50 alignedtext end grestore end grestore % CCell 1 gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 135 116 moveto 79 116 lineto 79 80 lineto 135 80 lineto closepath gsave 0 setgray stroke grestore fill gsave 10 dict begin 0.000 0.000 0.000 nodecolor 107 99 moveto (CCell 1) 43 14.00 -0.50 alignedtext end grestore end grestore % CSpacegroup -> CCell 1 newpath 135 152 moveto 130 144 125 134 121 125 curveto stroke newpath 119 126 moveto 116 116 lineto 123 124 lineto closepath gsave 0 setgray stroke grestore fill % CCell 2 gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 209 116 moveto 153 116 lineto 153 80 lineto 209 80 lineto closepath gsave 0 setgray stroke grestore fill gsave 10 dict begin 0.000 0.000 0.000 nodecolor 181 99 moveto (CCell 2) 43 14.00 -0.50 alignedtext end grestore end grestore % CSpacegroup -> CCell 2 newpath 153 152 moveto 158 144 163 134 167 125 curveto stroke newpath 165 124 moveto 172 116 lineto 169 126 lineto closepath gsave 0 setgray stroke grestore fill % CXmap gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 98 44 moveto 0 44 lineto 0 8 lineto 98 8 lineto closepath gsave 0 setgray stroke grestore fill gsave 10 dict begin 0.000 0.000 0.000 nodecolor 49 27 moveto (CXmap) 84 14.00 -0.50 alignedtext end grestore end grestore % CCell 1 -> CXmap newpath 92 80 moveto 85 71 77 61 69 51 curveto stroke newpath 68 53 moveto 63 44 lineto 71 50 lineto closepath gsave 0 setgray stroke grestore fill % CXmap gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 214 44 moveto 116 44 lineto 116 8 lineto 214 8 lineto closepath gsave 0 setgray stroke grestore fill gsave 10 dict begin 0.000 0.000 0.000 nodecolor 165 27 moveto (CXmap) 84 14.00 -0.50 alignedtext end grestore end grestore % CCell 1 -> CXmap newpath 122 80 moveto 129 71 137 61 145 51 curveto stroke newpath 143 50 moveto 151 44 lineto 146 53 lineto closepath gsave 0 setgray stroke grestore fill endpage grestore %%PageTrailer %%EndPage: 1 %%Trailer %%Pages: 1 end restore %%EOF clipper-2.1/dox/develop_hkl.dox0000644000374100011300000003623210736662154013547 00000000000000/*! \page p_develop_hkl Developing using Reflection Data \section s_hklund Understanding HKL_info and HKL_data<> Storage of reciprocal space data in Clipper involved two objects: HKL_info and HKL_data<>. The first stores a list of reflections (HKLs), and the second stores a list of data of some type for each reflection. Why is this division made? Because often, many types of data will be stored for the same reflection list, and duplicating the list of reflections for each data list would be wasteful. The relationship of an HKL_info object and several HKL_data<> objects is shown below. \image html hkl_objs.png \image latex hkl_objs.eps width=8cm These objects handle all the crystallographic symmetry operations associated with storing data in reciprocal space. To the programmer, the data appears to fill a sphere of reciprocal space. However, only a unique set of data is stored, and any changes to a data values are automatically reflected in the symmetry and Friedel related reflections. \section s_hklinf The HKL_info object The HKL_info object stores a list of reflections, transformed into a standard reciprocal space asymmetric unit. For example: - \b P1: data is stored for l>0 or (l=0 and (h>0 or (h=0 and k>=0))) - \b P2: data is stored for k>=0 and (l>0 or (l=0 and h>=0)) - \b P212121: data is stored for h>=0 and k>=0 and l>=0 However, the programmer should never need to know which asymmetric unit is being used, as data in other parts of reciprocal space are generated automatically. The HKL_info object also stores a lookup table, which is used to rapidly determine the location in the list of a given HKL. It also stores lookup tables for the reflection class (HKL_class) and resolution (invresolsq). The reflection list depends upon the spacegroup (which determines the reciprocal asymmetric unit and systematic absences), the cell parameters, and the resolution limit. Therefore to initialise an HKL_info object, objects of types Spacegroup, Cell and Resolution are passed to the constructor or initialiser. \par Reflection classes The 'class' of a reflection is a function of its HKL and the spacegroup, and describes whether it is centric, systematically absent, and what its allowed phase and symmetry enhancement factor or multiplicity are (i.e. epsilon). The class of a reflection is described by the class clipper::HKL_class. \par Reflection resolution The resolution of a reflection is a function of its HKL and the unit cell parameters. It is generally handled in terms of the inverse resolution squared, or 'invresolsq'. This is equal to \f$ 4\sin^2 \theta / \lambda^2 \f$. \section s_hkldata The HKL_data<> object The data object is not much more than an array of data, but it has a number of special methods to make crystallographic operations on that data more convenient. It is defined as a template class, where the template type is the type of crystallographic information to be stored in the object. It simply stores a list of data of that type, and a pointer to the parent HKL_info object, which defined the HKL for each element in the list. Additionally a pointer to a Cell object is stored, which may optionally be used for the case where different data comes from slight different unit cells (e.g. RT and frozen data). Therefore to initialise an HKL_data object, an HKL_info object and optionally a Cell object are passed to the constructor or initialiser. Data types typically include several values. Examples include measured X-ray intensity and its standard deviation (I_sigI), structure factor magnitude and phase (F_sigF), and Hendrickson-Lattman coefficients (ABCD). Data types are derived from a base type (Datatype_base), and should override all the methods of that type. This will allow the data to be automatically transformed about reciprocal space, and imported or exported to a file, as required. Methods are provided to access the data by index or by HKL. Any transformations which must be applied to the data in obtaining a symmetry or Friedel related value are applied automatically. In order to use the class efficiently, some important difficulties must be borne in mind. A problem arises when we wish to apply some transformation to the values stored in a data list. In this case, we must access every unique value in the asymmetric unit once and once only, applying the desired transformation. Only then will the entire data list have been transformed correctly. A second problem arises if we want to access the stored value of the data at some position in reciprocal space, for example to expand to a lower spacegroup. Then it is necessary to search through all the symmetry operators, applying each one in turn to the desired HKL to find the operator which brings the HKL into the stored asymmetric unit, with a Friedel inversion if necessary. Clearly this can be time consuming, especially if there are many symmetry operators. Both these problems are addressed by the use of HKL reference types. These come in two forms: - index-like references (clipper::HKL_info::HKL_reference_index) - coordinate-like references (clipper::HKL_info::HKL_reference_coord) The index-like reference behaves like an index: it stores a reference to an HKL_info object and a position in the reflection list. It is used to loop over all the values in the reflection list, using the HKL_info::first(), and HKL_reference_index::last() and HKL_reference_index::next() methods. The HKL corresponding to the index, its resolution, and reflection class can be returned at any point. The coordinate-like reference behaves like an HKL coordinate: it stores a reference to an HKL_info and an HKL. However to enhance performance it also stores the position in the list corresponding to that HKL, and the number of the symmetry operator used to get back into the stored asymmetric unit, along with a flag to signify Friedel inversion. Since reflections are usually accessed systematically, the next HKL used will commonly require the same symmetry operator, and so that operator is tried first. Methods are provided for incrementing and decrementing along the h, k, and l directions. The differences between the index-like and coordinate-like reference types can be summarised as follows: - index-like types can only refer to the position of a stored datum, i.e. reflection in this list. - coordinate-like types can refer to any possible position, and therefore also store the symmetry transformations required to get back to the stored data. HKL reference types may be shared between any data lists which have the same reflection list. It is the responsibility of the programmer to ensure this restriction is obeyed. \section s_hklcode HKL_data code fragments \subsection ss_hklio Importing and exporting HKL_data Currently objects are provided for import and export to CCP4 '.mtz' files and XtalView/SHELX '.phs' files. (More will be added later). To import a datalist from an MTZ files we need an HKL_info object to hold the reflection list and an HKL_data object to hold the actual data. We also need MTZdataset and MTZcrystal objects to hold the additional information which will be returned from the MTZ file. Then we create a CCP4MTZfile object, open it onto a file, and read the reflection list and data. \code clipper::HKL_info myhkl; // define objects clipper::MTZdataset myset; clipper::MTZcrystal myxtl; clipper::HKL_data fphidata( myhkl, myxtl ); clipper::CCP4MTZfile mtzin; mtzin.open_read( "my.mtz" ); // open new file mtzin.import_hkl_info( myhkl ); // read sg, cell, reso, hkls mtzin.import_hkl_data( fphidata, myset, myxtl, "native/CuKa/[FCAL PHICAL]" ); mtzin.close_read(); \endcode Similar functions are used for accessing XtalView/SHELX .phs files, although the interface is much simpler since these files do not contain labelled data. \subsection ss_hklexp Expanding reflection data to a lower symmetry To expand a list of data to a lower symmetry, we need two reflection lists, one for each spacegroup; and two datalists, one for each reflection list. The lower symmetry list is then filled by looping over all the reflections in that list an requesting the value from the other list for that HKL. \code clipper::HKL_info oldhkl( .... ); clipper::HKL_data olddata(oldhkl); // ---- fill the objects here ---- clipper::HKL_info newhkl( Spacegroup( Spgr_descr( 1 ) ), oldhkl.cell(), oldhkl.resolution() ); clipper::HKL_data newdata(oldhkl); HKL_info::HKL_reference_index ih; for ( ih = newhkl.first(); !ih.last; ih.next() ) { newdata[ih] = olddata[ih.hkl()]; } \endcode Note that the '.hkl' is vital, as we want the data with the corresponding hkl, not the data from the corresponding position in the list. If efficiency is paramount, using an HKL_reference_coord to access the old list will save some searches over the symmetry operators: \code clipper::HKL_info::HKL_reference_index ih; clipper::HKL_info::HKL_reference_coord ik( oldhkl ); for ( ih = newhkl.first(); !ih.last; ih.next() ) { ik.set_hkl( ih.hkl() ); newdata[ih] = olddata[ik]; } \endcode \subsection ss_hklconv Applying simple operations to a whole data list While it is simple to loop through a reflection list and apply some transformation on the data, some simple operations have been automated using built-in C++ arithmetic operators for data of specific types, logical operators for data or any type, comparison operators for flags, and function 'Computation operators' for more complex operations. \par Arithmetic operators. Arithmetic operators are defined for the addition, subtraction, and scaling of map coefficients (i.e. HKL_data), and for the addition and scaling of Hendrickson-Lattman coefficients (class HKL_data). Thus, to add two lists of map coefficients, the following code is required: \code clipper::HKL_data fphi1, fphi2, fphi3; // ---- set data here ---- fphi3 = fphi2 + fphi1; \endcode The columns are added using vector addition. If any values in either list are missing, then the result is missing. Subtraction is similar. Multiplication by a scalar scales the magnitude of every non-missing element in the list. \par Logical operators. Standard C/C++ bitwise logical operators (&, |, ^, !) may be applied to any data list. For each data in the list, the value 'true' will be returned if the data is not missing, or false if it is missing. The result of the operation is a new data list of type HKL_data, containing the results of the logical operation. This may be used in further logical operations, or may be used as a mask to eliminate data from a list using the HKL_data::mask() method. \par Comparison operators. Comparison operators (==, !=, >, <, >=, <=) may be applied to a data lists of flags (i.e. HKL_data), to compare the values in the list with a single integer. This is commonly used in the handling of Free-R test sets. The result is a list of HKL_data, where the value of the flag for each reflection is the result of the compraison of the frag for that reflection and this given integer. So, for example, to make a list of data containing only the values for which the test set is numbered 18 or greater, use the following code: \code clipper::HKL_data fsigf, fsigftest; clipper::HKL_data flag; // ---- set data here ---- fsigftest = fsigf; fsigftest.mask( flag >= 18 ); \endcode \par Computation operators Computation operators handle more complex crystallographic tasks, and will be discussed in more detail. To use a computation operator, call the compute() method of the destination datalist. This method must be supplied with one or two source datalists, and a computation operator. This is an object which performs the computation for an individual reflection, and is usually constructed on the fly. Some computation operators simply convert a datalist of one type to a datalist of another type. For example, you can convert a phase and weight to Hendrickson Lattman coefficients. (Of course C and D will be 0, because a phase and weight can only describe a unimodal distribution). \code clipper::HKL_data myphifom; // ---- set data here ---- clipper::HKL_data myabcd; myabcd.compute( myphifom, clipper::data32::Compute_abcd_from_phifom() ); \endcode Some computation operators take data from two datalists. For example, you can calculate map coefficient (magnitude and phase) from a set of observed magnitudes and a phase and weight: \code clipper::HKL_data myfsig; clipper::HKL_data myphifom; // ---- set data here ---- clipper::HKL_data myfphi; myfphi.compute( myfsig, myphifom, clipper::data32::Compute_fphi_from_fsigf_phifom() ); \endcode Computation operators may operate on a datalist itself, and can also take parameters. These parameters are passed to the constructor of the computation operator. For example, to apply a scale factor of 2.0 and and U-value of 0.5 to a list of reflections, use the following code: \code clipper::HKL_data myfsig; // ---- set data here ---- myfsig.compute( myfsig, clipper::data32::Compute_scale_u( 2.0, 0.5 ) ); \endcode Computation operators are provided for performing addition, subtraction and scaling of map coefficients (i.e. F_phi), addition and computation of Hendrickson Lattman coefficients, and for scaling data. It is fairly simple to define new computation operators, see core/hkl_compute.h. \section s_newdatatype Defining a new reflection datatype Several data types are defined in the file \c hkl_datatypes.h . Defining a new type proceeds as follows: -# Define a struct containing the data which needs to be stored for each reflection. A default constructor should be supplied which initialises all the data to NaN for floats, or an illegal value for ints (e.g. -1 for Free-R flag). -# Defined a member function `void friedel()' which changes the values of the data to the values of the Friedel opposite of the data. (e.g. a magnitude is unchanged, a phase will be negated). -# Defined a member function `void shift_phase(const float)' which chages the values of the data to the value of a symmetry equivalent with the given phase shift from the original. (e.g. a magnitude is unchanged, a phase will have the shift added to it). -# Define a member function `static const string type()' for that struct which returns a `type name' string for this type. This is used to identify the data type and to infer column names in an mtz file. For example, an F_phi group are defined as follows: \code struct F_phi { float f,phi; F_phi() { f=phi=Nan(); } static const String type() { return "F_phi"; } void friedel() { phi=-phi; } void shift_phase(const ftype dphi) { phi+=dphi; } const bool missing() const { return (isnan(f) || isnan(phi)); } }; \endcode The datalist types are constructed from the individual data type by a template class. If you need to store your new datatype in an MTZ file, you must also define an MTZ_iotype by derivation from clipper::MTZ_iotype_base, create a static instance of the new MTZ_iotype, and add it to the mtz_iotype_registry. */ clipper-2.1/dox/hierarchy.eps0000644000374100011300000005425310736662154013231 00000000000000%!PS-Adobe-2.0 %%Creator: dot version 1.7.11 (Fri Nov 16 14:55:37 GMT 2001) %%For: (cowtan) Kevin Cowtan %%Title: inheritance %%Pages: (atend) %%BoundingBox: 35 35 683 377 %%EndComments %%BeginProlog save /DotDict 200 dict def DotDict begin %%BeginResource: procset /coord-font-family /Times-Roman def /default-font-family /Times-Roman def /coordfont coord-font-family findfont 8 scalefont def /InvScaleFactor 1.0 def /set_scale { dup 1 exch div /InvScaleFactor exch def dup scale } bind def % styles /solid { } bind def /dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def /dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def /invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def /bold { 2 setlinewidth } bind def /filled { } bind def /unfilled { } bind def /rounded { } bind def /diagonals { } bind def % hooks for setting color /nodecolor { sethsbcolor } bind def /edgecolor { sethsbcolor } bind def /graphcolor { sethsbcolor } bind def /nopcolor {pop pop pop} bind def /beginpage { % i j npages /npages exch def /j exch def /i exch def /str 10 string def npages 1 gt { gsave coordfont setfont 0 0 moveto (\() show i str cvs show (,) show j str cvs show (\)) show grestore } if } bind def /set_font { findfont exch scalefont setfont } def % draw aligned label in bounding box aligned to current point % alignfactor tells what fraction to place on the left. % -.5 is centered. /alignedtext { % text labelwidth fontsz alignfactor /alignfactor exch def /fontsz exch def /width exch def /text exch def gsave % even if node or edge is dashed, don't paint text with dashes [] 0 setdash currentpoint newpath moveto text stringwidth pop alignfactor mul fontsz -.3 mul rmoveto text show grestore } def /boxprim { % xcorner ycorner xsize ysize 4 2 roll moveto 2 copy exch 0 rlineto 0 exch rlineto pop neg 0 rlineto closepath } bind def /ellipse_path { /ry exch def /rx exch def /y exch def /x exch def matrix currentmatrix newpath x y translate rx ry scale 0 0 1 0 360 arc setmatrix } bind def /endpage { showpage } bind def /layercolorseq [ % layer color sequence - darkest to lightest [0 0 0] [.2 .8 .8] [.4 .8 .8] [.6 .8 .8] [.8 .8 .8] ] def /setlayer {/maxlayer exch def /curlayer exch def layercolorseq curlayer get aload pop sethsbcolor /nodecolor {nopcolor} def /edgecolor {nopcolor} def /graphcolor {nopcolor} def } bind def /onlayer { curlayer ne {invis} if } def /onlayers { /myupper exch def /mylower exch def curlayer mylower lt curlayer myupper gt or {invis} if } def /curlayer 0 def %%EndResource %%EndProlog %%BeginSetup 14 default-font-family set_font 1 setmiterlimit % /arrowlength 10 def % /arrowwidth 5 def % make sure pdfmark is harmless for PS-interpreters other than Distiller /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse % make '<<' and '>>' safe on PS Level 1 devices /languagelevel where {pop languagelevel}{1} ifelse 2 lt { userdict (<<) cvn ([) cvn load put userdict (>>) cvn ([) cvn load put } if %%EndSetup %%Page: 1 1 %%PageBoundingBox: 36 36 683 377 %%PageOrientation: Portrait gsave 35 35 648 342 boxprim clip newpath 36 36 translate 0 0 1 beginpage 0 0 translate 0 rotate [ /CropBox [36 36 683 377] /PAGES pdfmark 0.000 0.000 0.000 graphcolor 10.00 /Helvetica set_font % Node101 [ /Rect [ 276 294 336 308 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1Cell.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 336 308 moveto 276 308 lineto 276 294 lineto 336 294 lineto closepath stroke gsave 10 dict begin 306 302 moveto (clipper::Cell) 50 10.00 -0.50 alignedtext end grestore end grestore % Node98 [ /Rect [ 416 262 482 276 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1CCell.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 482 276 moveto 416 276 lineto 416 262 lineto 482 262 lineto closepath stroke gsave 10 dict begin 449 270 moveto (clipper::CCell) 56 10.00 -0.50 alignedtext end grestore end grestore % Node101 -> Node98 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 345 292 moveto 368 287 396 280 418 276 curveto stroke newpath 346 294 moveto 336 294 lineto 345 289 lineto closepath fill end grestore % Node102 [ /Rect [ 404 294 494 308 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1MTZcrystal.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 494 308 moveto 404 308 lineto 404 294 lineto 494 294 lineto closepath stroke gsave 10 dict begin 449 302 moveto (clipper::MTZcrystal) 81 10.00 -0.50 alignedtext end grestore end grestore % Node101 -> Node102 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 345 301 moveto 363 301 384 301 403 301 curveto stroke newpath 346 304 moveto 336 301 lineto 346 299 lineto closepath fill end grestore % Node99 [ /Rect [ 540 212 638 226 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1CMTZcrystal.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 638 226 moveto 540 226 lineto 540 212 lineto 638 212 lineto closepath stroke gsave 10 dict begin 589 220 moveto (clipper::CMTZcrystal) 87 10.00 -0.50 alignedtext end grestore end grestore % Node102 -> Node99 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 484 292 moveto 492 289 500 287 504 285 curveto 536 269 568 240 582 226 curveto stroke newpath 486 294 moveto 476 294 lineto 485 289 lineto closepath fill end grestore % Node97 [ /Rect [ 265 131 347 145 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1Container.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 347 145 moveto 265 145 lineto 265 131 lineto 347 131 lineto closepath stroke gsave 10 dict begin 306 139 moveto (clipper::Container) 72 10.00 -0.50 alignedtext end grestore end grestore % Node97 -> Node98 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 339 148 moveto 348 151 355 154 358 157 curveto 391 189 361 222 394 253 curveto 400 258 408 262 415 264 curveto stroke newpath 340 151 moveto 332 145 lineto 342 147 lineto closepath fill end grestore % Node97 -> Node99 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 356 142 moveto 412 147 497 154 504 157 curveto 521 163 563 197 581 212 curveto stroke newpath 358 145 moveto 348 141 lineto 358 140 lineto closepath fill end grestore % Node14 [ /Rect [ 394 198 504 212 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1CGrid__sampling.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 504 212 moveto 394 212 lineto 394 198 lineto 504 198 lineto closepath stroke gsave 10 dict begin 449 206 moveto (clipper::CGrid_sampling) 100 10.00 -0.50 alignedtext end grestore end grestore % Node97 -> Node14 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 341 148 moveto 347 151 353 154 358 157 curveto 377 167 376 178 394 189 curveto 401 193 409 196 417 198 curveto stroke newpath 341 151 moveto 332 145 lineto 342 146 lineto closepath fill end grestore % Node78 [ /Rect [ 403 230 495 244 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1CHKL__data.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 495 244 moveto 403 244 lineto 403 230 lineto 495 230 lineto closepath stroke gsave 10 dict begin 449 238 moveto (clipper::CHKL_data) 82 10.00 -0.50 alignedtext end grestore end grestore % Node97 -> Node78 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 335 148 moveto 347 152 357 156 358 157 curveto 383 178 369 200 394 221 curveto 399 225 405 228 411 230 curveto stroke newpath 335 151 moveto 327 145 lineto 337 146 lineto closepath fill end grestore % Node75 [ /Rect [ 403 166 495 180 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1CHKL__info.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 495 180 moveto 403 180 lineto 403 166 lineto 495 166 lineto closepath stroke gsave 10 dict begin 449 174 moveto (clipper::CHKL_info) 81 10.00 -0.50 alignedtext end grestore end grestore % Node97 -> Node75 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 344 147 moveto 368 153 399 161 421 166 curveto stroke newpath 344 150 moveto 335 145 lineto 345 145 lineto closepath fill end grestore % Node47 [ /Rect [ 400 96 498 110 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1CMTZdataset.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 498 110 moveto 400 110 lineto 400 96 lineto 498 96 lineto closepath stroke gsave 10 dict begin 449 104 moveto (clipper::CMTZdataset) 88 10.00 -0.50 alignedtext end grestore end grestore % Node97 -> Node47 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 344 129 moveto 368 123 399 115 421 110 curveto stroke newpath 345 131 moveto 335 131 lineto 344 126 lineto closepath fill end grestore % Node35 [ /Rect [ 403 64 495 78 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1CResolution.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 495 78 moveto 403 78 lineto 403 64 lineto 495 64 lineto closepath stroke gsave 10 dict begin 449 72 moveto (clipper::CResolution) 83 10.00 -0.50 alignedtext end grestore end grestore % Node97 -> Node35 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 341 128 moveto 347 125 353 122 358 119 curveto 377 109 376 98 394 87 curveto 401 83 409 80 417 78 curveto stroke newpath 342 130 moveto 332 131 lineto 341 125 lineto closepath fill end grestore % Node27 [ /Rect [ 401 32 497 46 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1CSpacegroup.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 497 46 moveto 401 46 lineto 401 32 lineto 497 32 lineto closepath stroke gsave 10 dict begin 449 40 moveto (clipper::CSpacegroup) 87 10.00 -0.50 alignedtext end grestore end grestore % Node97 -> Node27 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 335 128 moveto 347 124 357 120 358 119 curveto 383 98 369 76 394 55 curveto 399 51 405 48 411 46 curveto stroke newpath 337 130 moveto 327 131 lineto 335 125 lineto closepath fill end grestore % Node2 [ /Rect [ 412 0 486 14 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1CXmap.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 486 14 moveto 412 14 lineto 412 0 lineto 486 0 lineto closepath stroke gsave 10 dict begin 449 8 moveto (clipper::CXmap) 64 10.00 -0.50 alignedtext end grestore end grestore % Node97 -> Node2 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 339 128 moveto 348 125 355 122 358 119 curveto 391 87 361 54 394 23 curveto 399 18 405 15 412 13 curveto stroke newpath 342 129 moveto 332 131 lineto 340 125 lineto closepath fill end grestore % Node76 [ /Rect [ 109 262 217 276 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1HKL__data__base.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 217 276 moveto 109 276 lineto 109 262 lineto 217 262 lineto closepath stroke gsave 10 dict begin 163 270 moveto (clipper::HKL_data_base) 98 10.00 -0.50 alignedtext end grestore end grestore % Node77 [ /Rect [ 264 262 348 276 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1HKL__data.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 348 276 moveto 264 276 lineto 264 262 lineto 348 262 lineto closepath stroke gsave 10 dict begin 306 270 moveto (clipper::HKL_data) 75 10.00 -0.50 alignedtext end grestore end grestore % Node76 -> Node77 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 224 269 moveto 237 269 251 269 263 269 curveto stroke newpath 227 272 moveto 217 269 lineto 227 267 lineto closepath fill end grestore % Node77 -> Node78 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 343 261 moveto 366 256 396 249 418 244 curveto stroke newpath 347 263 moveto 337 262 lineto 346 258 lineto closepath fill end grestore % Node74 [ /Rect [ 264 166 348 180 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1HKL__info.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 348 180 moveto 264 180 lineto 264 166 lineto 348 166 lineto closepath stroke gsave 10 dict begin 306 174 moveto (clipper::HKL_info) 74 10.00 -0.50 alignedtext end grestore end grestore % Node74 -> Node75 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 359 173 moveto 373 173 389 173 403 173 curveto stroke newpath 359 176 moveto 349 173 lineto 359 171 lineto closepath fill end grestore % Node46 [ /Rect [ 260 96 352 110 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1MTZdataset.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 352 110 moveto 260 110 lineto 260 96 lineto 352 96 lineto closepath stroke gsave 10 dict begin 306 104 moveto (clipper::MTZdataset) 82 10.00 -0.50 alignedtext end grestore end grestore % Node46 -> Node47 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 362 103 moveto 374 103 387 103 399 103 curveto stroke newpath 362 106 moveto 352 103 lineto 362 101 lineto closepath fill end grestore % Node34 [ /Rect [ 263 64 349 78 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1Resolution.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 349 78 moveto 263 78 lineto 263 64 lineto 349 64 lineto closepath stroke gsave 10 dict begin 306 72 moveto (clipper::Resolution) 76 10.00 -0.50 alignedtext end grestore end grestore % Node34 -> Node35 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 360 71 moveto 374 71 388 71 402 71 curveto stroke newpath 360 74 moveto 350 71 lineto 360 69 lineto closepath fill end grestore % Node26 [ /Rect [ 261 32 351 46 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1Spacegroup.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 351 46 moveto 261 46 lineto 261 32 lineto 351 32 lineto closepath stroke gsave 10 dict begin 306 40 moveto (clipper::Spacegroup) 80 10.00 -0.50 alignedtext end grestore end grestore % Node26 -> Node27 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 361 39 moveto 374 39 387 39 400 39 curveto stroke newpath 361 42 moveto 351 39 lineto 361 37 lineto closepath fill end grestore % Node3 [ /Rect [ 8 166 72 180 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1Vec3.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 72 180 moveto 8 180 lineto 8 166 lineto 72 166 lineto closepath stroke gsave 10 dict begin 40 174 moveto (clipper::Vec3) 54 10.00 -0.50 alignedtext end grestore end grestore % Node4 [ /Rect [ 119 102 207 116 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1Coord__frac.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 207 116 moveto 119 116 lineto 119 102 lineto 207 102 lineto closepath stroke gsave 10 dict begin 163 110 moveto (clipper::Coord_frac) 78 10.00 -0.50 alignedtext end grestore end grestore % Node3 -> Node4 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 57 160 moveto 73 148 98 131 108 125 curveto 110 124 125 120 139 116 curveto stroke newpath 59 161 moveto 50 166 lineto 56 158 lineto closepath fill end grestore % Node5 [ /Rect [ 119 70 207 84 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1Coord__grid.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 207 84 moveto 119 84 lineto 119 70 lineto 207 70 lineto closepath stroke gsave 10 dict begin 163 78 moveto (clipper::Coord_grid) 79 10.00 -0.50 alignedtext end grestore end grestore % Node3 -> Node5 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 50 160 moveto 65 139 95 102 108 93 curveto 111 92 124 88 137 84 curveto stroke newpath 53 160 moveto 45 166 lineto 49 157 lineto closepath fill end grestore % Node6 [ /Rect [ 119 38 207 52 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1Coord__orth.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 207 52 moveto 119 52 lineto 119 38 lineto 207 38 lineto closepath stroke gsave 10 dict begin 163 46 moveto (clipper::Coord_orth) 79 10.00 -0.50 alignedtext end grestore end grestore % Node3 -> Node6 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 45 159 moveto 54 135 75 87 108 61 curveto 113 58 123 55 133 52 curveto stroke newpath 48 158 moveto 42 166 lineto 44 156 lineto closepath fill end grestore % Node7 [ /Rect [ 109 326 217 340 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1Coord__reci__frac.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 217 340 moveto 109 340 lineto 109 326 lineto 217 326 lineto closepath stroke gsave 10 dict begin 163 334 moveto (clipper::Coord_reci_frac) 98 10.00 -0.50 alignedtext end grestore end grestore % Node3 -> Node7 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 43 189 moveto 50 219 68 283 108 317 curveto 113 321 118 324 124 326 curveto stroke newpath 41 190 moveto 41 180 lineto 46 189 lineto closepath fill end grestore % Node8 [ /Rect [ 109 294 217 308 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1Coord__reci__orth.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 217 308 moveto 109 308 lineto 109 294 lineto 217 294 lineto closepath stroke gsave 10 dict begin 163 302 moveto (clipper::Coord_reci_orth) 99 10.00 -0.50 alignedtext end grestore end grestore % Node3 -> Node8 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 45 187 moveto 54 211 75 259 108 285 curveto 113 288 123 291 133 294 curveto stroke newpath 44 190 moveto 42 180 lineto 48 188 lineto closepath fill end grestore % Node9 [ /Rect [ 121 230 205 244 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1Grad__frac.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 205 244 moveto 121 244 lineto 121 230 lineto 205 230 lineto closepath stroke gsave 10 dict begin 163 238 moveto (clipper::Grad_frac) 73 10.00 -0.50 alignedtext end grestore end grestore % Node3 -> Node9 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 57 186 moveto 73 198 98 215 108 221 curveto 110 222 125 226 139 230 curveto stroke newpath 56 188 moveto 50 180 lineto 59 185 lineto closepath fill end grestore % Node10 [ /Rect [ 121 166 205 180 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1Grad__orth.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 205 180 moveto 121 180 lineto 121 166 lineto 205 166 lineto closepath stroke gsave 10 dict begin 163 174 moveto (clipper::Grad_orth) 74 10.00 -0.50 alignedtext end grestore end grestore % Node3 -> Node10 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 82 173 moveto 94 173 108 173 121 173 curveto stroke newpath 82 176 moveto 72 173 lineto 82 171 lineto closepath fill end grestore % Node11 [ /Rect [ 132 198 194 212 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1Grid.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 194 212 moveto 132 212 lineto 132 198 lineto 194 198 lineto closepath stroke gsave 10 dict begin 163 206 moveto (clipper::Grid) 51 10.00 -0.50 alignedtext end grestore end grestore % Node3 -> Node11 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 73 181 moveto 93 186 118 193 136 198 curveto stroke newpath 76 184 moveto 67 180 lineto 77 179 lineto closepath fill end grestore % Node15 [ /Rect [ 131 134 195 148 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1HKL.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 195 148 moveto 131 148 lineto 131 134 lineto 195 134 lineto closepath stroke gsave 10 dict begin 163 142 moveto (clipper::HKL) 53 10.00 -0.50 alignedtext end grestore end grestore % Node3 -> Node15 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 73 165 moveto 93 160 118 153 136 148 curveto stroke newpath 77 167 moveto 67 166 lineto 76 162 lineto closepath fill end grestore % Node12 [ /Rect [ 264 230 348 244 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1Grid__map.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 348 244 moveto 264 244 lineto 264 230 lineto 348 230 lineto closepath stroke gsave 10 dict begin 306 238 moveto (clipper::Grid_map) 73 10.00 -0.50 alignedtext end grestore end grestore % Node11 -> Node12 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 200 213 moveto 223 218 253 225 275 230 curveto stroke newpath 203 216 moveto 194 212 lineto 204 211 lineto closepath fill end grestore % Node13 [ /Rect [ 255 198 357 212 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1Grid__sampling.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 357 212 moveto 255 212 lineto 255 198 lineto 357 198 lineto closepath stroke gsave 10 dict begin 306 206 moveto (clipper::Grid_sampling) 93 10.00 -0.50 alignedtext end grestore end grestore % Node11 -> Node13 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 203 205 moveto 219 205 237 205 254 205 curveto stroke newpath 204 208 moveto 194 205 lineto 204 203 lineto closepath fill end grestore % Node13 -> Node14 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 368 205 moveto 377 205 385 205 394 205 curveto stroke newpath 368 208 moveto 358 205 lineto 368 203 lineto closepath fill end grestore % Node0 [ /Rect [ 118 0 208 14 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1Xmap__base.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 208 14 moveto 118 14 lineto 118 0 lineto 208 0 lineto closepath stroke gsave 10 dict begin 163 8 moveto (clipper::Xmap_base) 80 10.00 -0.50 alignedtext end grestore end grestore % Node1 [ /Rect [ 272 0 340 14 ] /Border [ 0 0 0 ] /Action << /Subtype /URI /URI ($classclipper_1_1Xmap.html) >> /Subtype /Link /ANN pdfmark gsave 10 dict begin newpath 340 14 moveto 272 14 lineto 272 0 lineto 340 0 lineto closepath stroke gsave 10 dict begin 306 8 moveto (clipper::Xmap) 57 10.00 -0.50 alignedtext end grestore end grestore % Node0 -> Node1 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 215 7 moveto 234 7 255 7 272 7 curveto stroke newpath 218 10 moveto 208 7 lineto 218 5 lineto closepath fill end grestore % Node1 -> Node2 gsave 10 dict begin solid 0.667 0.776 0.439 edgecolor newpath 349 7 moveto 370 7 393 7 412 7 curveto stroke newpath 350 10 moveto 340 7 lineto 350 5 lineto closepath fill end grestore endpage grestore %%PageTrailer %%EndPage: 1 %%Trailer %%Pages: 1 end restore %%EOF clipper-2.1/dox/hkl_objs.eps0000644000374100011300000002433110736662154013040 00000000000000%!PS-Adobe-1.0 %%BoundingBox: 0 600 475 850 %%Creator: KIllustrator %%Title: %%CreationDate: Sat Feb 9 16:08:33 2002 %%Orientation: Portrait %%Pages: 1 %%DocumentFonts: Helvetica %%EndComments %%BeginProlog % Prolog copyright 1994-2000 Trolltech. You may copy this prolog in any way % that is directly related to this document. For other use of this prolog, % see your licensing agreement for Qt. /d/def load def/D{bind d}bind d/d2{dup dup}D/B{0 d2}D/W{255 d2}D/ED{exch d}D/D0 {0 ED}D/LT{lineto}D/MT{moveto}D/ND/.notdef d/S{stroke}D/F{setfont}D/SW{ setlinewidth}D/CP{closepath}D/RL{rlineto}D/NP{newpath}D/CM{currentmatrix}D/SM{ setmatrix}D/TR{translate}D/SC{aload pop setrgbcolor}D/BSt 0 d/LWi 1 d/PSt 1 d /Cx 0 d/Cy 0 d/WFi false d/OMo false d/BCol[1 1 1]d/PCol[0 0 0]d/BkCol[1 1 1]d /nS 0 d/LArr[[][][10 3][3 10][3 3][3 3][5 3 3 3][3 5 3 3][5 3 3 3 3 3][3 5 3 3 3 3]]d/GPS{PSt 1 ge PSt 5 le and{{LArr PSt 1 sub 2 mul get}{LArr PSt 2 mul 1 sub get}ifelse}{[]}ifelse}D/QS{PSt 0 ne{LWi SW gsave PCol SC true GPS 0 setdash S OMo PSt 1 ne and{grestore BkCol SC false GPS dup 0 get setdash S}{grestore} ifelse}if}D/BDArr[0.06 0.12 0.37 0.50 0.63 0.88 0.94]d/r28{{currentfile read pop dup 32 gt{exit}if pop}loop 3{currentfile read pop}repeat 0 4{7 bitshift exch dup 128 gt{84 sub}if 42 sub 127 and add}repeat}D/rA 0 d/rL 0 d/rB{rL 0 eq{ /rA r28 d/rL 28 d}if dup rL gt{rA exch rL sub rL exch/rA 0 d/rL 0 d rB exch bitshift add}{dup rA 16#fffffff 3 -1 roll bitshift not and exch dup rL exch sub /rL ED neg rA exch bitshift/rA ED}ifelse}D/rC{/rL 0 d 0{dup 2 index length ge{ exit}if 1 rB 1 eq{3 rB dup 4 ge{dup rB 1 index 5 ge{1 index 6 ge{1 index 7 ge{ 64 add}if 32 add}if 16 add}if 4 add exch pop}if 1 add 3 mul exch 10 rB 1 add 3 mul{dup 3 index lt{dup}{2 index}ifelse 4 index 3 index 3 index sub 2 index getinterval 5 index 4 index 3 -1 roll putinterval dup 4 -1 roll add 3 1 roll 4 -1 roll exch sub dup 0 eq{exit}if 3 1 roll}loop pop pop}{3 rB 1 add 3 mul{2 copy 8 rB put 1 add}repeat}ifelse}loop pop}D/rG{/rL 0 d 0{dup 2 index length ge {exit}if 1 rB 1 eq{3 rB dup 4 ge{dup rB 1 index 5 ge{1 index 6 ge{1 index 7 ge{ 64 add}if 32 add}if 16 add}if 4 add exch pop}if 1 add exch 10 rB 1 add{dup 3 index lt{dup}{2 index}ifelse 4 index 3 index 3 index sub 2 index getinterval 5 index 4 index 3 -1 roll putinterval dup 4 -1 roll add 3 1 roll 4 -1 roll exch sub dup 0 eq{exit}if 3 1 roll}loop pop pop}{3 rB 1 add{2 copy 8 rB put 1 add} repeat}ifelse}loop pop}D/sl D0/QCIgray D0/QCIcolor D0/QCIindex D0/QCI{ /colorimage where{pop false 3 colorimage}{exec/QCIcolor ED/QCIgray QCIcolor length 3 idiv string d 0 1 QCIcolor length 3 idiv 1 sub{/QCIindex ED/x QCIindex 3 mul d QCIgray QCIindex QCIcolor x get 0.30 mul QCIcolor x 1 add get 0.59 mul QCIcolor x 2 add get 0.11 mul add add cvi put}for QCIgray image}ifelse}D/defM matrix d/BF{gsave BSt 1 eq{BCol SC WFi{fill}{eofill}ifelse}if BSt 2 ge BSt 8 le and{BDArr BSt 2 sub get setgray fill}if BSt 9 ge BSt 14 le and{WFi{clip}{eoclip }ifelse defM SM pathbbox 3 index 3 index translate 4 2 roll 3 2 roll exch sub/h ED sub/w ED OMo{NP 0 0 MT 0 h RL w 0 RL 0 h neg RL CP BkCol SC fill}if BCol SC 0.3 SW NP BSt 9 eq BSt 11 eq or{0 4 h{dup 0 exch MT w exch LT}for}if BSt 10 eq BSt 11 eq or{0 4 w{dup 0 MT h LT}for}if BSt 12 eq BSt 14 eq or{w h gt{0 6 w h add{dup 0 MT h sub h LT}for}{0 6 w h add{dup 0 exch MT w sub w exch LT}for} ifelse}if BSt 13 eq BSt 14 eq or{w h gt{0 6 w h add{dup h MT h sub 0 LT}for}{0 6 w h add{dup w exch MT w sub 0 exch LT}for}ifelse}if S}if BSt 24 eq{}if grestore}D/mat matrix d/ang1 D0/ang2 D0/w D0/h D0/x D0/y D0/ARC{/ang2 ED/ang1 ED/h ED/w ED/y ED/x ED mat CM pop x w 2 div add y h 2 div add TR 1 h w div neg scale ang2 0 ge{0 0 w 2 div ang1 ang1 ang2 add arc}{0 0 w 2 div ang1 ang1 ang2 add arcn}ifelse mat SM}D/C D0/P{NP MT 0.5 0.5 rmoveto 0 -1 RL -1 0 RL 0 1 RL CP PCol SC fill}D/M{/Cy ED/Cx ED}D/L{NP Cx Cy MT/Cy ED/Cx ED Cx Cy LT QS}D/DL{NP MT LT QS}D/HL{1 index DL}D/VL{2 index exch DL}D/R{/h ED/w ED/y ED/x ED NP x y MT 0 h RL w 0 RL 0 h neg RL CP BF QS}D/ACR{/h ED/w ED/y ED/x ED x y MT 0 h RL w 0 RL 0 h neg RL CP}D/CLSTART{/clipTmp matrix CM d defM SM NP}D/CLEND{clip NP clipTmp SM}D/CLO{grestore gsave defM SM}D/xr D0/yr D0/rx D0/ry D0/rx2 D0/ry2 D0 /RR{/yr ED/xr ED/h ED/w ED/y ED/x ED xr 0 le yr 0 le or{x y w h R}{xr 100 ge yr 100 ge or{x y w h E}{/rx xr w mul 200 div d/ry yr h mul 200 div d/rx2 rx 2 mul d/ry2 ry 2 mul d NP x rx add y MT x y rx2 ry2 180 -90 x y h add ry2 sub rx2 ry2 270 -90 x w add rx2 sub y h add ry2 sub rx2 ry2 0 -90 x w add rx2 sub y rx2 ry2 90 -90 ARC ARC ARC ARC CP BF QS}ifelse}ifelse}D/E{/h ED/w ED/y ED/x ED mat CM pop x w 2 div add y h 2 div add translate 1 h w div scale NP 0 0 w 2 div 0 360 arc mat SM BF QS}D/A{16 div exch 16 div exch NP ARC QS}D/PIE{/ang2 ED/ang1 ED/h ED/w ED/y ED/x ED NP x w 2 div add y h 2 div add MT x y w h ang1 16 div ang2 16 div ARC CP BF QS}D/CH{16 div exch 16 div exch NP ARC CP BF QS}D/BZ{curveto QS}D /CRGB{255 div 3 1 roll 255 div 3 1 roll 255 div 3 1 roll}D/SV{BSt LWi PSt Cx Cy WFi OMo BCol PCol BkCol/nS nS 1 add d gsave}D/RS{nS 0 gt{grestore/BkCol ED/PCol ED/BCol ED/OMo ED/WFi ED/Cy ED/Cx ED/PSt ED/LWi ED/BSt ED/nS nS 1 sub d}if}D/BC {CRGB BkCol astore pop}D/BR{CRGB BCol astore pop/BSt ED}D/WB{1 W BR}D/NB{0 B BR }D/PE{setlinejoin setlinecap CRGB PCol astore pop/LWi ED/PSt ED LWi 0 eq{0.25 /LWi ED}if}D/P1{1 0 5 2 roll 0 0 PE}D/ST{defM setmatrix concat}D/qtfindfont{ true exch true exch{exch pop exch pop dup 0 get dup findfont dup/FontName get 3 -1 roll eq{exit}if}forall exch}d/qtdefinefont{dup 1 get/fxscale exch def 2 get /fslant exch def exch/fencoding exch def[fxscale 0 fslant 1 0 0]makefont fencoding false eq{}{dup maxlength dict begin{1 index/FID ne{def}{pop pop} ifelse}forall/Encoding fencoding def currentdict end}ifelse definefont pop}d/MF {qtfindfont qtdefinefont}D/MSF{findfont exch/slant exch d[1 0 slant 1 0 0] makefont definefont pop}D/DF{findfont/FONTSIZE 3 -1 roll d[FONTSIZE 0 0 FONTSIZE -1 mul 0 0]makefont d}D/ty 0 d/Y{/ty ED}D/Tl{NP 1 index exch MT 1 index 0 rlineto QS}D/T{PCol SC ty MT 1 index dup length exch stringwidth pop 3 -1 roll exch sub exch div exch 0 exch ashow}D/QI{/C save d pageinit/Cx 0 d/Cy 0 d/OMo false d}D/QP{C restore showpage}D %%EndProlog %%BeginSetup /pageinit { % 210*297mm (portrait) 0 842 translate 1 -1 scale/defM matrix CM d } d % Fonts and encodings used /HelveticaList [ [ /Helvetica 1.0 0.0 ] [ /Helvetica 0.987625 0 ] ] d % No embeddable font for Helvetica found /FE15[/.notdef/empty/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND /ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/space/exclam/quotedbl/numbersign/dollar /percent/ampersand/quotesingle/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X /Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore/grave/a/b/c/d/e /f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde /ND/U0080/U0081/U0082/U0083/U0084/U0085/U0086/U0087/U0088/U0089/U008a/U008b /U008c/U008d/U008e/U008f/U0090/U0091/U0092/U0093/U0094/U0095/U0096/U0097/U0098 /U0099/U009a/U009b/U009c/U009d/U009e/U009f/space/exclamdown/cent/sterling/Euro /yen/Scaron/section/scaron/copyright/ordfeminine/guillemotleft/logicalnot /hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior/Zcaron/mu /paragraph/periodcentered/zcaron/onesuperior/ordmasculine/guillemotright/OE/oe /Ydieresis/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply /Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls/agrave /aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute /ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve /oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex /udieresis/yacute/thorn/ydieresis]d /F1 FE15 HelveticaList MF /F2 11/F1 DF %%EndSetup %%Page: 1 1 %%BeginPageSetup QI %%EndPageSetup W BC /OMo false d [0.833333 0 0 0.555556 -49 -2.33334]ST [0.833333 0 0 0.555556 -49 -2.33334]ST CLSTART 0 0 462 236 ACR CLEND 1 1 B 0 0 PE NB 60 60 120 360 R [1 0 0 1 6 31]ST CLO [1 0 0 1 6 31]ST CLSTART 0 0 462 236 ACR CLEND 1 1 B 0 0 PE NB F2 F 14 Y(HKL_info:)48 0 T 31 Y(Spgr = P2)50 0 T 48 Y(Cell = 21,32,43)74 0 T 65 Y(hkl = (0,0,0))58 0 T 82 Y(hkl = (0,0,1))58 0 T 99 Y(hkl = (0,0,2))58 0 T 116 Y(hkl = (0,0,3))58 0 T 133 Y(hkl = (0,1,0))58 0 T 150 Y(hkl = (0,1,1))58 0 T 167 Y(hkl = (0,1,2))58 0 T 184 Y(...)7 0 T [1.4 0 0 1 -139 -29]ST 1 1 B 0 0 PE 200 60 100 200 R [1 0 0 1 146 32]ST CLO [1 0 0 1 146 32]ST CLSTART 0 0 462 236 ACR CLEND 1 1 B 0 0 PE NB F2 F 14 Y(HKL_data:)95 0 T 65 Y(F = 746 sigF = 34)90 0 T 82 Y(F = 263 sigF = 20)90 0 T 99 Y(F = nan sigF = nan)96 0 T 116 Y(F = 43 sigF = 19)90 0 T 133 Y(F = 438 sigF = 40)90 0 T 150 Y(F = 187 sigF = 25)90 0 T 167 Y(F = 245 sigF = 26)90 0 T 184 Y(...)7 0 T [1.4 0 0 1 41 -29]ST 1 1 B 0 0 PE 200 60 100 200 R [1 0 0 1 326 32]ST CLO [1 0 0 1 326 32]ST CLSTART 0 0 462 236 ACR CLEND 1 1 B 0 0 PE NB F2 F 14 Y(HKL_data:)93 0 T 65 Y(F = 721 phi = 136)89 0 T 82 Y(F = 200 phi = 39)83 0 T 99 Y(F = 401 phi = 201)89 0 T 116 Y(F = 76 phi = 42)83 0 T 133 Y(F = 329 phi = 301)89 0 T 150 Y(F = 209 phi = 336)89 0 T 167 Y(F = 277 phi = 82)83 0 T 184 Y(...)7 0 T B P1 22 69 50 VL [1 0 0 1 -59 -29]ST 1 2 255 0 0 0 0 PE 330 40 78 VL 140 40 330 HL 140 48 40 VL [1.22461e-16 2 -2 1.22461e-16 271 61]ST 255 0 0 P1 1 255 0 0 BR NP -6 0 MT -6 -3 LT 0 -3 LT 0 3 LT -6 3 LT CP BF QS [1.22461e-16 2 -2 1.22461e-16 81 31]ST 255 0 0 P1 1 255 0 0 BR NP -6 0 MT -6 -2 LT 0 0 LT -6 2 LT CP BF QS [1 0 0 1 -59 -29]ST 1 2 255 0 0 0 0 PE NB 510 30 78 VL 120 30 510 HL 120 48 30 VL [1.22461e-16 2 -2 1.22461e-16 451 61]ST 255 0 0 P1 1 255 0 0 BR NP -6 0 MT -6 -3 LT 0 -3 LT 0 3 LT -6 3 LT CP BF QS [1.22461e-16 2 -2 1.22461e-16 61 31]ST 255 0 0 P1 1 255 0 0 BR NP -6 0 MT -6 -2 LT 0 0 LT -6 2 LT CP BF QS [2 0 0 1 -599 -29]ST 2 2 0 0 255 0 0 PE NB 370 120 350 HL [2 0 0 1 -419 -29]ST 2 2 0 0 255 0 0 PE 370 120 350 HL [2 0 0 1 -419 -11.5]ST 2 2 0 0 255 0 0 PE 370 120 350 HL [2 0 0 1 -599 -11.5]ST 2 2 0 0 255 0 0 PE 370 120 350 HL [2 0 0 1 -419 6.5]ST 2 2 0 0 255 0 0 PE 370 120 350 HL [2 0 0 1 -599 6]ST 2 2 0 0 255 0 0 PE 370 120 350 HL QP %%Trailer %%EOF clipper-2.1/dox/container.eps0000644000374100011300000001332710736662154013232 00000000000000%!PS-Adobe-2.0 %%Creator: dot version 1.7.11 (Fri Nov 16 14:55:37 GMT 2001) %%For: (cowtan) Kevin Cowtan %%Title: G %%Pages: (atend) %%BoundingBox: 35 35 256 215 %%EndComments %%BeginProlog save /DotDict 200 dict def DotDict begin %%BeginResource: procset /coord-font-family /Times-Roman def /default-font-family /Times-Roman def /coordfont coord-font-family findfont 8 scalefont def /InvScaleFactor 1.0 def /set_scale { dup 1 exch div /InvScaleFactor exch def dup scale } bind def % styles /solid { } bind def /dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def /dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def /invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def /bold { 2 setlinewidth } bind def /filled { } bind def /unfilled { } bind def /rounded { } bind def /diagonals { } bind def % hooks for setting color /nodecolor { sethsbcolor } bind def /edgecolor { sethsbcolor } bind def /graphcolor { sethsbcolor } bind def /nopcolor {pop pop pop} bind def /beginpage { % i j npages /npages exch def /j exch def /i exch def /str 10 string def npages 1 gt { gsave coordfont setfont 0 0 moveto (\() show i str cvs show (,) show j str cvs show (\)) show grestore } if } bind def /set_font { findfont exch scalefont setfont } def % draw aligned label in bounding box aligned to current point % alignfactor tells what fraction to place on the left. % -.5 is centered. /alignedtext { % text labelwidth fontsz alignfactor /alignfactor exch def /fontsz exch def /width exch def /text exch def gsave % even if node or edge is dashed, don't paint text with dashes [] 0 setdash currentpoint newpath moveto text stringwidth pop alignfactor mul fontsz -.3 mul rmoveto text show grestore } def /boxprim { % xcorner ycorner xsize ysize 4 2 roll moveto 2 copy exch 0 rlineto 0 exch rlineto pop neg 0 rlineto closepath } bind def /ellipse_path { /ry exch def /rx exch def /y exch def /x exch def matrix currentmatrix newpath x y translate rx ry scale 0 0 1 0 360 arc setmatrix } bind def /endpage { showpage } bind def /layercolorseq [ % layer color sequence - darkest to lightest [0 0 0] [.2 .8 .8] [.4 .8 .8] [.6 .8 .8] [.8 .8 .8] ] def /setlayer {/maxlayer exch def /curlayer exch def layercolorseq curlayer get aload pop sethsbcolor /nodecolor {nopcolor} def /edgecolor {nopcolor} def /graphcolor {nopcolor} def } bind def /onlayer { curlayer ne {invis} if } def /onlayers { /myupper exch def /mylower exch def curlayer mylower lt curlayer myupper gt or {invis} if } def /curlayer 0 def %%EndResource %%EndProlog %%BeginSetup 14 default-font-family set_font 1 setmiterlimit % /arrowlength 10 def % /arrowwidth 5 def % make sure pdfmark is harmless for PS-interpreters other than Distiller /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse % make '<<' and '>>' safe on PS Level 1 devices /languagelevel where {pop languagelevel}{1} ifelse 2 lt { userdict (<<) cvn ([) cvn load put userdict (>>) cvn ([) cvn load put } if %%EndSetup %%Page: 1 1 %%PageBoundingBox: 36 36 256 215 %%PageOrientation: Portrait gsave 35 35 221 180 boxprim clip newpath 36 36 translate 0 0 1 beginpage 0 0 translate 0 rotate [ /CropBox [36 36 256 215] /PAGES pdfmark 0.000 0.000 0.000 graphcolor 12.00 /Helvetica set_font % CSpacegroup gsave 10 dict begin filled 0.537 0.247 0.902 nodecolor newpath 176 169 moveto 100 169 lineto 100 141 lineto 176 141 lineto closepath fill newpath 176 169 moveto 100 169 lineto 100 141 lineto 176 141 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 138 156 moveto (CSpacegroup) 64 12.00 -0.50 alignedtext end grestore end grestore % CCell 1 gsave 10 dict begin filled 0.333 1.000 1.000 nodecolor newpath 129 103 moveto 57 103 lineto 57 75 lineto 129 75 lineto closepath fill newpath 129 103 moveto 57 103 lineto 57 75 lineto 129 75 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 93 90 moveto (CCell 1) 37 12.00 -0.50 alignedtext end grestore end grestore % CSpacegroup -> CCell 1 newpath 128 140 moveto 123 132 115 121 109 112 curveto stroke newpath 107 114 moveto 103 104 lineto 111 111 lineto closepath fill % CCell 2 gsave 10 dict begin filled 0.333 1.000 1.000 nodecolor newpath 219 103 moveto 147 103 lineto 147 75 lineto 219 75 lineto closepath fill newpath 219 103 moveto 147 103 lineto 147 75 lineto 219 75 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 183 90 moveto (CCell 2) 37 12.00 -0.50 alignedtext end grestore end grestore % CSpacegroup -> CCell 2 newpath 148 140 moveto 153 132 161 121 167 112 curveto stroke newpath 165 111 moveto 173 104 lineto 169 114 lineto closepath fill % CXmap gsave 10 dict begin filled 0.106 1.000 1.000 nodecolor newpath 84 37 moveto 0 37 lineto 0 9 lineto 84 9 lineto closepath fill newpath 84 37 moveto 0 37 lineto 0 9 lineto 84 9 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 42 24 moveto (CXmap) 72 12.00 -0.50 alignedtext end grestore end grestore % CCell 1 -> CXmap newpath 82 74 moveto 76 65 67 55 59 45 curveto stroke newpath 58 47 moveto 53 38 lineto 61 44 lineto closepath fill % CXmap gsave 10 dict begin filled 0.106 1.000 1.000 nodecolor newpath 186 37 moveto 102 37 lineto 102 9 lineto 186 9 lineto closepath fill newpath 186 37 moveto 102 37 lineto 102 9 lineto 186 9 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 144 24 moveto (CXmap) 72 12.00 -0.50 alignedtext end grestore end grestore % CCell 1 -> CXmap newpath 104 74 moveto 110 65 119 55 127 45 curveto stroke newpath 125 44 moveto 133 38 lineto 128 47 lineto closepath fill endpage grestore %%PageTrailer %%EndPage: 1 %%Trailer %%Pages: 1 end restore %%EOF clipper-2.1/dox/conventions.dox0000644000374100011300000001261610736662154013620 00000000000000/*! \page p_conventions Conventions \section s_conv_intro Introduction This page discusses the conventions of coding style and memory management adopted in the Clipper libraries. \section s_notation Notation - Miller indices have componented h, k, l. - Fractional coordinates have components u, v, w. - Orthogonal coordinates have components x, y, z. - The squared distance from the origin in reciprocal space, in A-2, is usually referred to as 'invresolsq'. This is equal to \f$ 4\sin^2 \theta / \lambda^2 \f$ - Temperature factors and anisotrpic displacement parameters are always given as U-values. - Angles are always given in radians. \section s_codingstype Coding Style \subsection ss_dialect Dialect Clipper is written in C++, with extensive use of modern constructs such templates, and in particular the Standard Template Library (STL). The coding style of the library, and its API, both reflect this. In particular, a developer writing code using Clipper objects should be able to do so with minimal or no use of pointers, or of the built-in \c new and \c delete operators. References are used in preference to pointers where possible. Heap objects, with the corresponding dangers of memory leakage, are avoided. (However, for the cases where the developer needs to use heap objects, an optional mechanism is provided for automatic garbage collection). Clipper objects should generally be passed by reference rather than by value. \subsection ss_floatrep Floating-point representation. The package may be compiled to use either \c float or \c double for the representation of floating-point numbers. This is acheived by defining floating-point values with a user-defined type \c ftype. This is set by a \c typedef in lib/clipper_util.h. Data may have a different type. Since data objects may be large, these may be individually typed to save memory or provide additional precision as required. Data types are based on templates in lib/clipper_datatypes.h. The type for Fast-Fourier transforms is dependent on the FFTw library to which Clipper is linked. FFTw may be compiled for \c float or \c double. Since crystallographic FFTs generally have quite short dimensions (< 1000), \c float is recommended. \subsection ss_namespaces Namespaces All Clipper objects belong to the \c Clipper namespace, and can be accessed by using the \c Clipper:: prefix or \code using namespace Clipper; \endcode Templates for reciprocal space datatypes are provided in the \c Clipper::datatypes namespace. Instantiations of these types for \c float and \c double data are provided in \c Clipper::data32 and \c Clipper::data64. Classes are all named with an initial capital letter. Method names are all lowercase, with words separated by underscore ('_'). A handful of top level functions are implemented; these have an initial capital letter to distinguish them from standard library functions. \section s_memory Memory management All Clipper objects are designed to be created on the stack. Such objects are destroyed automatically when they go out of scope. Large or variable-sized data items within an object are generally held in STL vectors, and so are stored on the heap, and automatically destroyed with the associated object. Sometimes it may be useful to create Clipper container objects on the heap. In this case, the developer can arrange for the object to be destroyed when it is no-longer needed. However an alternative, automatic, method for memory management is provided, in the form of a \c destroyed_with_parent flag. If in object is created on the heap (i.e. with \c new), this flag may be set as follows: \code Container* new_container = new Container( parent, "A container" ); new_container->set_destroyed_with_parent(); \endcode Then, as soon as \c parent is destroyed, either by going out of scope, or by a \c delete operator, the new container will also be destroyed. \subsection ss_passing Passing objects Clipper objects should generally be passed by reference rather than by value. In particular passing a container type by value will lead to a container which is orphaned from the tree. Passing or assigning an object always results in a 'deep copy', i.e. all of the data associated with the object is copied. \section s_standards Coding standards Code in the Clipper library should obey the following standards. Some of these are stylistic, but most are simply good practice. Code which does not obey these standards will be rejected from my tree. -# No C-style casts. -# No reinterpret_cast<> except for conversion of external types. -# No static_cast<> without a very strong performance argument. -# No const_cast<>. -# No preprocessor macros, except for a stand-alone portability library. -# No global functions. Useful functions are contained in the Util class. -# Absolutely strict use of const, both for parameters and methods. -# Parameters are passed by reference. -# No pointers in public APIs. -# No pointers internally, expect for - testing for NULL after a dynamic_cast - member variables which point to other objects -# No 'new' or 'malloc'. Use STL containers. (Exception: for explicitly memory managed objects. There are still a couple of 'new's in the MTZ i/o layer). -# 'explicit' is used where necessary to prevent accidental type conversion. -# Access specifiers are ordered public, protected, private. There are a few places where I haven't yet finished implementing all of these standards, but I'm working on it. */ clipper-2.1/dox/clipper_hierarchy.eps0000644000374100011300000001752210736662154014745 00000000000000%!PS-Adobe-2.0 %%Creator: dot version 1.7.11 (Fri Nov 16 14:55:37 GMT 2001) %%For: (cowtan) Kevin Cowtan %%Title: G %%Pages: (atend) %%BoundingBox: 35 35 481 191 %%EndComments %%BeginProlog save /DotDict 200 dict def DotDict begin %%BeginResource: procset /coord-font-family /Times-Roman def /default-font-family /Times-Roman def /coordfont coord-font-family findfont 8 scalefont def /InvScaleFactor 1.0 def /set_scale { dup 1 exch div /InvScaleFactor exch def dup scale } bind def % styles /solid { } bind def /dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def /dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def /invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def /bold { 2 setlinewidth } bind def /filled { } bind def /unfilled { } bind def /rounded { } bind def /diagonals { } bind def % hooks for setting color /nodecolor { sethsbcolor } bind def /edgecolor { sethsbcolor } bind def /graphcolor { sethsbcolor } bind def /nopcolor {pop pop pop} bind def /beginpage { % i j npages /npages exch def /j exch def /i exch def /str 10 string def npages 1 gt { gsave coordfont setfont 0 0 moveto (\() show i str cvs show (,) show j str cvs show (\)) show grestore } if } bind def /set_font { findfont exch scalefont setfont } def % draw aligned label in bounding box aligned to current point % alignfactor tells what fraction to place on the left. % -.5 is centered. /alignedtext { % text labelwidth fontsz alignfactor /alignfactor exch def /fontsz exch def /width exch def /text exch def gsave % even if node or edge is dashed, don't paint text with dashes [] 0 setdash currentpoint newpath moveto text stringwidth pop alignfactor mul fontsz -.3 mul rmoveto text show grestore } def /boxprim { % xcorner ycorner xsize ysize 4 2 roll moveto 2 copy exch 0 rlineto 0 exch rlineto pop neg 0 rlineto closepath } bind def /ellipse_path { /ry exch def /rx exch def /y exch def /x exch def matrix currentmatrix newpath x y translate rx ry scale 0 0 1 0 360 arc setmatrix } bind def /endpage { showpage } bind def /layercolorseq [ % layer color sequence - darkest to lightest [0 0 0] [.2 .8 .8] [.4 .8 .8] [.6 .8 .8] [.8 .8 .8] ] def /setlayer {/maxlayer exch def /curlayer exch def layercolorseq curlayer get aload pop sethsbcolor /nodecolor {nopcolor} def /edgecolor {nopcolor} def /graphcolor {nopcolor} def } bind def /onlayer { curlayer ne {invis} if } def /onlayers { /myupper exch def /mylower exch def curlayer mylower lt curlayer myupper gt or {invis} if } def /curlayer 0 def %%EndResource %%EndProlog %%BeginSetup 14 default-font-family set_font 1 setmiterlimit % /arrowlength 10 def % /arrowwidth 5 def % make sure pdfmark is harmless for PS-interpreters other than Distiller /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse % make '<<' and '>>' safe on PS Level 1 devices /languagelevel where {pop languagelevel}{1} ifelse 2 lt { userdict (<<) cvn ([) cvn load put userdict (>>) cvn ([) cvn load put } if %%EndSetup %%Page: 1 1 %%PageBoundingBox: 36 36 481 191 %%PageOrientation: Portrait gsave 35 35 446 156 boxprim clip newpath 36 36 translate 0 0 1 beginpage 0 0 translate 0 rotate [ /CropBox [36 36 481 191] /PAGES pdfmark 0.000 0.000 0.000 graphcolor 10.00 /Times-Roman set_font % Container gsave 10 dict begin newpath 210 88 moveto 152 88 lineto 152 66 lineto 210 66 lineto closepath stroke gsave 10 dict begin 181 78 moveto (Container) 39 10.00 -0.50 alignedtext end grestore end grestore % CCell gsave 10 dict begin newpath 93 30 moveto 35 30 lineto 35 8 lineto 93 8 lineto closepath stroke gsave 10 dict begin 64 20 moveto (CCell) 23 10.00 -0.50 alignedtext end grestore end grestore % Container -> CCell newpath 159 66 moveto 141 57 115 44 95 34 curveto stroke newpath 95 37 moveto 87 30 lineto 97 32 lineto closepath fill % CSpacegroup gsave 10 dict begin newpath 192 30 moveto 128 30 lineto 128 8 lineto 192 8 lineto closepath stroke gsave 10 dict begin 160 20 moveto (CSpacegroup) 53 10.00 -0.50 alignedtext end grestore end grestore % Container -> CSpacegroup newpath 177 66 moveto 174 59 171 48 167 39 curveto stroke newpath 165 40 moveto 164 30 lineto 170 39 lineto closepath fill % CHKL_info gsave 10 dict begin newpath 277 30 moveto 219 30 lineto 219 8 lineto 277 8 lineto closepath stroke gsave 10 dict begin 248 20 moveto (CHKL_info) 48 10.00 -0.50 alignedtext end grestore end grestore % Container -> CHKL_info newpath 194 66 moveto 204 58 217 46 228 36 curveto stroke newpath 226 35 moveto 235 30 lineto 229 38 lineto closepath fill % CHKL_data gsave 10 dict begin newpath 357 30 moveto 299 30 lineto 299 8 lineto 357 8 lineto closepath stroke gsave 10 dict begin 328 20 moveto (CHKL_data) 48 10.00 -0.50 alignedtext end grestore end grestore % Container -> CHKL_data newpath 209 66 moveto 232 57 266 43 292 33 curveto stroke newpath 290 31 moveto 300 30 lineto 292 36 lineto closepath fill % CXmap gsave 10 dict begin newpath 436 30 moveto 378 30 lineto 378 8 lineto 436 8 lineto closepath stroke gsave 10 dict begin 407 20 moveto (CXmap) 31 10.00 -0.50 alignedtext end grestore end grestore % Container -> CXmap newpath 210 68 moveto 214 67 217 66 219 66 curveto 283 48 300 46 366 30 curveto 367 30 369 29 371 29 curveto stroke newpath 368 27 moveto 378 27 lineto 369 32 lineto closepath fill % Cell gsave 10 dict begin newpath 58 88 moveto 0 88 lineto 0 66 lineto 58 66 lineto closepath stroke gsave 10 dict begin 29 78 moveto (Cell) 16 10.00 -0.50 alignedtext end grestore end grestore % Cell -> CCell newpath 36 66 moveto 41 58 47 47 52 38 curveto stroke newpath 50 37 moveto 57 30 lineto 54 40 lineto closepath fill % Spacegroup gsave 10 dict begin newpath 134 88 moveto 76 88 lineto 76 66 lineto 134 66 lineto closepath stroke gsave 10 dict begin 105 78 moveto (Spacegroup) 47 10.00 -0.50 alignedtext end grestore end grestore % Spacegroup -> CSpacegroup newpath 116 66 moveto 124 58 135 46 144 37 curveto stroke newpath 142 36 moveto 150 30 lineto 145 39 lineto closepath fill % HKL_info gsave 10 dict begin newpath 286 88 moveto 228 88 lineto 228 66 lineto 286 66 lineto closepath stroke gsave 10 dict begin 257 78 moveto (HKL_info) 41 10.00 -0.50 alignedtext end grestore end grestore % HKL_info -> CHKL_info newpath 255 66 moveto 254 59 252 48 251 39 curveto stroke newpath 249 40 moveto 250 30 lineto 254 40 lineto closepath fill % HKL_data_base gsave 10 dict begin newpath 368 146 moveto 294 146 lineto 294 124 lineto 368 124 lineto closepath stroke gsave 10 dict begin 331 136 moveto (HKL_data_base) 64 10.00 -0.50 alignedtext end grestore end grestore % HKL_data gsave 10 dict begin newpath 362 88 moveto 304 88 lineto 304 66 lineto 362 66 lineto closepath stroke gsave 10 dict begin 333 78 moveto (HKL_data) 42 10.00 -0.50 alignedtext end grestore end grestore % HKL_data_base -> HKL_data newpath 331 124 moveto 332 117 332 106 332 97 curveto stroke newpath 329 98 moveto 333 88 lineto 334 98 lineto closepath fill % HKL_data -> CHKL_data newpath 332 66 moveto 331 59 331 48 330 39 curveto stroke newpath 328 40 moveto 329 30 lineto 333 40 lineto closepath fill % Xmap_base gsave 10 dict begin newpath 444 146 moveto 386 146 lineto 386 124 lineto 444 124 lineto closepath stroke gsave 10 dict begin 415 136 moveto (Xmap_base) 47 10.00 -0.50 alignedtext end grestore end grestore % Xmap gsave 10 dict begin newpath 440 88 moveto 382 88 lineto 382 66 lineto 440 66 lineto closepath stroke gsave 10 dict begin 411 78 moveto (Xmap) 24 10.00 -0.50 alignedtext end grestore end grestore % Xmap_base -> Xmap newpath 414 124 moveto 413 117 413 106 412 97 curveto stroke newpath 410 98 moveto 412 88 lineto 415 98 lineto closepath fill % Xmap -> CXmap newpath 410 66 moveto 409 59 409 48 408 39 curveto stroke newpath 406 40 moveto 408 30 lineto 411 40 lineto closepath fill endpage grestore %%PageTrailer %%EndPage: 1 %%Trailer %%Pages: 1 end restore %%EOF clipper-2.1/dox/img_container.png0000644000374100011300000000427710736662154014067 00000000000000‰PNG  IHDR×Åâ8ù>IDATxÚíœ±Ž›>À?©w×SOEb8U•˜*5R'†FêÒE÷‰Ôn'Ô‘¡R:þ3ðð(…•‘‰WàøÛ¹° äÎÖå Žý}þÙŸ?ÎÈ^g‚± ¸—຺$¸®+]‚+²JѸ\¶> –nÌe÷—A+Wp .Á%¸—à\o˜+HËcòZ¸R[Ðõ ÊAGmûZ¸LÙEÿ#s¯5êmSá’÷#„àdƒe-÷YŠ?l0ÕèTîØ\•.´ ˶`Ê€(‘yʸ˜¬!Û\ÈÊZ©`oak¯²Hå@˜p¨3M®,Pa•⌊ì3ÿÈF£¹ \@Év!È ec'£¥s_²²Î¤¸êfeƒY65ÝlÑ9Ï6796ØYª­Ã% ÎU6z*\Za?Y€7+—³DËG 0qÙ™èiÅ•sÉÓâ²ÕÜl‰!†HÇf¶]¡ì4Eg¦d‘ë¢ÿ‰›™iÕ:3É‚:Ð0fEIqa~£ÉÏ/´$‹dÙVÕ$5ÑÄÂö)ÛY‚\…¾ÚnóœT=Á¨[5(êL‹‹Xy¤A°•;ê\^éÒÛQgª\[HÏÔpUd§AW©r!ÇÐÈyYgº\ÃÉ\‚Kp .Á%¸×ãêÞ‡ýC”5±}Øî}sëþéeÖÓ½5õ}óîdë§yz/ëW ×õDô’¦Å¥›M¹¦N+gb\[¹ñþ2•{<ÁŸWªnš?ب)¤iqÙê¹OTv×1>W*Ÿ}ÈÌ6>—ÝâØ}ýè\ ´<» €uSst®voÞ¼\WÒ>" ë€ÍÕ5 ¬‹óÈ\¨uúM—«{þ0ظ\þŽqÀÆå"qwl6*WDâí¦û•Q¹L¢Õ‰¬Ô„¸'¦5lL.Ò`°¹ˆÇeÀFä"wt W‰ãqµÜw½L ÷aãqÙëý}ØH\‘›É.yqWÎ\ºUl$®ïï>>Ò”üøîûp¥póHìå’ÇTjŽÃå¾Ç_3$~<¸Å¥ßSØíX\¿ñxý#/ÿ×ïés}@ÝÿLSá ð‡ÉswpCy÷¡ßÀÍØ(\Ü}¥\iÓ¯w`MëWßÁ«wsõܸ8Ìž¾ƒ—6qôœ¸8Ù?ßÁƒ+‰¸Íy$'âò(‡WúO¼ú9UŸà‡,\Ö-À_>XYöà–&Žr8®äž*ƺ=åØ÷,±?×ó-n §·î¤[ªÐæ¸":þ…›޾àÐòþâzsýÀýËñÊ.Åãÿct®Ù ç§.²ÅÞfÝ—ë3ð³Á2E_àso.ÖíÎ}z‚o?÷L¿Åj}ƒ§®2:u{zŸšB‘ylõ{D¡Ê-:{ré`àê­Sp .Á%¸—à\墽zYK3‚ ©.*¥áº)÷´ ®CpðÀØÅë™Õ­d»åÝ~ž«TJ®ÓiRçŸf¸ªà`O‘ÂØ3º»n/ïDæIžç:(%×ÙØ-\µààPYìò Ù“ï±Ö2÷ÝÄåIqlÌë–qž«RJ¬óױʊ«^ÞƒE˜Ì Ç "ƒ‘,%ÈÉ×ÊÂà ®è+€Có21²,Tu^…{¶pµÎ–€{£PY°œ#•Í\ñLÚy»" ™¿C–‚f…´Ü*¡×,Dm(Ë’ü¥b„\¤:!ÄoK•ÅáDe«úi…ØX+óZ³ñ+´(ß’_k×>;<”94Ö)cB[¸vÔ:UV‡c•Wm<ØôHÇnÒb©´ˆ#%U™B‰7WJ‰ç¹*¥Ä:÷o5Ÿª¬¸ª0á<ÐÞ¿®ÃPÂYús¸ôz>_W@â-Ê2¸PŒ:¿šÆ-!¼¥Rrè3gYª,¸Â‘ÊÚº\{ZJB$σ™ç„ø¾$вf…éx ÷‹À!Äá滸(ƒÜ‰a,ën­e].”’ëŒ ÌQÇíU܆c•”×Ql]ý®£u .ìn˜ž~õâbÕI×ÁãB¾\¬:ßÄ}Šà\‚Kp .Á%¸×\ýö§‰ö°_r1‡&Óì›g¯3 ®ëJ‚뺒ຮô?â4“ê–½“333DUfw D 0f08w8:IMD,U6DDUUDD UU(fAwLffwwff0wa8ww8DDDFX\UUUXXXQfl]u{eeecoqwwwˆ™ª»ÌÝîÿH™HX»X`Ì`hÝhpîpwÿwhƒŠt’š ©ˆW™bªl»w™|Hˆ‡™˜ª©»º™™H»˜XªªP»»XÌ‚Ýî˜ÿ¢Ì¥`ÌËÝÜîíÿýÌÌ`ÝÝhÿÎwîîpÿþwˆˆˆ™™™‹¯¸ªªª»»»–½È¢Ì׸ÍÒ­ÚæÌÌÌÝÝÝÌÿÌÔìòÿíÌÿÿÌîîîïøúÿÿÿ Û`ÖIDATxÚíÿÓ6ǵA7·ÜÚbŽÝtw-ldx¦¥4wÛQ¶–zÛJ³Bwlu“qI¶áõÿÿá$IlÇ_$ù‘å/ú¼Ú|qé‘Þ±,Yü 3¥Ú É6@I¼äHAn€äHAn€äHAn€ä¨&ÿü]€þ”]*(ÕòïCú]v© ¤ +ÈU‘â‡y4DþûÉÿýðît§ÐGX—§{)ÈåÓòÎpxz)À-² Ow&›fvVK­ 仸PÝ!G2º„.;G²»åô2zg‡¼¿ûfºÓä£wwmôîðÍÇoUK© äLJ—Þ8ßà'òìn¹üxøÍ¼9°Sð£yüøîðò½ác¤ —SÈÃÏ¿ù|è@ºÞä¶Âèt'¸Sà#ä4׈HA.§?þ& ™l™¿ëɸµìøèÒÝá¯øx¾7|sOA.§¦ïÍ#-ø”;êž³;>:G—93ãS·‚\JQ“UãäÊJ] I“‚¬ WE ršyGA®Šè§¿ü2ôö|ðXM5ÖM¦Ù`éº%Û(ÁR€YA&²tÍ´e[&N ²«ZcV}Õ³‚d‡Sé1æÈÜòÿJ®ò[¬É‘Ü묥N8+È%•¹¯!‹½ôaÌ rI5í]ó•>8ᬠ—TAÈ|£Ÿé•B•TÌCbTµ™H™KÕ¬ sªJÎ 2·ª3ᬠçPUf"ä\ªf9§ª0ᬠç–]zÌ 2€fKvÁR¤ ƒ(ѯ jdrïLMDÂeÆÜ4Èm Ù“ty17 ²‰!÷E%n›å¼ûHÓ [²È¥©®—Pß(ÕòצAÿ=¡"˜;¨U&ÊMƒŒ{^'¢³°æqsÑÉ.i Ì² (Zm$~îÈtúðå¡Ü8ÈfK|ºå@³d—ÕWã [B.†„5²L2TC–ìÂzªäߥꫯÒ?ÿ *ï¯þqýÃ1)WÞ)ªäGÝ\zTÕ¼S¤ +È”[Ñh ?, .95®xuˆÒ*xãÜC(ȬyãÝέ(È,ò*z£Ûݺ€Hå>Dé½í<^¸¿™1oüÙ6RYäU4F¶²áTôên]Aç6ðëk›ÝÍk]´€. teû*9Ðеdÿ‡W·À 3æ÷Û¸¦ ³È«èÍÍî…m§ÉÄU|e³û`W&®å«[]´½Mþ®Üïn"ÿ[Ùè^}™1oÒ¬o(È,ò*º{í>n¼zDÎ?~¼°}Áy‡ÜªE“Š^À¯óM|y#¿9Ï•wŠj ™~=.¬¸GSwB~E/Üïnß÷vؼ‚Ï‹çà ³ä­ ³Ë¯èû ÝIEãnЖ{ŽÜžT4Þèœ,‰®‘æòêd¦¼§½ð\y§¨®´uµ›¡GUÍ;EÍ‚|=YtÞ)jd =ªjÞ)Rä *TÑÛéÕº[ÑÔã[î\y§¨~Ó}_tþ/_G¦ó®_¼ùúü‡ÿ5Õ˜:ßyþ£©©FõÛqë‡Ã+(lIq¬·ô½ƒê Ù6uÍŒóæŠ.“µ5áž}q2Å;NTOÈ%­@›] Õ×[2%´vQmH !ÛV ‰aÌ‚7Üfw$ÜþÃnký¸jyljúIÊ!»ªqÜA2B~ ¼ Ïj™t¶Ò—:%,]´dxÐŽôVMH 'v¶‚J‰ºªj¶"~[õŒ;[4a’¡“ûj¶4ñc¸š@Nïl•v§r¶ÂOÍ ™k9«³Túí$¤]>d®d«Írg¼¬{† $¬#ïk¡¿¬ªCÓt¶‚ʾ1Œ¥~qDp“]mÈ)W¶’Dq÷=0¡Mv…!Û':G8kª[³EA>é¡&›§ˆ3ªdÛÂ#¦ð%Ž€‹æš6n×LG :#a5n²yŠ8£ª@Ž1ñ\d‡<3ÙŒú'g"k.ØdsÅ”Œª­v숉'à"äHGuÊ}t¥)ÐdsÆ”ŒÔ“8S¡” Óeƒœ½"§`‚ ëAxŒ” ²€ÓŒ "¼¶®Ænçvò+d!#¦Á…ñ+Ì«3·“_Y óyåq0Vca^y›ìr@Æ#¦–˜ÓLyAc5Žb–¼æôË.d‘#¦¨ c5u7 3O@:d–uL‚ÕXÐ’×¾fئÁ÷]imƒÔµðSTb5º§f^ÔÂM6o"Yíú¢ˆSTBb5âSóÂ"öNds‡š’yÔ"ˈ/&Vc‰‹Ëì«ÍPä‘F þBFÖbb5:Sîwx)Kl9Œ‘.#o1±Gf«€cŸßOÐ^-§©6-)aI…ÅjŸtÄŸ—ÉáÌN9/ä·¿0ëÓ¿ÝùÏO÷o!+!ÓžŸ~ÊÚƒÚž™¼~þþÓ;luñ–½,ÿ½ÃÇ[È¿çÖ/‹´Gt^`é+È 2eAÑ~XB“g:=G¢ óØóêôÞ3È;ùøÖþ-üè=# ù ¼$€ÌcÏíÕ#6{r•¾¹æHÿòzò'û®!äyé¶û;½$ïž¿zZ df{ð9ù˜2s^¸Ieœ·n¡ ?uróžqÿ`éÈÍ:ðÒ}çœEÄCf·ç–{$p@fÏëh -Q7×ùëV“ùíiØ8YAVdYA®(äý’AÞ§Ú$òËêCN˜Ú»óþþ«Ì‰±"¦cìùáý;9í¡šfýþýŸa§CÅú{!S±²;S'À ÀöŒß/ÞS[` èÖ ˆ€Åè rúé¬xÈüö$žÈAdP]‚dÕ˜‚`~ÈÓÂ!ç±à>–)‰kBîsDÑ•È 90ÄŒ+ÈØ#¯= Q3쉮!ã2žL'*@B0ºò{^)IæÍ'ØÅ‰+È1·¦ö$D9̲'ÒýËØš´" !½u2“Ì™OhÖ=6® klD0{¢fÚ3 u¿@ã2Ž&Ó !]õõÌ$så™À‰+Èl+·= Q³í M]ÁÆe4ý¾HF¯ÐÞS’Ì“ÏHOÅÆÆ,rØž„(‡öØi÷ 6.£í{0€„`ôäLI2G>3N±q‹ƒ±'!Ê!•=Swฌ–×÷ Áè©cf%ɟϬ{Tl\Á GíIˆrHgÏÄ1 :.£ç$™¬ç”’$o>qŽŽ±Ã’‚†P³ö$äHiïâ m·ç  ™¬ç|’$g>ô>3Å\ ·g,èê—'‘L >È Þo…@aϬ ˆl|¤eeìÀ™ÅµÈ‚ìÉ Qðº™Q<™<Ò €,Ì *"fHນQÙÖ–ˆ‡,О‘ˆÉGpÝqVÀfȬnÊ¢!‹µGH÷ ¼ï¥gLo±Bföx Y´="&ÁGe­ˆb„ÌîÚï¼7wÙ¤í@ Ù4Â7e |lD)öùºUýôf€ ¤0I2|EQŽ= \7Û \À‡6d[ãnt…ÄF”aÁ8ò!É–ÇÉ/E·ø Q†=–N"–Á•Á€üõù!ã–Jãø- 6¢{lSã=GÄÊ<á¦-íc ÈøÈÕÇq?I.ÍÛ€<-cÊp=R3'd›„€æxlD™öŒÛ$ ,)[Oû½ÎÒgßE6üMã´¯ÿøcÚ§li•Àžï>Ë4ÞÀ´þ–ê1ëu4ã×ìi@¦¥ìÉJCAn€=.dt€ñëݹ½ÞÁAÌ®sd#JË8;‘ÝE„Ö½Ò QA{ü´JbÏÞ²oÎò.Þu¿^þv½×{ò$¦hý0«R³Ù»-ZÿÖÛ!µ•³g’V9ìÙ[>è®­‡!ã·ë»¨÷âæá"~‡z7ÐN-"ü‹¸áþxÖ²*5>‘iËÞïÓÝ!µ•³ÇOKª=Ó¤IR/æÂ÷özˇ±wó ùeÜØë=!_?<$Î.½µÝŒJOdš†þwwH-Dåì ômäÙM …!÷Öž¬áG|N@käKÞŽ“?òp¸x^©ñ‰LÓX$–¬{;¤¢röøiIµ'’Ô‹Èøöð‘~8G¾´¸îþRƒ•Ú[_ΪԸD¦iìÍí‘sŽ·CF!*f—–\{¦Iíâ¤o.G KLÆ `¯ws ø¬¾x­T§?—VˆØDiàÞãÜzÏÛ!½•³ÇMK®=¤HïúæA2“Ê7Tö¤§¡ 7À¹ö(È °GAn€=ÙS9¦ÒŠIKÙ“•F7BT’-¹R ¹R ¹R ÿèòG0T¿S
The Cell object:
This object describes a unit cell. It holds the cell parameters, and derived information including coordinate conversion matrices and metrics. Any cell object may be used to convert coordinates between orthogonal and fractional forms, and calculate distances in real space and resolutions in reciprocal space.
The Spacegroup object:
This object describes a spacegroup, using information from the 'cctbx' library of Dr Ralph Grosse-Kunstleve. It can be use to generate symmetry coordinates and reflections, phase shifts, centricity, asymmetric units, and so on. \subsection ss_dobj Data objects: These hold actual data. They are written as templates which can hold whatever type of data the developer requires.
The reflection data object:
It is commonly necessary to store several related items of reflection data. Therefore this object is split into two parts; a parent object which holds a list of Miller indices and related data, and then several data objects which hold the actual data associated with each Miller index. The data objects can hold data of arbitrary types: these types will usually consist of several values. For example, a structure factor magnitude and its variance, or all four Hendrickson-Lattman coefficients, are usually held in a single data object. To the user, the data appears to cover the whole of reciprocal space, however in practice only an asymmetric unit is stored. Data is transformed about reciprocal spaces as required. When a new data type is defined, its behavior under transformation is also be defined so that this mapping can be performed.
The crystallographic map object:
This object also implements crystallographic symmetry, and also cell repeat, in a manner which is transparent to the user. It may also hold arbitrary data types: common examples would include bits, real values, complex values, or orthogonal or fractional gradients.
The non-crystallographic map object:
This object is used for map data which does not have symmetry or cell repeat, for example an NCS averaging mask.
\subsection ss_mobj Method objects: These are used to provide additional functionality commonly required in crystallographic calculations. Examples include:
FFT map:
This object holds data which may be represented in either real or reciprocal space. The data may be accessed in either form, and may be transformed between spaces as required.
The resolution function evaluator:
This object creates an arbitrary function of position in reciprocal space, by optimising the parameters of some basis function in order to minimise some target function. This is an extreme generalisation of the idea of 'resolution bins', and can be used for anything from <|F|2>s to sigma-a and beyond.
Import/export objects:
The only import/export objects implemented so far are the MTZfile and MAPfile objects. These stand as proxies for an external file, and can transfer data between the Clipper objects and the file.
\section s_scpt Scripting Automation of crystallographic tasks depends on being able to communicate between successive tasks, and by being able to execute control code to activate tasks and make protocol decisions. This functionality is provided through a scripting interface. A Python interface will be provided through the boost.python library. It is possible that interfaces to C and a range of scripting languages will be provided through other means. All the data and the full functionality of the methods will be available from the scripting layer, allowing full automation and full communication between tasks. Eventually the individual programs should disappear, rather exposing their functionality directly to the scripting layer. At the same time, data will have to move from traditional files into a database, so that each task has immediate access to all the information currently available. \section s_hier Partial class hierarchy (as of 1/2/2001) \image html hierarchy.png \image latex hierarchy.eps width=15cm \section s_ackn Acknowledgments: I would like to thank Ralph Grosse-Kunstleve, Airlie McCoy, Eugene Krissinel, Jan Zelinka and the CCP4 staff for their many and varied contributions to this effort. Clipper stands for 'Cross-crystal Likelihood Phase Probability Estimation and Refinement', which is what I hope to use it for. \section s_refr References: - 'Clipper' code and documentation (K. Cowtan): http://www.ysbl.york.ac.uk/~cowtan/clipper/clipper.html - 'mmdb' coordinate library (E. Krissinel): http://www.ebi.ac.uk/~keb/cldoc/ - 'cctbx' crystallography toolbox (R. Grosse-Kunstleve): http://cctbx.sourceforge.net See the following pages in the Clipper documentation for further information: - \ref p_class_overview (brief guide to classes) - \ref p_conventions (coding style) - \ref p_coords (Coodinate types) - \ref p_develop (initial example) - \ref p_develop_hkl (reflection data handling and examples) - \ref p_develop_map (map handling and examples) - \ref p_develop_model (model handling) - \ref p_wheretolook (thematic index) - \ref p_installation (and dependencies) */ /*! \namespace clipper All normal clipper objects except data objects are defined in this namespace. */ /*! \namespace clipper::datatypes This namespace is used for templates which will later be instantiated for float or double precision data. You would not normally reference a class from this namespace directly. */ /*! \namespace clipper::data32 This namespace contains instantiations of template classes for storage and manipulation of float data types. */ /*! \namespace clipper::data64 This namespace contains instantiations of template classes for storage and manipulation of double data types. */ clipper-2.1/dox/map_p1.png0000644000374100011300000000305010736662154012412 00000000000000‰PNG  IHDR|1€û§IDATxÚíÚÝq£0†aµ¸òýÞP-¸…mAµl i¶…´à¼±YÛÄဤHæ½gfwBòåÇÏÈIÇ©ÉrkÿªŒQÀŒQ#˜S·ö£Tw˜ß0zF5‚qÀŒj„̸€1 £€1 £À0 £&az_Yõ0¾ ûym»\çCaü9¨öœ`€0À 0Àèä€`€Y¦¿~ö±Íw¹¸o ~ûÊ׋[n!vË-ÅþçcCn9vÍ}ûJ3lxÖ3µ¿; \kHçÎ…~`€`€f«9ÖJÀ3›cŽÉsêÛ¶?-ÿÚmæÒaú¦9šfbÛb¹d˜ÞùKл…ß¼Õ\*Ì©ñCÐ7³£u³¹T˜¾¹çëfs©0þxùï²ux˜ím·-Æå¦Z\[`Òa䆾Ê[In²,œ³a¾Q‹Ý^Kç‚aÔÈŠç‚aÄásçXDF  0À 0R9`€)“«î\ `ârÌ1À 0Àèä€`rÕ- €&.ÇÌË`´ásçÒaÔÛ6èó-“K…Qo £Ï·T.†vV`â`ä†~áœýVzº–›, ç‚aän¯¥sÁ0jd¹s, èóË 0ÀŒN`Êäª;W˜¸s 0À 0:9`€…\uK`€‰Ë1ÇÌÚ0Z‡ð¹sé0bm¹sÉ0ê>ôùʥ¨7Òç«Öκ{˜ÉpÀ’@nèÎ £!Fn²,œ †‘»½æÎñ€GŸo\ŽEd0À 0À³É\uçJÀ—cŽ`€F' 0À£«nI 0q9æ`€FFë>wŽ6ú|ãr©0ê­aôù–Ê¥ÂÐÎzƒyÆfFnèÎ £!Fn²ÌãvMŸo\Ž%}¾q9`€`€Ù^®ºs%`€‰Ë1Ç 0À£“`€QÈU·$˜¸s 0À̶`´ásçh¡Ï7.— #×–;— £ÞL¸Zs"í¬ÀÄÁ¨ýÕZæå&ËÜ9n×ôùÆåXÐç—`€F8Wݹ0ÀÄå˜c€`€ÑÉ 0À(äª[L\Ž9`€‡úôùÆå’aÔ}rçRaäZà çl˜ghµf¹`ÚYk…i'¾­ ˜cÔ‡>}¾¥rÜ®éó˱$ Ï7. 0À£«î\ `ârÌ1À 0Àèä€`rÕ- €&.Ç 0ÀŒN˜ü0Z‡ð¹s´Ðçû³œ ót-×V8 #×LX8 C;ë æI F}èÓç[*Çíš>߸Kú|ãrÀÌKsÕ+L\Ž9`€0ÀŒB®º%0ÀÄå˜c€f%ÿöæg‚ê/¸Ì»ûÓ»w½²:L÷yr¿ô^Èê0Î ÿÔ^0ª0Íý­¤uŸ; ãÝß¿îò±XÛFñœsÿèèÜï³^£OéÜ2ÌPr­a…sÁ0rÍ„¹s©K‚¡µÓi?}E;k Óû°_ì7˜›‚ñý2Ìu^+`¨n1ú 4Ùç{ý“Ûs©0×ÛÜåûCn‡[Ì%Ã\ŒŽÇ°¨-æÒa>¥?g£ Gî-æ~óø­«ý”ùzOݗ˘ñÖÕ~Êx½¾ùú¬;3ÞºÚ}}x÷cgÇ;403/w|i'›]¾•Ì©ÃÏ1÷­«]U˜ÛÖÕ¾*Ì.+ÇÞ. £€1 £Âa®ž]¾½_t¡0½Èü²‹¸óì“oÝŒQÀŒQÀŒQÀŒQÀŒQÀŒQÀŒQÀŒQÀŒQÀŒQÀŒQÀõ_³<Ôy¬` ${HOME}/.agree2ccp4v6 \endcode - Non-Linux platforms: Change the CCP4 configure line to have the name of your platform, instead of 'linux', on the end. The fortran example will fail. - 'wget' fails: Your firewall may block wget. In which case, fetch the tar files by hand and then run the rest of the script. - If you haven't installed cctbx, the cctbx example will fail. */ clipper-2.1/dox/include.eps0000644000374100011300000005307610736662154012700 00000000000000%!PS-Adobe-2.0 %%Creator: dot version 1.7.11 (Tue Jan 21 14:14:28 GMT 2003) %%For: (cowtan) Kevin Cowtan %%Title: 1 %%Pages: (atend) %%BoundingBox: 35 35 613 660 %%EndComments %%BeginProlog save /DotDict 200 dict def DotDict begin %%BeginResource: procset /coord-font-family /Times-Roman def /default-font-family /Times-Roman def /coordfont coord-font-family findfont 8 scalefont def /InvScaleFactor 1.0 def /set_scale { dup 1 exch div /InvScaleFactor exch def dup scale } bind def % styles /solid { } bind def /dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def /dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def /invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def /bold { 2 setlinewidth } bind def /filled { } bind def /unfilled { } bind def /rounded { } bind def /diagonals { } bind def % hooks for setting color /nodecolor { sethsbcolor } bind def /edgecolor { sethsbcolor } bind def /graphcolor { sethsbcolor } bind def /nopcolor {pop pop pop} bind def /beginpage { % i j npages /npages exch def /j exch def /i exch def /str 10 string def npages 1 gt { gsave coordfont setfont 0 0 moveto (\() show i str cvs show (,) show j str cvs show (\)) show grestore } if } bind def /set_font { findfont exch scalefont setfont } def % draw aligned label in bounding box aligned to current point % alignfactor tells what fraction to place on the left. % -.5 is centered. /alignedtext { % text labelwidth fontsz alignfactor /alignfactor exch def /fontsz exch def /width exch def /text exch def gsave % even if node or edge is dashed, don't paint text with dashes [] 0 setdash currentpoint newpath moveto text stringwidth pop alignfactor mul fontsz -.3 mul rmoveto text show grestore } def /boxprim { % xcorner ycorner xsize ysize 4 2 roll moveto 2 copy exch 0 rlineto 0 exch rlineto pop neg 0 rlineto closepath } bind def /ellipse_path { /ry exch def /rx exch def /y exch def /x exch def matrix currentmatrix newpath x y translate rx ry scale 0 0 1 0 360 arc setmatrix } bind def /endpage { showpage } bind def /layercolorseq [ % layer color sequence - darkest to lightest [0 0 0] [.2 .8 .8] [.4 .8 .8] [.6 .8 .8] [.8 .8 .8] ] def /setlayer {/maxlayer exch def /curlayer exch def layercolorseq curlayer get aload pop sethsbcolor /nodecolor {nopcolor} def /edgecolor {nopcolor} def /graphcolor {nopcolor} def } bind def /onlayer { curlayer ne {invis} if } def /onlayers { /myupper exch def /mylower exch def curlayer mylower lt curlayer myupper gt or {invis} if } def /curlayer 0 def %%EndResource %%EndProlog %%BeginSetup 14 default-font-family set_font 1 setmiterlimit % /arrowlength 10 def % /arrowwidth 5 def % make sure pdfmark is harmless for PS-interpreters other than Distiller /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse % make '<<' and '>>' safe on PS Level 1 devices /languagelevel where {pop languagelevel}{1} ifelse 2 lt { userdict (<<) cvn ([) cvn load put userdict (>>) cvn ([) cvn load put } if %%EndSetup %%Page: 1 1 %%PageBoundingBox: 36 36 613 660 %%PageOrientation: Portrait gsave 35 35 578 625 boxprim clip newpath 36 36 translate 0 0 1 beginpage 0.8079 set_scale 0 0 translate 0 rotate [ /CropBox [36 36 613 660] /PAGES pdfmark 0.000 0.000 0.000 graphcolor 14.00 /Times-Roman set_font % coords.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 481 433 moveto 419 433 lineto 419 405 lineto 481 405 lineto closepath fill newpath 481 433 moveto 419 433 lineto 419 405 lineto 481 405 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 450 420 moveto (coords.h) 47 14.00 -0.50 alignedtext end grestore end grestore % atomsf.h gsave 10 dict begin newpath 385 367 moveto 323 367 lineto 323 339 lineto 385 339 lineto closepath stroke gsave 10 dict begin 354 354 moveto (atomsf.h) 48 14.00 -0.50 alignedtext end grestore end grestore % coords.h -> atomsf.h newpath 421 399 moveto 406 389 389 377 375 368 curveto stroke newpath 422 397 moveto 429 404 lineto 419 401 lineto closepath fill % container_types.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 398 235 moveto 286 235 lineto 286 207 lineto 398 207 lineto closepath fill newpath 398 235 moveto 286 235 lineto 286 207 lineto 398 207 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 342 222 moveto (container_types.h) 98 14.00 -0.50 alignedtext end grestore end grestore % coords.h -> container_types.h newpath 436 398 moveto 421 375 397 341 394 338 curveto 381 321 372 321 361 302 curveto 350 280 345 253 343 236 curveto stroke newpath 437 394 moveto 440 404 lineto 432 397 lineto closepath fill % derivs.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 511 367 moveto 453 367 lineto 453 339 lineto 511 339 lineto closepath fill newpath 511 367 moveto 453 367 lineto 453 339 lineto 511 339 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 482 354 moveto (derivs.h) 44 14.00 -0.50 alignedtext end grestore end grestore % coords.h -> derivs.h newpath 462 395 moveto 466 386 471 376 475 368 curveto stroke newpath 464 396 moveto 457 404 lineto 460 394 lineto closepath fill % fftmap.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 713 367 moveto 651 367 lineto 651 339 lineto 713 339 lineto closepath fill newpath 713 367 moveto 651 367 lineto 651 339 lineto 713 339 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 682 354 moveto (fftmap.h) 47 14.00 -0.50 alignedtext end grestore end grestore % coords.h -> fftmap.h newpath 489 410 moveto 528 400 589 384 642 368 curveto 643 367 646 366 651 365 curveto stroke newpath 491 412 moveto 481 412 lineto 490 407 lineto closepath fill % fftmap_sparse.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 633 367 moveto 529 367 lineto 529 339 lineto 633 339 lineto closepath fill newpath 633 367 moveto 529 367 lineto 529 339 lineto 633 339 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 581 354 moveto (fftmap_sparse.h) 89 14.00 -0.50 alignedtext end grestore end grestore % coords.h -> fftmap_sparse.h newpath 487 400 moveto 508 390 533 378 552 368 curveto stroke newpath 489 402 moveto 479 404 lineto 487 397 lineto closepath fill % hkl_lookup.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 267 367 moveto 179 367 lineto 179 339 lineto 267 339 lineto closepath fill newpath 267 367 moveto 179 367 lineto 179 339 lineto 267 339 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 223 354 moveto (hkl_lookup.h) 74 14.00 -0.50 alignedtext end grestore end grestore % coords.h -> hkl_lookup.h newpath 411 408 moveto 371 396 309 378 267 366 curveto stroke newpath 410 405 moveto 419 410 lineto 409 410 lineto closepath fill % clipper_types.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 407 631 moveto 307 631 lineto 307 603 lineto 407 603 lineto closepath fill newpath 407 631 moveto 307 631 lineto 307 603 lineto 407 603 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 357 618 moveto (clipper_types.h) 85 14.00 -0.50 alignedtext end grestore end grestore % cell.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 446 499 moveto 392 499 lineto 392 471 lineto 446 471 lineto closepath fill newpath 446 499 moveto 392 499 lineto 392 471 lineto 446 471 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 419 486 moveto (cell.h) 30 14.00 -0.50 alignedtext end grestore end grestore % clipper_types.h -> cell.h newpath 376 597 moveto 386 586 397 573 400 566 curveto 404 560 412 521 416 500 curveto stroke newpath 380 597 moveto 371 602 lineto 376 593 lineto closepath fill % container.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 333 499 moveto 257 499 lineto 257 471 lineto 333 471 lineto closepath fill newpath 333 499 moveto 257 499 lineto 257 471 lineto 333 471 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 295 486 moveto (container.h) 62 14.00 -0.50 alignedtext end grestore end grestore % clipper_types.h -> container.h newpath 339 597 moveto 329 586 317 573 314 566 curveto 311 560 303 521 298 500 curveto stroke newpath 339 593 moveto 344 602 lineto 335 597 lineto closepath fill % ramachandran.h gsave 10 dict begin newpath 267 565 moveto 165 565 lineto 165 537 lineto 267 537 lineto closepath stroke gsave 10 dict begin 216 552 moveto (ramachandran.h) 89 14.00 -0.50 alignedtext end grestore end grestore % clipper_types.h -> ramachandran.h newpath 317 598 moveto 295 588 268 576 247 566 curveto stroke newpath 318 596 moveto 326 602 lineto 316 600 lineto closepath fill % rotation.h gsave 10 dict begin newpath 391 565 moveto 323 565 lineto 323 537 lineto 391 537 lineto closepath stroke gsave 10 dict begin 357 552 moveto (rotation.h) 54 14.00 -0.50 alignedtext end grestore end grestore % clipper_types.h -> rotation.h newpath 357 592 moveto 357 583 357 574 357 566 curveto stroke newpath 360 592 moveto 357 602 lineto 355 592 lineto closepath fill % symop.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 645 565 moveto 583 565 lineto 583 537 lineto 645 537 lineto closepath fill newpath 645 565 moveto 583 565 lineto 583 537 lineto 645 537 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 614 552 moveto (symop.h) 47 14.00 -0.50 alignedtext end grestore end grestore % clipper_types.h -> symop.h newpath 414 604 moveto 468 592 544 575 574 566 curveto 577 565 580 564 583 563 curveto stroke newpath 417 606 moveto 407 606 lineto 416 601 lineto closepath fill % cell.h -> coords.h newpath 429 464 moveto 433 454 439 443 443 434 curveto stroke newpath 433 462 moveto 426 470 lineto 428 460 lineto closepath fill % clipper_message.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 346 763 moveto 228 763 lineto 228 735 lineto 346 735 lineto closepath fill newpath 346 763 moveto 228 763 lineto 228 735 lineto 346 735 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 287 750 moveto (clipper_message.h) 103 14.00 -0.50 alignedtext end grestore end grestore % clipper_memory.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 350 697 moveto 234 697 lineto 234 669 lineto 350 669 lineto closepath fill newpath 350 697 moveto 234 697 lineto 234 669 lineto 350 669 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 292 684 moveto (clipper_memory.h) 102 14.00 -0.50 alignedtext end grestore end grestore % clipper_message.h -> clipper_memory.h newpath 289 728 moveto 289 718 290 707 291 698 curveto stroke newpath 292 725 moveto 288 734 lineto 287 724 lineto closepath fill % clipper_memory.h -> clipper_types.h newpath 313 661 moveto 323 652 334 641 343 632 curveto stroke newpath 315 663 moveto 306 668 lineto 311 659 lineto closepath fill % clipper_util.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 462 697 moveto 374 697 lineto 374 669 lineto 462 669 lineto closepath fill newpath 462 697 moveto 374 697 lineto 374 669 lineto 462 669 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 418 684 moveto (clipper_util.h) 75 14.00 -0.50 alignedtext end grestore end grestore % clipper_util.h -> clipper_types.h newpath 398 661 moveto 389 651 378 641 370 632 curveto stroke newpath 399 659 moveto 404 668 lineto 396 662 lineto closepath fill % clipper_precision.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 612 763 moveto 490 763 lineto 490 735 lineto 612 735 lineto closepath fill newpath 612 763 moveto 490 763 lineto 490 735 lineto 612 735 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 551 750 moveto (clipper_precision.h) 107 14.00 -0.50 alignedtext end grestore end grestore % clipper_precision.h -> clipper_util.h newpath 516 731 moveto 494 721 467 708 447 698 curveto stroke newpath 514 727 moveto 521 734 lineto 511 731 lineto closepath fill % clipper_sysdep.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 472 763 moveto 364 763 lineto 364 735 lineto 472 735 lineto closepath fill newpath 472 763 moveto 364 763 lineto 364 735 lineto 472 735 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 418 750 moveto (clipper_sysdep.h) 94 14.00 -0.50 alignedtext end grestore end grestore % clipper_sysdep.h -> clipper_util.h newpath 418 724 moveto 418 715 418 706 418 698 curveto stroke newpath 421 724 moveto 418 734 lineto 416 724 lineto closepath fill % container.h -> container_types.h newpath 298 463 moveto 302 428 310 361 314 338 curveto 316 333 331 266 338 236 curveto stroke newpath 301 460 moveto 297 470 lineto 296 460 lineto closepath fill % container_hkl.h gsave 10 dict begin newpath 392 169 moveto 292 169 lineto 292 141 lineto 392 141 lineto closepath stroke gsave 10 dict begin 342 156 moveto (container_hkl.h) 87 14.00 -0.50 alignedtext end grestore end grestore % container_types.h -> container_hkl.h newpath 342 196 moveto 342 187 342 178 342 170 curveto stroke newpath 345 196 moveto 342 206 lineto 340 196 lineto closepath fill % container_map.h gsave 10 dict begin newpath 588 169 moveto 480 169 lineto 480 141 lineto 588 141 lineto closepath stroke gsave 10 dict begin 534 156 moveto (container_map.h) 93 14.00 -0.50 alignedtext end grestore end grestore % container_types.h -> container_map.h newpath 391 204 moveto 422 193 462 180 491 170 curveto stroke newpath 395 205 moveto 385 206 lineto 394 200 lineto closepath fill % hkl_data.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 259 235 moveto 187 235 lineto 187 207 lineto 259 207 lineto closepath fill newpath 259 235 moveto 187 235 lineto 187 207 lineto 259 207 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 223 222 moveto (hkl_data.h) 58 14.00 -0.50 alignedtext end grestore end grestore % hkl_data.h -> container_hkl.h newpath 254 203 moveto 274 193 298 180 315 170 curveto stroke newpath 259 203 moveto 249 206 lineto 256 199 lineto closepath fill % hkl_datatypes.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 274 169 moveto 172 169 lineto 172 141 lineto 274 141 lineto closepath fill newpath 274 169 moveto 172 169 lineto 172 141 lineto 274 141 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 223 156 moveto (hkl_datatypes.h) 88 14.00 -0.50 alignedtext end grestore end grestore % hkl_data.h -> hkl_datatypes.h newpath 223 196 moveto 223 187 223 178 223 170 curveto stroke newpath 226 196 moveto 223 206 lineto 221 196 lineto closepath fill % resol_fn.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 119 169 moveto 49 169 lineto 49 141 lineto 119 141 lineto closepath fill newpath 119 169 moveto 49 169 lineto 49 141 lineto 119 141 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 84 156 moveto (resol_fn.h) 56 14.00 -0.50 alignedtext end grestore end grestore % hkl_data.h -> resol_fn.h newpath 184 202 moveto 162 192 135 180 115 170 curveto stroke newpath 184 199 moveto 192 206 lineto 182 204 lineto closepath fill % nxmap_operator.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 663 235 moveto 547 235 lineto 547 207 lineto 663 207 lineto closepath fill newpath 663 235 moveto 547 235 lineto 547 207 lineto 663 207 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 605 222 moveto (nxmap_operator.h) 102 14.00 -0.50 alignedtext end grestore end grestore % nxmap_operator.h -> container_map.h newpath 584 202 moveto 573 192 560 180 550 170 curveto stroke newpath 583 198 moveto 589 206 lineto 580 202 lineto closepath fill % spacegroup.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 552 499 moveto 464 499 lineto 464 471 lineto 552 471 lineto closepath fill newpath 552 499 moveto 464 499 lineto 464 471 lineto 552 471 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 508 486 moveto (spacegroup.h) 74 14.00 -0.50 alignedtext end grestore end grestore % spacegroup.h -> coords.h newpath 491 465 moveto 481 455 471 443 463 434 curveto stroke newpath 491 461 moveto 495 470 lineto 487 464 lineto closepath fill % map_interp.h gsave 10 dict begin newpath 458 301 moveto 370 301 lineto 370 273 lineto 458 273 lineto closepath stroke gsave 10 dict begin 414 288 moveto (map_interp.h) 74 14.00 -0.50 alignedtext end grestore end grestore % derivs.h -> map_interp.h newpath 460 331 moveto 450 322 438 311 429 302 curveto stroke newpath 462 329 moveto 467 338 lineto 458 333 lineto closepath fill % map_utils.h gsave 10 dict begin newpath 556 301 moveto 476 301 lineto 476 273 lineto 556 273 lineto closepath stroke gsave 10 dict begin 516 288 moveto (map_utils.h) 65 14.00 -0.50 alignedtext end grestore end grestore % derivs.h -> map_utils.h newpath 495 329 moveto 499 320 504 310 509 302 curveto stroke newpath 497 330 moveto 490 338 lineto 493 328 lineto closepath fill % nxmap.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 636 301 moveto 574 301 lineto 574 273 lineto 636 273 lineto closepath fill newpath 636 301 moveto 574 301 lineto 574 273 lineto 636 273 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 605 288 moveto (nxmap.h) 48 14.00 -0.50 alignedtext end grestore end grestore % derivs.h -> nxmap.h newpath 517 334 moveto 537 323 561 312 578 302 curveto stroke newpath 519 336 moveto 509 338 lineto 517 331 lineto closepath fill % xmap.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 710 301 moveto 654 301 lineto 654 273 lineto 710 273 lineto closepath fill newpath 710 301 moveto 654 301 lineto 654 273 lineto 710 273 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 682 288 moveto (xmap.h) 41 14.00 -0.50 alignedtext end grestore end grestore % derivs.h -> xmap.h newpath 521 338 moveto 574 319 590 320 645 302 curveto 648 301 651 300 654 299 curveto stroke newpath 521 341 moveto 511 341 lineto 520 336 lineto closepath fill % fftmap.h -> xmap.h newpath 682 328 moveto 682 319 682 310 682 302 curveto stroke newpath 685 328 moveto 682 338 lineto 680 328 lineto closepath fill % fftmap_sparse.h -> xmap.h newpath 611 333 moveto 627 323 646 311 660 302 curveto stroke newpath 613 335 moveto 603 338 lineto 610 331 lineto closepath fill % hkl_compute.h gsave 10 dict begin newpath 214 103 moveto 116 103 lineto 116 75 lineto 214 75 lineto closepath stroke gsave 10 dict begin 165 90 moveto (hkl_compute.h) 83 14.00 -0.50 alignedtext end grestore end grestore % hkl_datatypes.h -> hkl_compute.h newpath 203 133 moveto 195 123 185 113 178 104 curveto stroke newpath 205 131 moveto 210 140 lineto 201 135 lineto closepath fill % hkl_operators.h gsave 10 dict begin newpath 332 103 moveto 232 103 lineto 232 75 lineto 332 75 lineto closepath stroke gsave 10 dict begin 282 90 moveto (hkl_operators.h) 87 14.00 -0.50 alignedtext end grestore end grestore % hkl_datatypes.h -> hkl_operators.h newpath 240 135 moveto 249 125 260 113 269 104 curveto stroke newpath 244 134 moveto 236 140 lineto 240 131 lineto closepath fill % resol_targetfn.h gsave 10 dict begin newpath 255 37 moveto 153 37 lineto 153 9 lineto 255 9 lineto closepath stroke gsave 10 dict begin 204 24 moveto (resol_targetfn.h) 88 14.00 -0.50 alignedtext end grestore end grestore % hkl_datatypes.h -> resol_targetfn.h newpath 278 137 moveto 305 128 334 116 341 104 curveto 349 92 349 84 341 74 curveto 336 66 289 49 252 38 curveto stroke newpath 281 138 moveto 271 140 lineto 279 134 lineto closepath fill % hkl_info.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 259 301 moveto 187 301 lineto 187 273 lineto 259 273 lineto closepath fill newpath 259 301 moveto 187 301 lineto 187 273 lineto 259 273 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 223 288 moveto (hkl_info.h) 57 14.00 -0.50 alignedtext end grestore end grestore % hkl_info.h -> hkl_data.h newpath 223 262 moveto 223 253 223 244 223 236 curveto stroke newpath 226 262 moveto 223 272 lineto 221 262 lineto closepath fill % hkl_lookup.h -> hkl_info.h newpath 223 328 moveto 223 319 223 310 223 302 curveto stroke newpath 226 328 moveto 223 338 lineto 221 328 lineto closepath fill % nxmap.h -> nxmap_operator.h newpath 605 262 moveto 605 253 605 244 605 236 curveto stroke newpath 608 262 moveto 605 272 lineto 603 262 lineto closepath fill % xmap.h -> nxmap_operator.h newpath 660 268 moveto 648 258 633 246 622 236 curveto stroke newpath 659 264 moveto 665 272 lineto 656 268 lineto closepath fill % resol_basisfn.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 98 103 moveto 0 103 lineto 0 75 lineto 98 75 lineto closepath fill newpath 98 103 moveto 0 103 lineto 0 75 lineto 98 75 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 49 90 moveto (resol_basisfn.h) 84 14.00 -0.50 alignedtext end grestore end grestore % resol_fn.h -> resol_basisfn.h newpath 71 131 moveto 67 122 62 112 57 104 curveto stroke newpath 73 130 moveto 76 140 lineto 69 132 lineto closepath fill % resol_basisfn.h -> resol_targetfn.h newpath 92 70 moveto 116 60 147 48 170 38 curveto stroke newpath 93 72 moveto 83 74 lineto 91 68 lineto closepath fill % symop.h -> spacegroup.h newpath 582 531 moveto 566 521 546 509 531 500 curveto stroke newpath 583 529 moveto 590 536 lineto 580 533 lineto closepath fill % spacegroup_data.h gsave 10 dict begin filled 0.000 0.000 0.827 nodecolor newpath 565 565 moveto 447 565 lineto 447 537 lineto 565 537 lineto closepath fill newpath 565 565 moveto 447 565 lineto 447 537 lineto 565 537 lineto closepath stroke gsave 10 dict begin 0.000 0.000 0.000 nodecolor 506 552 moveto (spacegroup_data.h) 104 14.00 -0.50 alignedtext end grestore end grestore % spacegroup_data.h -> spacegroup.h newpath 507 526 moveto 507 517 507 508 508 500 curveto stroke newpath 509 526 moveto 506 536 lineto 505 526 lineto closepath fill endpage grestore %%PageTrailer %%EndPage: 1 %%Trailer %%Pages: 1 end restore %%EOF clipper-2.1/dox/Makefile.am0000644000374100011300000000174611372264321012564 00000000000000# Makefile.am, passed: dox, extracted subdir: dox # in dir /home/cowtan/clipper-autoconf/clipper-2.1/dox ## -*- mode: Makefile; mode: font-lock -*- INCLUDES=${FFTW_CXXFLAGS} library_includedir = $(pkgincludedir) EXTRA_DIST = \ class_overview.dox \ clipper.dox \ clipper_hierarchy.eps \ clipper_hierarchy.png \ container.eps \ container.png \ conventions.dox \ coordtypes.dox \ develop.dox \ develop_hkl.dox \ develop_map.dox \ develop_model.dox \ donors.eps \ donors.png \ hierarchy.eps \ hierarchy.png \ hier_rep.eps \ hier_rep.png \ hkl_objs.eps \ hkl_objs.png \ img_container.eps \ img_container.png \ include.eps \ include.png \ installation.dox \ map_p1.eps \ map_p1.png \ map_p2.eps \ map_p2.png \ minimol1.png \ minimol2.png \ minimol3.png \ wheretolook.dox clipper-2.1/dox/develop_map.dox0000644000374100011300000002721510736662154013547 00000000000000/*! \page p_develop_map Developing using Crystallographic Maps \section s_mapund Understanding Xmaps The most commonly used map object in Clipper is the crystallographic map, or Xmap. This is the map class which is used to describe any function of position in a crystal which obeys the crystal cell repeat and symmetry. Electron density is the most common example. The aim of the Xmap is to provide a fast and efficient way of storing some property, in such a way that the crystallographic symmetry and cell repeat are imposed without any effort from the programmer. Therefore, a clipper::Xmap appears to be infinite in every direction, allowing the map to be queried at any position in crystal space. However, only a unique subregion of a single cell is stored. If a value in the map is changed, then every copy of that value throughout crystal space also changes. \subsection ss_mapgrid Grids Representing the electron density across the whole unit cell is simple enough. A sampling is chosen which is sufficient to represent the electron density to the desired level of detail. The unit cell is then divided into a 3-dimensional grid with the given sampling. The first point is at the origin, and the first point along each line through the array lies on the surface of the unit cell. The last point along each line is the point before the surface of the next cell. Since the cell repeats, there is no point storing each surface twice. There are generally some restrictions on the grid sampling, imposed by the cell dimensions, spacegroup, and FFT requirements. The clipper::Grid_sampling class can be used to select an appropriate grid sampling for any particular problem. The following image shows a slice of a unit cell which has been sampled on a (6x8) grid. 48 points are stored, with fractional coordinates 0...5/6 on the horizontal axis and 0...7/8 on the vertical axis. \image html map_p1.png \image latex map_p1.eps width=5cm The fraction coordinate of any map grid point may therefore be determined by dividing the zero-based grid coordinate by the grid sampling along each direction. \subsection s_mapasu Asymmetric units Unfortunately the general case in crystallography is rather more complex. In addition to the unit cell repeat, most molecules crystallise with some sort of symmetry within the unit cell. Thus the unique region of crystal space, referred to as an asymmetric unit (ASU), is smaller than the the unit cell by a factor equal to the number of symmetry operators. A naive approach to this problem would be to store only an oblong 'brick' within the unit cell. Unfortunately in the general case this does not work, since some symmetry operators are not aligned along grid axes. Even simple cases, such as a single 2-fold rotation axis, can cause problems, as illustrated in the figure below: \image html map_p2.png \image latex map_p2.eps width=5cm The map section shows a sampling of a P2 unit cell. An attempt has been made to select an asymmetric unit using a rectangular subregion of the section. However it can be seen that the origin is related to itself, and the 2-fold axis also relates the points on the left and right-hand edges of the oblong to other points on the same edge. Therefore 26 points are required to store a complete asymmetric unit section, and the brick containing those points is just over half the unit cell wide and contains 32 points. The approach used by the Xmap class is therefore to store a compact brick of density, along with a flag array marking which points within that brick are considered to be part of the ASU, and which are considered to be outside the ASU. \note In actual fact, clipper stores a border of 1 extra cell around the ASU brick. This extra row is used to speed up systematic searches through the density by flagging the edge of the ASU. In addition these extra points cache the number of the symop required to get back into the ASU, making systematic density searches very efficient. \subsection ss_mapcoord Coordinates There are three kinds of coordinates which are commonly used in real space. They are: - Orthogonal (Angstom) coordinates (clipper::Coord_orth) - Fractional (cell) coordinates (clipper::Coord_frac) - Grid coordinates (clipper::Coord_grid) Grid coordinates are always integers, the others are floating point values. Conversion between orthogonal and fractional coordinates is performed using the clipper::Coord_orth::coord_frac() and clipper::Coord_frac::coord_orth() methods, supplying the cell as an argument. e.g. corth.coord_frac(xmap.cell()) Conversion between fractional and grid coordinates is performed using the clipper::Coord_map::coord_frac() and clipper::Coord_frac::coord_map() methods, supplying the grid as an argument. e.g. cfrac.coord_map(xmap.grid_sampling()) \section s_mapxmap The Xmap class The clipper Xmap class therefore holds a flag array and data array corresponding to a compact brick containing at least complete asymmetric unit. The Xmap is constructed by providing a spacegroup, cell, and grid sampling. These are used to determine an appropriate ASU, and allocate an array to store the map data. The data may then be read or written by providing the appropriate grid coordinate. Alternatively, interpolated values and gradients at non-grid locations may be read by providing a fraction coordinate. A variety of interpolation methods are provided for this purpose. In order to use the class efficiently, some important difficulties must be borne in mind. A problem arises when we wish to apply some transformation to the values stored in the map. In this case, we must access every unique value in the asymmetric unit once and once only, applying the desired transformation. Only then will the entire map have been transformed correctly. A second problem arises if we want to access the stored value of the density at some position in crystal space, represented by a grid coordinate. Then it is necessary to search through all the symmetry operators, applying each one in turn to the coordinate to find the operator which brings the coordinate into the stored asymmetric unit. Any cell translations must also be taken into account. The value of the map for that coordinate can then be returned. Clearly this can be time consuming, especially if there are many symmetry operators. Both these problems are addressed by the use of map reference types. These come in two forms: - index-like references (clipper::Xmap_base::Map_reference_index) - coordinate-like references (clipper::Xmap_base::Map_reference_coord) The index-like reference behaves like an index: it stores a reference to a map and an index into that map. It is used to loop over all the values in the asymmetric unit of a map, using the Xmap<>::first(), and Map_reference_index::last() and Map_reference_index::next() methods. The coordinate corresponding to the index can be returned at any point. The coordinate-like reference behaves like a coordinate: it stores a reference to a map and a grid coordinate into that map. However to enhance performance it also stores the index corresponding to that coordinate, and the number of the symmetry operator used to get back into the stored asymmetric unit. Since maps are usually accessed systematically, the next coordinate used will commonly require the same symmetry operator, and so that operator is tried first. An efficient caching mechanism makes incrementing or decrementing the coordinate along the u, v, or w directions particularly fast. The differences between the index-like and coordinate-like reference types can be summarised as follows: - index-like types can only refer to the position of a stored datum, i.e. a coordinate in the stored ASU. - coordinate-like types can refer to any possible position, and therefore also store the symmetry transformations required to get back to the stored data. Use of map reference types is always preferred over requesting a coordinate directly. The accessor methods for the map are designed to encourage efficient usage. Map reference types may be shared between any maps which have the same symmetry and grid sampling. It is the responsibility of the programmer to ensure this restriction is obeyed. \section s_mapcode Xmap code fragments \subsection ss_mapio Importing and exporting Xmaps Importing and exporting Xmaps to or from CCP4 map files couldn't be easier. To import a map, use: \code clipper::CCP4MAPfile file; file.open_read( "my.map" ); file.import_xmap( xmap ); file.close_read(); \endcode The extent and axis order of the input map do not matter, the resulting map will always cover the preferred ASU. However, if there is insufficient information in the input map to obtain an ASU, the remaining portion of the map will be untouched. To export a map, use: \code clipper::CCP4MAPfile file; file.open_write( "my.map" ); file.export_xmap( xmap ); file.close_write(); \endcode \subsection ss_mapexp Expanding a map to a lower symmetry Sometimes it is necessary to expand a map to a lower symmetry. The ASU for the new spacegroup will be larger than the ASU for the old spacegroup, so the additional density values must be generated by applying the symmetry operators from the old spacegroup. This can be handled automatically by the map class. The new map is constructed to share a grid and cell with the old map, but with the new spacegroup. We must ensure that every value in the new map is set, so we loop over the new map using a clipper::Xmap_base::Map_reference_index. The we request the corresponding density from the old map, using the coordinate of the Map_reference_index: \code clipper::Xmap oldmap, newmap; ... newmap.init( newspacegroup, oldmap.cell(), oldmap.grid_sampling() ); clipper::Xmap_base::Map_reference_index ix; for ( ix = newmap.first(); !ix.last(); ix.next() ) { newmap[ ix ] = oldmap.get_data( ix.coord() ); } \endcode This works, but it would be faster to use a Map_reference_coord to access the second map, so that the symmetry operators do not need to be searched every time. The coordinate of the Map_reference_coord can be set from the Map_reference_index into the first map. i.e.: \code clipper::Xmap oldmap, newmap; ... newmap.init( newspacegroup, oldmap.cell(), oldmap.grid_sampling() ); clipper::Xmap_base::Map_reference_index ix; clipper::Xmap_base::Map_reference_coord iy(oldmap); for ( ix = newmap.first(); !ix.last(); ix.next() ) { iy.set_coord( ix.coord() ); newmap[ ix ] = oldmap[ iy ]; } \endcode \subsection ss_mapbloc Looping over a small block of density Sometimes it is necessary to access all of the map values in a cubic or oblong block of the unit cell. To perform this operation efficiently, coordinate-like map references must be used to eliminate the need to search over symmetry operators. Either of the following approaches may be used, depending on the situation: Three map references can be used, one each for looping along the u, v, and w directions. Suppose the loop must run over the box bounded by Coord_grid g0 and Coord_grid g1. This leads to code of the following form: \code clipper::Xmap_base::Map_reference_coord i0, iu, iv, iw; i0 = clipper::Xmap_base::Map_reference_coord( xmap, g0 ); for ( iu = i0; iu.coord().u() <= g1.u(); iu.next_u() ) for ( iv = iu; iv.coord().v() <= g1.v(); iv.next_v() ) for ( iw = iv; iw.coord().w() <= g1.w(); iw.next_w() ) { // ---- access xmap[iw] here ---- } \endcode Alternatively, in most cases it is only necessary to optimise the innermost loop. \code int u, v; clipper::Xmap_base::Map_reference_coord ix( xmap ); for ( u = g0.u(); u <= g1.u(); u++ ) for ( v = g0.v(); v <= g1.v(); v++ ) for ( ix.set_coord(Coord_grid(u,v,g0.w())); ix.coord().w() <= g1.w(); ix.next_w() ) { // ---- access xmap[ix] here ---- } \endcode */ clipper-2.1/dox/hkl_objs.png0000644000374100011300000002161510736662154013037 00000000000000‰PNG  IHDRÛúfŸzD# IDATxÚí=ôºuÇ9É-l8E´¥ÃÚÛ] …µå-Rh«Û¤™q—4)ÒKE>€æ#H€7IF½©Èµ©®d1àNj #€R/ÃG¤8z¥ýÿðàÁ¬^(ytxD ÿçÔ4 `³uüxd0xd0xd0xd0xd0xd0…¯¶®ÀXN§­kÌ´°cŸ12Ü1À(frJ»‘ÙlƒLb¾qŸ12xd0xd0xd0xd0xd0xd0…=ÿy4X`ÆŸÀƒ…ù|12Ü1 Œ,̧Œ‘‚0¸c°<Ÿ/FSGS€GS€GS€GSØÏo-Ê’•å[²ì¯l›ÙöRçÀZìÇ#×5ûþ{ö—¿üÿ–÷wÆû»¿cÿõ_ ž kqjvôËÜŸýŒýñí_Í~ÿûeÏ€}üyG÷ XùlcWóÈooŠÿø‹Ÿ «°+üoÿÆ~ô£/¶üýß³ý×ÅÏ€UØÕ¬“&M;L9ÌZ€.>鬓&M;L9–goYœ|:í0å\Xž½ÍZ0aòaĴÔsÁ'³ ‹Ï;kÁ„ɇÓS΀…ÙaŒœçì»ïØ~IJŒ9Îzç‚ObdÐÅ|¶±CÌûÙÏØW_œv˜r.øÌÀ#ƒ.泯ʲ,[šÆó?ÿùÿþä'ÿ͵)Ö:—1æ8ŽeY+ß8Žw×GÇ#dŒ1A×¶m{ž·r­`&0£müMÇyžoý†ñû_ýêþéŸÖ?7I’MÚ*I’$IÖ¿.èÏV}Û0ŸA}tò}ßu]×u·®ö‚`“¶zgŒ¥iºu|n´O¦[õlÃæ³þÖ <2˜<2˜<2˜‚Ú#Ÿh¢ZúSÜ~½^¯×«|°šÛVr¹\4{àó02F&_EQÏã5ï“$Á›âÌ>jj Ɇü”ûô%ýÏí¤1~÷a¶Á&˜‡\‡ÃXÅ<Ô3¡½N§Sô?ßþþþ^×5m?N×ëµ®k6ÜV€ÈˆnêÃPÓoúÿp°kÆø= †Øk2‡±ŠN,Ž]âö8Žã8ö}ÐeÄÑϲ¬ªªn·ûhÇ4Mo·[]×UUUUÅ>V¿ìr…·Œ¸å꺾^¯4"ò|˜l ò®Ñäyþööv:^__ù¤y}ÄëÒ.eQÂû°#Û Þßßéêb×Ó^þq¬Â÷ý4M›/a_Ž]üOƘçyQ9ŽÓu°±årÓ´¥( ˲ž–¹>ʶZZ–ÒÚ(w%ßN7[QâÁO¯âyžçyUUÑ0Iß×q>LŠE)wǃŠjURþ „eYÔªišú¾Ï¯âû>Õçñxp{ k‘FQ´j70Öt7£²V`¿¶Ñô3:, êªD» ðiÑ0¶±ŠËÏeƒ=2}8ŸÏâÍÓ£ÂO<2cŒ{äže®iYùçèQSÅãÓ4¥Ûøé.º¨çyÇ£ÿuÇq]7Š¢–›ë#ÞÃô¡ªª0 Çñ}_ÏUò'$Š"ÏólÛôÌ(?ôÅqüþþže™,®$ï ‚ ‚(ŠèÞë]Š›Ê²¼\.âC±X¹–eÑY–å›2Ñ8P±/ÛhaYV×Ô?`÷V1.Fnšæ~¿Û¶M&œ®¡€=‹‘÷Âô|Ô˜)ï%F¦PPHÒ§%]×m=™2áñ–IÏ4ò®4M=Ï£€WYI%QÝïwª°x•óùLõ©ªÊ¶íVEQÐÓqEâÓÕ‚"F¦&ØFÏKÓatßù¾>Ÿ›n7²U|\~ÙY  d_¹8j>zÙMÓô})ÌqÇqr‹–eÑœ•¼‹ »‚Ï÷=ývÇöm pDW^UÕǶmºyažÏç§‘ÄÌÈ#7ØF3Ä#Sdíºn+V?lc×0Ô#+ƒro”G^MбDŸÏ—Ë…1–çùív{<EQàÖ ‹£öÈeYÒ²Eú)¨çyL¥R*+زMúqNÜ÷ý²,cI’œÏgÛ¶iemÇ[7,ŽÚ#û¾ÿúúz½^É’wβŒÂsá(R'ÝRQÎqœq?#½^¯¤…/þ5‚¡ù°GÔ9 ÃÇãá8åwà!*iˆ„a˜$ c,Žã0 -ËrGÔÏliiò„„œúELV"ºò$I^__[à¨(ÖìeYV–%Éõ3Æ<Ï{{{£ÏW)Õ+Ørž®¼R®É¡7Šiš’0EŒ\×uÇ4ŸKpŸHÂ\Qþ|>“Ì|]×5+y#ËÄq\×5 nÝD°Šù|>Ód…ÀŽãp— òé'dÄ{eIÛP+ uùÐÇã!þY×uEÆò¨ uÊã·”˜€1fYj–´Ikö ` 32Isc[8bä®é…¦iŠ¢˜’bƒÒ˜<2˜<2˜<2˜<2˜‚Ú#×u}¹\dyZV'.®{J—=)#ËÐ"ì——¾Pû©˜}Ç|­¶|:˜I§b}Y–UU5M†!DžŽRŠ>˲Ëå¢ô˜I’dYVUUš¦äŸŠÙ—e­X‘OcQ{ä$I¢("97×uÃ0$LÁ)iÒ»žRŠž”—•Ç×uíy ~ö³¿\.|¶|:Kçš=qÅIqòàÔ²¬÷÷÷8ŽE‰Îžˆj\Šž6’þ} º­Ò¦*)K·¸®ëyÅÎòé`,Þì‰Á)O¿¤ä©üæh)z+KȲ¬®kM™È0uŒlYVžç<¨¼\.®ë2Æn·dÝnõ#½rÛ )ú<ÏmÛ&º®_^^(þU–p»Ý²,ãn÷ýý= Cùô­ÛÔ¨cäóù|»Ýhî8Ïó,Ë(:>ŸÏôºÏ÷}kÓÄÈC¥è“$áïîÈ;kJHÓ”§µ¦?åÓ·npèDí‘=Ï+Ë’^â]¯×4M-Ëò<϶mÚX×µ>FnRAÝ™KÑ‹¹õ”Ð.Ïó꺦#ã8NÓTYBW9òé[78t¢žµp§%NOÈÓöW©×Lh´ ¡Wv¶m·Ü¨²9Y5•&ŸÆbîš½A3 ˜Žs=ò Wpx_8æzdÀ& CÛ†À#€)À#€)À#€)À#€)À#€)¨=²¼®Ï —ËEÔóTêÇ÷ß•e™R(vÍ1r–e–eY–E  ‹¢x<¤ Ä´Ëu]’yÛºõ¶äô%ý±¤WÿÌóüõõµ§¶¬ð7½ªL›¦U[À™hïïï¢m Mú£¬¼qD߉WTÆ ‹5ß÷E.ÓCk.|ßç[š¦y<­-}ð<ï~¿Ó‡ÇãAï÷ûù|´‹ÖR÷¬À\ø¾ÏX3úŸLÿs]וûh–oE}.Š‚rПUUÏç¢(ªªrG6’þŒ®êý~w§ªªÇãaÛ¶¸«UÛÍq]÷0¶A}M¶A-OfàyžçytÀù|î•éÝÔº¢Ò0f´Øy!íɾmÕå‘ÉßY–Å·Eáº.i¿5CZ™zT,M.aè®ÇãÑÿKÎÅÁ<2Y9ÿÓqœ(Šx±¾ïó°( êAâñxR«mÛüª!Ý·4¢ó:®jE|ÀhÒªíæÌ#sÛð}Ÿa¼dÚØuJÁãîBŽðš¦tÿ¶®¨4 ÅnË<Yþ@÷€|LóWWõÿ´./—&ÿ9b×úw£²­V@Ù£šï )áÆã­jÛ¶ïû<³‰›¦±,‹Ú!MÓÖ3É´Rð"çSªJWqGìˆVm7gÐ]·ôu§7¸h¥w–¡xNŒ©å¯Õw­SZ†¡±Ømdæ‘}ß‚@9{«‘ß!!|ú\–¥(4n×'§«ÁŸæpaŒÅqìº.5¦2÷JY–u]Ó3 mÛâžmÛ·Û-ŽcÛ¶[gÅq†!%6¤ÇÌéU g=2Å6­Á÷»ßqÛ †&ý!φ!Ÿä¥ ­ëÝÏ 3!ÃÐXìžè#7_’¬wŒÌ'z<Ï£Ùú,Ž·CwE!Më`ZŒ<±LqÂAî>ÍeD%ù)]†Ñe±Û2È6Ô9Dæ…Æ®®½š±·kWY––e}ò å¦wÞœ´XlWÂÇqŠ¢PžX×uEÔ5¼ÓGWõi ˜)p`&Ú†xgõOú#ÒÊ@ÄOQI~J—aès.ï‚•VQË#-Gã4»4‚ )Ë’ÖgfY™]†²FŒÌæÎºôÉ£c“¡´——Û¶ï÷ûÖÕ`g@iÌ ½æ¥Ãl]°˜Jš<2à öú+…C ¦ ¦ ¦°Åz^}€b=àì@±žJ¸\.ÜSC±žM“—5È•Rßµx™…ë•réOïOμ ®líA]0]±^6ź®ƒ  :´–òïšÎß#_¯×8Ž}ß×Àäyž$ÉÐU1I’ÐÛÛÛíFÂ`–eù¾OòctŒfc,˲Öo]×¥ê­Ü^¿ùÍ7£×=ÈÍÖ3ÑÁ?üú›o~#o÷3£<Ïo·©eAp½^Ã0¼ÝnišZ–õþþNYZHÀ¤ª*ZôñT `‰ÅurU£(âƒw]×—ËŲ,C~ðÿ¹ÂXÛ )›VkÏÒýI”¦H­ ‚€Œvdë…ùŠõÊP¬ïßþò·h©Ü*¥¾5jñ«)Ö+y5éf6äŠõrƒ+[[ß³+Ö+MQüŽ”4d¹ÎÈ ]‹“ïût‚è¦O§}gñI/ò•Í|QâÄ®ëºâ(—&— ÙÕµQyÌ¢Að‡?üËÏþõ¸ÓGÇAÿùŸÿñÍ7¿iÅâ“`«Á}#ÆX’$çó™T¾\×½ßï$ûÍË>• ^^^î÷;ÍeYÆ…úš¦!á·0 ˲|'¥Ä«†áËË ËÛae3Pòþþþÿþå/ÿyÜéÆÚFÇrkë»àt:…aèy•Emñ}_2ݨ#bd~¤eYb,&fNÓì’ËZ¹Ø‹ö›^®š }Ež‰ƒP„+ÏÓ4ˆê}Žã¸®E‘(ÆÆ>4j¹…´¤“g©jc€(Ù‹öÛÛKÖwÿ³ª*zöeì¹öÛÓŠµL‘?¨1Æ%ý[Ÿ¥²:5)Ö˵j X?͵4È»2Ê¢àœuë•\zŸÁ{}ö⑟"Û†ÜÚú.Ýn¬AoŠÍGÎÓezGS¬WÅz zýoYƒ\)õ­ç%°Uë•réçóY¬mOMt@ mpek?í‚¡ŠõúŠ)M1Ë2niAht"wëûsŒY©A.K}kÔâWS¬WV•¿<¤Ÿå¬ßJŽ#Ë ®lm}°¹ë»L‘ܽQf d†Y‹ÙéÊXÑ4ÆYwí*Šb“>0Ê#›‰˜•]ÓéÇÃ(¼-£Çƒ£²à¬Å”H¼këë˜ëÁœ@±€)@iÌ ë?9©¿ ÞðÈ` ðÈ` ðÈ` ðÈ` ûP¬oi¶B±pHv XÏ5[Iõz½B±žMS%_‚…ëÁ¦7xǼC»B%žÓ§O}äƒë{êè­˜‰t) µôLÙ‡úÌùÏóî÷{£•UÕìRŠä†aØÓX£ÖìõoÿÍÙQUGcÔš½‰ ^ɱ6+˜«ª¢Ÿ3’ý§i:Hnmb}hÕ~Q´z›äZ¨Ø:Ì£ýf b}#xg(ÖO1;ö±è‘u| ¤,fßÚØ¬¨X?½ª«áºî×_ÿ»ï7ãþÉô<ñë¯ÿ}vLŠ—¬;?݆]W™]±¾§ŽþÓŠmÅRjœ-‘\ñkëÕ8™Jg¤ÑÊŽÈmÚÉm¶ˆ¼LóÈ] þq¹°!éj’>r«SÄÃ8–eñX©õÌäû>I-Sf Í«º¦åÝàÜý±ÁëVÉÊÏÊ.£x¶QExÍØû—ª§àví‘ä¹ßï×ë•?ÑôOÀ|yyIÓ”Â+Ê1Ai²ô»c$ý†¡¸~z“"r[­€2æëëSº°Ž¬.Y–•e)æbèJþòööfYÖù|v]—÷Ï.Á-„Òâm[Õ5ûȨ"ã<˲$IÄ^ëŸ÷G>¦®ë××תª”½Ó? ‘$ É{†a¨O'dHZÎR9Dšë£(’娡XÏ&­n¢Èu]ß÷I‰¢ë0‘Õë§WuŽ1ÜŠ6\×ÕˆÓ³î¹õYÙ;ƒ*ÙGGú×_ˆsˆTUeÛ6ßÿkŸÏgj>¥¬*/¹k—R$—<ÂÊ-»ü4AN«[cÜÖû¸¹(ŠèU­8K@Îç3OÅï“ «º{ñÈ}²:‰…hB%G¦ÛÄ÷}Š¥žzd}­ä˜LŸrè€y^ X?‘¥cdš˜cŒ9Žã8ŽìI[×ZM±~zUWc/¹?šPI6·b}Oýy¿þŒ ²5Ô8)iP×^´f×®²,-Ëú䚜̈́™2~nóñÖ%&2ù½[‡qÇgùÅc꺎¢ˆº†wú†UýœÌÒT º4³Üÿ*bærÖÑ;ý+Ùêt¢«Vs}ý­€b=hCAè8VV¬ŸRU Šõ`N XÀ 4fŠõŸœ]Ol<2˜<2˜<2˜<2˜Â>ëƒ 8N|ë‡dŠõI’dYVUUš¦¤W Åz6·*ykÌÁ¢Šõ¢y]×AÐàÇñì {F78™‡ú4Ïó×××ÓéôT?RÕGÞ8H±ž-–©dì@§G¾^¯räy>âË'IB+ko·[†´ÜÎ÷}ñvÒìªëÚó<˲Ç)Ë’6º®‹»±µRsйeYA@÷ª<æ@/m5ºªY–].qœ‚ ®ë¢(Š¢ÈóI”Œkp1 ©RÔu}»ÝÒ4­ªjÞU?}µÐ>-–©R ­Õ´ ³Åz’âåzo[)ÖC×¢ùR•\éY¬,Z¿b½¬A.~®ªj} @%Óµ dMÓø¾/ª¬õ“™]±ž-¶éH-d&ÇT¬çy¨ï˜Ó E‘Øw\^U|îÑÀ¯^U¹`å=Ûª¤¦b]Û¨R È‚úÈ›(Ös•Õ¦iÒ4¥Ò X?Úɪä]cžž–h=[F±^_BUUr6ƒMØ‹GîY&z&Àì:†[E×®žõQº—–Œ½± ²a¿µð}ŸÞµ¶·ÒB·æìÇÉóœs‡^Z–E {ôV³Ë󼺮éåoÇTxžçëgWÚ Ê7æqP¡?“$á/Fò<ï#äD¯UÃ0LÓT|Åz>ŸéÍ[]×}~¶¡¯ª’,Ëø%‚ Й§ ^–eY–ü)„¤téwM·Û­çMG.‚’0M¯˜l±Œ±8Žëº¦yëF(Ö÷ç1²\½³%{ètÈ¢õlÅze tŸ+ÕÊ·â01²8eAð'àóùÜsy^ÅzåWS¦2(Ö šùTÉ)S× eÑúfÅze ÐùÔ3¥Áåg¥`¼žyë•E¨Õ.€b=˜“•ë8P¬sÅz¦¥!03P¬ÿäÌ2ŸöiGS€GS€GS€GS0H±ž)olÅzÀ!1E±ž©”p ù,(Ö³U럟"‹*ÖwI•Ö×?6S\¶„–0üˆŒÓë5µ’m@Õí†.¥¡–ž)c¬išÇã1B>Æó¼ûýN¸‚Éý~oiÄÈJ¸ütù,Z±³òjÈ#­¢.Š‚$›¦¹ßï$óDk£ù1$¹ÙÚ8‚«Ú|¬ù®ªŠ~`·IÈcµl ô¡( ®®Ip5¸>í?ÑäZuÙÉ:O¼ÜìÌ£ý¶²b½f£ò,(ÖO4»>ŠõŒ1ºñZ×’åê›ÅëIª\?®oÅ1<²l ²0¼X¸2cÀìŠõr­ºl +ªÛ–]*Ök6vµ~»›æ‘»¼Ïé£X/J̈§ËrõpÏ«X/Wu„>ä ˜æ‘G7xÓ»€úâiƶ€b}«Vz0Ä$8K©qú¾O*ˆò.½'Dz,’ådŒ•eÙs1ô¸³>] ®W\¤)xJ MÒä#Åȶm‹3†¶mßn·8ŽéælKùÇ•g¬ê'Гq Þ‚wz’$¯¯¯Œ±0 ï÷{’$újJ;†!Ÿä¥Ñ½«ï†ÖêÈ6`ˆb½|iŽò,(Ö³±@OÅz1OÁiÉÕóú°Yë•Råšt3bZŒ<®4¥%h„á•Ø—_MÇsmÿJʵÒÛÀ诿»T¬W¢³‡b½†Yë-ËâÁHžçônè’«gs+Ö+¥ÊÏ糨¡Þ_°g .[‚, ß'cÀPÅú¡µ:² @±¾?Lj‘åB”Šõôî´µ‘åêyQ )Ö‹…ð—‡P¬oæ¶ Ù”ÂðúŒlnÅz¹Vz˜ÅÞfŠõŸ‚faÅzúQ‘ò,Y®žµb½X ôN (Ýà²%(…áŸê¬Î«X¯´O Ìbo[Åz0'P¬` P¬sÅz¦¥!03P¬ÿäìzÒ`sà‘Àà‘Àà‘Àà‘Àö¡XßÚÅzÀ!Ùb½¼ Šõlxqð“GÊAâ/l1Åú–\:ñööÆK·bÞoÙ†!ŠõÊ yž¿¾¾îÚ*:=òõz•¿Xžç#¾j’$´òv»‘0˜m۾ﷺ3˲®Ë»\×íi ¦µR³ÿ‰òàÁý~OÓ”÷¯¨UâûþS逮~Sªšçùív{<EQÔu-ŠðÒ4"vŸ™¹\Ž¢HÔ¢(Š¢(ò<½Ho0"¤¥SU·Oy c¬®ëÛí–¦iUU;^ d¾b½rëû·¿ò‹´„½Y‡8}ó‘—Aܲšb½,—Þ|¨,ØÜ£8†®…Üà²6¼XøVŠõÊ ¾ï‹‚pëëÞtq4Åú®]S\Ò8LóÈ] ÞeÊâŠ|@嬩X/Ö®•¦)M‚±)Ñ•ºA‹iy®—£(ë•[èÉ›7çhŠõ ‹®:¬§ãØuÝVO­¦XOˆréìÃ#ðÚjD¬>3s5¸|¿› X¯ÜR–%M§aì5ÿ©ùŠõÊ]P¬g“x qú® tÅúF+—>W;Ì‚i1òè[ ®×†ßJ±¾+ÇÂ\0/GS¬WÅz Ccä.qú²,˲”å)VS¬—åÒéQ­f0ˆ¡ .kÛ X¯Ì±@ª¿»7 (Ö÷ç¨1r—8}E<YM±^)—Î/A7¡!ӅLj‘åWjÃo®X¯Ì±Ð|ù:ÄÃhfy³7;Ê›Ð8ë®]”Ú`é:Ëå‘ÍD|Ç­éôãa”GÞ–é±ÂÁXpÖbJ$Þµ ŠõGŠõLŠõ`N XÀ 4fŠõŸœŠõ€GS€GS€GS€GS؇b}K³Šõ€C²ÅzY³ŠõlxÚ..`$ ¿¦bý„ÉeÆW®oºLºb½2’ë2ã}Ó¥4ÔÒ3eŒ5Móx€¥êõ©ªQÌ£l b}#xg(Ö¶rå×4 é_ó?5ÂðÛ*Ö›)L~ Üe*qAׯÙëUFMUM㘊õ¤Gµm˜æ‘»|Ð7¢&åx«j„á·U¬7S˜Ü4.Š˜ÄH|[LóÈ]Çhð¦C°K_km³ÚošŠÑÀO=Þš$‘«j Kyäf#Åú(ŠäŠõS¤Ö×R’UZOër*Ö›)L¾üeô£L\ЕÍ@v»}<²†®Œ O³ÂÑëéâ»]Åz-CUÉÅa†}$ ÖÃo«XaòÑàÊÄ]Ù ˆ¡ŠõúŠ)3*(«z XߟcÄÈJx¹X0ü¶Šõ‘ÂäLj‘• >hÊ¢Y@±^™QAoÆFÅú¥0Ê#› ë?Éu5˜ì7Šõ`3 XÀ XæŠõLJC`f XÿÉi X?xd0xd0xd0xd0xd0xd0xd0xd0xd0xd0xd0µG&Ux®%¯•0jÜéX¤CŒ£&è¶±_0k±W0j‚.`ûLLLLLLLLLLLLLá+ÆXžç[WcÔu½Õ¥Ë² ‚`ë”eiÛöV—†m˜Ì ÛøÛßþö·?þñ·®ó>øöÛoÇY¿¹þüç?ÿô§?ÝúÛß~ûíwß}ç8ÎÊ×…m˜Ï Û8A; óÈ` ðÈ` ðÈ` ðÈ` ðÈ` ðÈ` ðÈ` ðÈ` ðÈ` ÿÜyžçD²ìï£ÓA»fÓÉDËÂþ>šM´Ûh4`šÎ”í64­·A¼J¥Ò›C» `\Cx 2DDÓU²mÜyF>ÔjÁ0 iP§ƒï¾Ý†¢8÷ëu†ó¢8»Äv¥J%§ää¥Rß4š68g–ó*î£Þ ûV†·iÜJ6®î]çí6 磫ªh6{.ѲQhZÄ[ M£ŠÒ{Ãl… ÉE·°Ù™b†\¥NNœ‡†s¹TêK÷\@okpÖûÞme`¶¾1jý>à1K}1Z(@U-¿^ï5&2Ôë°m´ZPÕ^³#‰·š,F5 …‚ó†5›Î›wrUE«Õ‹ÑL¦—VâM-•œ/Ow2d¹œó)úÚ¢I뾄ÜB¡oštçྊ›­õú`tz+õF¤c4}1 ô5h Ãùdy[­Voñ1í÷ÃâôCK°m§#(š±n«È=âN#f¢iÈåz5=Hwbñ*¾ šáÊÌWŒ6›½ýžÞ®„èz—ãv?©X_îdª UE&ƒfÓio* *•ÞܼoF»íL“ÉôâÏ}WšÍ^ïÆ}óD‰wúáÊD=Iº1FC0£¾ï…øˆiZ/XÝé+'5 ¥’Ó˜GÄÅÇGì‡+D˦݆ªÂ0zÓˆ&”;ç““¾9¸¯bîz+3w1zßÛø¾ó„YÖjõ6™N ;òŒÑY6QŒÚst”"†¢8‹ÉmÀŽwy‰ÍMt:h4ÐhDPO¢¸Q”¾_­lnÂ4_¶d2Nk´^‡®û<±Óib}Fï3Øéôu(Åýý}ç§„››°¬¾Ÿ x½f2ý¦PT&Ab|2h.‡\Î9?J›"šs…‚óS?–…F…‚“——½ÉÄQ{A4AööP(8çËT*½b¹œó³ëNË˸¼tö‰¹;RÅqñ«ÄN§C—cÏåœGÝWDh€·2IH§ž·ù¸±S‚¾N=RDývøJ•l›×©§‡)•¨ëxRשO¥œüòåíÑ!Ú¹¢…+Ú³ATfb¼N=ÅRLÉwQW€ˆâÍ=J!†Î !l%×4:ќݦâ©È+?ŒQ"")wvê-àt’%Hõ•˵ADƒîŒÑS`ä ® "ÄN=‘Æ(‘Æ(‘Æ(‘Æ(‘Æ(‘Æ(‘Æ(‘Æ(ùñŽíË;ÿ|cŒÅZ°C¿¦©¬­µ;QÔ ¬­¦~Ýbˆ1JD}LÓÜÛÛ«×ëÊèIs¹œaº®›¦u}£7í›@ Hk€uWù°”çï°Í¨WÑÜp3T½kLà‰ Ãˆz "3¥¼Ü*`ŒÑñógŒô¥RòLê:aŒÎ…g¨ûôyNÒЯÅt €Ìmp$ò'Þþ6¶Üö& ë€Ù?½—÷ œ{·t¢i¸o_~˜¦it]wïÏ•iìUúÓp0Ç–ïßî"ÜLhŒNÎýRQ€p×õp ,àuijä3T˜çý¤ÓˆÑ°{øÈ@aty(Üî,n|Í®à¾Ttà¨3Cij¦•¡Âü&éö6=ÝUÕ³pT¹Û!Õnó Ú7ªy¾'šžCI¾åFÿ—ÊÉèµ!¦ u=pßhÂIî3[ÌÙ~Òiì9yye¨=åÍŽa£ÊãIt`ñv Ôo ù–kÀåm¡äFÏö8íÿÔl­Š™é¶C½æp?i臘/ /• ûò45Áe¨0oIÊ%š/Ag¨0WIÊ%š#ád¨0?IÊ%šaf¨0'IÊ%š ág¨0IÊ%J¾¨2TH|’2F‰.Ú ’¤ŒQ¢$‹C† NRÆ(QbÅ'C…¤&©lŒž¿‹z î/ûKÔ5 ^Ü2THd’²5J”@ñÌP!yIÊ%Jš8g¨°$eŒ%Jü3THR’2F‰’cV2THL’2F‰b¶2THF’2F‰’`3TH@’2F‰fÞìf¨0ëIÊ%šm³ž¡ÂL')c”h†%#C…ÙMÒi\t4ËB>›ç_ÓD¹õ%E’2T˜Ñk‹£ªŠ|pqZ »»Q/1ÑŒíµäe¨àMÒ/_¾ˆ…¹À;õÏž¡XÄù9ªU”ËH§ ›E>Z ÏžÀñ1òy‹ÎSLÇÇÎsEÓ~wKK¨Õ°¶Ö› Ñzþü¹išÿú׿þûßÿ&/C·wÿý÷ßÿùçŸ?ÿüóÎÎNÔ•'ØÖ(€tÅ"Êe¨*¼ïx6ëÄå?àì µšSnš°,œáìÌ Sͦ3ÙÒ #êuF‘ßÿýèèÀçÏŸüñÇDf¨ðäÉ“G]__w»Ý—/_v:¨k4Nà1 àëW,,à⢯PU±²}­KMƒaàÓ'œŸ÷M¿µ…tº>XN4?~ýõ×ëëkqÿóçÏÿøÇ?¢®QP^¼xñíÛ7wI···£®Ñ8ÇèÍ qxÕêÝÓŸaw–åßsO§Ñ톾’ˆbàùóçÿþ÷¿ÅýŸ~úéììì×_ºRA9::zóæÍãÇÅ¿ïß¿Íðx Ø#õ[[ØÚòù×Ý¿9|GÓàýá­û›SY¢¹õüùó?þøc{{{~ÔkggçoûÛööö‡ŽŽŽbxÔ>ŒCL2øÛ&šs¿ÿþûo¿ýöÏþs>3TÍÒׯ_¿zõ*†]{ž JÔ“B*ê* ùø?ü ÿ•mØ~n krØÁ"Ã_ãŽ5*ðGN4¿”¨+@w™%"Š-Æ(‘Æ(‘Æ(‘Æ(‘”b´\vÎDº×ÉlâdP"¢¸‰ FÏÏœïÅ”ˆ(VÂŽQÑõžsãœ/ŸÍâðÐ9ûÓ-—pŸåžJD!Å$® ààÙl_kôøÝ.ÎÎÀ0`XXpFn°±Më=K ðœÏcc#ê5GD „Á·²â —7¬VCµêœ;/†wkY>£êml ›E­]w.ô´´õ*$¢ùlŒš&j5ú¨à†yiÉi™žŸceÅÿYé4¶¶œ+å¹™KD•`cTÓ ªÎhÍÙ¬O|m †]G:íì=8@µ:²™yu…Z͹t3Ç%¢ÈÞ©W²ÙwxèsÀ]Óp|ì$¬HÆ~€¦¡ÛÅêª3róñ1P.cuŸ>!Ÿï“”ˆ(B!bZZêßÀPÍ++ƒCâûŽÜÌÎ;ÅÓ œÅÄ‘›i&u€M ¤€5Àº«|XÊówØfÔ šàÖ¤ ,‹ÀžTg F‰f’\mÀ*À:Ð[>¹° œF½€¡ hMZÀ>ÐZ@Ð^AÆ(Q0NãvÐåP¹ý*-£Ô-£‰zéÂК< @P0^A^D„(0ªç¾6¶Üm)À:`öO? ØzéÂÄš¬xî磊׎­Q¢ð¶ŒJÀeÔõ™]÷]“§À2€þT½'Æ(Q0”þƒ›·ÝÆQåû·GK6Ç-™CÁ­I8êR Æ(QP ÀþíÞ: h…Ñå p{´¤4¶G?‡Z“&ÐN¦°£™1J ¸¼=Ö¡õÛƒ!¾å¹-침++­ÉKàô¶Ýš‚Ì¡yˆ‰(*мOye¨ki{þ{ø5ägM@k²"Û—w±5JD$…1JD$…1JD$…1JD$…1JD$…1JD$…1JD$…1JD$…1JD$…1JD$…1JD$…1JD$…1JD$…1JD$…1Jµ;Ǻç`øñ&;Þhö—¨—€hzìÐGñ4MS×õz½žËù0Üh4Ö×× ÃдY?ü5!¶F‰"#2Ô0ŒQ —ˆ¡ëºiJ\˜‚ÄÑáfèÍL1®ëî}ŠÆ(Q&ÏPIgŒQ¢°Ý7C&il1F‰Bõ° ˜¤ñÄ% L† LÒbŒ…D>C&iÜ0F‰Â0­ ˜¤±Â% Üt3T`’ƇlŒž¿‹z îg^Q˜‚ÈPIl(¸ ˜¤qÀ% JÐ*0I#Ç% D8*0I£Å%š¾03T`’Fˆ1J4eág¨À$ c”hš¢ÊPI Æ(ÑÔD›¡“4|ŒQ¢éˆC† LÒ1F‰¦ >*0IÃÄ%’· ˜¤¡aŒI‰g† LÒp{I;ËB>›ç_ÓD¹õMOœ3TÐ4WÄ Z°­QUE>ƒ”˸¸@­†j5ê%&š’øg¨À6iÐïÔ?{†bçç¨VQ.#€lùÌI#t˜Û,ýðá»ö“‹ Fv6'Ï¥ u:W¯^½~ýz~¡ÃD³ôõëׯ^½b×~BüÝ(EãÝ»TÔUðqp€túïïÞý=ä×ýåûÁÏ bMþå/øßÿÅ,†¼äɬÉ‹¦Sxˆl»»¸¹ÁÍ3àH6‹ÃCÿ—÷>ÑÔñ¬9z€bôâÂ.OðŽÁ||Œn×§ð/qŸC×r"¢8¼S/F¶_Yq†ËÜ1˜76°°€jÕi¸W (qÇiÞØ@6‹Z ºî\èiü°{DDA 6FMµGŽÁ ô ü´48*ópI:­-çJyšÖ»úQ$‚íÔkÊeÔjØÝíë‰[gèÚ ÃÙé9ªÄëê ¦‰bkk¼Î(E/ðN½¸’ÝÕ•Ó,ñ'Æ`G™¾~Åñ±sE¦|Þ¿ÄU­âÓ'äóHâh;D4“BúÁÓÒR/øúZYÐ~¸·ƒ<Ýy)'"¢ñ,&"")ŒQ"")ŒQ"")ŒQ"")ŒQ"")ŒQ"")ŒQ"")ŒQ"")ŒQŠ˜e!Ÿï hš>'_LK¹ìœw¯QÀŹË3!Ì•Éñ×]ŒQŠ˜©KœÛvqáŒÀóóÁ“è&á0a®Lr1F)zÏžáê çç8fæ€3l®8ÛC7a®Lï477ƒës¸dæVæ„£±jÝ®ÓYZB>r¹o?ÚÑ=ìv±ºŠÕU<{ÖÛ©'†_[s~å3baÅ_w>4?b¸µß¹©{7Zo%‡a¸$¹©QõwšÍf&“iµZív[UUÃ0ÄC'''¶m—J%UUÛí¶øZsŸè>ªiZ»ÝnµZŠ¢´Ûmñh¥R±m[QÛ¶ONN …‚x!qÇå;sEQêõºmÛõz½T*Z¢J¥â>Ëw†çùA!˜¡­}ÂM} Ëà»PÉ}Œúþ+î”J%÷-<99ñMœz½nÆÀmÛv7&Û¶›Í¦»a L–ÉdÄ ù¾Á3WU5—ˆÑjµî\¢1‹0<Æè<˜¡­ý›ºï"ø.TòÄ´SïÚßß}ÍÍÍÎ…išëëëFCQ”á'v:·\UUßiär¹ÓÓÓÓÓÓB¡pç̛ͦ¦i———›››º®?x6J¼ølíÞD‡aÌB%G´)ޱßφa ñÕZ*•DÇÁ;Ípkν“ËåD7§Ýn‹n…ïd'''ªªjš6\±á™†!êàíXZ¢1‹0<ŸÈß Á míØÔ}Áw¡’'Ö1jÛv©Tq/¶’‡Ä—§ªªªªŠ‹ûh³ÙÌårE{ˆ|ço{öìxùÎ\ìèóµ—g’Ež¢(»«(yfhkŸdSw7Zïü‡a¸$y’seo¿æ^ÏZ[[kµZAÌœ( ÜÚc%îûF'÷€7Þ4ÍåååýDÓš9Qp¸µÇJrZ£pyy)z.D‰Ç­=8s£DDò’Ó©'"Šc”ˆH c”ˆHÊÿU,œ \Ó'— \section s_where_theme Thematic index. This section describes the documentation which might help when addressing a particular type of problem. \subsection ss_where_theme_all Documentation common to all problems. Some information is common to all tasks in Clipper. Most fundamental are the coordinate types. There are described in the following essay: \ref p_coords. The most commonly used classes are clipper::Coord_orth, clipper::Coord_frac, clipper::Coord_grid and clipper::HKL. All crystallographic tasks depend upon the spacegroup and cell classes, so read their documentation. The cell class is clipper::Cell, and the spacegroup class is clipper::Spacegroup. You may want to look at their parent classes, Cell_descr, and clipper::Spgr_descr, which are used to initialise the classes if the information is not coming from a file. If you are going to need to perform operations on coordinates, then you may want to look at the clipper::RTop_orth documentation. Its counterpart, clipper::RTop_frac is the base class of the symmetry operator clipper::Symop. Often, the parent classes of a class also contain useful methods. For example, the coordinate classes are all derived from clipper::Vec3, and the operators are derived from clipper::RTop. The clipper::Util class may contain some helpful utility functions. The clipper::String class is a trivial extension of the STL std::string. You can use either interchangeably. \subsection ss_where_theme_hkl Documentation for reflection-related problems. First, look at the essay \ref p_develop_hkl, which describes how Clipper handles reciprocal space data. The fundamental types which hold lists of HKL's and lists of associated reflection data (e.g. F's, phases, etc.) are clipper::HKL_info and clipper::HKL_data. clipper::HKL_data is a template class which can be used to hold any kind of data. A range of common datatypes are provided which you can store in this object: Look at the derived classes of clipper::Datatype_base for a list. Alternatively, you can add your own. Most common reflection data conversions have built in methods. Look at the clipper::HKL_data::compute() method. For operators to use with it, look at the class listing for classes labelled clipper::datatypes::Compute_*. Scaling of data is also built in. See clipper::ResolutionFn and the examples on that page, and the derived classes of clipper::BasisFn_base and clipper::TargetFn_base. \subsection ss_where_theme_map Documentation for map-related problems. First, look at the essay \ref p_develop_map, which describes how Clipper handles real space map data. Crystallographic maps are handled by the clipper::Xmap class. Calculation of FFT's to and from reciprocal space is build in to this class, as are interpolation methods. The clipper::Map_stats class provides tools for calculating map statistics. Calculation of maps and masks from atomic coordinates is handled in the contrib package by the EDcalc- and MASKcalc- classes. Filtering of maps and calculation of masks is aided by the MapFilter- classes in the contrib package. Non-crystallographic maps (i.e. maps with no symmetry or cell repeat) are handled by the clipper::NXmap class. Non-crystallographic maps may be referred into a crystallographic frame using the clipper::NXoperator class. \subsection ss_where_theme_model Documentation for model-related problems. First, look at the essay \ref p_develop_model, which describes how Clipper handles atomic models. The clipper::Atom and clipper::Atom_list classes provide basic support for atoms and lists of atoms, or you can use the more advanced MMDB or MiniMol packages. To calculate structure factors, maps, or masks from a coordinate model, look at the SFcalc-, EDcalc-, and MASKcalc- classes in the contrib package.
\section s_where_task Task index This section describes the documentation which might help when addressing a particular crystallographic task. \subsection ss_where_molrep Molecular Replacement. Rotations are handled in a generic form as Quaternions by the clipper::Rotation class. These may be converted to and from Polar angles, Euler angles (24 conventions), and matrix representations. See the clipper::Polar_ccp4, clipper::Euler_ccp4, clipper::Euler, and clipper::Mat33 classes. Rotation-translation operators are handled by the derived classes of clipper::RTop, i.e. clipper::RTop_orth and clipper::RTop_frac. \subsection ss_where_phaseimp Phase improvement (Density modification) Filtering of maps and calculation of masks is aided by the MapFilter- classes in the contrib package. Data scaling and sigmaa estimation can be performed using the clipper::ResolutionFn class and its related classes. \subsection ss_where_refinement Refinement Agarwal coefficients for calculation of refinement residual gradients may be generated using the clipper::AtomShapeFn class. Data scaling and sigmaa estimation can be performed using the clipper::ResolutionFn class and its related classes. \subsection ss_where_modelbuild Model building FFFear-style translation functions may be calculated using the FFFear- classes in the contrib package. */ clipper-2.1/dox/map_p2.png0000644000374100011300000000430610736662154012420 00000000000000‰PNG  IHDR|1€ûEIDATxÚíÜ=nÛJÀqð«ärÁÊ¥J#u _ @J7{žÅ•JB70|Bܪ.Õz\2 Þ#wÄyÑr9 ÿSäs–?ŠK.9ðâÔ‹}QÅþ”Š:>RÏXÝ>Ì[“ø–z€Æêö`ÅÏ8¤Ÿµº=˜²M,ÓÐZÝÌ®MÜ¥ µº=˜m›¸M;@ku{0ůH;@kuƒ0kç#OîWLPw­„q_t¼¿××äùŠ«Õ4u¿8-ŒÓ}¥ó\÷uÕäY«œ|ëDÅ$s€Öê/×u¢â²s€ÖêoðêDÅVÌZ«\Ô‰Š[ó˜´V7¸ˆô‰šÅ\ÌZ«|ìà5Ëÿ¨4V·sÚûDÕ£¨4V7s,+éh«î"”·ðuæ 0ÀŒ<`€ùŸ0?òÍé©yÊç3|<åß›ô?9mþýÉý½ôɦyÄ8´µj{yà“ÍD0›¯¶aBƒN3QamÞTã`€`€¹Ö<ÖJÀüa0væ˜üµI|Þê¬`òÅçWŸøúy1°Ù÷jÕ¼y.«Ë«ŽG=Àîñ0S|~Ìë¿^Ïnm“ewwY¶9 „.Ï?ÀÞñ0ã‡ö÷£ÂeážT;4°Çʼº`ž÷ëÚñc¼ù4äòžåÍóì=F^óM}ìC0§×›ÅâÓy—êi7xþ$Ñæ5Çã¦<¬ÁÜ<tŠÞµí¢w÷1òªx –ýø±˜í¬?©j`ªC÷×M5ÏÓsQL¾ó;•”—ëd“oìVÃô’”7x©.×f`ÔK‚D7xv`Ԝْ Uam0À 0À 0ÌTyæß+c,Ï< s 0À 0À 0ó€™*Ïü’cyæa˜cÌÃÐ熡ÏW€¡ÏW€¡ÏW‚¡ÏW‚¡Ï÷ }¾ôù^iŸoìSD›×[Ðç+ÀÐç+ÀXëóµtU¢Ï÷2˜™-"`€`®$Ïü{%`Œå™‡aŽ`€`€f0Så™_c,Ï< s 0× CŸo†>_†>_†>_ †>_ †>ßs0ôùZïó½h‡/ }¥éó¥ÏWc­Ï×ÎäKŸ¯£ÞàÌ–© kó€`€ó0S噯Œ±<ó0Ì1À 0À 0ÀÌfª<óK`Œå™‡14ÇKçÊcz˜pÝñaÂu0û¹bŸ&\w|˜pÝ>ÌGá‹Ô0BÝÑa„º}˜·&ñ-5ŒPwt¡næP¼¬W«õKqÚbÜ—úRݱaEÓ­Ûƒ)×Ëe–-—ër`‹qÛ@ĺcÔ-L§næyá|¢[<ìoÜÆ!±îØ0»fwæýÖ5‰î6J ™:Oª;6̶…Ùž‡Ù,ÛÄe”¦CužTwl˜¢­[œ‡É|âÊ9—EiSUçeUÉÕpÝèí¬Î× Át‘ Ø;•~÷¹øTêä1ù¶0\®u—knð$– ‹H †Ç ª$m 0< æša¦Ê3ÿ^ cyæa˜c€`€`€™ÌTyæ—ÀË3à 0À3o˜¸/ë/ͳ¹½ãÒ<30±‚.ͳ½…ìÒ<+0Ñ›£ÿ²ÒT0Ýœoþˆmªñ½í4¿¶ÆÜ©deŽaò`¸\K0ÜàI0, $‘À 0³‡™*Ïü{%`Œå™‡aŽ`€`€f0Så™_c,Ï< s 0À 0ÀðR_ CH†Æ¡0Œ¹V³Ø;¬†éüß\s¢ÚY¯æ{àÇ’ÀXo™gòò¬Àp¹–`¸Á“`XH0,"˜ùÀL•gþ½0ÆòÌÃ0Ç 0À 0À3˜©òÌ/ €1–g†9`€`€ÑÃðR? CHÆZãPìVÃtþo®ÕÌ Œ¹æD+0´³¶09ÆÜ©dåªdnòµcîrm†< †%Ã"`þ@˜©òÌ¿WÆXžyæ`€`€`æ3Užù%0ÆòÌÃ0Ç 039–ΕÇô0áºãÄë`ö…sÅ>=L¸îø0áº}˜Â'©a„º£Ãuû0oMâ[j¡îè0BÝÌ¡xY¯Vë—â0´Å¸/õ¥ºcʦ[·S®—Ë,[.×åÀ#·¨ëF†)[˜NÝÞ’àyá|¢[<ìoäÆ!mÝØ0»fwæýÖ5‰î6m«™²nt˜m ³=³Y¶‰Ë´Í‰Rݱ瘢­[t`ºí¬>ñ‹s.KÛΚU%W«~ݱÛY«ŠÕî*aÖNS‡F“çaœÓÁÄŒºæz¦þJס8•êPœJš<©îFyÚün¿âÍåÚï¯ær­É“êŽ ³kaº—ëÐ ÞÃîïÛ7Ý ž&Oª;6LÙÂtoðBK‚j6R- ò\·$ÐäIudž9´0CK¿¨ò¡YDF ¡îØ0RÝàcšÇQC¨;:ŒP7ø ª Õƒª¸a«nà½Ò±št6ㆭº‹ßÙÔÂ<ÌèsŒ‹© k!€!€!€b:˜¯›ÓSó”Ï?=öñT¦ Ÿh|G‡ùab÷Ï|¢ø}2£ÀLSÖ~#0B#0B#0B#0B#0B#0B#0B#0B#0B#0B#0B#0B#0B#0B#Ä?_’bSYŽDù fphidata( myhkl ); \endcode Next, we want to open an MTZ file. I'll assume it is called \c my.mtz . To do this we create an \c clipper::MTZfile object. This is an i/o object which can be linked to an MTZ file by an open command, and can then fill Clipper data objects using the information from that file. \code clipper::CCP4MTZfile mtzin; mtzin.open_read( "my.mtz" ); // open new file \endcode When we created the reflection list object, we did not provide a cell or spacegroup, or generate a reflection list. So we'll get those from the file now. \code mtzin.import_hkl_info( myhkl ); // read sg, cell, reso, hkls \endcode Now we want some actual data. We read a couple of MTZ columns into the data list we created earlier. \code mtzin.import_hkl_data( fphidata, "/native/CuKa/[FCAL,PHICAL]" ); \endcode Note that we create the data-list as a child of the reflection list \c myhkl . (Actually, any descendent will do). The import operation will actually move it, by inserting the appropriate \c CCrystal and \c CDataset objects, according to the information on the file. Note also that we give specify the MTZ columns by giving the full path: crystal, dataset, and column names. The column names are grouped in square brackets. (For older MTZ files, which do not have crystal and dataset entries, the dummy names "unnamed_crystal" and "unnamed_dataset" are used.) Now we close the MTZ file. \b NOTE: No data is actually read until you close the file! \code mtzin.close_read(); \endcode Next, we create a map. For this we need to provide a grid. The grid depends on the spacegroup, cell, and resolution, which we get from the reflection list: \code clipper::Grid_sampling mygrid( myhkl.spacegroup(), myhkl.cell(), myhkl.resolution() ); // define grid \endcode Now we make the map itself, using the spacegroup, cell, and grid. \code clipper::Xmap mymap( myhkl.spacegroup(), myhkl.cell(), mygrid ); // define map \endcode Next, we calculate the map by FFT. \code mymap.fft_from( fphidata ); // generate map \endcode Finally, then map is written out to an output file. \code clipper::CCP4MAPfile mapout; mapout.open_write( "my.map" ); // write map mapout.export_xmap( mymap ); mapout.close_write(); \endcode To summarise, here is the complete program: \code clipper::HKL_info myhkl; clipper::HKL_data fphidata( myhkl ); clipper::CCP4MTZfile mtzin; mtzin.open_read( "my.mtz" ); // open new file mtzin.import_hkl_info( myhkl ); // read sg, cell, reso, hkls mtzin.import_hkl_data( fphidata, "/native/CuKa/[FCAL,PHICAL]" ); mtzin.close_read(); clipper::Grid_sampling mygrid( myhkl.spacegroup(), myhkl.cell(), myhkl.resolution() ); // define grid clipper::Xmap mymap( myhkl.spacegroup(), myhkl.cell(), mygrid ); // define map mymap.fft_from( fphidata ); // generate map clipper::CCP4MAPfile mapout; mapout.open_write( "my.map" ); // write map mapout.export_xmap( mymap ); mapout.close_write(); \endcode \section s_incl Libraries and Include files Which header and library files should you include in your application? The libraries are as follows, and there is an aggregated header file for each library.
Contents Library Include
Reflection, maps, models $PREFIX/lib/libclipper.a $PREFIX/include/clipper/clipper.h
Function objects (e.g. SFcalc) $PREFIX/lib/libclipper-contrib.a $PREFIX/include/clipper/clipper-contrib.h
CCP4 mtz/map i/o $PREFIX/lib/libclipper-ccp4.a $PREFIX/include/clipper/clipper-ccp4.h
SHELX phs i/o $PREFIX/lib/libclipper-phs.a $PREFIX/include/clipper/clipper-phs.h
cctbx interface $PREFIX/lib/libclipper-cctbx.a $PREFIX/include/clipper/clipper-cctbx.h
Alternatively, you can include individual header files from the subdirectories of include/clipper/. The precise header files can be identified by the following include tree: \image html include.png \image latex include.eps \width=10cm */ clipper-2.1/dox/class_overview.dox0000644000374100011300000004226610736662154014312 00000000000000/*! \page p_class_overview Class Overview \section s_classov_intro Introduction This page contains a brief outline of the types of classes provided by the Clipper libraries, followed by a more detailed description of the different classes.
  1. \ref ss_ordi Ordinates include Miller indices (clipper::HKL), orthogonal and fractional coordinates (clipper::Coord_orth, clipper::Coord_frac), and grid coordinates (clipper::Coord_grid). Grids describe the storage of 3D data: The basic grid class (clipper::Grid) describes the dimensions and indexing of a 3D rectangular arrays. The unit cell grid (clipper::Grid_sampling) also provides methods for converting between fractional and grid coordinates, and the map grid (clipper::Grid_range) describes a general sampled map, which is bounded by lower and upper grid coordinates.
  2. \ref ss_crys A crystal is defined by two main classes: a unit cell (clipper::Cell) and a spacegroup (clipper::Spacegroup). These are complex classes which store derived information and provide optimised methods for handling it. Two smaller `descriptor' objects provide a more compact representation for storage and transmission: The cell descriptor (clipper::Cell_descr) holds just the cell edges and angles, and the spacegroup descriptor (clipper::Spgr_descr) hold the Hall code of the spacegroup.
  3. \ref ss_data Data objects hold the actual crystallographic data. They include reciprocal space data (clipper::HKL_info, clipper::HKL_data), crystallographic and non-crystallographic maps (clipper::Xmap, clipper::NXmap), and FFT maps (clipper::FFTmap) The primary design goal of the data objects is that they hide all the bookkeeping associated with crystallographic symmetry (and in real space, cell repeat). Data can be written to and read from any region of real or reciprocal space, and the unique stored copy of the data will be modified correctly. This is all achieved in a computationally efficient manner. The data objects are templates which can hold data of any type. In the case of a map, this type will usually be `double' or `float', however in the case of reciprocal space data the types are often more complex, for example `magnitude and phase' (F_phi) or Hendrickson-Lattman coefficient (ABCD).
  4. \ref ss_io Input/Output objects are used to record the contents of an object in a file or restore the contents from a file. (MTZfile, MAPfile) The crystal descriptors and data objects may be used as stand-alone objects. However, the data objects are related to a particular crystal, and may be related to each other. In order to facilitate the organisation of information, all the objects have `container' variants.

\section s_class Classes The classes which a developer will commonly encounter are as follows: \subsection ss_ordi Ordinates and grids:
  • clipper::HKL Reflection/Miller index. Constructed with 3 integers, h, k and l. Read-write access is provided to these members through the h(), k() and l() methods.
  • clipper::Coord_orth Orthogonal Angstrom coordinate, defined on some unspecified coordinate frame. Constructed from 3 real numbers, x, y, and z. Read access is provided to these members through the x(), y() and z() methods.
  • clipper::Coord_frac Fractional coordinate, defined in fractions of the cell edges. The coordinates are therefore not necessarily orthogonal. Constructed from 3 real numbers, u, v, and w, being fractions of the a, b, and c axes. Read access is provided to these members through the u(), v() and w() methods.
  • clipper::Coord_grid Grid coordinate, defined on some unspecified grid. (Ideally this object should define its own grid, but these things are used so frequently that the overhead would be unacceptable.) Constructed with 3 integers, u, v and w, being grid positions along the a, b and c axes. Read-write access is provided to these members through the u(), v() and w() methods.
  • clipper::Grid A generic grid definition. Constructed with 3 integers, nu, nv and nw, defining the size of a grid along 3 direction. Read access is provided to these members through the nu(), nv() and nw() methods. Methods are provided for simple indexing of a 3D array stored as a 1D list (Like a multidimensional local array in C, or a Fortran array with the indices reversed).
  • clipper::Grid_sampling Derived from clipper::Grid, this class is used for a grid which defines the sampling of a unit cell. Constructor as for clipper::Grid. It provides additional methods for converting between fractional and grid coordinates, and for reducing a coordinate from anywhere in crystal space to the unit cell (0-1,0-1,0-1).
  • clipper::Grid_range Derived from clipper::Grid, this class is used for defining a map grid. The map grid need not cover a unit cell, and need not be based at the origin. It is constructed by two clipper::Coord_grid's, representing the lower and upper bounds of the volume in 3D space. Methods are provided for simple indexing of a 3D array stored as a 1D list.
\subsection ss_crys Crystal information
  • clipper::Cell_descr The cell descriptor class (clipper::Cell_descr) contains the basic information required to describe a unit cell, i.e. the cell edges a, b, and c, and the cell angles, alpha, beta and gamma. It is constructed by providing these 6 values in order. The angles may be given in degrees or radians, if they are less than pi they are assumed to be in radians. If they angles are omitted they are assumed to be 90 degrees.
  • clipper::Cell The cell class (clipper::Cell) is constructed from a cell descriptor (clipper::Cell_descr), but additionally contains derived information, including the cell volume, the orthogonalising and fractionalising matrices (for converting between orthogonal and fractional coordinates) and the metric tensors (for computing the distance between points in real space, or the resolution of a reflection in reciprocal space). It provides methods for conversion between fractional and orthogonal coordinates (frac_to_orth, orth_to_frac), calculating distances in real space (distancesq) and reflection resolutions (invresolsq).
  • clipper::Spgr_descr The spacegroup descriptor class (clipper::Spgr_descr) contains the Hall symbol, which uniquely describes the spacegroup. It can be constructed from a spacegroup number, a traditional Hermann-Maugnuin symbol, or a list of symmetry operators (not implemented).
  • clipper::Spacegroup The spacegroup class (clipper::Spacegroup) is constructed from a spacegroup descriptor (clipper::Spgr_descr), but additionally contains a list of all the symmetry operators, and tables for looking up inverses of symmetry operators. It provides methods for returning symmetry operators, along with other information such as the point group and Laue group. Symmetry operators are represented as a 3x3 matrix and 3x1 vector of either real numbers (Rsymop) or integers (Isymop). For integer symops the translation components are scaled by a factor of 12. Both real and integer symops provide methods for transforming Miller indices (sym_hkl) and fractional coordinates (sym_coord), and for calculating the phase shift associated with the symmetry transformation of a reflection (sym_phase_shift).
\subsection ss_data Data objects Reciprocal space data The reciprocal space data object is divided into two parts: the first part (clipper::HKL_info) handles indexing of reflections and information derived from the Miller indices, and the second part contains the actual data. The reasons for this division are that it is common to have several lists of information for each reflection, so a single list of Miller indices can be used for several lists of data. This also allows the use of optimised tables for looking up reflections, without wasting space duplicating them for several data lists. However, if reciprocal space data are stored which do not have the same list of Miller indices, it is quite possible to provide several clipper::HKL_info objects, one for each list of data.
  • clipper::HKL_info The reflection indexing class (clipper::HKL_info) contains a cell, a spacegroup, and a list of Miller indices. Reflection data is most commonly accessed by looping through each reflection in turn, and so the reflections can be referred to by number, or by coordinate-reference types provided for that purpose. However, it is occasionally necessary to refer to a reflection directly by its Miller index. For this purpose, a fast lookup table is also maintained, allowing efficient access to any reflection. This operation may however require searching through several symmetry equivalents, so there is still some overhead. The overhead is reduced by using the appropriate coordinate-reference type (clipper::HKL_info::HKL_reference_coord), which stores the last use symmetry operator as a guess at which operator will be required next. clipper::HKL_info is constructed by providing a clipper::Spacegroup and clipper::Cell (unless the container version is used). A method is provided to generate a list of unique non-absent reflections to a given resolution (generate_hkl_list), or alternatively a list may be imported using an I/O object. Coordinate-Reference Types are provided for looping through the list of reflections (clipper::HKL_info::HKL_reference_index) or accessing reflections by Miller index (clipper::HKL_info::HKL_reference_coord). The latter is optimised for the case where reflections are taken consecutively from the same region of reciprocal space.
  • clipper::HKL_data The reflection data object is a template object, where the template type is the type of crystallographic information to be stored in the object. It simply stores a list of data of that type. Data types typically include several values. Examples include measured X-ray intensity and its standard deviation (I_sigI), structure factor magnitude and phase (F_sigF), and Hendrickson-Lattman coefficients (ABCD). Data types are derived from a base type (Datatype_base), and should override all the methods of that type. This will allow the data to be automatically transformed about reciprocal space, and imported or exported to a file, as required. The class provides methods for accessing the data by index number, by coordinate-reference type, or by Miller index. The last method should avoided for speed critical tasks. The coordinate-reference types are typedef'ed from those in clipper::HKL_info, and may be used interchangeably with them. However clipper::HKL_data provides an additional method (next_data) for accessing only the non-missing data in a list.
Real space data
  • clipper::Xmap The crystallographic map data object is a template object, with the template type being the type of the data; usually double or float for maps, or int or bool for masks. (In future a specialisation for complex data will be available, with a complex fft method.) The map object is constructed by providing a clipper::Spacegroup and clipper::Cell (unless the container version is used), and the unit cell sampling (clipper::Grid_sampling). Methods are provided to set and get data by grid coordinate (clipper::Coord_grid), however it is more efficient to use coordinate-reference types for this purpose. Coordinate-Reference Types are provided for looping through the unique map grid points (clipper::Xmap_base::Map_reference_index) or accessing map grid points by coordinate (clipper::Xmap_base::Map_reference_coord). The latter is optimised for the case where map values are taken consecutively from the same region of crystal space. Methods are also provided for moving one grid step along any of the cell axes.
  • clipper::NXmap The non-crystallographic map data object is a template object, with the template type being the type of the data; usually double or float for maps, or int or bool for masks. It contains a finite bounded grid of data with no symmetry or repeat. A rotation-translation operator allows the grid coordinates to be related to an arbitrary orthogonal coordinate frame. This will often relate to the orthogonal coordinate representation of a portion of some unit cell to which the map is related. Coordinate-Reference Types are provided for looping through the map grid points (clipper::NXmap_base::Map_reference_index) or accessing map grid points by coordinate (clipper::NXmap_base::Map_reference_coord).
Other objects
  • clipper::FFTmap The FFT map (clipper::FFTmap) is a map used for calculating Fast Fourier transforms. It can hold represent data in either real or reciprocal space, and transform between representations. The data is stored covering the whole of the P1 unit cell in real space, or the L>0 hemisphere in reciprocal space, however the crystallographic symmetry of the data is maintained at all times. This is achieved by setting every symmetry equivalent value when writing to the object. When reading the symmetry is assumed and only the requested value is returned. In general it is not necessary to use an FFT map directly, since one will be created whenever an FFT is required. However if data is being transformed very frequently, or if very fast random access to reflection or map values is required, then it may be beneficial to use an clipper::FFTmap for this purpose.
  • clipper::ResolutionFn The resolution function evaluator is a class for the calculation of arbitrary functions of resolution or position in reciprocal space. It can be used for the generation of Wilson plots, or for the calculation of simple likelihood function such as sigma-a. It is a superior replacement for any calculation which would previously have been performed using resolution bins.
\subsection ss_io Input/Output objects
  • clipper::MTZfile Import/export class for MTZ files.
  • clipper::MAPfile Import/export class for CCP4 maps.
\subsection ss_refer Coordinate-reference types. Coordinate-reference types are provided for accessing data in both real and reciprocal space. Data is commonly referred to in one of two ways: -# by index into a list of unique data, or -# by 3-dimensional coordinate. The coordinate-reference types are designed to make switching between the two forms of reference easier. Two coordinate-reference types are provided in each space - one which behaves more like an index, and one which behaves more like a coordinate. However, either may be asked to return either an index or a coordinate on request. References may also return other useful information, for example the HKL_reference types will return the resolution and reflection class of a reflection (i.e. centricity, phase restriction, multiplicity). The coordinate reference types are as follows: \code clipper::HKL_info::HKL_reference_index clipper::HKL_info::HKL_reference_coord clipper::XMap_base::Map_reference_index clipper::XMap_base::Map_reference_coord clipper::NXMap_base::Map_reference_index clipper::NXMap_base::Map_reference_coord \endcode The index-like reference is simply an index, and a pointer to the parent object, which allows the corresponding coordinate to be looked up. It provides a convenient way to access either every unique reflection in a list, or every unique map grid point in the asymmetric unit, in turn. The coordinate-reference type is usually initialised by assignment from the `first' method in the parent object. It may then be incremented by its own `next' method. Completion is tested by the `last' method. For example, if hklinfo is an object of type clipper::HKL_info and xmap is an object of type clipper::Xmap, then the following loops could be used to access all the data: \code for ( clipper::HKL_info::HKL_reference_index ih = hklinfo.first(); !ih.last(); ih.next ) \endcode However, if the Miller indices of a reflection are are required, the reference type may be queried directly. Other information can also be obtained: \code HKL hkl = ih.hkl(); int index = ih.index(); ftype s = ih.invresolsq(); HKL_class cls = ih.hkl_class(); \endcode Similarly, if hkldata is an object of type clipper::HKL_data, then the following will loop over all non-missing data in the list: \code for ( clipper::HKL_info::HKL_reference_index ih = hkldata.first_data(); !ih.last(); ih.next_data(hkldata) ) \endcode The reference types in real space are equivalent: \code for ( clipper::Xmap_base::Map_reference_index ix = xmap.first(); !ix.last(); ix.next ) { int i = ix.index() Coord_grid coord = ix.coord(); } \endcode The coordinate-like types are more sophisticated. They hold a coordinate and a pointer to the parent object. However, the corresponding index is also stored (if it exists), along with the symmetry operator (and in reciprocal space the Friedel operator) used to obtain it. If an new coordinate is assigned to the reference, then this symmetry operator will be tried first, providing a significant performance gain. The differences between the index-like and coordinate-like reference types can be summarised as follows: - index-like types can only refer to the position of a stored datum, i.e. a coordinate in the stored ASU or a non-absent reflection in the reciprocal ASU. - coodinate-like types can refer to any possible position, and therefore also store the symmetry transformations required to get back to the stored data. Generally index-like types are used to loop through the stored data, whereas coordinate-like types are used to interact with data stored in a different way. */ clipper-2.1/dox/clipper_hierarchy.png0000644000374100011300000002520010736662154014732 00000000000000‰PNG  IHDRÂsÆBr§gAMA± üaPLTEÿÿÿßßß___???ŸŸŸ¿¿¿&&&ÖÉVä8tEXtSoftwareXV Version 3.10a Rev: 12/29/94 (PNG patch 1.2)Ý.I IDATxœí]ËcÓÆÖŸ±2R´SN`§˜Ò’à„î¸ôëÝMbäÀnBP ;0Ý…ÐB¿KoÃõûÍŒÖûaK–ìú×ËÒèhæçÑ™×9gX`(pe,Tíë.Xp.æœaÅÇ3Zyìb_:tí|[0œþSïÔsçû.Àˆ£ÒÁðÿŒTÇ‚áÉAÉÜí(“æõÎ ø"p €pìà·£MñìæõÇÇŒô¼þ쎺}³`8Í(Ãoüø×O@¼FßJCò+”Möõdyðí>c‚Õû}ü]\0œˆþ×  ¬È« ®° VT!ÿŠ¡ª*’Űb¼ÅŠ´`8hÆ”aŒ›ïÚ;œRÚÒíßßß;‡îЯX8é¾²>EZûÇÃy@™;²õð€êaLõ0í­m¯7v;p=Œ¿¨Û o}éì,ôp.ØÝìPØÐu=t çÁbLW6 —ÃecI·`èyp\u¶gê30ï«ÎÀ¼c8¨:s£ê Ì;*¢dˆ Q2þ®:óŽ…. %\6J¸d,ªpÙXTá’ÑÀéi˜ãÍ]. %Q2í\ÙXŒ6JÆ¢ — Ru欫V† |ªÌ,™Ë±H{j!ª œµæ´•èLÏ̽œ]C†—Ù^Zè+sã¨éŽŠ9J¡€L c_éÓÿ×Ö>;ÃÐ'd ­«++«¡„ – óΰŰï¼ðR0íÃ&qV†}§®Ì3u†}§î¨Ë #Rè8g¨3ÃVO"Ša 9ôÆðS€Ì‰^#ï8ÃTçL½&ü/Íã¹NµDóv/tÜ%ÓSbûàݾy{Î,Oà®#nHÏê½Ns?úŽ!Ò÷šú¹š˜´ø}Ýô2,ö’çD ÏOô®¡ãµ×¯s†÷¨xù\k·_wk̰U@IJF^¥…¡:[§ ºµÚP°ÂrÏÎ#»¶laÀO¦2Œ™¬ŠVí8°¢àx{–‡C’&DazXƒ',cLˆr 1†BÅ#ðíú!AÒ‹ú2l7à ʰ² Á' 2†©–øÓǰÒ@ ò1,qKd­ZEo~ä2|9̰ÄÌðe þ*gØ Œá7L<],=DOû³Àp[`Zâìïèp†_ ïöö÷·5ܾ¬¨‡¯ñ)¿°Ÿ•aíeŸ6Q[àE§-!‡aZSñ'ÍØe¸ÓÕQ[ìp†—©,EÚdâÕÆ7Ñ×%µ¶ ÛÓj´Ì;Œá|ÒøÖaE¡½µÆ®¶½ðÒ`|=x,®·èQc¨a0ÈÄðÙcÊð±ÖÜØÙôL{kòº·¥ËR‡wn(ÃGš¾†ÖUz«¢°_K¡Šgõì1¢¯ÚÕwùì³VW†9 §]W¢Y£Mœéš¦L#Wjû™fäÅà#0ˆn¥ƒÀ‰º1LìÏŘ®,8cÁpY öç‚á’ :J°B†Õ‰„„P3†Ý:Ï$áÝá´f/­ÞZʘ.[F¬ž] g/#–@§i¦Í)&…Iªá‚nÄúÑåT3pY/5e¸ Þë nÿP©Õ¨¯VoW/q’AH¥µXÔp\eí„jŒ±Û¼ [;× ÔÒÂKé¡¿òDƒƒ½ ¢"WèÄÊjq >vÁkÍÙWˆ³¥Ì”*z ´²ZìôÕF–ÁHû @\ëÀÞó.RÆŠÿ”‚Á ÉÁ°ß B:ú vøfŠʘUµ3Nnž¯þ,2†_Àˆaäœw‘Æpà”‚%ÍÃðu¢ˆ°<Ò­—[æß …᪚—Ö‡Ç2Ð Š„úê)¦ª«‡$ΰ Z4šx^Y³)›=Q-rŸØe6"JÀ.\Œÿ·‡úÄ è5–8Ã]ËU:U ,n'9 ”@ˆ=©zØÄ@25 ‰§© W4 tm}û«C[k¾ûy‡Ç_YiÂ߬Š(àÎÁ@KÚDþÚúÙŠ¡-F.¢Ó ‡Vtt†»ä$Ü´Dyþ‹Q„6Hl« ·ßS-±Ù]Bmi°¬|Ñ?£T†¨bBÞ©»#Ë@f„Š ŠW)ü4«Ã†eTÊ,w³åççO»øf?[‚D3Ì,à•p¬BúKY§”žlZ ¥ß¦ÿvs0Ì (8¾'Vî™ûB*ÃUÌlɾ_¤ýe;Ò>×ÛÃOi~Ê| èùßßâÆ3š ÀXÓuv‰iÓv  †=ŒÀÆi‹þÛÊÃ°Ä ølùôºÖØf®b&Óªw£Î"å·½GÖI³w®lëað‘<Õ™÷Qgÿ9ö»„&mv»=­Ý¥©hÁÅ^\Û˜j‰î–Þk²wÀêKBfàôƒ.ø»}¦fgØv•Zêö»D¡¿žÐîªFû€f#ÃÓ_b°ûjÄ=‘>=1-Ne0_XIzás>í…O<ɰמ‘6ž+©#Ž(†¡Ï>rZ O{àaÕaO_|~Çt¦¼Rf=ΣœjͰØ{žET2ÃÒtU1e¼ÃÉ &iIhSZ@ž²*ŸXÃrš ¼e¯XÃÓÔVíõ2\pŒ”lâî3ØÀÿY^ÃÓ4â ×ÀH"ƒ—A‘c…)βñs’%ƢкÛ >F±ÍÓô,üCj¸:\Ò:kàSx¥{Q´ÀpýP—PžŽ‹¯SªVhŠÏÊŠ¨1W ó5SZÞA-Ú9?ÂÆ'¥dq:F*¬ºÔÑ0`|RÎ[6í8µS<·²¨ ©)&ÏzM¦Í½ÃqY9œ‚š0@ÍŒÞøÐë‘í§`£Rc%á@–XÕÊïO jØ“¡Lßβ+1SÃuìIø1˜ÜË ew'˜‚{Yò3&Ë$s=)EzÉ­®Ïˆ9®G9Ú‚”!Ô+½þ ÷¨”%Ìrg€pí{‡àbâÔøQ&ò,ô$ü¼(~ ¨Ì·XNèI ìæïÉ™Pg´a%úô¥¨œ9(±±Kê gïÄ¥,MN¸šm>À”§' ÂëÂ0–Æpiz‚ NfØ¿û@ãèw뀕ÖÓYöï@ÐØe«Æ¡¬Q‚¼…ç +¾›Þß1¹é¬´僒ùÇ-«ËI*ÈbØwê™jGn„À[–L û™Ö”K†½TÜ?¤ÇŸ9ÃçêˆáÌ9¡¬öž$ýxÈŠÉ Isc§ îBnèéõgwÔåYY¾9"ÿ¤¥ÒËÛ<.sG_Gëêúï@a‚ž]ŸuèçÒ§Kòà h®GâÍ B+?V0ü•õà1úA¤Zæß«šõkí¬7Žˆ¼z¤¹Îˆ’ŒŠq’BV\qæk üŒÛQD+xãB²"•# /áC'ãØâRgäô@wè±,m^ï]&"Q‚|T€€Ã}­Ó}üžÞ`û_YÁw:Ãí%š'$Ü —¤'H Ãl÷ækàì>ð•k¼®mŸYÊ÷í¸û‰€á¾ruzl{5)ЏKÁHûâÃÜ´Eƒl3k—!V‡7t‹a…å‰þ¸ÎŠrôI“3†[”ao¢ï"gø’ªOåâ>þ¾Å¯#ùµ"ßK5¼¦—¿·ÃïO¥' îWwIÄk ^˜°þ~6¥È:ìË d“P†èh￵ÃT?ázxIã hžü2–Hj’ügGiŽm=¼Écã#Ú—XÊÖm‡GÛ§ ‹kŸ¿eÑÃ;ßìøø¢¿±»F[&Ìõ0cøÍ­¹Iˆ/ƒT1†ŸPYT3χ_í¾øë˜Ùª-­Ó<‰wöÝGça£pȉR³ûdìÇÅÇ· D "Á4V²Œóæy.COÀ°Ï;`†G&›Ñ û3˜Â0 Ùæb¸MÄÒ€1<¢À»Äa9¶{mLä Úè3Lap.Á^a¡q »äé¡£ ñ)¼ÄWüªç:lkBW?ëuµ1ŽÓµ“éàB7£q³R‚uxEНª^¼c“¬R‡_ÿzÿ§Εñ&q/òD/x±£9ðY$ƒ*cøËl{o$ >ÂícXPÙžà {Ø8?[z9&Ãq½áI4Þ$ä(8Ì–1Ö`ëÖš½n}øŠqÇ[ºåkÆð;¾'8xpýU:^n­ŽÇpô|‚¹•ŒÔmfKñDR˜w>6áhD$ !p_7‘hšÀ}ýT†#ëÅX/9áË0é°sSŠ3K†5?©8‘‹áh/§±^GvS9Û”YÙ)Çl¯ô1õËU¦{KrÇxþÒŽšwhEœKÅOÃÛ^YãœÛ’üAKg8ê­ŽTH‰sM °"‡Æf)ç¢O`kàæj9QSËUØÜZÔx#š©ÄfF¦0œ#K<«—œaÂ4† (‰i(NçGtb„'2l…ðJ´ÍÃV¶¦Åpq:?‚áá¶y¤÷Ô›;¦3êLy gØ£“Í5²$ÌúÝ’¥`[Ö‹, Uø|ÆÌî¾HÀàuCÊ&‚oÿm^¶= Q†¿Ñ:²Ñc} :ä`XGüéð]d;ìÀþ}s†_6(+&«a'—·W+ÒSÆÊÉæå£e0¡L|` S€ü³tí½ÖâÎfO,Y ¶em‡dYÈÈp ¹3'Íšc°dëá#Ê0Íü›ö¹|œ©ïl0-1€O¨Ƭ;ðè®J‰°ôð׳GceiðΟœÑ­ÃNµ¢zøßL¯#íì1d/ѯ¬/ÁeÙ²>‡dYÈÈp¡‹­þ5ºÄ·Ãûš†¡¥K¸;œîp'ÐÒvÒ¥V4¯, .tþÃ? Káx$1|ì„:é>ÞzkNÖRŽ“e!Ã…NáÉ>ÓòdÏôäQsʃ&Ó™.T û»)¿]… {LÈËg¸X“—<%ÿ! lØée8ͧR†IÖe”b n|‹)«—Fb@’4Ý%ef×Dý¼£«ÏïãKŒEÁž^Þ8þÉ¿]9ËoYåhR’™vÁR=?Xr3Wf4Ä 3\´AÆèI¥É# É ±Or°(ÔdË‹¢7Á=Šß1Á0. ~j~Èlvg±h#m…Ǫr£tƾÕê_ƒeï·ø)ìIQ¼A†û®‘˜ë_~¯à²4D©ûPļuµ¨ÀÀÏð¤>7 (¾ »ž˜L×…`0ðT®òjpñ±[o_ØŠ=R¿×¡…s0b¸LwÛ¢]mšhÇüÊ;h^ˆ#uVb»PÂfÈ#~˹¾¬¿tèéÖ2óEŠ9äžÆáÚ*§mp8mˆÃûsûQB¡ùºš×‹éã‚â Gù¯(ÃÏ(¼ö^Žê0Ue ÷'ƒãÓVfÞHB9›#{>qx;Q€‚ò€Ê4·QŠb´”„[k­S+…M-)ñå+‰[Gǽ–·™È„°òU¦.):ù­wbçM²…u¥°tW™]ábÄ„v7þ“ÿoán‚á|Ž]›óf!þÕ8^‡å±E  ¨±FÊbdü*aañÖ²Kòµ;òÈÇ ëƒBHd˜$]Ì^<Ó[H¤‚ûì³u R6ýì§žk8QF¬$ ¢1}â¹à ûµ°õ Ó—¬Õ£R0„Ÿ–ØMĹ˜Äpaû5‡Ã¹£ø™}î= © û{3WdÛ*ñÈÑWöKâ!ŸF'WA(cßê §’6ÅMÿªºtŽÖp.®õ ¯¡4xÂv¦#ײ#xy *?(„á†6:iQÁ¿:šwBmQÃKèŒá“/#:GoK<Ã.ß{æ_ÛóÑÞoêÙcðÑ´2½f”i_\ÑÖÿOindb8(‰1üÀ´#‹ +TšÅ;ýÄ>‰_}Pã?*VôuxÜ9êÀ§ ZVoþ¶èDð Y»vÝg¸ÀA3W¼O‹GðÆ=ãÏl-?Øàûb—°L—Ñý5Ïè³uã*­/«÷ûV”r\¬"° 31”ÔÔávn0ËõKîÑàvÙ˜9ئ’ï¬ô¤3òk» UëÙº~ n¿; › ’É¯Ö q 7ŠœŽ`Å“hñVäUë™H‡@Å’ 4>º‹Áߣ‘}ãCÜxëDÚo1ôŒ $q=|èFÇg4[|¶$ìY&æAú¡]Àà9×ÃWªÍ0•U;Kq jènú€›ïÚ‚Åðð¡£½z¼­±Ç9<7"ûÆx+§Hã»E÷²3”ÄþèaX¸·Ïêð(3rĈ€>ˆæœj t…»ø‚;8-Â#†…½s놆‹u÷(Á0_ì4˜>[ŽMʾHû_¬HûâM•Œ %q†—5>Xá SiÖŽNfn£f¾ о5ª‡Ù­×MÎ0èpaœáÆnǺ!†áblj)óSúEDÚÏ.ÉÛ—ø;‚ˆQDùŒcèç<[‡ÜÈ™ºÔ1]ôÈkw™‘áHIº~:úâ¹L_ä°Uºó 3F‘†Ì,#. à¤3:jFÝVȨ¹ðùæex¥- a¸ðɺÙdXDÕµ".~®v)hnôt׊¼§g¿1ñ2rJ긷 Hß è–!£ÀÃeG’çȃÑÂgJŒ“Ê0HÖŽo:@ç´£)ߎv=–ëɰœ°Ë$a§³¤þ7| ¡ud8–‹‰ïN©¤C:ü7†Ã[Ï]r7øz™û4pôådŠfd_ü#ËP°VEëˆÉòx95«›áPöµo6¹u¢xEÆ„• 2Hb9E/{V¢>Gq™Å"“Ì)Ú ‡ß©~ÁXãìKâÿ.özÚŽ”çÆ…áðvÈzkµµÐV·ÉÍËscŠÕ–<‰¼Z½fà‰NÛòqà„1‹~q*ïUøß­‰íòcÖÊÅÀú§ü«5ôçjR»|¹Ë]¶ß«)qfRumžØý¼, ØØbì€d¤\å>ûC@¢åV5úXxfLÆ–2iÏnr¸68IÓýÓì@Žžéð)–zM rxÈM{©¦ôÖ±i_fS•ã7•“¤W ‹\ÂSòïþ™`ÅÜte\ˆvÎHÙeÉå°t°õr¥Òf‹:)Þ ÿb¬Ý&½ïlã;[áª=¶DŒqÚ¸Ÿ3Œ| ¿‡@v=fx ƒSGx0_\×ÕÓ:ˆõáÔ•ø:™‡eŸ6Q[$.ÃB†ÅuÛèåÈhw ¾ÑŽÞU!zsÔ¬ÄÖ/Ql´åjðÁúpÔ\|Œ\ȶ­“ê“ͱ0b*! f aÔ°ý‡ž»þC"ÏL ècˆÌ–í JŠ÷P ý@ìOW‹íE÷ 22ìø»þCÇjã`h¼ÅL­‚ùeO1ù˜N‚òÚØÛ>£ Ÿ"1l;(ybØÑ¼Ä=Óí,‚aK¯YzØöÚý v¿tÃÌAÉJ< Ë¡3Á0G6ÿ¡9bØ|Æ™&Âd#ó O²ŽóòcŽŽÚ’ž”ò¤ü£æ9±?=Ê¡œâýcvÊâ »_Ê`õË0±?½ÚQ,£€\†þXÓ»|¸œºÁÇ,ÁUÀÞŠ[…‘°ìÕÕ+j|È¡þ…L=# Nüˆ9˜Só`:`nÑ:ˆÃyäØí ¿öŸ~J90(63¬Š½^Œ½âìÁÕU$±’jD+¯£ˆkÊ{ç @i%Íû™Ý%Ïy¡8v^­Ôˆ¿I = û`V9ש–xz w ¯½Ì<[lèû[<ã1^3ºÚ¶nϰø=Þtò˜4S*±b kð„ö+V¥¿±Úº…¹Õ$`ÇJ£«`R‡³ôE\8í«î?z·ìfêápåò7.¼#TÿëÇ–Xt|ƒ¿cßèO°¥yÞR†Õd†Ç²—@á¦wL³íª­½½7Äp{‡2Üéê¨-vO´¥{÷rŸÙ¥jLK0†Ñª!’ŽˆŽ;£ {§Yü!S˜ÒÅ69íI=€%€Æ è‘Ö)­>`yÇâËSfP˜Î0ö¾,pžêÇ:Ò‡¥žŠë&Wh-ª ðfRlwÕ& ¾ûë/0O!9×LïmUÂ[q‰÷‚SõpLüxï@.þ{÷¤6w5øf]p½+[ƒà8…Ÿ$ 7Á;žÅK+…K(öÞV%ä˜ãâÆtaOøA0Ø=[æRóäèfiíè›ôǽ#|äüš¢57áW[”ªí&mš×ð_ßÔåk¶M MÀ÷¦‘6GúÎ8¢ÿ®ïÜ,)£Ûª…Uo‘ dØö28ÃÉHhr´Œ¸+$0P—ôÁ&é/¿}F°S‡¹ ómÃmÄ~ûèÖ)ÐT¯ÃËXÀúý÷Íøy§>uØW ¯&.aTÛSF?åd0†ùÞ^½ ¬^¢~Ö¶{–?Ýy°ÿÈuØÎ?´ù]Ñ5K%4ðf3†{ôº8çÿŒÞš^#†}ÚŽŒ‹d8à)Ñ€1|¥Ò:üÜ삦ٕß~Æt<þ܉ÒÞì:¼ÿ¡Ã˜^ ¦ò_ÖTH uøë’Šè¿oÛ?Öˆa_<µ&×@!é”ဧ ”4ÆðñÊÊR³wçØ¿óJúôöˆØÞ·‡Õa¶Üí«Ä4£;Œá|Bõ0Ûê§qÔÊ>c­¬hGúÙgM¦ÿ®¾ïܸïfõ û[ìýcxÊp À²B<—ª”|ƒôº1\‚¹Ï¸¾HCÿ×ÙeøçµIáòÇõ2` {D3:¦Áj[|%—a¾ZçÉÎì2н…kâ‰ö¼S3ÌpÉšxl†Eÿ‰f8‡¢í.3nadÁÛ´ñh?#MŒr rqÊPð+†Êì.ƒ°–=+3f.râ×Ê`/,“J3Q ‚”Ö¤ÛÙš 'Æ€ê-Å54?luU“ÜL† MUE®¡8‘qꢵ&A¨GS‹B‰ù´k ªIDATÁ`D³ŒP­ƒ­£Ëp5~ªÅ"\g«ÚgÁäjàdfb„o tñÈ/©Zk2DØÀWO±×ó«Âlƒ¨Ñ{å¾VÞgÏ®5€ðîÈlLÿ{Ö}‘ËÉ”wÃ[©*?ÕÂÒtUÚÀÛðo)\›ù’1QG†åÀâÀŒSœßËÀNËc80Ö˜qŠó{ŒKc8Ð:Tæm] ˆÿ+³½$ÑÞþÿ2ÛËÞ)Àßd¤ÕCFëŠ%¹ÀˆàþÕÔê0Š<5CÔf?üÞ±–Ö)Ù_n?¼|ª@ÁÇSdÔ 9>Ò½ n¸—kÅÝ*8UKÀT“¡Û¡ –° s#UícàGŒ—Á2Ÿ]/ƒO?ŽÌ gÎA ¥¶ Ì‹:¬ƒŽ²·|‘õn¿K àív÷~û@ïnî‹„ÚŒa=UKX›¦øÊªëŽ«‘u{RŽÉ0òYÁã4(L ÝRï—x ámÇ>ÊÀ°?‰âÎHrçR_Jþ÷*Ê žY_ú„ù÷ø¨Ñ6ðñ^Òªó%Ql$ÃÐs1Àð(ö ó_¯ÃåØÀ³«Û7Tßuôu´®®ÿh»ù¬ñ›ºûøl ÊŠ²»ßh–Og!Ìðöºãgð‹ëg 4ž-­KŸ0•:j‚] >"î-µB)6ðìêw‘õJ~=•þÓ½fö4_hËûƒÃךxFF`ƒÐäÖ™ÆOC/ÃA âï+€7~„? ÷®ŸÁ#­Û}vø+•ØC2¹„÷÷–zŒ e8èû¨46 PҬ_ÂnªÌº@9hø´‚WÀÀŠ ÁŸªÊ­àt­H´©»¿«Ú Cu ‚º2ì©2…2ÜþÑïû¨€çÛ:ÚGæýxsLëðÞ6´,Œ}Qˆ!í6­ô–ŸÁÉÈÏ<7Ä7& Adê {ûõeØ£÷ò8$ÇH¡¼íp=¬ékT³.ž–÷~S¿ž}†àÍ™Hõð›aߎփöκãgðËÈÏ,¿¢zø„ÊhüaÍÕÃõeØß'.N ï÷ùSŽV´(Ã-Ïå1¬àëÇp¶ cé@ÀYfæÇt%¬êNİ·¿6 —`8ÓùÔ‘áâ+ñ‚á _ÓMÙZɃãÀOŽ¥1Là‹.LHÙ„|šà ϽOõYoœW†ëS¤çï\¡6Á¶l#øFAU£.QãìlJ3Qjbû1Gn!Ôƒb‡ÚZd¦hDï:e8 Ï£&µ0ŠvÕ©0%¢ú ù¢÷Л'TMñˆØªsRªÚ“ÃqfÝ>+yŒÄÊÊÄhQdÖ-à#Pxxä¹£¸n Ï_kgÙÀûf°·Û]Õ>t8EüE.aßÒé,gG!ÂË ißú,•aâû6gŠB [›ÝÐÓjgkð—c¶!Üw”£/%2ŒÞ2W+Þ(åRÇëepF˜kØ¿¯­Òëo¦Çð|éâX/×~( ©6𹌇í«•ÇàÌnd eýÞb ¿?•ž4Ø^à™ºó“yÉì%1óEº•Y7ÞGÈó!J{¹Š-ÍÎ7ÛÚL´¬Í¤£¯ÿjÌÖìŒi‰íu é~œì%G:Ú‹KœaÅ—æýSú#V\ÝæH·6ËiÙ|—8ø,¿šP¼ãhlÜÛ\¾+n–žd/ƒe›ØJ72(HcXÄ@_VcÅÍÃY¥\ÇXÑ»[z¯} ÷°ÔØ?@úÞÛºŽQ[‘/ÚÌ«‰ŽgôoƒøE‰mLõR—<=0tt q'*ê=]Û½6teÍèÒzÑ<ü1Ìôð 8VWš,é=pÖW!Ú…ôMP˜WT·(Ã'ü}‘-cwØ/ŠÙÓSͯhôâ‘¶U.nKÅý×§vx^-Ïáºʰiïe`m¡ô@,nÑ®Ÿ F 3~q¢›Á€Þ®2†¯±¬4ø2<§â¶À³SÌb÷«ŒaÄV–kÎpaÝNw?w/ƒå“G-ÜÕŽ¼µåS…ùˆ¦0Ãu8à&`2Ü×:ÝÃW\C°–îå#ˆŸ›…“''*GîíŸ"Ü|Ws† ƒ=Z‰O{°¯±–èGŸ\´îª¡Šú€ž0¥šÂR -_/&#}¯ ›ð´ "¸¯«TìßÓ?ƒþ‡ônè&zin’ÃþHû£9;é¿*pRD…ðñƒ¡t#Ñh]õ$þG1œ a†½jb¾Æt…aÁpÙ˜áq½(9þ çê”DpˆÇ•ÚÉYÀÆ\Í ×sµ°QKÌ©]`@ªÎÀÜc¡‰ËÆ‚áÒ±hëÊÆ¢­+¤ê Ì=š¸t,4qÙ¨›êüb¶c;ÏjŠc¾0·ÞHõÁB—ŽE-.‹Ö®l ¹êçÛ9}‰²™7NUÄ‹)öUîEÓ©#_ï(½<©)2. I¶”3Â0ô­®¿>K]ïo‘aì%GZ_<_³.¼¿XQÏ}U@:ú*iÌÏ$GŽªFdÌõýP Yöz(hžo™Mä³pò­—[¦æ7“ £ÞM(…±^~¡z¾åŒÝèOn„õ7^q3Áð¹~Å,Éa÷¢Md‚1¸«Âƒöþ¶N`—°¶ð Ýô^Ûå1’šz…mÂ!Ò÷šú¹š˜Ð=okÆ>m-ÊÄ^ºÏOy®³ÐæK]CÇkÄÄÜ1õX;ïîµ{ôÂŒ0Ì,Îñ*„ÌŽ[CÿKcÎ]RóÕ ~[ø¼µÂ=ïÀå01†˜Â=B RÑ*ZYá 'ì”"î‚UÄy“‡´KäYC@‚ãéǶEìÓFágfwÙÜÇôøn¢s€Í¾öŠ2ŒO›¨-p¾ ÆðͱJuHÞÆÀ‹3îŒÀfwɉÜÏ[:tMnš]zaF{TYnxA `üˆ-`"tÂNQ¥Ñ©ßo覡òò´Œ4=Ü"ôæ>Ù<OFà&0q«enžðšiõ°ˆ‘Ä6ñ`;ça*£aœˆ*x‰i6õûôÂŒ0ÌÕžyýøÌ$38PdÚ|æêNJ%nX¤dÊQÕ¨ë˜.kÊÃ!,NÄ‚áüX0\6ФÎèißÑú3¼@2þÍ’Ü®üºg8tIMEÒÜâOzIEND®B`‚clipper-2.1/dox/Makefile.in0000644000374100011300000002515311372264333012576 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am, passed: dox, extracted subdir: dox # in dir /home/cowtan/clipper-autoconf/clipper-2.1/dox VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = dox DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ccp4.m4 \ $(top_srcdir)/config/clipper.m4 $(top_srcdir)/config/fftw.m4 \ $(top_srcdir)/config/gpp4.m4 $(top_srcdir)/config/mmdb.m4 \ $(top_srcdir)/config/utimbuf.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AR = @AR@ AR_FLAGS = @AR_FLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCP4_CXXFLAGS = @CCP4_CXXFLAGS@ CCP4_LIBS = @CCP4_LIBS@ CFLAGS = @CFLAGS@ CLIPPER_CCP4_DIR = @CLIPPER_CCP4_DIR@ CLIPPER_CIF_DIR = @CLIPPER_CIF_DIR@ CLIPPER_CNS_DIR = @CLIPPER_CNS_DIR@ CLIPPER_CONTRIB_DIR = @CLIPPER_CONTRIB_DIR@ CLIPPER_LT_VERSION = @CLIPPER_LT_VERSION@ CLIPPER_MINIMOL_DIR = @CLIPPER_MINIMOL_DIR@ CLIPPER_MMDB_DIR = @CLIPPER_MMDB_DIR@ CLIPPER_PHS_DIR = @CLIPPER_PHS_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_CXXFLAGS = @FFTW_CXXFLAGS@ FFTW_LIBS = @FFTW_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMDB_CXXFLAGS = @MMDB_CXXFLAGS@ MMDB_LIBS = @MMDB_LIBS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = ${FFTW_CXXFLAGS} library_includedir = $(pkgincludedir) EXTRA_DIST = \ class_overview.dox \ clipper.dox \ clipper_hierarchy.eps \ clipper_hierarchy.png \ container.eps \ container.png \ conventions.dox \ coordtypes.dox \ develop.dox \ develop_hkl.dox \ develop_map.dox \ develop_model.dox \ donors.eps \ donors.png \ hierarchy.eps \ hierarchy.png \ hier_rep.eps \ hier_rep.png \ hkl_objs.eps \ hkl_objs.png \ img_container.eps \ img_container.png \ include.eps \ include.png \ installation.dox \ map_p1.eps \ map_p1.png \ map_p2.eps \ map_p2.png \ minimol1.png \ minimol2.png \ minimol3.png \ wheretolook.dox all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu dox/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu dox/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: clipper-2.1/dox/hierarchy.png0000644000374100011300000007407710736662154013234 00000000000000‰PNG  IHDRˆVe÷û/w¾IDATxÚí½pW~àùZ¶eI7#¤g4Ô‰¤ŒéÈž…´×'úfVά¼L~äe±£\*X¡nÏã‰,éÌ9·&«Á5µ"2pIÝh…K$tR“,Pw¼"¤d‰)Á— çÈÎŒgDÜɕƉ¶#ÎØ–úþøŽ:ín ‰ßÝ |?Åb5º_û}ñúûÞ÷}ß{ÏóAAmð¨Ú´,Ë2 £¶ºÇétZ,µ¥@Q™}j Ð0 ò¬ÚRèlÜ ‚Øcn ‹…¦iµ¥Ð…BÁ`0Txr P[^AM€=æ&BQ!Än·7<çH$b2™(Š¢(Êëõ …:…¬‡’8<< þà‚ mæ¦ã÷ûë¹\nt†afii‰çyžç C$©'Ã:O.ù€,ËŠ]õ4A: 4Ì ƒeY»Ý½Xñp©Ýn·Ûí.—‹¢¨žž0¢ò¯× × N]Š¢"‘H¡P:µp Ãá°Ñh„Dš¦ý~¿pw!CyŠ!˲ÃÃÃðU¹ÇN–&LyRà|!†azzzàB»Ý^®¸A:©¿ßï÷ûm6[,ãy>“É„Ãažç¡x¡œ…¯ŒF#$ŠShš¦išçùl6 '—Ë)™.Ü}ii r§Fø*‹)ßE.X¹Ç,'¤pÉd²Ù,dE‘äe¨¶&AÔ‡âqsÝ@×0 J “¢(žç¡›+|%$ŠSü~¿xD¬ ø1&“)Ûl6øñÌâ»—¼…8Eþ•ü.$‚™L¦’Yòrñ˲Á`°P(X,ÈS|”!Ð!‚ +»aFÁÙ+1†­d2)¸ Å)ƒ:¦ù|ž¦iᜒÐ4ír¹÷/Ã0ƒA¸»p yŠ€Åb¯öô!ËS~Lìv;MÓKKK0&]s>‚ mŽÚ]övܰ™LÖÇ0™L†ÿ¤+:¸ƒü·’”|>ït:á#ø‡ùRÞ`á@c6 à–ß½œ<üCÿ9È`³ÙJ>œ,L![ùåâ!F ~ÿ÷_œº²Ate7€=ݰrgo9rÇ‚®lA]ÙN2™¤>Iµ¯ëÏAÀ•¿:pe«›‚ "€=æV ·[hÉA’`¹1TZüá‡$—{ðÔSØ’²,n-… BÐ07ˆ[VæƒÈÚÚýwÞ¹¿?éëÛÿ©O©-´Æ°X,•#‚ HÛƒ±ÁMgcc{aáF4zstôi·{Äá8¡¶D‚ ˆvAÃÜDR©µPèÆòò-·û·{Äl>¦¶D‚ ˆÖAÃÜ8nËç‹mll»Ý#n÷ÈÀ@¯Ú!‚ úǘÏÜ\baáúùóg¦¦ÎtuT[ADO an$ÐQ.w¯];gµ©-‚ ¢?Ð07ŒPèF(tÝíÁŽ2‚ R3h˜ÀÆÆ¶ÏÇpÜæü¼ ƒ®AzÀ•.ê%M]ìê:˜N¿ŠVA©ì1×E4šöùbóó.·{DmYAv{̵ƒVAi8h˜k­2‚ Ò Ð0×ZeA¤I a®´Ê‚ Hó@Ã\h•A¦‚†¹ Ð*#‚ Í s¥ UFAZÎc®e«Ì²,Ã0j˨{œN§ÅbQ[ŠJÑ©ÒõUÈ è´ü›GÛh!Øc®„=ûÊ Ã°,«¶˜úFwïY=*]w…¬€Ë¿y´“f‚=æ=©Ðƒm±XhšV[XÔ¡jt§t=²º+ÿæÑfšE°Ç¬DãÊEBìv{ËD"&“‰¢(Š¢¼^o¡P¨-°jx:á’úï®eT×>ÐÞ…\Žæ>EQâž:(Ân·SŸ$ˆ?º\®znZîA:S¹æ²4*ÚËï÷×s¹üµË0 Ã0KKK<Ïóæ™gfÔ.E­>°¾¾ Ãx<eÙ¼^¯Çã1r!…»x½^HaÆëõÁ# vüâ/þbOO$¶A}Aö€GdärwŸ¾råf…çûý~¿ßo³Ùb±Ïó™L&ó›ÏPÎÂWF£Å)4MC;›Í ¼¨õ-¡dºp÷¥¥%£Ñ(ù(¾Ðh4ÂW±XlÏ[H+÷ŒÊÂHòäóy8€2l±¢ëA"°ºÚWÈA|¾Xæ\îîÂÂuç›}}/ jjåß²Â.‡,K>ŸŸ,¹PÈ\AHžçc±˜ÇãáyÞétf2ƒÁ‡óù|6›Íd2pf&“Éf³ §¼*é®ú ÊPüß/"06vÑlwVx>4´ƒÁ ¤0)ŠâyÚÚÂWB¢8Åï÷ƒAáBxGˆÏc2™Âá°Ífƒ)¾{É;–»uÉ[é@@,˜8[…JÞBùº}:Šå¥ ËË¡•Ú'„”ËAœO Èçù'Ÿ´./¯qܦ<óóçϨ]®•òÞ{ßÊ¿e…/dâõzN'Ã0áp¸\…b&™L†ÃaùWò”ááᥥ%»ÝžÉd@§à¾öûýN§“¢¨L&  …‚Åb*»¸ž]UDteK™›KBffÕ^h4¡z°,+w'BN2™œâƒÁ-ë|>OÓ´pNIhšv¹\‚ËŽaƒÁ Ü2”|_n±Xà«JæWÈSxFyQÈïÞ®¨«ýªrè}Zí2k-+|1‘HÄé,ÛvgY6‰ˆ-¥²6›ÍårA†ëëë'“ÉÄb1!jÌn·Ó4½´´TçÀ9¢Ôî²k‹x|åøñéÕÕͪ®?R&“ þF£Qp@ñ[ÄÐÅ1 àÎ’¤äóy¨“àÅ‚lI)ß/£Œƒ\X’»Ë….`³ÙJ>‘p#‰`åžQ‚ÂÝyž^…âçÒ/N"°ºÚWÈ”qe««›W®ÜœOL\Ò¯+»•…`Â%_‰—† ƒrÝÉd2äáÈN,ƒ˜2£Ñ" †/~ñ‹f7#èÊnSЕýlll]œžvT†½§IÙ‹…úâ*X;Ú×]!×ÿ,Ú)|eX– ƒöѼÒ@ôº²ÿç²Ãq²Ó–ÂN&“’)˜ÕÆ|ÖŸ‚t2Á`pxxxÏo¤sÀ•¿~BÍCËz¼Ùêæ€ 8¢Õ–Ñh˜ !$‘XFÓW¯žëê:ØŒüåv -Yç€ÚW,|D a&Û>_lzÚa6«9å(åJøà’ËÝöÙGÔ.u`YVw{ãÔ¯ôÖ ¬»BV~}•óh3Í"h˜0´¬0kbOîÜáïÜyËÝÿ}þèÑ}O=õÈþýj—ˆX,–zбõèKZÀb±>üOGFfs¹»%O¸}ûëjËX)z,ÿ yçßýîÇï¿_ºgÿå/?.OÔ]õA”Ñb€b+™›K,/¯]»Ö,'vIŠÅÝTjmyy-‘X!„X­CVëÐøøÉVÊ€t,Åân(t=Mïìܧ÷÷÷üîïNX­Cj ˆ”ÕÑóÏÿìÏþgµ¥CšNGfXûêÕsõ8±+§XÜÇWR©µx|epð‰ññfs¿ÃqBíb@:‘bqwv6ÞR>ÿù#w﾿³sÏlî‚uHzÕ–´s‘ëˆ2>~ÛñmOçæšg-W‹Ü;'[Ó@e66¶}>fyù!¶lÙØØ^^^ã¸-ŽÛä¸ÍîîCVëÙÜo6Ãδ*ˆuüü#ì‹FÓ¹Ü]´ÐmLçæjÄ®Db5_‰ÇW  ‚öÑ&©ÔÚìlb~Þ%ù}‹»·™JýÄNïìÜ}Úl>v;Ó­D¢#ŽÛJ$VâñU´ÐmI‡æ¦-C‰FÓ]]‡ÆÇO¸Ý#ø CÚ€‡ÝèŸt¦Ÿ#mµa‹S-ÐB·%h˜›7´¦C¡¹Ü]·û…ÑÑ!?FÚ`; ^VèLƒß CëÙØØŽÇWãñŽÛD ­w:Î0‹»ccÝî‘©©Ó ÌLr±xÏ홚:ƒõé(8nK°Ó¹Ü] S±…v»_?Áº£ã 38±_iT†‰Äêìl‚25uºÓÖÙF9>ö0ˆ ÃÇTƒã¶¢Ñt"±ÒÕußNú¢³ óÆÆö©S¯_»v®Q/ˆh4íóÅffÆÛÿFö@!|ÌjBÇR €Y!¡Ð BÈü¼ÛFº ³ óä䛽ŠÄž›KD£épø,þÖ¤ÀãËm§Rk¹ÜÝÁÁ'¬Ö¡ÁÁ^ k6Š%fsÿÔÔi|eiœ2Ì󵏸JC½|>&‘XiÙâ$Òflll aÞâð1ìL7aÅ·û…óçOãð¿fé Ã<22;>~bzºÞ‹Å]Ÿ/–ËmËç}"R‚»Âǰ3Ý<66¶ggñøÊùóg0RU›tŠaž›KÄã«éôLù‹»—!-^^A:ìL·€Tj-ºÁq›n÷Hýݤ±t„a†Õ7ë F«Œ ­G>2m6{Ø™Æ9Óu“J´IGf¯÷r±¸{õêKõdÂq[““—Ž“M]ÅA„0ï\n[pz£®“h4=7—èÅá9Ðþ†9•Z›˜¸ôÖ[¯Öé€VA4ÚéFaÛ ×qàY ´¿a»8::TÏ 4'§¦Î”›¬Ì²,Ã0j?¨îq:‹Em)éx…jGÕ"·ÓŸþ4ÕÛ»ïÔ©G÷ïW[¸:h™F`«Œbqg<«Ë£j Ð\B¡ÅâîÔÔ™šs€%D`G¼rç0 ò¬NßeeYBˆFʰ“ª)ETKW×A«uH°(¯¼xë­|êSOéÚ*·R#VëÐââ+ss‰‰‰Kn÷ 33ì:«B;fpÎÌÏ»jþmA_YÙ*‹…¦iµŸXǵEø«P­)¢öï'££?­w=¶^#°K½ÏÇŒŒ¼Þ‚ë9ûÔ ‰ÌÎ&Ìæþš·x‚¾r8|¶æß%EQ„»ÝÞðGƒœ%ÇÂ˲v»Úâ3+ÏSL…òW~#]ÓQ:moš§ÊH$b2™(Š¢(Êëõ åt¹TDí 50Ð{õêKSSgææ““onll«(LÒ¶†™ã¶¢Ñ›5-sÜô•ëhñûýõ\^²ö*À²l ˆÅbò}%“ɆäÓN NÛ††«’a†a–––xžçyÞ`0D"…t-35u:~µ«ëàØØÅ¹¹„Úâtmk˜çæçÏŸ©-ôb°ÝúÊЧæ°8tÈn·Ûív—ËEQTOOÔFyŠ×ë…kÏEQ‘H¤P(TÞˆfYÖëõÆb1ƒÁP¡ÌÃÃà !„a˜žžzð?È¿’O$??ÝxFù#K(w‰UŸyæ™zW†© Ê•(שü Úl¶Nåj­J§mC T Á`0FH¡il¹ô=kºtu ‡Ï†ÃgãñÕ±±‹·¥¶Dߎ\¹róøñé{5\»³sïÅ߸p!Vù%~¿ßï÷Ûl¶X,Æó|&“ ‡Ã<ÏCñB9 _FH§Ð4MÓ4ÏóÙlN./II%BœN§ÑhÌd2â3$7 F,#„d2™l6 bˆ³9å_IDžÈ`0ÈÏ7 áp8ŸÏg³ÙL&#yd(CÈ*—»»°pÝãùf_ßËÂ_#~Õ)”çyÊ•(ײ\­­×iIÝ)èT¬½#~––©²ªt…lµ¦‘{³³ñ¾¾—®«-KûÓžÓ¥FFfk[ÈÖöêî>TÕj$ÐÔ ƒ’¤(ŠçyhM _ ‰â¿ß … ¡–ŠÏ‘ ¹Ž)ŠÊçóàöÌd2ò3÷Ì'“ɃÁB¡`±X„ÇsX–•UUV0 œ¨~¿2.饗îß?üä“VØÄW.êùóµ‡ÖWË{ï}›BÓ´¼ôÄê“<²\Ë@@¢V“ÉÔb–Ô‚NáǬ÷€)@ü,-S¥Éd ‡Ã6› >ÂÏž¦é’é„rÙ "iJ#©Ôš×{ÙlwâÍ£ ]ÙÑhšR[ĬNŸ­áZ£ÑU^£’o!Ö#™L ¾,qŠÁ`€†s>Ÿ§iZ8§Z ƒÍf³ÙlºÅ, œ ï»ÝNÓôÒÒ’|àMá«’Ï(?}}Ýãñd2™X,ær¹$ÜÕÕEè}º¶Ço8Ê:%2µJ>6D­uê””×]%:mZ¦Jš¦].—Pø ÃÀDÉôFUü–aµ £Î‰ÄªÚâ´/jwÙÏ©S¯_¹r³† /\ˆÕæ_S&“ØÁñHDính) p‘IRòù¼Óé„àgãK9µäå- „™ˆu-žŽ;xõ /h8€óáÝQò+1ƒðDòó…QR£Ñ>mñ#Ëýu««›W®ÜœOL\RË•­ S¹åZ–«U®¸fëG¢ jÄqÚX=¶F•Â0–l0Ä…)OWÈ–hÌ•-aaáúñãÓ.Äj1D”i7Wv4š…nÔ°‹LY®må=}MåÜhj—–†Ð”¿®Ba$JljJ-{-«R³ÙØØöx.ã2aÍ Ý\Ù¡Ðññª'. S–Ûx÷d2I}’šq˜R'¨ D-z_?11q 'S5–¶Zù+M‹÷ª]€³S–µ x5µ–R'¨‹’‹»k‚4›éi‡Õ:äó1ËËk‘ÈYŒkmÕcN$VÝà¬mÊrµÈ_ø2m$JDjŽÛ‚µ$£ÑôTzª²`…m³¹lì"¶‡Bûô˜S©5ŽÛ¬* ºXÜõùbÇÉzöžÊ…z"¢µM#ÚX¡|@ÞŸ'„ܹó€òá‡üð„Û·Bž}ö»šRD…‹»ñøJ4šæ¸M·û…pø¬Õ:Ú@Z«%éê:8?ïòùb·…»_ÔIûæPèFµÝeŸ/F©‹eˆ«DêÁb±h§µ#I3ØÞ~ðÎ;÷Á K8ztŸ¦Q ·¦‰•®®Cn÷ȵkç„—€¾¤:ÒˆÃqb` ×ç‹ML\B·v=h(ø°R©µ‰‰Ko½õjå?Ã^\|=Hö,½)Nüìg»\ÿ f“k¼^HºÈãã'Ú;FDG‹»³³‰Dbe~ÞUóBN›æÉÉ7z+ïûÂÐ2þngcc;MG£é{„_þåá¾¾.X|­»ûÕ:48Ø+ÞáX#¤Rk>Cèôšj˜êrþü™ú ;v0ÌÛ§N½^Uwylì"¬*§¶ì¢>Ðû …nˆg ¦Rk©ÔZ.·J­íìÜ3›û¡m6÷«8«6Y_X¸Žo|íÃq[^ïåÁÁÞpø,6žª¢ 3´+·²ss‰x|uqñü­ H%lll//¯ÁèLƒynqg:‘XMtuœŸwµñ’íئRkާ¶8ºA÷†¹Úî2ŒF/.~+6‚ÔF¹ÎtóF¦…÷ûÔÔ™©©ÓjRss‰……ë33㨻 ѽa®ª»\,¼ŽuAÅÃnôÇmrÜæààfó1¡?Ý[$«>_ w4Ò5°-•Õ:4?ïBWåžèÛ0CwùÚµs¾&'ß$„Tµ¥#‚ R,îrÜf*µÆq[ËË·!££Oƒ¶Z‡jxcG¹€µµ !8±'ú6Ì>³±±]¡¡ …n„B×aÏ2µGö‡ã¶w.wwpð «uHèOïy9v”ÛŸI$VpÈYfðKW¨`ŽÛ{£ò¾5‚ ¤XÜ…µù 3½gøLhÄŽr[ ݘÏÏ»šº²®Ñ±až›KpÜV%Ýåbqwlìâøø œ_ Z dø˜ê^hs»Ý#XaÛp‡8'qÎjItl˜GFf§¦NWÒæòùŽÛ\\|Em‘‘" ëïïyÿý=Ú}ñâÿ€#‘m ÎrV@¯†\o¿=[ᙸô&‚hŸbq×ë½üƒÜùüç?{óæß’‡ácVëÙܯï6Ô½³sÃÁ$èu‹x|¥’¾2DuNMA«Œ ÚÖ¾šÑàÍq›ñ8“ËÝmÁ„i¤•tu¼zõ%ŸÁ’%è²Ç\ù¢"U…m#¢"‰ÄªÇóÍr‹ÿÈWƒnt'L#j kã $º4Ì¡ÐTjmOs‹‹|!ˆ^€0ìéiG…ž0aÂ4ÇmîìÜ«sÂ4¢:° †ƒº4̆}]ÂÀNÑ80oÂjªí¥\ç„iD#@8˜Ù| WÓŸa††Õžë„hm§ –e†Q[ Õp:‹Em)*•Õbe]ìî>Tù“‚‚>ø€lo?ØÞæïÜy°½ýàñÇ©¾¾}§N=º+HôUËJR,îNL\"„\»vN#¯nUا¶U¯:'•u»ÌÎÏ;µ£Z†aX–U[ uÐCeµòްÜ}8|¶òKô©O‘ÁÁ}Ï=÷ÈÏÿüc_þò㣣}êST'XeÝÕ²’tu¼víÜà`ïØØEŽÛR[ÕÐYTv±¸Þ\\üªòi>£ÁÝÝ- MÓjKÑ …‚Á`¨üü@  ¶ÈUÓ6ʪ–++M'+W¯VÝ=êX•Cµ¬$]]Ãᳪ}õê¹ÎŒÐY9Mï9n”H¬rÜæÌŒn†–)Š"„Øíö†ç‰DL&EQE WÕ ©ä ƒA•ŠJ¨¨/ÉMËéH/¤Rk>_,>ÛØ—okäõz …ù¤„cá€eY»Ýª¬\_åÎlÆCi“ùyçÔÔ™±±7¢Ñ´Ú²¨€þ ³rÌW±¸;;›ÐãÄe¿ß_ÏåðŽÃ0L$‰Åb<Ïó<ït:].—ò%•À²¬¸§R[&m@‹õç×yS­¯ºÝ/4É³Õ 1 ³´´ 2 ‘HD9–e@,kÔÐo2™lFYi“©©Óóó.Ÿ/Ö¶YO†9•Z+ïŸT8'ºÞÕuPË“á  nñ˜´…ív»Ëå¢(ª§§'‰H>™^¯.çEQ‘HDÜx‡ÿ’7‚ßïÏf³p —üÑýQOOdwgYvxxnWRx8M|ß’™”|@¢ /¹vä)e‰õ%é]•Ó—X¿Ð÷RÖ\;8TÃ0ŒDS%]-ccc;½yþ|½Uµe ƒápØh4B"MÓʶŸeY¯×‹Å*÷‘h¶¤¾!@@þU»âv,.~un.¯.\ˆ]¸S8auu³¯ïåÕÕMµ%-ßï÷ûý<ÏÛl6èe2™p8ÌóŸÏçÅrMÉåo¥²fgã—tª IºüJq:F£1“Éì™ Ѭ\_|ùJ×JŵžÕÕÍãǧ•_þm†n óÎν=î‹/¾1;W[ÒÒÕF^9%†Yœ.ùùˆßâš)A¨ç’xQõv:6› ò”ß½d¶Ue"yv½ XA_ò⒤ȕ¥P°åôµçOBŽDGpP¡º[£¬{ÇOÇã+µ]®–‚?6Ïó™LF^£ÅžÏç—––,‹üÛ’Hò‘ë‹/_éxÖ²ªÈåî¾øâÏ7wvî©-K+Ð+{ϰ¯PèÆÆÆöÔÔµ%Ý£ÑN3’ŸA%ÉdzÌ’ƒÚøù|ž¦iÁ±&Çãñx½^ˆ:) ò{Ùív𦗖–„דÅbÓ*wAË3Ùóõ…òãH´#I©\Y¤}5èkª¤ü­!_éê:Ôµ‘[¦ š¦].—Pì Ã(û¨ ƒÍf³ÙlÖ‰fKê Pøª]è½ví\.·=1q©XÜU[œæ£vË R^|ñ……ëå¾­³Þ„öl&“qDÁÍE>Ùc¶Ùl„ƒÁ-ñGžçóù¼Ó鄱㠟ìc–ƒÁãñH:B­†ƒ¥¥%Á/”’B>Ùx/™‰äu×– ¬ /¹v$)reñeº³ ú"²ŽTµ:â?Ù;4%—¿eÊ:uêõ+WnêNA³Á`(Ùe—_Âó¼Åb®¶øÅ+î| "Ö¬\_<ÏCK¢äWº«e5°³sïÅßxñÅ7ھ߬•¿8nklìï®Üdǹ¹Çmiy³ h ï9ó’¢>¡ÉGRá³k‡Ú”Eô¦¯’Ò¶@Y°ëž‹÷)Ð! jF™è˜wÃq›í½S¤>\ÙÑhÚí~¡\5ÞØØ^X¸®åHl’L&©OÒÞ! ºC§ ‚IÚY•¯õèTqZ «ëàü¼Ól¼ÔÆKƒécå¯Dbe~ÞUîÛ……ãã'µ¶ÎWžRµ¥@Ê¢GqÜÖòò­ßAHŠÓðûiã¥Át`˜‰UBH¹8ŽÛŠFo¾õÖ«j‹Ù$Õk¯–‘kG_úREZð~µfý½+Q`~ÞÙÝ}°]m³ óòòšÃq²Ü·ss‰–Õó:©6J9ŸçïÜyð쳨-x\w›Þ((ëÎþÎÏ=§{½”{ðæ)«Âµî+”S¢ ?$¹Üƒ§žÒÇð\ÃÑc-«“éiÇÀ@o[Úff?v*µÆq›ºp‹Aðçž|ø!¹sçü½ÿ>ôè¾§žzDï{ãX,– _#H¤-¹“à‡½ë¥$MUV4š}ºþw¨\Aßýîǹ܃ýûI_ßþO}ª5E¥-tWˬÐ<9yi~ÞÕÙwAë†YÙ Ýp»GtÑ]¶X, íYŽÛJ$V`ømpð‰ññfs¿Õ:ÔÉ2*b±X{ìH*µ–Ëm§Rk¹ÜÝÁÁ'¬Ö¡/ùØž{¨ pÜfCJO¨M‰Äj4š^^¾5>~òßü› 4é@À6{<ßœŸw)鸞#´n˜üØÑhšã6«ÚÆUS‹»ñø ˜ä{¿6?ïÔE;£ý(w9n3•Zã¸-ŽÛÜÙ¹}»™¶Çm)¯u_!Åân4šŽFÓÅâ=·{kM‡öØç‹ ÇzGë³úžyf¦œbddÖíÑÝ,©Tj-•Z[^^ã¸M¡sÜNN±±±½¼¼ÿ9n³»ûÕ:}bì{5ƒ£G¿òÖ[¯ÖcD‹ÅÝPèúÂÂu³¹ßíi·p;Á²¬Z[×¼ó΃tú#»}_Ÿ¶Cu: >TM÷˜üءРBˆ^¬2¼úÁ$B¬Ö!·{dtô,6ó[Ð'渭\î®ÙÜ?:Šêh©ÔZw÷¡z 9•Zóù˜®®ƒ×®Ã–“6aF­0´§žÚ×Û»¿§GVVÞÕ«a.çdžVóô´Cm÷@Ü9~hÎ⠥ŋ»$Cø„ðQ»Ý#fs?ú¨[Çm™Íýµ]+t”ÏŸ?£ýŠßáX,–¶_€¬Nöœž£iÃ\.;º>0ЫM/–¤sìpœt»GÆÇÏ¡h%½ÓÐ3Þ|¼ÓÓÓ ÝR‹\n»¶Â‡%<ÍæþÅů¢út ,‰j·Ûa©ö‰D‚Áàúú:!ÄãñÐ4m0(Š–R'„˜L¦õõu ™LŠ/÷ûýÁ`Pøèt:a«‚PxºÊW„Õ®a.çdž¸­Å|mllÇã«ñø vŽÕCG½³s´pþü³ùú¨µÇmVÛ˜.w}¾X*µ65uF/ãVÈžÔ¹)V¡PìëÅ0 Ã0KKK° H ˆD"pÁ¯Î²¬p•`8Å–Rèå»\.…¿üî$&¿6´;¿œ;ºS‰Ôð'D£é±±‹§N½¯ŒŸ|ë­W_™žvhGÂv¥XÜM$Vçæ““o=ú¯÷2Çm ö†Ãgoßþ:hÁá8VY#@›µòó‰Õ‘‘׋ÅÝÅÅWÐ*ë–eív;,.Žƒ…Áív»Ëå¢(ª§§'‰H>™^¯.ß/EQ‘H¤P(À±ð? BÄpAšÂ0ŒÇãÙSf¯×ëñxŒF£\x¸ûÔÔ|dÆëõ“É$ †ééé©}!tµ··*KÉma{Çåå[jKÇó<ŸËݘ¸tüøôÂÂõ\î®Úât««› ×/\ˆ:õz_ß˧N½~áBìÊ•›««›j‹†(±ººÙ×÷råç_¹r³¯ïe…^m"Þ}Òf³Án›™LF¼G­ð_ølªø#Ïó4MÃnÙÙlRÊ,…ôX,ÙZ,–|>/9SòQ¸£‚ð±XÌãñð<ït:3™ lšÏç³Ù¬x×ÑL&“ÍfAx"Û tÏ=:5j˜ãñ•ãǧåé³³ñ‰‰KjKÇïìÜ›÷õ½|áB¬íwU—{ËË·@ï}}/÷õ½<1qiv6¯`Éëˆ+WnV^sÁ*׳a3¢b“#·—Ã,N'²m­%o±…“`4Åû[g2ñ^ægii ¬©‚a,®²ðüCo±X„{ÁŠ7žßît:…}µ%9ìi˜5êÊ.édžÑeÕZ©ÔÚØØÅx|õÚµsóóNŒêj8ÛÑhÚçcÆÆ.?>íó1¹Ü¶Õ:tíÚ¹Û·¿~õêKà£Æ’וF~¥Rk>_¬VqêXŒF#¸ Ë­<ïõz …B2™„³ä£Á`€þk>Ÿ§iZðTË¡iÚår Þr†a$ÃÀ‘HDy½R–e#‘ˆxhYAx›Íær¹ ÃõõuÇ“Édb±˜Ëõ¡Êv»¦é¥¥¥ÔUiUíII?öìlüÔ©×U”Jè(ÏÎÆÕ,vºÅÏ7Ÿîë{ùÅߘ_¹rÇÚƒ‰‰K•ø¥WW7ŸÆ¾²~÷…ˆh£Ñ(vó ÿm6`äy>ŸÏƒñw1/ëd‹S„1fƒÁ 鲃Q§H2áyn-6½å„‡ç"„äóyžçc±4ŒF# í ÁÃtèIÅ=f-®üÅq[““—Þ~{VœX,¼>=íP«-ÌÙÀ)7 A¾ê–°äÆÍµ““oNMVÖ,T|ë8R?й¬d³dîPåS‰T‡eÙ`0Xó|*RA)iqºT"±"¯ÀñøJW×!Uj,ÎÙ¨X <ºŸÚ1%g4¹Ý#f³ Û:í ÇmîuZeDƒÁ@ ÐðyØ´h˜——×ä•3º¡ŠQ-nð N¼©!ŽFÓ;;÷!ÿûÿþûúºÄ‹Qöâ$ïN~ 嫌k_#Ú¼Ð;‹æ 3lò3:ú‰õC¢Ñ4iù¶!ØQ®ŽÛŠFÓÑèMqb*µærý3\Œ)7‰ycc{rò’Ãq×Úì($Žk½ø±[ƒæ s<¾b6÷KÞà­ï.·¾£¬â®,õsôèsóæ»°µ„Ÿþé>m¾pu]àj¡¼%Ž2å¢è}>6<•¤£‚H=Š«–r1ØÍæÎ^ûJÑzdåМa渭ÑÑO89a×Õ†lãZ ju”UÜ•¥NX–ýà25õëSS§a…ðÝmBÈòò­’ÖZ è·ÀÕbÏ-qÊ¿Š’À®êéô«ò¯PA¢fÅÕ€ò¬¤æñïÜçû££éÂ6[,å‚ÒœaN$V$ë`‡B7Üî‘ÖLZUwDY§»²@ëÆŒõ5r¬ÓW‹†wƒŠÅݹ¹Äô´£\íF5„Vö_a©V>t¥¶¶ÖþüÏϵM ©¶á¸-òÉ—{*µV,Þ›š:Óì[‹»^ïeŸ/65uæêÕ—48 «ÂÖ²ìê^D"a¹×ááah_‹‘Ü$iW´SΤùEݼ‡•0:ú´Qª5Ýe-—_ÿÆ,’†a"‘ÌèçyÞétŠ×¯KZ…¨5:ªœ›}ßbqWž˜J­E£7ë‰?h†Ž`“"БÁ`ˆD"¬8Ãq[ccÍæþk×Ún_]µŠù/¾ø†xy Xø¾©k?íì܃զT_._²L&“£/ÁJ±Ùl’qä)<Ï [©ËƆÃaXWˆÍ1(G¸„"¬ƒËÜ(H.l<¾ráB¬äšçZÄV(gyÁ¶ œyÑzIò¢$–'ôûýÂÚCðÛ€ áÁ©érùÉ'—O.• dŒF#\^n¹¢=u]r‰{XÜmOñu׉‚ä.dh±Xä:ª¿‚T¨µrŠ+ù«#Ÿ\BKК¸¸öTœ®ÕÛuF æ{3|áBìÂ…Xó|ëøñ鉉KZX÷QRy6f!²mXHƒ6f‘4×ÄF£nëÝ”“<—»»°pÝãù&l8j­R«²ŽB9ó<¯PÔ€dCù>6„|>{é|©ß‰Ü0 ç %#ˆ!ù‰V®kXlU’rêÔëÊÛ·«§.ÈT¡ŽªU\ýZ+§8ù3Ê¥b-喝6Zòe›Û ­‚¦C¡éô |,wŸ¾ví\3≊ÅÝPèúÂÂõ™™qø®%‹´É¨ƒ[¾%)@  ×f³Y“ÉTR×&“‰¦iqˆ ›ø@~S±äù<ÿä“VXED~‹óç›"Pï½÷mBH0,WÎò‚•BÃ˹¤6%YÁ<"ØúaÁ`°P(X,xœÊs–¤+k~¢¿ú«ç‰•ªtNg !##¦‡%¿‹ýõ‹/~¡¿¿GAAù—ÿñ¹ç¡iºžºà÷û% 2åV4™Là—3Ã0uV µVUÎ ê+ù6 •-“©} (—Û/)Ø~hhŒ™ã¶ÆÇOC¡ëfs3¬2lµ¼¼¶¸øUXe9ʳH¶a!ulÌâñx¼^/ij …rœ‹¾*7µt` wtt¨dŒ–iÙ8–s%E-ÙЦª}l俜=ÅÇ:U«ëýècñÇï}ïög>sXÙ*W®#åºP¹‚H™MŠUAZ£5eÅéT&„,.¾ÒÆV™-1K\§N½ÞŒMf4»=”|Œ¹ÜÆ,D¶ ©oc–X,& y<ùvª„Á— ƒ^ ’ó<¿ººyåÊMaeµ‹V©À[¹N%åÌ‹Üæò¢òoh#ßdž”q’—üåÈO“kœ”÷ˆV¢kØB[øXaÕ1×\ä *÷¼pPr“¢:+H…Z+'˜üå¿Òr¿ÒF®ìx|åøñé¦nj­fˆó>^¹r³á;<®®n¾øâ§N½¾ºº©öã– òÊ#oN©ÛÀÒiµ¯DlIÁjª![UÉ¿´´V0ŸÏÃÐfÍŠž˜¸$Xbx½VrU ªöuAµOÔ@ÅièPuÎ~ Zqe'+âµ½‰U±[»~B¡ccoŒŽµ¿i#’É$õIZ6uÕ`0x½^¸cýÓƒƒ?Y _é„*ÚFqªƒÊÑhzqñ«ðË´²òÇm ÃÉ·µ¼|K²þWÍlllû| Çm6)Ž Aš‡0ý©õX,ؾ~„01Ø tqñ«ªÏß¹óàÙgQ[œ*ÄÖéNjmƒ£SêQ4ìù¦«šQ§‚>ø€är÷uT•š„kh(tcv6®é¬-F+†YèΆB×GGŸ®³MJ­ù|LW×AUö¢¨bq÷ðáúÑGë[¾ÿ>ôè¾§žzdÿ~µÅªŒ=wJÑ&z”Y]êQtW×AŽÛªj›¸šï•Ïóÿù??¸sçÁööƒÞ^=U¥&¡¯*ô©:yðQ†Y<À¯ÖÙDš›K,,\?þŒ6·“J­¥Rk°VÃààãã_4›ûŽFF½!åhý68‰°ç#¬„_¹O²ZqÜV"±¯ærwÇÇO~ùËCãã';ͪw„Ae½ô©š„& óòò-0¢‰Äj±x¯fÏ3(µXÜ]\üªfC¯76¶——×À$B¬Ö!·{dtôl'ÿ ‘N`yy­ƒJ‰ÄêòòZ"±Bq8NNMF{¬S`×]‡ãäü¼nú÷MB}Ã,`®g*E4šž›K8'gf¬–‰Ä*ÇmBsÞlîr»Ïv¬£é(FGŸ.w9nst´1S-!Û 7{ýéƒÿäŸüöÑ£ÝG¥ƒ¯¼gµÍÏ»Z\Qa Lr.w¦\ãЂ”¤XÜÝÙ¹÷÷ÿA û&«³³ 0ÉSSgÐ$· ÅâîÄÄ¥bq÷êÕsøæ,‰Ê=æÍÍ<lop÷îÑhzÏÖ´³¦¦Î´rEˆ©{ªgfUMÊD&èÿõ_ÿ§ªB´„pÎWs¤¤Rk^ïeUºU:Bý1f;wv‰Õ’†yn.±³³ëvÀÜóÖ´³Ä1Õè©FH¥ÖÌæcñøJ僈ð→±®µÔ± mVކ sw÷¡’;J¥Rk × ! óWNçóM¦,^ýcª¤Nr¹í>º/,T L±¸ ]Çw[‚s¢ªBC†¹dd¨Žüã ! ·ÊÅâ.Tð1®þ ‚ã¶Žïs8NVr¦×{¹«ë ¾¸ÛœU-Z1ÌçÏŸ)i½ÞËžqƒƒO4ªÆ‚1†aõ6FÆ’ËÝ=xð±Ó§+Ÿáœ8m¦-}¢´0©UG¨l˜ÚïÞ‡££O—ÔÙÜ\byù!¤»ûP ‘™A ݇ςE—lëT#HóH¥Ö>øƒÜQž¦}¾®ÅØ~à>Q5£²a>~üh6ûwÊCËn÷ ÕŽ+ollG£éh4 ½í`ðÿºÿÄp¡1FÖÀq[Ÿû\דO>¡Pya’ZåöC46A|U£¦a|âñÇUZ}z~ÞY•R…utʼn››ù‰‰ç1† AZI.·ý௰§ÏÇ$+8™µýÀ%½ê„ây^žÊ²,Ã0;÷;ïOY^¾ÕêÒš"Õ&,ËBtô쨬úŸ=M?úè¾r¥ææõô•;YAåÐB-C÷u£(ëʶX,4M«-^BM«ÜK– ë"­P‡¾hoe ƒÁPò«F)+M<¸¿äÈ1ÄÔéÁno•DAkDµL;[ µûj¸†¢(BˆÝno¬(@  ].מުB¡`·Û)Šêéé‰D"M/­æÐ¤ò$„D"“ÉDQEQÃÃÃЦ®Jªª€G¨áBÝÑ<•‰KO8X–µÛí Ç=˹œxÃÃÃâŠÖ ‰Õ|þƒ­­¼Ü0C ¶0Q¢I…Óp‰ë”×ë- ’;EÅUR;JÊÜ­ÕL±¸;9ùf4š¾víZå†P‹aü~=7~ÐG0®…BeY§Ó©œI$±X,<Ï/--©Þ`¬“†—'Ã0‘H$‹ñ<Ïó¼Óét¹\Ê—Ôy÷d2ÙºòÒ W™2,ËX,V¡»²œx,Ë6»¯¦‡†>7>.Ý–†ã¶`fTË&ÏÔ££’uŠa˜¥¥%¨Sƒ¡’þ@C×­ÕF"±:2òzW×ÁtúUœÕ(ö6ÌÐÖƒ¢¸ Í:»Ýîr¹„>«ä#œéõzár°EE"øÑCûþF£Ñ½†a«,¾\"ŒÓé„q¡P0ÊR,î&«>óÌ33*–¸ByÊK¯ªò”´Ó%ï¿ßŸÍf…"‘ÈýÑõôô@V M–e‡‡‡ávÊ òw‡@$“É4<<ÜŒ¥U&Ñ—‚Ê”eðz½±XLÁ™)Ap`€N… KW¥ ½M•WŸíåå[ï¼ó®dúr±¸;9yéüù3 ŸUNA%uTÛ; ‚Á`8^54Mïiø¢¸šµÖlææÏ7§¦ÎàŽœ †/…ßï÷ûýpl³Ù ×•ÉdÂá0Dq‹ÿ ßÂïUü‘çyš¦išæy>›ÍBJ¹›ò<‡á¾N§3“ÉÈ/— ÒFá£Dþ\îîÂÂuç›}}/ |ËDR(OyéÕSžât‰ºá “Éd³YÈ RŒF#Ü.‹•ÌV~iiI~wáAòù¼ø+±:tDàzT&ׯXJVOBˆÓé4P)öÌD®Ž|>/Ѿ\•%Ÿ½†êsáBìñ÷Nz]œ¸³sïÅ߸p!ÖJ•ÔQ£êTmŠÛSk姬5¾åµluuóÅßxñÅ7VW7[vÓΡôt©‡ÁS4!„¢¤ç@Šø¿.~aÁW’‘ãl6k2™JÞ”R(L&S&“q¹\™L†ÈžÅùË/„1\•ÏóO>i…E¾äçŸ?¦­š*øË¿üÏ=÷MÓ å)/=IñVUž&“‰¦iñp€°,  …‚Åb ƒ%o'ÉS~‚BŠp þ9é‰Àõ¨Ìï÷Kôe4K–m¹†ƒ|>Q¨åTRH‰:Ê)Nüì¿ú«ç‰•ªÏüñ•+7>Øßß32bÒÿâ/nýýß¿÷ ¿ðO¼k'µIYA¤ÔK‰ÔñŽ2™LápØf³ÁG˜µ%O*(nO­•Sœ²ÖHkkY(t#ºîpœlê–BÌÞ®l£Ñ*‡Ÿ—üˆ€H&“Е|4 ÐÍçó4M+;œ ƒÓéôz½‚9‘_.ÆëõBZ__—ç60Ð;::TÃíME¹<%¥WOyz<¯× C…BA~/»ÝNÓôÒÒ’àŽ³X,pZ¹°;Ax±„mO=*«ê÷¯€Á`°Ùl6›­Q±{ª²¶êóïäØÿÞ{»Ï>{THL§³Ùì»cc_hˆUVx–f¿£hš¥2 ³§ƒº±ŠS½BœW(t}~Þ5?ïD«Ü,Jö£Å^‘L&㔂C†|Ò• íGƒÁþOñGø­ƒ•5 /“$+2«ür‰0‚oJÁ• ¬®n^¹rsv6>1qI]W¶ByÊK¯ªò”c̃Áãñe'ö–––„ò„W‰ü)Ê À N.†Þ]Ùõ¨L®/e•Ék‡$Ñb±@𑸠áHb$•‹È2$¥ ¬Ê«ÏóÏÿ›/|áÕÙÙ¸råÊ;¾—ëð¬PA%uTÛ;J8Ƙ ƒX† ·§ÖÊ)NYk|KjY<¾rüø´ÇóÍ{M½²·+[‰;¥GM Рï´‘T•·Þúø¹çÝ¿ÿÓ«Ýöq{[¼íãgþþïﯭýdS)-̘jY‘j‹Å¢¯Ç×—´¥ZeÁÖéÝ݇{Ýî°ÊÝ݇šj•+‘ðÃÉ;¶·ù|þÁíÛœêëÛ÷á‡DxÉ´ªe°•²ÙÜ¿¸øUÜ'[-TPœœ|sjê´Õ:¿†pø¬0@52ò:4º«ò¢pÜV4šŽFoŠ?ÿù#Ï[­Cø;CÆ29ùæ÷¾÷_îß°¸øÊÎή×{yp°W­76¶——×à?Çm>aµ öbݯŽÛš›KpÜfãè‘jQÙ0ÏÍ%¢Ñt:ý*!ddäõ{®a©ÔÚÄÄ%BˆÛýBµëËlllÃÖr;;÷!ÿüŸ¿ÿÁòò­îîCVëÕ:4::„£&R'ss‰+WÒ„ð×®ý&ÇmÎÍ%Üî‘G{qÜÇmrÜV*µ–ËÝ5›ûÍæ~³ùÖñÊ|×çÏŸ™š:ƒË†¨ŽÊ†ö€}úêÕ—`;OBÈèèÓÐâRº»¹Ý#ÕþbŠÅÝx|%º!ì1—J­¥RkâÖ4V`©h4ýÚköÈ#ûf*‘X‰FÓ-ëi¥Rk`S©µ{££O›ÍÇÌæ~«uJµ¾ëéiú4‚ʆ™ã¶ÆÆÞ „Àž3§N½éÝ݇À­=9ù&DoBŸ˜š:Ýš_,î¦Rk·)6Ò££CX±¤8në—~é÷!ÿþß{¾ñ¥\n»Ù[,C«šã¶ÀõÝbp€©]z}ךEýEpŽý \»v._ƒ_\Üâv¿Ðð 0ÒËËk‚+ ,4Vx)I±¸û3?3÷ÿðãñ/FþôO3fs“•%ÆØj‚n1vìê$•Zƒ—-ú®µ‰ú†Yèwwúƒ?øõ_ù•á+o›üQ§óù¦îga#ð:ØÙ¹7>~_"á‹_ ®­ýÐhül>ÿAÃ;[hŒ›J*µ ÝX^¾åv¿pþüiÅÓ&êfa ™<œ×´¼|ëñÇý¯ÿëžoû_ çìììºÝ#>_Œ2?ïjA-…p’Tj ^ÇIF‰‰K©ÔyèÐjH+q €xØmX$ßcZF}à ñ_„¾¾î¯|å¿ëî>¦ÿí¿øŸþ§ÿcttHá Ü-^".‘X¤Áב&Hrúô¿ýÁn ôF"¿V§ÕDcÜ ƒ¦‹Å{5„Ð"ª ¾aæ¸-¯÷r__×ç?D<~ qa‘ȯ9'$—$«>_ÌjšŸwµøG‘ÞÂÜ …δºÅˆ Må7óÊøÿÏ«uèêÕ—jËq³)w9n3—ÛÞØØ†ÀuˆZw8N`x—ŽPß0°.k:ýªØÐ†B7B¡ë’D`ccÛã¹\,î6;T0Ï·¯ ¯iKŠÅݯ}í[ßúÖw>þøþg>s8‘x¹¿ßPUhŒ›ÄÆÆv.· 68—Û.w… ,Ðaèê:ëjKŠTV 3!dddV>Êë½\,î–k¡Ãø´°&‰ŠˆgH ¾ny_AôÇmýîïþßÉäÛE8ðX(äû'^‹Æ¸Àˆ>Çm‹÷vvvÚ㻄˜6ÖÕupp°w` wp°>ª-2R/2Ì¡Ðx|EØb(wÇÆ.ŽŸ(gzS©5Ÿì­vñÎ&ñp9À­DbãºÝQ,îF£é?ýÓÌ~p‡²ÿ£gÏþ·°g”2hŒküÏä¡ 뻳s !fsw÷¡ÞîîƒÐ†ÿj Ž4 æbq÷øñiùÊé0]êÚµså|2¦¡óó.MuRÅqÝÂBcãã'±I‹hDb5_‰ÇW>øÞ{»„çŸ7~㿪ÐÞEc\!‚é…Ž/B` Î9)bëKAGtg¢!ÃLðËEb—l€…厓Mè\3ׯâ&ˆ¦ïN4š>xp?Ïó?üaqÿþGîçN¼ôÒKÚW4Æ%3Q4½ÐñÏ3|ìê:ˆ}_D޶ 3„[¿ýö¬ü+Ø\Y9”ã¶|¾˜ºa{"^Ä‚›j -6gt»GÀ¥T,î:¿ûváñÇ»sggxø§¶¶ ?üáŽÁð_9ÿì+_ùï$M[4Æä¡Ÿ‚­à XÜ%w|Ľ^‚¦©mfR&Œ<ܲ’½k´¶'’M5ÆÇO`ÈÒp`ÊD<ÌÌ8~ï÷’üÇõàÁBˆÑø™­­ÂGÝ?räðÌŒã—yX|UGc°»‚ÏzÉ'»¼ƒƒO<ìì#„b¯Ô~¤}Мaž›KpÜVÉž1ÌlVl€ˆ°®®ƒ‘ÈY]T˜ååô¿ûwßÚÞ~pç΃÷ßçÝ7:ú˜¾vtw:‹Em))â•õäìÛG=xÀBæç]n÷Hãì.y8Ä‹]^¤ÅhÎ0— `fóââ+{š[!"L§–eÁ°åóü;ž}öµ…ªž¦iµAþp_‹­ ô÷÷nnnëÔ æVîgF»‹èÍfBˆÏÇBÊí"åõ^Îå¶%³ªÊ¡âaU!ú5lz—¿ýÜמÿS?õ™K—¾¬Mû$§ÇU‰'‘‡¡Uí.¢´h˜ÁeýýïÏ•4¥ÅâîÄÄ¥’Ëh—dccÛçc8n6xVûáJS‰a£(Šçy»Ý¾´´ÔØ»CÎ’cá€eÙ@ @Ó´ÅbŸY­üú‚eY†aÔ–¢F¾óûßýîÇGî#„|êSÔíÛü?üàÅóäãù?.]å¿üåljC'3yhw…e4ˆ«Bša= ‚ã»H;ò¨Ú”Àl>6:út(t½¤éíê:8?ïšœ¼40Ð[‰z` ÷êÕ—B¡—Ú`óQ¿ß_Ïå…BÁ`¨bIE°Ê±X¬ª«Ú†a„ÁÝñÜs<÷\-C!,ËBJ>õÆÆv4šŽÇWÓé™Ê3&)3 Nfˆg6› +Xi¶1 ÍC‹†™âpœ…n”ë›ÍǦ§ss ³¹¿B'ÕÔÔi«uÈç‹Åã«ZžL%1™LBb±˜ÓùǾÝn·ÙlƒaƒÁ@Ó´Çã±Û풯׉D!~¿:²E…Ãa›ÍÖÓÓ#é+Èàõz—––:Í*8jž ÂÂ#ò¯ß2ôzINæÁÁ^ð-OMF'3‚”D£†Ùí …nD£ér}b·{f-_»v®Â°Ù|lqñ•¹¹ÄØØÚŸL<ÏÒÒ˲ÐH&“±X,‹±,ër¹<$¥P(Fžç×××ív»`]<!D0Æb«LQ”\†`0X(Ö××uÚqlÍSˆD"Á`p}}âñxhš®¤I¤ I=B ]d±?™29ù¦ØÉ Ë5“‡Nf³ù˜àdÆu›¤6´8Æ ÌÍ%–—ׂ¼`°Ùlî/&Va2Õü¼K# vù­¼; )`A%CÂ’Ab¿ß … ³Ù¬ÑhTè—cÎçóÐqÏd2å¤*'¿ÞQx"(„d2i³ÙjÎ_>¦À0L$ ‡ÃF£0 •Œ\(h¶*! …ül~ægþ‡r]dBH$òkèdF¦²OmÊ25u†ã6™˜¦œH¬„B7ªÊÙjZ\|etthlìj¯mF£l˜FÉ·^¯·P($“Ix‰KRÀ¡Íó|>Ÿ§iZ8§Z ƒÍf³Ùl%=œ˲v»¢(Š¢Äá`v»Ýn·»\.Š¢zzz`à@žâõzáZ¡ )ŠŠD"…BAðRÀA0¬2!„¦i¿ß/Ü]ÈΦ( d „†azzzà^òHÎW >šÍÇÜî‘k×Î?æüù3n÷ ££OCì!Äá8«É"Hsá5Ì… ± bÊç,/ßêë{yyùV ù//ß:~|zbâR.wWÝ'õûý~¿_œ’ÉdÀl43™ ÏóDÔQ†nÁ`ˆÅb(NÉçó0&m0Âá0d(èZá \¢ÅbYZZâ?Ù-ƒ”ròëá‰l6r&“Â+Bø Æ$)4MC œò‚S2]¸ûÒÒ’8‡|>ŸÏçIàŽÙlî%Q¢ø|e‘ÚO¢G4m˜WW7ûú^ÞÓj.,\?~|º6㺳sÏãùæñãÓ ×U|Òª^ˆò7¸ê ¬ö{¡ OT®´%íZ±R$Žh0œå”e4ÅmL&—Kn!? ³Óé´Ùlâ«$Rí)RûéAôˆv]ÙäἩh4­|ÚÔÔi‡ã¤Çs¦aTEW×Ápøìü¼+º>9ù&Ìè@–)Ð4ír¹o9ÄØ wߢ$å·´´¤<,ݨaAš‡¦ 3!djêt4šÞÓâÎÌ8!³³‰Úîâpœ€=%ÇÆ.jvÔQ…X,–L&)Šr¹\¤5õõõžž—Ë%„‰‰S<˲E™L&y|µdŒÙétÒ4`D™â÷û…»{½ÞX,VRBƒÁ =Éd¢( ¸`¢e‘ÑÚÊ™?±çì¦í±±‹SSg¦¦N×|/XÂ"½[¹œÞ£šõ.mOT.r^mÙ›ûÔ‚4Îc35uzn.±çŠ]½áðÙ‰‰Kfó±šCF!âÔç‹Õoã«¥¤§T/èw‘,A­¡uW6!Äíéê:TnV¥«uhffÜë½\ÏP±*£Îzß3Ñb±Èݼ‚ H è ÇL™š: ݨdeì©©Ó·éñ\®|E°’´¸ël±Xtm˜;¹×Z×~lA4‚n†ÄFFf§¦NWb›k^¬$j:#ê"Þ!»sÀ}µD èÆ0G£éPèF…;Û4$L XÜõùb©ÔZ‹Gi¯mÜ»G P÷ïó}¤­m‘ Ã\,¼>=í¨¤ÓLnê‰üšÃq¢!]çéi‡FVØFr¤Rk^ïå{žÿS?õ™K—¾Œ?lѼöÚkjËP}äÈáúúœÛýÂÆÆö¿úWÿçü1®Œh™ÁÁ^·û…¿ù›-ØyO>ý郿ÿû×ÿðS·µ±‘?pెÔAj@7=fò°ÓŸ­Ü(ú|L*µ¶¸øJ·ŸƒÍ©!óóN4ψƙ›K,,\/÷í¾}ûþø£wîì ÿÔÖVþ‡?, ÿ•Ó9ü•¯¼(ik¢‘FV¢3ÃLjê4sÜÖää¥&ÅTG£éh4Íq›fsÿøøI´Ðˆ¾à¸­Db%M:´ÿÁþ‡?,îßÿèÏýœù¥—þyI»‹FAšþ s fBH*µ61qéÚµsMÞØØŽÇWãñ°Ð££C¸™<¢/‰Õx|%_9|øà{ïíBžÞøoüªBC4‚4ýfBÈÜ\byy­Úaãh4=7—¸zõ\SßÛËËkðÂ"„8'Íæcãã'qÑÅân4šþÓ?Íüàw!û÷?zöìû;¿ó¥=/D# B—†¹Ú9ÍÍÒV^UËËkØFtÇmýîïþßÉäÛE8ðX(ô/ÇÆ¾Páµh¤¤ti˜ !¡Ðh4]áB`b¼Þ˹Üv+iW‹¤ æyttG£S,î~íkßú³?ûÎGÝÿÌg>H|¥¿¿º]œÑH#HµèÕ0BFFfÝî‘j㹚¤]!ânôààãã'ÌæþF-O† Mâ73úþÃwxžX­CU…^ŠA# • cà cÆéô«Õö}ÁîpœTË6 bÄã+ sLÍæ~ êF´ÌéÓó?øÁÁÁ'Âá³uZS4ÒRfBÈää›fó±éiGµÂªF©›˜gxI Ýh«uCÆ­11q FdΟ?35u¦!?Q4Ò"F߆–4Z\|¥†^&L ‚•›*dUû}ø!¹sçü½ÿ>ôè¾ÑÑÇöïoª€­w.j~ögéwÞy×hül>ÿAÃ[·h¤D߆™29ùæÀ@omNéÖL ªygß|ž¿sçÁ³Ï>Ò<ÙZ îõÛ6‹»?ó3sÿð?þÿbäOÿ4c6÷‡Ãg›áÝA#t&º7̰½ã[o½ZÛÐìÜ\"M×Öç®@ @iKƒT( †JctÛ¸:ŽÛú¥_ú=BÈ¿ÿ÷žo|c)—Û®ÔY‰‘6›ûÍæc8ÿiKö©-@½˜ÍÇÜîfgµ]>=íp8Nz<—‹ÅÝÖ OQ!Än·7<çH$b2™(Š¢(Êëõ …z$,Éððp0lUQ!ÚÂl>öÚk_"„üÿãLO;ÆÇOLN^ŠFÓÍ»£Õ:4=í¸zõ¥Û·¿ ÿårÛ^ïå£G¿29ùæÜ\"‘XU¥#HÃѽa&„œ?:_€”7øÄÄ%µjµßï¯çr¹Ñe†a˜¥¥%žçyž7 ‘H¤ž K²¬Ðý­Ùð#úÅíùõ_·îÛGML\r8NNO;ææss56‘«Âjšš:Ÿ}ûíÙÅů:'vvvggÇO]ôù˜h4½±QÑFÔ¢AÚÁ0 ôž?&ºQs×®#„ø|±¦Êɲ¬Ýn‡^¬8Ìn·Ûív—ËEQTOOQyŠ×ë…kÁ'L¡(*‰ ¡_ Á`0FH¤iÚï÷ w2”§@†©TjxxÒË= ôò€ Ã0=== ¡Ýn/÷°H;1=í8qbàÑG÷MN^ºzõ\<¾:9ùf+Û¸fó1·{d~Þ™NϼõÖ«n÷Hw÷Áh4}êÔë##³> Ýà¸-µ‹ Aª@÷cÌLMžŸwÕ¼RGóÆVív»Çãq:,˲,ëñx(Šây¬i,ƒ¯\.W6›¥(Jœâñx!~¿}}Ýn·g³YB\.¿cÉtáîÉdÒëõf³Yy \h2™hšv: ø\®r¿Ax8eYƒÁ`4×××M&“Íf“<¬ÆÇ˜« žïö ¤/wÇÆ.B{¯^} êQw÷¡š!Q † ÛÛ|>ÿàöí?Nõõí;uêѶ™ã NÐ;mb˜ !¡ÐPèz ëÀ俆/<"$¹½fá+‰Áƒ¿ß/ÐÍf³F£±œa6™LápØf³ÁGxƒAå[)òô’Ï%7ÌÁ`°P(X,Ur¡Æ sÍÁómL…ô·51ñû}tÿµ×¾äv4µ[³ŽîÜáïÜyðÜsm2ÇAœþÐðmÄ‹/¾1;¯'‡ÕÕÍãǧëÌD‚ßï÷ûý<ÏF8Èd2p@DÖËãñäóù¥¥%£Ñ‰âš¦išæy>ŸÏÃp¹œX,f0b±˜ MÓÂÝ…[ÈS C‹Åé±XLá" C6› !ò‡ÊA›h\_2çp8 Ç™Lœ´’ûJp:à™P>¯ã'$\X­Ê~þç¿Þ×÷òòò-ø˜ËÝm¬ÿ©œóÌ3ÒMW''ÿ›èm†ÿIAArÈ$ב  A5 ³jÐZC§¬5"š(ÑÀ¢FTCí–Aã‰ÇWŽŸÎåî֙ϕ+7Ÿ^]ݬ3ì1W^ZÏf³Áð|&“Ž…_ £òâ!¢ó g¢8N‹Å ‹ÅÃóâoÅ' ™ó³¸øJ›Þ€m®gƒH½Ç$7 ‹Å¢‹¢ˆÅb0z^GÉ·*~EyŠÍfƒkáí/¹V˜ó-™n4•à@2™F%m6[8v¹\Á`Ðf³Á…O®ðšL& C0”§B†‡‡ …‚Ñh«#‘.„ó{z(ñÏžã¶8nscc6“(¹úîîGû·ïÞ¹S;5ufbâÒîîG¿ó;_ªY5À·÷TD#.—K¢2dz§Žà¿Óé, @Àår Ç#^=wO­5Vqó7aáå´&(®æâE´Cû,0"glìâèèPÉwGµD£iŸ/Ö‚Í›µ¨dý“rKĨ-»še"gccûÔ©×>ø»¿;!^‰–çs»Gj®’5訽T¯äƒTB»Ee‹™™qÔ9­YÀí8í¦îŸƒ mÀÀ@ïèèÓO=u$_§wu¼zõÜÂÂu¬D¢L;f«uÈí~¡QÛÝ mF q»GÖÖ~¯Hv³0›A%ªy/8éÚÙ0Bff·Yç´fÁ67*CD_`ð|…8'zz>uìX¼ •Èë½Ü¤Ÿ$A!z¤=ƒ¿ºº‚)?10Ð[†n÷Èà`¯×{9—Ûnøýˆº`ð¼„zéÝî‘7ßü‹h4=5uZþÕÆÆvmQG{¢—鈼öÚkjËÐ\††>—Ëåÿà–·58Økµ> ëŸüÙŸýé#GK¾µZ‡r¹üÜ\Âj}Zþm9PG•PÖÐ!‹°eìøø‰†Dh yÂPY –A=âó1o½•ûB¹zçó1‰Ä Ö ‘Ðþ=fBÈ=ÿ¼ñ_ý«ÿóù烃 phCžãã'‹Åݯ}í[Åâîà`oW×!µA4ÄÚÚ»o¿ý_nßÞ)笲۟…ÔÕuÈlîW[^Ñ a˜ !GŽ>p`ÿ×¾ö-·û…:Ÿ­Ö¡ÁÁ'&3;›XZz»XÜ=pà±Ê]sÒÆüøÇýñÿ¿Û¿ñ?[®ÒY­C]]‡|¾Ø‘#]h›èW¶Àä䛄«W_jxÎÛËËk©ÔZ<¾28øÄøø ‡ã$:èçèѯüôOýõ_ÿåDbÕç‹Õ³ö‚´e˜aí¡©©3òHÑÞ"_ḭDb…âpœ¯„ ÃÈÈìñã}O<ñé=§0pÜ–×{¦Q`‹ép:Ë0BR©µ‰‰K‹‹_mAåO$V¡ËÝ?iµŸ¬sínÑ^ïå>ºÿÖ[Ù·ßžÝóäbq7º¾°p}ff¼yMgÑ>g˜ !ss‰x|µþý-*:аwžÙÜ?>~²QóªDËÌÍ%r¹íx|¥ò¦p*µæõ^6›ûççXGΤ 3!dlì"Ôüßwcc;_M¥Ö–—oáP4Òö¤Rk>38ØkµUÞ æ"6uÔ A4K‡fŽÛšœ¼4?ïRkô†¢S©µTj­«ëÕ:„CÑHûQ,î?>ýÕ¯Žýõ_ÿ§jƒ.‰ÕÙÙD±xÏ홚:ƒc@HçС†™¦çæ‹‹¯¨î.†¢‹Å{VëE#íÄ3ÏÌøý?ÿ¯ÿ5sûö×k¸<M‡B7Ð<#EçfB,y½¸øJSï²,Ã0•œ™Ïóÿù??¸sçÁööƒ£G÷Ž>¶¿ÚeÔPœN'®âÛiLN¾iµ…B×ëqP¥Rk¡Ð ŽÛt8Nž?ZõÆ4‚4•NY`¤$££OÿÉŸd8nËn¶ywùÆ7¾Á²l%K×~’ã676¶ëÏÐl>6?ï|ë­W»ºy½—ŸyfÆçc‰UµAF§fBˆÙ|lzÚÓ3TÀï÷×s¹Üè2 Ã0ÌÒÒÏó<Ï †H$RO†U][çã íÇòò­®®ƒfsÿòrêØÀ@ïü¼óí·gçç]„Ÿ/:M‹»j?1‚ÔfBq»Gæç]^ïeŽÛjÞ]X–µÛíЋ‡ƒÙív»Ýîr¹(Šêéé#*Oñz½p­à¦(*‰ ¡K Á`0FH¤iÚï÷ w2”§@†©TjxxÒ÷|“É]dAøÈ²ìž™ ÅèèP3Ú¾Ç °ÐW¯žëî> Ý8~|Ú뽌Ñ/•-v‡M§_mì” °£4MÛívÇãt:Y–eYÖãñPÅó†ã6¯];×@Û,$¹½fá+!Qœâ÷ûƒÁ pa6›5å ³Éd ‡ÃBü3¼Å‚Á ò-„yºüå®UÈ\/†9°,ÛÉ/8xüjêèѯ|ÿûs]]GFf§¦N+ï4U êèƒH.wÿÙgiA¡©Nõ†¨HGGeË™™qLL\òz/7ckH£ÑhšK)©B^¯¾\ÐâƒÁéB¡‰D„sJBÓ´Ëå ‡ÃN§“Â0ŒÁ`îžL&áry `±X ]¡S"œÃ²¬ò zì}vø ®ñó·iµ¹Ý#Ñhº~ÃL:^GrpÖC;cÌŸ «ëàµkçvvîù|7'±X,™LRår¹ÀdŠY__ïééq¹\ÂëFœâñxX–…1]ƒÁ ¹V2Æìt:išÂ¯ßïîîõzc±˜X!‡Ã ÃÀ˜q¹iÇÂ9å^•d¢;šEO‰0™LbïHµâÉn†ä•ÐÝý“ Çn÷Çm6/’£ÅÓ¢5²—âÔÒ¢"Øc–Ò¼ÉÍ‹%“ɈSÀÙ Žß¥¥%Éù’±í_^òÀãñÀ°´ÂÝËÉc±X` [B¡‹Å,K¡P–ËPI&:¥þ(zyÓŠˆ âæÜžL&"y͘ÍýpÐÕup|üd"±ÒÔ[® aš8–@$»4Okä¡âpšC‚=æ¨;¹Yk@¯ZŒÝn7 %n·ÛÛգز(z ëëëШ’ä„N ²J‚ê%yŠ»ƒÝn/yEQB¯Ü9+w‰UŸyæ™™j 3—ûÉ æññ“ªV ’kD® y JOašC9­I²­Pk Ц9ÈçPT¢5D—ðH®\¹Ù×÷òòò­:óñûý~¿_ù¹"ÚO5•”ƒä´Ùl±XŒçùL&‡ù‡JŠ#|e4!QœBÓ4MÓ<ÏC˜䬠Sq•4ÙlVžƒÁ`‡Ãù|>›Íf2A<èɉœÜN| ¿ Òóù|>Ÿ‡3%šÊåî.,\÷x¾Ù×÷²ðWU‘NL\š OzýÊ•›õëHAArÈU&/ár RH—hMžížZÛSq𿤺´†èŒÊVv šžvÔ®¢—häf£—rh}=ùd”»Ëå"„FI…BaÁ½)žÉV2¨¾ä\rù”À¯þêùDbeyyã6åŸ?¦ò"ý‹¿¸uàÀ£##&ø˜NgÿîïÞÿ…_8Y³ŽÞ{ïÛ„ñD…r(÷à@@RÂ&“‰¯xšƒäZ‹Åb’lÿüÏÿüæÍ› Z#eæ5½æJ”ÔšöëR 8ƬØcŸ/&×˲3©»9H-‹¢—ß—eYy Ãx<š¦×××M&S¹ z¡´•ªäUzGG‡º»-/ߪ§$øÄ{æÙg~ï{½¹™ïï¯kñeI4²¾¾.QYå:*9Í¡¤ÖäÙþøÇ?®\kR¢wÐ0ïØã¹¹D±¸;5uº†ä؉ÅbÑWQÄb1,4òÈ;ˆ™G¥<Åf³Áµðš–\+ïÉñx<ò†‡‡ …‚Ñh ‡Ã‹¥¤x‹…qPƒÁ á£òC‰1›‰C´8n »æ¸­åå[UÅEÎÍ%r¹mñ%‡ŒÇWiÚYÛ‚À·+y±F\.—De%KX¢#øït: …B p¹\ƒÁãñ(dɳ­Dk Šƒãʇ´èÊ®X´Èá89?¯'Ó‚Ô@%.Ár^nµeo] TÅÜ\‚ã¶$kŒ]ªmâC :j'Õ\&ˆ^À¨ìŠ€8íDb¥ó›¤½¦K‰™™q,,\oêêô¢SÐ0WŠÙ|,~•ã6ÇÆ.ââøR9%ýÕVëÛýÂÜ\BméDs a®XŒ21q ms'#wж·›´~J†ÍÌ88n³I«H4‚ BtUØfŸ/61qi~ÞÕÔŒµèð(ú–ÅÏwuœžvÌÍ%ÆÇOVÖá:’£»YˆØc®š®®ƒáðY³¹rò޵¸w^Ããç­Ö¡r_¹Ý#fs?ÌH¬Ô‘ÝÍz@hóHŦ27—ˆFÓáðY…÷‚ D´ó£ü«í±±‹8åA°Ç\;ÓÓŽéiÇÄÄ¥Pè†Ú² ˆÖ)¹‚!d` ¦<` ‚h˜ëÂí‰D~-MŒÌâŽRaçÇ’à¶1"æ‘×^{MmôÍÐÐç~ã7Fx,ºqñâÿS,îšÍý<¦¶\¢!R©wžþ§{ËpäÈa«õéÿåù£®®C%ç=#H瀆¹1˜Íý¿ñ£]]‡¢Ñ·fgãï¾ûþüñÐÐçÔ– A4ÁŸüIæÀÇžþ§ÎAÛŒ æFæÙnÿÂÆÆöoü?Ñè[÷wï övuª?sÑ/kk?üñ?Ú3LòÈ‘Ãfs¿×{ùÈ‘.´ÍHÇ‚†¹ñ9rØjšš:ó¹ÏuýÕ_ý'Ÿ/¶´ôöÆÆvWס#G«-‚¨@.·J½ó+¿2¼ç™ƒƒ½GŽtù|1´ÍHǂӥšN±¸¯¤RkñøÊààãã'Ž“¸2 ÒQpÜÖØØ·o½Âó£Ñ´Ï›™¯mK7Ñ5h˜[‡ÜB›ÍýÇ µåBVpôèW¿Zy“4‘Xõùbfsÿü¼s` ·Â«¤ @ìÅân*µ¶¼¼–H¬B¬Ö!«u¨†U DGŒ]t»G`ƒó )w}¾X*µ65u»ÎH瀆¹é°,Ë0e7‹¼s‡¿sçA.wÿý÷ù£G÷Ž>¶¿Ú7 \I±“ñù˜îîƒ5lÀ,t§§8„t¸ÀHÓa†eÙrßöõQÏ=÷È/þâþ_ú¥Çûúöµ±UVn  mÏà`omkË;'ÒéWÍæcccoàê`H'€»Kµ‹ÅBÓ´ÚR¨ îÔá˜ÍÇB¡ëµ] ûPY­C>³¼¼63ãÀê‘6{̪AQØíöÆæ‰DL&EQEy½ÞB¡P¿•#QçN©Ðuþþ÷çÆÇO†B7žyffn.Q±G ‚†¹E°,k·Û¡+jµÛív»ÝårQÕÓÓ‰D$á4¯× — >aŠ¢"‘H¡Pú¦EƒÁp8l4!…¦i0ü‚§ä£8ÃT*5<< _)?‹üÚññq"òZ›L¦ááᆻb6+·ÇTUtuœš:NÏÌÏ»8nëÔ©×½Þ˩ԚÚχ £²›X)–e=ÓédYŽ)ê'…f5‹Á·.—k}}]ü1›ÍƒABˆßï___·ÛíÙl.”«¯d"!Än·ƒÉdÒëõFñGq†&“‰¦i§ÓÉ0ŒËå’ç&ÉJ"Œø ŸÏ HrÐòX;†§Ihx}(t#•Z»zõ¥šs(©£> ßýîǹ܃ýû‰Ý¾ÿSŸR¥´´Î}hÐ070HÁ`PRÔÃ,|+ÿV l3ÍfFcIl2™Âá°Ífƒð"£iZ|rÉ[’3•mI{\ò@û†9°,‹/5Š¢±ú*wŸ®j™ :úðC’Ë=x꩎ö6CkHëÁ¨ìa4MÓ‚¥”œàõzá[£Ñ¸¾¾.þH1 à”. ‘HDðTË¡iÚår…Ãa§ÓIaÆ`0ˆH&“p¹ä£€Åb¯ÊuåYµ øRhF}W×A·û…h4=?ï¬9Ô‘8÷¡=èèÖe+‰ÅbÉd’¢(—Ë&SÂúúzOOËå‚—Žä£ÇãaY–¢(“ɆVŒxŒÙétÒ4„Abcðz½±XLòQœ[8fÆŒ…žwÉg‘_K1 âÎ}ÅÛŒ‘òH$ÒÓÓjU˜ìÞN¸Ý#ÑèÍÆ†k5UAò ¨5¤Å`¹EX,–L&#N¼Áà=^ZZ+ùh0ä&PœƒøÀãñx<ž=|.·X,0l\ù³ˆeÈçóåÄÓ5õÏË[T^¯†á“É$Ã0Íó¢—¼»*˜ÍÇFGŸŽFÓ5,¦LÃ$Lp Ê`ð‚üÜöQBË6»ØÝ}¨’í QG{‚Û>¶h˜Q™bqwlì¢Õ:TÏ®SÒ6à3‚ *ÓÕu0>›H¬D£iµeAõÁ3‚ š ‘Xõx¾¹¸øU³ù˜Ú² ˆš`AMàpœ˜™Ÿœ¼ÔØÝšDw`A áó1·Yy6‚´ØcFDCÌÌ8!>_¬îœD¯ aFDCtu¼ví\*µ67—P[Q4Ì‚h‹®®ƒW¯ž‹FÓ¤t&¼öÚkjË€ ò Ž9ÜÕuhn.‘ËåŸÞxàÀcjK„ ­ƒ¿Ñ(°Z'!d~Þ…s¨Î]Ù‚h³ùØââ+££C““—ЭtØcFDë$«>_Ìá893ãÀiTHÛƒ†A°±±íñ\.wÃá³èÖFÚte#¢z_?16öF(t£XÜU["iØcFDO$«³³‰bñžÃqÒíÁÞ3Ò~ aFD¤Rkñøj4zÓlîw»GÆÇOâØ3Ò6 an.¸¯»]ïâÞfÚÔµ.€bqÖ!:Ð}ôn;éHNh Ù“GÕ Ía†eY¬H˲„ý–F;iSﺺºNMžš: è±±7z{÷õö~ÿÔ)³Ú¢5…öв'h˜›ŽÅb¡iZm)4A P[„zim¶.ÄX­CVëÐÌŒÃíþڳϚÛCGrÚLkH90*[(Š"„ØíöÆf›L&‡‡‡ …!„eY“ÉÇ)‰P8Uk³uÚNtu|öÙGNhR½#„D"“ÉDQEQ^¯·P( âšAì&~¿¿žËåõÜf³Ùl¶`0Hñz½ápØ`0¨ý”GcÕŠ:m8 ¯w Ã0 ³´´Äó<Ïóƒ!‰ âšAÃÜ X–µÛíКG¦Øív»Ýîr¹(Šêéé‰D"(Iñz½p­àÈ¢(*‰ ¡—&Ð4 ·ƒ÷|mùááaÈz Ãôôô)òû–Αä@ B¿¤• /¡XÜM$V}>æ™gfÔVTtZR­%˶rµÊuZN­rT¨V]ë¢Z5¼ÞƒÁp8l4!‘¦i°ý-SÒnðH3ñûý~¿ßf³Åb1žç3™L8æyJT |e4!QœBÓ4MÓ<Ïg³Y8A¸¼áp˜’Íf…“óù|>Ÿ@þpN6›-)‰ñ9ƒA’Ïóƒ!çóùl6›Éd$ÂCi@V¹ÜÝ……ëÏ7ûú^þÔVWEÚ„ãr:-©VyÙV«V‰NË©U®‘rjÕ».êÑQÃë]Ë'~:¤ÁéRÍÚÚÁ`PRÎEñ<Ímá+!Qœâ÷ûÁÀkB|Ž„õõu»Ýî÷ûÁ·&d+?`Y6  ‹Å·H"Ï\"[&“çy2 “L& !~¿n!\þÒK/Ý¿øÉ'­ËËk·)Ïÿüù3jkL‰¿üËÿøÜs@`‘¼ˆÄÅ+)LyÙÊÕ*×i9µÊ5"Q™pòy^¿º¨GG ¯w&“) }b¨4M7\qð>i×Ð6D]Ù­Àh4BbYVîÑBEW˜8Å`0@Ë=ŸÏÓ4-œS¯×KÓ´Çã1 â7‹»ÝNÓôÒÒ’0ä&—¤dþÂ9òÖ××=O&“‰Åb.—K"|WW!d` wtthtôiµÕRÊ:•¦äcUj­G§DQ­í¡‹r´¬ÞÑ4ír¹o9Ã00œÜ<Å!í N—j±X Æ«ŒFc,“|»¾¾ÞÓÓN`yŠÍfƒkáM!¹VÒúƒƒÁétBÂá°ÉdZñr<Éd"¢X¹$l6›øˆ5r€Ž2D¢Æp8ìt:Å …žÊí2ä¸-ŽÛÜØØæ¸­åå[ÓÓµu¥Ä{ï}»BJ ÓårIÊÖãñT¨Vš¦å:-7“U¢SÐH9µêZõë¨õÎét …@ QÇî&)i{ЕÝ\öt=)xD[L î«wG\åòK S-*ÜZïº(G…Ï¥zW¹„•?¢wЕ”&™LRŸ¤³?A èÊFJc³Ù4Õ@é°Ç¬2rã§–9D3Ü@$…©bÙ¢ZK¢zW¹„Hç€=æ¦S.j·iƒ ÚF›m  …Gk•|´vÕ"æÿ¥`nU_¿ä}, and provides a template constructor to build an atom list from any vector-like object of atom-like objects. Atom lists can also be constructed using the standard vector methods, e.g. push_back(), insert(). Clipper methods requiring an atom list, e.g. a structure factor calculation may be given a Clipper::Atom_list, any class derived from that class, or a std::vector as an argument.
\section s_model_opt Optional model handling packages Two optional packages are provided for model manipulation. Both require the the 'MMDB' coordinate library by E. Krissinel to be installed (see http://msd.ebi.ac.uk/~keb/cldoc/). \subsection ss_model_mmdb MMDB interface. The MMDB interface is a lightweight interface to allow MMDB to be used with Clipper. It consists of one main class: clipper::MMDBAtom_list. This is a trivial extension of clipper::Atom_list which may be used anywhere an Atom_list would be used. It provides an additional constructor which will build an atom list from an MMDB atom selection (i.e. PPCAtom + count). Other classes are provided which may optionally be used to access information in the MMDB hierarchy in the form of Clipper objects. These are trivial extensions of MMDB objects. The MMDB objects may therefore be cast to the Clipper types to access the additional conversion methods. \subsection ss_model_mini MiniMol package. The MiniMol package is a lightweight, STL based implementation of a small subset of the MMDB functionality. It provides simpler tools for manipulating single models and their constituents. The use of STL-style code means that no memory management is required, and all common operations such as assignment and passing variables have the most obvious effect. The minimum necessary information is stored for each object in the hierarchy, however additional information of any type may be added to any object through use of the clipper::PropertyManager. Basic searching and selection tools are provided, and logical 'and' and 'or' operators may be used to combine models, polymers, and monomers. MiniMol provides an MMDBfile class which may be used to extract models from and store models back into an MMDB, or a file.
\section s_model_which Choosing a model package. If you have very specific model requirements, you may be better off writing your own objects tailored to those requirements, and then deriving an Atom_list class to allow your objects to be communicated to Clipper. Otherwise, consider the following points: - MMDB is a very powerful package, with an enormous range of facilities. However, it requires a good knowledge of C++, and the API can be quite complex. - MiniMol is a very simple package with a concise and intuitive interface. It has a simple API accessible to non-C++ programmers. MiniMol will do simple tasks much more easily than MMDB, but it won't do hard tasks at all. If MiniMol does everything you will need (or can easily be extended to do so), then it is probably a good choice, otherwise use MMDB. */ clipper-2.1/dox/minimol2.png0000644000374100011300000000300310736662154012761 00000000000000‰PNG  IHDRÄ\Mêw¨PLTE """3!33"""333D,U6DDUUfAwLffwwwa8ww8DDDUUUfffwwwˆW™bªl»wˆ‡™˜ª©»º»˜X»»XÌ‚Ýî˜ÿ¢Ì¥`ÌËÝÜîíÿýÿÎwÿþwˆˆˆ™™™ªªª»»»ÌÌÌÝÝÝÿíÌÿÿÌîîîÿÿÿ„¤Ü ÎIDATxÚ훉rÚ0@—Ö@ ¡±$¡¥¸'LjÿÿŸuå_²DÍx‡±ŽHë}’V—'à}6 …h!“Bi!T‘ª_+Ë߇xµ+Ëk QìðуK("ûoðåI)´fw—O`ÛO3{÷E)ˆ™mÏž w#¿‘áFQ´‡ aë“"0]ÛöŸ?ö^-ˆçgûfQ8z¶×=Ìݧ¢$õh?c?…]µ»Qk8ÙÓõŸa~–ÿKDIŠH1íÔrl{úm@°7 šßNEIêÑÞ?†èŠÍNö£oi¢o÷vÙ‰hò=„Ô™½¢ħX'Zˆ¢QˆµP–"[ñû¯?£Ø}ùùõ^Õ­8UܹæDqÓŒbŽ6w›x[3çá0¶6†ðÜáðü¿@8š‘hñ„çq© q3™4Ó)8ü¦–63 á4SFÛ‡@$]š ш{× ‘ri:Dî]+ÄI3ryf~øÚI]ˆ¼å3)Þ[Íî]#„¡)¹4ïHé2 \}@]¨ž3Ðktïº œ¼K³ ˆ{×·îÕq*fѺP£{×ÁðÔBú<ðq¬F-†`tßõ!ØÃ›QìHW‡àL4,ˆÂ)íÚ—)5¹g=§/„ðóóÍ-.D‹£KZU"vi0æ^!ÄÙÔ¨o˸7¼ÍA“µª"Dâ”×…bˆýmNʽáì¹×…HmH#é"½õï4w® á ’Gσ2x‰ÝŽoòVU€ÈÒਡ”Ha׃È—®O">˜hi"qQ0‰r¦ØH¢+^¹:!ÄϘ¦àÅÀ¹Âê]Bâ´/ A¹chBæÞE"ÛÓ(„Ô ˜DöÞ­I¹»HˆÌêÝ„쵑DI÷–…>áËA”ÛœKBÈÆ$!J½å ò·^Ò%^"A¿«BþjM"¹Ù×¢ÉVJoë„(7qèaH×’œ!L#ýKXðÌ òcÐß_ÂQ Ï–%ÓÖ,µ±#ô¢Ó”„«•Dr{PF âL‚øBd`ÊnÎJ^VøR½>ìYÍ,»ÙסäÇ-×ÔDǰ:D)Ÿ[`XºªkºÂÕô* U>ùžu!·€ž|ÿ‘ÉxÏêxgUÿý›õW®®ß¹¾{`IËKöÅ/ò:êÔõò™ `ƒ.Æ_–µÙPŠvH&°^ÌW²èŒ·a„€=‘®Ä‹ö1Þ˜XÖjE©“-‚§dy‹MÂL®=] ,:Y€õënÛÅX›[è "èBà6hœ1‚®$ÖÑÛ?(À„àÚéJB,—V XѺ[òÛ¥µ"Õ·[òó‹Xã‚®$Öù_P€ Áµ'áËk¼ãÇŒI¥°ÜåGÛî† AWëèË7“°‚kO¤+ İĎÚvH¥î$ OBX“>‚¦$Ö±ì,É8 p 8ö„ºÒ¤˺[`ƒ£Wu7Y¾`AP•$tàŒÒ™Xa6מ@WBJT]'Zˆ¢…¸@pwºòÛç+ëzoÿVi!T‘Bùÿo“ÇΕe“(333>>>DUfw D 0f08w8:IMD,U6DDUUDD UU(fAwLRfS0ffwwff0wa8ww8DDDFX\UUUXXXQfl]u{fffcoqvvvˆ™ª»ÌÝîÿH™HPªP`Ì`hÝhpîpwÿwhƒŠt’š ©ˆW™bªl»w™|Hˆ‡™˜ª©»º™™HªŠP»˜XªªP»»XÌ‚Ýî˜ÿ¢Ì¥`ÌËÝÜîíÿýÌÌ`ÝÝhîÁpÿÎwîîpÿþwˆˆˆ™™™Žž¢‹¯¸ªªª»»»–½È¢Ì׸ÍÒ­ÚæÌÌÌÝÝÝÌÿÌÔìòÿíÌÿÿÌîîîïøúÿÿÿ÷¬ã¤pIDATxÚí‰cÅÆ'6v7‚HJš—šFUƒØ8‡ÕbÈÑ$¤b“Ø@ж‘âzűø¿ïì!iï}³ûföz_Z$y5ûæøiçíÌìzßÑø_—ì#Klé8!WÝ8üëÛ—`‡.ÎÇ¥ÇøbvÔûαKüspø‚€«vH|îts$ì¼ãØö°?zß±ÿº½ô–óæ !WÍHÑKº ÅQs q $¤ RH„)¤æ"±MHäS}Èœÿøcÿ§ÿ½þúir<êƒD¦t=ðÑÒµÞ¤ì<ÕQÍE†‚õ§eçª~j2GGÓXeç«nj6GGfOÓ !5‰££ ‡¢ì¬ÕJÍGâèÈètŒ²3W#µ ‚BHí@‚îHÔ$ ¸Zƒ„sGJõ w˜‚ ÈR«àPô Š,µ w˜‚Æ®ÒÔ:$Š,µ E‡4“ÕJ$hì*M-E‚ HVóà%²¦=@¹ - ')ä UƒJ>CBg¬*—¥kݘM6ÕµFUŒ TòËbÀrÅŽr³ cªA5¨ä3$œö„–+ 6û_KÕ ’ϯãiG \Ö€¡ $£cBå ͇ÑâŽC¸\ù0B¢1ò#!|郂nB#±¡ªˆh’Ô!±Ð¤GPAq(h’”ŠfÎ ‰ˆZ!UË¡ $â4é¶ B"^F§µPIj-„D²Œv.ÑlŒKC>g+Wã5‰Gb€~ÖBÑ$tŽÄXÂy[Es08rÜA ÿTM5 Ó^…+I ]F·TI5 î_Žä|Ĥ¸*UTƒè1‰3Û¶óÚ&„„Þ•xrSï¶…‰!aHWšŽú­`¢~Hüx;A·n%ùËæ§ÿxçÝÛ0¶Yšê‡Äí¡°n×Ñfi"$ªj³4Õ öêpx“ñWÆ6`ñí²¼‰‡Ð&c'®jå4ω›Ãkvó ·XJó\[;‡ˆÌ&?¼LH¨•ÓÁ¿1ä?WïƒȦ}ø!¡VNó ϯ9ýºí/ÜàWj6<÷öpÖ<[ÃΑÍÍáNóÀm½o å6ÏõWg•Ï/â›N{͚ǽªó#çø¯öí-<$ 6mï“:ÅJ¸!<Sâ a6KSS¸º6”ØéFýL6ê3 »J¬žì¦à%*GÕËY(è<„ø hÈð¨ŸÉ¦G:vçèÒD‚¢—¡ªå,…B|Ñq#¿FÁØÑ¤oJ¨³ãï<Ä‚¢«Wµrf‡P ù}ðâÂH8ñÆW¤ñHN•X}ßä¨hPtÕªRÎÆqÓ•ðâ9°o}~&ë3&é÷;ZtâAÑÕª:9Kˆ’!ž ‰€Ÿ™'\9Tf§ë`]¡Š«*9K ›ž;æ8÷3'9“ hÞyT=¦y5r†G+ 'ÛÏT0ÊX“•5U@)J‘Ø^–ø`iÕceMéHX:Ör§báÞ”,Å«ÅÊš’‘,©«h@îgÊo¯<V*˜@`…TñÀ`õWÖ”ˆxPqBí,Iw)ôŠw¥!1`¯Z@ ;È_ŠWñe™%!!¸` $¤h –âU»ó( áS ¡˜Ë_ŠWåΣ$LIcˆ1Çå]U¸óPŽDdö­$˜1Çí¡+¹MVÝa+ÅHH=æ¸Ù“¼+@e‡­”"³Oè1ÇdzÙ0Y²‡­*¶Z Ö€7–Ñ•:d,!æ¸3J!±ÑÌîÆ*w©P‚„Õe}”ÉÎ4Ɉ9Îoþ&36èÔv€ªÆ„ $L;ïñ‘l[JÌñ±ÔÂNØj­bn¦$LÍ.¸üœ¤Ä—k|ܯ ò‘0"XGº!)1ÇeÇŸêƺ•¢Ž„íõ±žnÈÿ%ÈŠ9.;Ö8¿TTЉœHüòPþñòão½÷¿`d8Ùò·ß&Êgyaê?ÿþð2°À0SÁR|wtv”úËVN$~ØÏ¡02¬Ð²DSåÕ_¶‰RL5 öæþþ36{Q‰„å½§EUH…¥V$N=ÛÄf/©z¶±ŠŠÜòƒ‹lµpS"¦–BXxð`ÿ!›½<\eìyçÍ)þouÿÑ)v‘m<Øßÿ‚1T$à–ŸíïCB û_¼)„„¢R«{oîÙEr_V÷öÛÛ÷Þð£ö[¶zŠÿÍ.–¿¸X¬ã1Å. !¡¨Â*€ÄþŸ7ì¾Ð}Y}º·ê”dþÆ.ÝþSï’ˆ‹Üò£|1S{N)áH(*…°Š Á/”lö¯w’ÌßxC)H€-_d ÞNÅL=blC 5¥–¢›PT$ÄE7¡¢q‰RL„Deê/[„D)¦ B¢2õ—-<$ž–†ÄÓÌŒÔ _!Ö‰èõcö•óš2Ï+ir‚–MiLôq‹ª'lµ¥wR|†ø°È…”‰¤v‘„°eiL ;½¤­¶º©Û²¡»9‘˜·K$€vî k‚–£‘»-‡˜@‹,>s&‚ˆ;Dܹ¦þÉŽ˜Š5:—¢Hó¥ZüR#´Å"ç·Ül9È^dqÏ™À "çò»q #R¤Œ¹Ré‹kw$€¶häï¼–£‘»S,›þÍñ"‹{ÎNqוˆ?—oíD|ņÈ)cžT_o  3€«°åhäî4˦¶¸½Ç‹,î98AÄ]W"á\ý¹Û’T±Á0"Eʘ#•Ÿˆhm™HXŒDîNµìc/²¸çLàw;‡„s-–b&W¬á‹Q¤Œâ©DDhKD"Èb$rwºåˆ‘Å]g%ˆ¸7*‘t.s6“R±–>ï=Š”Q8UˆhmyH„XŒd?Ãòœ Ę߮3rBoT"ñ\¾;­äŠ5»qúiM""zO$í&4ŽEØM謾<&³æ:('ôF%’Ï5p'À2ŒÜ{"YL5ÈÜïYÖP‚e¿‰#ÄiŽìçBº @V¿èvåbet3GÔ%!byÚÅfmšðôØ™pR0´ŒÀ^Ïr@²la36Í¡.ljõ Ì{ aõ!»Ë@ϲÕ-RYQ¡Msô W€‘œöœ‰u GÂê‚öƒ—€¦e๠Bs&`˜B.–®ÆÜK)ÀE‚Ö%>¸–‘™@r&€¢ t|¾A AA‘×$:Ø–q™@r& ®„-¨‹iËìi¹ ‘àxë |Ëüò›-$gäJØ2E_Ž´ä”^K›Šù[ºe§bµÂôN‘ùÕ9"ñêðèæéåqêMl3¤ÈßÒ-œ(Á$Äòahì'ðHÖ©å±¢Ï'ãDþV`ÙÒ5Á_güi4$D¯V¦&z-vü`©åá%tèp.œÈßJ,[¡><É,Â>لًÓH+Ï„õÄD(‘¿UYžö<ýYÅw;Ìqçcu…KëÄN0Áž'ëƒ/}~§ü9>Ñ7ßÄÿš^±å/?HÉÌò? ¦;CvÊïÿ’’ñ¤ôßÿëƒÔdNJ¶ Ôó°‘çДEÓ“eµ– ²Ji#ÁNïî>±ß¬ÜÝ}²ü»ÄÿŸld–”§Œ$½³ÂÖÝ“&¦¯¦åYú––ÙAâä“Ý{üͽõ »ë÷C™<}?5“nR;e8é½K;»—¾v%f²’–½ôm-³ƒÄ;»wù›õK;ŒíÞå¼°“üߊ}ìë ©™t“Ú)w ¤<érèJÌd%-Ÿœý‚ÚYf‰Ó;ü«;+Ü §geÇNÀ³æÛ½s?-“NR'%/˜’ÙyâJÌd5-;é[[f7#—Öys÷îîÎû«_óD‹Lî®§eÒIꤴ3éOy‰óº~Ï=”˜ÉJZvÓ·¶ÌnFîŸæÿ¹ÀAyïO+öå®?“;+i™´“:)wî¬Rî¼Ç¸ÃâJÎd-»é[[fº %Ë¡”„Y¥$$Èr(%!A–C) ²JIHåPJö(¡ÉmÔôdY­e [“ê-B‚!A ‰ …DHB"$H!¤þ^/îõ\$ £³Ë d´P!£…2-”AÈh¡ BF e2Z¨³"ô/ÇÊòJÿÖ]œµ7ê½·6«þöc¿}4£ûá?­XP³bx¿N¸ÍvôãÈÕh}ü“¹Æ‚:/BÙªê ´I,ëžR?B=2‰\kƒÐ„ B"×Ú 4!ƒÈµ6MÈ $r­/ƒP¶Â­¸BÐϲ—ŽëûãÜ\!騏P{ß[±ð©œÓ«ó>{ZztZ„øktðÓ(×ý>‘ i;§‰õè´åíK”dÙ‡~þ4‹ãêÃgö"Ï\kÔÙh ¶Ï|¨Ÿ™Xþdbùô#M:ïõ0 ©D(ùÏ_¢d?à ‚òoòe þà¹Àc‹ýðÉÿ,ó¬g–xà Â7°èÝ.øºÖe*”¸ul¿À©bkG–‘°!à3!Ÿð.À"f‡6Ë_/–Ÿv,q ]Á¯—88hº Þžž~'ßaxSêÑÉr£,ŠÈ¯Œ¾à£ü뀯eýãÃ×”¾è⇗Dä?.oÄxÑ;û<ÙæÕ†ã}µc³ØßNd4ì7Ìú ïRE\àx,ƒ±”çÔ‰…­Á_éòjv^ {'Ùϳ‰¨‰Ð§•7$eBÝ~½?­ô»µøã=Bò?KüEÏ(úyÇ­ GŽÍiGöñ¬0 àCct•ó¡Åò7Kç”Øbü‡{µ =/²üÃí:¡!– =½$i~±Ñ«üëáL ö¢‹½,äöý"Kƒ·Wnžð׺ýs-Ž­ ;{úìÞ¥Š˜í2ËŸD,l þJ—W»°¸ñoÅÏ’W@bV‰Pôï‚|yIÅ(û¼ðâ8å=!…“7QL?œ‡ÿx?|\Tð^¯ðù~û¿dyüÀK>!øŒ§BíØeledï*##ag??øŽ ïâ=!˜ml±XâñT¨‹5 ]F¾Òåå.ÐÂ1fø”…"üžþ7qZztr„xháçÃÇÀÊvlý fb ²±]Æcù“‰E­Òoj$† zO]ÓÎÀ¸¿\¡&¶À«!TÆbZª>B/z÷^ÓÄôqF“ ­hÇÖ[­ÛÀÆsÇ"{ž¡žL™šV¸!‘›{„L*ÔÈ ¤!B=2‰\kƒÐ„N‹Ð¦×Ú 4¡³"„6M…Ðò‡ÕŠåoÝSêG¨GgE¨ø[Y›Ä†Z‘ü[ûœºêÑi’U¸ÆÕÒ¯æðôƒ]M·A(Ð}kÇä¥ËC£#WÔmòì"²õ¥È&'è>¹n޶°r÷Ý!¸›Ä ©æœûVàŸ û „Ïññ„:‰]ûèØ%iª;!´ÉÚÀ[ tímò] º B &HKê0'R^Ú~mw“Sî‚*¶) ±Ç‹BÁË?@÷AWÉ6º/ËPEå¯Ñ‘µ¢ BÚãY°oîÛÁÉ2­òž¤¿U7ŒF„´Ç£¸_ŒS t'„¼C#Ÿ¨ßÑ} ŒPt^€n…Ð&ÍB*«¨§!´Q_,B'È ¤_r ;!‡ ì³µ#è>ÅõpGƒëûü„ôK0š«t'„ }£ '%„Ð5²0¦!´Ñ© ”Ÿ²'cD7BÈÚ&šY„NÚ6ª!ä&ÛD3½úZ)ÑÚ¦f¡«¥@D7Bè{w„®—Ý¡š§Gºb DdÒ­1„. ÐÙZw µ?#ËÃlÝ 6vÓ©Zwžª¼£uÍ3´†Qón:5B«ÍÅú׋P³¡£håTÈ $$ƒAh¡ B¡…2#„"L B§wGWp‰žN…H„b1¾Ø¶¼Q³Aè(âý.Ñ3™X„·m³‡Aè(êÜQâèC}¡8s¨—莟ó§0BIß©¹räf¥-¡Aèbw”s‰f–ÊÌW¹m©Üv‰n¾Q+e~ßÔÓ™ÞèÊNy¡Ê¹vŠnl©›? ä‚ÚÖ²1j6EìŽò.Ñ•q2´&]¢ëoï$û¥VÊÌÓ¹Þp¡Ú¹vж¥&‹ßœ3jcÔl:ŠØå•kãdΕ™»£¼y4h[)‡ïŸ˜Ûp ¡:Â&˜1[êB™Aè`bw”wT®Œ“g\¢ j+eêéܶSþ7aíá<!Nsà«01PìŽòŽÊÌR™º7Ç/à4–ʵK4uT®¿‘rT”Q/iâéÿ渴SM…ª³Ú)š·¥® /ßàç™ÄÖÞˆlû±hȱAèPsÝUªàwˆµN+Eh:ŠÄîè¼M4Vðîy:+#4¡Aè(1nVtOVBH-BƒÐQdºY ƒAh¡ B¡…2„Ê dZ¨³#”S•o͇,ç×Ô«›å­z»³OCÕë³Nü§Þ‚Îñä¡ jÝ'ÑéÇz6Ý¡Xç³¥p£Ù¯Ž©»"TxÀÒ4[8ò·ñ[<ªn‹P°uÜút+××£ê¶Uv­ÐàÎ%¡;#„ð½ÿ]ŠÀ÷Þ§²¯î‹N†|kyúñßÓºÊÔ­Šº1BETÄöR†|E{ŸÇκ3BXéB'LÐÞ§°»nŽP‘>–0d* BE²€¡ÀT„Š"wT‚† "ƒ®—«Íãib2†|…½ A¥ B…CÐ61„ˆ'Ë|Ü»Wƒ“AˆÉ÷¤¨¡]û*2•’jâ1q2U’`(5¹'ƒP-a†ÒÅ=k—’A¨‘ C† ¶ Bœ„J_Û¸+žF!^ -éS»¦ B-Í2”ê´„ÚšaÈÔ—A¨£I†ÐÂj—”A¨« †ò¸+Ë ÔÓ(C† A„úúfÈ4¬Û"ôïúÇþã?ô­^€Â¤\S-CäOÔÛu¶§÷>¡ÝtW„þu&‰ÐôÙmº/Bºeº™ BÚd2-”AÈ ´PwE„té®ñ©º5ðoãØkº›ZÙœ‘O4º†ÛÓ t3uªŒz9kàÚ¨7úê-25º9B•So2æÑKÿ&x|j£^b©û/[Iüý Þóc¯Aèn*ú⬩G/ýÛ1ê…ï,gî¿õʇ—D,ª{ BwS‰o ܼ:F½Ä£7t~>ÜÊ÷›= BwT‰o L=zéߎQ/ñèeî¿õJ/‹@Û±× t7•ñÖÀÔ£—þÛF½ŸÇsÿ¥+©‹ïãýð©cï§rì5ÝMc.«£ü`®öoº™Äªz¿™û¯Ah@¡JÌ£wÒ©wr¥Aèf2ݬÚd2-”AH—n;ožAH“ßeÚûÌ6—AH[FX¤þfº‹Ör†¨Å™D÷²º+BÅ¿Jú÷ïï“üã„>õsbÿ²fñßß¿úù²¾H ¹`ú¶í…÷ñÚ¼-B•PxvÛÛ.ÿæ¦ÃçgƘ&?¦)Š÷6ÉÑÝ¢yOkæ;œY\í pŸ!™Ùã.ÉÑÝúŵ¦œq¡8l¾Æ€‡ÆÅE)$îÝ!XÞ<0Ej“D‰[~^ü˜¤Yžl4ièÙ¶^u’Ï#”ûöw^äí;KÆ$F­ï¿Ú#ƒ`•"+“£ 6@Þ¡Ø·‚û ­vËŽÓ6"Ïx¨gJñï“£›"¹Ãch!¿UØÁ©N«À…&R89r,7ˆ¯“Ý!h»Ã¶Î±Õ™S:u·k¤ÁN3<Ë à5 Ù÷C—¡ý‘ZÕмö¾Š^?2è;–œ¿Î7„r\ûñ§Ö@Ú4Ôç%í^6&t…Bö½Š=;œÏÕÜ2,ô)¡u~xÚBö‚îTãòƒ=ïÈŠ ­ÊapÚ\í6¡_{ºay¤„3*¶sFí…Ý „Hl•3q<xÔÐ67þÄW@ˆKœòÑýæ¥EšÍwú/D »GѼ‹ ÔœzÅ(\T@›fq$Xò^-k‚®?py³Õúò¦R_`f$ ? s‰½05 ö,~’Dád?ÏÒé“mH…·L݇XÅÒo/œÆV9'ôå$Ùï³ ¸ à*¡22䛵·ùN?‚jQkæ]¡¦(Ä!rò¯¢Á2„ز&èú‡Ð|a¨¼©1ñ¦x$þ`öÂÔ08zFÑ]óiœ†9ëWòœ‚Q„èÎo/<ˆu!nœ‰iŸVÀMWA(t !úÍöJ¹ïôõôQù‘ÛI!ÄóàR¡ @N;,Xü^/«ˆFh¾Z_ÞTê L„ƒ~§öÂÌM8p—Ah㹎­¥M‹Xþܰ¾Ž4dñÆ1 …S^°]Æ–ý6ɆÈ×Ã5 ç Í!ô€YÆCwšz ;sVê„V ‘/k@(ŸkâÚ…]‚!Ψº#4&í„EÒkIƒlˆ|5\BÅܸ3ÓG¶®v@ˆ¿å:šk2­«íjÕÂu 4×2dZWÛ#Ô*þê@h®›Ì ´®¶G(à+á:â †´éÀ×"äĺ5WArø§XƒP)ŽïB3SA˜Th]ú5!j¥±byû¦£ü[Wí á¿¥Hèm®XÖK»%N·ôÙ4˜§T‡nŠÐü³ôÒBÖò0ø#\tÿ£ÀV´o”×M’3é“£õö%YÇP5UÐMÒ›b0Íö´Ê…¶ä¿6$è¦ Œu–Ôš9º@9¡DõÜŽ ›"¤÷n—ÒË¥ T1¶¿Q¢ÙìjJ÷DHožSIëµ@mú´ÜÛzê¾{"¤·ä[Ik—fTò×Þv*ìâ¦i®W ´N™§Òr•:îöóœÝ¡Ho+`¬ÖéÎäÂÅè ‹@µn‰Ð ‹D"³3ˆK¡H~¶R-º%Bk4,i¸S¡Üuwšú–­uÒžN4¥BÁc·¹‹ïˆÐ* ‹DZ3HW"I‹l¿™‹ïˆÈ¤dJÒÚY/žÛæž³§‹Ãòת· åia„‚훂Zº#B³/«‡¬1;D(¶½íoˆÖ´¢­ù9bÄ%„ÐöÝ}Ý¡•‰t–§EÚ;£º!Bzû!ZÒ9žv¡ØÙ;£º!Bk5,b¡Çv‡‰üýó0ª"´æ)¿ô% Át¹*´‡QÝ¡Þh¤±}z²\ïÑ%?¢û!´ZÃ"‘ÆòôDP8Û£K~D÷CHgÅ»'íÓãƒswê’Ñýz¬yù5¶9Ñx¤<ŒêvÍNG¶LúÚ§‡ËlÇÊèn‡Ð줈ˤ¯Å`¡ðXyÕíZçáZËÓ}„ò£åaTWCÍM`‘e+ÿ-Ž,›8cö0‡» ö¾ÜDWC(_4Iä-‘‰¬|üišUH’ùUdâ%YΊ¬µ§Aè¸ZvGVDȤBg‘ÉÈ6—AèÔ¡†oZpGd@0©ÐY4‡Ð«¿ˆ³YÖP‚>ye=?gqlÒ¯„¢©[¢lq›„:ÁRµö\„²AH¿ú×›45¦Ê ï•üéÞ5²„ÆS!y¿hƒÐšbw•Xÿ…Ä}f!ðW›*€- ¦Ì1,³il–•S¡Úé9æúœøBÄÀ9û¡~ѵ]t6äý!~Ñ¿¼­³kZKì®RãåÚj9©2sÖÔ”¹ú5+»$75NÏ|*”ð QkO†5pfn͵]tÆü¢ßÙgÜ/º Ù ¤_ì®RãeÎj¹1U._Ô”¹A¨ú¤œ‘1§ç¸›‘q ¥B±g…l»Æ.ZÄ/º Ù ¤_ì®RãåÚj#T›*—/fÊ ²ŽK²2BœÓ3 -Aˆ8·æÆ.:+ý¢ßc~щAh]±»=Á;a^Èà2Ïÿ,—™*CÙjÊ pvQº$Ç*YS(¦NÏ(!~ÅìBÇÂõb]ÙEã|ëSúE;Ã~ÑŸ–­³AH¿ÛÍ:^#[âmÒ¯EíÓÁ1„Eü¢;uzƒÐ6:_Ù"¿hƒ~6#3ã…΢Ã"dºYÏ¢óed¡ƒÉ¤B›Ë ÄK¹]È týåYN^åîCý½üÖ]OÞe‡œqAT±dýPé[›NT­¨7Ëòîñ”û+¸m BÛ+ÝêY>ŧZ·s¢Ó¦»!o5±“§r2î†P´Þt¯m@Þ#¶´ºxl¤»!€&ƈ%ËPÀ÷æd¹î‡ÐzS·„›(¹ŠFˆ{ëny›Ý&G†¡ø¶Â[¯î†þ©oTb%¶eæ2ÊOu_ñ=u7„Uçeià!+ràkôÅý Þï`›œ å2ª‚Nª»!¤×3lZȆ9ëÎß·¦î‡Ðš3—w$>kžw^‚î‡P±UÛbA,9«dþ‰ º!B[ž±/– ù¦Œúu?„¤k*·D¶ ¶<$ýºB+zIõ%ÒÙ ÏMÐ ZÍÜwHñ|ÉëìÝ!­fò³r瀅ҽ±GÓý‚›"Í””SûìÝ¡-†°¦Ý/Së”Ýb-Ý¡t[„àTt'îÖht?„ ¡Š¶>MäTÈYϬz;„Ö‰xêFéZ7DÈݸku¶ú§aÖÓÚ¸Œ¤5§o*uC„‚‹°#c> >Î}uG„¶~V+* ¥§oR¬tC„â­ ±CÉÐuº%B›­è§{Ⱦ@ƒP©"¤ÑK^4ÆîCª×h*uC„Ö>ç=!ø×^𠺼ú¾÷Y¤;"´reZaŠ£½¯È"Ý¡•†ä:ãcÐîˆÐʃÎL*t}­Ü0dR¡ëkåAg&º¾Vn2]_ùŽ5¦¿œý¯ÉÈN§uOz:ŸL*t:­;èl žÏ(B&:Öm↩9/ûKÌ„]ðÌÔ7£&½_¡“ÊÛ¡¯Òaø÷ÙXôºñÇd¦¾-ûß½/È"Ý¡`ÕNΞÃ0±×¬üyñÿØ{„eFf:«~Wmê9 ×½xþKM}[&½&#;Öé¬ç0Ìþ†à—yOøp~Ü2é5Në¶-š¦Å;hÕZ½é#»ƒV=k“ ÝA«>(PD¼ÀI'¿¿+Bk4 ýÅ¥2²Ø&}2G»'B«4 4%±BµŒ Z!Û¢Ó= xS„ô7 !ø&¨'ˆ&>(°P‘CÏrN†Ñ=Òý4b:–à”‹Óy˜÷p‚óL]uS„t6 Eí¤|î³ÛÞwéÍGÕß{a&¡Ü“`tO„´MpÆã…mÊgòOõ˜XÂ=1öïß_ýYõçÉ`Øqàâ°ÿÜôMÒrÚi€³¯árKŒS¦jEç‘ Ejá²á(Пˆš”°ý#•°oŠtÃPä¿FJÏ-á$¨ÅØÛ0¤vÀs”ؘ¼ '†¯ãt…Ü!©iª¦KϼBû·õ=rêð §L[c÷%RPÃõ8FÑ覉Ÿ÷|é¹VîvÚ ÐØ„ŠÓE±ÄB)LzˆÆÇ»"$Ô0DÚžÝ0Ø’(´»%oŒ”ÞÌyå¾%i5rvn5º-B³YÀDÛózIÍÆÆô=W#‡ˆ¶Y;öËÞ¡é†!‘›"“C@«WÉBóçÖ,yð Äë]i¸[uÿ¶'ønXž\Ö€<§÷¼©”Æ(2£Àú–©¼Ó•G[âôö17ÒIQwDˆ¶_ËO‚IJ±B>*–¤D«t®P2ºBlØ<¾ É¢GÉ&’ œGŠ-  !*ëžz£[!”‡\£Û’3ŸJ‚ŠÔmÖSH†Š¥U‰Ñ’ÚºBÝ® õiª&“ ¢pÄoJ2Tˆ¼eÏ81Ri‡Ö=êºPþ)O&A8“˜%H-";Úr}g¢Ïq+5§vt„hòÓOÓò™$¨ˆç‡qpz*gI¡tßY_©Ðsº8B=§jÏÍ$A²¥ÈTN†zñ‡C¡5- çÊ$?¥”\Éò¹Ò‹,˜Þ‚4-5ô˜\'õ‡ÐßàÄ*Ùøì*Ùà÷äw®ÀÈ ÷€®´F†j <0Ï qÇ›Mœ^õ½½÷Ø¥ÈÚŸ:_§#ü+ƒþ¶HUåƒ{ðïÝeèx)Lð4$8;Ô{H~ŒV<œØÌ B’gÑæQÏ•˜`^÷Àî·|×EH`ÞæÔµ!47HèOò$Úö«"DÏJ¡¿Ë"$P@têmt!Î ’M…Úéúu_'ÙãËnž 5 Cššï]ý;8B²Ç—2ZåÒ ª™9XBó½«ËZ å6bÞ·!ù ýò`ëL¡×?Ÿßz™B¥Ô÷!ß² 2k&ò€Cß~8 p›&T“ÜõòEš¥Ù¯<¡.¿É<>ÄóŸà$ÙWÒ÷ý*N¿ðÉ|¤? ž p®âYOî*Pá_öÕ{<3~=²ˆFÙŽa°,„ƒöbx<Û×Ù=~*D¼oŒZ©³Ëuèßz%}Á·›X*ÔÔêK„âÐÜÍEÄ0ˆ¾,¥M*„اB‘#ÒCÀ~å_Ôå—Ü!¿JRÞaò3àû;X#+wïrK²1Œù«ÀBb_Ë5t‹²ÃT*ÔŽá3|œ ±×»3Êe¦¹õÊú•qDR¡ºVÏBd‘Ù¹2ô•ûVÄedÃÍ5K—úãp>¡û›dŸžïïTFÆn0{%þXHí5Ï ßŸ"£©P ¡ÁšŽœ Ñ×ç™´R!j”ë”v¹l%M­²è•µ-s¢ªkõ ¡ÐÁW#Æ$7(S#„KÒ”'2â(B®Xï*»E¥Ë¯—%°â!{~g¾¿“½š¼Òú*Ñè×àUnD±(a„Z1dÃ×ù°©õ¾Å/Ç{ d‹K'»\ï½Áéñˆ²±Ìý„ M…Âê¾3„"à;Nny´,”Ú ˆƒÔr-ü Ĺ…·È#6k!¡‡~Š*£`.¿ñ ¼|ø¼pÁ.ÀÿŽÕñýÊÈ ü_OàCð† ÷z±«À22çᳯt ‰…,ú(?­²ã#Q4w(†*€øà©œúUd„êZýÒ¦E‘ú<ղɫæ¶ï_§¹ãò°©P÷ЉÞR§&UU«_ˆø0³¿EÍýº@ûJ) 4w|A^$z à%Wuò ªÏS­š u®Âkê77‚ÐÌñ y–TH^BC9«Zý2„ P}žêoB‡ìf½H*4$‘¸¼Eå¶ø“}Dèæ©P5ÐyBó–Ö-N/¿N×/´Ê¥Qåı¡@ÆÍcÙÀ×5R¡lÑñeWN…„2²ªV¿!‰‚P!ŸQüLz/ /S¼4c*Ï>cIU­’©DA¨ÿ•ÿÄ ”¤¯@ÐòŒì€©ú›W&°Pdå#;i -FŽäƒ‡Å?ÉÓ"³àc„¾Ù§g-}ÉÄñ êßñ‘Øô=™@|BÈQ>’t`bÔi_Š/ˆQê‚__v.õž û»ä‘Õx"«?#B±ÄÄÓ‚ Îvœ\ÕÝqÚ28øºCtB²±—÷?|ó#x‹&t8$õ9ÍÉÖÓ3"]3u!õb°|E‚.á öª… ssbû[>õLl‰–L I©Jxê£î©NLÖF„| m‚%gÁ„_þìÔÒÂ$mÌAsÐvD­£k›¼e†¾U¯gïŒ9`YþÃ)P/VÉUç9‘òÈÚî§N>øøœ×&‚®2E¼:®Ât“­Ö©¹«pz¬+¨H¹XmÕÜ4Å)ËH¡$}{H [9jÈtj³E(w•ÒݸnXÐ ÂçtM8©\ŠÅFº(µ ?v?ð©YƒILì¶&e#9šâDw‘¸U^£_òѽNˆÐ/@Íf~@Š…¡ÔVb.%¹ÒèÍzcytÔ¤“L]«2w+ $³ –÷޶œ¡±i5”¤VŠçÙ$eé™écÆëLÐîN—ª¹ÅŽôÄXÁÕÚ…4"¤Tšã`ÉžSÓ¤…ý©ñÈL€ò&F%ùË1 =ä÷ Õ†Þp~ÏIóèaƒ»XÞ$:w]©_AhBò…!_µ6/¶ç´yôÈ$ò†šPªXmšla9ÊRbìÍ™GÎôš’©îÄ1B¾DÎ 4!ÉÂrT#Gž {³ö(x¥ q á5Û¾hBdš²j®”Ë smÇ#œzåómU¸b>ž ÷11Œp‚&x:¡)‰y‡1¥¢—¼'™Ôë[ÈÃ~jªhÎC£ÔuÅF™„&$1fH ©==ì¿§ Ä#Ô(´D®¦AhJâc†6"HØÃ>÷çjU%F“ òœùbµAhJ¹è˜ÍÂå\ÑcŸ…ˆadûp£hÞ>Á 4)Á9RåNô%Ûzì ·4`ˆðÌ¡OìHÆNt¾ÛÌ 4)±¥H™ X¾Kv®m¨µ-?œhj»Ðw4žë63M* N|î…Ž”:Ô¤ …RW "Ú/;6ÔhºÛÌ 4©Td~)±¹¤Ö%‹ä9·Ç¤M‡L»BŽ)wÝñÔÒ 4-k«öÍCKm`Q(9‚ 3&mZ#‰¯ß„¦%pñ]Å1ÇPîiWNÒE/9»ÖA7Äñú½AhZóѹ»R¢OrNùóÓJ ~ÛˆÕï B3áÍ"<—bG:AÂ틼P ÔÔÌŸ÷Ø•=\¿7Mkn >’pžç¥>°ˆ(UyDD´†Ïïòë´+¬ß„f43ì,P{€oQT¨6#Ä‚§¼è!Mñ:°zÀœ!õ9,îÛô°³ª/–œüÃYÞ¾ptÿo±hÚÁ¡¿¿äcûEåÔdI’Éì{P„þ©Ï˜#6-LKÑdOk=žô,D“S•rõ§0=Ó¿æ2`Š™]sƒPuÝ'»5«Eêób´ÔɆëzcÁ-A¨ ýJíKö1M ;ƒêsäêÐÉN¥Fö0}OT¹ÜjÝ=’ Àddµ&zZ›LîIíjª•Œ77Uë{ $ÙãØQ³dfÝøC׆Êqc“üÃ[+h´q‘{¸t¡©.‰Qsia„~ÏÑàD ˜³¡Ûõñþ¾}b“œñª#4ÚÓ ›fEáTh°¡rÌX ¡´Æxp‰Ș‡°@sà"”TNÅ`ð´”íiå:ÌK„Ú•7þb_“é?ný Bã¡eH¡ÚÊ9s‘Bhxß“!ô\jÔ€,>ð2€ÿ¾¨WtÆ[+!4ÖÓs™C¨vަ†ÒÇ[ A€+ÈVøÆëYÓ÷˜¹4‹¸jÙ`žƒ^Ooñ«ž ®2•$èýü×¼ÇóPFö~|û¯ŒîûUíû ¶/½)LôPö‚dZM*”fݲ«¯YßIöól6TGh¬0Ä?dV¦B•s45”&n®õ®€­$8t-~ý˜¹´[ ‡ú०ÃôEýª'‚klÃW8ê"=cCMwñ‡îøK!âýî#T®ùô-‹Õîim ƒ¯*Y!†Òáo³†ú”çü¦Íçb¡‘P;Q¿ê‰àZîÈÙ+ðx.N“]¹}¹}›]Ï‘ Qkñg2€P^9Fw-‹U4ÜÓÚ*"u Ké´Îë*„:%5ŠÙÒ`€„ê…J“$Û‚úU#A„¾ãg<ïñ<˜ Ÿç§¹Ôß;}éc#DŸj £hAL_ ¤^ѱÅ{«!4ÜÓÚJ›Bµs45”.€UªŽA\J™sÜEpÙú)si†PjÒ ÕÐF¹åÑУ‚øUOW¹HÓ äfîã1ëñ”):^ AŸ uÅMðˆýðÛî‹Piäk•oÆN™Úó–'ˆóa² >A¶Ž.á¯âub6¾-{_7" ‰W-|—¾³õ–3á]£èd¿Ïr‡:„Ê2˜Ø;ûuTdõfs¶¥ë^µ#Ü9âŒ|ûn¼Û¦>åò$è ’mð ÖëÚWñJyµì}É;HþûÅÀ)=k³YoVHÈÎs_BÞõd„Â÷O¹]÷ña;Âݪ|Çœ|ùS®O:öâlÖµ®â…R!úúðö¾O/Éõª…¯Ò³vÞÞ÷_µk•–À ¡WízË^ÎË`ƒ©¨=ýŒ9ÛÒu^u"<Bß-7^ÞÉ—È©N¹< ²¶º‚ÍåÀgÕñ~Ó¡¢î¾qض÷žÀ{úÄo6~¸!{Ÿµ÷ýWíúNj .|ª*ËàÏç…·+ëÀÏ7~Èz<"ºîñ~øÌ÷SzÜî‹;ø5âÆÛ”…"î$È †à?zÙ:²$~pWñ*)IsÓbðYÛ€Û.fLè2Yç¨ÛûÊ"TGàâô‰j]2ƒ ÖèàxM{T„zÇüšÿùq?ƒÐbít‰æZ&“ i OãÅÖªu2©PW Ü!“ i Ï 4#ƒAèªåƒÊF¬g¹åãáeíû-ï/kÜéýäÀYdgÑ^X.?ƒ"Tüû—„¨zÈ©û SÆ-¯×ý/›zjâ «~MøýØË%¿Ñ§zk¿K4rüÕu‹†:ß¡ë,~‡D( Æ'.öËJ-GÊÂvBO›#4Ú9î^iÐü:æÑ²ÈÝ™˜…4¶XIñ~¶Ž©ZS¡™#z˜ußÌ}k÷Ñ¡ÿÈï{âÞ#¦ˆ„!`-¿©ý~IBô´9õé2*š(‚=cwaARÞ>˜Rt˜Éõão9YäÊ}Û¹u1¾ÅÓ?úØ]â¬J¨å]MPèØºj„Ë„–O%-¥Ã ûV –}÷ãÎÝâ%ÅîËUº ù!(J_Í‚t%\…f9Ã…*eˆÔ+3y`Û"NÌë)Ñ7ž Ž€¢ehq N”mOñf.ª§í„»Q”*¬.Ðþ‘2´\ê/<×bh ®zZÚ¤²EÐN6so„rßú–½ØâÓub< X-ih•Û‡"¨e:{Ií‹Pì?n±ÌŒ¯JéiØM6§.ó¦SÔžE2ehNr“çßÖ¯dÚúHZô»ECYí‡dš“ì¼Ó¹'‰ªÎî¥È·œmºÑ4YjHk'„ªvh%ÉO]»ŽLlš{(i7Úê·××d©!­]ʱvè©Ì~ÛÖ,ú;¹×§È×e©!­Ê…Û¡G¤f Åkø«Œ“X•"¤Í”E^›#»v¸ðB*zp ÀDw­¡6«Q´'A[#¤Z kIÙÆùb­ÿ+ŽÖZ…¢] Ú¡%ýVœ8守κþ´S´/A"„‚—&¿ÊEfR"}ø«ÕJrdÛ½ôj+„H-^WÛB?28[Übر6гó¸ÛmÒ ÐrK;œN—«7¹yÀ[<`v‡®ù޶@(Ç·Lg+ÿrWÄÜŸ¼ð›=ü°|صFƒLU­Ðâf žtkâ"ÑxSã–¾šË(J»´:BúÒåÍŠ‹Dc¶±5«:EHƒÖF(WÌ1'Mö¾(xŽ´½»/‚®Eû—ƒˆVE(_çS]¡æþ0CÛ>Q̯ãIîâí>ÖŸH¡ÁFÆÞ¹™SrñD Oà2~÷+{oψҊ t\½zè¹Úq½gÖ;òO2­‹Ö£FZy¢¥@÷š2<íÇŤ)¿Ÿ•Ah BDBèÏ ¤UGCHù.Ê ”*Çbêëh™Œl@!¢Å5¶»Ÿç£2lœsÛÔ·¯ˆ¥ï˜8“Úö¤“3·ê5¼’‘‘ßÜX­Ø!G,îp‹æh××òT¨6ñ²(é-TH…@À„¥¯ó®P*4÷ü'h®ÿ·X!µSë£;(BñÄ Üj„þDª ikcÞ¾‹­Bd}Z5è¡‚ŸÙ¨ù´B4rþÀòκö¶¾!âK b‰Ë-3†­oØ—zÍÒ»8í¶;¨:úÂûö,} 2¤­­}©õn@]lëƒjG>„ò€¡ÿ€1+-|Ë.B|)èä+A#xø:90¬òÊiÖô"Ä ÿ‰éaܱíƒ ¾‡Ó >é°}tÇDˆÜÓÚåöd?Ïv*TÛÃθíªI…ð¾s–¾äXï~SÓÚ¬e½ÛD>„—iê¢Úäìˆ1qØ¥ VÀ]²¬qR4©bô"Ä?0º s`t9’r£ØjÝqr˜Ë­E}%A¡žO¬RY#äô-}‰imeÈK ß¿Ζ·²Þ3©e·ŠN²GfÂ+o¾S(€5B`sIóá cC@³€H/BÜ1$¸£¯ÎÕpqñGw\„j—[ζмÛî ÚÅÓ–¾Ôy—ZïRÛÆz7™CÈöJÝ @N‰S„NÁ!äûdÎ.Bù Ñh5„¸cqF_ßí«W¥Nû莉u­\n+ŸÜÒvâT–xÍÆ-ó[ùŒŒzÌc–¾‹òâ÷ŒYïR[f½ë<üOiõ[ìnUj‘"GZÄ-’‡ßqb— ¼ATÏÛ<¸¨ñí$1ˆr‹- pêE¨90zynÕV.h˜ ‚¸1HéF°¬´hÝÑÊTµjGM;ŽÞ¨i±#†ÐTëô¤íîÂÖé©°®Š{ “½:°s#´_*”͘ÖÞ'rú¬ß!ÓG¦W!ƒÐBÝ¡?ýIu³ÊË Dtm„L*´„ÉÈôêh)ßÅ#¥Ba¬WRyÆ¥ý¸˜Âƒ!„þ†”ýÍJâIÄé€2á…ÍÊväi [zîA¬ý¸˜6zÊlÑ£ˆñvFn(|**Ÿº‹¡íññl/¯¦%‰ÙàjQ`ºÎÄœ!©M|‚eŸ5’Ó„µÕÍö¨‰] ¬‰¤Z;›M?O©#„°Í¤±;ÕUeƒI3Þ_|ÛY:ǬфÔr¥L•<À„[-$éÌÄÞ),Ýdúù»J!úÎé”ÿSšZüo>ŒÈ?˜‹óu¤ŠP>“hTè$‰ô.p~…üKÈ>û;§^PÊ©|od~mTL!‚Ä]”ˆÿî~ž—W•2B¯lÙS£?_¸n˜.± 2’*BñF“É¥–Ð —ñÁÎÞ35_Kª©ÚÑIJx^n)سöu¿”ŠmµýdåˆÙ‘Ü´py`}›üLr·É $ò'YíNâêRCh£D(iy’Ÿƒ9öD ÊŒ&¤†¿ÉïÊùÕ¦ò­ ¹où¢…RB(nqh±%YäMmùyPðØhnÝËJ !‹«®iCê*÷lS°^"„rkƒÄ©ØKÀ‡Ê‘ŶkªøêRAÈß sL²’^I²øT)Ôï5s) ”Ú\nOÑnT‘!ÁSçœR@h‹æ_¹ÿ$Tc¨H]lj”$P´Á0!Å´„ÊWÝ7²w5Z>­äÚ þ-*¯+3$ÕYkTI¡pý1÷ m„-©ç‚†!É"„dÛûä…¬¥£ÔI0 ÉK!]OpŽK‡ïºahCI"´A«¢ju¾%ÃÐv’DÈ[½kC| ë”Ô´ö†ä$‡Pºú hAuž¬Ö“aHN`~n©©<Ú@éÙ(¾'×v&{QhXes…Š&%°|Ÿ‰é„\½3ætž½pâø³Æ„<[꽈VFHïÁv¦ÓýI=-˜I†ddjT#´Éh–ËÈ Ô¨™œp‹á,—‘A¨QƒI†$djÄM‘º~#üu4ŠPíÎܵf~•ïœ!ô¯7PÏdYFåñ Blµjà­¸ÝÓž÷¾‚ÆS¡ÚudCèêFôrgÅõÕ7{ ¦BƒÆ»"áö"à \4é½TÝü ŸåB ·ø£¡Ïã”ëæPFhÀV¹ —[9„«æð}G•7‚߯Úd9ù"ÖÏ Boð“Q{f²öÐ7b퇕#4øî$B]“eÞ¹¶:f.Ç9`~[̹ڙj!ººxÌ‚kl•‰‘2—®+ðÇ)'Ùª"à LÓ¨ÝÆd™Y?s©´2jÏL×–oÌr·ÌæÆ ¡›Tˆš,7¹}?dT»—ž»¥!2gy<– Ñ][Wáâà[eb¤ŒÃ­Í¡­o”r!´‚¦<-ª¡Æd|¨Á.—‘fËÌÖf1ubYc¤;ææËedm“å¾rûEªîªýjG32êëœð7áÖ¶ÊÔH‡[›Cç~9¶­Š€Gh«ù“. ¡Æd™Y?s}fËL×–o B‰(B¹š»üêø!7.ÇÔ<¿3Cd$ˆPåàÌÖ”áâàj¿gj¤ŒÃ­Í¡ý"m;>óEfÂsQ•w>ïOåüœQëçÚ—zžQFm™ÉZ Ý!ˆÉWæÉüG¨2Yö4®æ Oj?äÚ꘹.€vjy5DέÆòx!¶:jÎ  ™ire«L”sËcëð˵‚–§r«,dž´Õ¡šçjÒ’M‹²óVÌ %%CreationDate: Mon Feb 11 12:16:35 2002 %%Orientation: Portrait %%Pages: 1 %%DocumentFonts: Helvetica %%EndComments %%BeginProlog % Prolog copyright 1994-2000 Trolltech. You may copy this prolog in any way % that is directly related to this document. For other use of this prolog, % see your licensing agreement for Qt. /d/def load def/D{bind d}bind d/d2{dup dup}D/B{0 d2}D/W{255 d2}D/ED{exch d}D/D0 {0 ED}D/LT{lineto}D/MT{moveto}D/ND/.notdef d/S{stroke}D/F{setfont}D/SW{ setlinewidth}D/CP{closepath}D/RL{rlineto}D/NP{newpath}D/CM{currentmatrix}D/SM{ setmatrix}D/TR{translate}D/SC{aload pop setrgbcolor}D/BSt 0 d/LWi 1 d/PSt 1 d /Cx 0 d/Cy 0 d/WFi false d/OMo false d/BCol[1 1 1]d/PCol[0 0 0]d/BkCol[1 1 1]d /nS 0 d/LArr[[][][10 3][3 10][3 3][3 3][5 3 3 3][3 5 3 3][5 3 3 3 3 3][3 5 3 3 3 3]]d/GPS{PSt 1 ge PSt 5 le and{{LArr PSt 1 sub 2 mul get}{LArr PSt 2 mul 1 sub get}ifelse}{[]}ifelse}D/QS{PSt 0 ne{LWi SW gsave PCol SC true GPS 0 setdash S OMo PSt 1 ne and{grestore BkCol SC false GPS dup 0 get setdash S}{grestore} ifelse}if}D/BDArr[0.06 0.12 0.37 0.50 0.63 0.88 0.94]d/r28{{currentfile read pop dup 32 gt{exit}if pop}loop 3{currentfile read pop}repeat 0 4{7 bitshift exch dup 128 gt{84 sub}if 42 sub 127 and add}repeat}D/rA 0 d/rL 0 d/rB{rL 0 eq{ /rA r28 d/rL 28 d}if dup rL gt{rA exch rL sub rL exch/rA 0 d/rL 0 d rB exch bitshift add}{dup rA 16#fffffff 3 -1 roll bitshift not and exch dup rL exch sub /rL ED neg rA exch bitshift/rA ED}ifelse}D/rC{/rL 0 d 0{dup 2 index length ge{ exit}if 1 rB 1 eq{3 rB dup 4 ge{dup rB 1 index 5 ge{1 index 6 ge{1 index 7 ge{ 64 add}if 32 add}if 16 add}if 4 add exch pop}if 1 add 3 mul exch 10 rB 1 add 3 mul{dup 3 index lt{dup}{2 index}ifelse 4 index 3 index 3 index sub 2 index getinterval 5 index 4 index 3 -1 roll putinterval dup 4 -1 roll add 3 1 roll 4 -1 roll exch sub dup 0 eq{exit}if 3 1 roll}loop pop pop}{3 rB 1 add 3 mul{2 copy 8 rB put 1 add}repeat}ifelse}loop pop}D/rG{/rL 0 d 0{dup 2 index length ge {exit}if 1 rB 1 eq{3 rB dup 4 ge{dup rB 1 index 5 ge{1 index 6 ge{1 index 7 ge{ 64 add}if 32 add}if 16 add}if 4 add exch pop}if 1 add exch 10 rB 1 add{dup 3 index lt{dup}{2 index}ifelse 4 index 3 index 3 index sub 2 index getinterval 5 index 4 index 3 -1 roll putinterval dup 4 -1 roll add 3 1 roll 4 -1 roll exch sub dup 0 eq{exit}if 3 1 roll}loop pop pop}{3 rB 1 add{2 copy 8 rB put 1 add} repeat}ifelse}loop pop}D/sl D0/QCIgray D0/QCIcolor D0/QCIindex D0/QCI{ /colorimage where{pop false 3 colorimage}{exec/QCIcolor ED/QCIgray QCIcolor length 3 idiv string d 0 1 QCIcolor length 3 idiv 1 sub{/QCIindex ED/x QCIindex 3 mul d QCIgray QCIindex QCIcolor x get 0.30 mul QCIcolor x 1 add get 0.59 mul QCIcolor x 2 add get 0.11 mul add add cvi put}for QCIgray image}ifelse}D/defM matrix d/BF{gsave BSt 1 eq{BCol SC WFi{fill}{eofill}ifelse}if BSt 2 ge BSt 8 le and{BDArr BSt 2 sub get setgray fill}if BSt 9 ge BSt 14 le and{WFi{clip}{eoclip }ifelse defM SM pathbbox 3 index 3 index translate 4 2 roll 3 2 roll exch sub/h ED sub/w ED OMo{NP 0 0 MT 0 h RL w 0 RL 0 h neg RL CP BkCol SC fill}if BCol SC 0.3 SW NP BSt 9 eq BSt 11 eq or{0 4 h{dup 0 exch MT w exch LT}for}if BSt 10 eq BSt 11 eq or{0 4 w{dup 0 MT h LT}for}if BSt 12 eq BSt 14 eq or{w h gt{0 6 w h add{dup 0 MT h sub h LT}for}{0 6 w h add{dup 0 exch MT w sub w exch LT}for} ifelse}if BSt 13 eq BSt 14 eq or{w h gt{0 6 w h add{dup h MT h sub 0 LT}for}{0 6 w h add{dup w exch MT w sub 0 exch LT}for}ifelse}if S}if BSt 24 eq{}if grestore}D/mat matrix d/ang1 D0/ang2 D0/w D0/h D0/x D0/y D0/ARC{/ang2 ED/ang1 ED/h ED/w ED/y ED/x ED mat CM pop x w 2 div add y h 2 div add TR 1 h w div neg scale ang2 0 ge{0 0 w 2 div ang1 ang1 ang2 add arc}{0 0 w 2 div ang1 ang1 ang2 add arcn}ifelse mat SM}D/C D0/P{NP MT 0.5 0.5 rmoveto 0 -1 RL -1 0 RL 0 1 RL CP PCol SC fill}D/M{/Cy ED/Cx ED}D/L{NP Cx Cy MT/Cy ED/Cx ED Cx Cy LT QS}D/DL{NP MT LT QS}D/HL{1 index DL}D/VL{2 index exch DL}D/R{/h ED/w ED/y ED/x ED NP x y MT 0 h RL w 0 RL 0 h neg RL CP BF QS}D/ACR{/h ED/w ED/y ED/x ED x y MT 0 h RL w 0 RL 0 h neg RL CP}D/CLSTART{/clipTmp matrix CM d defM SM NP}D/CLEND{clip NP clipTmp SM}D/CLO{grestore gsave defM SM}D/xr D0/yr D0/rx D0/ry D0/rx2 D0/ry2 D0 /RR{/yr ED/xr ED/h ED/w ED/y ED/x ED xr 0 le yr 0 le or{x y w h R}{xr 100 ge yr 100 ge or{x y w h E}{/rx xr w mul 200 div d/ry yr h mul 200 div d/rx2 rx 2 mul d/ry2 ry 2 mul d NP x rx add y MT x y rx2 ry2 180 -90 x y h add ry2 sub rx2 ry2 270 -90 x w add rx2 sub y h add ry2 sub rx2 ry2 0 -90 x w add rx2 sub y rx2 ry2 90 -90 ARC ARC ARC ARC CP BF QS}ifelse}ifelse}D/E{/h ED/w ED/y ED/x ED mat CM pop x w 2 div add y h 2 div add translate 1 h w div scale NP 0 0 w 2 div 0 360 arc mat SM BF QS}D/A{16 div exch 16 div exch NP ARC QS}D/PIE{/ang2 ED/ang1 ED/h ED/w ED/y ED/x ED NP x w 2 div add y h 2 div add MT x y w h ang1 16 div ang2 16 div ARC CP BF QS}D/CH{16 div exch 16 div exch NP ARC CP BF QS}D/BZ{curveto QS}D /CRGB{255 div 3 1 roll 255 div 3 1 roll 255 div 3 1 roll}D/SV{BSt LWi PSt Cx Cy WFi OMo BCol PCol BkCol/nS nS 1 add d gsave}D/RS{nS 0 gt{grestore/BkCol ED/PCol ED/BCol ED/OMo ED/WFi ED/Cy ED/Cx ED/PSt ED/LWi ED/BSt ED/nS nS 1 sub d}if}D/BC {CRGB BkCol astore pop}D/BR{CRGB BCol astore pop/BSt ED}D/WB{1 W BR}D/NB{0 B BR }D/PE{setlinejoin setlinecap CRGB PCol astore pop/LWi ED/PSt ED LWi 0 eq{0.25 /LWi ED}if}D/P1{1 0 5 2 roll 0 0 PE}D/ST{defM setmatrix concat}D/qtfindfont{ true exch true exch{exch pop exch pop dup 0 get dup findfont dup/FontName get 3 -1 roll eq{exit}if}forall exch}d/qtdefinefont{dup 1 get/fxscale exch def 2 get /fslant exch def exch/fencoding exch def[fxscale 0 fslant 1 0 0]makefont fencoding false eq{}{dup maxlength dict begin{1 index/FID ne{def}{pop pop} ifelse}forall/Encoding fencoding def currentdict end}ifelse definefont pop}d/MF {qtfindfont qtdefinefont}D/MSF{findfont exch/slant exch d[1 0 slant 1 0 0] makefont definefont pop}D/DF{findfont/FONTSIZE 3 -1 roll d[FONTSIZE 0 0 FONTSIZE -1 mul 0 0]makefont d}D/ty 0 d/Y{/ty ED}D/Tl{NP 1 index exch MT 1 index 0 rlineto QS}D/T{PCol SC ty MT 1 index dup length exch stringwidth pop 3 -1 roll exch sub exch div exch 0 exch ashow}D/QI{/C save d pageinit/Cx 0 d/Cy 0 d/OMo false d}D/QP{C restore showpage}D %%EndProlog %%BeginSetup /pageinit { % 210*297mm (portrait) 0 842 translate 1 -1 scale/defM matrix CM d } d % Fonts and encodings used /HelveticaList [ [ /Helvetica 1.0 0.0 ] [ /Helvetica 0.987625 0 ] ] d % No embeddable font for Helvetica found /FE15[/.notdef/empty/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND /ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/ND/space/exclam/quotedbl/numbersign/dollar /percent/ampersand/quotesingle/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X /Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore/grave/a/b/c/d/e /f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde /ND/U0080/U0081/U0082/U0083/U0084/U0085/U0086/U0087/U0088/U0089/U008a/U008b /U008c/U008d/U008e/U008f/U0090/U0091/U0092/U0093/U0094/U0095/U0096/U0097/U0098 /U0099/U009a/U009b/U009c/U009d/U009e/U009f/space/exclamdown/cent/sterling/Euro /yen/Scaron/section/scaron/copyright/ordfeminine/guillemotleft/logicalnot /hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior/Zcaron/mu /paragraph/periodcentered/zcaron/onesuperior/ordmasculine/guillemotright/OE/oe /Ydieresis/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply /Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls/agrave /aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute /ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve /oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex /udieresis/yacute/thorn/ydieresis]d /F1 FE15 HelveticaList MF /F2 11/F1 DF %%EndSetup %%Page: 1 1 %%BeginPageSetup QI %%EndPageSetup W BC /OMo false d [0.95 0 0 1.05 -94 -104]ST [0.95 0 0 1.05 -94 -104]ST CLSTART 0 0 461 239 ACR CLEND 1093589172 1 0 255 255 0 1 PE 1 0 255 255 BR 100 100 200 200 R [1 0 0 1.0625 -99 -107.125]ST CLO [1 0 0 1.0625 -99 -107.125]ST CLSTART 0 0 461 239 ACR CLEND 1093589172 1 0 255 0 0 1 PE 1 0 255 0 BR 110 130 80 160 R [1 0 0 1 -99 -99]ST CLO [1 0 0 1 -99 -99]ST CLSTART 0 0 461 239 ACR CLEND 0 1 0 128 0 0 0 PE 1 192 192 0 BR 120 160 60 60 R [1 0 0 1 -99 -29]ST CLO [1 0 0 1 -99 -29]ST CLSTART 0 0 461 239 ACR CLEND 0 1 B 0 0 PE 1 192 192 0 BR 120 160 60 60 R [1 0 0 1 -99 -99]ST CLO [1 0 0 1 -99 -99]ST CLSTART 0 0 461 239 ACR CLEND 1093589172 1 0 255 0 0 1 PE 1 0 255 0 BR 200 130 80 170 R [1 0 0 1 11 7]ST CLO [1 0 0 1 11 7]ST CLSTART 0 0 461 239 ACR CLEND 1 1 B 0 0 PE NB F2 F 14 Y(CSpacegroup)69 0 T [1 0 0 1 21 37]ST 1 1 B 0 0 PE (CCell 1)36 0 T [1 0 0 1 111 38]ST 1 1 B 0 0 PE (CCell 2)36 0 T [1 0 0 1 31 65]ST 1 1 B 0 0 PE (Xmap)29 0 T 31 Y()33 0 T [1 0 0 1 31 137]ST 1 1 B 0 0 PE 14 Y(Xmap)29 0 T 31 Y()33 0 T [1.5 0 0 1.33333 -244.147 -132.333]ST 0 1 B 0 0 PE 1 0 255 255 BR 370 100 60 30 R [1.5 0 0 1.33333 -294.001 -52.333]ST CLO [1.5 0 0 1.33333 -294.001 -52.333]ST CLSTART 0 0 461 239 ACR CLEND 0 1 B 0 0 PE 1 0 255 0 BR 370 100 60 30 R [1.5 0 0 1.33333 -184.001 -52.3329]ST CLO [1.5 0 0 1.33333 -184.001 -52.3329]ST CLSTART 0 0 461 239 ACR CLEND 0 1 B 0 0 PE 1 0 255 0 BR 370 100 60 30 R [1.5 0 0 1.33333 -344.001 27.667]ST CLO [1.5 0 0 1.33333 -344.001 27.667]ST CLSTART 0 0 461 239 ACR CLEND 0 1 B 0 0 PE 1 192 192 0 BR 370 100 60 30 R [1.5 0 0 1.33333 -234.001 27.667]ST CLO [1.5 0 0 1.33333 -234.001 27.667]ST CLSTART 0 0 461 239 ACR CLEND 0 1 B 0 0 PE 1 192 192 0 BR 370 100 60 30 R [1 0 0 1 -99.1457 -99]ST CLO [1 0 0 1 -99.1457 -99]ST CLSTART 0 0 461 239 ACR CLEND 1 1 B 0 0 PE NB 417 173 450 140 DL [-0.707107 0.707107 -0.707107 -0.707107 310.854 81]ST B P1 1 B BR NP -10 0 MT -10 -2 LT 0 0 LT -10 2 LT CP BF QS [1 0 0 1 -149 -19]ST 1 1 B 0 0 PE NB 417 173 450 140 DL [-0.707107 0.707107 -0.707107 -0.707107 261 161]ST B P1 1 B BR NP -10 0 MT -10 -2 LT 0 0 LT -10 2 LT CP BF QS [1 0 0 1 313 11]ST 1 1 B 0 0 PE NB F2 F 14 Y(CSpacegroup)69 0 T [1 0 0 1 285 91]ST 1 1 B 0 0 PE (CCell 1)36 0 T [1 0 0 1 395 91]ST 1 1 B 0 0 PE (CCell 2)36 0 T [1 0 0 1 214 171]ST 1 1 B 0 0 PE (Xmap)62 0 T [1 0 0 1 325 171]ST 1 1 B 0 0 PE (Xmap)62 0 T [1 0 0 1 41 221]ST 1 1 B 0 0 PE (Hierarchy as 'nest')94 0 T [1 0 0 1 291 221]ST 1 1 B 0 0 PE (Hierarchy as 'tree')91 0 T [1 0 0 1 -49 -89]ST 1 1 B 0 0 PE 393 243 360 210 DL [0.707107 0.707107 -0.707107 0.707107 351 161]ST B P1 1 B BR NP -10 0 MT -10 -2 LT 0 0 LT -10 2 LT CP BF QS [1 0 0 1 1 -169]ST 1 1 B 0 0 PE NB 393 243 360 210 DL [0.707107 0.707107 -0.707107 0.707107 401 81]ST B P1 1 B BR NP -10 0 MT -10 -2 LT 0 0 LT -10 2 LT CP BF QS QP %%Trailer %%EOF clipper-2.1/aclocal.m40000644000374100011300000102404611372264326011602 00000000000000# generated automatically by aclocal 1.11 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, [m4_warning([this file was generated for autoconf 2.63. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 52 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac _LT_REQUIRED_DARWIN_CHECKS AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # -------------------------- # Check for some things on darwin AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[0123]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac ]) # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) libsuff=64 case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" m4_if($1,[],[ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- # set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognize shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognize a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], [AC_REQUIRE([LT_AC_PROG_SED])dnl dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac ])# AC_LIBTOOL_POSTDEP_PREDEP # AC_LIBTOOL_LANG_F77_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) AC_DEFUN([_LT_AC_LANG_F77_CONFIG], [AC_REQUIRE([AC_PROG_F77]) AC_LANG_PUSH(Fortran 77) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_AC_TAGVAR(GCC, $1)="$G77" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_F77_CONFIG # AC_LIBTOOL_LANG_GCJ_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], [AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_GCJ_CONFIG # AC_LIBTOOL_LANG_RC_CONFIG # ------------------------- # Ensure that the configuration vars for the Windows resource compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) AC_DEFUN([_LT_AC_LANG_RC_CONFIG], [AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_RC_CONFIG # AC_LIBTOOL_CONFIG([TAGNAME]) # ---------------------------- # If TAGNAME is not passed, then create an initial libtool script # with a default configuration from the untagged config vars. Otherwise # add code to config.status for appending the configuration named by # TAGNAME from the matching tagged config vars. AC_DEFUN([AC_LIBTOOL_CONFIG], [# The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ _LT_AC_TAGVAR(compiler, $1) \ _LT_AC_TAGVAR(CC, $1) \ _LT_AC_TAGVAR(LD, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ _LT_AC_TAGVAR(old_archive_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ _LT_AC_TAGVAR(predep_objects, $1) \ _LT_AC_TAGVAR(postdep_objects, $1) \ _LT_AC_TAGVAR(predeps, $1) \ _LT_AC_TAGVAR(postdeps, $1) \ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ _LT_AC_TAGVAR(archive_cmds, $1) \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ _LT_AC_TAGVAR(postinstall_cmds, $1) \ _LT_AC_TAGVAR(postuninstall_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ _LT_AC_TAGVAR(allow_undefined_flag, $1) \ _LT_AC_TAGVAR(no_undefined_flag, $1) \ _LT_AC_TAGVAR(export_symbols_cmds, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ _LT_AC_TAGVAR(hardcode_automatic, $1) \ _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do case $var in _LT_AC_TAGVAR(old_archive_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ _LT_AC_TAGVAR(archive_cmds, $1) | \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ _LT_AC_TAGVAR(module_cmds, $1) | \ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\[$]0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` ;; esac ifelse([$1], [], [cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" AC_MSG_NOTICE([creating $ofile])], [cfgfile="$ofile"]) cat <<__EOF__ >> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # Cheap backport of AS_EXECUTABLE_P and required macros # from Autoconf 2.59; we should not use $as_executable_p directly. # _AS_TEST_PREPARE # ---------------- m4_ifndef([_AS_TEST_PREPARE], [m4_defun([_AS_TEST_PREPARE], [if test -x / >/dev/null 2>&1; then as_executable_p='test -x' else as_executable_p='test -f' fi ])])# _AS_TEST_PREPARE # AS_EXECUTABLE_P # --------------- # Check whether a file is executable. m4_ifndef([AS_EXECUTABLE_P], [m4_defun([AS_EXECUTABLE_P], [AS_REQUIRE([_AS_TEST_PREPARE])dnl $as_executable_p $1[]dnl ])])# AS_EXECUTABLE_P # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) m4_include([config/ccp4.m4]) m4_include([config/clipper.m4]) m4_include([config/fftw.m4]) m4_include([config/gpp4.m4]) m4_include([config/mmdb.m4]) m4_include([config/utimbuf.m4]) clipper-2.1/NEWS0000644000374100011300000000072410736662163010441 00000000000000For latest changes, see ChangeLog Status: The API has been frozen for about 3 months now. However, new material is being added to support application development. Any API changes which are required will now, if possible, involve duplicating existing APIs so that existing programs still work. Optimisations are in the pipeline for reflection data NaN handling, spacegroups, and xmaps. New i/o classes will be made available for CCP4, cif, and other data formats. clipper-2.1/clipper/0000777000374100011300000000000011372264352011454 500000000000000clipper-2.1/clipper/ccp4/0000777000374100011300000000000011372264353012306 500000000000000clipper-2.1/clipper/ccp4/ccp4_utils.cpp0000644000374100011300000001176411144270257015005 00000000000000/* mtz_utils.cpp: ccp4 utils for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "ccp4_utils.h" #include #include #include CCP4CommandInput::CCP4CommandInput( int argc, char** argv, bool echo ) { for ( int arg = 0; arg < argc; arg++ ) { std::string thisarg( argv[arg] ); if ( thisarg.length() > 2 ) if ( thisarg[0] == '-' && thisarg[1] == '-' ) thisarg = thisarg.substr(1); if ( thisarg == "-stdin" ) { std::string line; while ( !std::getline(std::cin,line).eof() ) if ( line.length() > 0 ) if ( line[0] != '#' ) { int i = line.find_first_not_of( " \t" ); if ( i != std::string::npos ) { line = line.substr( i ); i = line.find_first_of( " \t" ); std::string word = line.substr( 0, i ); if ( word[0] != '-' ) word = "-" + word; push_back( word ); if ( i != std::string::npos ) { line = line.substr( i ); i = line.find_first_not_of( " \t" ); if ( i != std::string::npos ) { line = line.substr( i ); i = line.find_last_not_of( " \t" ); push_back( line.substr( 0, i+1 ) ); } } } } } else { push_back( thisarg ); } } if ( echo ) { // echo output for ( int i = 1; i < size(); i++ ) { char c1 = ' ', c2 = ' '; // spot keywords vs negative numbers if ( (*this)[i].length() > 0 ) c1 = (*this)[i][0]; if ( (*this)[i].length() > 1 ) c2 = (*this)[i][1]; if ( c1 == '-' && ( c2 < '0' || c2 > '9' ) ) std::cout << std::endl << (*this)[i].substr(1); // keywords on newline else std::cout << " \t" << (*this)[i]; // args on sameline } std::cout << std::endl; } } CCP4Program::CCP4Program( const char* name, const char* vers, const char* rcsdate ) { name_ = name; html = ( getenv( "CCP_SUPPRESS_HTML" ) == NULL ); summ = ( getenv( "CCP_SUPPRESS_SUMMARY" ) == NULL ); CCP4::ccp4ProgramName( (char*)name ); CCP4::ccp4_prog_vers( (char*)vers ); CCP4::ccp4RCSDate( (char*)rcsdate ); summary_beg(); if ( html ) std::cout << " " << std::endl << "
" << std::endl << "
" << std::endl;
  CCP4::ccp4_banner();
  summary_end();
  CCP4::ccp4ProgramTime(1);
}


CCP4Program::~CCP4Program()
{
  std::cout << std::endl;
  summary_beg();
  std::cout << name_ << ": " << msg_ << std::endl;
  CCP4::ccp4ProgramTime(0);
  if ( html ) std::cout << "
" << std::endl << "" << std::endl; summary_end(); } void CCP4Program::summary_beg() const { if ( summ ) { if ( html ) std::cout << "" << std::endl; else std::cout << "" << std::endl; } } void CCP4Program::summary_end() const { if ( summ ) { if ( html ) std::cout << "" << std::endl; else std::cout << "" << std::endl; } } clipper-2.1/clipper/ccp4/ccp4_mtz_io.cpp0000644000374100011300000014625611371767221015157 00000000000000/* mtz_io.cpp: class file for reflection data mtz importer */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "ccp4_mtz_io.h" #include "../core/hkl_datatypes.h" #include #include #include namespace clipper { char CCP4MTZ_type_registry::names[200][12]; char CCP4MTZ_type_registry::types[200][4]; ftype32 CCP4MTZ_type_registry::scales[200]; CCP4MTZ_type_registry mtz_type_registry; CCP4MTZ_type_registry::CCP4MTZ_type_registry() { for ( int j = 0; j < 200; j++ ) names[j][0] = '\0'; add_type( "I", "J", 1.0 ); add_type( "sigI", "Q", 1.0 ); add_type( "I+", "K", 1.0 ); add_type( "sigI+", "M", 1.0 ); add_type( "I-", "K", 1.0 ); add_type( "sigI-", "M", 1.0 ); add_type( "covI+-", "C", 1.0 ); add_type( "F", "F", 1.0 ); add_type( "sigF", "Q", 1.0 ); add_type( "F+", "G", 1.0 ); add_type( "sigF+", "L", 1.0 ); add_type( "F-", "G", 1.0 ); add_type( "sigF-", "L", 1.0 ); add_type( "covF+-", "C", 1.0 ); add_type( "E", "F", 1.0 ); add_type( "sigE", "Q", 1.0 ); add_type( "E+", "G", 1.0 ); add_type( "sigE+", "L", 1.0 ); add_type( "E-", "G", 1.0 ); add_type( "sigE-", "L", 1.0 ); add_type( "covE+-", "C", 1.0 ); add_type( "A", "A", 1.0 ); add_type( "B", "A", 1.0 ); add_type( "C", "A", 1.0 ); add_type( "D", "A", 1.0 ); add_type( "phi", "P", Util::rad2d(1.0) ); add_type( "fom", "W", 1.0 ); add_type( "flag", "I", 1.0 ); add_type( "Dano", "D", 1.0 ); add_type( "sigDano", "Q", 1.0 ); } void CCP4MTZ_type_registry::add_type( const String& name, const String& type, const ftype32& scale ) { int i, j; for ( j = 0; j < 200; j++ ) if ( names[j][0] == '\0' ) break; if ( j == 200 ) Message::message( Message_fatal( "CCP4MTZ_type_registry: registry full." ) ); for ( i = 0; i < Util::min( int(name.length()), 11 ); i++ ) names[j][i] = name[i]; names[j][i] = '\0'; for ( i = 0; i < Util::min( int(type.length()), 3 ); i++ ) types[j][i] = type[i]; types[j][i] = '\0'; scales[j] = scale; } String CCP4MTZ_type_registry::type( const String& name ) { int j; for ( j = 0; j < 200; j++ ) if ( String( names[j] ) == name ) break; if ( j == 200 ) Message::message( Message_fatal( "CCP4MTZ_type_registry: name not found." ) ); return String( types[j] ); } ftype32 CCP4MTZ_type_registry::scale( const String& name ) { int j; for ( j = 0; j < 200; j++ ) if ( String( names[j] ) == name ) break; if ( j == 200 ) Message::message( Message_fatal( "CCP4MTZ_type_registry: name not found." ) ); return scales[j]; } /* return the mtz path of a column as a string */ String mtz_col_path( CMtz::MTZ* mtz, CMtz::MTZCOL* col ) { char* resultchr = CMtz::MtzColPath( mtz, col ); String resultstr( resultchr ); free(resultchr); return resultstr; } /* build a lookup of columns in a crystal */ std::vector build_lookup( CMtz::MTZ* mtzin ) { std::vector result; for (int x=0; x < CMtz::MtzNxtal(mtzin); x++) { CMtz::MTZXTAL* xtl = CMtz::MtzIxtal(mtzin,x); for (int s=0; s < CMtz::MtzNsetsInXtal(xtl); s++) { CMtz::MTZSET* set = CMtz::MtzIsetInXtal(xtl,s); for (int c=0; c < CMtz::MtzNcolsInSet(set); c++) result.push_back( CMtz::MtzIcolInSet(set,c) ); } } return result; } /* Turn a clipper path name into a list of MTZ column paths. */ const std::vector mtz_assign( const String& assign, const String& type, const String& ftype, const int& f_size ) { // Translate aassignment to mtz column names // ... loop through each list in turn std::vector mtz_names( f_size, "MNF" ); // interpret list name in terms of columns if ( assign.find( "[" ) == String::npos ) { // name is a single path: add type extenders std::vector list = ftype.split(" "); for (int i=0; i < list.size(); i++) mtz_names[i] = assign + "." + type + "." + list[i]; } else { // name is a list of mtz columns: extract column names from list String pref = assign.substr( 0, assign.find("[") ); String post = assign.substr( assign.find("[") + 1, assign.find("]") - assign.find("[") - 1 ); std::vector list = post.split(", "); for (int i=0; i < list.size(); i++) mtz_names[i] = pref + list[i]; } return mtz_names; } /* Check whether a dummy input column name has been given to suppress input or output of some of the data. */ bool is_virtual_col( const String& path ) { // test for virtual column name String name = path.tail(); return ( name=="MNF" || name=="NAN" || name=="mnf" || name=="nan" ); } /* Do glob matching on two strings. The second string may contain '*'. */ bool match_glob( const String& s1, const String& s2 ) { if ( s2.find('*') == String::npos ) return s1 == s2; String s2a = s2.substr( 0, s2.find('*') ); String s2b = s2.substr( s2.find('*') + 1 ); return ( s2a == s1.substr( 0, s2a.length() ) && s2b == s1.substr( s1.length() - s2b.length(), s2b.length() ) ); } /* Read spacegroup info from mtzin */ void read_spacegroup( CMtz::MTZ* mtzin, Spacegroup& sg ) { ftype rsym[4][4]; String symops; for ( int i = 0; i < mtzin->mtzsymm.nsym; i++ ) { for ( int j = 0; j < 4; j++ ) for ( int k = 0; k < 4; k++ ) rsym[j][k] = mtzin->mtzsymm.sym[i][j][k]; symops += Symop(rsym).format() + ";"; } sg.init( Spgr_descr( symops, Spgr_descr::Symops ) ); } /* Write spacegroup info to mtzout */ void write_spacegroup( CMtz::MTZ* mtzout, const Spacegroup& sg ) { // tables of MTZ symbols char mtzlauetab[231][8]={"?","1","-1","2","2","2","m","m","m","m","2/m","2/m","2/m","2/m","2/m","2/m","222","222","222","222","222","222","222","222","222","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","4","4","4","4","4","4","-4","-4","4/m","4/m","4/m","4/m","4/m","4/m","422","422","422","422","422","422","422","422","422","422","4mm","4mm","4mm","4mm","4mm","4mm","4mm","4mm","4mm","4mm","4mm","4mm","-4m2","-4m2","-4m2","-4m2","-42m","-42m","-42m","-42m","-42m","-42m","-4m2","-4m2","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","3","3","3","3","-3","-3","312","321","312","321","312","321","32","3m1","31m","3m1","31m","3m","3m","-31m","-31m","-3m1","-3m1","-3m","-3m","6","6","6","6","6","6","-6","6/m","6/m","622","622","622","622","622","622","6mm","6mm","6mm","6mm","-62m","-62m","-6m2","-6m2","6/mmm","6/mmm","6/mmm","6/mmm","23","23","23","23","23","m-3","m-3","m-3","m-3","m-3","m-3","m-3","432","432","432","432","432","432","432","432","-43m","-43m","-43m","-43m","-43m","-43m","m-3m","m-3m","m-3m","m-3m","m-3m","m-3m","m-3m","m-3m","m-3m","m-3m"}; unsigned int ccp4_code[][2] = { {0x90a34743,1003},{0x7851c0d1,1004},{0x6042abb6,4005},{0x458c0b8c,1005},{0x939daf66,1006},{0xd9a7d85a,1007},{0x5b2a5e1b,1009},{0x9b92779f,1010},{0x31194672,1011},{0x97e84b5c,1012},{0xc9e50c74,1013},{0xdc48ad2f,1014},{0xb0d2ac85,1015},{0xd756eb1b,1017},{0x10e6701,2017},{0xee8326bb,3018},{0x82570fbb,2018},{0xadb55f32,1059},{0xd5a0aa2d,1146},{0xd9a29bac,1148},{0xa20b8591,1155},{0xb951b4f7,1160},{0x219be015,1161},{0x1c80e47a,1166},{0xbb691c91,1167},{0x9b92779f,1010},{0xd9a29bac,1148},{0x1c80e47a,1166} }; String mtzlaue = String("PG")+mtzlauetab[sg.spacegroup_number()]; String mtzsymb = sg.symbol_hm(); if ( sg.symbol_hm_ext() == "H" || sg.symbol_hm_ext() == "R" ) mtzsymb = sg.symbol_hm_ext() + mtzsymb.substr(1); int mtzspgn = sg.spacegroup_number(); for ( int s = 0; s < sizeof(ccp4_code)/sizeof(ccp4_code[0]); s++ ) if ( ccp4_code[s][0] == sg.hash() ) mtzspgn = ccp4_code[s][1]; // now write the records mtzout->mtzsymm.spcgrp = mtzspgn; mtzout->mtzsymm.nsym = sg.num_symops(); mtzout->mtzsymm.nsymp = sg.num_primops(); mtzout->mtzsymm.symtyp = mtzsymb[0]; strncpy( mtzout->mtzsymm.spcgrpname, mtzsymb.c_str(), 11 ); strncpy( mtzout->mtzsymm.pgname, mtzlaue.c_str(), 11 ); for ( int i = 0; i < sg.num_symops(); i++ ) { for ( int j = 0; j < 3; j++ ) for ( int k = 0; k < 3; k++ ) mtzout->mtzsymm.sym[i][j][k] = sg.symop(i).rot()(j,k); for ( int j = 0; j < 3; j++ ) mtzout->mtzsymm.sym[i][j][3] = sg.symop(i).trn()[j]; } /* CSym::ccp4_symop symops[sg.num_symops()]; for ( int i = 0; i < sg.num_symops(); i++ ) { for ( int j = 0; j < 3; j++ ) for ( int k = 0; k < 3; k++ ) symops[i].rot[j][k] = sg.symop(i).rot()(j,k); for ( int j = 0; j < 3; j++ ) symops[i].trn[j] = sg.symop(i).trn()[j]; } CSym::CCP4SPG* cspg = CSym::ccp4_spgrp_reverse_lookup( sg.num_symops(), symops ); if ( cspg != NULL ) { float msymops[192][4][4] = {{{}}}; for ( int i = 0; i < cspg->nsymop; i++ ) CCP4::rotandtrn_to_mat4( msymops[i], cspg->symop[i] ); char symbol[20]; strncpy( symbol, cspg->symbol_xHM, 20 ); CSym::ccp4spg_name_de_colon( symbol ); char lattice[2] = { symbol[0], '\0' }; int err = ccp4_lwsymm( mtzout, cspg->nsymop, cspg->nsymop_prim, msymops, lattice, cspg->spg_ccp4_num, symbol, cspg->point_group ); if ( err == 0 ) Message::message( Message_fatal( "CCP4MTZfile::close_write: Unable to write spacegroup info. lwsymm failed." ) ); CSym::ccp4spg_free( &cspg ); } else { Message::message( Message_fatal( "CCP4MTZfile::close_write: Unable to write spacegroup info.\nCCP4 not configured or unsupported spacegroup." ) ); } */ } /* Read hierarchy from mtzin */ void read_hierarchy( CMtz::MTZ* mtzin, std::vector& crystals ) { crystals.clear(); CCP4MTZfile::crystalinf newxtl; CCP4MTZfile::datasetinf newset; CCP4MTZfile::datacolinf newcol; for (int x=0; x < CMtz::MtzNxtal(mtzin); x++) { CMtz::MTZXTAL* xtl = CMtz::MtzIxtal(mtzin,x); newxtl.crystal = MTZcrystal( xtl->xname, xtl->pname, Cell( Cell_descr( xtl->cell[0], xtl->cell[1], xtl->cell[2], xtl->cell[3], xtl->cell[4], xtl->cell[5] ) ) ); crystals.push_back( newxtl ); for (int s=0; s < CMtz::MtzNsetsInXtal(xtl); s++) { CMtz::MTZSET* set = CMtz::MtzIsetInXtal(xtl,s); newset.dataset = MTZdataset( set->dname, set->wavelength ); crystals.back().datasets.push_back( newset ); for (int c=0; c < CMtz::MtzNcolsInSet(set); c++) { const CMtz::MTZCOL* col = CMtz::MtzIcolInSet(set,c); newcol.label = col->label; newcol.type = col->type; crystals.back().datasets.back().columns.push_back( newcol ); } } } } /* Write columns to mtzout */ void write_hierarchy( CMtz::MTZ* mtzout, std::vector& crystals ) { for (int x = 0; x < crystals.size(); x ++ ) { const MTZcrystal& cxtl = crystals[x].crystal; float cp[6]; cp[0] = cxtl.a(); cp[3] = cxtl.alpha_deg(); cp[1] = cxtl.b(); cp[4] = cxtl.beta_deg(); cp[2] = cxtl.c(); cp[5] = cxtl.gamma_deg(); CMtz::MTZXTAL* mxtl = CMtz::MtzAddXtal( mtzout, cxtl.crystal_name().c_str(), cxtl.project_name().c_str(), cp ); for (int s = 0; s < crystals[x].datasets.size(); s ++ ) { const MTZdataset& cset = crystals[x].datasets[s].dataset; CMtz::MTZSET* mset = CMtz::MtzAddDataset( mtzout, mxtl, cset.dataset_name().c_str(), cset.wavelength() ); for (int c = 0; c < crystals[x].datasets[s].columns.size(); c ++ ) CMtz::MtzAddColumn( mtzout, mset, crystals[x].datasets[s].columns[c].label.c_str(), crystals[x].datasets[s].columns[c].type.c_str() ); } } } /* Build a column cross-reference */ void reference_cols( CMtz::MTZ* mtz, std::vector lookup, std::vector > hkl_data_cols, std::vector >& cols, std::vector >& scls ) { // Lookup the input columns int nlst = hkl_data_cols.size(); cols.clear(); scls.clear(); cols.resize( nlst ); scls.resize( nlst ); // handle each data list in turn. Each may have several mtz cols for ( int lst = 0; lst < nlst; lst++ ) { int ncols = hkl_data_cols[lst].size(); cols[lst].resize( ncols, -1 ); scls[lst].resize( ncols, 1.0 ); // assign the columns to mtz indexes for ( int col = 0; col < ncols; col++ ) // loop over columns in list if ( !is_virtual_col( hkl_data_cols[lst][col].path ) ) { int mcol; // loop over cols in MTZ for ( mcol = 0; mcol < lookup.size(); mcol++ ) if ( hkl_data_cols[lst][col].path == mtz_col_path( mtz, lookup[mcol] ) ) break; if ( mcol == lookup.size() ) Message::message( Message_fatal( "CCP4MTZfile - internal error" ) ); cols[lst][col] = mcol; // store column index scls[lst][col] = hkl_data_cols[lst][col].scale; } } } /*! Look up the crystal, dataset and column corresponding to the given mtz path. True if exact column match found. */ bool CCP4MTZfile::match_path( const String& path, int& x, int& s, int& c ) { std::vector names = path.split("/"); for ( x = 0; x < crystals.size(); x ++ ) if ( match_glob(crystals[x].crystal.crystal_name(),names[0]) ) for ( s = 0; s < crystals[x].datasets.size(); s ++ ) if ( match_glob(crystals[x].datasets[s].dataset.dataset_name(),names[1] ) ) for ( c = 0; c < crystals[x].datasets[s].columns.size(); c ++ ) if ( match_glob(crystals[x].datasets[s].columns[c].label,names[2]) ) return true; c = -1; for ( x = 0; x < crystals.size(); x ++ ) if ( match_glob(crystals[x].crystal.crystal_name(),names[0]) ) for ( s = 0; s < crystals[x].datasets.size(); s ++ ) if ( match_glob(crystals[x].datasets[s].dataset.dataset_name(),names[1] ) ) return false; s = -1; for ( x = 0; x < crystals.size(); x ++ ) if ( match_glob(crystals[x].crystal.crystal_name(),names[0]) ) return false; x = -1; return false; } /*! Constructing an CCP4MTZfile does nothing except flag the object as not attached to any file for either input or output */ CCP4MTZfile::CCP4MTZfile() { mode = NONE; colmode = Default; } /*! Close any files which were left open. This is particularly important since to access the MTZ file efficiently, data reads and writes are deferred until the file is closed. */ CCP4MTZfile::~CCP4MTZfile() { switch ( mode ) { case READ: close_read(); break; case WRITE: close_write(); break; case APPEND: close_append(); break; case NONE: break; } } /*! The file is opened for reading. This CCP4MTZfile object will remain attached to this file until it is closed. Until that occurs, no other file may be opened with this object, however another CCP4MTZfile object could be used to access another file. \param filename_in The input filename or pathname. */ void CCP4MTZfile::open_read( const String filename_in ) { if ( mode != NONE ) Message::message( Message_fatal( "CCP4MTZfile: open_read - File already open" ) ); // read the mtz filename_in_ = filename_in; // open file CMtz::MTZ* mtzin = CMtz::MtzGet( filename_in_.c_str(), 0 ); if ( mtzin == NULL ) Message::message( Message_fatal( "CCP4MTZfile: open_read - File missing or corrupted: "+filename_in_ ) ); CMtz::MtzAssignHKLtoBase( mtzin ); // get the list of column names/paths read_hierarchy( mtzin, crystals ); int x, s, c; match_path( "/HKL_base/HKL_base/H", x, s, c ); if ( x < 0 ) Message::message( Message_fatal( "CCP4MTZfile: No cell! " ) ); cell_ = crystals[x].crystal; // get spacegroup by decoding symops read_spacegroup( mtzin, spacegroup_ ); // get resolution: float minres, maxres; CMtz::MtzResLimits( mtzin, &minres, &maxres ); resolution_.init( 0.9999 / sqrt( Util::max(minres,maxres) ) ); if ( Util::min(minres,maxres) > 0.0 ) reslim_low = ( 1.0001 / sqrt( Util::min(minres,maxres) ) ); else reslim_low = 1000000.0; hkl_sampling_ = HKL_sampling( cell_, resolution_ ); // get title , history title_ = String( mtzin->title, 70 ); history_ = std::vector( mtzin->histlines ); for ( int h = 0; h < history_.size(); h++ ) history_[h] = String( mtzin->hist + MTZRECORDLENGTH*h, MTZRECORDLENGTH ); num_reflections_ = CMtz::MtzNref( mtzin ); // Sort order int isort[5]; CMtz::ccp4_lrsort( mtzin, isort ); sort_order_.assign(isort, isort+5); ccp4_spacegroup_number_ = mtzin->mtzsymm.spcgrp; // close file CMtz::MtzFree( mtzin ); mode = READ; } /*! Close the file after reading. This command also actually fills in the data in any HKL_data structures which have been marked for import. */ void CCP4MTZfile::close_read() { if ( mode != READ ) Message::message( Message_fatal( "CCP4MTZfile: no file open for read" ) ); // close the mtz: // this actually imports the data from the mtz file // - we save up all the work to do it on a single pass HKL hkl; float fdata_i[1000]; // file data: allow up to 1000 columns on file int idata_i[1000]; // flag data: allow up to 1000 columns on file xtype pdata[100]; // program data: allow up to 100 floats per group type float res; int ref, lst, col; // open file CMtz::MTZ* mtzin = CMtz::MtzGet( filename_in_.c_str(), 0 ); if ( mtzin == NULL ) Message::message( Message_fatal( "CCP4MTZfile: close_read - File missing or corrupted: "+filename_in_ ) ); CMtz::MtzAssignHKLtoBase( mtzin ); std::vector lookup_i = build_lookup( mtzin ); // lookup hkl cols int hklcol_i[3] = {0,1,2}; for ( int i = 0; i < lookup_i.size(); i++ ) { if ( mtz_col_path( mtzin, lookup_i[i] ).tail() == "H" ) hklcol_i[0] = i; if ( mtz_col_path( mtzin, lookup_i[i] ).tail() == "K" ) hklcol_i[1] = i; if ( mtz_col_path( mtzin, lookup_i[i] ).tail() == "L" ) hklcol_i[2] = i; } // Lookup the input columns std::vector > cols; std::vector > scls; reference_cols( mtzin, lookup_i, hkl_data_cols, cols, scls ); // update the data lists to ensure size consistency for ( lst = 0; lst < hkl_data_i.size(); lst++ ) hkl_data_i[lst]->update(); // Import the data for ( ref = 0; ref < CMtz::MtzNref( mtzin ); ref++ ) { // read reflection CMtz::ccp4_lrreff( mtzin, &res, fdata_i, idata_i, (const CMtz::MTZCOL**) &lookup_i[0], lookup_i.size(), ref+1 ); hkl = HKL( Util::intr(fdata_i[hklcol_i[0]]), Util::intr(fdata_i[hklcol_i[1]]), Util::intr(fdata_i[hklcol_i[2]]) ); // do each data list for ( lst = 0; lst < cols.size(); lst++ ) { // for each list, grab the relevent columns for ( col = 0; col < cols[lst].size(); col++ ) { // set to NaN unless readable and present Util::set_null( pdata[col] ); //pdata[col] = Util::nanf(); // try and read the data if ( cols[lst][col] >= 0 ) if ( !idata_i[cols[lst][col]] ) pdata[col] = xtype( fdata_i[cols[lst][col]] / scls[lst][col] ); } // now set the data hkl_data_i[lst]->data_import( hkl, pdata ); } } // tidy up CMtz::MtzFree( mtzin ); hkl_data_i.clear(); hkl_data_cols.clear(); crystals.clear(); assigned_paths_.clear(); filename_in_ = filename_out_ = ""; mode = NONE; } /*! The file is opened for writing. This will be a new file, created entirely from data from within the program, rather than by extending an existing file. Similar restrictions apply as for open_read(). In practice the open_append() method is usually preferred. \param filename_out The output filename or pathname. */ void CCP4MTZfile::open_write( const String filename_out ) { if ( mode != NONE ) Message::message( Message_fatal( "CCP4MTZfile: open_write - File already open" ) ); // make the h,k,l columns to the local list crystalinf newxtl; datasetinf newset; datacolinf newcol; newxtl.crystal = MTZcrystal( "HKL_base", "HKL_base", Cell() ); newset.dataset = MTZdataset( "HKL_base", 9.999 ); newcol.label = newcol.type = "H"; // add columns crystals.push_back(newxtl); crystals[0].datasets.push_back(newset); crystals[0].datasets[0].columns.push_back(newcol); newcol.label = "K"; crystals[0].datasets[0].columns.push_back(newcol); newcol.label = "L"; crystals[0].datasets[0].columns.push_back(newcol); // title, history title_ = "From Clipper CCP4MTZfile"; history_.clear(); filename_out_ = filename_out; mode = WRITE; } /*! Close the file after writing. This command also actually writes the data reflection list from the HKL_info object and the data from any HKL_data objects which have been marked for import. */ void CCP4MTZfile::close_write() { if ( mode != WRITE ) Message::message( Message_fatal( "CCP4MTZfile: no file open for write" ) ); // close the mtz: // this actually exports the data from the mtz file // - we save up all the work to do it on a single pass HKL hkl; float fdata[1000]; // file data: allow up to 1000 columns on file int idata[1000]; // flag data: allow up to 1000 columns on file xtype pdata[100]; // program data: allow up to 100 floats per group type int ref, lst, col, c; // set the cell for the HKL crystal crystals[0].crystal = MTZcrystal( "HKL_base", "HKL_base", hkl_info_o->cell()); // NOW THE ACTUAL MTZ STUFF // create the mtz object CMtz::MTZ* mtzout = CMtz::MtzMalloc( 0, 0 ); // write general info mtzout->refs_in_memory = 0; write_spacegroup( mtzout, spacegroup() ); CMtz::ccp4_lwtitl( mtzout, (char*)title_.c_str(), 0 ); std::vector newhist( history_.size()*MTZRECORDLENGTH, ' ' ); for ( int h = 0; h < history_.size(); h++ ) for ( int c = 0; c < history_[h].size(); c++ ) newhist[h*MTZRECORDLENGTH+c] = history_[h][c]; CMtz::MtzAddHistory( mtzout, (const char (*)[MTZRECORDLENGTH])&(newhist[0]), history_.size() ); // add all the stored columns to the mtz list write_hierarchy( mtzout, crystals ); std::vector lookup_o = build_lookup( mtzout ); // Lookup the output columns std::vector > cols; std::vector > scls; reference_cols( mtzout, lookup_o, hkl_data_cols, cols, scls ); // write the data int nref = hkl_info_o->num_reflections(); mtzout->fileout = CMtz::MtzOpenForWrite( filename_out_.c_str() ); for ( ref = 0; ref < nref; ref++ ) { // read/append reflection hkl = hkl_info_o->hkl_of(ref); fdata[0] = float( hkl.h() ); fdata[1] = float( hkl.k() ); fdata[2] = float( hkl.l() ); idata[0] = idata[1] = idata[2] = 0; // output reflection for ( lst = 0; lst < cols.size(); lst++ ) { // for each list, fetch the data hkl_data_o[lst]->data_export( hkl, pdata ); // and copy to the relevent columns for ( col = 0; col < cols[lst].size(); col++ ) { // set to mtz->mnf, unless we have a value for it if ( !Util::is_nan( pdata[col] ) && cols[lst][col] >= 0 ) { idata[ cols[lst][col] ] = 0; fdata[ cols[lst][col] ] = float( pdata[col] * scls[lst][col] ); } else { idata[ cols[lst][col] ] = 1; fdata[ cols[lst][col] ] = 0.0; } } } // write appended record // help: no equivalent to lrrefl! Need idata and lookup for ( c = 0; c < lookup_o.size(); c++ ) if (idata[c]) fdata[c] = CCP4::ccp4_nan().f; CMtz::ccp4_lwrefl( mtzout, fdata, &lookup_o[0], lookup_o.size(), ref+1 ); } // tidy up CMtz::MtzPut( mtzout, filename_out_.c_str() ); CMtz::MtzFree( mtzout ); hkl_data_o.clear(); hkl_data_cols.clear(); crystals.clear(); assigned_paths_.clear(); filename_in_ = filename_out_ = ""; mode = NONE; } /*! A file is opened for appending. One file is opened for reading, and a second is opened for writing. The second file will contain all the information from the first, plus any additional columns exported from HKL_data objects. \param filename_in The input filename or pathname. \param filename_out The output filename or pathname. */ void CCP4MTZfile::open_append( const String filename_in, const String filename_out ) { if ( mode != NONE ) Message::message( Message_fatal( "CCP4MTZfile: open_append - File already open" ) ); // read the mtz filename_in_ = filename_in; filename_out_ = filename_out; // open file CMtz::MTZ* mtzin = CMtz::MtzGet( filename_in_.c_str(), 0 ); if ( mtzin == NULL ) Message::message( Message_fatal( "CCP4MTZfile: open_append - File missing or corrupted: "+filename_in_ ) ); CMtz::MtzAssignHKLtoBase( mtzin ); // get the list of column names/paths read_hierarchy( mtzin, crystals ); int x, s, c; match_path( "/HKL_base/HKL_base/H", x, s, c ); if ( x < 0 ) Message::message( Message_fatal( "CCP4MTZfile: No cell! " ) ); cell_ = crystals[x].crystal; // get spacegroup by decoding symops read_spacegroup( mtzin, spacegroup_ ); // get resolution: float minres, maxres; CMtz::MtzResLimits( mtzin, &minres, &maxres ); resolution_.init( 0.9999 / sqrt( Util::max(minres,maxres) ) ); hkl_sampling_ = HKL_sampling( cell_, resolution_ ); // title, history title_ = String( mtzin->title, 70 ); history_ = std::vector( mtzin->histlines ); for ( int h = 0; h < history_.size(); h++ ) history_[h] = String( mtzin->hist + MTZRECORDLENGTH*h, MTZRECORDLENGTH ); // close file CMtz::MtzFree( mtzin ); mode = APPEND; } /*! Close the files after appending. This command actually copies the input file to the output file, adding data from any HKL_data objects which have been marked for import. */ void CCP4MTZfile::close_append() { if ( mode != APPEND ) Message::message( Message_fatal( "CCP4MTZfile: no file open for append" ) ); // close the mtz: // this actually exports the data from the mtz file // - we save up all the work to do it on a single pass HKL hkl; float fdata_i[1000]; // file data: allow up to 1000 columns on file int idata_i[1000]; // flag data: allow up to 1000 columns on file float fdata[1000]; // file data: allow up to 1000 columns on file int idata[1000]; // flag data: allow up to 1000 columns on file xtype pdata[100]; // program data: allow up to 100 floats per group type float res; int ref, lst, col, c; // NOW THE ACTUAL MTZ STUFF // open file CMtz::MTZ* mtzin = CMtz::MtzGet( filename_in_.c_str(), 0 ); if ( mtzin == NULL ) Message::message( Message_fatal( "CCP4MTZfile: close_append - File missing or corrupted: "+filename_in_ ) ); CMtz::MtzAssignHKLtoBase( mtzin ); std::vector lookup_i = build_lookup( mtzin ); // lookup hkl cols int hklcol_i[3] = {0,1,2}; for ( int i = 0; i < lookup_i.size(); i++ ) { if ( mtz_col_path( mtzin, lookup_i[i] ).tail() == "H" ) hklcol_i[0] = i; if ( mtz_col_path( mtzin, lookup_i[i] ).tail() == "K" ) hklcol_i[1] = i; if ( mtz_col_path( mtzin, lookup_i[i] ).tail() == "L" ) hklcol_i[2] = i; } // create the mtz object CMtz::MTZ* mtzout = CMtz::MtzMalloc( 0, 0 ); // write general info mtzout->refs_in_memory = 0; mtzout->mtzsymm.nsym = mtzin->mtzsymm.nsym; mtzout->mtzsymm.nsymp = mtzin->mtzsymm.nsymp; mtzout->mtzsymm.symtyp = mtzin->mtzsymm.symtyp; mtzout->mtzsymm.spcgrp = mtzin->mtzsymm.spcgrp; strncpy( mtzout->mtzsymm.spcgrpname,mtzin->mtzsymm.spcgrpname, 11 ); strncpy( mtzout->mtzsymm.pgname, mtzin->mtzsymm.pgname , 11 ); for ( int i = 0; i < mtzin->mtzsymm.nsym; i++ ) for ( int j = 0; j < 4; j++ ) for ( int k = 0; k < 4; k++ ) mtzout->mtzsymm.sym[i][j][k] = mtzin->mtzsymm.sym[i][j][k]; CMtz::ccp4_lwtitl( mtzout, (char*)title_.c_str(), 0 ); std::vector newhist( history_.size()*MTZRECORDLENGTH, ' ' ); for ( int h = 0; h < history_.size(); h++ ) for ( int c = 0; c < history_[h].size(); c++ ) newhist[h*MTZRECORDLENGTH+c] = history_[h][c]; CMtz::MtzAddHistory( mtzout, (const char (*)[MTZRECORDLENGTH])&(newhist[0]), history_.size() ); // add all the stored columns to the mtz list write_hierarchy( mtzout, crystals ); std::vector lookup_o = build_lookup( mtzout ); // Lookup the output columns std::vector > cols; std::vector > scls; reference_cols( mtzout, lookup_o, hkl_data_cols, cols, scls ); // make list of data to append std::vector cpcols( lookup_i.size() ); for ( int i = 0; i < lookup_i.size(); i++ ) { String name_i = mtz_col_path( mtzin, lookup_i[i] ); for ( c = 0; c < lookup_o.size(); c++ ) if ( name_i == mtz_col_path( mtzout, lookup_o[c] ) ) break; if ( c == lookup_o.size() ) Message::message( Message_fatal( "CCP4MTZfile - internal error" ) ); cpcols[i] = c; } // write the data int nref = CMtz::MtzNref( mtzin ); mtzout->fileout = CMtz::MtzOpenForWrite( filename_out_.c_str() ); for ( ref = 0; ref < nref; ref++ ) { // read reflection CMtz::ccp4_lrreff( mtzin, &res, fdata_i, idata_i, (const CMtz::MTZCOL**) &lookup_i[0], lookup_i.size(), ref+1 ); hkl = HKL( Util::intr(fdata_i[hklcol_i[0]]), Util::intr(fdata_i[hklcol_i[1]]), Util::intr(fdata_i[hklcol_i[2]]) ); // copy across all data from old file for ( int i = 0; i < cpcols.size(); i++ ) { fdata[cpcols[i]] = fdata_i[i]; idata[cpcols[i]] = idata_i[i]; } // output reflection for ( lst = 0; lst < cols.size(); lst++ ) { // for each list, fetch the data hkl_data_o[lst]->data_export( hkl, pdata ); // and copy to the relevent columns for ( col = 0; col < cols[lst].size(); col++ ) { // set to mtz->mnf, unless we have a value for it if ( !Util::is_nan( pdata[col] ) && cols[lst][col] >= 0 ) { idata[ cols[lst][col] ] = 0; fdata[ cols[lst][col] ] = float( pdata[col] * scls[lst][col] ); } else { idata[ cols[lst][col] ] = 1; fdata[ cols[lst][col] ] = 0.0; } } } // write appended record // help: no equivalent to lrrefl! Need idata and lookup for ( c = 0; c < lookup_o.size(); c++ ) if (idata[c]) fdata[c] = CCP4::ccp4_nan().f; CMtz::ccp4_lwrefl( mtzout, fdata, &lookup_o[0], lookup_o.size(), ref+1 ); } // tidy up CMtz::MtzPut( mtzout, filename_out_.c_str() ); CMtz::MtzFree( mtzin ); CMtz::MtzFree( mtzout ); hkl_data_i.clear(); hkl_data_o.clear(); hkl_data_cols.clear(); crystals.clear(); assigned_paths_.clear(); filename_in_ = filename_out_ = ""; mode = NONE; } /*! Get the spacegroup from the MTZ file. \return The spacegroup. */ const Spacegroup& CCP4MTZfile::spacegroup() const { return spacegroup_; } /*! Get the base cell from the MTZ file. \return The cell. */ const Cell& CCP4MTZfile::cell() const { return cell_; } /*! Get the resolution limit from the MTZ file. \return The resolution. */ const Resolution& CCP4MTZfile::resolution() const { return resolution_; } /*! Get the HKL sampling from the MTZ file. \return The hkl_sampling. */ const HKL_sampling& CCP4MTZfile::hkl_sampling() const { return hkl_sampling_; } /*! Import the list of reflection HKLs from an MTZ file into an HKL_info object. If the resolution limit of the HKL_info object is lower than the limit of the file, any excess reflections will be rejected, as will any systematic absences or duplicates. \param target The HKL_info object to be initialised. */ void CCP4MTZfile::import_hkl_list( HKL_info& target ) { if ( mode != READ ) Message::message( Message_fatal( "CCP4MTZfile: no file open for read" ) ); float fdata[1000], s; // file data: allow up to 1000 columns on file int idata[1000]; // flag data: allow up to 1000 columns on file HKL hkl; std::vector hkls; // open file CMtz::MTZ* mtzin = CMtz::MtzGet( filename_in_.c_str(), 0 ); if ( mtzin == NULL ) Message::message( Message_fatal( "CCP4MTZfile: import_hkl_list - File missing or corrupted: "+filename_in_ ) ); CMtz::MtzAssignHKLtoBase( mtzin ); std::vector lookup_i = build_lookup( mtzin ); // lookup hkl cols int hklcol_i[3] = {0,1,2}; for ( int i = 0; i < lookup_i.size(); i++ ) { if ( mtz_col_path( mtzin, lookup_i[i] ).tail() == "H" ) hklcol_i[0] = i; if ( mtz_col_path( mtzin, lookup_i[i] ).tail() == "K" ) hklcol_i[1] = i; if ( mtz_col_path( mtzin, lookup_i[i] ).tail() == "L" ) hklcol_i[2] = i; } // read the reflections from the mtz ftype slim = target.resolution().invresolsq_limit(); // read the reflections for ( int ref = 0; ref < CMtz::MtzNref( mtzin ); ref++ ) { // read reflection CMtz::ccp4_lrrefl( mtzin, &s, fdata, idata, ref ); hkl = HKL( Util::intr(fdata[hklcol_i[0]]), Util::intr(fdata[hklcol_i[1]]), Util::intr(fdata[hklcol_i[2]]) ); // check the resolution against the master cell bool in_res = hkl.invresolsq(target.cell()) < slim; // also check against any hkl_datas which have been assigned //for (int lst=0; lst < list_map_i.size(); lst++) in_res = in_res || // (hkl.invresolsq(list_map_i[lst].list->base_cell()) < slim); // store reflection if ( in_res ) hkls.push_back( hkl ); } // close file CMtz::MtzFree( mtzin ); target.add_hkl_list( hkls ); } /*! Import a complete HKL_info object. The supplied HKL_info object is examined, and if any of the parameters (spacegroup, cell, or resolution) are unset, then they will be set using values from the file. The reflections list will then be generated (the default), or imported from the file. This method is a shortcut which can generally replace most common combinations of calls to import_spacegroup(), import_cell(), import_resolution() and import_hkl_list(). \param target The HKL_info object to be initialised. \param generate Generate the list of HKLs rather than importing it from the file. */ void CCP4MTZfile::import_hkl_info( HKL_info& target, const bool generate ) { // first check if the HKL_info params are already set Spacegroup s = target.spacegroup(); Cell c = target.cell(); Resolution r = target.resolution(); // import any missing params if ( s.is_null() ) s = spacegroup_; if ( c.is_null() ) c = cell_; if ( r.is_null() ) r = resolution_; target.init( s, c, r ); // now make the HKL list if ( generate ) target.generate_hkl_list(); else import_hkl_list( target ); } /*! \param cxtl The crystal to import. \param mtzpath The mtz path of the crystal. */ void CCP4MTZfile::import_crystal( MTZcrystal& cxtl, const String mtzpath ) { int x, s, c; String colpath = mtzpath; if ( colmode == Legacy ) if ( colpath.find("/")==String::npos && colpath.find("[")==String::npos ) colpath = "/*/*/["+colpath+"]"; if ( colpath.find( "[" ) != String::npos ) { std::vector list = colpath.split( "[], " ); colpath = list[0]+list[1]; } match_path( colpath, x, s, c ); if ( x >= 0 ) cxtl = crystals[x].crystal; else Message::message( Message_fatal("CCP4MTZfile: No such crystal: "+colpath) ); return; } /*! \param cset The dataset to import. \param mtzpath The mtz path of the dataset. */ void CCP4MTZfile::import_dataset( MTZdataset& cset, const String mtzpath ) { int x, s, c; String colpath = mtzpath; if ( colmode == Legacy ) if ( colpath.find("/")==String::npos && colpath.find("[")==String::npos ) colpath = "/*/*/["+colpath+"]"; if ( colpath.find( "[" ) != String::npos ) { std::vector list = colpath.split( "[], " ); colpath = list[0]+list[1]; } match_path( colpath, x, s, c ); if ( x >= 0 && s >= 0 ) cset = crystals[x].datasets[s].dataset; else Message::message( Message_fatal("CCP4MTZfile: No such dataset: "+colpath) ); return; } void CCP4MTZfile::export_crystal( const MTZcrystal& cxtl, const String mtzpath ) { int x, s, c; match_path( mtzpath, x, s, c ); if ( x < 0 ) { crystalinf newxtl; newxtl.crystal = MTZcrystal( mtzpath.split("/")[0], cxtl.project_name(), cxtl ); crystals.push_back( newxtl ); } } void CCP4MTZfile::export_dataset( const MTZdataset& cset, const String mtzpath ){ int x, s, c; match_path( mtzpath, x, s, c ); if ( x < 0 ) Message::message( Message_fatal( "CCP4MTZfile: export_dataset - Missing crystal: "+mtzpath ) ); if ( s < 0 ) { datasetinf newset; newset.dataset = MTZdataset( mtzpath.split("/")[1], cset.wavelength() ); crystals[x].datasets.push_back( newset ); } } /*! Import data from an MTZ file into an HKL_data object. The dataset and crystal information from the first corresponding MTZ column are also returned. An MTZ column type must be present in the MTZ_type_registry for the HKL_data type element name concerned. This routine does not actually read any data, but rather marks the data to be read when the file is closed. For container objects import_chkl_data() is preferred. \param cdata The HKL_data object into which data is to be imported. \param mtzpath The MTZ column names, as a path. See \ref MTZpaths for details. */ void CCP4MTZfile::import_hkl_data( HKL_data_base& cdata, const String mtzpath ) { if ( mode != READ ) Message::message( Message_fatal( "CCP4MTZfile: import_hkl_data - no file open for read" ) ); // legacy column label handling String colpath = mtzpath; if ( colmode == Legacy ) if ( colpath.find("/")==String::npos && colpath.find("[")==String::npos ) colpath = "/*/*/["+colpath+"]"; // add the exported data columns to the local list int ncols = cdata.data_size(); std::vector col_names = mtz_assign( colpath, cdata.type(), cdata.data_names(), ncols ); std::vector dat_names = cdata.data_names().split(" "); std::vector newcols(ncols); // assign the columns to mtz indexes for ( int col=0; col < ncols; col++ ) // loop over columns in list if ( !is_virtual_col( col_names[col] ) ) { int x, s, c; match_path( col_names[col], x, s, c ); if ( c < 0 ) Message::message( Message_fatal( "CCP4MTZfile: import_hkl_data - Missing column, crystal or dataset: "+col_names[col] ) ); String ctype = CCP4MTZ_type_registry::type( dat_names[col] ); String mtype = crystals[x].datasets[s].columns[c].type; if ( ctype != mtype ) Message::message( Message_warn( "CCP4MTZfile: Mtz column type mismatch: "+crystals[x].datasets[s].columns[c].label+" "+mtype+"-"+ctype ) ); newcols[col].path = "/" + crystals[x].crystal.crystal_name() + "/" + crystals[x].datasets[s].dataset.dataset_name() + "/" + crystals[x].datasets[s].columns[c].label; newcols[col].scale = CCP4MTZ_type_registry::scale( dat_names[col] ); assigned_paths_.push_back( // store names for user query "/" + crystals[x].crystal.crystal_name() + "/" + crystals[x].datasets[s].dataset.dataset_name() + "/" + crystals[x].datasets[s].columns[c].label + " " + crystals[x].datasets[s].columns[c].type ); // initialise any uninitialised datasets (CLIPPER2) if ( cdata.is_null() ) { HKL_data flag( spacegroup_, cell_, hkl_sampling_ ); cdata.init( spacegroup_, crystals[x].crystal, hkl_sampling_ ); } } else { newcols[col].path = "NAN"; assigned_paths_.push_back( "/*/*/NAN -" ); // store names for user query } hkl_data_i.push_back( &cdata ); hkl_data_cols.push_back( newcols ); } /*! Export a complete HKL_info object, including spacegroup, cell, and list of reflection HKLs from an HKL_info object to an MTZ file. This is compulsory when writing an MTZ file, but forbidden when appending, since the HKLs will then come from the input MTZ. \param target The HKL_info object to supply the parameters. */ void CCP4MTZfile::export_hkl_info( const HKL_info& target ) { if ( mode != WRITE ) Message::message( Message_fatal( "CCP4MTZfile: export_hkl_info - no file open for write" ) ); spacegroup_ = target.spacegroup(); cell_ = target.cell(); resolution_ = target.resolution(); hkl_info_o = ⌖ } /*! Export data from an HKL_data object into an MTZ file. MTZdataset and crystal information must be supplied, and will be applied to all columns in the output MTZ. An MTZ column type must be present in the MTZ_type_registry for the HKL_data type element name concerned. This routine does not actually write any data, but rather marks the data to be written when the file is closed. Normally export_chkl_data() is preferred. \param cdata The HKL_data object from which data is to be exported. \param mtzpath The MTZ column names, as a path. See \ref MTZpaths for details. */ void CCP4MTZfile::export_hkl_data( const HKL_data_base& cdata, const String mtzpath ) { if ( mode != WRITE && mode != APPEND ) Message::message( Message_fatal( "CCP4MTZfile: export_hkl_data - no file open for write/append" ) ); // add the exported data columns to the local list int ncols = cdata.data_size(); std::vector col_names = mtz_assign( mtzpath, cdata.type(), cdata.data_names(), ncols ); std::vector dat_names = cdata.data_names().split(" "); std::vector newcols(ncols); // assign the columns to mtz indexes for ( int col=0; col < ncols; col++ ) { // loop over columns in list int x, s, c; match_path( col_names[col], x, s, c ); if ( x < 0 || s < 0 ) Message::message( Message_fatal( "CCP4MTZfile: export_hkl_data - Missing crystal or dataset: "+col_names[col] ) ); datacolinf newcol; newcol.label = col_names[col].tail(); newcol.type = CCP4MTZ_type_registry::type( dat_names[col] ); c = crystals[x].datasets[s].columns.size(); crystals[x].datasets[s].columns.push_back(newcol); newcols[col].path = "/" + crystals[x].crystal.crystal_name() + "/" + crystals[x].datasets[s].dataset.dataset_name() + "/" + crystals[x].datasets[s].columns[c].label; newcols[col].scale = CCP4MTZ_type_registry::scale( dat_names[col] ); assigned_paths_.push_back( // store names for user query "/" + crystals[x].crystal.crystal_name() + "/" + crystals[x].datasets[s].dataset.dataset_name() + "/" + crystals[x].datasets[s].columns[c].label + " " + crystals[x].datasets[s].columns[c].type ); } hkl_data_o.push_back( &cdata ); hkl_data_cols.push_back( newcols ); } /*! Import data from an MTZ into a CHKL_data object. If they don't already exist, then CMTZcrystal and CMTZdataset objects will be created to match the MTZ crystal and dataset information for the first MTZ column used. These new objects will be children of the parent CHKL_info object, and this CHKL_data will be moved to become a child of the CMTZdataset object. Thus, to import data into a CHKL_data, you must first create a CHKL_data anywhere below a parent HKL_info. Then call this method, and the object will be moved to a position below the HKL_info corresponding to its position in the data hierarchy in the MTZ file. The following code imports data, dataset, and crystal from an MTZ file: \code CHKL_info myhkl; // must be given cell, spacegroup, and HKL list. ... CHKL_data mydata CCP4MTZfile file = open_read("in.mtz"); file.import_chkl_data( mydata, "native/CuKa/[FP,SIGFP]" ); file.close_read(); \endcode An MTZ column type must be present in the MTZ_type_registry for the HKL_data type element name concerned. This routine does not actually read any data, but rather marks the data to be read when the file is closed. \param target The HKL_data object into which data is to be imported. \param mtzpath The MTZ column names, as a path. See \ref MTZpaths for details. \param path Where to put this in the data hierarchy, overriding the MTZ crystal and dataset. */ void CCP4MTZfile::import_chkl_data( Container& target, const String mtzpath, const String path ) { if ( mode != READ ) Message::message( Message_fatal( "CCP4MTZfile: no file open for read" ) ); // get this object HKL_data_base* hp = dynamic_cast(&target); if ( hp == NULL ) Message::message( Message_fatal( "CCP4MTZfile: import object not HKL_data" ) ); // and the parent hkl_info CHKL_info* chkl = target.parent_of_type_ptr(); if ( chkl == NULL ) Message::message( Message_fatal( "CCP4MTZfile: import HKL_data has no HKL_info" ) ); // now import the data MTZcrystal xtl; MTZdataset set; import_crystal ( xtl, mtzpath ); import_dataset ( set, mtzpath ); import_hkl_data( *hp, mtzpath ); Container *cxtl, *cset; // check for matching crystals String xtlname = path.notail().notail().tail(); if ( xtlname == "" ) xtlname = xtl.crystal_name(); cxtl = chkl->find_path_ptr( xtlname ); if ( cxtl == NULL ) { cxtl = new CMTZcrystal( *chkl, xtlname, xtl ); cxtl->set_destroyed_with_parent(); // (use garbage collection for this obj) } // check for matching datasets String setname = path.notail().tail(); if ( setname == "" ) setname = set.dataset_name(); cset = cxtl->find_path_ptr( setname ); if ( cset == NULL ) { cset = new CMTZdataset( *cxtl, setname, set ); cset->set_destroyed_with_parent(); // (use garbage collection for this obj) } // move the data to the new dataset String datname = path.tail(); if ( datname == "" ) datname = mtzpath.tail(); target.move( cset->path() + "/" + datname ); } /*! Export data from a CHKL_data object to an MTZ. The object must have a parent Cdataset and CMTZcrystal to provide the MTZ crystal and dataset information. The MTZ file will be checked for names matching the names of these objects, and the new MTZ columns will be added to the corresponding dataset if it exists, otherwise it will be created. An MTZ column type must be present in the MTZ_type_registry for the HKL_data type element name concerned. This routine does not actually write any data, but rather marks the data to be written when the file is closed. \param target The HKL_data object from which data is to be exported. \param mtzpath The MTZ column names, as a path. See \ref MTZpaths for details. */ void CCP4MTZfile::export_chkl_data( Container& target, const String mtzpath ) { if ( mode != WRITE && mode != APPEND ) Message::message( Message_fatal( "CCP4MTZfile: no file open for write/append" ) ); // get this object HKL_data_base* hp = dynamic_cast( &target ); if ( hp == NULL ) Message::message( Message_fatal( "CCP4MTZfile: export object not HKL_data" ) ); // get parent objects MTZdataset* dp = target.parent_of_type_ptr(); if ( dp == NULL ) Message::message( Message_fatal( "CCP4MTZfile: HKL_data has no parent MTZdataset" ) ); MTZcrystal* xp = target.parent_of_type_ptr(); if ( xp == NULL ) Message::message( Message_fatal( "CCP4MTZfile: HKL_data has no parent MTZcrystal" ) ); export_crystal( *xp, mtzpath ); export_dataset( *dp, mtzpath ); export_hkl_data( *hp, mtzpath ); } /*! Return a vector of all the columns in the MTZ file, including crystal, dataset and type information. The result is a vector of Strings. Each String contains text of the form '/CrystalName/DatasetName/ColumnName Type'. */ std::vector CCP4MTZfile::column_paths() const { std::vector result; int x, s, c; for ( x = 0; x < crystals.size(); x ++ ) for ( s = 0; s < crystals[x].datasets.size(); s ++ ) for ( c = 0; c < crystals[x].datasets[s].columns.size(); c ++ ) result.push_back( "/" + crystals[x].crystal.crystal_name() + "/" + crystals[x].datasets[s].dataset.dataset_name() + "/" + crystals[x].datasets[s].columns[c].label + " " + crystals[x].datasets[s].columns[c].type ); return result; } /*! Return a vector of all the columns in the MTZ file used for the previous call to import_hkl_data or export_hkl_data. The result is a vector of Strings. Each String contains text of the form '/CrystalName/DatasetName/ColumnName Type'. This function is commonly used to add an output column to the same crystal and dataset as a particular input column. e.g. \code String opcol = mtzfile.assigned_paths()[0].notail() + "/[FWT,PHIWT]"; \endcode */ const std::vector& CCP4MTZfile::assigned_paths() const { return assigned_paths_; } String CCP4MTZfile::title() const { return title_; } void CCP4MTZfile::set_title( const String& title ) { title_ = title; } std::vector CCP4MTZfile::history() const { return history_; } int CCP4MTZfile::num_reflections() const {return num_reflections_;} std::vector CCP4MTZfile::sort_order() const {return sort_order_;} ftype32 CCP4MTZfile::low_res_limit() const {return reslim_low;} int CCP4MTZfile::ccp4_spacegroup_number() const {return ccp4_spacegroup_number_;} void CCP4MTZfile::set_history( const std::vector& history ) { std::vector histnew; histnew.insert( histnew.end(), history.begin() , history.end() ); histnew.insert( histnew.end(), history_.begin(), history_.end() ); history_ = histnew; } void CCP4MTZfile::set_column_label_mode( CCP4MTZcolumn_label_mode mode ) { colmode = mode; } /* old form for compatibility */ void CCP4MTZfile::import_hkl_data( HKL_data_base& cdata, MTZdataset& cset, MTZcrystal& cxtl, const String mtzpath ) { import_crystal ( cxtl, mtzpath ); import_dataset ( cset, mtzpath ); import_hkl_data( cdata, mtzpath ); } /* old form for compatibility */ void CCP4MTZfile::export_hkl_data( const HKL_data_base& cdata, const MTZdataset& cset, const MTZcrystal& cxtl, const String mtzpath ) { export_crystal( cxtl, mtzpath ); export_dataset( cset, mtzpath ); export_hkl_data( cdata, mtzpath ); } /*! Get the column labels from the MTZ file. \return Array of labels. */ std::vector CCP4MTZfile::column_labels() const { std::vector result; for ( int x = 0; x < crystals.size(); x++ ) for ( int s = 0; s < crystals[x].datasets.size(); s++ ) for ( int c = 0; c < crystals[x].datasets[s].columns.size(); c++ ) result.push_back( "/"+crystals[x].crystal.crystal_name()+"/"+crystals[x].datasets[s].dataset.dataset_name()+"/" +crystals[x].datasets[s].columns[c].label+" "+crystals[x].datasets[s].columns[c].type); return result; } } // namespace clipper clipper-2.1/clipper/ccp4/ccp4_map_io.cpp0000644000374100011300000005755711247655136015132 00000000000000/* map_io.cpp: class file for reflection data map importer */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "ccp4_map_io.h" #include namespace clipper { /*! Constructing an CCP4MAPfile does nothing except flag the object as not attached to any file for either input or output */ CCP4MAPfile::CCP4MAPfile() { mode = NONE; } /*! Close any files which were left open. This is particularly important since to access the MAP file efficiently, data reads and writes are deferred until the file is closed. */ CCP4MAPfile::~CCP4MAPfile() { switch ( mode ) { case READ: close_read(); break; case WRITE: close_write(); break; case NONE: break; } } /*! The file is opened for reading. This CCP4MAPfile object will remain attached to this file until it is closed. Until that occurs, no other file may be opened with this object, however another CCP4MAPfile object could be used to access another file. \param filename_in The input filename or pathname. */ void CCP4MAPfile::open_read( const String filename_in ) { if ( mode != NONE ) Message::message( Message_fatal( "CCP4MAPfile: open_read - File already open" ) ); filename = filename_in; mode = READ; // read the file header char symop[81]; int grid[3], orderfms[3], orderxyz[3], dim[3], gfms0[3], gfms1[3]; float cp[6]; CMap_io::CMMFile* file = (CMap_io::CMMFile*)CMap_io::ccp4_cmap_open( filename.c_str(), O_RDONLY ); if ( file == NULL ) Message::message( Message_fatal( "CCP4MAPfile: open_read - File missing or corrupted: "+filename ) ); CMap_io::ccp4_cmap_get_cell( file, cp ); CMap_io::ccp4_cmap_get_grid( file, grid ); CMap_io::ccp4_cmap_get_order( file, orderfms ); CMap_io::ccp4_cmap_get_dim( file, dim ); CMap_io::ccp4_cmap_get_origin( file, gfms0 ); // get grid bound and axis order for ( int i = 0; i < 3; i++ ) gfms1[i] = gfms0[i] + dim[i] - 1; for ( int i = 0; i < 3; i++ ) orderxyz[orderfms[i]-1] = i; // get spacegroup String symops; for ( int i = 0; i < CMap_io::ccp4_cmap_num_symop( file ); i++ ) { CMap_io::ccp4_cmap_seek_symop( file, i, SEEK_SET ); CMap_io::ccp4_cmap_get_symop( file, symop ); symops += String( symop ) + ";"; } CMap_io::ccp4_cmap_close( file ); // store header info spacegroup_ = Spacegroup( Spgr_descr( symops, Spgr_descr::Symops ) ); cell_ = Cell( Cell_descr( cp[0], cp[1], cp[2], cp[3], cp[4], cp[5] ) ); grid_sam_ = Grid_sampling( grid[0], grid[1], grid[2] ); grid_map_ = Grid_range( Coord_grid( gfms0[orderxyz[0]], gfms0[orderxyz[1]], gfms0[orderxyz[2]] ), Coord_grid( gfms1[orderxyz[0]], gfms1[orderxyz[1]], gfms1[orderxyz[2]] ) ); } /*! Close the file after reading. */ void CCP4MAPfile::close_read() { if ( mode != READ ) Message::message( Message_fatal( "CCP4MAPfile: no file open for read" ) ); mode = NONE; } /*! The file is opened for writing. This will be a new file, created entirely from data from within the program, rather than by extending an existing file. Similar restrictions apply as for open_read(). \param filename_out The output filename or pathname. */ void CCP4MAPfile::open_write( const String filename_out ) { if ( mode != NONE ) Message::message( Message_fatal( "CCP4MAPfile: open_write - File already open" ) ); filename = filename_out; mode = WRITE; } /*! Close the file after writing. */ void CCP4MAPfile::close_write() { if ( mode != WRITE ) Message::message( Message_fatal( "CCP4MAPfile: no file open for write" ) ); mode = NONE; } /*! When writing an NXmap, the cell for the output map must be set using set_cell(). Note that the NXmap is rather more general than the CCP4 map, since it can take an arbitrary rotation+skew matrix. The resulting map will only be sensible if the NXmap grid skew matrix reflects the supplied cell. This is not possible in the general case. (Alternatively, opening an equivalent map for read and then closing it again will also set the cell). \param cell The cell description for the output map file. */ void CCP4MAPfile::set_cell( const Cell& cell ) { if ( mode != WRITE ) Message::message( Message_fatal( "CCP4MAPfile: no file open for write" ) ); cell_ = cell; } /*! Get the spacegroup from the MTZ file. \return The spacegroup. */ const Spacegroup& CCP4MAPfile::spacegroup() const { return spacegroup_; } /*! Get the base cell from the MTZ file. \return The cell. */ const Cell& CCP4MAPfile::cell() const { return cell_; } /*! Get the grid sampling from the MTZ file. \return The grid sampling. */ const Grid_sampling& CCP4MAPfile::grid_sampling() const { return grid_sam_; } /*! Import a complete Xmap object. The supplied Xmap object is examined, and if any of the parameters (spacegroup, cell, or grid_sampling) are unset, then they will be set using values from the file. The data is the imported from the file. If the spacegroups mismatch, the resulting map will obey its spacegroup symmetry, but no expansion will be performed if the file has a higher symmetry and only holds an asymmetric unit. \param xmap The Xmap to be imported. */ template void CCP4MAPfile::import_xmap( Xmap& xmap ) const { if ( mode != READ ) Message::message( Message_fatal( "CCP4MAPfile: no file open for read" ) ); // first check if the HKL_info params are already set Spacegroup s = xmap.spacegroup(); Cell c = xmap.cell(); Grid_sampling r = xmap.grid_sampling(); // import any missing params if ( s.is_null() ) s = spacegroup_; if ( c.is_null() ) c = cell_; if ( r.is_null() ) r = grid_sam_; xmap.init( s, c, r ); // read the file header int orderfms[3], orderxyz[3], dim[3], gfms0[3], gfms1[3]; CMap_io::CMMFile* file = (CMap_io::CMMFile*)CMap_io::ccp4_cmap_open( filename.c_str(), O_RDONLY ); if ( file == NULL ) Message::message( Message_fatal( "CCP4MAPfile: import_xmap - File missing or corrupted: "+filename ) ); CMap_io::ccp4_cmap_get_order( file, orderfms ); CMap_io::ccp4_cmap_get_dim( file, dim ); CMap_io::ccp4_cmap_get_origin( file, gfms0 ); int dmode = CMap_io::ccp4_cmap_get_datamode( file ); if ( dmode != 0 && dmode != 2 ) Message::message( Message_fatal( "CCP4CCP4MAPfile: unsupported data mode" ) ); // get grid bound and axis order for ( int i = 0; i < 3; i++ ) gfms1[i] = gfms0[i] + dim[i] - 1; for ( int i = 0; i < 3; i++ ) orderxyz[orderfms[i]-1] = i; // read the map data int n0 = (gfms1[0]-gfms0[0]+1); int n1 = n0 * (gfms1[1]-gfms0[1]+1); std::vector section( n1 ); int index, g[3]; Xmap_base::Map_reference_coord x( xmap ); for ( g[2] = gfms0[2]; g[2] <= gfms1[2]; g[2]++ ) { index = 0; CMap_io::ccp4_cmap_read_section( file, §ion[0] ); if ( dmode == 0 ) for ( int i = n1-1; i >= 0; i-- ) // deal with byte maps section[i] = float(((unsigned char*)§ion[0])[i]); for ( g[1] = gfms0[1]; g[1] <= gfms1[1]; g[1]++ ) { for ( g[0] = gfms0[0]; g[0] <= gfms1[0]; g[0]++ ) { x.set_coord( Coord_grid( g[orderxyz[0]], g[orderxyz[1]], g[orderxyz[2]] ) ); xmap[x] = T( section[ index++ ] ); } } } // done CMap_io::ccp4_cmap_close( file ); } /*! \param xmap The Xmap to be exported. */ template void CCP4MAPfile::export_xmap( const Xmap& xmap ) { if ( mode != WRITE ) Message::message( Message_fatal( "CCP4MAPfile: no file open for write" ) ); const char* title = "From clipper Xmap "; char symop[80]; int grid[3], orderfms[3], orderxyz[3], dim[3], gfms0[3], gfms1[3]; float cp[6]; int spg = xmap.spacegroup().descr().spacegroup_number(); // spacegroup // get axis order switch ( spg ) { case 1: case 2: case 3: case 4: case 10: case 16: case 17: case 18: case 20: case 21: case 23: orderfms[0] = 2; orderfms[1] = 1; orderfms[2] = 3; break; default: orderfms[0] = 3; orderfms[1] = 1; orderfms[2] = 2; break; } for ( int i = 0; i < 3; i++ ) orderxyz[orderfms[i]-1] = i; // grids for ( int i = 0; i < 3; i++ ) { grid[i] = xmap.grid_sampling()[i]; gfms0[orderxyz[i]] = xmap.grid_asu().min()[i]; gfms1[orderxyz[i]] = xmap.grid_asu().max()[i]; } Cell_descr cd = xmap.cell().descr(); cp[0] = cd.a(); cp[3] = cd.alpha_deg(); cp[1] = cd.b(); cp[4] = cd.beta_deg (); cp[2] = cd.c(); cp[5] = cd.gamma_deg(); for ( int i = 0; i < 3; i++ ) dim[i] = gfms1[i] - gfms0[i] + 1; CMap_io::CMMFile* file = (CMap_io::CMMFile*)CMap_io::ccp4_cmap_open( filename.c_str(), O_WRONLY ); if ( file == NULL ) Message::message( Message_fatal( "CCP4MAPfile: export_xmap - File missing or corrupted: "+filename ) ); CMap_io::ccp4_cmap_set_cell( file, cp ); CMap_io::ccp4_cmap_set_grid( file, grid ); CMap_io::ccp4_cmap_set_order( file, orderfms ); CMap_io::ccp4_cmap_set_dim( file, dim ); CMap_io::ccp4_cmap_set_origin( file, gfms0 ); CMap_io::ccp4_cmap_set_spacegroup( file, spg ); CMap_io::ccp4_cmap_set_title( file, title ); CMap_io::ccp4_cmap_set_datamode( file, 2 ); // write symops for ( int i = 0; i < xmap.spacegroup().num_symops(); i++ ) { String strop = xmap.spacegroup().symop(i).format(); for ( int j = 0; j < 80; j++ ) symop[j] = ' '; for ( int j = 0; j < strop.length(); j++ ) symop[j] = strop[j]; CMap_io::ccp4_cmap_set_symop( file, symop ); } // write the map data int n0 = (gfms1[0]-gfms0[0]+1); int n1 = n0 * (gfms1[1]-gfms0[1]+1); std::vector section( n1 ); int index, g[3]; Xmap_base::Map_reference_coord x( xmap ); for ( g[2] = gfms0[2]; g[2] <= gfms1[2]; g[2]++ ) { index = 0; for ( g[1] = gfms0[1]; g[1] <= gfms1[1]; g[1]++ ) { for ( g[0] = gfms0[0]; g[0] <= gfms1[0]; g[0]++ ) { x.set_coord( Coord_grid( g[orderxyz[0]], g[orderxyz[1]], g[orderxyz[2]] ) ); section[ index++ ] = float( xmap[x] ); } } CMap_io::ccp4_cmap_write_section( file, §ion[0] ); } // done CMap_io::ccp4_cmap_close( file ); } /*! \param nxmap The NXmap to be imported. */ template void CCP4MAPfile::import_nxmap( NXmap& nxmap ) const { if ( mode != READ ) Message::message( Message_fatal( "CCP4MAPfile: no file open for read" ) ); nxmap.init( cell_, grid_sam_, grid_map_ ); // read the file header int orderfms[3], orderxyz[3], dim[3], gfms0[3], gfms1[3]; CMap_io::CMMFile* file = (CMap_io::CMMFile*)CMap_io::ccp4_cmap_open( filename.c_str(), O_RDONLY ); if ( file == NULL ) Message::message( Message_fatal( "CCP4MAPfile: import_nxmap - File missing or corrupted: "+filename ) ); CMap_io::ccp4_cmap_get_order( file, orderfms ); CMap_io::ccp4_cmap_get_dim( file, dim ); CMap_io::ccp4_cmap_get_origin( file, gfms0 ); int dmode = CMap_io::ccp4_cmap_get_datamode( file ); if ( dmode != 0 && dmode != 2 ) Message::message( Message_fatal( "CCP4CCP4MAPfile: unsupported data mode" ) ); // get grid bound and axis order for ( int i = 0; i < 3; i++ ) gfms1[i] = gfms0[i] + dim[i] - 1; for ( int i = 0; i < 3; i++ ) orderxyz[orderfms[i]-1] = i; // read the map data int n0 = (gfms1[0]-gfms0[0]+1); int n1 = n0 * (gfms1[1]-gfms0[1]+1); std::vector section( n1 ); int index, g[3]; for ( g[2] = 0; g[2] <= gfms1[2]-gfms0[2]; g[2]++ ) { index = 0; CMap_io::ccp4_cmap_read_section( file, §ion[0] ); if ( dmode == 0 ) for ( int i = n1-1; i >= 0; i-- ) // deal with byte maps section[i] = float(((unsigned char*)§ion[0])[i]); for ( g[1] = 0; g[1] <= gfms1[1]-gfms0[1]; g[1]++ ) { for ( g[0] = 0; g[0] <= gfms1[0]-gfms0[0]; g[0]++ ) { nxmap.set_data( Coord_grid( g[orderxyz[0]], g[orderxyz[1]], g[orderxyz[2]] ), T( section[ index++ ] ) ); } } } // done CMap_io::ccp4_cmap_close( file ); } /*! The cell for the output map must have been set using set_cell_descr(). Note that the NXmap is rather more general than the CCP4 map, since it can take an arbitrary rotation+skew matrix. The resulting map will only be sensible if the NXmap grid skew matrix reflects the supplied cell. This is not possible in the general case. \param nxmap The NXmap to be exported. */ template void CCP4MAPfile::export_nxmap( const NXmap& nxmap ) { if ( mode != WRITE ) Message::message( Message_fatal( "CCP4MAPfile: no file open for write" ) ); const char* title = "From clipper NXmap "; const char* symop = "X, Y, Z "; int grid[3], orderfms[3], orderxyz[3], dim[3], gfms0[3], gfms1[3]; float cp[6]; int spg = 1; // spacegroup orderfms[0] = 2; orderfms[1] = 1; orderfms[2] = 3; // axis order for ( int i = 0; i < 3; i++ ) orderxyz[orderfms[i]-1] = i; /* Because CCP4 maps don't allow an arbitrary skew matrix, we have to jump through hoops to try and fit an NXmap into one. This code will work for those cases where it is possible and produce garbage otherwise. Don't even try to understand this unless you are pretty smart. */ // cell (set by user, or from previous map) cp[0] = cell_.descr().a(); cp[3] = cell_.descr().alpha_deg(); cp[1] = cell_.descr().b(); cp[4] = cell_.descr().beta_deg (); cp[2] = cell_.descr().c(); cp[5] = cell_.descr().gamma_deg(); // grid (calculated to fit with cell provided - assume angles match) Coord_frac c0, c1; c0 = nxmap.coord_orth( Coord_map(0,0,0) ).coord_frac(cell_); c1 = nxmap.coord_orth( Coord_map( nxmap.grid().nu(), nxmap.grid().nv(), nxmap.grid().nw() ) ).coord_frac(cell_); grid_sam_ = Grid_sampling( Util::intr( ftype(nxmap.grid().nu())/(c1.u()-c0.u()) ), Util::intr( ftype(nxmap.grid().nv())/(c1.v()-c0.v()) ), Util::intr( ftype(nxmap.grid().nw())/(c1.w()-c0.w()) ) ); Coord_grid g0 = c0.coord_grid(grid_sam_); Coord_grid g1 = g0 + Coord_grid(nxmap.grid()) - Coord_grid(1,1,1); grid_map_ = Grid_range( g0, g1 ); for ( int i = 0; i < 3; i++ ) { grid[i] = grid_sam_[i]; gfms0[orderxyz[i]] = grid_map_.min()[i]; gfms1[orderxyz[i]] = grid_map_.max()[i]; } for ( int i = 0; i < 3; i++ ) dim[i] = gfms1[i] - gfms0[i] + 1; CMap_io::CMMFile* file = (CMap_io::CMMFile*)CMap_io::ccp4_cmap_open( filename.c_str(), O_WRONLY ); if ( file == NULL ) Message::message( Message_fatal( "CCP4MAPfile: export_nxmap - File missing or corrupted: "+filename ) ); CMap_io::ccp4_cmap_set_cell( file, cp ); CMap_io::ccp4_cmap_set_grid( file, grid ); CMap_io::ccp4_cmap_set_order( file, orderfms ); CMap_io::ccp4_cmap_set_dim( file, dim ); CMap_io::ccp4_cmap_set_origin( file, gfms0 ); CMap_io::ccp4_cmap_set_spacegroup( file, spg ); CMap_io::ccp4_cmap_set_title( file, title ); CMap_io::ccp4_cmap_set_datamode( file, 2 ); // write symops CMap_io::ccp4_cmap_set_symop( file, symop ); // write the map data int n0 = (gfms1[0]-gfms0[0]+1); int n1 = n0 * (gfms1[1]-gfms0[1]+1); std::vector section( n1 ); int index, g[3]; for ( g[2] = 0; g[2] <= gfms1[2]-gfms0[2]; g[2]++ ) { index = 0; for ( g[1] = 0; g[1] <= gfms1[1]-gfms0[1]; g[1]++ ) { for ( g[0] = 0; g[0] <= gfms1[0]-gfms0[0]; g[0]++ ) { section[ index++ ] = float( nxmap.get_data( Coord_grid( g[orderxyz[0]], g[orderxyz[1]], g[orderxyz[2]] ) ) ); } } CMap_io::ccp4_cmap_write_section( file, §ion[0] ); } // done CMap_io::ccp4_cmap_close( file ); } /*! Import a complete Xmap object. The supplied Xmap object is examined, and if any of the parameters (spacegroup, cell, or grid_sampling) are unset, then they will be set using values from the file. The data is the imported from the file. If the spacegroups mismatch, the resulting map will obey its spacegroup symmetry, but no expansion will be performed if the file has a higher symmetry and only holds an asymmetric unit. This version performs a check on the symmatry of the inport map file. If the import map contains less than a complete ASU, or if it contains more than an ASU and symmetry related positions contain inconsistent values, then an error is returned. This function is only available for float or double maps. \param xmap The Xmap to be imported. \return The ASU check flag */ template CCP4MAPfile::ASUerror CCP4MAPfile::import_xmap_check_asu( Xmap& xmap, T missing ) const { if ( mode != READ ) Message::message( Message_fatal( "CCP4MAPfile: no file open for read" ) ); // first check if the HKL_info params are already set Spacegroup s = xmap.spacegroup(); Cell c = xmap.cell(); Grid_sampling r = xmap.grid_sampling(); // import any missing params if ( s.is_null() ) s = spacegroup_; if ( c.is_null() ) c = cell_; if ( r.is_null() ) r = grid_sam_; xmap.init( s, c, r ); // set missing flag T flag; Util::set_null( flag ); xmap = flag; ftype maxerr = 0.0; // read the file header int orderfms[3], orderxyz[3], dim[3], gfms0[3], gfms1[3]; CMap_io::CMMFile* file = (CMap_io::CMMFile*)CMap_io::ccp4_cmap_open( filename.c_str(), O_RDONLY ); if ( file == NULL ) Message::message( Message_fatal( "CCP4MAPfile: import_xmap - File missing or corrupted: "+filename ) ); CMap_io::ccp4_cmap_get_order( file, orderfms ); CMap_io::ccp4_cmap_get_dim( file, dim ); CMap_io::ccp4_cmap_get_origin( file, gfms0 ); int dmode = CMap_io::ccp4_cmap_get_datamode( file ); if ( dmode != 0 && dmode != 2 ) Message::message( Message_fatal( "CCP4CCP4MAPfile: unsupported data mode" ) ); // get grid bound and axis order for ( int i = 0; i < 3; i++ ) gfms1[i] = gfms0[i] + dim[i] - 1; for ( int i = 0; i < 3; i++ ) orderxyz[orderfms[i]-1] = i; // read the map data int n0 = (gfms1[0]-gfms0[0]+1); int n1 = n0 * (gfms1[1]-gfms0[1]+1); std::vector section( n1 ); int index, g[3]; Xmap_base::Map_reference_coord x( xmap ); for ( g[2] = gfms0[2]; g[2] <= gfms1[2]; g[2]++ ) { index = 0; CMap_io::ccp4_cmap_read_section( file, §ion[0] ); if ( dmode == 0 ) for ( int i = n1-1; i >= 0; i-- ) // deal with byte maps section[i] = float(((unsigned char*)§ion[0])[i]); for ( g[1] = gfms0[1]; g[1] <= gfms1[1]; g[1]++ ) { for ( g[0] = gfms0[0]; g[0] <= gfms1[0]; g[0]++ ) { x.set_coord( Coord_grid( g[orderxyz[0]], g[orderxyz[1]], g[orderxyz[2]] ) ); T oldval = xmap[x]; T newval = T( section[ index++ ] ); if ( !Util::is_nan( oldval ) && !Util::is_nan( newval ) ) { maxerr = Util::max( maxerr, fabs( ftype( newval - oldval ) ) ); newval = Util::max( oldval, newval ); } xmap[x] = newval; } } } // done CMap_io::ccp4_cmap_close( file ); // ASU checks typedef Xmap_base::Map_reference_index MRI; ASUerror asuerr = ASUCORRECT; ftype s0(0.0), s1(0.0), s2(0.0); for ( MRI ix = xmap.first(); !ix.last(); ix.next() ) { T val = xmap[ix]; if ( Util::is_null( val ) ) { asuerr = ASUINCOMPLETE; xmap[ix] = missing; } else { s0 += 1.0; s1 += val; s2 += val*val; } } if ( s0 > 0.5 ) s2 = sqrt( s2*s0 - s1*s1 ) / s0; if ( maxerr > 0.01*s2 ) asuerr = ASUINCONSISTENT; return asuerr; } // instantiate the template functions for all reasonable types // xmap import template void CCP4MAPfile::import_xmap( Xmap& xmap ) const; template void CCP4MAPfile::import_xmap( Xmap& xmap ) const; template void CCP4MAPfile::import_xmap( Xmap& xmap ) const; template void CCP4MAPfile::import_xmap( Xmap& xmap ) const; template void CCP4MAPfile::import_xmap( Xmap& xmap ) const; template void CCP4MAPfile::import_xmap( Xmap& xmap ) const; template void CCP4MAPfile::import_xmap( Xmap& xmap ) const; template void CCP4MAPfile::import_xmap( Xmap& xmap ) const; // xmap export template void CCP4MAPfile::export_xmap( const Xmap& xmap ); template void CCP4MAPfile::export_xmap( const Xmap& xmap ); template void CCP4MAPfile::export_xmap( const Xmap& xmap ); template void CCP4MAPfile::export_xmap( const Xmap& xmap ); template void CCP4MAPfile::export_xmap( const Xmap& xmap ); template void CCP4MAPfile::export_xmap( const Xmap& xmap ); template void CCP4MAPfile::export_xmap( const Xmap& xmap ); template void CCP4MAPfile::export_xmap( const Xmap& xmap ); // nxmap import template void CCP4MAPfile::import_nxmap( NXmap& nxmap ) const; template void CCP4MAPfile::import_nxmap( NXmap& nxmap ) const; template void CCP4MAPfile::import_nxmap( NXmap& nxmap ) const; template void CCP4MAPfile::import_nxmap( NXmap& nxmap ) const; template void CCP4MAPfile::import_nxmap( NXmap& nxmap ) const; template void CCP4MAPfile::import_nxmap( NXmap& nxmap ) const; template void CCP4MAPfile::import_nxmap( NXmap& nxmap ) const; template void CCP4MAPfile::import_nxmap( NXmap& nxmap ) const; // nxmap export template void CCP4MAPfile::export_nxmap( const NXmap& nxmap ); template void CCP4MAPfile::export_nxmap( const NXmap& nxmap ); template void CCP4MAPfile::export_nxmap( const NXmap& nxmap ); template void CCP4MAPfile::export_nxmap( const NXmap& nxmap ); template void CCP4MAPfile::export_nxmap( const NXmap& nxmap ); template void CCP4MAPfile::export_nxmap( const NXmap& nxmap ); template void CCP4MAPfile::export_nxmap( const NXmap& nxmap ); template void CCP4MAPfile::export_nxmap( const NXmap& nxmap ); // xmap import and check template CCP4MAPfile::ASUerror CCP4MAPfile::import_xmap_check_asu( Xmap& xmap, ftype32 missing ) const; template CCP4MAPfile::ASUerror CCP4MAPfile::import_xmap_check_asu( Xmap& xmap, ftype64 missing ) const; } // namespace clipper clipper-2.1/clipper/ccp4/Makefile.am0000644000374100011300000000126611372264321014256 00000000000000# Makefile.am, passed: clipper/ccp4, extracted subdir: ccp4 # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper/ccp4 ## -*- mode: Makefile; mode: font-lock -*- INCLUDES=${FFTW_CXXFLAGS} library_include_HEADERS = \ ccp4_map_io.h \ ccp4_mtz_io.h \ ccp4_mtz_types.h \ ccp4_utils.h lib_LTLIBRARIES = libclipper-ccp4.la libclipper_ccp4_la_SOURCES = \ ccp4_map_io.cpp \ ccp4_mtz_io.cpp \ ccp4_mtz_types.cpp \ ccp4_utils.cpp library_includedir = $(pkgincludedir)/ccp4 libclipper_ccp4_la_LDFLAGS = -version-info @CLIPPER_LT_VERSION@ libclipper_ccp4_la_LIBADD = \ $(top_builddir)/clipper/core/libclipper-core.la \ $(CCP4_LIBS) clipper-2.1/clipper/ccp4/ccp4_mtz_types.h0000644000374100011300000001013310736662163015344 00000000000000/*! \file lib/mtz_types.h Header file for CCP4 data types for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_MTZ_TYPES #define CLIPPER_MTZ_TYPES #include "../core/container_hkl.h" namespace clipper { //! CCP4 crystal object class MTZcrystal : public Cell { public: //! null constructor MTZcrystal() {} //! constructor: takes crystal+project name and cell MTZcrystal( const String& xname, const String& pname, const Cell& cell ); //! get crystal name const String& crystal_name() const; //! get project name const String& project_name() const; protected: String xname_, pname_; }; //! CCP4 dataset object class MTZdataset { public: //! null constructor MTZdataset() {} //! constructor: takes wavelength MTZdataset( const String& dname, const ftype& wavel ); //! get dataset name const String& dataset_name() const; //! get wavelength const ftype& wavelength() const; protected: String dname_; ftype wavel_; }; //! CMTZcrystal identifier /*! CMTZcrystal: This has a name and a cell. It overrides the base cell for any HKL_datas below it, and mirrors the mtz++ crystal element. */ class CMTZcrystal : public Container, public MTZcrystal { public: //! null constructor CMTZcrystal() {} //! constructor: from MTZcrystal CMTZcrystal( Container& parent, const String& name, const MTZcrystal& xtl ) : Container( parent, name ), MTZcrystal( xtl ) {} }; //! CMTZdataset identifier /*! CMTZdataset: This has a name and a wavelength. It gives the wavelength for any HKL_datas below it, and mirrors the mtz++ dataset element. */ class CMTZdataset : public Container, public MTZdataset { public: //! null constructor CMTZdataset() {} //! constructor: from MTZdataset CMTZdataset( Container& parent, const String& name, const MTZdataset& set ) : Container( parent, name ), MTZdataset( set ) {} }; } // namespace clipper #endif clipper-2.1/clipper/ccp4/ccp4_map_io.h0000644000374100011300000001037511247463260014555 00000000000000/*! \file ccp4/ccp4_map_io.h Header file for reflection data map importer */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_CCP4_MAP_IO #define CLIPPER_CCP4_MAP_IO #include "../core/container_map.h" namespace clipper { //! MAP import/export parent class for clipper objects /*! This is the import/export class which can be linked to a CCP4 map file and be used to transfer data into or out of a Clipper data structure. */ class CCP4MAPfile { public: //! Constructor: does nothing CCP4MAPfile(); //! Destructor: close any file that was left open ~CCP4MAPfile(); //! Open a file for read access void open_read( const String filename_in ); //! Close a file after reading void close_read(); //! Open a file for read access void open_write( const String filename_out ); //! Close a file after reading void close_write(); //! set cell desription (NXmap write only) void set_cell( const Cell& cell ); //! get file spacegroup const Spacegroup& spacegroup() const; //! get file cell const Cell& cell() const; //! get file grid_sampling const Grid_sampling& grid_sampling() const; //! import data to Xmap template void import_xmap( Xmap& xmap ) const; //! export data from Xmap template void export_xmap( const Xmap& xmap ); //! import data to NXmap template void import_nxmap( NXmap& nxmap ) const; //! export data from NXmap template void export_nxmap( const NXmap& nxmap ); enum ASUerror { ASUCORRECT, ASUINCOMPLETE, ASUINCONSISTENT }; //! import data to Xmap and check ASU (float/double only) template ASUerror import_xmap_check_asu( Xmap& xmap, T missing ) const; protected: enum MAPmode { NONE, READ, WRITE }; String filename; //!< filename MAPmode mode; //!< mode ASUerror asuerr; //!< ASU error flag // header info Spacegroup spacegroup_; //!< map spacegroup Cell cell_; //!< map cell Grid_sampling grid_sam_; //!< cell grid sampling Grid_range grid_map_; //!< map grid extent }; } // namespace clipper #endif clipper-2.1/clipper/ccp4/Makefile.in0000644000374100011300000004536611372264332014302 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am, passed: clipper/ccp4, extracted subdir: ccp4 # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper/ccp4 VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = clipper/ccp4 DIST_COMMON = $(library_include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ccp4.m4 \ $(top_srcdir)/config/clipper.m4 $(top_srcdir)/config/fftw.m4 \ $(top_srcdir)/config/gpp4.m4 $(top_srcdir)/config/mmdb.m4 \ $(top_srcdir)/config/utimbuf.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(library_includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libclipper_ccp4_la_DEPENDENCIES = \ $(top_builddir)/clipper/core/libclipper-core.la \ $(am__DEPENDENCIES_1) am_libclipper_ccp4_la_OBJECTS = ccp4_map_io.lo ccp4_mtz_io.lo \ ccp4_mtz_types.lo ccp4_utils.lo libclipper_ccp4_la_OBJECTS = $(am_libclipper_ccp4_la_OBJECTS) libclipper_ccp4_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libclipper_ccp4_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libclipper_ccp4_la_SOURCES) DIST_SOURCES = $(libclipper_ccp4_la_SOURCES) HEADERS = $(library_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AR = @AR@ AR_FLAGS = @AR_FLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCP4_CXXFLAGS = @CCP4_CXXFLAGS@ CCP4_LIBS = @CCP4_LIBS@ CFLAGS = @CFLAGS@ CLIPPER_CCP4_DIR = @CLIPPER_CCP4_DIR@ CLIPPER_CIF_DIR = @CLIPPER_CIF_DIR@ CLIPPER_CNS_DIR = @CLIPPER_CNS_DIR@ CLIPPER_CONTRIB_DIR = @CLIPPER_CONTRIB_DIR@ CLIPPER_LT_VERSION = @CLIPPER_LT_VERSION@ CLIPPER_MINIMOL_DIR = @CLIPPER_MINIMOL_DIR@ CLIPPER_MMDB_DIR = @CLIPPER_MMDB_DIR@ CLIPPER_PHS_DIR = @CLIPPER_PHS_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_CXXFLAGS = @FFTW_CXXFLAGS@ FFTW_LIBS = @FFTW_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMDB_CXXFLAGS = @MMDB_CXXFLAGS@ MMDB_LIBS = @MMDB_LIBS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = ${FFTW_CXXFLAGS} library_include_HEADERS = \ ccp4_map_io.h \ ccp4_mtz_io.h \ ccp4_mtz_types.h \ ccp4_utils.h lib_LTLIBRARIES = libclipper-ccp4.la libclipper_ccp4_la_SOURCES = \ ccp4_map_io.cpp \ ccp4_mtz_io.cpp \ ccp4_mtz_types.cpp \ ccp4_utils.cpp library_includedir = $(pkgincludedir)/ccp4 libclipper_ccp4_la_LDFLAGS = -version-info @CLIPPER_LT_VERSION@ libclipper_ccp4_la_LIBADD = \ $(top_builddir)/clipper/core/libclipper-core.la \ $(CCP4_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu clipper/ccp4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu clipper/ccp4/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): 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 \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ 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)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libclipper-ccp4.la: $(libclipper_ccp4_la_OBJECTS) $(libclipper_ccp4_la_DEPENDENCIES) $(libclipper_ccp4_la_LINK) -rpath $(libdir) $(libclipper_ccp4_la_OBJECTS) $(libclipper_ccp4_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccp4_map_io.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccp4_mtz_io.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccp4_mtz_types.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccp4_utils.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-library_includeHEADERS: $(library_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(library_includedir)" || $(MKDIR_P) "$(DESTDIR)$(library_includedir)" @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(library_includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \ done uninstall-library_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(library_includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(library_includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(library_includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-library_includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-library_includeHEADERS \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: clipper-2.1/clipper/ccp4/ccp4_mtz_types.cpp0000644000374100011300000000543110736662163015704 00000000000000/* mtz_types.cpp: ccp4 data types for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "ccp4_mtz_types.h" namespace clipper { MTZcrystal::MTZcrystal( const String& xname, const String& pname, const Cell& cell ) : Cell( cell ) { xname_ = xname; pname_ = pname; } const String& MTZcrystal::crystal_name() const { return xname_; } const String& MTZcrystal::project_name() const { return pname_; } MTZdataset::MTZdataset( const String& dname, const ftype& wavel ) { dname_ = dname; wavel_ = wavel; } const String& MTZdataset::dataset_name() const { return dname_; } const ftype& MTZdataset::wavelength() const { return wavel_; } } // namespace clipper clipper-2.1/clipper/ccp4/ccp4_utils.h0000644000374100011300000000576010736662163014460 00000000000000/*! \file ccp4_utils.h Header file for CCP4 utilities for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_MTZ_UTILS #define CLIPPER_MTZ_UTILS #include #include //! Mini-parser for command line input /*! This class removes any escape characters from the command-line, and if a -stdin option is present reads standard input and adds the result to the argument list. */ class CCP4CommandInput : public std::vector { public: CCP4CommandInput( int argc, char** argv, bool echo = false ); }; //! class for program start and end class CCP4Program { public: CCP4Program( const char* name, const char* vers, const char* rcsdate ); ~CCP4Program(); void summary_beg() const; void summary_end() const; void set_termination_message( std::string msg ) { msg_ = msg; } private: bool html, summ; std::string name_, msg_; }; #endif clipper-2.1/clipper/ccp4/ccp4_mtz_io.h0000644000374100011300000002365611371767243014626 00000000000000/*! \file lib/mtz_io.h Header file for reflection data mtz importer */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_CCP4_MTZ_IO #define CLIPPER_CCP4_MTZ_IO #include "ccp4_mtz_types.h" namespace clipper { //! CCP4MTZ import/export type registry /*! This class acts as a registry of import/export data types, which provide a translation from a data element name to an MTZ column type. The registry is instantiated statically as \c mtz_type_registry and initialised with a list of built-in datatypes. */ class CCP4MTZ_type_registry { public: //! constructor: initialise the registry with some built-in types CCP4MTZ_type_registry(); //! add a new type to the registry static void add_type( const String& name, const String& type, const ftype32& scale ); //! return MTZ column type static String type( const String& name ); //! return MTZ column type static ftype32 scale( const String& name ); private: static char names[200][12]; static char types[200][4]; static ftype32 scales[200]; }; //! MTZ import/export parent class for clipper objects /*! This is the import/export class which can be linked to an mtz file and be used to transfer data into or out of a Clipper data structure. Note that to access the MTZ file efficiently, data reads and writes are deferred until the file is closed. \anchor MTZpaths \par MTZpaths: MTZ column specification Note that the specification of the MTZ column names is quite versatile. The MTZ crystal and dataset must be specified, although the wildcard '*' may replace a complete name. Several MTZ columns will correspond to a single datalist. This may be handled in two ways: -# A simple name. The corresponding MTZ columns will be named after the datalist name, a dot, the datalist type, a dot, and a type name for the indivudal column, i.e. /crystal/dataset/datalist.listtype.coltype This is the default Clipper naming convention for MTZ data. -# A comma separated list of MTZ column names enclosed in square brackets. This allows MTZ data from legacy applications to be accessed. \n Thus, for example, an MTZPATH of \code native/CuKa/fsigfdata \endcode expands to MTZ column names of \code fsigfdata.F_sigF.F fsigfdata.F_sigF.sigF \endcode with a crystal called \c native and a dataset called \c CuKa. An MTZPATH of \code native/CuKa/[FP,SIGFP] \endcode expands to MTZ column names of \code FP SIGFP \endcode with a crystal called \c native and a dataset called \c CuKa. \archor MTZ_iotypes \par MTZ_iotypes: Import/export types For an HKL_data object to be imported or exported, an MTZ_iotype for that datatype must exist in the MTZ_iotypes_registry. MTZ_iotypes are defined for all the built-in datatypes. If you need to store a user defined type in an MTZ file, then register that type with the MTZ_iotypes_registry. */ class CCP4MTZfile { public: enum CCP4MTZcolumn_label_mode { Default, Normal, Legacy }; //! Constructor: does nothing CCP4MTZfile(); //! Destructor: close any file that was left open ~CCP4MTZfile(); //! Open a file for read access void open_read( const String filename_in ); //! Close a file after reading void close_read(); //! Open a file for read access void open_append( const String filename_in, const String filename_out ); //! Close a file after reading void close_append(); //! Open a file for read access void open_write( const String filename_out ); //! Close a file after reading void close_write(); //! get file spacegroup const Spacegroup& spacegroup() const; //! get file cell const Cell& cell() const; //! get file resolution const Resolution& resolution() const; //! get file HKL sampling const HKL_sampling& hkl_sampling() const; //! read the reflection list from the MTZ void import_hkl_list( HKL_info& target ); //! import parameters of HKL_info object from the MTZ void import_hkl_info( HKL_info& target, const bool generate = true ); //! import crystal info from the MTZ void import_crystal( MTZcrystal& cxtl, const String mtzpath ); //! import dataset info from the MTZ void import_dataset( MTZdataset& cset, const String mtzpath ); //! mark a hkl_data for import from MTZ void import_hkl_data( HKL_data_base& cdata, const String mtzpath ); //! write the reflection list to the MTZ (along with cell, spacegroup) void export_hkl_info( const HKL_info& target ); //! export crystal info from the MTZ void export_crystal( const MTZcrystal& cxtl, const String mtzpath ); //! export dataset info from the MTZ void export_dataset( const MTZdataset& cset, const String mtzpath ); //! mark a hkl_data for export to MTZ void export_hkl_data( const HKL_data_base& cdata, const String mtzpath ); //! mark a chkl_data container for import from MTZ void import_chkl_data( Container& target, const String mtzpath, const String path = "" ); //! mark a chkl_data container for export to MTZ void export_chkl_data( Container& target, const String mtzpath ); //! return a vector of strings of the file column names/path std::vector column_paths() const; //! return a vector of strings of column names/paths just allocated const std::vector& assigned_paths() const; //! get title for MTZ file String title() const; //! set title for MTZ file void set_title( const String& title ); //! get history for MTZ file std::vector history() const; //! add to history for MTZ file void set_history( const std::vector& history ); //! return number of reflections in file int num_reflections() const; //! return sort order std::vector sort_order() const; //! return low resolution limits from file (A) ftype32 low_res_limit() const; //! CCP4 space group number int ccp4_spacegroup_number() const; //! set default column label interpretation mode void set_column_label_mode( CCP4MTZcolumn_label_mode mode ); //! \deprecated std::vector column_labels() const; //! \deprecated void import_hkl_data( HKL_data_base& cdata, MTZdataset& cset, MTZcrystal& cxtl, const String mtzpath ); //! \deprecated void export_hkl_data( const HKL_data_base& cdata, const MTZdataset& cset, const MTZcrystal& cxtl, const String mtzpath ); // index from clipper data lists to mtz columns (by name) struct datacolinf{String label; String type;}; struct datasetinf{MTZdataset dataset;std::vector columns;}; struct crystalinf{MTZcrystal crystal;std::vector datasets;}; struct hkldatacol{String path; ftype scale;}; private: enum MTZmode { NONE, READ, WRITE, APPEND }; //! mtz object String filename_in_, filename_out_; std::vector crystals; HKL_info* hkl_info_i; const HKL_info* hkl_info_o; std::vector hkl_data_i; std::vector hkl_data_o; std::vector > hkl_data_cols; std::vector assigned_paths_; //! mode MTZmode mode; CCP4MTZcolumn_label_mode colmode; //! File spacegroup, cell, resolution Spacegroup spacegroup_; Cell cell_; Resolution resolution_; HKL_sampling hkl_sampling_; //! title, history String title_; std::vector history_; //! Number of reflections int num_reflections_; //! Sort order std::vector sort_order_; //! low resolution limit from file header ftype32 reslim_low; //! CCP4 space group number int ccp4_spacegroup_number_; // generic methods bool match_path( const String& path, int& x, int& s, int& c ); }; } // namespace clipper #endif clipper-2.1/clipper/clipper-cif.h0000644000374100011300000000022610736662163013743 00000000000000/* Clipper header file */ /* (C) 2000-2002 Kevin Cowtan */ #ifndef CLIPPER_CIF_H #define CLIPPER_CIF_H #include "clipper/cif/cif_data_io.h" #endif clipper-2.1/clipper/minimol/0000777000374100011300000000000011372264353013121 500000000000000clipper-2.1/clipper/minimol/minimol_seq.h0000644000374100011300000001134110736662163015526 00000000000000/*! \file minimol_seq.h Header file for atomic sequence types */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_MINIMOL_SEQ #define CLIPPER_MINIMOL_SEQ #include "minimol.h" namespace clipper { //! Polymer sequence object /*! The polymer sequence object represents the named sequence of a single chain. */ class MPolymerSequence { public: MPolymerSequence() {} //!< null constructor const String& id() const { return id_; } //!< get sequence ID void set_id( const String& s ); //!< set sequence ID const String& sequence() const { return seq_; } //!< get sequence ID void set_sequence( const String& s ); //!< set sequence ID static String id_tidy( const String& id ) { return id; } //!< convert ID to std format static bool id_match( const String& id1, const String& id2, const MM::MODE& mode ) { return id1 == id2; } //!< compare two ids private: String id_; String seq_; }; //! Molecule sequence object /*! The molecule sequence object is a list of polymer sequence objects representing the named sequences of all the chains in a molecule. */ class MMoleculeSequence { public: //! number of polymer sequences in model int size() const { return children.size(); } //! get polymer sequence const MPolymerSequence& operator[] ( const int& i ) const { return children[i]; } //! set polymer sequence MPolymerSequence& operator[] ( const int& i ) { return children[i]; } //! get polymer sequence by id const MPolymerSequence& find( const String& n, const MM::MODE mode=MM::UNIQUE ) const; //! set polymer sequence by id MPolymerSequence& find( const String& n, const MM::MODE mode=MM::UNIQUE ); //! lookup polymer sequence by id int lookup( const String& str, const MM::MODE& mode ) const; void insert( const MPolymerSequence& add, int pos=-1 ); //!< add polymer sequence bool is_null() const { return (size()==0); } //!< test for null model private: typedef MPolymerSequence CHILDTYPE; std::vector children; }; //! Sequence alignment obeject /*! Provides methods to find an optimal alignment between two sequences. */ class MSequenceAlign { public: enum TYPE { GLOBAL, LOCAL }; MSequenceAlign( TYPE type = GLOBAL, ftype match_score = 1.0, ftype miss_score = -0.5, ftype gap_score = -1.0 ) : type_(type), scrmat(match_score), scrmis(miss_score), scrgap(gap_score) {} std::pair,std::vector > operator() ( const String& seq1, const String& seq2 ) const; private: TYPE type_; ftype32 scrmat, scrmis, scrgap; }; } // namespace clipper #endif clipper-2.1/clipper/minimol/minimol_seq.cpp0000644000374100011300000001350510740720031016045 00000000000000/* minimol_seq.cpp: atomic model types */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "minimol_seq.h" namespace clipper { // PolymerSequence void MPolymerSequence::set_id( const String& s ) { id_ = id_tidy( s ); } void MPolymerSequence::set_sequence( const String& s ) { seq_ = s; } // MoleculeSequence /*! Lookup monomer by ID. If mode=UNIQUE, the insertion code must match, otherwise the first monomer with the same sequence number is returned. \param n The monomer ID. \param mode The search mode. \return The monomer. */ const MPolymerSequence& MMoleculeSequence::find( const String& n, const MM::MODE mode ) const { int i = lookup( n, mode ); if ( i < 0 ) Message::message(Message_fatal("MMolecule: no such monomer")); return children[i]; } /*! See MMolecule::find() */ MPolymerSequence& MMoleculeSequence::find( const String& n, const MM::MODE mode ) { int i = lookup( n, mode ); if ( i < 0 ) Message::message(Message_fatal("MMolecule: no such monomer")); return children[i]; } int MMoleculeSequence::lookup( const String& str, const MM::MODE& mode ) const { String sid = CHILDTYPE::id_tidy( str ); for ( int i = 0; i < children.size(); i++ ) if ( CHILDTYPE::id_match( sid, children[i].id(), mode ) ) return i; return -1; } void MMoleculeSequence::insert( const MPolymerSequence& add, int pos ) { if ( pos < 0 ) children.push_back( add ); else children.insert( children.begin() + pos, add ); } std::pair,std::vector > MSequenceAlign::operator() ( const String& seq1, const String& seq2 ) const { enum dirn { NUL, U, L, UL }; // directions: null, up, left, diag // pad sequences at start to allow first symbol to be aligned std::string s1 = " " + seq1; std::string s2 = " " + seq2; int n1 = s1.length(); int n2 = s2.length(); // initilize matrices. Matrix scores( n1, n2, 0.0 ); Matrix dirns ( n1, n2, NUL ); // now fill first row/col if ( type_ != LOCAL ) { for ( int i1 = 1; i1 < n1; i1++ ) { scores(i1,0) = scores(i1-1,0) + scrgap; dirns(i1,0) = U; } for ( int i2 = 1; i2 < n2; i2++ ) { scores(0,i2) = scores(0,i2-1) + scrgap; dirns(0,i2) = L; } } // fill the rest of the matrix for ( int i1 = 1; i1 < n1; i1++ ) for ( int i2 = 1; i2 < n2; i2++ ) { // calc bonus for a match at this position ftype32 s = ( s1[i1] == s2[i2] ) ? scrmat : scrmis; // calc best score obtainable for this position ftype32 sul = scores(i1-1,i2-1) + s; ftype32 su = scores(i1-1,i2 ) + scrgap; ftype32 sl = scores(i1 ,i2-1) + scrgap; // and select if ( sul >= su && sul >= sl ) { scores(i1,i2) = sul; dirns(i1,i2) = UL; } else if ( su > sl ) { scores(i1,i2) = su; dirns(i1,i2) = U; } else { scores(i1,i2) = sl; dirns(i1,i2) = L; } if ( type_ == LOCAL ) if ( scores(i1,i2) <= 0.0 ) { scores(i1,i2) = 0.0; dirns(i1,i2) = NUL; } } // now trace backwards to build up the best sequence alignment std::vector r1(seq1.length(),-1), r2(seq2.length(),-1); int i1, i2; if ( type_ == LOCAL ) { // local match: start with highest scoring position i1 = i2 = 0; for ( int j1 = 0; j1 < n1; j1++ ) for ( int j2 = 0; j2 < n2; j2++ ) if ( scores(j1,j2) > scores(i1,i2) ) { i1 = j1; i2 = j2; } } else { // global match: start with last element i1 = n1 - 1; i2 = n2 - 1; } while ( dirns(i1,i2) != NUL ) { if ( dirns(i1,i2) == U ) { i1 = i1 - 1; } else if ( dirns(i1,i2) == L ) { i2 = i2 - 1; } else { i1 = i1 - 1; i2 = i2 - 1; r1[i1] = i2; r2[i2] = i1; } } std::pair,std::vector > result(r1,r2); return result; } } // namespace clipper clipper-2.1/clipper/minimol/minimol_utils.h0000644000374100011300000001123010736662163016073 00000000000000/*! \file minimol_utils.h Header file for minimol utils */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_MINIMOL_UTILS #define CLIPPER_MINIMOL_UTILS #include "minimol.h" namespace clipper { //! Class for holding the indices of an atom within a MiniMol molecule class /*! The indices remain valid only while no changes are made to the MiniMol object. */ class MAtomIndex { public: //! null constructor MAtomIndex() { p = -1; } //! constructor: from polymer, monomer and atom numbers. MAtomIndex( const int& polymer, const int& monomer, const int& atom ) : p(polymer), m(monomer), a(atom) {} //! test if object has been initialised bool is_null() const { return p >= 0; } const int& polymer() const { return p; } //!< return polymer index const int& monomer() const { return m; } //!< return monomer index const int& atom() const { return a; } //!< return atom index friend inline bool operator < ( MAtomIndex i1, MAtomIndex i2 ) { return ( i1.p < i2.p || ( i1.p == i2.p && ( i1.m < i2.m || ( i1.m == i2.m && i1.a < i2.a ) ) ) ); } private: int p, m, a; }; //! Class for holding the indices of an atom within a MiniMol molecule class /*! The indices remain valid only while no changes are made to the MiniMol object. This class can also hold the number of a symmetry operator. */ class MAtomIndexSymmetry : public MAtomIndex { public: //! null constructor MAtomIndexSymmetry() {} //! constructor: from polymer, monomer and atom numbers. MAtomIndexSymmetry( const int& polymer, const int& monomer, const int& atom , const int& symm ) : MAtomIndex(polymer,monomer,atom), s(symm) {} const int& symmetry() const { return s; } //!< return symmetry index private: int s; }; //! Find atoms in the vicinity of some coordinate in real space /*! Uses a fast non-bonded atom search. */ class MAtomNonBond { public: //! null constructor MAtomNonBond() {} //! constructor: from MiniMol and grid radius MAtomNonBond( const clipper::MiniMol& mol, double rad = 5.0 ); //! get a list of atoms in the rough vicinity of a coordinate std::vector atoms_near( const clipper::Coord_orth& co, double rad ) const; std::vector operator() ( const clipper::Coord_orth& co, double rad ) const; void debug() const; private: const MiniMol* mol_; double rad_; Spacegroup spgr; Cell cell; Grid_sampling grid; std::vector lookup; std::vector atoms; }; } // namespace clipper #endif clipper-2.1/clipper/minimol/minimol_utils.cpp0000644000374100011300000001476310736662163016444 00000000000000/* minimol_utils.cpp: minimol utils */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "minimol_utils.h" #include namespace clipper { /*! Set up a non-bonding type search database to allow fast access to a list of atoms within a given radius of a given coordinate. Setting up the class takes a litle (but not a great deal) of time, returning coordinates is very fast indeed. You can also specify a radius to the constructor, which determines memory use as (24*cell volume/rad^3) bytes. For small radii, set this to the search radius or larger. For large radii, a smaller value may improve performance. \param mol The MiniMol object containing the atoms. \param rad A radius for sampling crystal space. */ MAtomNonBond::MAtomNonBond( const clipper::MiniMol& mol, double rad ) { // store params mol_ = &mol; rad_ = rad; cell = mol.cell(); spgr = mol.spacegroup(); // pick a grid for the cell grid = Grid_sampling( Util::intc(1.0/(rad_*cell.a_star())), Util::intc(1.0/(rad_*cell.b_star())), Util::intc(1.0/(rad_*cell.c_star()))); // now create a list of atoms in the cell int gi; Coord_frac cf; std::vector > iatoms; for ( int p = 0; p < mol.size(); p++ ) for ( int m = 0; m < mol[p].size(); m++ ) for ( int a = 0; a < mol[p][m].size(); a++ ) if ( !mol[p][m][a].is_null() ) { for ( int s = 0; s < spgr.num_symops(); s++ ) { cf = spgr.symop(s) * mol[p][m][a].coord_orth().coord_frac(cell); gi = cf.coord_grid(grid).unit(grid).index(grid); iatoms.push_back( std::pair( gi, MAtomIndexSymmetry( p, m, a, s ) ) ); } } // sort them by grid coordinate index std::sort( iatoms.begin(), iatoms.end() ); // turn the index into a list of atom indices, indexed by a list of cells lookup.resize( grid.size()+1, iatoms.size() ); atoms.resize( iatoms.size() ); // fill out the atom index for ( int i = 0; i < iatoms.size(); i++ ) { atoms[i] = iatoms[i].second; if ( lookup[iatoms[i].first] == iatoms.size() ) lookup[iatoms[i].first] = i; } // and fill in any missing terms for ( int i = lookup.size()-1; i > 0; i-- ) if ( lookup[i-1] > lookup[i] ) lookup[i-1] = lookup[i]; } /*! Return a list of atom indices in the MiniMol objects, and symop numbers, of atoms within the previously specified radius of the given coordinate. The function always returns all atoms within the specified radius, but also some beyond it. This function is very fast. \param co The coordinate about which to search. \param rad The radius to search. \return A vector of atom indices near the given coordinate. */ std::vector MAtomNonBond::atoms_near( const clipper::Coord_orth& co, double rad ) const { std::vector result; Coord_grid cg = co.coord_frac(cell).coord_grid(grid); Coord_grid c; int d = Util::intc( rad/rad_ - 1.0e-4 ); int gi; for ( int u = cg.u()-d; u <= cg.u()+d; u++ ) for ( int v = cg.v()-d; v <= cg.v()+d; v++ ) for ( int w = cg.w()-d; w <= cg.w()+d; w++ ) { gi = Coord_grid(u,v,w).unit(grid).index(grid); for ( int i = lookup[gi]; i < lookup[gi+1]; i++ ) result.push_back( atoms[i] ); } return result; } /*! Return a list of atom indices in the MiniMol objects, and symop numbers, of atoms within the previously specified radius of the given coordinate. The function only returns atoms within the specified radius. This function is very fast. \param co The coordinate about which to search. \param rad The radius to search. \return A vector of atom indices near the given coordinate. */ std::vector MAtomNonBond::operator() ( const clipper::Coord_orth& co, double rad ) const { std::vector result; std::vector atoms = atoms_near( co, rad ); const MiniMol& mol = *mol_; Coord_frac f1, f2; f1 = co.coord_frac(cell); for ( int i = 0; i < atoms.size(); i++ ) { f2 = spgr.symop(atoms[i].symmetry()) * mol[atoms[i].polymer()][atoms[i].monomer()][atoms[i].atom()].coord_orth().coord_frac(cell); double l2 = ( f2.lattice_copy_near( f1 ) - f1 ).lengthsq( cell ); if ( l2 < rad*rad ) result.push_back( atoms[i] ); } return result; } void MAtomNonBond::debug() const { std::cout << grid.size() << "\t" << atoms.size() << "\n"; for ( int i = 0; i < lookup.size(); i++ ) std::cout << i << "\t" << lookup[i] << "\n"; } } // namespace clipper clipper-2.1/clipper/minimol/minimol_io.h0000644000374100011300000000671610736662163015357 00000000000000/*! \file minimol_io.h Header file for atomic model io types */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_MINIMOL_IO #define CLIPPER_MINIMOL_IO #include "../mmdb/clipper_mmdb.h" #include "minimol_seq.h" namespace clipper { //! MMDB file object for MiniMol i/o /*! This object is an i/o object for MiniMol, representing an interface between MiniMol and PDB or CIF files. It is implemented as an MMDB Manager, so MMDB methods may be additionally used on the MMDBfile object. */ class MMDBfile : public MMDBManager { public: //! load MMDB hierarchy from file void read_file( const String& file ); //! save MMDB hierarchy to file void write_file( const String& file, TYPE type = Default ); //! import MiniMol from MMDB hierarchy void import_minimol( MiniMol& minimol, const int hnd=-1 ); //! export MiniMol to MMDB hierarchy void export_minimol( const MiniMol& minimol ); }; //! SEQ file object for MiniMol sequence i/o class SEQfile { public: //! load SEQ data from file void read_file( const String& file ); //! read a single sequence from the SEQ file void import_polymer_sequence( MPolymerSequence& target ); //! read a molecule from the SEQ file void import_molecule_sequence( MMoleculeSequence& target ); private: String contents; }; } // namespace clipper #endif clipper-2.1/clipper/minimol/minimol_data.h0000644000374100011300000000540010776417512015646 00000000000000/*! \file minimol_data.h Header file for atomic model data */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_MINIMOL_DATA #define CLIPPER_MINIMOL_DATA #include "../core/clipper_precision.h" namespace clipper { namespace data { struct Rotamer_data { const char* resname; int num_rota, rota; ftype32 rota_prob; int num_atom; const char* atomname; ftype32 x, y, z; }; extern Rotamer_data rotamer_data_dunbrack[]; extern int rotamer_data_dunbrack_size; extern Rotamer_data rotamer_data_richardson[]; extern int rotamer_data_richardson_size; } // namespace data } // namespace clipper #endif clipper-2.1/clipper/minimol/minimol.cpp0000644000374100011300000007446611360607134015221 00000000000000/* minimol.cpp: atomic model types */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "minimol.h" #include "minimol_utils.h" extern "C" { #include } namespace clipper { Message_ctor message_ctor_mmodel( " [MModel: constructed]" ); // helper functions namespace MM { std::vector path_split( const clipper::String& s, const clipper::String& sep ) { std::vector splitstr; size_t tokbeg = 0, tokend = 0; if ( s.find_first_of(sep, 0) == 0 ) tokbeg = 1; while (1) { tokend = s.find_first_of(sep, tokbeg); if (tokend == String::npos) break; splitstr.push_back( s.substr(tokbeg, tokend-tokbeg) ); tokbeg = tokend+1; } splitstr.push_back( s.substr(tokbeg) ); return splitstr; } } // Atom MAtom::MAtom( const clipper::Atom& atom ) { set_element( atom.element() ); set_coord_orth( atom.coord_orth() ); set_occupancy( atom.occupancy() ); set_u_iso( atom.u_iso() ); set_u_aniso_orth( atom.u_aniso_orth() ); } void MAtom::set_id( const String& s ) { id_ = id_tidy( s ); } void MAtom::set_name( const String s, const String altconf ) { if ( altconf != "" ) set_id( s + ":" + altconf ); else set_id( s ); } String MAtom::id_tidy( const String& id ) { int pos = id.find( ":" ); if ( pos == String::npos ) pos = id.length(); String name( id.substr( 0, pos ) ); String altc( id.substr( pos ) ); if ( name.length() < 4 ) { name = name + " "; if ( islower( name[1] ) ) name[1] = toupper( name[1] ); else name = " " + name; } return name.substr(0,4) + altc; } /*! copy from other atom. mode can be MM::COPY_M, COPY_P, COPY_MP, COPY_C, COPY_MC, COPY_PC, COPY_MPC, where M means copy members, P means copy PropertyMananger properties, and C means copy children. Children are copied with the same option. The values 'MEMBERS', 'PROPERTIES', 'CHILDREN' can also be used. */ MAtom& MAtom::copy( const MAtom& other, const MM::COPY& mode ) { if ( mode & MM::COPY_M ) atom() = other.atom(); if ( mode & MM::COPY_M ) id_ = other.id_; if ( mode & MM::COPY_P ) PropertyManager::copy( other ); return *this; } bool MAtom::id_match( const String& id1, const String& id2, const MM::MODE& mode ) { if ( mode == MM::UNIQUE ) return ( id1 == id2 ); else return ( id1.substr(0,4) == id2.substr(0,4) ); } // Monomer void MMonomer::set_id( const String& s ) { id_ = id_tidy( s ); } void MMonomer::set_type( const String& s ) { type_ = s; } void MMonomer::set_seqnum( const int s, const String inscode ) { if ( inscode != "" ) set_id( String( s, 4 ) + ":" + inscode ); else set_id( String( s, 4 ) ); } Atom_list MMonomer::atom_list() const { Atom_list list; for ( int a = 0; a < children.size(); a++ ) list.push_back( Atom( children[a] ) ); return list; } void MMonomer::transform( const RTop_orth rt ) { for ( int i = 0; i < children.size(); i++ ) children[i].transform( rt ); } /*! Creates a copy of this monomer containing only the atoms described by the selection string. '*' copies all atoms. The atom selection must contain an atom ID or a comma separated list of atom IDs, or '*' to select all atom. Atom IDs are described in s_mm_atom_id. The selection string must contain an atom ID or a comma separated list of atom IDs. Atom IDs are described in s_mm_atom_id. \param sel The selection string. \param mode MM::UNIQUE forces an exact match, including alternate conformation code. MM::ANY matches every atom with the right name, ignoring alternate conformation codes. \return The selection as a new monomer. */ MMonomer MMonomer::select( const String& sel, const MM::MODE mode ) const { std::vector path = MM::path_split( sel, "/" ); while ( path.size() < 1 ) path.push_back( "*" ); MMonomer result; result.copy( *this, MM::COPY_MP ); if ( path[0].trim() == "*" ) { for ( int i = 0; i < children.size(); i++ ) result.insert( children[i] ); } else { std::vector list = MM::path_split( path[0], "," ); for ( int j = 0; j < list.size(); j++ ) { String sid = CHILDTYPE::id_tidy( list[j] ); for ( int i = 0; i < children.size(); i++ ) if ( CHILDTYPE::id_match( sid, children[i].id(), mode ) ) result.insert( children[i] ); } } return result; } /*! Creates a list of inidices of children matching the given selection string. See select(). \param sel The selection string. \param mode MM::UNIQUE or MM::ANY. \return A vector of integer indices of the matching children. */ std::vector MMonomer::select_index( const String& sel, const MM::MODE mode ) const { std::vector result; if ( sel.trim() == "*" ) { for ( int i = 0; i < children.size(); i++ ) result.push_back( i ); } else { std::vector list = MM::path_split( sel, "," ); for ( int j = 0; j < list.size(); j++ ) { String sid = CHILDTYPE::id_tidy( list[j] ); for ( int i = 0; i < children.size(); i++ ) if ( CHILDTYPE::id_match( sid, children[i].id(), mode ) ) result.push_back( i ); } } return result; } /*! Lookup atom by ID. If mode=UNIQUE, the alternate conformation code must match, otherwise the first atom with the same name is returned. \param n The atom ID. \param mode The search mode. \return The atom. */ const MAtom& MMonomer::find( const String& n, const MM::MODE mode ) const { int i = lookup( n, mode ); if ( i < 0 ) Message::message(Message_fatal("MMonomer: no such atom")); return children[i]; } /*! See MMonomer::find() */ MAtom& MMonomer::find( const String& n, const MM::MODE mode ) { int i = lookup( n, mode ); if ( i < 0 ) Message::message(Message_fatal("MMonomer: no such atom")); return children[i]; } int MMonomer::lookup( const String& str, const MM::MODE& mode ) const { String sid = CHILDTYPE::id_tidy( str ); for ( int i = 0; i < children.size(); i++ ) if ( CHILDTYPE::id_match( sid, children[i].id(), mode ) ) return i; return -1; } void MMonomer::insert( const MAtom& add, int pos ) { if ( pos < 0 ) children.push_back( add ); else children.insert( children.begin() + pos, add ); } /*! \return atoms which are in both monomers. */ MMonomer operator& ( const MMonomer& m1, const MMonomer& m2 ) { MMonomer result; result.copy( m1, MM::COPY_MP ); for ( int i1 = 0; i1 < m1.size(); i1++ ) for ( int i2 = 0; i2 < m2.size(); i2++ ) if ( m1[i1].id() == m2[i2].id() ) { result.insert( m1[i1] ); break; } return result; } /*! \return atoms which are in either monomer. */ MMonomer operator| ( const MMonomer& m1, const MMonomer& m2 ) { MMonomer result; result.copy( m1, MM::COPY_MP ); int i, j; for ( i = 0; i < m1.size(); i++ ) { for ( j = 0; j < result.size(); j++ ) if ( m1[i].id() == result[j].id() ) break; if ( j == result.size() ) result.insert( m1[i] ); } for ( i = 0; i < m2.size(); i++ ) { for ( j = 0; j < result.size(); j++ ) if ( m2[i].id() == result[j].id() ) break; if ( j == result.size() ) result.insert( m2[i] ); } return result; } /*! copy from other atom. mode can be MM::COPY_M, COPY_P, COPY_MP, COPY_C, COPY_MC, COPY_PC, COPY_MPC, where M means copy members, P means copy PropertyMananger properties, and C means copy children. Children are copied with the same option. The values 'MEMBERS', 'PROPERTIES', 'CHILDREN' can also be used. */ MMonomer& MMonomer::copy( const MMonomer& other, const MM::COPY& mode ) { if ( mode & MM::COPY_M ) id_ = other.id_; if ( mode & MM::COPY_M ) type_ = other.type_; if ( mode & MM::COPY_P ) PropertyManager::copy( other ); if ( mode & MM::COPY_C ) { children.resize( other.size() ); for ( int i = 0; i < size(); i++ ) children[i].copy( other[i], mode ); } return *this; } String MMonomer::id_tidy( const String& id ) { int pos = id.find( ":" ); if ( pos == String::npos ) return String( id.i(), 4 ); else return String( id.i(), 4 ) + id.substr( pos ); } bool MMonomer::id_match( const String& id1, const String& id2, const MM::MODE& mode ) { if ( mode == MM::UNIQUE ) return ( id1 == id2 ); else return ( id1.substr(0,4) == id2.substr(0,4) ); } // Polymer void MPolymer::set_id( const String& s ) { id_ = id_tidy( s ); } Atom_list MPolymer::atom_list() const { Atom_list list; for ( int m = 0; m < children.size(); m++ ) for ( int a = 0; a < children[m].size(); a++ ) list.push_back( Atom( children[m][a] ) ); return list; } void MPolymer::transform( const RTop_orth rt ) { for ( int i = 0; i < children.size(); i++ ) children[i].transform( rt ); } /*! Creates a copy of this polymer containing only the monomers and atoms described by the selection string. The selection string must be of the form 'X/Y' where X is a monomer selection and Y is an atom selection, described under MAtom::select(). The monomer selection must contain a monomer ID or a comma separated list of monomer IDs, or '*' to select all monomers. Monomer IDs are described in s_mm_monomer_id. \param sel The selection string. \param mode MM::UNIQUE forces an exact match, including insertion code. MM::ANY matches any monomer with the right sequence number, ignoring insertion code. \return The selection as a new polymer. */ MPolymer MPolymer::select( const String& sel, const MM::MODE mode ) const { std::vector path = MM::path_split( sel, "/" ); while ( path.size() < 2 ) path.push_back( "*" ); MPolymer result; result.copy( *this, MM::COPY_MP ); if ( path[0].trim() == "*" ) { for ( int i = 0; i < children.size(); i++ ) result.insert( children[i].select( path[1], mode ) ); } else { std::vector list = MM::path_split( path[0], "," ); for ( int j = 0; j < list.size(); j++ ) { String sid = CHILDTYPE::id_tidy( list[j] ); for ( int i = 0; i < children.size(); i++ ) if ( CHILDTYPE::id_match( sid, children[i].id(), mode ) ) result.insert( children[i].select( path[1], mode ) ); } } return result; } /*! Creates a list of inidices of children matching the given selection string. See select(). \param sel The selection string. \param mode MM::UNIQUE or MM::ANY. \return A vector of integer indices of the matching children. */ std::vector MPolymer::select_index( const String& sel, const MM::MODE mode ) const { std::vector result; if ( sel.trim() == "*" ) { for ( int i = 0; i < children.size(); i++ ) result.push_back( i ); } else { std::vector list = MM::path_split( sel, "," ); for ( int j = 0; j < list.size(); j++ ) { String sid = CHILDTYPE::id_tidy( list[j] ); for ( int i = 0; i < children.size(); i++ ) if ( CHILDTYPE::id_match( sid, children[i].id(), mode ) ) result.push_back( i ); } } return result; } /*! Lookup monomer by ID. If mode=UNIQUE, the insertion code must match, otherwise the first monomer with the same sequence number is returned. \param n The monomer ID. \param mode The search mode. \return The monomer. */ const MMonomer& MPolymer::find( const String& n, const MM::MODE mode ) const { int i = lookup( n, mode ); if ( i < 0 ) Message::message(Message_fatal("MPolymer: no such monomer")); return children[i]; } /*! See MPolymer::find() */ MMonomer& MPolymer::find( const String& n, const MM::MODE mode ) { int i = lookup( n, mode ); if ( i < 0 ) Message::message(Message_fatal("MPolymer: no such monomer")); return children[i]; } int MPolymer::lookup( const String& str, const MM::MODE& mode ) const { String sid = CHILDTYPE::id_tidy( str ); for ( int i = 0; i < children.size(); i++ ) if ( CHILDTYPE::id_match( sid, children[i].id(), mode ) ) return i; return -1; } void MPolymer::insert( const MMonomer& add, int pos ) { if ( pos < 0 ) children.push_back( add ); else children.insert( children.begin() + pos, add ); } /*! \return monomers and atoms which are in both polymers. */ MPolymer operator& ( const MPolymer& m1, const MPolymer& m2 ) { MPolymer result; result.copy( m1, MM::COPY_MP ); for ( int i1 = 0; i1 < m1.size(); i1++ ) for ( int i2 = 0; i2 < m2.size(); i2++ ) if ( m1[i1].id() == m2[i2].id() ) { result.insert( m1[i1] & m2[i2] ); break; } return result; } /*! \return monomers and atoms which are in either polymer. */ MPolymer operator| ( const MPolymer& m1, const MPolymer& m2 ) { MPolymer result; result.copy( m1, MM::COPY_MP ); int i, j; for ( i = 0; i < m1.size(); i++ ) { for ( j = 0; j < result.size(); j++ ) if ( m1[i].id() == result[j].id() ) break; if ( j == result.size() ) result.insert( m1[i] ); else result[j] = result[j] | m1[i]; } for ( i = 0; i < m2.size(); i++ ) { for ( j = 0; j < result.size(); j++ ) if ( m2[i].id() == result[j].id() ) break; if ( j == result.size() ) result.insert( m2[i] ); else result[j] = result[j] | m2[i]; } return result; } /*! copy from other atom. mode can be MM::COPY_M, COPY_P, COPY_MP, COPY_C, COPY_MC, COPY_PC, COPY_MPC, where M means copy members, P means copy PropertyMananger properties, and C means copy children. Children are copied with the same option. The values 'MEMBERS', 'PROPERTIES', 'CHILDREN' can also be used. */ MPolymer& MPolymer::copy( const MPolymer& other, const MM::COPY& mode ) { if ( mode & MM::COPY_M ) id_ = other.id_; if ( mode & MM::COPY_P ) PropertyManager::copy( other ); if ( mode & MM::COPY_C ) { children.resize( other.size() ); for ( int i = 0; i < size(); i++ ) children[i].copy( other[i], mode ); } return *this; } String MPolymer::id_tidy( const String& id ) { return id; } bool MPolymer::id_match( const String& id1, const String& id2, const MM::MODE& mode ) { return ( id1 == id2 ); } // Model Atom_list MModel::atom_list() const { Atom_list list; for ( int p = 0; p < children.size(); p++ ) for ( int m = 0; m < children[p].size(); m++ ) for ( int a = 0; a < children[p][m].size(); a++ ) list.push_back( Atom( children[p][m][a] ) ); return list; } void MModel::transform( const RTop_orth rt ) { for ( int i = 0; i < children.size(); i++ ) children[i].transform( rt ); } /*! Creates a copy of this model containing only the polymers, monomers and atoms described by the selection string. The selection string must be of the form 'X/Y/Z' where X is a polymer selection, Y is a monomer selection described under MMonomer::select(), and Z is an atom selection described under MAtom::select(). The polymer selection must contain a polymer ID or a comma separated list of polymer IDs, or '*' to select all polymers. Polymer IDs are described in s_mm_monomer_id. See s_mm_selections for examples. \param sel The selection string. \param mode No effect. \return The selection as a new model. */ MModel MModel::select( const String& sel, const MM::MODE mode ) const { std::vector path = MM::path_split( sel, "/" ); while ( path.size() < 3 ) path.push_back( "*" ); MModel result; result.copy( *this, MM::COPY_MP ); if ( path[0].trim() == "*" ) { for ( int i = 0; i < children.size(); i++ ) result.insert( children[i].select( path[1]+"/"+path[2], mode ) ); } else { std::vector list = MM::path_split( path[0], "," ); for ( int j = 0; j < list.size(); j++ ) { String sid = CHILDTYPE::id_tidy( list[j] ); for ( int i = 0; i < children.size(); i++ ) if ( CHILDTYPE::id_match( sid, children[i].id(), mode ) ) result.insert( children[i].select( path[1]+"/"+path[2], mode ) ); } } return result; } /*! Creates a list of inidices of children matching the given selection string. See select(). \param sel The selection string. \param mode MM::UNIQUE or MM::ANY. \return A vector of integer indices of the matching children. */ std::vector MModel::select_index( const String& sel, const MM::MODE mode ) const { std::vector result; if ( sel.trim() == "*" ) { for ( int i = 0; i < children.size(); i++ ) result.push_back( i ); } else { std::vector list = MM::path_split( sel, "," ); for ( int j = 0; j < list.size(); j++ ) { String sid = CHILDTYPE::id_tidy( list[j] ); for ( int i = 0; i < children.size(); i++ ) if ( CHILDTYPE::id_match( sid, children[i].id(), mode ) ) result.push_back( i ); } } return result; } /*! Lookup polymer by ID. Currently, mode is ignored. \param n The monomer ID. \param mode The search mode. \return The polymer. */ const MPolymer& MModel::find( const String& n, const MM::MODE mode ) const { int i = lookup( n, mode ); if ( i < 0 ) Message::message(Message_fatal("MModel: no such polymer")); return children[i]; } /*! See MModel::find() */ MPolymer& MModel::find( const String& n, const MM::MODE mode ) { int i = lookup( n, mode ); if ( i < 0 ) Message::message(Message_fatal("MModel: no such polymer")); return children[i]; } int MModel::lookup( const String& str, const MM::MODE& mode ) const { String sid = CHILDTYPE::id_tidy( str ); for ( int i = 0; i < children.size(); i++ ) if ( CHILDTYPE::id_match( sid, children[i].id(), mode ) ) return i; return -1; } void MModel::insert( const MPolymer& add, int pos ) { if ( pos < 0 ) children.push_back( add ); else children.insert( children.begin() + pos, add ); } /*! \return polymers, monomers and atoms which are in both models. */ MModel operator& ( const MModel& m1, const MModel& m2 ) { MModel result; result.copy( m1, MM::COPY_MP ); for ( int i1 = 0; i1 < m1.size(); i1++ ) for ( int i2 = 0; i2 < m2.size(); i2++ ) if ( m1[i1].id() == m2[i2].id() ) { result.insert( m1[i1] & m2[i2] ); break; } return result; } /*! \return polymers, monomers and atoms which are in either model. */ MModel operator| ( const MModel& m1, const MModel& m2 ) { MModel result; result.copy( m1, MM::COPY_MP ); int i, j; for ( i = 0; i < m1.size(); i++ ) { for ( j = 0; j < result.size(); j++ ) if ( m1[i].id() == result[j].id() ) break; if ( j == result.size() ) result.insert( m1[i] ); else result[j] = result[j] | m1[i]; } for ( i = 0; i < m2.size(); i++ ) { for ( j = 0; j < result.size(); j++ ) if ( m2[i].id() == result[j].id() ) break; if ( j == result.size() ) result.insert( m2[i] ); else result[j] = result[j] | m2[i]; } return result; } /*! copy from other atom. mode can be MM::COPY_M, COPY_P, COPY_MP, COPY_C, COPY_MC, COPY_PC, COPY_MPC, where M means copy members, P means copy PropertyMananger properties, and C means copy children. Children are copied with the same option. The values 'MEMBERS', 'PROPERTIES', 'CHILDREN' can also be used. */ MModel& MModel::copy( const MModel& other, const MM::COPY& mode ) { if ( mode & MM::COPY_P ) PropertyManager::copy( other ); if ( mode & MM::COPY_C ) { children.resize( other.size() ); for ( int i = 0; i < size(); i++ ) children[i].copy( other[i], mode ); } return *this; } /*! Return an atom on the basis of the MAtomIndex. Behaviour is undefined if the index is null. \param index The index of the atom in the heirarchy. \return A reference to the MAtom. */ const MAtom& MModel::atom( const MAtomIndex& index ) const { return children[index.polymer()][index.monomer()][index.atom()]; } /*! Return an atom on the basis of the MAtomIndex. Behaviour is undefined if the index is null. \param index The index of the atom in the heirarchy. \return A reference to the MAtom. */ MAtom& MModel::atom( const MAtomIndex& index ) { return children[index.polymer()][index.monomer()][index.atom()]; } std::vector MModel::select_atom_index( const String& sel, const MM::MODE mode ) const { std::vector result; std::vector path = MM::path_split( sel, "/" ); while ( path.size() < 3 ) path.push_back( "*" ); const std::vector mps = select_index( path[0], mode ); for ( int p = 0; p < mps.size(); p++ ) { const std::vector mms = children[mps[p]].select_index( path[1], mode ); for ( int m = 0; m < mms.size(); m++ ) { const std::vector mas = children[mps[p]][mms[m]].select_index( path[2], mode ); for ( int a = 0; a < mas.size(); a++ ) { result.push_back( MAtomIndex( mps[p], mms[m], mas[a] ) ); } } } return result; } // MiniMol MiniMol::MiniMol() { Message::message( message_ctor_mmodel ); } /*! The object is constructed with no atoms. \param spacegroup the spacegroup. \param cell the cell. */ MiniMol::MiniMol( const Spacegroup& spacegroup, const Cell& cell ) { init( spacegroup, cell ); Message::message( message_ctor_mmodel ); } /*! The object is initialised with no atoms. \param spacegroup the spacegroup. \param cell the cell. */ void MiniMol::init( const Spacegroup& spacegroup, const Cell& cell ) { spacegroup_ = spacegroup; cell_ = cell; } MAtom MiniMol::symmetry_atom( const MAtomIndexSymmetry& index ) { MAtom atom = MModel::atom(index); atom.set_coord_orth((spacegroup_.symop(index.symmetry())*atom.coord_orth().coord_frac(cell_)).coord_orth(cell_)); return atom; } bool MiniMol::is_null() const { return ( spacegroup_.is_null() || cell_.is_null() ); } // UTILITY FUNCTIONS: // e.g. protein specific tools. MMonomer::TYPE MMonomer::default_type_ = MMonomer::Richardson; /*! A carbonyl oxygen is added to this residue if the supplied residue contains an appriate N atom bonded to the C. Otherwise, nothing happens. \param next The next monomer in the chain. */ void MMonomer::protein_mainchain_build_carbonyl_oxygen( const MMonomer& next ) { // check for mainchain atoms int a1 = lookup( " CA ", MM::ANY ); int c1 = lookup( " C ", MM::ANY ); int n2 = next.lookup( " N ", MM::ANY ); if ( a1 < 0 || c1 < 0 || n2 < 0 ) return; // get coordinates and check bonding const clipper::Coord_orth cc1 = children[c1].coord_orth(); const clipper::Coord_orth ca1 = children[a1].coord_orth() - cc1; const clipper::Coord_orth cn2 = next[n2].coord_orth() - cc1; if ( cn2.lengthsq() > 2.2 ) return; double uiso = children[c1].u_iso(); double occ = children[c1].occupancy(); // delete any existing O int o1 = lookup( " O ", MM::ANY ); if ( o1 >= 0 ) children.erase( children.begin()+o1 ); // add the atom const clipper::Vec3<> v0 = ca1.unit(); const clipper::Vec3<> v1 = ( clipper::Vec3<>::cross( v0, clipper::Vec3<>::cross( v0, cn2 ) ) ).unit(); MAtom atm = MAtom::null(); atm.set_id( " O " ); atm.set_element( "O" ); // length 1.24 angle 2.11 atm.set_coord_orth( cc1 + clipper::Coord_orth( -0.637*v0 + 1.064*v1 ) ); atm.set_occupancy( occ ); atm.set_u_iso( uiso ); insert( atm ); } // internal function for fast lookup in rotamer lib int MMonomer::rotamer_find( String res, int rota, TYPE t ) { int rotamer_data_size; if ( t == Dunbrack ) rotamer_data_size = data::rotamer_data_dunbrack_size; else rotamer_data_size = data::rotamer_data_richardson_size; const data::Rotamer_data* rotamer_data; if ( t == Dunbrack ) rotamer_data = data::rotamer_data_dunbrack; else rotamer_data = data::rotamer_data_richardson; if ( res.length() < 3 ) return 0; int p1 = -1; int p2 = rotamer_data_size - 1; while ( p2 - p1 > 1 ) { int p = ( p1 + p2 ) / 2; int s = strncmp( res.c_str(), rotamer_data[p].resname, 3 ); if ( s < 0 || ( s == 0 && rota <= rotamer_data[p].rota ) ) p2 = p; else p1 = p; } if ( strncmp( res.c_str(), rotamer_data[p2].resname, 3 ) == 0 && rota == rotamer_data[p2].rota ) return p2; return -1; } /*! \return The number of stored rotamers for this residue type. 0 if unknown. */ int MMonomer::protein_sidechain_number_of_rotamers( TYPE t ) const { const data::Rotamer_data* rotamer_data; if ( t == Dunbrack ) rotamer_data = data::rotamer_data_dunbrack; else rotamer_data = data::rotamer_data_richardson; int r = rotamer_find( type(), 0, t ); if ( r < 0 ) return 0; return rotamer_data[r].num_rota; } /*! \param n The number of the rotamer required. \return The frequency of the given rotamer. */ ftype MMonomer::protein_sidechain_build_rotamer( const int& n, TYPE t ) { const data::Rotamer_data* rotamer_data; if ( t == Dunbrack ) rotamer_data = data::rotamer_data_dunbrack; else rotamer_data = data::rotamer_data_richardson; int na = lookup( " CA ", MM::ANY ); int nc = lookup( " C ", MM::ANY ); int nn = lookup( " N ", MM::ANY ); if ( na < 0 || nc < 0 || nn < 0 ) return 0.0; clipper::Coord_orth ca = children[na].coord_orth(); clipper::Coord_orth c1 = children[nc].coord_orth() - ca; clipper::Coord_orth c2 = children[nn].coord_orth() - ca; double uiso = children[na].u_iso(); double occ = children[na].occupancy(); // strip old side chain for ( int i = children.size()-1; i >= 0; i-- ) if ( children[i].name() != " CA " && children[i].name() != " N " && children[i].name() != " C " && children[i].name() != " O " ) children.erase( children.begin()+i ); // get rotamer int r = rotamer_find( type(), n, t ); if ( r < 0 ) return 0.0; if ( n >= rotamer_data[r].num_rota ) return -1.0; // get rtop from standard orientation const clipper::Vec3<> v1( (c1.unit()+c2.unit()).unit() ); const clipper::Vec3<> v2( clipper::Vec3<>::cross(c1,c2).unit() ); const clipper::Vec3<> v3( clipper::Vec3<>::cross(v1,v2).unit() ); const clipper::Mat33<> mr( v1[0], v2[0], v3[0], v1[1], v2[1], v3[1], v1[2], v2[2], v3[2] ); clipper::RTop_orth rtop( mr, ca ); // add new atoms MAtom atm = MAtom::null(); for ( int dr = 0; dr < rotamer_data[r].num_atom; dr++ ) { int i = r + dr; String name = rotamer_data[i].atomname; atm.set_id( name ); name = name.substr( 0, 2 ); name = name.trim(); atm.set_element( name ); atm.set_coord_orth( rtop * Coord_orth( rotamer_data[i].x, rotamer_data[i].y, rotamer_data[i].z ) ); atm.set_occupancy( occ ); atm.set_u_iso( uiso ); insert( atm ); } return rotamer_data[r].rota_prob; } /*! Test if the C of residue 1 is bonded to the N of residue 2, within the distance r. \param r1 The first residue. \param r2 The second residue. \param r The maximum allowed bond length. \return true if N and C are present and bonded. */ bool MMonomer::protein_peptide_bond( const MMonomer& m1, const MMonomer& m2, ftype r ) { int c1 = m1.lookup( " C ", MM::ANY ); int n2 = m2.lookup( " N ", MM::ANY ); if ( c1 >= 0 && n2 >= 0 ) if ( ( m1[c1].coord_orth() - m2[n2].coord_orth() ).lengthsq() < r*r ) return true; return false; } /*! Return the Ramachadran angle in radians on -pi...pi. To check the result, see clipper::Util::is_nan() \param r1 The first residue. \param r2 The second residue. \return The torsion angle in radians, or NaN if atoms are missing. */ double MMonomer::protein_ramachandran_phi( const MMonomer& m1, const MMonomer& m2 ) { ftype result = clipper::Util::nan(); int index_cx = m1.lookup( " C ", clipper::MM::ANY ); int index_n = m2.lookup( " N ", clipper::MM::ANY ); int index_ca = m2.lookup( " CA ", clipper::MM::ANY ); int index_c = m2.lookup( " C ", clipper::MM::ANY ); // if we have all three atoms, then add residue if ( index_cx >= 0 && index_ca >= 0 && index_c >= 0 && index_n >= 0 ) { Coord_orth coord_cx = m1[index_cx].coord_orth(); Coord_orth coord_n = m2[index_n ].coord_orth(); Coord_orth coord_ca = m2[index_ca].coord_orth(); Coord_orth coord_c = m2[index_c ].coord_orth(); // ramachandran calc result = Coord_orth::torsion( coord_cx, coord_n, coord_ca, coord_c ); } return result; } /*! Return the Ramachadran angle in radians on -pi...pi. To check the result, see clipper::Util::is_nan() \param r1 The first residue. \param r2 The second residue. \return The torsion angle in radians, or NaN if atoms are missing. */ double MMonomer::protein_ramachandran_psi( const MMonomer& m1, const MMonomer& m2 ) { ftype result = clipper::Util::nan(); int index_n = m1.lookup( " N ", clipper::MM::ANY ); int index_ca = m1.lookup( " CA ", clipper::MM::ANY ); int index_c = m1.lookup( " C ", clipper::MM::ANY ); int index_nx = m2.lookup( " N ", clipper::MM::ANY ); // if we have all three atoms, then add residue if ( index_ca >= 0 && index_c >= 0 && index_n >= 0 && index_nx >= 0 ) { Coord_orth coord_n = m1[index_n ].coord_orth(); Coord_orth coord_ca = m1[index_ca].coord_orth(); Coord_orth coord_c = m1[index_c ].coord_orth(); Coord_orth coord_nx = m2[index_nx].coord_orth(); // ramachandran calc result = Coord_orth::torsion( coord_n, coord_ca, coord_c, coord_nx ); } return result; } } // namespace clipper clipper-2.1/clipper/minimol/Makefile.am0000644000374100011300000000153711372264321015072 00000000000000# Makefile.am, passed: clipper/minimol, extracted subdir: minimol # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper/minimol ## -*- mode: Makefile; mode: font-lock -*- INCLUDES=${FFTW_CXXFLAGS} ${MMDB_CXXFLAGS} library_include_HEADERS = \ container_minimol.h \ minimol_data.h \ minimol.h \ minimol_io.h \ minimol_seq.h \ minimol_utils.h lib_LTLIBRARIES = libclipper-minimol.la libclipper_minimol_la_SOURCES = \ container_minimol.cpp \ minimol.cpp \ minimol_data.cpp \ minimol_io.cpp \ minimol_seq.cpp \ minimol_utils.cpp library_includedir = $(pkgincludedir)/minimol libclipper_minimol_la_LDFLAGS = -version-info @CLIPPER_LT_VERSION@ libclipper_minimol_la_LIBADD = \ $(top_builddir)/clipper/mmdb/libclipper-mmdb.la $(top_builddir)/clipper/core/libclipper-core.la clipper-2.1/clipper/minimol/minimol_data.cpp0000644000374100011300000023772410776417434016224 00000000000000/* minimol.cpp: atomic model data */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "minimol_data.h" namespace clipper { namespace data { Rotamer_data rotamer_data_dunbrack[] = { {"ALA", 1, 0, 1.0000, 1," CB ",-0.940,-1.196, 0.000}, {"ARG",16, 0, 0.1099, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",16, 0, 0.1099, 7," CG ",-2.017,-1.162,-1.063}, {"ARG",16, 0, 0.1099, 7," CD ",-2.937,-2.372,-1.071}, {"ARG",16, 0, 0.1099, 7," NE ",-3.939,-2.292,-2.130}, {"ARG",16, 0, 0.1099, 7," CZ ",-4.817,-3.248,-2.399}, {"ARG",16, 0, 0.1099, 7," NH1",-4.823,-4.365,-1.684}, {"ARG",16, 0, 0.1099, 7," NH2",-5.693,-3.090,-3.382}, {"ARG",16, 1, 0.0666, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",16, 1, 0.0666, 7," CG ",-2.007,-1.170,-1.074}, {"ARG",16, 1, 0.0666, 7," CD ",-2.932,-2.375,-1.075}, {"ARG",16, 1, 0.0666, 7," NE ",-2.238,-3.599,-1.465}, {"ARG",16, 1, 0.0666, 7," CZ ",-2.778,-4.809,-1.423}, {"ARG",16, 1, 0.0666, 7," NH1",-4.029,-4.965,-1.009}, {"ARG",16, 1, 0.0666, 7," NH2",-2.072,-5.867,-1.796}, {"ARG",16, 2, 0.0611, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",16, 2, 0.0611, 7," CG ",-2.002,-1.174,-1.079}, {"ARG",16, 2, 0.0611, 7," CD ",-2.913,-2.390,-1.095}, {"ARG",16, 2, 0.0611, 7," NE ",-3.735,-2.475, 0.109}, {"ARG",16, 2, 0.0611, 7," CZ ",-4.472,-3.527, 0.436}, {"ARG",16, 2, 0.0611, 7," NH1",-4.492,-4.595,-0.351}, {"ARG",16, 2, 0.0611, 7," NH2",-5.190,-3.517, 1.550}, {"ARG",16, 3, 0.0602, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",16, 3, 0.0602, 7," CG ",-2.023,-1.158,-1.057}, {"ARG",16, 3, 0.0602, 7," CD ",-2.960,-2.353,-1.046}, {"ARG",16, 3, 0.0602, 7," NE ",-3.928,-2.302,-2.138}, {"ARG",16, 3, 0.0602, 7," CZ ",-5.057,-1.608,-2.102}, {"ARG",16, 3, 0.0602, 7," NH1",-5.367,-0.899,-1.025}, {"ARG",16, 3, 0.0602, 7," NH2",-5.879,-1.619,-3.142}, {"ARG",16, 4, 0.0546, 7," CB ",-0.939,-1.208, 0.008}, {"ARG",16, 4, 0.0546, 7," CG ",-1.888,-1.249, 1.194}, {"ARG",16, 4, 0.0546, 7," CD ",-2.880,-2.399, 1.157}, {"ARG",16, 4, 0.0546, 7," NE ",-3.750,-2.411, 2.330}, {"ARG",16, 4, 0.0546, 7," CZ ",-4.694,-3.315, 2.549}, {"ARG",16, 4, 0.0546, 7," NH1",-4.895,-4.292, 1.673}, {"ARG",16, 4, 0.0546, 7," NH2",-5.439,-3.249, 3.644}, {"ARG",16, 5, 0.0534, 7," CB ",-0.939,-1.208, 0.008}, {"ARG",16, 5, 0.0534, 7," CG ",-2.028,-1.154,-1.052}, {"ARG",16, 5, 0.0534, 7," CD ",-3.091,-2.230,-0.905}, {"ARG",16, 5, 0.0534, 7," NE ",-2.543,-3.570,-1.094}, {"ARG",16, 5, 0.0534, 7," CZ ",-2.396,-4.156,-2.274}, {"ARG",16, 5, 0.0534, 7," NH1",-2.754,-3.520,-3.382}, {"ARG",16, 5, 0.0534, 7," NH2",-1.890,-5.380,-2.352}, {"ARG",16, 6, 0.0480, 7," CB ",-0.939,-1.208, 0.008}, {"ARG",16, 6, 0.0480, 7," CG ",-2.006,-1.171,-1.075}, {"ARG",16, 6, 0.0480, 7," CD ",-2.934,-2.374,-1.073}, {"ARG",16, 6, 0.0480, 7," NE ",-3.958,-2.278,-2.109}, {"ARG",16, 6, 0.0480, 7," CZ ",-3.794,-2.687,-3.359}, {"ARG",16, 6, 0.0480, 7," NH1",-2.642,-3.227,-3.737}, {"ARG",16, 6, 0.0480, 7," NH2",-4.780,-2.560,-4.237}, {"ARG",16, 7, 0.0392, 7," CB ",-0.939,-1.208, 0.008}, {"ARG",16, 7, 0.0392, 7," CG ",-1.995,-1.180,-1.086}, {"ARG",16, 7, 0.0392, 7," CD ",-2.920,-2.385,-1.086}, {"ARG",16, 7, 0.0392, 7," NE ",-3.759,-2.432, 0.108}, {"ARG",16, 7, 0.0392, 7," CZ ",-4.905,-1.779, 0.241}, {"ARG",16, 7, 0.0392, 7," NH1",-5.358,-1.023,-0.751}, {"ARG",16, 7, 0.0392, 7," NH2",-5.603,-1.879, 1.364}, {"ARG",16, 8, 0.0367, 7," CB ",-0.939,-1.208, 0.008}, {"ARG",16, 8, 0.0367, 7," CG ",-1.933,-1.214, 1.158}, {"ARG",16, 8, 0.0367, 7," CD ",-2.916,-2.372, 1.123}, {"ARG",16, 8, 0.0367, 7," NE ",-2.260,-3.655, 1.362}, {"ARG",16, 8, 0.0367, 7," CZ ",-2.830,-4.833, 1.158}, {"ARG",16, 8, 0.0367, 7," NH1",-4.075,-4.900, 0.704}, {"ARG",16, 8, 0.0367, 7," NH2",-2.158,-5.950, 1.404}, {"ARG",16, 9, 0.0321, 7," CB ",-0.939,-1.208, 0.008}, {"ARG",16, 9, 0.0321, 7," CG ",-1.913,-1.230, 1.175}, {"ARG",16, 9, 0.0321, 7," CD ",-2.850,-2.425, 1.179}, {"ARG",16, 9, 0.0321, 7," NE ",-3.754,-2.417, 0.032}, {"ARG",16, 9, 0.0321, 7," CZ ",-4.468,-3.462,-0.361}, {"ARG",16, 9, 0.0321, 7," NH1",-4.391,-4.608, 0.301}, {"ARG",16, 9, 0.0321, 7," NH2",-5.265,-3.364,-1.417}, {"ARG",16,10, 0.0319, 7," CB ",-0.939,-1.208, 0.008}, {"ARG",16,10, 0.0319, 7," CG ",-1.878,-1.256, 1.202}, {"ARG",16,10, 0.0319, 7," CD ",-2.868,-2.409, 1.168}, {"ARG",16,10, 0.0319, 7," NE ",-3.780,-2.383, 2.307}, {"ARG",16,10, 0.0319, 7," CZ ",-3.507,-2.909, 3.493}, {"ARG",16,10, 0.0319, 7," NH1",-2.341,-3.505, 3.703}, {"ARG",16,10, 0.0319, 7," NH2",-4.397,-2.839, 4.473}, {"ARG",16,11, 0.0308, 7," CB ",-0.939,-1.208, 0.008}, {"ARG",16,11, 0.0308, 7," CG ",-1.882,-1.254, 1.199}, {"ARG",16,11, 0.0308, 7," CD ",-2.837,-2.435, 1.190}, {"ARG",16,11, 0.0308, 7," NE ",-2.135,-3.709, 1.314}, {"ARG",16,11, 0.0308, 7," CZ ",-1.706,-4.216, 2.461}, {"ARG",16,11, 0.0308, 7," NH1",-1.909,-3.558, 3.596}, {"ARG",16,11, 0.0308, 7," NH2",-1.075,-5.382, 2.480}, {"ARG",16,12, 0.0292, 7," CB ",-0.939,-1.208, 0.008}, {"ARG",16,12, 0.0292, 7," CG ",-1.909,-1.232, 1.178}, {"ARG",16,12, 0.0292, 7," CD ",-2.849,-2.427, 1.181}, {"ARG",16,12, 0.0292, 7," NE ",-3.759,-2.411, 0.039}, {"ARG",16,12, 0.0292, 7," CZ ",-4.885,-1.715,-0.007}, {"ARG",16,12, 0.0292, 7," NH1",-5.248,-0.968, 1.027}, {"ARG",16,12, 0.0292, 7," NH2",-5.653,-1.760,-1.087}, {"ARG",16,13, 0.0283, 7," CB ",-0.939,-1.208, 0.008}, {"ARG",16,13, 0.0283, 7," CG ",-1.941,-1.222,-1.135}, {"ARG",16,13, 0.0283, 7," CD ",-3.052,-0.194,-1.000}, {"ARG",16,13, 0.0283, 7," NE ",-4.014,-0.279,-2.095}, {"ARG",16,13, 0.0283, 7," CZ ",-5.054, 0.530,-2.238}, {"ARG",16,13, 0.0283, 7," NH1",-5.272, 1.496,-1.355}, {"ARG",16,13, 0.0283, 7," NH2",-5.879, 0.379,-3.265}, {"ARG",16,14, 0.0252, 7," CB ",-0.939,-1.208, 0.008}, {"ARG",16,14, 0.0252, 7," CG ",-1.890,-1.247, 1.193}, {"ARG",16,14, 0.0252, 7," CD ",-2.861,-2.415, 1.171}, {"ARG",16,14, 0.0252, 7," NE ",-3.733,-2.425, 2.343}, {"ARG",16,14, 0.0252, 7," CZ ",-4.864,-1.740, 2.436}, {"ARG",16,14, 0.0252, 7," NH1",-5.270,-0.985, 1.424}, {"ARG",16,14, 0.0252, 7," NH2",-5.594,-1.808, 3.541}, {"ARG",16,15, 0.0237, 7," CB ",-0.939,-1.208, 0.008}, {"ARG",16,15, 0.0237, 7," CG ",-1.949,-1.216,-1.129}, {"ARG",16,15, 0.0237, 7," CD ",-3.023,-0.147,-1.012}, {"ARG",16,15, 0.0237, 7," NE ",-4.031,-0.266,-2.062}, {"ARG",16,15, 0.0237, 7," CZ ",-3.928, 0.291,-3.260}, {"ARG",16,15, 0.0237, 7," NH1",-2.856, 1.009,-3.570}, {"ARG",16,15, 0.0237, 7," NH2",-4.894, 0.131,-4.154}, {"ASN",12, 0, 0.2820, 4," CB ",-0.952,-1.197, 0.006}, {"ASN",12, 0, 0.2820, 4," CG ",-2.060,-1.067,-1.020}, {"ASN",12, 0, 0.2820, 4," OD1",-2.402, 0.037,-1.445}, {"ASN",12, 0, 0.2820, 4," ND2",-2.628,-2.197,-1.425}, {"ASN",12, 1, 0.1860, 4," CB ",-0.952,-1.197, 0.006}, {"ASN",12, 1, 0.1860, 4," CG ",-1.992,-1.122,-1.095}, {"ASN",12, 1, 0.1860, 4," OD1",-2.829,-0.219,-1.113}, {"ASN",12, 1, 0.1860, 4," ND2",-1.944,-2.073,-2.020}, {"ASN",12, 2, 0.0984, 4," CB ",-0.952,-1.197, 0.006}, {"ASN",12, 2, 0.0984, 4," CG ",-1.993,-1.108, 1.105}, {"ASN",12, 2, 0.0984, 4," OD1",-2.320,-0.019, 1.579}, {"ASN",12, 2, 0.0984, 4," ND2",-2.519,-2.255, 1.516}, {"ASN",12, 3, 0.0714, 4," CB ",-0.952,-1.197, 0.006}, {"ASN",12, 3, 0.0714, 4," CG ",-1.970,-1.126, 1.128}, {"ASN",12, 3, 0.0714, 4," OD1",-1.774,-0.416, 2.115}, {"ASN",12, 3, 0.0714, 4," ND2",-3.065,-1.862, 0.980}, {"ASN",12, 4, 0.0705, 4," CB ",-0.952,-1.197, 0.006}, {"ASN",12, 4, 0.0705, 4," CG ",-0.220,-2.524, 0.066}, {"ASN",12, 4, 0.0705, 4," OD1", 1.008,-2.565, 0.131}, {"ASN",12, 4, 0.0705, 4," ND2",-0.974,-3.616, 0.045}, {"ASN",12, 5, 0.0549, 4," CB ",-0.952,-1.197, 0.006}, {"ASN",12, 5, 0.0549, 4," CG ",-1.953,-1.139, 1.143}, {"ASN",12, 5, 0.0549, 4," OD1",-2.749,-0.204, 1.238}, {"ASN",12, 5, 0.0549, 4," ND2",-1.918,-2.141, 2.014}, {"ASN",12, 6, 0.0432, 4," CB ",-0.952,-1.197, 0.006}, {"ASN",12, 6, 0.0432, 4," CG ",-1.928,-1.159, 1.166}, {"ASN",12, 6, 0.0432, 4," OD1",-1.534,-1.274, 2.327}, {"ASN",12, 6, 0.0432, 4," ND2",-3.209,-0.996, 0.857}, {"ASN",12, 7, 0.0416, 4," CB ",-0.952,-1.197, 0.006}, {"ASN",12, 7, 0.0416, 4," CG ",-1.985,-1.128,-1.102}, {"ASN",12, 7, 0.0416, 4," OD1",-1.811,-1.724,-2.165}, {"ASN",12, 7, 0.0416, 4," ND2",-3.067,-0.398,-0.857}, {"ASN",12, 8, 0.0359, 4," CB ",-0.952,-1.197, 0.006}, {"ASN",12, 8, 0.0359, 4," CG ",-0.221,-2.524,-0.046}, {"ASN",12, 8, 0.0359, 4," OD1", 0.618,-2.818, 0.806}, {"ASN",12, 8, 0.0359, 4," ND2",-0.536,-3.334,-1.049}, {"ASN",12, 9, 0.0309, 4," CB ",-0.952,-1.197, 0.006}, {"ASN",12, 9, 0.0309, 4," CG ",-1.888,-1.191, 1.200}, {"ASN",12, 9, 0.0309, 4," OD1",-1.820,-2.068, 2.060}, {"ASN",12, 9, 0.0309, 4," ND2",-2.767,-0.198, 1.257}, {"ASN",12,10, 0.0304, 4," CB ",-0.952,-1.197, 0.006}, {"ASN",12,10, 0.0304, 4," CG ",-1.977,-1.134,-1.109}, {"ASN",12,10, 0.0304, 4," OD1",-2.296,-2.147,-1.732}, {"ASN",12,10, 0.0304, 4," ND2",-2.499, 0.059,-1.366}, {"ASN",12,11, 0.0260, 4," CB ",-0.952,-1.197, 0.006}, {"ASN",12,11, 0.0260, 4," CG ",-0.220,-2.524, 0.064}, {"ASN",12,11, 0.0260, 4," OD1", 0.653,-2.800,-0.759}, {"ASN",12,11, 0.0260, 4," ND2",-0.574,-3.353, 1.039}, {"ASP", 8, 0, 0.3087, 4," CB ",-0.939,-1.208, 0.006}, {"ASP", 8, 0, 0.3087, 4," CG ",-2.062,-1.078,-1.004}, {"ASP", 8, 0, 0.3087, 4," OD1",-2.259, 0.034,-1.536}, {"ASP", 8, 0, 0.3087, 4," OD2",-2.798,-2.034,-1.328}, {"ASP", 8, 1, 0.1945, 4," CB ",-0.939,-1.208, 0.006}, {"ASP", 8, 1, 0.1945, 4," CG ",-1.964,-1.155,-1.109}, {"ASP", 8, 1, 0.1945, 4," OD1",-2.622,-0.105,-1.264}, {"ASP", 8, 1, 0.1945, 4," OD2",-2.178,-2.113,-1.882}, {"ASP", 8, 2, 0.1761, 4," CB ",-0.939,-1.208, 0.006}, {"ASP", 8, 2, 0.1761, 4," CG ",-1.945,-1.157, 1.139}, {"ASP", 8, 2, 0.1761, 4," OD1",-1.903,-0.190, 1.929}, {"ASP", 8, 2, 0.1761, 4," OD2",-2.814,-2.036, 1.318}, {"ASP", 8, 3, 0.1097, 4," CB ",-0.939,-1.208, 0.006}, {"ASP", 8, 3, 0.1097, 4," CG ",-0.191,-2.526, 0.032}, {"ASP", 8, 3, 0.1097, 4," OD1", 1.057,-2.502, 0.069}, {"ASP", 8, 3, 0.1097, 4," OD2",-0.767,-3.635, 0.019}, {"ASP", 8, 4, 0.0872, 4," CB ",-0.939,-1.208, 0.006}, {"ASP", 8, 4, 0.0872, 4," CG ",-1.924,-1.173, 1.158}, {"ASP", 8, 4, 0.0872, 4," OD1",-2.693,-0.193, 1.254}, {"ASP", 8, 4, 0.0872, 4," OD2",-2.003,-2.079, 2.014}, {"ASP", 8, 5, 0.0493, 4," CB ",-0.939,-1.208, 0.006}, {"ASP", 8, 5, 0.0493, 4," CG ",-2.011,-1.105, 1.073}, {"ASP", 8, 5, 0.0493, 4," OD1",-1.657,-0.939, 2.259}, {"ASP", 8, 5, 0.0493, 4," OD2",-3.232,-1.177, 0.819}, {"ASP", 8, 6, 0.0347, 4," CB ",-0.939,-1.208, 0.006}, {"ASP", 8, 6, 0.0347, 4," CG ",-0.191,-2.526, 0.029}, {"ASP", 8, 6, 0.0347, 4," OD1", 0.647,-2.751,-0.869}, {"ASP", 8, 6, 0.0347, 4," OD2",-0.374,-3.397, 0.907}, {"ASP", 8, 7, 0.0208, 4," CB ",-0.939,-1.208, 0.006}, {"ASP", 8, 7, 0.0208, 4," CG ",-0.195,-2.524,-0.100}, {"ASP", 8, 7, 0.0208, 4," OD1", 0.712,-2.764, 0.725}, {"ASP", 8, 7, 0.0208, 4," OD2",-0.448,-3.380,-0.974}, {"CYS", 3, 0, 0.5664, 2," CB ",-0.940,-1.207, 0.007}, {"CYS", 3, 0, 0.5664, 2," SG ",-2.165,-1.207,-1.322}, {"CYS", 3, 1, 0.2742, 2," CB ",-0.940,-1.207, 0.007}, {"CYS", 3, 1, 0.2742, 2," SG ",-2.064,-1.270, 1.421}, {"CYS", 3, 2, 0.1594, 2," CB ",-0.940,-1.207, 0.007}, {"CYS", 3, 2, 0.1594, 2," SG ",-0.101,-2.807, 0.069}, {"GLN",13, 0, 0.1853, 5," CB ",-0.940,-1.207, 0.006}, {"GLN",13, 0, 0.1853, 5," CG ",-2.016,-1.163,-1.066}, {"GLN",13, 0, 0.1853, 5," CD ",-2.891,-2.400,-1.067}, {"GLN",13, 0, 0.1853, 5," OE1",-2.682,-3.315,-0.270}, {"GLN",13, 0, 0.1853, 5," NE2",-3.874,-2.431,-1.962}, {"GLN",13, 1, 0.1466, 5," CB ",-0.940,-1.207, 0.006}, {"GLN",13, 1, 0.1466, 5," CG ",-1.953,-1.212,-1.126}, {"GLN",13, 1, 0.1466, 5," CD ",-2.911,-0.039,-1.058}, {"GLN",13, 1, 0.1466, 5," OE1",-3.449, 0.268, 0.006}, {"GLN",13, 1, 0.1466, 5," NE2",-3.125, 0.619,-2.193}, {"GLN",13, 2, 0.0949, 5," CB ",-0.940,-1.207, 0.006}, {"GLN",13, 2, 0.0949, 5," CG ",-1.888,-1.251, 1.193}, {"GLN",13, 2, 0.0949, 5," CD ",-2.846,-2.423, 1.132}, {"GLN",13, 2, 0.0949, 5," OE1",-2.794,-3.227, 0.202}, {"GLN",13, 2, 0.0949, 5," NE2",-3.725,-2.523, 2.125}, {"GLN",13, 3, 0.0906, 5," CB ",-0.940,-1.207, 0.006}, {"GLN",13, 3, 0.0906, 5," CG ",-2.005,-1.171,-1.077}, {"GLN",13, 3, 0.0906, 5," CD ",-2.921,-2.377,-1.035}, {"GLN",13, 3, 0.0906, 5," OE1",-2.543,-3.466,-1.469}, {"GLN",13, 3, 0.0906, 5," NE2",-4.129,-2.188,-0.513}, {"GLN",13, 4, 0.0788, 5," CB ",-0.940,-1.207, 0.006}, {"GLN",13, 4, 0.0788, 5," CG ",-1.990,-1.183,-1.092}, {"GLN",13, 4, 0.0788, 5," CD ",-2.919,-2.379,-1.038}, {"GLN",13, 4, 0.0788, 5," OE1",-3.803,-2.448,-0.185}, {"GLN",13, 4, 0.0788, 5," NE2",-2.721,-3.325,-1.952}, {"GLN",13, 5, 0.0776, 5," CB ",-0.940,-1.207, 0.006}, {"GLN",13, 5, 0.0776, 5," CG ",-1.902,-1.239, 1.182}, {"GLN",13, 5, 0.0776, 5," CD ",-2.901,-0.100, 1.151}, {"GLN",13, 5, 0.0776, 5," OE1",-3.472, 0.205, 0.104}, {"GLN",13, 5, 0.0776, 5," NE2",-3.114, 0.533, 2.300}, {"GLN",13, 6, 0.0448, 5," CB ",-0.940,-1.207, 0.006}, {"GLN",13, 6, 0.0448, 5," CG ",-1.894,-1.246, 1.189}, {"GLN",13, 6, 0.0448, 5," CD ",-2.799,-2.461, 1.169}, {"GLN",13, 6, 0.0448, 5," OE1",-2.361,-3.572, 1.467}, {"GLN",13, 6, 0.0448, 5," NE2",-4.065,-2.253, 0.820}, {"GLN",13, 7, 0.0393, 5," CB ",-0.940,-1.207, 0.006}, {"GLN",13, 7, 0.0393, 5," CG ",-1.871,-1.263, 1.206}, {"GLN",13, 7, 0.0393, 5," CD ",-2.850,-2.418, 1.132}, {"GLN",13, 7, 0.0393, 5," OE1",-3.841,-2.352, 0.405}, {"GLN",13, 7, 0.0393, 5," NE2",-2.574,-3.479, 1.883}, {"GLN",13, 8, 0.0251, 5," CB ",-0.940,-1.207, 0.006}, {"GLN",13, 8, 0.0251, 5," CG ",-0.230,-2.548, 0.092}, {"GLN",13, 8, 0.0251, 5," CD ",-1.187,-3.720, 0.035}, {"GLN",13, 8, 0.0251, 5," OE1",-2.404,-3.535, 0.006}, {"GLN",13, 8, 0.0251, 5," NE2",-0.641,-4.933, 0.018}, {"GLN",13, 9, 0.0248, 5," CB ",-0.940,-1.207, 0.006}, {"GLN",13, 9, 0.0248, 5," CG ",-2.031,-1.151,-1.050}, {"GLN",13, 9, 0.0248, 5," CD ",-2.949, 0.041,-0.879}, {"GLN",13, 9, 0.0248, 5," OE1",-3.057, 0.882,-1.772}, {"GLN",13, 9, 0.0248, 5," NE2",-3.615, 0.117, 0.269}, {"GLN",13,10, 0.0245, 5," CB ",-0.940,-1.207, 0.006}, {"GLN",13,10, 0.0245, 5," CG ",-2.008,-1.169,-1.073}, {"GLN",13,10, 0.0245, 5," CD ",-3.137,-0.213,-0.744}, {"GLN",13,10, 0.0245, 5," OE1",-2.898, 0.909,-0.298}, {"GLN",13,10, 0.0245, 5," NE2",-4.372,-0.655,-0.965}, {"GLN",13,11, 0.0223, 5," CB ",-0.940,-1.207, 0.006}, {"GLN",13,11, 0.0223, 5," CG ",-2.029,-1.153,-1.052}, {"GLN",13,11, 0.0223, 5," CD ",-1.506,-1.446,-2.443}, {"GLN",13,11, 0.0223, 5," OE1",-0.632,-2.295,-2.618}, {"GLN",13,11, 0.0223, 5," NE2",-2.041,-0.745,-3.438}, {"GLN",13,12, 0.0208, 5," CB ",-0.940,-1.207, 0.006}, {"GLN",13,12, 0.0208, 5," CG ",-2.007,-1.170,-1.075}, {"GLN",13,12, 0.0208, 5," CD ",-2.903,-2.391,-1.053}, {"GLN",13,12, 0.0208, 5," OE1",-3.794,-2.530,-1.892}, {"GLN",13,12, 0.0208, 5," NE2",-2.670,-3.282,-0.094}, {"GLU",13, 0, 0.1884, 5," CB ",-0.939,-1.208, 0.006}, {"GLU",13, 0, 0.1884, 5," CG ",-2.018,-1.162,-1.064}, {"GLU",13, 0, 0.1884, 5," CD ",-2.894,-2.400,-1.060}, {"GLU",13, 0, 0.1884, 5," OE1",-2.632,-3.312,-0.249}, {"GLU",13, 0, 0.1884, 5," OE2",-3.843,-2.461,-1.870}, {"GLU",13, 1, 0.1200, 5," CB ",-0.939,-1.208, 0.006}, {"GLU",13, 1, 0.1200, 5," CG ",-1.882,-1.255, 1.198}, {"GLU",13, 1, 0.1200, 5," CD ",-2.831,-2.438, 1.142}, {"GLU",13, 1, 0.1200, 5," OE1",-2.752,-3.218, 0.170}, {"GLU",13, 1, 0.1200, 5," OE2",-3.655,-2.586, 2.069}, {"GLU",13, 2, 0.0900, 5," CB ",-0.939,-1.208, 0.006}, {"GLU",13, 2, 0.0900, 5," CG ",-1.982,-1.190,-1.100}, {"GLU",13, 2, 0.0900, 5," CD ",-2.920,-2.380,-1.035}, {"GLU",13, 2, 0.0900, 5," OE1",-2.426,-3.527,-1.027}, {"GLU",13, 2, 0.0900, 5," OE2",-4.150,-2.168,-0.993}, {"GLU",13, 3, 0.0830, 5," CB ",-0.939,-1.208, 0.006}, {"GLU",13, 3, 0.0830, 5," CG ",-2.018,-1.162,-1.064}, {"GLU",13, 3, 0.0830, 5," CD ",-2.931, 0.041,-0.918}, {"GLU",13, 3, 0.0830, 5," OE1",-3.470, 0.247, 0.189}, {"GLU",13, 3, 0.0830, 5," OE2",-3.111, 0.777,-1.911}, {"GLU",13, 4, 0.0750, 5," CB ",-0.939,-1.208, 0.006}, {"GLU",13, 4, 0.0750, 5," CG ",-2.026,-1.155,-1.055}, {"GLU",13, 4, 0.0750, 5," CD ",-2.926,-2.377,-1.028}, {"GLU",13, 4, 0.0750, 5," OE1",-3.507,-2.664, 0.039}, {"GLU",13, 4, 0.0750, 5," OE2",-3.048,-3.050,-2.073}, {"GLU",13, 5, 0.0685, 5," CB ",-0.939,-1.208, 0.006}, {"GLU",13, 5, 0.0685, 5," CG ",-1.965,-1.203,-1.116}, {"GLU",13, 5, 0.0685, 5," CD ",-3.037,-0.148,-0.920}, {"GLU",13, 5, 0.0685, 5," OE1",-3.088, 0.452, 0.175}, {"GLU",13, 5, 0.0685, 5," OE2",-3.828, 0.080,-1.859}, {"GLU",13, 6, 0.0600, 5," CB ",-0.939,-1.208, 0.006}, {"GLU",13, 6, 0.0600, 5," CG ",-1.877,-1.259, 1.201}, {"GLU",13, 6, 0.0600, 5," CD ",-2.860,-2.413, 1.121}, {"GLU",13, 6, 0.0600, 5," OE1",-2.408,-3.572, 1.019}, {"GLU",13, 6, 0.0600, 5," OE2",-4.082,-2.158, 1.157}, {"GLU",13, 7, 0.0572, 5," CB ",-0.939,-1.208, 0.006}, {"GLU",13, 7, 0.0572, 5," CG ",-1.916,-1.229, 1.171}, {"GLU",13, 7, 0.0572, 5," CD ",-2.842,-2.430, 1.131}, {"GLU",13, 7, 0.0572, 5," OE1",-3.551,-2.602, 0.118}, {"GLU",13, 7, 0.0572, 5," OE2",-2.862,-3.200, 2.115}, {"GLU",13, 8, 0.0409, 5," CB ",-0.939,-1.208, 0.006}, {"GLU",13, 8, 0.0409, 5," CG ",-1.864,-1.269, 1.212}, {"GLU",13, 8, 0.0409, 5," CD ",-2.895,-0.157, 1.211}, {"GLU",13, 8, 0.0409, 5," OE1",-3.009, 0.548, 0.186}, {"GLU",13, 8, 0.0409, 5," OE2",-3.590, 0.013, 2.235}, {"GLU",13, 9, 0.0392, 5," CB ",-0.939,-1.208, 0.006}, {"GLU",13, 9, 0.0392, 5," CG ",-1.995,-1.179,-1.086}, {"GLU",13, 9, 0.0392, 5," CD ",-1.468,-1.678,-2.419}, {"GLU",13, 9, 0.0392, 5," OE1",-0.287,-2.079,-2.478}, {"GLU",13, 9, 0.0392, 5," OE2",-2.234,-1.666,-3.405}, {"GLU",13,10, 0.0300, 5," CB ",-0.939,-1.208, 0.006}, {"GLU",13,10, 0.0300, 5," CG ",-1.954,-1.200, 1.138}, {"GLU",13,10, 0.0300, 5," CD ",-2.895,-0.012, 1.067}, {"GLU",13,10, 0.0300, 5," OE1",-3.497, 0.207,-0.005}, {"GLU",13,10, 0.0300, 5," OE2",-3.030, 0.704, 2.082}, {"GLU",13,11, 0.0256, 5," CB ",-0.939,-1.208, 0.006}, {"GLU",13,11, 0.0256, 5," CG ",-0.226,-2.549, 0.080}, {"GLU",13,11, 0.0256, 5," CD ",-1.186,-3.722, 0.021}, {"GLU",13,11, 0.0256, 5," OE1",-2.405,-3.487,-0.110}, {"GLU",13,11, 0.0256, 5," OE2",-0.720,-4.878, 0.108}, {"GLU",13,12, 0.0210, 5," CB ",-0.939,-1.208, 0.006}, {"GLU",13,12, 0.0210, 5," CG ",-1.997,-1.178,-1.085}, {"GLU",13,12, 0.0210, 5," CD ",-1.415,-1.414,-2.466}, {"GLU",13,12, 0.0210, 5," OE1",-0.696,-2.419,-2.645}, {"GLU",13,12, 0.0210, 5," OE2",-1.675,-0.594,-3.371}, {"HIS", 8, 0, 0.2964, 6," CB ",-0.940,-1.207, 0.007}, {"HIS", 8, 0, 0.2964, 6," CG ",-1.939,-1.201,-1.105}, {"HIS", 8, 0, 0.2964, 6," ND1",-3.021,-0.346,-1.133}, {"HIS", 8, 0, 0.2964, 6," CD2",-2.024,-1.947,-2.233}, {"HIS", 8, 0, 0.2964, 6," CE1",-3.726,-0.565,-2.227}, {"HIS", 8, 0, 0.2964, 6," NE2",-3.144,-1.531,-2.913}, {"HIS", 8, 1, 0.1533, 6," CB ",-0.940,-1.207, 0.007}, {"HIS", 8, 1, 0.1533, 6," CG ",-1.846,-1.260, 1.196}, {"HIS", 8, 1, 0.1533, 6," ND1",-2.904,-0.390, 1.368}, {"HIS", 8, 1, 0.1533, 6," CD2",-1.855,-2.077, 2.275}, {"HIS", 8, 1, 0.1533, 6," CE1",-3.523,-0.670, 2.499}, {"HIS", 8, 1, 0.1533, 6," NE2",-2.909,-1.690, 3.070}, {"HIS", 8, 2, 0.1451, 6," CB ",-0.940,-1.207, 0.007}, {"HIS", 8, 2, 0.1451, 6," CG ",-1.974,-1.174,-1.073}, {"HIS", 8, 2, 0.1451, 6," ND1",-1.737,-1.645,-2.348}, {"HIS", 8, 2, 0.1451, 6," CD2",-3.252,-0.726,-1.071}, {"HIS", 8, 2, 0.1451, 6," CE1",-2.823,-1.489,-3.082}, {"HIS", 8, 2, 0.1451, 6," NE2",-3.758,-0.934,-2.333}, {"HIS", 8, 3, 0.1213, 6," CB ",-0.940,-1.207, 0.007}, {"HIS", 8, 3, 0.1213, 6," CG ",-1.938,-1.188, 1.121}, {"HIS", 8, 3, 0.1213, 6," ND1",-1.649,-1.643, 2.391}, {"HIS", 8, 3, 0.1213, 6," CD2",-3.226,-0.770, 1.158}, {"HIS", 8, 3, 0.1213, 6," CE1",-2.713,-1.506, 3.159}, {"HIS", 8, 3, 0.1213, 6," NE2",-3.684,-0.978, 2.438}, {"HIS", 8, 4, 0.1077, 6," CB ",-0.940,-1.207, 0.007}, {"HIS", 8, 4, 0.1077, 6," CG ",-2.005,-1.150,-1.041}, {"HIS", 8, 4, 0.1077, 6," ND1",-2.805,-2.230,-1.352}, {"HIS", 8, 4, 0.1077, 6," CD2",-2.403,-0.143,-1.854}, {"HIS", 8, 4, 0.1077, 6," CE1",-3.649,-1.890,-2.309}, {"HIS", 8, 4, 0.1077, 6," NE2",-3.428,-0.629,-2.632}, {"HIS", 8, 5, 0.0705, 6," CB ",-0.940,-1.207, 0.007}, {"HIS", 8, 5, 0.0705, 6," CG ",-0.234,-2.522, 0.099}, {"HIS", 8, 5, 0.0705, 6," ND1", 0.360,-3.128,-0.988}, {"HIS", 8, 5, 0.0705, 6," CD2",-0.025,-3.351, 1.150}, {"HIS", 8, 5, 0.0705, 6," CE1", 0.903,-4.271,-0.612}, {"HIS", 8, 5, 0.0705, 6," NE2", 0.685,-4.431, 0.680}, {"HIS", 8, 6, 0.0528, 6," CB ",-0.940,-1.207, 0.007}, {"HIS", 8, 6, 0.0528, 6," CG ",-1.935,-1.191, 1.124}, {"HIS", 8, 6, 0.0528, 6," ND1",-2.738,-2.272, 1.424}, {"HIS", 8, 6, 0.0528, 6," CD2",-2.260,-0.225, 2.015}, {"HIS", 8, 6, 0.0528, 6," CE1",-3.513,-1.972, 2.450}, {"HIS", 8, 6, 0.0528, 6," NE2",-3.243,-0.736, 2.829}, {"HIS", 8, 7, 0.0474, 6," CB ",-0.940,-1.207, 0.007}, {"HIS", 8, 7, 0.0474, 6," CG ",-0.232,-2.524, 0.042}, {"HIS", 8, 7, 0.0474, 6," ND1", 0.182,-3.118, 1.216}, {"HIS", 8, 7, 0.0474, 6," CD2", 0.137,-3.365,-0.953}, {"HIS", 8, 7, 0.0474, 6," CE1", 0.775,-4.265, 0.942}, {"HIS", 8, 7, 0.0474, 6," NE2", 0.761,-4.441,-0.366}, {"ILE", 5, 0, 0.6158, 4," CB ",-0.946,-1.216, 0.008}, {"ILE", 5, 0, 0.6158, 4," CG1",-1.934,-1.131,-1.157}, {"ILE", 5, 0, 0.6158, 4," CG2",-1.685,-1.306, 1.334}, {"ILE", 5, 0, 0.6158, 4," CD1",-2.741,-2.393,-1.366}, {"ILE", 5, 1, 0.1557, 4," CB ",-0.946,-1.216, 0.008}, {"ILE", 5, 1, 0.1557, 4," CG1",-1.858,-1.191,-1.220}, {"ILE", 5, 1, 0.1557, 4," CG2",-1.768,-1.243, 1.287}, {"ILE", 5, 1, 0.1557, 4," CD1",-2.749, 0.029,-1.294}, {"ILE", 5, 2, 0.1202, 4," CB ",-0.946,-1.216, 0.008}, {"ILE", 5, 2, 0.1202, 4," CG1",-0.142,-2.518,-0.003}, {"ILE", 5, 2, 0.1202, 4," CG2",-1.895,-1.160,-1.179}, {"ILE", 5, 2, 0.1202, 4," CD1",-0.981,-3.756, 0.221}, {"ILE", 5, 3, 0.0615, 4," CB ",-0.946,-1.216, 0.008}, {"ILE", 5, 3, 0.0615, 4," CG1",-1.950,-1.103, 1.157}, {"ILE", 5, 3, 0.0615, 4," CG2",-0.151,-2.508, 0.114}, {"ILE", 5, 3, 0.0615, 4," CD1",-3.097,-2.085, 1.064}, {"ILE", 5, 4, 0.0267, 4," CB ",-0.946,-1.216, 0.008}, {"ILE", 5, 4, 0.0267, 4," CG1",-2.004,-1.061, 1.103}, {"ILE", 5, 4, 0.0267, 4," CG2",-0.158,-2.502, 0.201}, {"ILE", 5, 4, 0.0267, 4," CD1",-2.976, 0.071, 0.856}, {"LEU", 4, 0, 0.6252, 4," CB ",-0.940,-1.208, 0.007}, {"LEU", 4, 0, 0.6252, 4," CG ",-2.001,-1.247,-1.094}, {"LEU", 4, 0, 0.6252, 4," CD1",-2.772,-2.557,-1.051}, {"LEU", 4, 0, 0.6252, 4," CD2",-2.946,-0.060,-0.975}, {"LEU", 4, 1, 0.2891, 4," CB ",-0.940,-1.208, 0.007}, {"LEU", 4, 1, 0.2891, 4," CG ",-1.880,-1.328, 1.209}, {"LEU", 4, 1, 0.2891, 4," CD1",-2.838,-0.149, 1.260}, {"LEU", 4, 1, 0.2891, 4," CD2",-2.643,-2.643, 1.167}, {"LEU", 4, 2, 0.0365, 4," CB ",-0.940,-1.208, 0.007}, {"LEU", 4, 2, 0.0365, 4," CG ",-2.274,-1.032,-0.721}, {"LEU", 4, 2, 0.0365, 4," CD1",-2.048,-0.582,-2.155}, {"LEU", 4, 2, 0.0365, 4," CD2",-3.084,-2.320,-0.680}, {"LEU", 4, 3, 0.0256, 4," CB ",-0.940,-1.208, 0.007}, {"LEU", 4, 3, 0.0256, 4," CG ",-2.097,-1.160, 1.008}, {"LEU", 4, 3, 0.0256, 4," CD1",-3.073,-2.299, 0.755}, {"LEU", 4, 3, 0.0256, 4," CD2",-1.577,-1.201, 2.436}, {"LYS",14, 0, 0.2279, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",14, 0, 0.2279, 5," CG ",-2.008,-1.171,-1.073}, {"LYS",14, 0, 0.2279, 5," CD ",-2.911,-2.390,-1.000}, {"LYS",14, 0, 0.2279, 5," CE ",-3.970,-2.360,-2.088}, {"LYS",14, 0, 0.2279, 5," NZ ",-4.856,-3.556,-2.035}, {"LYS",14, 1, 0.1345, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",14, 1, 0.1345, 5," CG ",-1.884,-1.253, 1.197}, {"LYS",14, 1, 0.1345, 5," CD ",-2.833,-2.437, 1.105}, {"LYS",14, 1, 0.1345, 5," CE ",-3.769,-2.489, 2.300}, {"LYS",14, 1, 0.1345, 5," NZ ",-4.706,-3.643, 2.221}, {"LYS",14, 2, 0.0696, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",14, 2, 0.0696, 5," CG ",-1.932,-1.230,-1.143}, {"LYS",14, 2, 0.0696, 5," CD ",-2.924,-0.083,-1.040}, {"LYS",14, 2, 0.0696, 5," CE ",-3.957,-0.143,-2.152}, {"LYS",14, 2, 0.0696, 5," NZ ",-4.905, 1.003,-2.092}, {"LYS",14, 3, 0.0544, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",14, 3, 0.0544, 5," CG ",-2.003,-1.174,-1.078}, {"LYS",14, 3, 0.0544, 5," CD ",-2.928,-2.376,-0.983}, {"LYS",14, 3, 0.0544, 5," CE ",-3.954,-2.375,-2.103}, {"LYS",14, 3, 0.0544, 5," NZ ",-4.899,-1.230,-1.989}, {"LYS",14, 4, 0.0529, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",14, 4, 0.0529, 5," CG ",-2.008,-1.171,-1.073}, {"LYS",14, 4, 0.0529, 5," CD ",-2.926,-2.378,-0.984}, {"LYS",14, 4, 0.0529, 5," CE ",-4.028,-2.312,-2.028}, {"LYS",14, 4, 0.0529, 5," NZ ",-3.491,-2.432,-3.411}, {"LYS",14, 5, 0.0383, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",14, 5, 0.0383, 5," CG ",-2.015,-1.165,-1.065}, {"LYS",14, 5, 0.0383, 5," CD ",-2.983,-2.328,-0.925}, {"LYS",14, 5, 0.0383, 5," CE ",-2.339,-3.637,-1.350}, {"LYS",14, 5, 0.0383, 5," NZ ",-3.301,-4.772,-1.297}, {"LYS",14, 6, 0.0353, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",14, 6, 0.0353, 5," CG ",-1.892,-1.247, 1.191}, {"LYS",14, 6, 0.0353, 5," CD ",-2.857,-2.415, 1.086}, {"LYS",14, 6, 0.0353, 5," CE ",-3.735,-2.521, 2.321}, {"LYS",14, 6, 0.0353, 5," NZ ",-4.638,-1.346, 2.463}, {"LYS",14, 7, 0.0348, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",14, 7, 0.0348, 5," CG ",-2.028,-1.155,-1.051}, {"LYS",14, 7, 0.0348, 5," CD ",-2.864,-2.424,-1.049}, {"LYS",14, 7, 0.0348, 5," CE ",-3.719,-2.521, 0.203}, {"LYS",14, 7, 0.0348, 5," NZ ",-4.591,-3.727, 0.188}, {"LYS",14, 8, 0.0347, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",14, 8, 0.0347, 5," CG ",-1.885,-1.252, 1.196}, {"LYS",14, 8, 0.0347, 5," CD ",-2.835,-2.434, 1.103}, {"LYS",14, 8, 0.0347, 5," CE ",-3.835,-2.431, 2.247}, {"LYS",14, 8, 0.0347, 5," NZ ",-3.180,-2.686, 3.559}, {"LYS",14, 9, 0.0314, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",14, 9, 0.0314, 5," CG ",-0.226,-2.547, 0.117}, {"LYS",14, 9, 0.0314, 5," CD ",-1.213,-3.702, 0.104}, {"LYS",14, 9, 0.0314, 5," CE ",-0.503,-5.039, 0.226}, {"LYS",14, 9, 0.0314, 5," NZ ",-1.460,-6.179, 0.217}, {"LYS",14,10, 0.0299, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",14,10, 0.0299, 5," CG ",-1.875,-1.260, 1.204}, {"LYS",14,10, 0.0299, 5," CD ",-2.934,-0.173, 1.124}, {"LYS",14,10, 0.0299, 5," CE ",-3.932,-0.288, 2.265}, {"LYS",14,10, 0.0299, 5," NZ ",-4.966, 0.781, 2.208}, {"LYS",14,11, 0.0238, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",14,11, 0.0238, 5," CG ",-1.919,-1.226, 1.169}, {"LYS",14,11, 0.0238, 5," CD ",-2.774,-2.482, 1.153}, {"LYS",14,11, 0.0238, 5," CE ",-3.761,-2.464,-0.002}, {"LYS",14,11, 0.0238, 5," NZ ",-4.656,-3.654, 0.014}, {"LYS",14,12, 0.0232, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",14,12, 0.0232, 5," CG ",-1.879,-1.257, 1.201}, {"LYS",14,12, 0.0232, 5," CD ",-2.882,-2.390, 1.069}, {"LYS",14,12, 0.0232, 5," CE ",-2.217,-3.743, 1.261}, {"LYS",14,12, 0.0232, 5," NZ ",-3.198,-4.860, 1.186}, {"LYS",14,13, 0.0212, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",14,13, 0.0212, 5," CG ",-1.899,-1.256,-1.170}, {"LYS",14,13, 0.0212, 5," CD ",-2.906,-0.121,-1.109}, {"LYS",14,13, 0.0212, 5," CE ",-3.950,-0.248,-2.206}, {"LYS",14,13, 0.0212, 5," NZ ",-3.372, 0.002,-3.555}, {"MET",12, 0, 0.1853, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 0, 0.1853, 4," CG ",-1.991,-1.182,-1.091}, {"MET",12, 0, 0.1853, 4," SD ",-3.101, 0.232,-0.960}, {"MET",12, 0, 0.1853, 4," CE ",-4.019,-0.193, 0.518}, {"MET",12, 1, 0.1634, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 1, 0.1634, 4," CG ",-2.015,-1.163,-1.067}, {"MET",12, 1, 0.1634, 4," SD ",-3.064,-2.629,-1.060}, {"MET",12, 1, 0.1634, 4," CE ",-3.984,-2.380, 0.457}, {"MET",12, 2, 0.1181, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 2, 0.1181, 4," CG ",-2.020,-1.160,-1.062}, {"MET",12, 2, 0.1181, 4," SD ",-3.168,-2.544,-0.951}, {"MET",12, 2, 0.1181, 4," CE ",-2.150,-3.880,-1.575}, {"MET",12, 3, 0.0931, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 3, 0.0931, 4," CG ",-2.014,-1.165,-1.068}, {"MET",12, 3, 0.0931, 4," SD ",-3.084,-2.614,-1.039}, {"MET",12, 3, 0.0931, 4," CE ",-4.149,-2.278,-2.440}, {"MET",12, 4, 0.0722, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 4, 0.0722, 4," CG ",-1.927,-1.219, 1.164}, {"MET",12, 4, 0.0722, 4," SD ",-3.020,-2.651, 1.129}, {"MET",12, 4, 0.0722, 4," CE ",-4.070,-2.243,-0.263}, {"MET",12, 5, 0.0702, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 5, 0.0702, 4," CG ",-1.875,-1.259, 1.205}, {"MET",12, 5, 0.0702, 4," SD ",-2.980,-2.682, 1.162}, {"MET",12, 5, 0.0702, 4," CE ",-1.836,-4.011, 1.529}, {"MET",12, 6, 0.0690, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 6, 0.0690, 4," CG ",-1.904,-1.236, 1.182}, {"MET",12, 6, 0.0690, 4," SD ",-3.060, 0.146, 1.170}, {"MET",12, 6, 0.0690, 4," CE ",-4.134,-0.322,-0.186}, {"MET",12, 7, 0.0373, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 7, 0.0373, 4," CG ",-1.881,-1.254, 1.200}, {"MET",12, 7, 0.0373, 4," SD ",-3.073,-2.601, 1.092}, {"MET",12, 7, 0.0373, 4," CE ",-3.937,-2.415, 2.650}, {"MET",12, 8, 0.0332, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 8, 0.0332, 4," CG ",-1.944,-1.220,-1.134}, {"MET",12, 8, 0.0332, 4," SD ",-3.098, 0.162,-1.062}, {"MET",12, 8, 0.0332, 4," CE ",-3.940,-0.017,-2.633}, {"MET",12, 9, 0.0311, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 9, 0.0311, 4," CG ",-1.991,-1.182,-1.090}, {"MET",12, 9, 0.0311, 4," SD ",-3.156, 0.181,-0.909}, {"MET",12, 9, 0.0311, 4," CE ",-2.486, 1.358,-2.081}, {"MET",12,10, 0.0253, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12,10, 0.0253, 4," CG ",-0.230,-2.548, 0.076}, {"MET",12,10, 0.0253, 4," SD ",-1.371,-3.942, 0.034}, {"MET",12,10, 0.0253, 4," CE ",-1.808,-3.970,-1.703}, {"MET",12,11, 0.0244, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12,11, 0.0244, 4," CG ",-0.229,-2.549, 0.052}, {"MET",12,11, 0.0244, 4," SD ",-1.373,-3.941, 0.086}, {"MET",12,11, 0.0244, 4," CE ",-2.024,-3.805, 1.749}, {"MSE",12, 0, 0.1853, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 0, 0.1853, 4," CG ",-1.991,-1.182,-1.091}, {"MSE",12, 0, 0.1853, 4,"SE ",-3.101, 0.232,-0.960}, {"MSE",12, 0, 0.1853, 4," CE ",-4.019,-0.193, 0.518}, {"MSE",12, 1, 0.1634, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 1, 0.1634, 4," CG ",-2.015,-1.163,-1.067}, {"MSE",12, 1, 0.1634, 4,"SE ",-3.064,-2.629,-1.060}, {"MSE",12, 1, 0.1634, 4," CE ",-3.984,-2.380, 0.457}, {"MSE",12, 2, 0.1181, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 2, 0.1181, 4," CG ",-2.020,-1.160,-1.062}, {"MSE",12, 2, 0.1181, 4,"SE ",-3.168,-2.544,-0.951}, {"MSE",12, 2, 0.1181, 4," CE ",-2.150,-3.880,-1.575}, {"MSE",12, 3, 0.0931, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 3, 0.0931, 4," CG ",-2.014,-1.165,-1.068}, {"MSE",12, 3, 0.0931, 4,"SE ",-3.084,-2.614,-1.039}, {"MSE",12, 3, 0.0931, 4," CE ",-4.149,-2.278,-2.440}, {"MSE",12, 4, 0.0722, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 4, 0.0722, 4," CG ",-1.927,-1.219, 1.164}, {"MSE",12, 4, 0.0722, 4,"SE ",-3.020,-2.651, 1.129}, {"MSE",12, 4, 0.0722, 4," CE ",-4.070,-2.243,-0.263}, {"MSE",12, 5, 0.0702, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 5, 0.0702, 4," CG ",-1.875,-1.259, 1.205}, {"MSE",12, 5, 0.0702, 4,"SE ",-2.980,-2.682, 1.162}, {"MSE",12, 5, 0.0702, 4," CE ",-1.836,-4.011, 1.529}, {"MSE",12, 6, 0.0690, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 6, 0.0690, 4," CG ",-1.904,-1.236, 1.182}, {"MSE",12, 6, 0.0690, 4,"SE ",-3.060, 0.146, 1.170}, {"MSE",12, 6, 0.0690, 4," CE ",-4.134,-0.322,-0.186}, {"MSE",12, 7, 0.0373, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 7, 0.0373, 4," CG ",-1.881,-1.254, 1.200}, {"MSE",12, 7, 0.0373, 4,"SE ",-3.073,-2.601, 1.092}, {"MSE",12, 7, 0.0373, 4," CE ",-3.937,-2.415, 2.650}, {"MSE",12, 8, 0.0332, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 8, 0.0332, 4," CG ",-1.944,-1.220,-1.134}, {"MSE",12, 8, 0.0332, 4,"SE ",-3.098, 0.162,-1.062}, {"MSE",12, 8, 0.0332, 4," CE ",-3.940,-0.017,-2.633}, {"MSE",12, 9, 0.0311, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 9, 0.0311, 4," CG ",-1.991,-1.182,-1.090}, {"MSE",12, 9, 0.0311, 4,"SE ",-3.156, 0.181,-0.909}, {"MSE",12, 9, 0.0311, 4," CE ",-2.486, 1.358,-2.081}, {"MSE",12,10, 0.0253, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12,10, 0.0253, 4," CG ",-0.230,-2.548, 0.076}, {"MSE",12,10, 0.0253, 4,"SE ",-1.371,-3.942, 0.034}, {"MSE",12,10, 0.0253, 4," CE ",-1.808,-3.970,-1.703}, {"MSE",12,11, 0.0244, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12,11, 0.0244, 4," CG ",-0.229,-2.549, 0.052}, {"MSE",12,11, 0.0244, 4,"SE ",-1.373,-3.941, 0.086}, {"MSE",12,11, 0.0244, 4," CE ",-2.024,-3.805, 1.749}, {"PHE", 4, 0, 0.4708, 7," CB ",-0.907,-1.229, 0.003}, {"PHE", 4, 0, 0.4708, 7," CG ",-1.956,-1.198,-1.072}, {"PHE", 4, 0, 0.4708, 7," CD1",-3.131,-0.489,-0.893}, {"PHE", 4, 0, 0.4708, 7," CD2",-1.766,-1.879,-2.263}, {"PHE", 4, 0, 0.4708, 7," CE1",-4.096,-0.458,-1.880}, {"PHE", 4, 0, 0.4708, 7," CE2",-2.728,-1.853,-3.253}, {"PHE", 4, 0, 0.4708, 7," CZ ",-3.895,-1.141,-3.063}, {"PHE", 4, 1, 0.3171, 7," CB ",-0.907,-1.229, 0.003}, {"PHE", 4, 1, 0.3171, 7," CG ",-1.813,-1.306, 1.199}, {"PHE", 4, 1, 0.3171, 7," CD1",-2.953,-0.524, 1.274}, {"PHE", 4, 1, 0.3171, 7," CD2",-1.525,-2.163, 2.248}, {"PHE", 4, 1, 0.3171, 7," CE1",-3.788,-0.595, 2.372}, {"PHE", 4, 1, 0.3171, 7," CE2",-2.355,-2.237, 3.350}, {"PHE", 4, 1, 0.3171, 7," CZ ",-3.490,-1.452, 3.412}, {"PHE", 4, 2, 0.1106, 7," CB ",-0.907,-1.229, 0.003}, {"PHE", 4, 2, 0.1106, 7," CG ",-0.174,-2.540, 0.036}, {"PHE", 4, 2, 0.1106, 7," CD1", 0.201,-3.170,-1.139}, {"PHE", 4, 2, 0.1106, 7," CD2", 0.143,-3.141, 1.242}, {"PHE", 4, 2, 0.1106, 7," CE1", 0.876,-4.374,-1.111}, {"PHE", 4, 2, 0.1106, 7," CE2", 0.817,-4.347, 1.276}, {"PHE", 4, 2, 0.1106, 7," CZ ", 1.185,-4.965, 0.098}, {"PHE", 4, 3, 0.0817, 7," CB ",-0.907,-1.229, 0.003}, {"PHE", 4, 3, 0.0817, 7," CG ",-1.976,-1.184,-1.052}, {"PHE", 4, 3, 0.0817, 7," CD1",-2.277,-0.000,-1.703}, {"PHE", 4, 3, 0.0817, 7," CD2",-2.678,-2.328,-1.393}, {"PHE", 4, 3, 0.0817, 7," CE1",-3.258, 0.042,-2.674}, {"PHE", 4, 3, 0.0817, 7," CE2",-3.661,-2.291,-2.363}, {"PHE", 4, 3, 0.0817, 7," CZ ",-3.952,-1.104,-3.006}, {"PRO", 2, 0, 0.5072, 3," CB ",-0.784,-1.311,-0.107}, {"PRO", 2, 0, 0.5072, 3," CG ", 0.081,-2.204,-0.926}, {"PRO", 2, 0, 0.5072, 3," CD ", 0.755,-1.306,-1.916}, {"PRO", 2, 1, 0.4928, 3," CB ",-0.784,-1.311,-0.107}, {"PRO", 2, 1, 0.4928, 3," CG ",-0.832,-1.606,-1.565}, {"PRO", 2, 1, 0.4928, 3," CD ",-0.930,-0.272,-2.238}, {"SER", 3, 0, 0.4707, 2," CB ",-0.941,-1.207, 0.008}, {"SER", 3, 0, 0.4707, 2," OG ",-0.212,-2.419, 0.096}, {"SER", 3, 1, 0.2938, 2," CB ",-0.941,-1.207, 0.008}, {"SER", 3, 1, 0.2938, 2," OG ",-1.863,-1.139,-1.066}, {"SER", 3, 2, 0.2354, 2," CB ",-0.941,-1.207, 0.008}, {"SER", 3, 2, 0.2354, 2," OG ",-1.729,-1.229, 1.186}, {"THR", 3, 0, 0.4886, 3," CB ",-0.946,-1.215, 0.008}, {"THR", 3, 0, 0.4886, 3," OG1",-0.177,-2.423,-0.002}, {"THR", 3, 0, 0.4886, 3," CG2",-1.731,-1.289,-1.292}, {"THR", 3, 1, 0.4364, 3," CB ",-0.946,-1.215, 0.008}, {"THR", 3, 1, 0.4364, 3," OG1",-1.810,-1.160,-1.133}, {"THR", 3, 1, 0.4364, 3," CG2",-1.910,-1.133, 1.182}, {"THR", 3, 2, 0.0751, 3," CB ",-0.946,-1.215, 0.008}, {"THR", 3, 2, 0.0751, 3," OG1",-1.849,-1.114, 1.115}, {"THR", 3, 2, 0.0751, 3," CG2",-0.173,-2.491, 0.303}, {"TRP", 8, 0, 0.3081,10," CB ",-0.938,-1.209, 0.008}, {"TRP", 8, 0, 0.3081,10," CG ",-1.992,-1.157,-1.056}, {"TRP", 8, 0, 0.3081,10," CD1",-1.984,-1.813,-2.254}, {"TRP", 8, 0, 0.3081,10," CD2",-3.212,-0.408,-1.020}, {"TRP", 8, 0, 0.3081,10," NE1",-3.121,-1.516,-2.964}, {"TRP", 8, 0, 0.3081,10," CE2",-3.893,-0.656,-2.229}, {"TRP", 8, 0, 0.3081,10," CE3",-3.801, 0.453,-0.088}, {"TRP", 8, 0, 0.3081,10," CZ2",-5.126,-0.079,-2.526}, {"TRP", 8, 0, 0.3081,10," CZ3",-5.025, 1.025,-0.385}, {"TRP", 8, 0, 0.3081,10," CH2",-5.673, 0.756,-1.594}, {"TRP", 8, 1, 0.1621,10," CB ",-0.938,-1.209, 0.008}, {"TRP", 8, 1, 0.1621,10," CG ",-1.862,-1.242, 1.188}, {"TRP", 8, 1, 0.1621,10," CD1",-1.767,-2.050, 2.285}, {"TRP", 8, 1, 0.1621,10," CD2",-3.024,-0.430, 1.390}, {"TRP", 8, 1, 0.1621,10," NE1",-2.798,-1.792, 3.154}, {"TRP", 8, 1, 0.1621,10," CE2",-3.584,-0.800, 2.630}, {"TRP", 8, 1, 0.1621,10," CE3",-3.654, 0.576, 0.648}, {"TRP", 8, 1, 0.1621,10," CZ2",-4.736,-0.203, 3.140}, {"TRP", 8, 1, 0.1621,10," CZ3",-4.796, 1.167, 1.157}, {"TRP", 8, 1, 0.1621,10," CH2",-5.324, 0.775, 2.390}, {"TRP", 8, 2, 0.1302,10," CB ",-0.938,-1.209, 0.008}, {"TRP", 8, 2, 0.1302,10," CG ",-1.821,-1.274, 1.217}, {"TRP", 8, 2, 0.1302,10," CD1",-3.018,-0.643, 1.396}, {"TRP", 8, 2, 0.1302,10," CD2",-1.577,-2.014, 2.420}, {"TRP", 8, 2, 0.1302,10," NE1",-3.532,-0.942, 2.634}, {"TRP", 8, 2, 0.1302,10," CE2",-2.667,-1.783, 3.283}, {"TRP", 8, 2, 0.1302,10," CE3",-0.544,-2.849, 2.859}, {"TRP", 8, 2, 0.1302,10," CZ2",-2.752,-2.355, 4.551}, {"TRP", 8, 2, 0.1302,10," CZ3",-0.631,-3.416, 4.117}, {"TRP", 8, 2, 0.1302,10," CH2",-1.727,-3.166, 4.948}, {"TRP", 8, 3, 0.1302,10," CB ",-0.938,-1.209, 0.008}, {"TRP", 8, 3, 0.1302,10," CG ",-2.009,-1.143,-1.038}, {"TRP", 8, 3, 0.1302,10," CD1",-2.256,-0.112,-1.898}, {"TRP", 8, 3, 0.1302,10," CD2",-2.979,-2.153,-1.337}, {"TRP", 8, 3, 0.1302,10," NE1",-3.321,-0.417,-2.710}, {"TRP", 8, 3, 0.1302,10," CE2",-3.783,-1.665,-2.388}, {"TRP", 8, 3, 0.1302,10," CE3",-3.255,-3.425,-0.822}, {"TRP", 8, 3, 0.1302,10," CZ2",-4.836,-2.401,-2.929}, {"TRP", 8, 3, 0.1302,10," CZ3",-4.301,-4.152,-1.362}, {"TRP", 8, 3, 0.1302,10," CH2",-5.077,-3.638,-2.404}, {"TRP", 8, 4, 0.0992,10," CB ",-0.938,-1.209, 0.008}, {"TRP", 8, 4, 0.0992,10," CG ",-0.220,-2.524, 0.002}, {"TRP", 8, 4, 0.0992,10," CD1", 0.167,-3.245,-1.091}, {"TRP", 8, 4, 0.0992,10," CD2", 0.201,-3.278, 1.145}, {"TRP", 8, 4, 0.0992,10," NE1", 0.798,-4.400,-0.699}, {"TRP", 8, 4, 0.0992,10," CE2", 0.834,-4.445, 0.670}, {"TRP", 8, 4, 0.0992,10," CE3", 0.106,-3.088, 2.528}, {"TRP", 8, 4, 0.0992,10," CZ2", 1.366,-5.409, 1.523}, {"TRP", 8, 4, 0.0992,10," CZ3", 0.635,-4.047, 3.373}, {"TRP", 8, 4, 0.0992,10," CH2", 1.257,-5.192, 2.868}, {"TRP", 8, 5, 0.0581,10," CB ",-0.938,-1.209, 0.008}, {"TRP", 8, 5, 0.0581,10," CG ",-1.897,-1.215, 1.159}, {"TRP", 8, 5, 0.0581,10," CD1",-2.233,-0.158, 1.956}, {"TRP", 8, 5, 0.0581,10," CD2",-2.649,-2.334, 1.645}, {"TRP", 8, 5, 0.0581,10," NE1",-3.143,-0.550, 2.906}, {"TRP", 8, 5, 0.0581,10," CE2",-3.417,-1.882, 2.738}, {"TRP", 8, 5, 0.0581,10," CE3",-2.751,-3.678, 1.269}, {"TRP", 8, 5, 0.0581,10," CZ2",-4.270,-2.721, 3.452}, {"TRP", 8, 5, 0.0581,10," CZ3",-3.598,-4.508, 1.980}, {"TRP", 8, 5, 0.0581,10," CH2",-4.346,-4.027, 3.058}, {"TRP", 8, 6, 0.0532,10," CB ",-0.938,-1.209, 0.008}, {"TRP", 8, 6, 0.0532,10," CG ",-0.220,-2.524, 0.009}, {"TRP", 8, 6, 0.0532,10," CD1", 0.193,-3.235, 1.100}, {"TRP", 8, 6, 0.0532,10," CD2", 0.171,-3.290,-1.137}, {"TRP", 8, 6, 0.0532,10," NE1", 0.817,-4.392, 0.703}, {"TRP", 8, 6, 0.0532,10," CE2", 0.817,-4.451,-0.666}, {"TRP", 8, 6, 0.0532,10," CE3", 0.044,-3.112,-2.519}, {"TRP", 8, 6, 0.0532,10," CZ2", 1.329,-5.423,-1.523}, {"TRP", 8, 6, 0.0532,10," CZ3", 0.553,-4.078,-3.367}, {"TRP", 8, 6, 0.0532,10," CH2", 1.187,-5.218,-2.866}, {"TRP", 8, 7, 0.0532,10," CB ",-0.938,-1.209, 0.008}, {"TRP", 8, 7, 0.0532,10," CG ",-2.030,-1.126,-1.014}, {"TRP", 8, 7, 0.0532,10," CD1",-3.285,-0.617,-0.838}, {"TRP", 8, 7, 0.0532,10," CD2",-1.966,-1.567,-2.376}, {"TRP", 8, 7, 0.0532,10," NE1",-4.004,-0.715,-2.004}, {"TRP", 8, 7, 0.0532,10," CE2",-3.218,-1.294,-2.965}, {"TRP", 8, 7, 0.0532,10," CE3",-0.977,-2.168,-3.162}, {"TRP", 8, 7, 0.0532,10," CZ2",-3.503,-1.599,-4.294}, {"TRP", 8, 7, 0.0532,10," CZ3",-1.263,-2.470,-4.481}, {"TRP", 8, 7, 0.0532,10," CH2",-2.515,-2.185,-5.033}, {"TYR", 4, 0, 0.4735, 8," CB ",-0.940,-1.206, 0.008}, {"TYR", 4, 0, 0.4735, 8," CG ",-1.983,-1.178,-1.087}, {"TYR", 4, 0, 0.4735, 8," CD1",-3.154,-0.444,-0.938}, {"TYR", 4, 0, 0.4735, 8," CD2",-1.797,-1.885,-2.266}, {"TYR", 4, 0, 0.4735, 8," CE1",-4.110,-0.416,-1.935}, {"TYR", 4, 0, 0.4735, 8," CE2",-2.749,-1.863,-3.269}, {"TYR", 4, 0, 0.4735, 8," CZ ",-3.901,-1.126,-3.099}, {"TYR", 4, 0, 0.4735, 8," OH ",-4.852,-1.102,-4.093}, {"TYR", 4, 1, 0.3248, 8," CB ",-0.940,-1.206, 0.008}, {"TYR", 4, 1, 0.3248, 8," CG ",-1.838,-1.275, 1.223}, {"TYR", 4, 1, 0.3248, 8," CD1",-2.963,-0.466, 1.326}, {"TYR", 4, 1, 0.3248, 8," CD2",-1.561,-2.149, 2.265}, {"TYR", 4, 1, 0.3248, 8," CE1",-3.786,-0.525, 2.434}, {"TYR", 4, 1, 0.3248, 8," CE2",-2.380,-2.215, 3.378}, {"TYR", 4, 1, 0.3248, 8," CZ ",-3.490,-1.403, 3.456}, {"TYR", 4, 1, 0.3248, 8," OH ",-4.307,-1.463, 4.562}, {"TYR", 4, 2, 0.1159, 8," CB ",-0.940,-1.206, 0.008}, {"TYR", 4, 2, 0.1159, 8," CG ",-0.227,-2.539, 0.059}, {"TYR", 4, 2, 0.1159, 8," CD1", 0.141,-3.196,-1.108}, {"TYR", 4, 2, 0.1159, 8," CD2", 0.076,-3.138, 1.274}, {"TYR", 4, 2, 0.1159, 8," CE1", 0.792,-4.414,-1.066}, {"TYR", 4, 2, 0.1159, 8," CE2", 0.727,-4.358, 1.325}, {"TYR", 4, 2, 0.1159, 8," CZ ", 1.083,-4.989, 0.153}, {"TYR", 4, 2, 0.1159, 8," OH ", 1.730,-6.203, 0.198}, {"TYR", 4, 3, 0.0653, 8," CB ",-0.940,-1.206, 0.008}, {"TYR", 4, 3, 0.0653, 8," CG ",-2.004,-1.162,-1.066}, {"TYR", 4, 3, 0.0653, 8," CD1",-2.304, 0.025,-1.724}, {"TYR", 4, 3, 0.0653, 8," CD2",-2.707,-2.305,-1.420}, {"TYR", 4, 3, 0.0653, 8," CE1",-3.276, 0.070,-2.705}, {"TYR", 4, 3, 0.0653, 8," CE2",-3.681,-2.268,-2.401}, {"TYR", 4, 3, 0.0653, 8," CZ ",-3.960,-1.080,-3.040}, {"TYR", 4, 3, 0.0653, 8," OH ",-4.929,-1.037,-4.016}, {"VAL", 3, 0, 0.7390, 3," CB ",-0.945,-1.215, 0.038}, {"VAL", 3, 0, 0.7390, 3," CG1",-1.718,-1.247, 1.347}, {"VAL", 3, 0, 0.7390, 3," CG2",-1.895,-1.189,-1.149}, {"VAL", 3, 1, 0.1870, 3," CB ",-0.945,-1.215, 0.038}, {"VAL", 3, 1, 0.1870, 3," CG1",-1.904,-1.181,-1.141}, {"VAL", 3, 1, 0.1870, 3," CG2",-0.147,-2.510, 0.049}, {"VAL", 3, 2, 0.0740, 3," CB ",-0.945,-1.215, 0.038}, {"VAL", 3, 2, 0.0740, 3," CG1",-0.149,-2.505, 0.153}, {"VAL", 3, 2, 0.0740, 3," CG2",-1.933,-1.086, 1.188}}; int rotamer_data_dunbrack_size = sizeof( rotamer_data_dunbrack ) / sizeof( rotamer_data_dunbrack[0] ); Rotamer_data rotamer_data_richardson[] = { {"ALA", 1, 0, 1.0000, 1," CB ",-0.940,-1.196, 0.000}, {"ARG",19, 0, 0.1157, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19, 0, 0.1157, 7," CG ",-2.007,-1.170,-1.074}, {"ARG",19, 0, 0.1157, 7," CD ",-2.970,-2.346,-1.037}, {"ARG",19, 0, 0.1157, 7," NE ",-3.931,-2.301,-2.135}, {"ARG",19, 0, 0.1157, 7," CZ ",-4.804,-3.262,-2.400}, {"ARG",19, 0, 0.1157, 7," NH1",-4.845,-4.351,-1.643}, {"ARG",19, 0, 0.1157, 7," NH2",-5.642,-3.137,-3.421}, {"ARG",19, 1, 0.0702, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19, 1, 0.0702, 7," CG ",-2.036,-1.147,-1.043}, {"ARG",19, 1, 0.0702, 7," CD ",-3.144,-2.169,-0.844}, {"ARG",19, 1, 0.0702, 7," NE ",-2.651,-3.539,-0.951}, {"ARG",19, 1, 0.0702, 7," CZ ",-2.531,-4.201,-2.093}, {"ARG",19, 1, 0.0702, 7," NH1",-2.866,-3.619,-3.238}, {"ARG",19, 1, 0.0702, 7," NH2",-2.074,-5.446,-2.097}, {"ARG",19, 2, 0.0689, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19, 2, 0.0689, 7," CG ",-1.992,-1.182,-1.089}, {"ARG",19, 2, 0.0689, 7," CD ",-2.970,-2.345,-1.038}, {"ARG",19, 2, 0.0689, 7," NE ",-3.945,-2.288,-2.123}, {"ARG",19, 2, 0.0689, 7," CZ ",-5.052,-1.559,-2.092}, {"ARG",19, 2, 0.0689, 7," NH1",-5.330,-0.815,-1.029}, {"ARG",19, 2, 0.0689, 7," NH2",-5.884,-1.568,-3.126}, {"ARG",19, 3, 0.0624, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19, 3, 0.0624, 7," CG ",-2.022,-1.158,-1.058}, {"ARG",19, 3, 0.0624, 7," CD ",-2.849,-2.430,-1.163}, {"ARG",19, 3, 0.0624, 7," NE ",-2.044,-3.574,-1.580}, {"ARG",19, 3, 0.0624, 7," CZ ",-2.522,-4.799,-1.748}, {"ARG",19, 3, 0.0624, 7," NH1",-3.809,-5.046,-1.538}, {"ARG",19, 3, 0.0624, 7," NH2",-1.716,-5.781,-2.129}, {"ARG",19, 4, 0.0585, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19, 4, 0.0585, 7," CG ",-1.977,-1.194,-1.103}, {"ARG",19, 4, 0.0585, 7," CD ",-2.848,-2.439,-1.156}, {"ARG",19, 4, 0.0585, 7," NE ",-3.668,-2.584, 0.043}, {"ARG",19, 4, 0.0585, 7," CZ ",-4.429,-3.638, 0.302}, {"ARG",19, 4, 0.0585, 7," NH1",-4.476,-4.651,-0.554}, {"ARG",19, 4, 0.0585, 7," NH2",-5.143,-3.685, 1.419}, {"ARG",19, 5, 0.0442, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19, 5, 0.0442, 7," CG ",-1.853,-1.275, 1.220}, {"ARG",19, 5, 0.0442, 7," CD ",-2.836,-2.435, 1.193}, {"ARG",19, 5, 0.0442, 7," NE ",-2.160,-3.727, 1.258}, {"ARG",19, 5, 0.0442, 7," CZ ",-1.755,-4.301, 2.381}, {"ARG",19, 5, 0.0442, 7," NH1",-1.959,-3.700, 3.547}, {"ARG",19, 5, 0.0442, 7," NH2",-1.147,-5.480, 2.346}, {"ARG",19, 6, 0.0429, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19, 6, 0.0429, 7," CG ",-1.853,-1.275, 1.220}, {"ARG",19, 6, 0.0429, 7," CD ",-2.836,-2.435, 1.193}, {"ARG",19, 6, 0.0429, 7," NE ",-3.706,-2.443, 2.366}, {"ARG",19, 6, 0.0429, 7," CZ ",-4.768,-3.224, 2.500}, {"ARG",19, 6, 0.0429, 7," NH1",-5.097,-4.072, 1.533}, {"ARG",19, 6, 0.0429, 7," NH2",-5.504,-3.164, 3.602}, {"ARG",19, 7, 0.0429, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19, 7, 0.0429, 7," CG ",-2.007,-1.170,-1.074}, {"ARG",19, 7, 0.0429, 7," CD ",-2.910,-2.393,-1.098}, {"ARG",19, 7, 0.0429, 7," NE ",-3.932,-2.299,-2.136}, {"ARG",19, 7, 0.0429, 7," CZ ",-3.733,-2.614,-3.407}, {"ARG",19, 7, 0.0429, 7," NH1",-2.546,-3.052,-3.807}, {"ARG",19, 7, 0.0429, 7," NH2",-4.721,-2.497,-4.285}, {"ARG",19, 8, 0.0364, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19, 8, 0.0364, 7," CG ",-1.870,-1.262, 1.208}, {"ARG",19, 8, 0.0364, 7," CD ",-2.770,-2.487, 1.241}, {"ARG",19, 8, 0.0364, 7," NE ",-2.008,-3.723, 1.398}, {"ARG",19, 8, 0.0364, 7," CZ ",-2.481,-4.929, 1.121}, {"ARG",19, 8, 0.0364, 7," NH1",-3.719,-5.071, 0.665}, {"ARG",19, 8, 0.0364, 7," NH2",-1.716,-6.000, 1.295}, {"ARG",19, 9, 0.0338, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19, 9, 0.0338, 7," CG ",-1.853,-1.275, 1.220}, {"ARG",19, 9, 0.0338, 7," CD ",-2.803,-2.462, 1.216}, {"ARG",19, 9, 0.0338, 7," NE ",-3.659,-2.482, 2.399}, {"ARG",19, 9, 0.0338, 7," CZ ",-3.316,-3.027, 3.557}, {"ARG",19, 9, 0.0338, 7," NH1",-2.127,-3.599, 3.698}, {"ARG",19, 9, 0.0338, 7," NH2",-4.159,-3.001, 4.581}, {"ARG",19,10, 0.0325, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19,10, 0.0325, 7," CG ",-1.919,-1.224, 1.170}, {"ARG",19,10, 0.0325, 7," CD ",-2.820,-2.448, 1.205}, {"ARG",19,10, 0.0325, 7," NE ",-3.719,-2.500, 0.056}, {"ARG",19,10, 0.0325, 7," CZ ",-4.879,-1.863,-0.011}, {"ARG",19,10, 0.0325, 7," NH1",-5.288,-1.116, 1.006}, {"ARG",19,10, 0.0325, 7," NH2",-5.634,-1.968,-1.097}, {"ARG",19,11, 0.0286, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19,11, 0.0286, 7," CG ",-1.785,-1.328, 1.265}, {"ARG",19,11, 0.0286, 7," CD ",-2.765,-0.182, 1.465}, {"ARG",19,11, 0.0286, 7," NE ",-3.553,-0.342, 2.683}, {"ARG",19,11, 0.0286, 7," CZ ",-3.160, 0.061, 3.883}, {"ARG",19,11, 0.0286, 7," NH1",-1.984, 0.656, 4.033}, {"ARG",19,11, 0.0286, 7," NH2",-3.943,-0.127, 4.938}, {"ARG",19,12, 0.0286, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19,12, 0.0286, 7," CG ",-1.820,-1.301, 1.243}, {"ARG",19,12, 0.0286, 7," CD ",-2.737,-0.105, 1.443}, {"ARG",19,12, 0.0286, 7," NE ",-3.594,-0.262, 2.615}, {"ARG",19,12, 0.0286, 7," CZ ",-4.241, 0.733, 3.203}, {"ARG",19,12, 0.0286, 7," NH1",-4.136, 1.968, 2.729}, {"ARG",19,12, 0.0286, 7," NH2",-5.000, 0.498, 4.266}, {"ARG",19,13, 0.0286, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19,13, 0.0286, 7," CG ",-1.919,-1.224, 1.170}, {"ARG",19,13, 0.0286, 7," CD ",-2.915,-2.372, 1.126}, {"ARG",19,13, 0.0286, 7," NE ",-3.818,-2.358, 2.273}, {"ARG",19,13, 0.0286, 7," CZ ",-4.913,-1.617, 2.350}, {"ARG",19,13, 0.0286, 7," NH1",-5.253,-0.824, 1.341}, {"ARG",19,13, 0.0286, 7," NH2",-5.677,-1.667, 3.434}, {"ARG",19,14, 0.0260, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19,14, 0.0260, 7," CG ",-0.227,-2.546, 0.116}, {"ARG",19,14, 0.0260, 7," CD ",-1.150,-3.751, 0.027}, {"ARG",19,14, 0.0260, 7," NE ",-0.427,-5.009, 0.184}, {"ARG",19,14, 0.0260, 7," CZ ", 0.215,-5.626,-0.797}, {"ARG",19,14, 0.0260, 7," NH1", 0.232,-5.100,-2.016}, {"ARG",19,14, 0.0260, 7," NH2", 0.847,-6.769,-0.565}, {"ARG",19,15, 0.0247, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19,15, 0.0247, 7," CG ",-2.036,-1.147,-1.043}, {"ARG",19,15, 0.0247, 7," CD ",-2.926,-2.379,-1.084}, {"ARG",19,15, 0.0247, 7," NE ",-3.680,-2.552, 0.154}, {"ARG",19,15, 0.0247, 7," CZ ",-4.828,-1.946, 0.417}, {"ARG",19,15, 0.0247, 7," NH1",-5.367,-1.123,-0.475}, {"ARG",19,15, 0.0247, 7," NH2",-5.447,-2.162, 1.571}, {"ARG",19,16, 0.0234, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19,16, 0.0234, 7," CG ",-0.225,-2.549,-0.053}, {"ARG",19,16, 0.0234, 7," CD ",-1.151,-3.750, 0.051}, {"ARG",19,16, 0.0234, 7," NE ",-0.415,-5.011, 0.035}, {"ARG",19,16, 0.0234, 7," CZ ",-0.986,-6.207, 0.055}, {"ARG",19,16, 0.0234, 7," NH1",-2.308,-6.313, 0.088}, {"ARG",19,16, 0.0234, 7," NH2",-0.238,-7.303, 0.039}, {"ARG",19,17, 0.0208, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19,17, 0.0208, 7," CG ",-2.022,-1.158,-1.058}, {"ARG",19,17, 0.0208, 7," CD ",-2.970,-2.347,-1.036}, {"ARG",19,17, 0.0208, 7," NE ",-2.289,-3.597,-1.361}, {"ARG",19,17, 0.0208, 7," CZ ",-1.940,-4.509,-0.465}, {"ARG",19,17, 0.0208, 7," NH1",-2.210,-4.317, 0.820}, {"ARG",19,17, 0.0208, 7," NH2",-1.322,-5.618,-0.850}, {"ARG",19,18, 0.0208, 7," CB ",-0.939,-1.208, 0.007}, {"ARG",19,18, 0.0208, 7," CG ",-0.225,-2.547, 0.092}, {"ARG",19,18, 0.0208, 7," CD ",-1.155,-3.750, 0.051}, {"ARG",19,18, 0.0208, 7," NE ",-0.425,-5.010, 0.159}, {"ARG",19,18, 0.0208, 7," CZ ",-0.117,-5.596, 1.306}, {"ARG",19,18, 0.0208, 7," NH1",-0.477,-5.040, 2.456}, {"ARG",19,18, 0.0208, 7," NH2", 0.551,-6.743, 1.310}, {"ASN", 7, 0, 0.4154, 4," CB ",-0.952,-1.197, 0.006}, {"ASN", 7, 0, 0.4154, 4," CG ",-2.069,-1.060,-1.010}, {"ASN", 7, 0, 0.4154, 4," OD1",-2.411, 0.046,-1.427}, {"ASN", 7, 0, 0.4154, 4," ND2",-2.643,-2.187,-1.414}, {"ASN", 7, 1, 0.1633, 4," CB ",-0.952,-1.197, 0.006}, {"ASN", 7, 1, 0.1633, 4," CG ",-2.012,-1.092, 1.086}, {"ASN", 7, 1, 0.1633, 4," OD1",-2.435, 0.004, 1.451}, {"ASN", 7, 1, 0.1633, 4," ND2",-2.446,-2.236, 1.602}, {"ASN", 7, 2, 0.1267, 4," CB ",-0.952,-1.197, 0.006}, {"ASN", 7, 2, 0.1267, 4," CG ",-1.920,-1.165, 1.173}, {"ASN", 7, 2, 0.1267, 4," OD1",-1.682,-0.488, 2.173}, {"ASN", 7, 2, 0.1267, 4," ND2",-3.019,-1.900, 1.051}, {"ASN", 7, 3, 0.0945, 4," CB ",-0.952,-1.197, 0.006}, {"ASN", 7, 3, 0.0945, 4," CG ",-0.220,-2.524, 0.052}, {"ASN", 7, 3, 0.0945, 4," OD1", 0.840,-2.640, 0.667}, {"ASN", 7, 3, 0.0945, 4," ND2",-0.783,-3.533,-0.602}, {"ASN", 7, 4, 0.0845, 4," CB ",-0.952,-1.197, 0.006}, {"ASN", 7, 4, 0.0845, 4," CG ",-2.069,-1.060,-1.010}, {"ASN", 7, 4, 0.0845, 4," OD1",-3.022,-0.310,-0.804}, {"ASN", 7, 4, 0.0845, 4," ND2",-1.956,-1.787,-2.115}, {"ASN", 7, 5, 0.0737, 4," CB ",-0.952,-1.197, 0.006}, {"ASN", 7, 5, 0.0737, 4," CG ",-0.219,-2.524, 0.027}, {"ASN", 7, 5, 0.0737, 4," OD1", 0.989,-2.583,-0.201}, {"ASN", 7, 5, 0.0737, 4," ND2",-0.949,-3.599, 0.302}, {"ASN", 7, 6, 0.0415, 4," CB ",-0.952,-1.197, 0.006}, {"ASN", 7, 6, 0.0415, 4," CG ",-1.966,-1.142,-1.119}, {"ASN", 7, 6, 0.0415, 4," OD1",-2.175,-2.125,-1.830}, {"ASN", 7, 6, 0.0415, 4," ND2",-2.603, 0.011,-1.286}, {"ASP", 5, 0, 0.5330, 4," CB ",-0.939,-1.208, 0.006}, {"ASP", 5, 0, 0.5330, 4," CG ",-2.047,-1.090,-1.022}, {"ASP", 5, 0, 0.5330, 4," OD1",-2.264, 0.026,-1.538}, {"ASP", 5, 0, 0.5330, 4," OD2",-2.752,-2.059,-1.376}, {"ASP", 5, 1, 0.2146, 4," CB ",-0.939,-1.208, 0.006}, {"ASP", 5, 1, 0.2146, 4," CG ",-1.885,-1.202, 1.191}, {"ASP", 5, 1, 0.2146, 4," OD1",-1.825,-0.250, 1.997}, {"ASP", 5, 1, 0.2146, 4," OD2",-2.722,-2.106, 1.397}, {"ASP", 5, 2, 0.0994, 4," CB ",-0.939,-1.208, 0.006}, {"ASP", 5, 2, 0.0994, 4," CG ",-0.191,-2.526,-0.005}, {"ASP", 5, 2, 0.0994, 4," OD1", 1.054,-2.504,-0.095}, {"ASP", 5, 2, 0.0994, 4," OD2",-0.764,-3.634, 0.072}, {"ASP", 5, 3, 0.0950, 4," CB ",-0.939,-1.208, 0.006}, {"ASP", 5, 3, 0.0950, 4," CG ",-0.192,-2.524, 0.093}, {"ASP", 5, 3, 0.0950, 4," OD1", 1.035,-2.499, 0.318}, {"ASP", 5, 3, 0.0950, 4," OD2",-0.750,-3.633,-0.051}, {"ASP", 5, 4, 0.0578, 4," CB ",-0.939,-1.208, 0.006}, {"ASP", 5, 4, 0.0578, 4," CG ",-1.835,-1.240, 1.229}, {"ASP", 5, 4, 0.0578, 4," OD1",-2.678,-0.331, 1.373}, {"ASP", 5, 4, 0.0578, 4," OD2",-1.768,-2.136, 2.098}, {"CYS", 3, 0, 0.5071, 2," CB ",-0.940,-1.207, 0.007}, {"CYS", 3, 0, 0.5071, 2," SG ",-2.178,-1.197,-1.309}, {"CYS", 3, 1, 0.2642, 2," CB ",-0.940,-1.207, 0.007}, {"CYS", 3, 1, 0.2642, 2," SG ",-2.069,-1.265, 1.417}, {"CYS", 3, 2, 0.2285, 2," CB ",-0.940,-1.207, 0.007}, {"CYS", 3, 2, 0.2285, 2," SG ",-0.110,-2.801,-0.180}, {"GLN", 7, 0, 0.3994, 5," CB ",-0.940,-1.207, 0.006}, {"GLN", 7, 0, 0.3994, 5," CG ",-2.009,-1.169,-1.073}, {"GLN", 7, 0, 0.3994, 5," CD ",-2.874,-2.412,-1.082}, {"GLN", 7, 0, 0.3994, 5," OE1",-2.446,-3.477,-0.636}, {"GLN", 7, 0, 0.3994, 5," NE2",-4.096,-2.281,-1.590}, {"GLN", 7, 1, 0.1839, 5," CB ",-0.940,-1.207, 0.006}, {"GLN", 7, 1, 0.1839, 5," CG ",-1.936,-1.214, 1.154}, {"GLN", 7, 1, 0.1839, 5," CD ",-2.956,-2.327, 1.036}, {"GLN", 7, 1, 0.1839, 5," OE1",-2.981,-3.051, 0.040}, {"GLN", 7, 1, 0.1839, 5," NE2",-3.801,-2.468, 2.053}, {"GLN", 7, 2, 0.1668, 5," CB ",-0.940,-1.207, 0.006}, {"GLN", 7, 2, 0.1668, 5," CG ",-1.994,-1.181,-1.088}, {"GLN", 7, 2, 0.1668, 5," CD ",-2.899, 0.030,-0.998}, {"GLN", 7, 2, 0.1668, 5," OE1",-3.293, 0.439, 0.095}, {"GLN", 7, 2, 0.1668, 5," NE2",-3.232, 0.608,-2.148}, {"GLN", 7, 3, 0.1024, 5," CB ",-0.940,-1.207, 0.006}, {"GLN", 7, 3, 0.1024, 5," CG ",-1.920,-1.226, 1.167}, {"GLN", 7, 3, 0.1024, 5," CD ",-2.891,-0.065, 1.131}, {"GLN", 7, 3, 0.1024, 5," OE1",-3.648, 0.090, 0.172}, {"GLN", 7, 3, 0.1024, 5," NE2",-2.875, 0.755, 2.178}, {"GLN", 7, 4, 0.0486, 5," CB ",-0.940,-1.207, 0.006}, {"GLN", 7, 4, 0.0486, 5," CG ",-0.229,-2.549, 0.065}, {"GLN", 7, 4, 0.0486, 5," CD ",-1.190,-3.719, 0.070}, {"GLN", 7, 4, 0.0486, 5," OE1",-2.347,-3.583,-0.331}, {"GLN", 7, 4, 0.0486, 5," NE2",-0.715,-4.875, 0.523}, {"GLN", 7, 5, 0.0315, 5," CB ",-0.940,-1.207, 0.006}, {"GLN", 7, 5, 0.0315, 5," CG ",-1.978,-1.193,-1.103}, {"GLN", 7, 5, 0.0315, 5," CD ",-1.454,-1.770,-2.401}, {"GLN", 7, 5, 0.0315, 5," OE1",-0.299,-2.189,-2.480}, {"GLN", 7, 5, 0.0315, 5," NE2",-2.303,-1.796,-3.424}, {"GLN", 7, 6, 0.0289, 5," CB ",-0.940,-1.207, 0.006}, {"GLN", 7, 6, 0.0289, 5," CG ",-1.978,-1.193,-1.103}, {"GLN", 7, 6, 0.0289, 5," CD ",-2.960,-0.048,-0.969}, {"GLN", 7, 6, 0.0289, 5," OE1",-2.828, 0.974,-1.644}, {"GLN", 7, 6, 0.0289, 5," NE2",-3.951,-0.214,-0.098}, {"GLU", 7, 0, 0.3614, 5," CB ",-0.939,-1.208, 0.006}, {"GLU", 7, 0, 0.3614, 5," CG ",-2.008,-1.170,-1.075}, {"GLU", 7, 0, 0.3614, 5," CD ",-2.872,-2.417,-1.082}, {"GLU", 7, 0, 0.3614, 5," OE1",-2.524,-3.387,-0.377}, {"GLU", 7, 0, 0.3614, 5," OE2",-3.898,-2.427,-1.794}, {"GLU", 7, 1, 0.2613, 5," CB ",-0.939,-1.208, 0.006}, {"GLU", 7, 1, 0.2613, 5," CG ",-1.887,-1.252, 1.195}, {"GLU", 7, 1, 0.2613, 5," CD ",-2.833,-2.436, 1.140}, {"GLU", 7, 1, 0.2613, 5," OE1",-2.723,-3.244, 0.194}, {"GLU", 7, 1, 0.2613, 5," OE2",-3.689,-2.558, 2.042}, {"GLU", 7, 2, 0.1471, 5," CB ",-0.939,-1.208, 0.006}, {"GLU", 7, 2, 0.1471, 5," CG ",-1.978,-1.194,-1.104}, {"GLU", 7, 2, 0.1471, 5," CD ",-2.853, 0.045,-1.065}, {"GLU", 7, 2, 0.1471, 5," OE1",-3.232, 0.472, 0.045}, {"GLU", 7, 2, 0.1471, 5," OE2",-3.163, 0.589,-2.146}, {"GLU", 7, 3, 0.0679, 5," CB ",-0.939,-1.208, 0.006}, {"GLU", 7, 3, 0.0679, 5," CG ",-1.887,-1.252, 1.195}, {"GLU", 7, 3, 0.0679, 5," CD ",-2.875,-0.100, 1.192}, {"GLU", 7, 3, 0.0679, 5," OE1",-2.988, 0.586, 0.155}, {"GLU", 7, 3, 0.0679, 5," OE2",-3.535, 0.121, 2.229}, {"GLU", 7, 4, 0.0657, 5," CB ",-0.939,-1.208, 0.006}, {"GLU", 7, 4, 0.0657, 5," CG ",-1.978,-1.194,-1.104}, {"GLU", 7, 4, 0.0657, 5," CD ",-1.447,-1.772,-2.403}, {"GLU", 7, 4, 0.0657, 5," OE1",-0.253,-2.131,-2.451}, {"GLU", 7, 4, 0.0657, 5," OE2",-2.226,-1.865,-3.375}, {"GLU", 7, 5, 0.0597, 5," CB ",-0.939,-1.208, 0.006}, {"GLU", 7, 5, 0.0597, 5," CG ",-0.225,-2.550, 0.041}, {"GLU", 7, 5, 0.0597, 5," CD ",-1.182,-3.721,-0.075}, {"GLU", 7, 5, 0.0597, 5," OE1",-2.393,-3.526, 0.157}, {"GLU", 7, 5, 0.0597, 5," OE2",-0.722,-4.837,-0.397}, {"GLU", 7, 6, 0.0238, 5," CB ",-0.939,-1.208, 0.006}, {"GLU", 7, 6, 0.0238, 5," CG ",-0.238,-2.538, 0.234}, {"GLU", 7, 6, 0.0238, 5," CD ", 0.437,-3.061,-1.020}, {"GLU", 7, 6, 0.0238, 5," OE1", 0.439,-2.342,-2.040}, {"GLU", 7, 6, 0.0238, 5," OE2", 0.963,-4.194,-0.985}, {"HIS", 8, 0, 0.3096, 6," CB ",-0.940,-1.207, 0.007}, {"HIS", 8, 0, 0.3096, 6," CG ",-1.882,-1.247,-1.154}, {"HIS", 8, 0, 0.3096, 6," ND1",-2.913,-0.344,-1.309}, {"HIS", 8, 0, 0.3096, 6," CD2",-1.949,-2.080,-2.219}, {"HIS", 8, 0, 0.3096, 6," CE1",-3.575,-0.621,-2.418}, {"HIS", 8, 0, 0.3096, 6," NE2",-3.012,-1.669,-2.990}, {"HIS", 8, 1, 0.1672, 6," CB ",-0.940,-1.207, 0.007}, {"HIS", 8, 1, 0.1672, 6," CG ",-1.853,-1.255, 1.191}, {"HIS", 8, 1, 0.1672, 6," ND1",-2.788,-0.275, 1.452}, {"HIS", 8, 1, 0.1672, 6," CD2",-1.977,-2.165, 2.186}, {"HIS", 8, 1, 0.1672, 6," CE1",-3.446,-0.580, 2.556}, {"HIS", 8, 1, 0.1672, 6," NE2",-2.975,-1.721, 3.022}, {"HIS", 8, 2, 0.1387, 6," CB ",-0.940,-1.207, 0.007}, {"HIS", 8, 2, 0.1387, 6," CG ",-1.974,-1.174,-1.073}, {"HIS", 8, 2, 0.1387, 6," ND1",-1.721,-1.598,-2.361}, {"HIS", 8, 2, 0.1387, 6," CD2",-3.266,-0.770,-1.058}, {"HIS", 8, 2, 0.1387, 6," CE1",-2.812,-1.454,-3.092}, {"HIS", 8, 2, 0.1387, 6," NE2",-3.765,-0.954,-2.327}, {"HIS", 8, 3, 0.1138, 6," CB ",-0.940,-1.207, 0.007}, {"HIS", 8, 3, 0.1138, 6," CG ",-1.932,-1.194, 1.127}, {"HIS", 8, 3, 0.1138, 6," ND1",-1.618,-1.602, 2.407}, {"HIS", 8, 3, 0.1138, 6," CD2",-3.233,-0.820, 1.161}, {"HIS", 8, 3, 0.1138, 6," CE1",-2.683,-1.481, 3.179}, {"HIS", 8, 3, 0.1138, 6," NE2",-3.677,-1.009, 2.449}, {"HIS", 8, 4, 0.0907, 6," CB ",-0.940,-1.207, 0.007}, {"HIS", 8, 4, 0.0907, 6," CG ",-0.232,-2.525,-0.030}, {"HIS", 8, 4, 0.0907, 6," ND1", 0.356,-3.023,-1.173}, {"HIS", 8, 4, 0.0907, 6," CD2",-0.016,-3.448, 0.936}, {"HIS", 8, 4, 0.0907, 6," CE1", 0.901,-4.197,-0.910}, {"HIS", 8, 4, 0.0907, 6," NE2", 0.691,-4.479, 0.363}, {"HIS", 8, 5, 0.0782, 6," CB ",-0.940,-1.207, 0.007}, {"HIS", 8, 5, 0.0782, 6," CG ",-1.929,-1.210,-1.115}, {"HIS", 8, 5, 0.0782, 6," ND1",-2.653,-2.330,-1.468}, {"HIS", 8, 5, 0.0782, 6," CD2",-2.317,-0.230,-1.964}, {"HIS", 8, 5, 0.0782, 6," CE1",-3.442,-2.039,-2.486}, {"HIS", 8, 5, 0.0782, 6," NE2",-3.259,-0.772,-2.808}, {"HIS", 8, 6, 0.0551, 6," CB ",-0.940,-1.207, 0.007}, {"HIS", 8, 6, 0.0551, 6," CG ",-1.853,-1.255, 1.191}, {"HIS", 8, 6, 0.0551, 6," ND1",-2.523,-2.400, 1.571}, {"HIS", 8, 6, 0.0551, 6," CD2",-2.208,-0.300, 2.083}, {"HIS", 8, 6, 0.0551, 6," CE1",-3.251,-2.146, 2.643}, {"HIS", 8, 6, 0.0551, 6," NE2",-3.079,-0.881, 2.976}, {"HIS", 8, 7, 0.0462, 6," CB ",-0.940,-1.207, 0.007}, {"HIS", 8, 7, 0.0462, 6," CG ",-0.232,-2.525,-0.006}, {"HIS", 8, 7, 0.0462, 6," ND1", 0.347,-3.071, 1.121}, {"HIS", 8, 7, 0.0462, 6," CD2",-0.010,-3.408,-1.007}, {"HIS", 8, 7, 0.0462, 6," CE1", 0.896,-4.232, 0.812}, {"HIS", 8, 7, 0.0462, 6," NE2", 0.694,-4.461,-0.472}, {"ILE", 5, 0, 0.6043, 4," CB ",-0.946,-1.216, 0.008}, {"ILE", 5, 0, 0.6043, 4," CG1",-1.969,-1.104,-1.124}, {"ILE", 5, 0, 0.6043, 4," CG2",-1.645,-1.338, 1.354}, {"ILE", 5, 0, 0.6043, 4," CD1",-2.764,-2.369,-1.355}, {"ILE", 5, 1, 0.1472, 4," CB ",-0.946,-1.216, 0.008}, {"ILE", 5, 1, 0.1472, 4," CG1",-1.821,-1.220,-1.247}, {"ILE", 5, 1, 0.1472, 4," CG2",-1.806,-1.213, 1.263}, {"ILE", 5, 1, 0.1472, 4," CD1",-2.673, 0.019,-1.400}, {"ILE", 5, 2, 0.1314, 4," CB ",-0.946,-1.216, 0.008}, {"ILE", 5, 2, 0.1314, 4," CG1",-0.142,-2.518,-0.005}, {"ILE", 5, 2, 0.1314, 4," CG2",-1.897,-1.160,-1.177}, {"ILE", 5, 2, 0.1314, 4," CD1",-0.981,-3.755, 0.219}, {"ILE", 5, 3, 0.0772, 4," CB ",-0.946,-1.216, 0.008}, {"ILE", 5, 3, 0.0772, 4," CG1",-1.908,-1.135, 1.195}, {"ILE", 5, 3, 0.0772, 4," CG2",-0.149,-2.511, 0.050}, {"ILE", 5, 3, 0.0772, 4," CD1",-3.063,-2.108, 1.112}, {"ILE", 5, 4, 0.0219, 4," CB ",-0.946,-1.216, 0.008}, {"ILE", 5, 4, 0.0219, 4," CG1",-1.987,-1.074, 1.120}, {"ILE", 5, 4, 0.0219, 4," CG2",-0.156,-2.505, 0.174}, {"ILE", 5, 4, 0.0219, 4," CD1",-2.950, 0.073, 0.911}, {"LEU", 4, 0, 0.6367, 4," CB ",-0.940,-1.208, 0.007}, {"LEU", 4, 0, 0.6367, 4," CG ",-2.007,-1.243,-1.090}, {"LEU", 4, 0, 0.6367, 4," CD1",-2.769,-2.559,-1.055}, {"LEU", 4, 0, 0.6367, 4," CD2",-2.957,-0.064,-0.955}, {"LEU", 4, 1, 0.3085, 4," CB ",-0.940,-1.208, 0.007}, {"LEU", 4, 1, 0.3085, 4," CG ",-1.815,-1.377, 1.252}, {"LEU", 4, 1, 0.3085, 4," CD1",-2.768,-0.201, 1.401}, {"LEU", 4, 1, 0.3085, 4," CD2",-2.581,-2.690, 1.197}, {"LEU", 4, 2, 0.0259, 4," CB ",-0.940,-1.208, 0.007}, {"LEU", 4, 2, 0.0259, 4," CG ",-1.994,-1.239, 1.117}, {"LEU", 4, 2, 0.0259, 4," CD1",-3.270,-1.907, 0.626}, {"LEU", 4, 2, 0.0259, 4," CD2",-1.456,-1.944, 2.352}, {"LEU", 4, 3, 0.0201, 4," CB ",-0.940,-1.208, 0.007}, {"LEU", 4, 3, 0.0201, 4," CG ",-2.264,-1.041,-0.743}, {"LEU", 4, 3, 0.0201, 4," CD1",-2.017,-0.885,-2.236}, {"LEU", 4, 3, 0.0201, 4," CD2",-3.190,-2.215,-0.468}, {"LYS",13, 0, 0.2479, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",13, 0, 0.2479, 5," CG ",-2.006,-1.172,-1.074}, {"LYS",13, 0, 0.2479, 5," CD ",-2.885,-2.410,-1.025}, {"LYS",13, 0, 0.2479, 5," CE ",-3.968,-2.363,-2.090}, {"LYS",13, 0, 0.2479, 5," NZ ",-4.822,-3.582,-2.068}, {"LYS",13, 1, 0.1646, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",13, 1, 0.1646, 5," CG ",-1.887,-1.251, 1.195}, {"LYS",13, 1, 0.1646, 5," CD ",-2.820,-2.447, 1.114}, {"LYS",13, 1, 0.1646, 5," CE ",-3.752,-2.503, 2.313}, {"LYS",13, 1, 0.1646, 5," NZ ",-4.673,-3.671, 2.247}, {"LYS",13, 2, 0.0782, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",13, 2, 0.0782, 5," CG ",-1.913,-1.245,-1.159}, {"LYS",13, 2, 0.0782, 5," CD ",-2.874,-0.069,-1.114}, {"LYS",13, 2, 0.0782, 5," CE ",-3.895,-0.145,-2.237}, {"LYS",13, 2, 0.0782, 5," NZ ",-4.828, 1.014,-2.220}, {"LYS",13, 3, 0.0569, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",13, 3, 0.0569, 5," CG ",-1.976,-1.196,-1.104}, {"LYS",13, 3, 0.0569, 5," CD ",-2.872,-2.421,-1.037}, {"LYS",13, 3, 0.0569, 5," CE ",-3.878,-2.434,-2.176}, {"LYS",13, 3, 0.0569, 5," NZ ",-4.810,-1.275,-2.108}, {"LYS",13, 4, 0.0497, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",13, 4, 0.0497, 5," CG ",-1.887,-1.251, 1.195}, {"LYS",13, 4, 0.0497, 5," CD ",-2.613,-2.583, 1.275}, {"LYS",13, 4, 0.0497, 5," CE ",-3.615,-2.599, 2.418}, {"LYS",13, 4, 0.0497, 5," NZ ",-4.766,-1.692, 2.161}, {"LYS",13, 5, 0.0426, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",13, 5, 0.0426, 5," CG ",-2.006,-1.172,-1.074}, {"LYS",13, 5, 0.0426, 5," CD ",-2.960,-2.348,-0.949}, {"LYS",13, 5, 0.0426, 5," CE ",-4.098,-2.247,-1.951}, {"LYS",13, 5, 0.0426, 5," NZ ",-3.634,-2.492,-3.344}, {"LYS",13, 6, 0.0406, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",13, 6, 0.0406, 5," CG ",-2.036,-1.149,-1.043}, {"LYS",13, 6, 0.0406, 5," CD ",-2.837,-2.439,-1.079}, {"LYS",13, 6, 0.0406, 5," CE ",-3.598,-2.654, 0.219}, {"LYS",13, 6, 0.0406, 5," NZ ",-4.481,-3.851, 0.154}, {"LYS",13, 7, 0.0386, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",13, 7, 0.0386, 5," CG ",-1.820,-1.303, 1.243}, {"LYS",13, 7, 0.0386, 5," CD ",-2.745,-0.103, 1.355}, {"LYS",13, 7, 0.0386, 5," CE ",-3.742,-0.277, 2.489}, {"LYS",13, 7, 0.0386, 5," NZ ",-4.510, 0.971, 2.750}, {"LYS",13, 8, 0.0376, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",13, 8, 0.0376, 5," CG ",-2.021,-1.161,-1.059}, {"LYS",13, 8, 0.0376, 5," CD ",-3.043,-2.267,-0.859}, {"LYS",13, 8, 0.0376, 5," CE ",-2.435,-3.635,-1.121}, {"LYS",13, 8, 0.0376, 5," NZ ",-3.453,-4.719,-1.046}, {"LYS",13, 9, 0.0325, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",13, 9, 0.0325, 5," CG ",-1.903,-1.238, 1.182}, {"LYS",13, 9, 0.0325, 5," CD ",-2.718,-2.520, 1.196}, {"LYS",13, 9, 0.0325, 5," CE ",-3.888,-2.422, 2.160}, {"LYS",13, 9, 0.0325, 5," NZ ",-3.439,-2.148, 3.553}, {"LYS",13,10, 0.0294, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",13,10, 0.0294, 5," CG ",-1.935,-1.214, 1.156}, {"LYS",13,10, 0.0294, 5," CD ",-2.485,-2.608, 1.404}, {"LYS",13,10, 0.0294, 5," CE ",-3.068,-3.207, 0.135}, {"LYS",13,10, 0.0294, 5," NZ ",-3.737,-4.512, 0.394}, {"LYS",13,11, 0.0254, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",13,11, 0.0254, 5," CG ",-1.887,-1.251, 1.195}, {"LYS",13,11, 0.0254, 5," CD ",-2.960,-2.310, 1.008}, {"LYS",13,11, 0.0254, 5," CE ",-2.382,-3.710, 1.128}, {"LYS",13,11, 0.0254, 5," NZ ",-3.445,-4.752, 1.138}, {"LYS",13,12, 0.0203, 5," CB ",-0.938,-1.208, 0.007}, {"LYS",13,12, 0.0203, 5," CG ",-0.224,-2.549, 0.069}, {"LYS",13,12, 0.0203, 5," CD ",-1.213,-3.702, 0.098}, {"LYS",13,12, 0.0203, 5," CE ",-0.499,-5.042, 0.159}, {"LYS",13,12, 0.0203, 5," NZ ",-1.457,-6.181, 0.188}, {"MET",12, 0, 0.2224, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 0, 0.2224, 4," CG ",-1.995,-1.180,-1.087}, {"MET",12, 0, 0.2224, 4," SD ",-3.072, 0.260,-0.981}, {"MET",12, 0, 0.2224, 4," CE ",-3.942,-0.079, 0.548}, {"MET",12, 1, 0.1949, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 1, 0.1949, 4," CG ",-2.024,-1.157,-1.057}, {"MET",12, 1, 0.1949, 4," SD ",-3.055,-2.635,-1.069}, {"MET",12, 1, 0.1949, 4," CE ",-4.000,-2.401, 0.435}, {"MET",12, 2, 0.1228, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 2, 0.1228, 4," CG ",-2.010,-1.168,-1.072}, {"MET",12, 2, 0.1228, 4," SD ",-3.147,-2.563,-0.974}, {"MET",12, 2, 0.1228, 4," CE ",-2.134,-3.874,-1.654}, {"MET",12, 3, 0.0911, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 3, 0.0911, 4," CG ",-2.010,-1.168,-1.072}, {"MET",12, 3, 0.0911, 4," SD ",-3.040,-2.647,-1.082}, {"MET",12, 3, 0.0911, 4," CE ",-4.115,-2.301,-2.473}, {"MET",12, 4, 0.0762, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 4, 0.0762, 4," CG ",-1.888,-1.249, 1.195}, {"MET",12, 4, 0.0762, 4," SD ",-3.053,-2.621, 1.106}, {"MET",12, 4, 0.0762, 4," CE ",-4.236,-1.984,-0.079}, {"MET",12, 5, 0.0635, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 5, 0.0635, 4," CG ",-1.888,-1.249, 1.195}, {"MET",12, 5, 0.0635, 4," SD ",-3.081, 0.101, 1.183}, {"MET",12, 5, 0.0635, 4," CE ",-4.202,-0.448,-0.102}, {"MET",12, 6, 0.0593, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 6, 0.0593, 4," CG ",-1.769,-1.341, 1.274}, {"MET",12, 6, 0.0593, 4," SD ",-2.903,-2.740, 1.218}, {"MET",12, 6, 0.0593, 4," CE ",-1.763,-4.109, 1.406}, {"MET",12, 7, 0.0360, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 7, 0.0360, 4," CG ",-0.233,-2.545, 0.139}, {"MET",12, 7, 0.0360, 4," SD ",-1.381,-3.923, 0.317}, {"MET",12, 7, 0.0360, 4," CE ",-1.840,-3.761, 2.041}, {"MET",12, 8, 0.0360, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 8, 0.0360, 4," CG ",-1.838,-1.288, 1.231}, {"MET",12, 8, 0.0360, 4," SD ",-3.101,-2.565, 1.084}, {"MET",12, 8, 0.0360, 4," CE ",-3.831,-2.510, 2.718}, {"MET",12, 9, 0.0317, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12, 9, 0.0317, 4," CG ",-1.964,-1.204,-1.116}, {"MET",12, 9, 0.0317, 4," SD ",-3.099, 0.193,-1.021}, {"MET",12, 9, 0.0317, 4," CE ",-2.432, 1.258,-2.297}, {"MET",12,10, 0.0254, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12,10, 0.0254, 4," CG ",-0.235,-2.544, 0.163}, {"MET",12,10, 0.0254, 4," SD ",-1.310,-3.943,-0.203}, {"MET",12,10, 0.0254, 4," CE ",-1.066,-4.104,-1.970}, {"MET",12,11, 0.0211, 4," CB ",-0.940,-1.206, 0.007}, {"MET",12,11, 0.0211, 4," CG ",-1.821,-1.301, 1.243}, {"MET",12,11, 0.0211, 4," SD ",-3.030, 0.032, 1.339}, {"MET",12,11, 0.0211, 4," CE ",-3.848,-0.364, 2.883}, {"MSE",12, 0, 0.2224, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 0, 0.2224, 4," CG ",-1.995,-1.180,-1.087}, {"MSE",12, 0, 0.2224, 4,"SE ",-3.072, 0.260,-0.981}, {"MSE",12, 0, 0.2224, 4," CE ",-3.942,-0.079, 0.548}, {"MSE",12, 1, 0.1949, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 1, 0.1949, 4," CG ",-2.024,-1.157,-1.057}, {"MSE",12, 1, 0.1949, 4,"SE ",-3.055,-2.635,-1.069}, {"MSE",12, 1, 0.1949, 4," CE ",-4.000,-2.401, 0.435}, {"MSE",12, 2, 0.1228, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 2, 0.1228, 4," CG ",-2.010,-1.168,-1.072}, {"MSE",12, 2, 0.1228, 4,"SE ",-3.147,-2.563,-0.974}, {"MSE",12, 2, 0.1228, 4," CE ",-2.134,-3.874,-1.654}, {"MSE",12, 3, 0.0911, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 3, 0.0911, 4," CG ",-2.010,-1.168,-1.072}, {"MSE",12, 3, 0.0911, 4,"SE ",-3.040,-2.647,-1.082}, {"MSE",12, 3, 0.0911, 4," CE ",-4.115,-2.301,-2.473}, {"MSE",12, 4, 0.0762, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 4, 0.0762, 4," CG ",-1.888,-1.249, 1.195}, {"MSE",12, 4, 0.0762, 4,"SE ",-3.053,-2.621, 1.106}, {"MSE",12, 4, 0.0762, 4," CE ",-4.236,-1.984,-0.079}, {"MSE",12, 5, 0.0635, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 5, 0.0635, 4," CG ",-1.888,-1.249, 1.195}, {"MSE",12, 5, 0.0635, 4,"SE ",-3.081, 0.101, 1.183}, {"MSE",12, 5, 0.0635, 4," CE ",-4.202,-0.448,-0.102}, {"MSE",12, 6, 0.0593, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 6, 0.0593, 4," CG ",-1.769,-1.341, 1.274}, {"MSE",12, 6, 0.0593, 4,"SE ",-2.903,-2.740, 1.218}, {"MSE",12, 6, 0.0593, 4," CE ",-1.763,-4.109, 1.406}, {"MSE",12, 7, 0.0360, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 7, 0.0360, 4," CG ",-0.233,-2.545, 0.139}, {"MSE",12, 7, 0.0360, 4,"SE ",-1.381,-3.923, 0.317}, {"MSE",12, 7, 0.0360, 4," CE ",-1.840,-3.761, 2.041}, {"MSE",12, 8, 0.0360, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 8, 0.0360, 4," CG ",-1.838,-1.288, 1.231}, {"MSE",12, 8, 0.0360, 4,"SE ",-3.101,-2.565, 1.084}, {"MSE",12, 8, 0.0360, 4," CE ",-3.831,-2.510, 2.718}, {"MSE",12, 9, 0.0317, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12, 9, 0.0317, 4," CG ",-1.964,-1.204,-1.116}, {"MSE",12, 9, 0.0317, 4,"SE ",-3.099, 0.193,-1.021}, {"MSE",12, 9, 0.0317, 4," CE ",-2.432, 1.258,-2.297}, {"MSE",12,10, 0.0254, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12,10, 0.0254, 4," CG ",-0.235,-2.544, 0.163}, {"MSE",12,10, 0.0254, 4,"SE ",-1.310,-3.943,-0.203}, {"MSE",12,10, 0.0254, 4," CE ",-1.066,-4.104,-1.970}, {"MSE",12,11, 0.0211, 4," CB ",-0.940,-1.206, 0.007}, {"MSE",12,11, 0.0211, 4," CG ",-1.821,-1.301, 1.243}, {"MSE",12,11, 0.0211, 4,"SE ",-3.030, 0.032, 1.339}, {"MSE",12,11, 0.0211, 4," CE ",-3.848,-0.364, 2.883}, {"PHE", 4, 0, 0.4439, 7," CB ",-0.938,-1.208, 0.006}, {"PHE", 4, 0, 0.4439, 7," CG ",-1.945,-1.200,-1.109}, {"PHE", 4, 0, 0.4439, 7," CD1",-3.121,-0.479,-0.994}, {"PHE", 4, 0, 0.4439, 7," CD2",-1.713,-1.914,-2.273}, {"PHE", 4, 0, 0.4439, 7," CE1",-4.047,-0.469,-2.020}, {"PHE", 4, 0, 0.4439, 7," CE2",-2.637,-1.909,-3.300}, {"PHE", 4, 0, 0.4439, 7," CZ ",-3.805,-1.185,-3.175}, {"PHE", 4, 1, 0.3324, 7," CB ",-0.938,-1.208, 0.006}, {"PHE", 4, 1, 0.3324, 7," CG ",-1.773,-1.321, 1.251}, {"PHE", 4, 1, 0.3324, 7," CD1",-2.915,-0.555, 1.408}, {"PHE", 4, 1, 0.3324, 7," CD2",-1.414,-2.195, 2.263}, {"PHE", 4, 1, 0.3324, 7," CE1",-3.684,-0.659, 2.551}, {"PHE", 4, 1, 0.3324, 7," CE2",-2.179,-2.302, 3.409}, {"PHE", 4, 1, 0.3324, 7," CZ ",-3.316,-1.534, 3.553}, {"PHE", 4, 2, 0.1286, 7," CB ",-0.938,-1.208, 0.006}, {"PHE", 4, 2, 0.1286, 7," CG ",-0.225,-2.529,-0.053}, {"PHE", 4, 2, 0.1286, 7," CD1", 0.192,-3.161, 1.106}, {"PHE", 4, 2, 0.1286, 7," CD2", 0.026,-3.141,-1.270}, {"PHE", 4, 2, 0.1286, 7," CE1", 0.846,-4.377, 1.053}, {"PHE", 4, 2, 0.1286, 7," CE2", 0.681,-4.356,-1.329}, {"PHE", 4, 2, 0.1286, 7," CZ ", 1.091,-4.976,-0.166}, {"PHE", 4, 3, 0.0949, 7," CB ",-0.938,-1.208, 0.006}, {"PHE", 4, 3, 0.0949, 7," CG ",-1.945,-1.200,-1.109}, {"PHE", 4, 3, 0.0949, 7," CD1",-2.245,-0.028,-1.782}, {"PHE", 4, 3, 0.0949, 7," CD2",-2.590,-2.366,-1.484}, {"PHE", 4, 3, 0.0949, 7," CE1",-3.169,-0.019,-2.809}, {"PHE", 4, 3, 0.0949, 7," CE2",-3.517,-2.362,-2.509}, {"PHE", 4, 3, 0.0949, 7," CZ ",-3.807,-1.188,-3.174}, {"PRO", 3, 0, 0.4696, 3," CB ",-0.784,-1.311,-0.107}, {"PRO", 3, 0, 0.4696, 3," CG ", 0.113,-2.228,-0.862}, {"PRO", 3, 0, 0.4696, 3," CD ", 1.345,-1.430,-1.153}, {"PRO", 3, 1, 0.4609, 3," CB ",-0.784,-1.311,-0.107}, {"PRO", 3, 1, 0.4609, 3," CG ",-0.916,-1.555,-1.569}, {"PRO", 3, 1, 0.4609, 3," CD ",-0.221,-0.406,-2.229}, {"PRO", 3, 2, 0.0693, 3," CB ",-0.784,-1.311,-0.107}, {"PRO", 3, 2, 0.0693, 3," CG ", 0.123,-2.236,-0.840}, {"PRO", 3, 2, 0.0693, 3," CD ", 1.360,-1.442,-1.120}, {"SER", 3, 0, 0.4890, 2," CB ",-0.939,-1.208, 0.010}, {"SER", 3, 0, 0.4890, 2," OG ",-0.209,-2.421, 0.068}, {"SER", 3, 1, 0.2907, 2," CB ",-0.939,-1.208, 0.010}, {"SER", 3, 1, 0.2907, 2," OG ",-1.878,-1.128,-1.048}, {"SER", 3, 2, 0.2202, 2," CB ",-0.939,-1.208, 0.010}, {"SER", 3, 2, 0.2202, 2," OG ",-1.710,-1.242, 1.199}, {"THR", 3, 0, 0.4936, 3," CB ",-0.946,-1.215, 0.008}, {"THR", 3, 0, 0.4936, 3," OG1",-0.178,-2.422,-0.051}, {"THR", 3, 0, 0.4936, 3," CG2",-1.769,-1.260,-1.270}, {"THR", 3, 1, 0.4368, 3," CB ",-0.946,-1.215, 0.008}, {"THR", 3, 1, 0.4368, 3," OG1",-1.819,-1.152,-1.125}, {"THR", 3, 1, 0.4368, 3," CG2",-1.900,-1.141, 1.191}, {"THR", 3, 2, 0.0695, 3," CB ",-0.946,-1.215, 0.008}, {"THR", 3, 2, 0.0695, 3," OG1",-1.883,-1.087, 1.083}, {"THR", 3, 2, 0.0695, 3," CG2",-0.183,-2.484, 0.359}, {"TRP", 7, 0, 0.3339,10," CB ",-0.938,-1.209, 0.008}, {"TRP", 7, 0, 0.3339,10," CG ",-2.015,-1.139,-1.031}, {"TRP", 7, 0, 0.3339,10," CD1",-1.991,-1.692,-2.279}, {"TRP", 7, 0, 0.3339,10," CD2",-3.279,-0.475,-0.913}, {"TRP", 7, 0, 0.3339,10," NE1",-3.160,-1.413,-2.944}, {"TRP", 7, 0, 0.3339,10," CE2",-3.969,-0.668,-2.128}, {"TRP", 7, 0, 0.3339,10," CE3",-3.902, 0.266, 0.097}, {"TRP", 7, 0, 0.3339,10," CZ2",-5.243,-0.150,-2.357}, {"TRP", 7, 0, 0.3339,10," CZ3",-5.165, 0.779,-0.133}, {"TRP", 7, 0, 0.3339,10," CH2",-5.821, 0.569,-1.349}, {"TRP", 7, 1, 0.1866,10," CB ",-0.938,-1.209, 0.008}, {"TRP", 7, 1, 0.1866,10," CG ",-1.850,-1.251, 1.196}, {"TRP", 7, 1, 0.1866,10," CD1",-3.079,-0.669, 1.310}, {"TRP", 7, 1, 0.1866,10," CD2",-1.605,-1.913, 2.443}, {"TRP", 7, 1, 0.1866,10," NE1",-3.613,-0.925, 2.550}, {"TRP", 7, 1, 0.1866,10," CE2",-2.729,-1.689, 3.265}, {"TRP", 7, 1, 0.1866,10," CE3",-0.548,-2.674, 2.953}, {"TRP", 7, 1, 0.1866,10," CZ2",-2.823,-2.196, 4.560}, {"TRP", 7, 1, 0.1866,10," CZ3",-0.644,-3.176, 4.238}, {"TRP", 7, 1, 0.1866,10," CH2",-1.773,-2.935, 5.026}, {"TRP", 7, 2, 0.1712,10," CB ",-0.938,-1.209, 0.008}, {"TRP", 7, 2, 0.1712,10," CG ",-1.783,-1.303, 1.242}, {"TRP", 7, 2, 0.1712,10," CD1",-1.620,-2.165, 2.287}, {"TRP", 7, 2, 0.1712,10," CD2",-2.928,-0.502, 1.560}, {"TRP", 7, 2, 0.1712,10," NE1",-2.592,-1.952, 3.234}, {"TRP", 7, 2, 0.1712,10," CE2",-3.408,-0.935, 2.814}, {"TRP", 7, 2, 0.1712,10," CE3",-3.601, 0.540, 0.913}, {"TRP", 7, 2, 0.1712,10," CZ2",-4.522,-0.366, 3.427}, {"TRP", 7, 2, 0.1712,10," CZ3",-4.706, 1.103, 1.525}, {"TRP", 7, 2, 0.1712,10," CH2",-5.155, 0.650, 2.768}, {"TRP", 7, 3, 0.1147,10," CB ",-0.938,-1.209, 0.008}, {"TRP", 7, 3, 0.1147,10," CG ",-0.223,-2.523,-0.075}, {"TRP", 7, 3, 0.1147,10," CD1", 0.163,-3.180,-1.208}, {"TRP", 7, 3, 0.1147,10," CD2", 0.195,-3.343, 1.023}, {"TRP", 7, 3, 0.1147,10," NE1", 0.792,-4.357,-0.883}, {"TRP", 7, 3, 0.1147,10," CE2", 0.827,-4.481, 0.480}, {"TRP", 7, 3, 0.1147,10," CE3", 0.100,-3.234, 2.415}, {"TRP", 7, 3, 0.1147,10," CZ2", 1.356,-5.496, 1.276}, {"TRP", 7, 3, 0.1147,10," CZ3", 0.627,-4.242, 3.202}, {"TRP", 7, 3, 0.1147,10," CH2", 1.246,-5.357, 2.631}, {"TRP", 7, 4, 0.0821,10," CB ",-0.938,-1.209, 0.008}, {"TRP", 7, 4, 0.0821,10," CG ",-1.971,-1.173,-1.076}, {"TRP", 7, 4, 0.0821,10," CD1",-2.185,-0.168,-1.975}, {"TRP", 7, 4, 0.0821,10," CD2",-2.934,-2.191,-1.378}, {"TRP", 7, 4, 0.0821,10," NE1",-3.222,-0.497,-2.815}, {"TRP", 7, 4, 0.0821,10," CE2",-3.698,-1.734,-2.471}, {"TRP", 7, 4, 0.0821,10," CE3",-3.231,-3.445,-0.834}, {"TRP", 7, 4, 0.0821,10," CZ2",-4.734,-2.483,-3.027}, {"TRP", 7, 4, 0.0821,10," CZ3",-4.259,-4.186,-1.388}, {"TRP", 7, 4, 0.0821,10," CH2",-4.997,-3.703,-2.472}, {"TRP", 7, 5, 0.0582,10," CB ",-0.938,-1.209, 0.008}, {"TRP", 7, 5, 0.0582,10," CG ",-0.221,-2.524,-0.027}, {"TRP", 7, 5, 0.0582,10," CD1", 0.168,-3.278, 1.043}, {"TRP", 7, 5, 0.0582,10," CD2", 0.196,-3.243,-1.194}, {"TRP", 7, 5, 0.0582,10," NE1", 0.801,-4.419, 0.614}, {"TRP", 7, 5, 0.0582,10," CE2", 0.830,-4.424,-0.755}, {"TRP", 7, 5, 0.0582,10," CE3", 0.100,-3.010,-2.570}, {"TRP", 7, 5, 0.0582,10," CZ2", 1.362,-5.362,-1.638}, {"TRP", 7, 5, 0.0582,10," CZ3", 0.627,-3.943,-3.444}, {"TRP", 7, 5, 0.0582,10," CH2", 1.250,-5.103,-2.975}, {"TRP", 7, 6, 0.0530,10," CB ",-0.938,-1.209, 0.008}, {"TRP", 7, 6, 0.0530,10," CG ",-2.029,-1.128,-1.015}, {"TRP", 7, 6, 0.0530,10," CD1",-3.248,-0.531,-0.872}, {"TRP", 7, 6, 0.0530,10," CD2",-2.000,-1.663,-2.344}, {"TRP", 7, 6, 0.0530,10," NE1",-3.980,-0.663,-2.027}, {"TRP", 7, 6, 0.0530,10," CE2",-3.237,-1.353,-2.948}, {"TRP", 7, 6, 0.0530,10," CE3",-1.055,-2.377,-3.089}, {"TRP", 7, 6, 0.0530,10," CZ2",-3.548,-1.729,-4.253}, {"TRP", 7, 6, 0.0530,10," CZ3",-1.367,-2.748,-4.384}, {"TRP", 7, 6, 0.0530,10," CH2",-2.602,-2.424,-4.952}, {"TYR", 4, 0, 0.4382, 8," CB ",-0.940,-1.206, 0.008}, {"TYR", 4, 0, 0.4382, 8," CG ",-1.972,-1.188,-1.098}, {"TYR", 4, 0, 0.4382, 8," CD1",-3.187,-0.534,-0.929}, {"TYR", 4, 0, 0.4382, 8," CD2",-1.730,-1.823,-2.307}, {"TYR", 4, 0, 0.4382, 8," CE1",-4.131,-0.515,-1.936}, {"TYR", 4, 0, 0.4382, 8," CE2",-2.670,-1.809,-3.322}, {"TYR", 4, 0, 0.4382, 8," CZ ",-3.868,-1.154,-3.131}, {"TYR", 4, 0, 0.4382, 8," OH ",-4.809,-1.138,-4.135}, {"TYR", 4, 1, 0.3446, 8," CB ",-0.940,-1.206, 0.008}, {"TYR", 4, 1, 0.3446, 8," CG ",-1.763,-1.334, 1.271}, {"TYR", 4, 1, 0.3446, 8," CD1",-2.872,-0.524, 1.484}, {"TYR", 4, 1, 0.3446, 8," CD2",-1.431,-2.263, 2.246}, {"TYR", 4, 1, 0.3446, 8," CE1",-3.627,-0.637, 2.636}, {"TYR", 4, 1, 0.3446, 8," CE2",-2.181,-2.384, 3.403}, {"TYR", 4, 1, 0.3446, 8," CZ ",-3.277,-1.569, 3.592}, {"TYR", 4, 1, 0.3446, 8," OH ",-4.026,-1.682, 4.741}, {"TYR", 4, 2, 0.1290, 8," CB ",-0.940,-1.206, 0.008}, {"TYR", 4, 2, 0.1290, 8," CG ",-0.227,-2.540, 0.045}, {"TYR", 4, 2, 0.1290, 8," CD1", 0.109,-3.136, 1.255}, {"TYR", 4, 2, 0.1290, 8," CD2", 0.108,-3.200,-1.128}, {"TYR", 4, 2, 0.1290, 8," CE1", 0.759,-4.353, 1.293}, {"TYR", 4, 2, 0.1290, 8," CE2", 0.760,-4.420,-1.099}, {"TYR", 4, 2, 0.1290, 8," CZ ", 1.083,-4.991, 0.113}, {"TYR", 4, 2, 0.1290, 8," OH ", 1.733,-6.204, 0.148}, {"TYR", 4, 3, 0.0879, 8," CB ",-0.940,-1.206, 0.008}, {"TYR", 4, 3, 0.0879, 8," CG ",-1.956,-1.200,-1.112}, {"TYR", 4, 3, 0.0879, 8," CD1",-2.614,-0.029,-1.472}, {"TYR", 4, 3, 0.0879, 8," CD2",-2.256,-2.362,-1.807}, {"TYR", 4, 3, 0.0879, 8," CE1",-3.542,-0.019,-2.494}, {"TYR", 4, 3, 0.0879, 8," CE2",-3.185,-2.361,-2.833}, {"TYR", 4, 3, 0.0879, 8," CZ ",-3.824,-1.188,-3.172}, {"TYR", 4, 3, 0.0879, 8," OH ",-4.750,-1.181,-4.189}, {"VAL", 3, 0, 0.7353, 3," CB ",-0.945,-1.215, 0.038}, {"VAL", 3, 0, 0.7353, 3," CG1",-1.702,-1.260, 1.357}, {"VAL", 3, 0, 0.7353, 3," CG2",-1.910,-1.177,-1.137}, {"VAL", 3, 1, 0.2003, 3," CB ",-0.945,-1.215, 0.038}, {"VAL", 3, 1, 0.2003, 3," CG1",-1.941,-1.152,-1.108}, {"VAL", 3, 1, 0.2003, 3," CG2",-0.149,-2.511,-0.009}, {"VAL", 3, 2, 0.0643, 3," CB ",-0.945,-1.215, 0.038}, {"VAL", 3, 2, 0.0643, 3," CG1",-0.148,-2.509, 0.091}, {"VAL", 3, 2, 0.0643, 3," CG2",-1.892,-1.116, 1.225}}; int rotamer_data_richardson_size = sizeof( rotamer_data_richardson ) / sizeof( rotamer_data_richardson[0] ); } // namespace data } // namespace clipper clipper-2.1/clipper/minimol/minimol.h0000644000374100011300000003623711350423210014646 00000000000000/*! \file minimol.h Header file for atomic model types */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_MINIMOL #define CLIPPER_MINIMOL #include "../core/coords.h" #include "minimol_data.h" namespace clipper { // Forward definitions class MAtomIndex; class MAtomIndexSymmetry; //! dummy namespace to hold search modes namespace MM { enum MODE { UNIQUE, ANY }; enum COPY { COPY_NONE, COPY_M, COPY_P, COPY_MP, COPY_C, COPY_MC, COPY_PC, COPY_MPC, MEMBERS=COPY_M, PROPERTIES=COPY_P, CHILDREN=COPY_C }; } //! MiniMol atom object /*! The MiniMol atom is derived from the basic clipper::Atom, with the addition of an 'id', which is a unique identifier within a monomer in accordance with the mmCIF definition. In addition, it is a clipper::PropertyManager, which means you can add labelled properties of any type to the object. These may be simple strings, or complex objects such as maps, function objects, or whatever. The most commonly used properties are: - "CID" The original CID of this atom in an MMDB heirarchy. The id() is the unique key which identifies an atom. */ class MAtom : public Atom, public PropertyManager { public: MAtom() {} //!< null constructor MAtom( const clipper::Atom& atom ); //!< constructor: from clipper::Atom //! get atom ID, e.g. " N ", " CA ", " CG1", " CA :A" const String& id() const { return id_; } void set_id( const String& s ); //!< set atom ID //! get atom name, i.e. the ID, omitting any alternate conformation code String name() const { return id_.substr(0,4); } void set_name( const String s, const String altconf="" ); //!< set full id //-- const String& element() const; //!< get element e.g. H, C, Zn2+ //-- const Coord_orth& coord_orth() const; //!< get orth coordinate //-- const ftype& occupancy() const; //!< get occupancy //-- const ftype& u_iso() const; //!< get isotropic U //-- const U_aniso_orth& u_aniso_orth() const; //!< get anisotropic U //-- void set_element( const String& s ); //!< set element //-- void set_coord_orth( const Coord_orth& s ); //!< set coord_orth //-- void set_occupancy( const ftype& s ); //!< set occupancy //-- void set_u_iso( const ftype& s ); //!< set u_iso //-- void set_u_aniso_orth( const U_aniso_orth& s ); //!< set u_aniso //-- void transform( const RTop_orth rt ); //!< apply transform to object const Atom& atom() const { return *this; } //!< explicitly get atom Atom& atom() { return *this; } //!< explicitly set atom //! configureable copy function MAtom& copy( const MAtom& other, const MM::COPY& mode ); static String id_tidy( const String& id ); //!< convert ID to std format static bool id_match( const String& id1, const String& id2, const MM::MODE& mode ); //!< convert ID to std format private: String id_; }; //! MiniMol monomer (e.g. residue) object /*! The MiniMol monomer object contains a list of clipper::MAtom. It has two properties: a sequence number and a type. The sequence number need not reflect the order in which the monomers are stored in a polymer. MResidue is an alias for MMonomer. In addition, it is a clipper::PropertyManager, which means you can add labelled properties of any type to the object. These may be simple strings, or complex objects such as maps, function objects, or whatever. The most commonly used properties are: - "CID" The original CID of this atom in an MMDB heirarchy. The id() is the unique key which identifies a monomer. */ class MMonomer : public PropertyManager { public: const String& id() const { return id_; } //!< get monomer ID void set_id( const String& s ); //!< set monomer ID const String& type() const { return type_; } //!< get monomer type void set_type( const String& s ); //!< set monomer type, e.g. LYS, VAL, G int seqnum() const { return id_.i(); } //!< get monomer seq number void set_seqnum( const int s, const String inscode="" ); //!< set full id // the following methods are similar for all levels of the hierarchy Atom_list atom_list() const; //!< return list of contained atoms void transform( const RTop_orth rt ); //!< apply transformation to object //! number of atoms in monomer int size() const { return children.size(); } //! get atom const MAtom& operator[] ( const int& i ) const { return children[i]; } //! set atom MAtom& operator[] ( const int& i ) { return children[i]; } //! get atom by id const MAtom& find( const String& n, const MM::MODE mode=MM::UNIQUE ) const; //! set atom by id MAtom& find( const String& n, const MM::MODE mode=MM::UNIQUE ); //! create selection MMonomer select( const String& sel, const MM::MODE mode=MM::UNIQUE ) const; //! get child indices matching a selection criteria std::vector select_index( const String& sel, const MM::MODE mode=MM::UNIQUE ) const; //! lookup atom by id int lookup( const String& str, const MM::MODE& mode ) const; void insert( const MAtom& add, int pos=-1 ); //!< add atom //! and operator friend MMonomer operator& ( const MMonomer& m1, const MMonomer& m2 ); //! or operator friend MMonomer operator| ( const MMonomer& m1, const MMonomer& m2 ); //! configureable copy function MMonomer& copy( const MMonomer& other, const MM::COPY& mode ); static String id_tidy( const String& id ); //!< convert ID to std format static bool id_match( const String& id1, const String& id2, const MM::MODE& mode ); //!< convert ID to std format //! Rotamer library type enum TYPE { Default, Dunbrack, Richardson }; //! UTILITY: Build carbonyl oxygen, give next residue in chain void protein_mainchain_build_carbonyl_oxygen( const MMonomer& next ); //! UTILITY: get number of rotamers for protein sidechain int protein_sidechain_number_of_rotamers( TYPE t = default_type_ ) const; int protein_sidechain_number_of_rotomers() const { return protein_sidechain_number_of_rotamers(); } //! UTILITY: build numbered rotamer for protein sidechain ftype protein_sidechain_build_rotamer( const int& n, TYPE t = default_type_ ); ftype protein_sidechain_build_rotomer( const int& n ) { return protein_sidechain_build_rotamer( n ); } //! UTILITY: test if two peptide are adjacent static bool protein_peptide_bond( const MMonomer& m1, const MMonomer& m2, ftype r = 1.5 ); //! UTILITY: return Ramachandran phi, or NaN if atoms missing static double protein_ramachandran_phi( const MMonomer& m1, const MMonomer& m2 ); //! UTILITY: return Ramachandran psi, or NaN if atoms missing static double protein_ramachandran_psi( const MMonomer& m1, const MMonomer& m2 ); static TYPE& default_type() { return default_type_; } private: typedef MAtom CHILDTYPE; std::vector children; String id_, type_; static TYPE default_type_; static int rotamer_find( String res, int rota, TYPE t ); }; //! MiniMol polymer (e.g. chain) object /*! The MiniMol polymer object has one property: an identifying name. It contains a list of clipper::MMonomer. In addition, it is a clipper::PropertyManager, which means you can add labelled properties of any type to the object. These may be simple strings, or complex objects such as maps, function objects, or whatever. The most commonly used properties are: - "CID" The original CID of this atom in an MMDB heirarchy. The id() is the unique key which identifies a polymer. */ class MPolymer : public PropertyManager { public: const String& id() const { return id_; } //!< get polymer ID void set_id( const String& s ); //!< set polymer ID // the following methods are similar for all levels of the hierarchy Atom_list atom_list() const; //!< return list of contained atoms void transform( const RTop_orth rt ); //!< apply transformation to object //! number of monomers in polymer int size() const { return children.size(); } //! get monomer const MMonomer& operator[] ( const int& i ) const { return children[i]; } //! set monomer MMonomer& operator[] ( const int& i ) { return children[i]; } //! get monomer by id const MMonomer& find( const String& n, const MM::MODE mode=MM::UNIQUE ) const; //! set monomer by id MMonomer& find( const String& n, const MM::MODE mode=MM::UNIQUE ); //! create selection MPolymer select( const String& sel, const MM::MODE mode=MM::UNIQUE ) const; //! get child indices matching a selection criteria std::vector select_index( const String& sel, const MM::MODE mode=MM::UNIQUE ) const; //! lookup monomer by id int lookup( const String& str, const MM::MODE& mode ) const; void insert( const MMonomer& add, int pos=-1 ); //!< add monomer //! and operator friend MPolymer operator& ( const MPolymer& m1, const MPolymer& m2 ); //! or operator friend MPolymer operator| ( const MPolymer& m1, const MPolymer& m2 ); //! configureable copy function MPolymer& copy( const MPolymer& other, const MM::COPY& mode ); static String id_tidy( const String& id ); //!< convert ID to std format static bool id_match( const String& id1, const String& id2, const MM::MODE& mode ); //!< convert ID to std format private: typedef MMonomer CHILDTYPE; std::vector children; String id_; }; //! MiniMol model object /*! The MiniMol model object constains a list of clipper::MPolymer. In addition, it is a clipper::PropertyManager, which means you can add labelled properties of any type to the object. These may be simple strings, or complex objects such as maps, function objects, or whatever. The most commonly used properties are: - "CID" The original CID of this atom in an MMDB heirarchy. */ class MModel : public PropertyManager { public: // the following methods are similar for all levels of the hierarchy Atom_list atom_list() const; //!< return list of contained atoms void transform( const RTop_orth rt ); //!< apply transformation to object //! number of polymers in model int size() const { return children.size(); } //! get polymer const MPolymer& operator[] ( const int& i ) const { return children[i]; } //! set polymer MPolymer& operator[] ( const int& i ) { return children[i]; } //! get polymer by id const MPolymer& find( const String& n, const MM::MODE mode=MM::UNIQUE ) const; //! set polymer by id MPolymer& find( const String& n, const MM::MODE mode=MM::UNIQUE ); //! create selection MModel select( const String& sel, const MM::MODE mode=MM::UNIQUE ) const; //! get child indices matching a selection criteria std::vector select_index( const String& sel, const MM::MODE mode=MM::UNIQUE ) const; //! lookup polymer by id int lookup( const String& str, const MM::MODE& mode ) const; void insert( const MPolymer& add, int pos=-1 ); //!< add polymer //! and operator friend MModel operator& ( const MModel& m1, const MModel& m2 ); //! or operator friend MModel operator| ( const MModel& m1, const MModel& m2 ); //! configureable copy function MModel& copy( const MModel& other, const MM::COPY& mode ); //! Return atom by MAtomIndex const MAtom& atom( const MAtomIndex& index ) const; //! Return atom by MAtomIndex MAtom& atom( const MAtomIndex& index ); //! Select and return MAtomIndex values std::vector select_atom_index( const String& sel, const MM::MODE mode=MM::UNIQUE ) const; private: typedef MPolymer CHILDTYPE; std::vector children; }; //! MiniMol lightweight coordinate model object /*! A MiniMol object is a model (clipper::MModel) embedded in a crystal frame, i.e. with additional spacegroup and cell information. The design of this object was inspired by and contributed to by Paul Emsley. */ class MiniMol : public MModel { public: enum MODE { UNIQUE, ANY }; //!< mode to use when matching IDs //! null constructor MiniMol(); //! constructor: from spacegroup and cell MiniMol( const Spacegroup& spacegroup, const Cell& cell ); //! initialiser: from spacegroup and cell void init( const Spacegroup& spacegroup, const Cell& cell ); //! get the cell const Cell& cell() const { return cell_; } //! get the spacegroup const Spacegroup& spacegroup() const { return spacegroup_; } const MModel& model() const { return *this; } //!< explicitly get model MModel& model() { return *this; } //!< explicitly set model //! Return symmetry atom by MAtomIndexSymmetry MAtom symmetry_atom( const MAtomIndexSymmetry& index ); bool is_null() const; //!< test for null model private: Spacegroup spacegroup_; Cell cell_; }; //! MResidue: an alternative name for an MMonomer typedef MMonomer MResidue; //! MChain: an alternative name for an MPolymer typedef MPolymer MChain; } // namespace clipper #endif clipper-2.1/clipper/minimol/Makefile.in0000644000374100011300000004622111372264333015105 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am, passed: clipper/minimol, extracted subdir: minimol # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper/minimol VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = clipper/minimol DIST_COMMON = $(library_include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ccp4.m4 \ $(top_srcdir)/config/clipper.m4 $(top_srcdir)/config/fftw.m4 \ $(top_srcdir)/config/gpp4.m4 $(top_srcdir)/config/mmdb.m4 \ $(top_srcdir)/config/utimbuf.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(library_includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libclipper_minimol_la_DEPENDENCIES = \ $(top_builddir)/clipper/mmdb/libclipper-mmdb.la \ $(top_builddir)/clipper/core/libclipper-core.la am_libclipper_minimol_la_OBJECTS = container_minimol.lo minimol.lo \ minimol_data.lo minimol_io.lo minimol_seq.lo minimol_utils.lo libclipper_minimol_la_OBJECTS = $(am_libclipper_minimol_la_OBJECTS) libclipper_minimol_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libclipper_minimol_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libclipper_minimol_la_SOURCES) DIST_SOURCES = $(libclipper_minimol_la_SOURCES) HEADERS = $(library_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AR = @AR@ AR_FLAGS = @AR_FLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCP4_CXXFLAGS = @CCP4_CXXFLAGS@ CCP4_LIBS = @CCP4_LIBS@ CFLAGS = @CFLAGS@ CLIPPER_CCP4_DIR = @CLIPPER_CCP4_DIR@ CLIPPER_CIF_DIR = @CLIPPER_CIF_DIR@ CLIPPER_CNS_DIR = @CLIPPER_CNS_DIR@ CLIPPER_CONTRIB_DIR = @CLIPPER_CONTRIB_DIR@ CLIPPER_LT_VERSION = @CLIPPER_LT_VERSION@ CLIPPER_MINIMOL_DIR = @CLIPPER_MINIMOL_DIR@ CLIPPER_MMDB_DIR = @CLIPPER_MMDB_DIR@ CLIPPER_PHS_DIR = @CLIPPER_PHS_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_CXXFLAGS = @FFTW_CXXFLAGS@ FFTW_LIBS = @FFTW_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMDB_CXXFLAGS = @MMDB_CXXFLAGS@ MMDB_LIBS = @MMDB_LIBS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = ${FFTW_CXXFLAGS} ${MMDB_CXXFLAGS} library_include_HEADERS = \ container_minimol.h \ minimol_data.h \ minimol.h \ minimol_io.h \ minimol_seq.h \ minimol_utils.h lib_LTLIBRARIES = libclipper-minimol.la libclipper_minimol_la_SOURCES = \ container_minimol.cpp \ minimol.cpp \ minimol_data.cpp \ minimol_io.cpp \ minimol_seq.cpp \ minimol_utils.cpp library_includedir = $(pkgincludedir)/minimol libclipper_minimol_la_LDFLAGS = -version-info @CLIPPER_LT_VERSION@ libclipper_minimol_la_LIBADD = \ $(top_builddir)/clipper/mmdb/libclipper-mmdb.la $(top_builddir)/clipper/core/libclipper-core.la all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu clipper/minimol/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu clipper/minimol/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): 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 \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ 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)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libclipper-minimol.la: $(libclipper_minimol_la_OBJECTS) $(libclipper_minimol_la_DEPENDENCIES) $(libclipper_minimol_la_LINK) -rpath $(libdir) $(libclipper_minimol_la_OBJECTS) $(libclipper_minimol_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/container_minimol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minimol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minimol_data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minimol_io.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minimol_seq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minimol_utils.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-library_includeHEADERS: $(library_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(library_includedir)" || $(MKDIR_P) "$(DESTDIR)$(library_includedir)" @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(library_includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \ done uninstall-library_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(library_includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(library_includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(library_includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-library_includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-library_includeHEADERS \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: clipper-2.1/clipper/minimol/container_minimol.cpp0000644000374100011300000000751710736662163017265 00000000000000/* container_minimol.cpp: atomic model types */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "container_minimol.h" namespace clipper { // CMiniMol /*! The object is constructed at the given location in the hierarchy. An attempt is made to initialise the object using information from its parents in the hierarchy. \param parent An object in the hierarchy (usually the parent of the new object). \param name The path from \c parent to the new object (usually just the name of the new object). */ CMiniMol::CMiniMol( Container& parent, const String name ) : Container( parent, name ) { init( NullSpacegroup, NullCell ); } /*! An attempt is made to initialise the object using information from the supplied parameters, or if they are Null, from its parents in the hierarchy. \param spacegroup The spacegroup for the model. \param name The cell for the model. */ void CMiniMol::init( const Spacegroup& spacegroup, const Cell& cell ) { // use supplied values by default const Spacegroup* sp = &spacegroup; // use pointers so we can reassign const Cell* cp = &cell; // otherwise get them from the tree if ( sp->is_null() ) sp = parent_of_type_ptr(); if ( cp->is_null() ) cp = parent_of_type_ptr(); // initialise if ( sp != NULL && cp != NULL ) if ( !sp->is_null() && !cp->is_null() ) MiniMol::init( *sp, *cp ); Container::update(); } /*! Hierarchical update. If this object is uninitialised, an attempt is made to initialise the object using information from its parents in the hierarchy. The childen of the object are then updated. */ void CMiniMol::update() { if ( CMiniMol::is_null() ) init( NullSpacegroup, NullCell ); else Container::update(); } } // namespace clipper clipper-2.1/clipper/minimol/minimol_io.cpp0000644000374100011300000003462511205471346015703 00000000000000/* minimol_io.cpp: atomic model types */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "minimol_io.h" #include #include extern "C" { #include } namespace clipper { // MMDBfile // local types for referencing between MMDB and minimol struct SAtom { mmdb::PCAtom db; const MAtom* mm; }; struct SMono { mmdb::PCResidue db; const MMonomer* mm; std::vector data; }; struct SPoly { mmdb::PCChain db; const MPolymer* mm; std::vector data; }; struct SModl { mmdb::PCModel db; const MModel* mm; std::vector data; }; /*! The file may be either a PDB or mmCIF file. If the spacegroup or cell are not set, they will be taken from the file, otherwise the existing values override the ones in the file. \param file The filename (or pathname) of the file to read. */ void MMDBfile::read_file( const String& file ) { int err = ReadCoorFile( (char *)file.c_str() ); if (err) Message::message( Message_fatal( "MMDBfile: read_file error: "+file+" : "+String(err) ) ); } /*! The output file type will be the same as the file read, otherwise PDB. \param file The filename (or pathname) of the file to write. \param type 0=PDB, 1=CIF, 2=binary, default=same as input file, or PDB. */ void MMDBfile::write_file( const String& file, TYPE type ) { const TYPE types[3] = { PDB, CIF, Binary }; int rtype = GetFileType(); if ( type == Default && rtype >= 0 && rtype <= 2 ) type = types[ rtype ]; int err; switch ( type ) { case Binary: err = WriteMMDBF( (char *)file.c_str() ); break; case CIF: err = WriteCIFASCII( (char *)file.c_str() ); break; case PDB: default: err = WritePDBASCII( (char *)file.c_str() ); break; } if (err) Message::message( Message_fatal( "MMDBfile: write_file error: "+file+" : "+String(err) ) ); } /*! Import data from the MMDB hierarchy into a MiniMol object. All the atoms, residues and chains are imported unless a selection handle is supplied, in which case only the selected atoms and their containers are imported. Each data is tagged with an optional Property (see clipper::PropertyManager), called "CID", which describes the position in the MMDB hierarchy from which it was taken. This may (optionally) be used later to put a modified element back into the hierarchy. Any atoms which have alternate conformation codes will also be given an "AltConf" Property. For more details, see clipper::PropertyManager::exists_property(), clipper::PropertyManager::get_property(). \param minimol The minimol to import. \param hnd (optional) MMDB selection handle. */ void MMDBfile::import_minimol( MiniMol& minimol, const int hnd ) { // clear the model minimol = MiniMol( spacegroup(), cell() ); // make atom, residue, chain selections int h_atm = NewSelection(); int h_res = NewSelection(); int h_chn = NewSelection(); int h_mod = NewSelection(); if ( hnd < 0 ) { SelectAtoms( h_atm, 0, 0, SKEY_NEW ); } else { Select( h_atm, STYPE_ATOM, hnd, SKEY_NEW ); } Select( h_res, STYPE_RESIDUE, h_atm, SKEY_NEW ); Select( h_chn, STYPE_CHAIN, h_atm, SKEY_NEW ); Select( h_mod, STYPE_MODEL, h_atm, SKEY_NEW ); // now import objects char txt[256]; MModel& mol = minimol.model(); mmdb::PCModel p_mod = GetModel(1); if ( p_mod != NULL ) { for ( int c = 0; c < p_mod->GetNumberOfChains(); c++ ) { mmdb::PCChain p_chn = p_mod->GetChain(c); if ( p_chn != NULL ) if ( p_chn->isInSelection( h_chn ) ) { // import the chain MPolymer pol; for ( int r = 0; r < p_chn->GetNumberOfResidues(); r++ ) { mmdb::PCResidue p_res = p_chn->GetResidue(r); if ( p_chn != NULL ) if ( p_res->isInSelection( h_res ) ) { // import the residue MMonomer mon; for ( int a = 0; a < p_res->GetNumberOfAtoms(); a++ ) { mmdb::PCAtom p_atm = p_res->GetAtom(a); if ( p_atm != NULL ) if ( p_atm->isInSelection( h_atm ) ) if ( !p_atm->Ter ) { // import the atom MAtom atm( Atom::null() ); atm.set_name( p_atm->GetAtomName(), p_atm->altLoc ); atm.set_element( p_atm->element ); if ( p_atm->WhatIsSet & ASET_Coordinates ) atm.set_coord_orth( Coord_orth( p_atm->x, p_atm->y, p_atm->z ) ); if ( p_atm->WhatIsSet & ASET_Occupancy ) atm.set_occupancy( p_atm->occupancy ); if ( p_atm->WhatIsSet & ASET_tempFactor ) atm.set_u_iso( Util::b2u( p_atm->tempFactor ) ); if ( p_atm->WhatIsSet & ASET_Anis_tFac ) atm.set_u_aniso_orth( U_aniso_orth( p_atm->u11, p_atm->u22, p_atm->u33, p_atm->u12, p_atm->u13, p_atm->u23 ) ); p_atm->GetAtomID( txt ); atm.set_property("CID",Property(String(txt))); if ( p_atm->altLoc[0] != '\0' ) atm.set_property("AltConf", Property(String(p_atm->altLoc))); mon.insert( atm ); // store the atom } } mon.set_seqnum( p_res->GetSeqNum(), String(p_res->GetInsCode()) ); mon.set_type( p_res->GetResName() ); p_res->GetResidueID( txt ); mon.set_property("CID",Property(String(txt))); pol.insert( mon ); // store the residue } } pol.set_id( p_chn->GetChainID() ); p_chn->GetChainID( txt ); pol.set_property("CID",Property(String(txt))); mol.insert( pol ); // store the chain } } p_mod->GetModelID( txt ); mol.set_property("CID",Property(String(txt))); } // clean up DeleteSelection( h_atm ); DeleteSelection( h_res ); DeleteSelection( h_chn ); DeleteSelection( h_mod ); } /*! Export data to the MMDB hierarchy from a MiniMol object. All the atoms, residues and chains are exported. If any MiniMol object has a "CID" Property (see clipper::PropertyManager), then the information from that object will be used to update the corresponding object in the MMDB hierarchy, if it exists. If there is no such entry in the MMDB hierarchy, or if no "CID" Property exists, then a new object will be created in the MMDB hierarchy. */ void MMDBfile::export_minimol( const MiniMol& minimol ) { // export spacegroup/cell if ( !minimol.spacegroup().is_null() ) set_spacegroup( minimol.spacegroup() ); if ( !minimol.cell().is_null() ) set_cell( minimol.cell() ); // create structure for relationships between Minimol and MMDB SModl smod; clipper::String cid; // fill structure smod.mm = &(minimol.model()); smod.db = NULL; smod.data.resize( smod.mm->size() ); for ( int p = 0; p < smod.data.size(); p++ ) { // loop over chains SPoly& spol = smod.data[p]; spol.mm = &((*smod.mm)[p]); spol.db = NULL; spol.data.resize( spol.mm->size() ); for ( int r = 0; r < spol.data.size(); r++ ) { // loop over residues SMono& smon = spol.data[r]; smon.mm = &((*spol.mm)[r]); smon.db = NULL; smon.data.resize( smon.mm->size() ); for ( int a = 0; a < smon.data.size(); a++ ) { // loop over atoms SAtom& satm = smon.data[a]; satm.mm = &((*smon.mm)[a]); satm.db = NULL; } } } // make the MMDB references by CID if present if ( smod.mm->exists_property("CID") ) { cid = dynamic_cast&>( smod.mm->get_property("CID") ).value() + "/A/0/A"; smod.db = GetModel( (char*)cid.c_str() ); } if ( smod.db != NULL ) for ( int p = 0; p < smod.data.size(); p++ ) { // loop over chains SPoly& spol = smod.data[p]; if ( spol.mm->exists_property("CID") ) { cid = dynamic_cast&>( spol.mm->get_property("CID") ).value() + "/0/A"; spol.db = GetChain( (char*)cid.c_str() ); } if ( spol.db != NULL ) for ( int r = 0; r < spol.data.size(); r++ ) { // loop over residues SMono& smon = spol.data[r]; if ( smon.mm->exists_property("CID") ) { cid = dynamic_cast&>( smon.mm->get_property("CID") ).value() + "/A"; smon.db = GetResidue( (char*)cid.c_str() ); } if ( smon.db != NULL ) for ( int a = 0; a < smon.data.size(); a++ ) { // loop over atoms SAtom& satm = smon.data[a]; if ( satm.mm->exists_property("CID") ) { cid = dynamic_cast&>( satm.mm->get_property("CID") ).value(); satm.db = GetAtom( (char*)cid.c_str() ); } } } } // Now create MMDB objects for anything which is missing if ( smod.db == NULL ) { smod.db = new CModel(); AddModel( smod.db ); } for ( int p = 0; p < smod.data.size(); p++ ) { // loop over chains SPoly& spol = smod.data[p]; if ( spol.db == NULL ) { spol.db = new CChain(); smod.db->AddChain( spol.db ); } for ( int r = 0; r < spol.data.size(); r++ ) { // loop over residues SMono& smon = spol.data[r]; if ( smon.db == NULL ) { smon.db = new CResidue(); spol.db->AddResidue( smon.db ); } for ( int a = 0; a < smon.data.size(); a++ ) { // loop over atoms SAtom& satm = smon.data[a]; if ( satm.db == NULL ) { satm.db = new CAtom(); smon.db->AddAtom( satm.db ); } } } } // now fill in information in mmdb from MiniMol for ( int p = 0; p < smod.data.size(); p++ ) { // loop over chains SPoly& spol = smod.data[p]; spol.db->SetChainID( (char*)spol.mm->id().substr(0,9).c_str() ); // set id for ( int r = 0; r < spol.data.size(); r++ ) { // loop over residues SMono& smon = spol.data[r]; smon.db->seqNum = smon.mm->seqnum(); // set residue info smon.db->SetResName( (char*)smon.mm->type().substr(0,19).c_str() ); int pos = smon.mm->id().find( ":" ); if ( pos != String::npos ) strcpy( smon.db->insCode, smon.mm->id().substr(pos+1,9).c_str() ); for ( int a = 0; a < smon.data.size(); a++ ) { // loop over atoms SAtom& satm = smon.data[a]; if ( !satm.mm->coord_orth().is_null() ) { // set atom coord satm.db->x = satm.mm->coord_orth().x(); satm.db->y = satm.mm->coord_orth().y(); satm.db->z = satm.mm->coord_orth().z(); satm.db->WhatIsSet |= ASET_Coordinates; } if ( !Util::is_nan( satm.mm->occupancy() ) ) { // set atom occ satm.db->occupancy = satm.mm->occupancy(); satm.db->WhatIsSet |= ASET_Occupancy; } if ( !Util::is_nan( satm.mm->u_iso() ) ) { // set atom u_iso satm.db->tempFactor = Util::u2b( satm.mm->u_iso() ); satm.db->WhatIsSet |= ASET_tempFactor; } if ( !satm.mm->u_aniso_orth().is_null() ) { // set atom u_aniso satm.db->u11 = satm.mm->u_aniso_orth()(0,0); satm.db->u22 = satm.mm->u_aniso_orth()(1,1); satm.db->u33 = satm.mm->u_aniso_orth()(2,2); satm.db->u12 = satm.mm->u_aniso_orth()(0,1); satm.db->u13 = satm.mm->u_aniso_orth()(0,2); satm.db->u23 = satm.mm->u_aniso_orth()(1,2); satm.db->WhatIsSet |= ASET_Anis_tFac; } if ( satm.mm->id() != "" ) // atom id satm.db->SetAtomName( (char*)satm.mm->id().substr(0,19).c_str() ); if ( satm.mm->element() != "" ) // atom element satm.db->SetElementName( (char*)satm.mm->element().substr(0,19).c_str() ); if ( satm.mm->exists_property("AltConf") ) { // alt conf code String a = dynamic_cast&>( satm.mm->get_property("AltConf") ).value(); if ( a != "" ) strcpy( satm.db->altLoc, a.substr(0,19).c_str() ); } } } } FinishStructEdit(); } void SEQfile::read_file( const String& file ) { std::ifstream seqfile( file.c_str() ); std::ostringstream s; s << seqfile.rdbuf(); contents = s.str(); //non-portable to old Sun //contents = std::string(std::istreambuf_iterator(seqfile), // std::istreambuf_iterator()); } void SEQfile::import_polymer_sequence( MPolymerSequence& target ) { MMoleculeSequence mms; import_molecule_sequence( mms ); target = mms[0]; } void SEQfile::import_molecule_sequence( MMoleculeSequence& target ) { std::vector lines = contents.split("\n"); clipper::String id, seq = ""; for ( int l = 0; l < lines.size(); l++ ) { clipper::String line = lines[l].trim(); if ( line[0] == '>' ) { if ( seq != "" ) { MPolymerSequence s; s.set_id( id ); s.set_sequence( seq ); target.insert( s ); } id = line.substr(1); id = id.trim(); seq = ""; } else if ( isalpha(line[0]) ) { for ( int i = 0; i < line.length(); i++ ) if ( isalpha(line[i]) ) seq += toupper(line[i]); } } if ( seq != "" ) { MPolymerSequence s; s.set_id( id ); s.set_sequence( seq ); target.insert( s ); } } } // namespace clipper clipper-2.1/clipper/minimol/container_minimol.h0000644000374100011300000000552710736662163016731 00000000000000/*! \file container_minimol.h Header file for atomic model types */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_CONTAINER_MINIMOL #define CLIPPER_CONTAINER_MINIMOL #include "../core/container_types.h" #include "minimol.h" namespace clipper { //! MiniMol container /*! See clipper::MiniMol for method descriptions. */ class CMiniMol : public Container, public MiniMol { public: //! null constructor CMiniMol() {} //! constructor: inherit spacegroup, cell CMiniMol( Container& parent, const String name = "" ); //! initialiser: supply or inherit spacegroup, cell void init( const Spacegroup& spacegroup, const Cell& cell ); //! hierarchical update void update(); }; } // namespace clipper #endif clipper-2.1/clipper/phs/0000777000374100011300000000000011372264353012247 500000000000000clipper-2.1/clipper/phs/phs_io.h0000644000374100011300000000775110736662163013633 00000000000000/*! \file lib/phs_io.h Header file for reflection data phs importer */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_PHS_IO #define CLIPPER_PHS_IO #include "../core/hkl_datatypes.h" namespace clipper { //! PHS import/export parent class for clipper objects /*! This is the import/export class which can be linked to an phs file and be used to transfer data into or out of a Clipper data structure. */ class PHSfile { public: //! Constructor: does nothing PHSfile(); //! Destructor: close any file that was left open ~PHSfile(); //! Open a file for read access void open_read( const String filename_in ); //! Close a file after reading void close_read(); //! Open a file for write access void open_write( const String filename_out ); //! Close a file after writing void close_write(); //! get file resolution Resolution resolution( const Cell& cell ) const; //! read the reflection list from the PHS file void import_hkl_info( HKL_info& target ); //! mark a hkl_data for import from PHS file void import_hkl_data( HKL_data_base& cdata ); //! write the reflection list to the PHS file void export_hkl_info( const HKL_info& target ); //! mark a hkl_data for export to PHS file void export_hkl_data( const HKL_data_base& cdata ); private: enum PHSmode { NONE, READ, WRITE }; PHSmode mode; //!< file mode String filename; //!< input/output file HKL_data_base* f_sigf_i; //!< input HKL_data object HKL_data_base* phi_wt_i; //!< input HKL_data object const HKL_data_base* f_sigf_o; //!< output HKL_data object const HKL_data_base* phi_wt_o; //!< output HKL_data object //! object which supplies the hkl list (write mode only) const HKL_info* hkl_ptr; }; } // namespace clipper #endif clipper-2.1/clipper/phs/Makefile.am0000644000374100011300000000077411372264321014222 00000000000000# Makefile.am, passed: clipper/phs, extracted subdir: phs # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper/phs ## -*- mode: Makefile; mode: font-lock -*- INCLUDES=${FFTW_CXXFLAGS} library_include_HEADERS = \ phs_io.h lib_LTLIBRARIES = libclipper-phs.la libclipper_phs_la_SOURCES = \ phs_io.cpp library_includedir = $(pkgincludedir)/phs libclipper_phs_la_LDFLAGS = -version-info @CLIPPER_LT_VERSION@ libclipper_phs_la_LIBADD = \ $(top_builddir)/clipper/core/libclipper-core.la clipper-2.1/clipper/phs/Makefile.in0000644000374100011300000004433311372264333014235 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am, passed: clipper/phs, extracted subdir: phs # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper/phs VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = clipper/phs DIST_COMMON = $(library_include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ccp4.m4 \ $(top_srcdir)/config/clipper.m4 $(top_srcdir)/config/fftw.m4 \ $(top_srcdir)/config/gpp4.m4 $(top_srcdir)/config/mmdb.m4 \ $(top_srcdir)/config/utimbuf.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(library_includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libclipper_phs_la_DEPENDENCIES = \ $(top_builddir)/clipper/core/libclipper-core.la am_libclipper_phs_la_OBJECTS = phs_io.lo libclipper_phs_la_OBJECTS = $(am_libclipper_phs_la_OBJECTS) libclipper_phs_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libclipper_phs_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libclipper_phs_la_SOURCES) DIST_SOURCES = $(libclipper_phs_la_SOURCES) HEADERS = $(library_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AR = @AR@ AR_FLAGS = @AR_FLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCP4_CXXFLAGS = @CCP4_CXXFLAGS@ CCP4_LIBS = @CCP4_LIBS@ CFLAGS = @CFLAGS@ CLIPPER_CCP4_DIR = @CLIPPER_CCP4_DIR@ CLIPPER_CIF_DIR = @CLIPPER_CIF_DIR@ CLIPPER_CNS_DIR = @CLIPPER_CNS_DIR@ CLIPPER_CONTRIB_DIR = @CLIPPER_CONTRIB_DIR@ CLIPPER_LT_VERSION = @CLIPPER_LT_VERSION@ CLIPPER_MINIMOL_DIR = @CLIPPER_MINIMOL_DIR@ CLIPPER_MMDB_DIR = @CLIPPER_MMDB_DIR@ CLIPPER_PHS_DIR = @CLIPPER_PHS_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_CXXFLAGS = @FFTW_CXXFLAGS@ FFTW_LIBS = @FFTW_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMDB_CXXFLAGS = @MMDB_CXXFLAGS@ MMDB_LIBS = @MMDB_LIBS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = ${FFTW_CXXFLAGS} library_include_HEADERS = \ phs_io.h lib_LTLIBRARIES = libclipper-phs.la libclipper_phs_la_SOURCES = \ phs_io.cpp library_includedir = $(pkgincludedir)/phs libclipper_phs_la_LDFLAGS = -version-info @CLIPPER_LT_VERSION@ libclipper_phs_la_LIBADD = \ $(top_builddir)/clipper/core/libclipper-core.la all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu clipper/phs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu clipper/phs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): 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 \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ 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)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libclipper-phs.la: $(libclipper_phs_la_OBJECTS) $(libclipper_phs_la_DEPENDENCIES) $(libclipper_phs_la_LINK) -rpath $(libdir) $(libclipper_phs_la_OBJECTS) $(libclipper_phs_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/phs_io.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-library_includeHEADERS: $(library_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(library_includedir)" || $(MKDIR_P) "$(DESTDIR)$(library_includedir)" @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(library_includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \ done uninstall-library_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(library_includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(library_includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(library_includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-library_includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-library_includeHEADERS \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: clipper-2.1/clipper/phs/phs_io.cpp0000644000374100011300000002467610736662163014173 00000000000000/* phs_io.cpp: class file for reflection data phs importer */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "phs_io.h" extern "C" { #include } namespace clipper { /*! Constructing an PHSfile does nothing except flag the object as not attached to any file for either input or output */ PHSfile::PHSfile() { mode = NONE; } /*! Close any files which were left open. This is particularly important since to access the PHS file efficiently, data reads and writes are deferred until the file is closed. */ PHSfile::~PHSfile() { switch ( mode ) { case READ: close_read(); break; case WRITE: close_write(); break; case NONE: break; } } /*! The file is opened for reading. This PHSfile object will remain attached to this file until it is closed. Until that occurs, no other file may be opened with this object, however another PHSfile object could be used to access another file. \param filename_in The input filename or pathname. */ void PHSfile::open_read( const String filename_in ) { if ( mode != NONE ) Message::message( Message_fatal( "PHSfile: open_read - File already open" ) ); // open the phs f_sigf_i = NULL; phi_wt_i = NULL; filename = filename_in; FILE* phs = fopen( filename.c_str(), "r" ); if ( phs == NULL ) Message::message( Message_fatal( "PHSfile: open_read - Could not read: "+filename ) ); fclose( phs ); mode = READ; } /*! Close the file after reading. This command also actually fills in the data in any HKL_data structures which have been marked for import. */ void PHSfile::close_read() { if ( mode != READ ) Message::message( Message_fatal( "PHSfile: no file open for read" ) ); // make sure the data list is sized if ( f_sigf_i != NULL ) f_sigf_i->update(); if ( phi_wt_i != NULL ) phi_wt_i->update(); int h, k, l; HKL hkl; xtype x1[2], x2[2]; float f1, f2, f3, f4; char line[240]; FILE* phs = fopen( filename.c_str(), "r" ); if ( phs == NULL ) Message::message( Message_fatal( "PHSfile: import_hkl_data - Could not read: "+filename ) ); // read the data from the PHS while ( fgets( line, 240, phs ) != NULL ) { f1 = f2 = f3 = f4 = 0.0; // default sigf to 0 in case missing sscanf( line, " %i %i %i %f %f %f %f", &h, &k, &l, &f1, &f2, &f3, &f4 ); hkl = HKL( h, k, l ); x1[0] = xtype(f1); x1[1] = xtype(f4); x2[0] = xtype(Util::d2rad(ftype(f3))); x2[1] = xtype(f2); if ( f_sigf_i != NULL ) f_sigf_i->data_import( hkl, x1 ); if ( phi_wt_i != NULL ) phi_wt_i->data_import( hkl, x2 ); } fclose( phs ); mode = NONE; } /*! The file is opened for writing. This will be a new file, created entirely from data from within the program, rather than by extending an existing file. Similar restrictions apply as for open_read(). \param filename_out The output filename or pathname. */ void PHSfile::open_write( const String filename_out ) { if ( mode != NONE ) Message::message( Message_fatal( "PHSfile: open_write - File already open" ) ); // open the output phs hkl_ptr = NULL; f_sigf_o = NULL; phi_wt_o = NULL; filename = filename_out; FILE* phs = fopen( filename.c_str(), "w" ); if ( phs == NULL ) Message::message( Message_fatal( "PHSfile: open_write - Could not write: "+filename ) ); fclose( phs ); mode = WRITE; } /*! Close the file after writing. This command also actually writes the data reflection list from the HKL_info object and the data from any HKL_data objects which have been marked for import. */ void PHSfile::close_write() { if ( mode != WRITE ) Message::message( Message_fatal( "PHSfile: close_write - no file open for write" ) ); // export the marked list data to an phs file if ( hkl_ptr == NULL ) Message::message( Message_fatal( "PHSfile: close_write - no refln list exported" ) ); const HKL_info& hklinf = *hkl_ptr; HKL hkl; xtype x1[2], x2[2]; float f1, f2, f3, f4; f1 = f2 = f3 = f4 = 0.0; FILE* phs = fopen( filename.c_str(), "w" ); if ( phs == NULL ) Message::message( Message_fatal( "PHSfile: close_write - Could not write: "+filename ) ); HKL_info::HKL_reference_index ih; for ( ih = hklinf.first(); !ih.last(); ih.next() ) { hkl = ih.hkl(); if ( f_sigf_o != NULL ) f_sigf_o->data_export( hkl, x1 ); if ( phi_wt_o != NULL ) phi_wt_o->data_export( hkl, x2 ); f1 = float(x1[0]); f4 = float(x1[1]); f3 = float(Util::rad2d(ftype(x2[0]))); f2 = float(x2[1]); fprintf( phs, "%6i %6i %6i %11.3f %11.3f %11.3f %11.3f\n", hkl.h(), hkl.k(), hkl.l(), f1, f2, f3, f4 ); } fclose( phs ); mode = NONE; } /*! Get the resolution limit from the PHS file. Since a PHS file does not contain cell information, a Cell object must be supplied, which will be used to determine the resultion. The result is the resolution determined by the most extreme reflection in the file. \return The resolution. */ Resolution PHSfile::resolution( const Cell& cell ) const { if ( mode != READ ) Message::message( Message_fatal( "PHSfile: resolution - no file open for read" ) ); HKL hkl; int h, k, l; char line[240]; FILE* phs = fopen( filename.c_str(), "r" ); if ( phs == NULL ) Message::message( Message_fatal( "PHSfile: resolution - Could not read: "+filename ) ); // read the reflections from the phs ftype slim = 0.0; while ( fgets( line, 240, phs ) != NULL ) { sscanf( line, " %i %i %i", &h, &k, &l ); hkl = HKL( h, k, l ); slim = Util::max( slim, hkl.invresolsq(cell) ); } fclose( phs ); return Resolution( 1.0/sqrt(slim) ); } /*! Import the list of reflection HKLs from an PHS file into an HKL_info object. If the resolution limit of the HKL_info object is lower than the limit of the file, any excess reflections will be rejected, as will any systematic absences or duplicates. \param target The HKL_info object to be initialised. */ void PHSfile::import_hkl_info( HKL_info& target ) { if ( mode != READ ) Message::message( Message_fatal( "PHSfile: import_hkl_info - no file open for read" ) ); std::vector hkls; HKL hkl; int h, k, l; char line[240]; FILE* phs = fopen( filename.c_str(), "r" ); if ( phs == NULL ) Message::message( Message_fatal( "PHSfile: import_hkl_info - Could not read: "+filename ) ); // read the reflections from the phs ftype slim = target.resolution().invresolsq_limit(); while ( fgets( line, 240, phs ) != NULL ) { sscanf( line, " %i %i %i", &h, &k, &l ); hkl = HKL( h, k, l ); if ( hkl.invresolsq(target.cell()) < slim ) hkls.push_back( hkl ); } fclose( phs ); target.add_hkl_list( hkls ); } /*! Import data from an PHS file into an HKL_data object. This routine does not actually read any data, but rather marks the data to be read when the file is closed. The data to be read (F_sigF or Phi_fom) will be selected based on the type of the HKL_data object. \param cdata The HKL_data object into which data is to be imported. */ void PHSfile::import_hkl_data( HKL_data_base& cdata ) { if ( mode != READ ) Message::message( Message_fatal( "PHSfile: import_hkl_data - no file open for read" ) ); if ( cdata.type() == data32::F_sigF::type() ) f_sigf_i = &cdata; else if ( cdata.type() == data32::Phi_fom::type() ) phi_wt_i = &cdata; else Message::message( Message_fatal( "PHSfile: import_hkl_data - data must be F_sigF or Phi_fom" ) ); } /*! Export the list of reflection HKLs to an PHS file from an HKL_info object. */ void PHSfile::export_hkl_info( const HKL_info& target ) { if ( mode != WRITE ) Message::message( Message_fatal( "PHSfile: export_hkl_info - no file open for write" ) ); hkl_ptr = ⌖ } /*! Export data from an HKL_data object into an PHS file. This routine does not actually write any data, but rather marks the data to be written when the file is closed. The data to be read (F_sigF or Phi_fom) will be selected based on the type of the HKL_data object. \param cdata The HKL_data object from which data is to be exported. */ void PHSfile::export_hkl_data( const HKL_data_base& cdata ) { if ( mode != WRITE ) Message::message( Message_fatal( "PHSfile: export_hkl_data - no file open for write" ) ); if ( cdata.type() == data32::F_sigF::type() ) f_sigf_o = &cdata; else if ( cdata.type() == data32::Phi_fom::type() ) phi_wt_o = &cdata; else Message::message( Message_fatal( "PHSfile: export_hkl_data - data must be F_sigF or Phi_fom" ) ); } } // namespace clipper clipper-2.1/clipper/clipper-phs.h0000644000374100011300000000022110736662163013767 00000000000000/* Clipper header file */ /* (C) 2000-2002 Kevin Cowtan */ #ifndef CLIPPER_PHS_H #define CLIPPER_PHS_H #include "clipper/phs/phs_io.h" #endif clipper-2.1/clipper/minimal-clipper-hkl.h0000644000374100011300000000046710736662163015413 00000000000000/* Clipper header file */ /* (C) 2000-2002 Kevin Cowtan */ #ifndef CLIPPER_CORE_H #define CLIPPER_CORE_H #include "clipper/core/container_hkl.h" #include "clipper/core/rotation.h" #include "clipper/core/hkl_compute.h" #include "clipper/core/hkl_operators.h" #include "clipper/core/resol_targetfn.h" #endif clipper-2.1/clipper/cif/0000777000374100011300000000000011372264353012216 500000000000000clipper-2.1/clipper/cif/Makefile.am0000644000374100011300000000105311372264321014160 00000000000000# Makefile.am, passed: clipper/cif, extracted subdir: cif # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper/cif ## -*- mode: Makefile; mode: font-lock -*- INCLUDES=${FFTW_CXXFLAGS} ${MMDB_CXXFLAGS} library_include_HEADERS = \ cif_data_io.h lib_LTLIBRARIES = libclipper-cif.la libclipper_cif_la_SOURCES = \ cif_data_io.cpp library_includedir = $(pkgincludedir)/cif libclipper_cif_la_LDFLAGS = -version-info @CLIPPER_LT_VERSION@ libclipper_cif_la_LIBADD = \ $(top_builddir)/clipper/core/libclipper-core.la \ $(MMDB_LIBS) clipper-2.1/clipper/cif/cif_data_io.h0000644000374100011300000001113511204767172014526 00000000000000/*! \file cif/cif_data_io.h Header file for reflection data cif importer */ //c Copyright (C) 2000-2006 Paul Emsley, Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_CIF_IO #define CLIPPER_CIF_IO #include "../core/hkl_datatypes.h" namespace clipper { //! CIF import/export parent class for clipper objects /*! This is the import class which can be linked to an cif data file and be used to transfer data into a Clipper data structure. It is currently a read-only class. */ class CIFfile { public: //! Constructor: does nothing CIFfile(); //! Destructor: close any file that was left open ~CIFfile(); //! Open a file for read access void open_read( const String filename_in ); //! Close a file after reading void close_read(); //! get file spacegroup const Spacegroup& spacegroup() const; //! get file cell const Cell& cell() const; //! get file resolution const Resolution& resolution() const; //! get file HKL sampling const HKL_sampling& hkl_sampling() const; //! get file resolution Resolution resolution( const Cell& cell ) const; //! read the reflection list from the PHS file void import_hkl_info( HKL_info& target ); //! mark a hkl_data for import from PHS file void import_hkl_data( HKL_data_base& cdata ); //! contains phases predicate bool contains_phases_p() const; private: enum CIFmode { NONE, READ}; CIFmode mode; //!< file mode String filename; //!< input/output file HKL_data_base* f_sigf_i; //!< input HKL_data object HKL_data_base* f_phi_i; //!< input HKL_data object (calc sfs) const HKL_data_base* f_sigf_o; //!< output HKL_data object const HKL_data_base* phi_wt_o; //!< output HKL_data object //! object which supplies the hkl list (write mode only) const HKL_info* hkl_ptr; Spacegroup space_group; Cell cell_; Resolution resolution_; HKL_sampling hkl_sampling_; int set_cell_symm_reso(std::string cif_file_name); int set_cell_symm_reso_by_cif(std::string cif_file_name); int set_cell_symm_reso_by_kludge(std::string cif_file_name); // internal variables, due to the strange and variable nature of // mmCIF files, sometime these things are in the file, sometimes // not... // short int clipper_cell_set_flag; short int clipper_reso_set_flag; short int clipper_symm_set_flag; }; } // namespace clipper #endif // CLIPPER_CIF_IO clipper-2.1/clipper/cif/Makefile.in0000644000374100011300000004450211372264332014201 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am, passed: clipper/cif, extracted subdir: cif # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper/cif VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = clipper/cif DIST_COMMON = $(library_include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ccp4.m4 \ $(top_srcdir)/config/clipper.m4 $(top_srcdir)/config/fftw.m4 \ $(top_srcdir)/config/gpp4.m4 $(top_srcdir)/config/mmdb.m4 \ $(top_srcdir)/config/utimbuf.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(library_includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libclipper_cif_la_DEPENDENCIES = \ $(top_builddir)/clipper/core/libclipper-core.la \ $(am__DEPENDENCIES_1) am_libclipper_cif_la_OBJECTS = cif_data_io.lo libclipper_cif_la_OBJECTS = $(am_libclipper_cif_la_OBJECTS) libclipper_cif_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libclipper_cif_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libclipper_cif_la_SOURCES) DIST_SOURCES = $(libclipper_cif_la_SOURCES) HEADERS = $(library_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AR = @AR@ AR_FLAGS = @AR_FLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCP4_CXXFLAGS = @CCP4_CXXFLAGS@ CCP4_LIBS = @CCP4_LIBS@ CFLAGS = @CFLAGS@ CLIPPER_CCP4_DIR = @CLIPPER_CCP4_DIR@ CLIPPER_CIF_DIR = @CLIPPER_CIF_DIR@ CLIPPER_CNS_DIR = @CLIPPER_CNS_DIR@ CLIPPER_CONTRIB_DIR = @CLIPPER_CONTRIB_DIR@ CLIPPER_LT_VERSION = @CLIPPER_LT_VERSION@ CLIPPER_MINIMOL_DIR = @CLIPPER_MINIMOL_DIR@ CLIPPER_MMDB_DIR = @CLIPPER_MMDB_DIR@ CLIPPER_PHS_DIR = @CLIPPER_PHS_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_CXXFLAGS = @FFTW_CXXFLAGS@ FFTW_LIBS = @FFTW_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMDB_CXXFLAGS = @MMDB_CXXFLAGS@ MMDB_LIBS = @MMDB_LIBS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = ${FFTW_CXXFLAGS} ${MMDB_CXXFLAGS} library_include_HEADERS = \ cif_data_io.h lib_LTLIBRARIES = libclipper-cif.la libclipper_cif_la_SOURCES = \ cif_data_io.cpp library_includedir = $(pkgincludedir)/cif libclipper_cif_la_LDFLAGS = -version-info @CLIPPER_LT_VERSION@ libclipper_cif_la_LIBADD = \ $(top_builddir)/clipper/core/libclipper-core.la \ $(MMDB_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu clipper/cif/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu clipper/cif/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): 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 \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ 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)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libclipper-cif.la: $(libclipper_cif_la_OBJECTS) $(libclipper_cif_la_DEPENDENCIES) $(libclipper_cif_la_LINK) -rpath $(libdir) $(libclipper_cif_la_OBJECTS) $(libclipper_cif_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cif_data_io.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-library_includeHEADERS: $(library_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(library_includedir)" || $(MKDIR_P) "$(DESTDIR)$(library_includedir)" @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(library_includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \ done uninstall-library_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(library_includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(library_includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(library_includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-library_includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-library_includeHEADERS \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: clipper-2.1/clipper/cif/cif_data_io.cpp0000644000374100011300000006107011204770746015065 00000000000000 /* cif_io.cpp: class file for reflection data cif importer */ //c Copyright (C) 2000-2006 Paul Emsley, Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "cif_data_io.h" extern "C" { #include #include #include } #include #include #ifndef __MMDB_MMCIF__ #include #endif namespace clipper { /*! Constructing an CIFfile does nothing except flag the object as not attached to any file for either input or output */ CIFfile::CIFfile() { mode = NONE; // Argh, bug. It's things like this that make me dislike object // oriented programming - "Magic happens behind your back". The // problem was that we were trying to import into f_phi_i in // close_read() when f_phi_i had not been initialised by calling // import_hkl_data for it (because it comes from a function that // will calculate the phases from the model itself). So what do we // do? We will set flags in the CIFfile object that mean that the // HKL_data is not to be read into. That value is null. When we // call import_hkl_data, those values get modified to be pointers // to HKL_data. We will add tests for non-nullness to close_read // before we import into those HKL_data. f_sigf_i = NULL; f_phi_i = NULL; // set these when we find them.... clipper_cell_set_flag = 0; clipper_reso_set_flag = 0; clipper_symm_set_flag = 0; } /*! Close any files which were left open. This is particularly important since to access the CIF file efficiently, data reads and writes are deferred until the file is closed. */ CIFfile::~CIFfile() { switch ( mode ) { case READ: close_read(); break; // case WRITE: // close_write(); break; case NONE: break; } } /*! The file is opened for reading. This CIFfile object will remain attached to this file until it is closed. Until that occurs, no other file may be opened with this object, however another CIFfile object could be used to access another file. \param filename_in The input filename or pathname. */ void CIFfile::open_read( const String filename_in ) { if ( mode != NONE ) Message::message( Message_fatal( "CIFfile: open_read - File already open" ) ); // open the cif f_sigf_i = NULL; f_phi_i = NULL; filename = filename_in; FILE* cif = fopen( filename.c_str(), "r" ); if ( cif == NULL ) Message::message( Message_warn( "CIFfile: open_read - Could not read: "+filename ) ); fclose( cif ); mode = READ; filename = filename_in; set_cell_symm_reso(filename); if ( clipper_cell_set_flag && !clipper_reso_set_flag ) { resolution_ = resolution( cell_ ); clipper_reso_set_flag = 1; } if ( clipper_cell_set_flag && clipper_reso_set_flag ) { hkl_sampling_ = clipper::HKL_sampling( cell_, resolution_ ); } } bool CIFfile::contains_phases_p() const { return 0; } /*! Close the file after reading. This command also actually fills in the data in any HKL_data structures which have been marked for import. Note that we attempt to read in calculated structure factors too. These rely on the tags "F_calc" or "F_calc_au" and "phase_calc". http://pdb.rutgers.edu/mmcif/dictionaries/cif_mm.dic/Categories/refln.html It is quite usual then for the HKL_data vector of type F_sigF to have a different size to the HKL_data for the F_phi's (often this will be zero). I hope that this will not be a problem. We test for f_phi_i being non-null before we import data into it - CIFfiles can be used with or without reading calculated phases. Note to self: how about we make a function of a CIFfile that says whether or not it contains phases... Note to self: this text need to be properly marked up in doxygen format. */ void CIFfile::close_read() { if ( mode != READ ) Message::message( Message_fatal( "CIFfile: no file open for read" ) ); // make sure the data list is sized if ( f_sigf_i != NULL ) f_sigf_i->update(); if ( f_phi_i != NULL ) f_phi_i->update(); //xtype x1[2]; int ret_val = 0; int n_calc_data = 0; InitMatType(); // read the data from the CIF file // stat cif_file_name.c_str() here, make sure it exists, is readable. CMMCIFFile ciffile; int ierr = ciffile.ReadMMCIFFile((char *)filename.c_str()); int ierr_f; int ierr_calc; if (ierr!=CIFRC_Ok) { std::string mess = "CIFfile: close_read - Could not read: "; mess += filename.c_str(); mess += " Dirty mmCIF file? "; Message::message( Message_warn( mess )); } else { for(int i=0; iGetNumberOfCategories(); icat++) { PCMMCIFCategory cat = data->GetCategory(icat); std::string cat_name(cat->GetCategoryName()); PCMMCIFLoop mmCIFLoop = data->GetLoop( (char *) cat_name.c_str() ); if (mmCIFLoop == NULL) { } else { if (cat_name == "_refln") { // success: ret_val = 1; int h,k,l; realtype F, sigF, Fcalc, phi; xtype x1[2]; for (int j=0; jGetLoopLength(); j++) { // Eeuck! (much "modification of reference" code) // ierr = mmCIFLoop->GetInteger(h, "index_h", j); ierr += mmCIFLoop->GetInteger(k, "index_k", j); ierr += mmCIFLoop->GetInteger(l, "index_l", j); if ( !ierr ) { // Measured data can be given using F_meas or // F_meas_au (arbitary units). So lets try to // read a F_meas first then try F_meas_au if that // fails. ierr_f = mmCIFLoop->GetReal( F, "F_meas",j); ierr_f += mmCIFLoop->GetReal(sigF, "F_meas_sigma", j); if (ierr_f) { ierr_f = mmCIFLoop->GetReal( F, "F_meas_au",j); ierr_f += mmCIFLoop->GetReal(sigF, "F_meas_sigma_au", j); } if ( F < -0.9e10 || sigF < -0.9e10 ) ierr_f++; ierr_calc = mmCIFLoop->GetReal(Fcalc, "F_calc", j); if ( ierr_calc ) { ierr_calc = mmCIFLoop->GetReal(Fcalc, "F_calc_au", j); } ierr_calc += mmCIFLoop->GetReal(phi, "phase_calc", j); if ( Fcalc < -0.9e10 || phi < -0.9e10 ) ierr_calc++; if ( !ierr_f ) { if ( f_sigf_i != NULL ) if ( !f_sigf_i->is_null() ) { x1[0] = F; x1[1] = sigF; f_sigf_i->data_import( HKL(h,k,l), x1 ); } } if (! ierr_calc ) { if ( f_phi_i != NULL ) if ( !f_phi_i->is_null() ) { x1[0] = Fcalc; x1[1] = clipper::Util::d2rad(phi); f_phi_i->data_import( HKL(h,k,l), x1); n_calc_data++; } } } } } } } } } if (f_phi_i != NULL) std::cout << n_calc_data << " calculated data read on close_read()" << std::endl; mode = NONE; } /*! Get the spacegroup from the MTZ file. \return The spacegroup. */ const Spacegroup& CIFfile::spacegroup() const { return space_group; } /*! Get the base cell from the MTZ file. \return The cell. */ const Cell& CIFfile::cell() const { return cell_; } /*! Get the resolution limit from the MTZ file. \return The resolution. */ const Resolution& CIFfile::resolution() const { return resolution_; } /*! Get the HKL sampling from the MTZ file. \return The hkl_sampling. */ const HKL_sampling& CIFfile::hkl_sampling() const { return hkl_sampling_; } /*! Get the resolution limit from the CIF file. Since a CIF file does not contain cell information, a Cell object must be supplied, which will be used to determine the resultion. The result is the resolution determined by the most extreme reflection in the file. \return The resolution. */ Resolution CIFfile::resolution( const Cell& cell ) const { if ( mode != READ ) Message::message( Message_fatal( "CIFfile: resolution - no file open for read" ) ); HKL hkl; int h, k, l; //char line[240]; ftype slim = 0.0; FILE* cif = fopen( filename.c_str(), "r" ); if ( cif == NULL ) Message::message( Message_warn( "CIFfile: resolution - Could not read: "+filename ) ); CMMCIFFile ciffile; int ierr = ciffile.ReadMMCIFFile((char *)filename.c_str()); if (ierr!=CIFRC_Ok) { std::string mess = "CIFfile: resolution - Could not read: "; mess += filename.c_str(); mess += ". Dirty mmCIF file? "; Message::message( Message_warn( mess )); } else { // read the reflections from the phs for(int i=0; iGetNumberOfCategories(); icat++) { PCMMCIFCategory cat = data->GetCategory(icat); std::string cat_name(cat->GetCategoryName()); PCMMCIFLoop mmCIFLoop = data->GetLoop( (char *) cat_name.c_str() ); if (mmCIFLoop == NULL) { } else { if (cat_name == "_refln") { for (int j=0; jGetLoopLength(); j++) { ierr = mmCIFLoop->GetInteger(h, "index_h", j); ierr += mmCIFLoop->GetInteger(k, "index_k", j); ierr += mmCIFLoop->GetInteger(l, "index_l", j); if (!ierr) { hkl = HKL( h, k, l ); slim = Util::max( slim, hkl.invresolsq(cell) ); } } } } } } } fclose( cif ); return Resolution( 1.0/sqrt(slim) ); } /*! Import the list of reflection HKLs from an CIF file into an HKL_info object. At the start of the routine try to determine the space group, cell and resolution. If the resolution limit was found and if the resolution limit of the HKL_info object is lower than the limit of the file, any excess reflections will be rejected, as will any systematic absences or duplicates. If the resolution is not found then the resolution will be determined from the input hkl data and \parm target will be init()ed before returning from this function. \param target The HKL_info object to be initialised. */ void CIFfile::import_hkl_info( HKL_info& target ) { std::vector hkls; //int h, k, l; if ( mode != READ ) Message::message( Message_warn( "CIFfile: import_hkl_info - no file open for read" ) ); std::string new_str = filename; //std::cout << "checking set_cell_symm_reso filename " // << filename << std::endl; //std::cout << "checking set_cell_symm_reso new_str " // << new_str << std::endl; int icell = set_cell_symm_reso(new_str); if (! icell) { if (! clipper_cell_set_flag) Message::message( Message_warn( "CIFfile: import_hkl_info - error getting cell" ) ); if (! clipper_symm_set_flag) Message::message( Message_warn( "CIFfile: import_hkl_info - error getting symm" ) ); } else { // we have the cell and symmetry, proceed. if (! clipper_reso_set_flag) resolution_.init(2.0); // just a dummy value, we will set it to // the right value once we know it after // we have read in all the reflection // hkls. If clipper_reso_set_flag *was* // set, then we have initialised // resolution already. // import any missing params target.init( space_group, cell_, resolution_ ); // char line[241]; not used FILE* cif = fopen( filename.c_str(), "r" ); if ( cif == NULL ) Message::message( Message_warn( "CIFfile: import_hkl_info - Could not read: "+filename ) ); // read the reflections from the cif ftype slim = target.resolution().invresolsq_limit(); ftype tmp_lim = 0.0; CMMCIFFile ciffile; int ierr = ciffile.ReadMMCIFFile((char *)filename.c_str()); if (ierr!=CIFRC_Ok) { std::string mess = "CIFfile: import_hkl_data - Could not read: "; mess += filename.c_str(); mess += ". Dirty mmCIF file? "; Message::message( Message_warn( mess )); } else { for(int i=0; iGetNumberOfCategories(); icat++) { PCMMCIFCategory cat = data->GetCategory(icat); std::string cat_name(cat->GetCategoryName()); PCMMCIFLoop mmCIFLoop = data->GetLoop( (char *) cat_name.c_str() ); if (mmCIFLoop) { if (cat_name == "_refln") { int h,k,l; //realtype F, sigF; for (int j=0; jGetLoopLength(); j++) { // Eeuck! (much "modification of reference" code) // ierr = mmCIFLoop->GetInteger(h, "index_h", j); ierr += mmCIFLoop->GetInteger(k, "index_k", j); ierr += mmCIFLoop->GetInteger(l, "index_l", j); // std::cout << "import_hkl_info ierr: " << ierr << std::endl; if (!ierr) { HKL hkl(h,k,l); if (clipper_reso_set_flag) { if ( hkl.invresolsq(target.cell()) < slim ) { hkls.push_back(hkl); } } else { // resolution had not been set hkls.push_back(hkl); if (hkl.invresolsq(target.cell()) > tmp_lim) { tmp_lim = hkl.invresolsq(target.cell()); } } } } } } } } } // CMMCIFFile is closed on destruction of ciffile. // Now we can initialise target properly, if we OK reading the hkls. if (!clipper_reso_set_flag) { if (tmp_lim > 0.0) { // the starting value resolution_.init( 1/sqrt(tmp_lim)); // 210170 // just above target.init( space_group, cell_, resolution_ ); std::cout << "Resolution limit set to " << resolution_.limit() << std::endl; } else { std::cout << "Disaster couldn't set resolution" << std::endl; } } } std::cout << "import_hkl_info read " << hkls.size() << " hkls" << std::endl; target.add_hkl_list( hkls ); } /*! Import data from an CIF file into an HKL_data object. This routine does not actually read any data, but rather marks the data to be read when the file is closed. The data to be read (F_sigF or Phi_fom) will be selected based on the type of the HKL_data object. \param cdata The HKL_data object into which data is to be imported. */ void CIFfile::import_hkl_data( HKL_data_base& cdata ) { if ( mode != READ ) Message::message( Message_warn( "CIFfile: import_hkl_data - no file open for read" ) ); if ( cdata.is_null() ) cdata.init( space_group, cell_, hkl_sampling_ ); if ( cdata.type() == data32::F_sigF::type() ) f_sigf_i = &cdata; else if ( cdata.type() == data32::F_phi::type() ) f_phi_i = &cdata; else Message::message( Message_warn( "CIFfile: import_hkl_data - data must be F_sigF or F_phi" ) ); } // return non-zero if we find a cell and symmetry and can set them. // int CIFfile::set_cell_symm_reso_by_cif(std::string cif_file_name) { FILE* cif = fopen( cif_file_name.c_str(), "r" ); if ( cif == NULL ) Message::message( Message_warn( "CIFfile: set_cell_symm_reso_by_cif - Could not read: "+cif_file_name ) ); CMMCIFFile ciffile; int ierr = ciffile.ReadMMCIFFile((char *)cif_file_name.c_str()); if (ierr!=CIFRC_Ok) { std::string mess = "CIFfile: set_cell_symm_reso_by_cif: Could not read: "; mess += filename.c_str(); mess += " dirty mmCIF file? "; Message::message( Message_warn( mess )); } else { for(int i=0; iGetStructure("_cell"); char *cat_name_str; std::string cat_name; if (mmCIFStruct != NULL) { cat_name_str = mmCIFStruct->GetCategoryName(); if (cat_name_str == NULL) { std::cout << "null cat_name_str" << std::endl; } else { cat_name = cat_name_str; if (cat_name == "_cell") { realtype a,b,c,alpha,beta,gamma; int ierr = 0; ierr += mmCIFStruct->GetReal (a, "length_a"); ierr += mmCIFStruct->GetReal (b, "length_b"); ierr += mmCIFStruct->GetReal (c, "length_c"); ierr += mmCIFStruct->GetReal (alpha, "angle_alpha"); ierr += mmCIFStruct->GetReal (beta, "angle_beta"); ierr += mmCIFStruct->GetReal (gamma, "angle_gamma"); if (! ierr) { // set clipper cell clipper_cell_set_flag = 1; cell_.init(clipper::Cell_descr(a,b,c,alpha,beta,gamma)); std::cout << "got cell from cif: " << cell_.format() << std::endl; } } } } // Try reading symmetry construction mmCIFStruct = data->GetStructure("_symmetry"); if (mmCIFStruct != NULL) { cat_name_str = mmCIFStruct->GetCategoryName(); if (cat_name_str != NULL) { cat_name = cat_name_str; if ( cat_name == "_symmetry") { int ierr; char *str = mmCIFStruct->GetString("space_group_name_H-M",ierr); if (! ierr) { std::string hmsymm(str); if (str) { hmsymm = str; space_group.init(clipper::Spgr_descr(str)); clipper_symm_set_flag = 1; std::cout << "INFO space_group from symmetry in cif: " << space_group.descr().symbol_hm() << std::endl; } } } } } // Have another try for symmetry: e.g. from shelx cif files: // (such files tell us the symmetry operators, so we can get // the space group from those rather than the name using a // clipper function). for (int icat=0; icatGetNumberOfCategories(); icat++) { PCMMCIFCategory cat = data->GetCategory(icat); std::string cat_name(cat->GetCategoryName()); PCMMCIFLoop mmCIFLoop = data->GetLoop( (char *) cat_name.c_str() ); if (mmCIFLoop) { if (cat_name == "_symmetry_equiv") { std::cout << "Found symmetry equivalents....." << std::endl; std::string symmetry_ops(""); for (int j=0; jGetLoopLength(); j++) { char *str = mmCIFLoop->GetString("pos_as_xyz", j, ierr); std::cout << "INFO:: Found cif symmetry operator " << str << std::endl; symmetry_ops += str; symmetry_ops += " ; "; } if (symmetry_ops != "") { clipper_symm_set_flag = 1; space_group.init(clipper::Spgr_descr(symmetry_ops)); std::cout << "INFO:: space_group from symm ops in cif: " << space_group.descr().symbol_hm() << std::endl; } } } } // Reflection meta data: // mmCIFStruct = data->GetStructure("_reflns"); if (mmCIFStruct != NULL) { cat_name_str = mmCIFStruct->GetCategoryName(); if (cat_name_str != NULL) { cat_name = cat_name_str; if ( cat_name == "_reflns") { realtype reso; int ierr = mmCIFStruct->GetReal(reso, "d_resolution_high"); if (! ierr ) { clipper_reso_set_flag = 1; resolution_.init(reso); std::cout << "got resolution from cif: " << resolution_.limit() << std::endl; } } } } } } return clipper_symm_set_flag && clipper_cell_set_flag; } // return non-zero if we find a cell and symmetry and can set them. // int CIFfile::set_cell_symm_reso(std::string cif_file_name) { // return non-zero if we find a cell and symmetry and can set them. // std::cout << "in set_cell_symm_reso " << cif_file_name << std::endl; if (set_cell_symm_reso_by_cif(cif_file_name)) { return 1; } else { return set_cell_symm_reso_by_kludge(cif_file_name); } } int CIFfile::set_cell_symm_reso_by_kludge(std::string cif_file_name) { // Cif files from the RCSB do not contain cell and symmetry // information in cif format (now how totally crap is that? - but I // won't go into that now). // // However, they do provide us with comment lines that look like a // conventional pdb file. e.g: // // #CRYST1 114.300 114.300 155.200 90.00 90.00 120.00 P 61 2 2 12 // #REMARK 290 SYMMETRY OPERATORS FOR SPACE GROUP: P 61 // // So the plan is the open the file conventionally and grab the // cell and symmetry then after we have got to the "#CRYST1" field // or find "loop_", we close up. Notice how we don't grab the // space group symbol, since this is fraught with parsing // difficulties, instead we grab the symmetry operators and use // clipper cleverness to determine the space group. // // Return the success status. True is success, 0 failure. // // // std::string line; char word[80]; // cif standard, marvellous eh? short int read_symm_flag = 0; // 2 is good for read short int cell_coming_flag = 0; // 1 is good for read short int local_found_symm = 0; short int local_found_cell = 0; //short int local_found_reso = 0; std::string clipper_symm_string(""); std::vector cell_bits; std::ifstream from; float reso; short int read_reso_flag = 0; from.open(cif_file_name.c_str()); while (from >> &word[0]) { // std::cout << "word is " << word << std::endl; if (read_reso_flag == 1) { // We can do reso immediately. The others (cell and // symmetry) we set flags and do them at the end. // char **endptr = new (char *); reso = strtod(word, endptr); if (endptr != NULL && *endptr != word) { resolution_.init(reso); std::cout << " Found reso: " << resolution_.limit() << std::endl; clipper_reso_set_flag = 1; } delete endptr; read_reso_flag = 0; } if (! strncmp(word, "RESOLUTION.", 11)) { read_reso_flag = 1; } if (! strncmp(word, "NNNMMM",6)) { read_symm_flag = 1; } if (! strncmp(word, "OPERATOR",6)) { read_symm_flag++; } if (! strncmp(word, "WHERE",5)) { read_symm_flag =0; } if (read_symm_flag == 2) { if (strchr(word,'X') && strchr(word,'Y') && strchr(word,'Z') ) { clipper_symm_string += word; clipper_symm_string += ";"; local_found_symm = 1; } } // position dependent code (should be before CRYST1 comparison) if (cell_coming_flag == 1) { cell_bits.push_back(atof(word)); local_found_cell = 1; } if (! strncmp(word, "#CRYST1", 7)) { cell_coming_flag = 1; } if (cell_bits.size() == 6) break; if (! strncmp(word, "_refln.index_h",14)) break; } from.close(); if (clipper_symm_set_flag == 0) { if (local_found_symm) { space_group.init(clipper::Spgr_descr(clipper_symm_string)); clipper_symm_set_flag = 1; std::cout << " Symm: " << space_group.descr().symbol_hm() << std::endl; } } if (clipper_cell_set_flag == 0) { if (local_found_cell) { if (cell_bits.size() == 6 && clipper_symm_string != "") { if ( !clipper::Util::is_nan(cell_bits[0]) && !clipper::Util::is_nan(cell_bits[1]) && !clipper::Util::is_nan(cell_bits[2]) && !clipper::Util::is_nan(cell_bits[3]) && !clipper::Util::is_nan(cell_bits[4]) && !clipper::Util::is_nan(cell_bits[5]) ) { cell_.init(clipper::Cell_descr(cell_bits[0], cell_bits[1], cell_bits[2], cell_bits[3], cell_bits[4], cell_bits[5])); std::cout << cell_.format() << std::endl; clipper_cell_set_flag = 1; } } } } return clipper_cell_set_flag && clipper_symm_set_flag; } } // namespace clipper clipper-2.1/clipper/clipper-cns.h0000644000374100011300000000027110736662163013765 00000000000000/* Clipper header file */ /* (C) 2000-2002 Kevin Cowtan */ #ifndef CLIPPER_CNS_H #define CLIPPER_CNS_H #include "clipper/cns/cns_hkl_io.h" #include "clipper/cns/cns_map_io.h" #endif clipper-2.1/clipper/Makefile.am0000644000374100011300000000133111372264321013416 00000000000000# Makefile.am, passed: clipper, extracted subdir: clipper # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper ## -*- mode: Makefile; mode: font-lock -*- SUBDIRS = \ core ${CLIPPER_MMDB_DIR} ${CLIPPER_MINIMOL_DIR} ${CLIPPER_CCP4_DIR} ${CLIPPER_CIF_DIR} ${CLIPPER_PHS_DIR} ${CLIPPER_CNS_DIR} ${CLIPPER_CCTBX_DIR} contrib INCLUDES=${FFTW_CXXFLAGS} library_include_HEADERS = \ clipper-ccp4.h \ clipper-cctbx.h \ clipper-cif.h \ clipper-cns.h \ clipper-contrib.h \ clipper.h \ clipper-minimol.h \ clipper-mmdb.h \ clipper-mmdbold.h \ clipper-phs.h \ minimal-clipper-hkl.h \ minimal-clipper-map.h library_includedir = $(pkgincludedir) clipper-2.1/clipper/COPYING0000644000374100011300000005750510736662163012444 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS clipper-2.1/clipper/clipper-mmdb.h0000644000374100011300000000023210736662163014116 00000000000000/* Clipper header file */ /* (C) 2000-2003 Kevin Cowtan */ #ifndef CLIPPER_MMDB_H #define CLIPPER_MMDB_H #include "clipper/mmdb/clipper_mmdb.h" #endif clipper-2.1/clipper/clipper-cctbx.h0000644000374100011300000000023610736662163014306 00000000000000/* Clipper header file */ /* (C) 2000-2002 Kevin Cowtan */ #ifndef CLIPPER_CCTBX_H #define CLIPPER_CCTBX_H #include "clipper/cctbx/clipper_cctbx.h" #endif clipper-2.1/clipper/minimal-clipper-map.h0000644000374100011300000000041110736662163015377 00000000000000/* Clipper header file */ /* (C) 2000-2002 Kevin Cowtan */ #ifndef CLIPPER_CORE_H #define CLIPPER_CORE_H #include "clipper/core/container_map.h" #include "clipper/core/rotation.h" #include "clipper/core/map_interp.h" #include "clipper/core/map_utils.h" #endif clipper-2.1/clipper/clipper.h0000644000374100011300000000103610736662163013204 00000000000000/* Clipper header file */ /* (C) 2000-2002 Kevin Cowtan */ #ifndef CLIPPER_CORE_H #define CLIPPER_CORE_H #include "clipper/core/container_hkl.h" #include "clipper/core/container_map.h" #include "clipper/core/rotation.h" #include "clipper/core/ramachandran.h" #include "clipper/core/hkl_compute.h" #include "clipper/core/hkl_operators.h" #include "clipper/core/resol_targetfn.h" #include "clipper/core/map_interp.h" #include "clipper/core/map_utils.h" #include "clipper/core/atomsf.h" #include "clipper/core/clipper_instance.h" #endif clipper-2.1/clipper/clipper-contrib.h0000644000374100011300000000077610736662163014654 00000000000000/* Clipper header file */ /* (C) 2000-2002 Kevin Cowtan */ #ifndef CLIPPER_CONTRIB_H #define CLIPPER_CONTRIB_H #include "clipper/contrib/sfcalc.h" #include "clipper/contrib/edcalc.h" #include "clipper/contrib/sfcalc_obs.h" #include "clipper/contrib/sfweight.h" #include "clipper/contrib/sfscale.h" #include "clipper/contrib/convolution_search.h" #include "clipper/contrib/fffear.h" #include "clipper/contrib/mapfilter.h" #include "clipper/contrib/skeleton.h" #include "clipper/contrib/originmatch.h" #endif clipper-2.1/clipper/mmdb/0000777000374100011300000000000011372264353012374 500000000000000clipper-2.1/clipper/mmdb/clipper_mmdb.cpp0000644000374100011300000002230411245171342015444 00000000000000/* clipper_mmdb.cpp: MMDB wrapper */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "clipper_mmdb.h" #include extern "C" { #include } namespace clipper { // MMDB wrapper types // atom String MMDBAtom::id() const { return String( name ); } String MMDBAtom::element() const { return String( CAtom::element ); } Coord_orth MMDBAtom::coord_orth() const { if ( !Ter && WhatIsSet & ASET_Coordinates ) return Coord_orth( x, y, z ); else return Coord_orth( Coord_orth::null() ); } ftype MMDBAtom::occupancy() const { if ( !Ter && WhatIsSet & ASET_Occupancy ) return CAtom::occupancy; else return Util::nan(); } ftype MMDBAtom::u_iso() const { if ( !Ter && WhatIsSet & ASET_tempFactor ) return Util::b2u(tempFactor); else return Util::nan(); } U_aniso_orth MMDBAtom::u_aniso_orth() const { if ( !Ter && WhatIsSet & ASET_Anis_tFac ) return U_aniso_orth( u11, u22, u33, u12, u13, u23 ); else return U_aniso_orth( U_aniso_orth::null() ); } Sig_Coord_orth MMDBAtom::sig_coord_orth() const { if ( !Ter && WhatIsSet & ASET_CoordSigma ) return Sig_Coord_orth( sigX, sigY, sigZ ); else return Sig_Coord_orth( Sig_Coord_orth::null() ); } ftype MMDBAtom::sig_occupancy() const { if ( !Ter && WhatIsSet & ASET_OccSigma ) return sigOcc; else return Util::nan(); } ftype MMDBAtom::sig_u_iso() const { if ( !Ter && WhatIsSet & ASET_tFacSigma ) return Util::b2u(sigTemp); else return Util::nan(); } Sig_U_aniso_orth MMDBAtom::sig_u_aniso_orth() const { if ( !Ter && WhatIsSet & ASET_Anis_tFSigma ) return Sig_U_aniso_orth( su11, su22, su33, su12, su13, su23 ); else return Sig_U_aniso_orth( Sig_U_aniso_orth::null() ); } void MMDBAtom::set_id( const String& n ) { SetAtomName( (char *)n.c_str() ); } void MMDBAtom::set_element( const String& n ) { SetElementName( (char *)n.c_str() ); } void MMDBAtom::set_coord_orth( const Coord_orth& v ) { WhatIsSet &= ~ASET_Coordinates; if ( !v.is_null() ) { x = v.x(); y = v.y(); z = v.z(); WhatIsSet |= ASET_Coordinates; } } void MMDBAtom::set_occupancy( const ftype& v ) { WhatIsSet &= ~ASET_Occupancy; if ( !Util::is_nan( v ) ) { CAtom::occupancy = v; WhatIsSet |= ASET_Occupancy; } } void MMDBAtom::set_u_iso( const ftype& v ) { WhatIsSet &= ~ASET_tempFactor; if ( !Util::is_nan( v ) ) { tempFactor = Util::u2b(v); WhatIsSet |= ASET_tempFactor; } } void MMDBAtom::set_u_aniso_orth( const U_aniso_orth& v ) { WhatIsSet &= ~ASET_Anis_tFac; if ( !v.is_null() ) { u11 = v(0,0); u22 = v(1,1); u33 = v(2,2); u12 = v(0,1); u13 = v(0,2); u23 = v(1,2); WhatIsSet |= ASET_Anis_tFac; } } void MMDBAtom::set_sig_coord_orth( const Sig_Coord_orth& s ) { WhatIsSet &= ~ASET_CoordSigma; if ( !s.is_null() ) { sigX = s.sigx(); sigY = s.sigy(); sigZ = s.sigz(); WhatIsSet |= ASET_CoordSigma; } } void MMDBAtom::set_sig_occupancy( const ftype& s ) { WhatIsSet &= ~ASET_OccSigma; if ( !Util::is_nan( s ) ) { sigOcc = s; WhatIsSet |= ASET_OccSigma; } } void MMDBAtom::set_sig_u_iso( const ftype& s ) { WhatIsSet &= ~ASET_tFacSigma; if ( !Util::is_nan( s ) ) { sigTemp = Util::u2b(s); WhatIsSet |= ASET_tFacSigma; } } void MMDBAtom::set_sig_u_aniso_orth( const Sig_U_aniso_orth& s ) { WhatIsSet &= ~ASET_Anis_tFSigma; if ( !s.is_null() ) { su11 = s(0,0); su22 = s(1,1); su33 = s(2,2); su12 = s(0,1); su13 = s(0,2); su23 = s(1,2); WhatIsSet |= ASET_Anis_tFSigma; } } /*! \return The atom alternate conformation code. */ String MMDBAtom::altconf() const { return String( altLoc ); } /*! \return The atom serial number. */ int MMDBAtom::serial_num() const { return serNum; } /*! \return The atomic charge. */ String MMDBAtom::charge() const { return String( CAtom::charge ); } // residue String MMDBResidue::type() const { return String( name ); } int MMDBResidue::seqnum() const { return seqNum; } String MMDBResidue::inscode() const { return String( insCode ); } void MMDBResidue::set_type( const String& n ) { SetResName( (char *)n.c_str() ); } void MMDBResidue::set_seqnum( const int& n ) { seqNum = n; } void MMDBResidue::set_inscode( const String& n ) { strncpy( insCode, n.c_str(), 10 ); } // chain String MMDBChain::id() const { return String( ((mmdb::CChain*)this)->GetChainID() ); } void MMDBChain::set_id( const String& n ) { SetChainID( (char *)n.c_str() ); } // model String MMDBModel::id() const { return String( ((mmdb::CModel*)this)->GetEntryID() ); } void MMDBModel::set_id( const String& n ) { SetEntryID( (char *)n.c_str() ); } // MMDBManager methods /*! For later initialisation: see init() */ MMDBManager::MMDBManager() { InitMatType(); Message::message( Message_ctor( " [MMDBManager: constructed>" ) ); } MMDBManager::~MMDBManager() { Message::message( Message_dtor( " (*this); Spacegroup sg; if ( mmdb.isSpaceGroup() ) { // get spacegroup from ops int nops = mmdb.GetNumberOfSymOps(); String ops = ""; for ( int i = 0; i < nops; i++ ) ops += String( mmdb.GetSymOp(i) ) + ";"; Spgr_descr sd( ops, Spacegroup::Symops ); sg = Spacegroup( sd ); } else { // otherwise get spacegroup from name const char* mmdbsg = mmdb.GetSpaceGroup(); if ( mmdbsg != NULL ) { String name = String( mmdbsg ).trim(); if ( name.find_first_of( "PABCFIR" ) != String::npos ) { if ( name.find_first_of( ":" ) != String::npos ) { Spgr_descr sd( name, Spacegroup::XHM ); sg = Spacegroup( sd ); } else { Spgr_descr sd( name, Spacegroup::HM ); sg = Spacegroup( sd ); } } } } return sg; } Cell MMDBManager::cell() const { mmdb::CMMDBManager& mmdb = const_cast(*this); if ( mmdb.isCrystInfo() ) { return Cell( Cell_descr( Cryst.a, Cryst.b, Cryst.c, Cryst.alpha, Cryst.beta, Cryst.gamma ) ); } else { return Cell(); // null } } void MMDBManager::set_spacegroup( const Spacegroup& spacegroup ) { // Hall method... (gives bad symbol in file) //String hall = "Hall:" + spacegroup.symbol_hall(); //SetSpaceGroup( (char*)hall.c_str() ); // HM method... //String s = spacegroup.symbol_hm(); //String x = spacegroup.symbol_hm_ext(); //if ( x.length() > 0 ) s = x + s.substr(1); //SetSpaceGroup( (char*)s.c_str() ); // xHM method SetSpaceGroup( (char*)spacegroup.symbol_xhm().c_str() ); } void MMDBManager::set_cell( const Cell& cell ) { SetCell( cell.a(), cell.b(), cell.c(), cell.alpha_deg(), cell.beta_deg(), cell.gamma_deg() ); } /*! The atom list is constructed from the MMDB atom pointers by copying. This should be fast compared to any task for which Clipper uses an atom list. \param ppcatom The MMDB array of atom pointers. \param natom The number of atoms. */ MMDBAtom_list::MMDBAtom_list( const mmdb::PPCAtom ppcatom, const int natom ) { for ( int i = 0; i < natom; i++ ) push_back( Atom( *( (const MMDBAtom*)ppcatom[i] ) ) ); } } // namespace clipper clipper-2.1/clipper/mmdb/clipper_mmdb.h0000644000374100011300000002372310736662163015131 00000000000000/*! \file clipper_mmdb.h Header file for MMDB wrapper */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_MMDB #define CLIPPER_MMDB #include "../core/coords.h" #include namespace clipper { namespace mmdb { typedef ::CAtom CAtom; typedef ::CResidue CResidue; typedef ::CChain CChain; typedef ::CModel CModel; typedef ::CMMDBManager CMMDBManager; typedef ::PCAtom PCAtom; typedef ::PCResidue PCResidue; typedef ::PCChain PCChain; typedef ::PCModel PCModel; typedef ::PCMMDBManager PCMMDBManager; typedef ::PPCAtom PPCAtom; typedef ::PPCResidue PPCResidue; typedef ::PPCChain PPCChain; typedef ::PPCModel PPCModel; typedef ::PPCMMDBManager PPCMMDBManager; } // PDB 'sigma' classes (should be depracated) //! Standard deviation of orthognal coordinates /*! see clipper::Coord_orth \note In my view this is a stupid definition, but its in the PDB. \ingroup g_mmdb */ class Sig_Coord_orth : public Vec3<> { public: Sig_Coord_orth() {} //!< null constructor explicit Sig_Coord_orth( const Vec3<>& v ) : Vec3<>( v ) {} //!< constructor: copy/convert Sig_Coord_orth( const ftype& sigx, const ftype& sigy, const ftype& sigz ) : Vec3<>( sigx, sigy, sigz ) {} //!< constructor: from sig(x,y,z) const ftype& sigx() const { return (*this)[0]; } //!< get sigx const ftype& sigy() const { return (*this)[1]; } //!< get sigy const ftype& sigz() const { return (*this)[2]; } //!< get sigz }; //! Standard deviation of anisotropic atomic displacement parameters /*! see clipper::U_aniso_orth \note In my view this is a stupid definition, but its in the PDB. \ingroup g_mmdb */ class Sig_U_aniso_orth : public Mat33sym<> { public: //! null constructor Sig_U_aniso_orth() {}; //! constructor: from Mat33sym explicit Sig_U_aniso_orth( const Mat33sym<>& m ) : Mat33sym<>(m) {} //! constructor: from sig_Uij Sig_U_aniso_orth( const ftype& su11, const ftype& su22, const ftype& su33, const ftype& su12, const ftype& su13, const ftype& su23 ) : Mat33sym<>( su11, su22, su33, su12, su13, su23 ) {} }; //! MMDB atom object /*! This class is a trivial derivation of the corresponding MMDB, providing access in terms of Clipper types. Thus, when you such access, simply cast you MMDB object reference to this type to access the additional functions. For full documentation see: http://www.ebi.ac.uk/~keb/ */ class MMDBAtom : public mmdb::CAtom { public: //! null constructor MMDBAtom() {} //! constructor: from MMDB atom MMDBAtom( const mmdb::CAtom& a ) : mmdb::CAtom(a) {} // standard atom properties String id() const; //!< Atom id, e.g. CA, CB, CH3 String element() const; //!< Atom element, e.g. C, H, Zn2+ Coord_orth coord_orth() const; //!< Atom coordinate (orthogonal Angstroms) ftype occupancy() const; //!< Atom occupancy (0...1) ftype u_iso() const; //!< Atom isotropic U U_aniso_orth u_aniso_orth() const; //!< Atom anisotropic U (orthogonal As) void set_id( const String& n ); //!< set id void set_element( const String& n ); //!< set element void set_coord_orth( const Coord_orth& v ); //!< set coordinate void set_occupancy( const ftype& v ); //!< set occupancy void set_u_iso( const ftype& v ); //!< set iso U void set_u_aniso_orth( const U_aniso_orth& v ); //!< set aniso U Sig_Coord_orth sig_coord_orth() const; // stupid sigmas ftype sig_occupancy() const; ftype sig_u_iso() const; Sig_U_aniso_orth sig_u_aniso_orth() const; void set_sig_coord_orth( const Sig_Coord_orth& s ); void set_sig_occupancy( const ftype& s ); void set_sig_u_iso( const ftype& s ); void set_sig_u_aniso_orth( const Sig_U_aniso_orth& s ); // other atom properties String altconf() const; //!< get atom alternate conformation code int serial_num() const; //!< get atom serial number String charge() const; //!< get atom charge }; //! MMDB residue object wrapper /*! This class is a trivial derivation of the corresponding MMDB, providing access in terms of Clipper types. Thus, when you such access, simply cast you MMDB object reference to this type to access the additional functions. For full documentation see: http://www.ebi.ac.uk/~keb/ */ class MMDBResidue : public mmdb::CResidue { public: //! null constructor MMDBResidue() {} //! constructor: from MMDB residue MMDBResidue( const mmdb::CResidue& a ) : mmdb::CResidue(a) {} // standard residue properties String type() const; int seqnum() const; String inscode() const; void set_type( const String& n ); void set_seqnum( const int& n ); void set_inscode( const String& n ); }; //! MMDB chain object wrapper /*! This class is a trivial derivation of the corresponding MMDB, providing access in terms of Clipper types. Thus, when you such access, simply cast you MMDB object reference to this type to access the additional functions. For full documentation see: http://www.ebi.ac.uk/~keb/ */ class MMDBChain : public mmdb::CChain { public: //! null constructor MMDBChain() {} //! constructor: from MMDB chain MMDBChain( const mmdb::CChain& a ) : mmdb::CChain(a) {} // chain properties String id() const; void set_id( const String& n ); }; //! MMDB model object wrapper /*! This class is a trivial derivation of the corresponding MMDB, providing access in terms of Clipper types. Thus, when you such access, simply cast you MMDB object reference to this type to access the additional functions. For full documentation see: http://www.ebi.ac.uk/~keb/ */ class MMDBModel : public mmdb::CModel { public: //! null constructor MMDBModel() {} //! constructor: from MMDB model MMDBModel( const mmdb::CModel& a ) : mmdb::CModel(a) {} // model properties String id() const; void set_id( const String& n ); }; //! MMDB manager wrapper /*! This class is a trivial derivation of the corresponding MMDB, providing access in terms of Clipper types. Thus, when you such access, simply cast you MMDB object reference to this type to access the additional functions. For full documentation see: http://www.ebi.ac.uk/~keb/ */ class MMDBManager : public mmdb::CMMDBManager { public: enum TYPE { Default=-1, PDB, CIF, Binary }; MMDBManager(); //! null constructor ~MMDBManager(); //! destructor Spacegroup spacegroup() const; //!< get spacegroup Cell cell() const; //!< get cell void set_spacegroup( const Spacegroup& spacegroup ); //!< set spacegroup void set_cell( const Cell& cell ); //!< set cell //-- int ReadCoorFile( char* name ); //!< For file i/o see http://www.ebi.ac.uk/~keb/cldoc/object/cl_obj_rdwr.html //-- void select( int hnd, int typ, char* str, int key ); //!< For selection functions see http://www.ebi.ac.uk/~keb/cldoc/object/cl_obj_selfnc.html //-- PCModel GetModel ( int modelNo ); //!< For accessor functions see http://www.ebi.ac.uk/~keb/cldoc/object/cl_obj_surf.html //-- int AddModel ( PCModel model ); //!< For editing functions see http://www.ebi.ac.uk/~keb/cldoc/object/cl_obj_edit.html }; //! MMDB atom list class /*! This class is used to convert an MMDB PPCAtom to a Clipper Atom_list. It is a trivial derivation of a clipper::Atom_list, and may be used wherever an Atom_list is required. */ class MMDBAtom_list : public Atom_list { public: //! constructor: from PPCAtom MMDBAtom_list( const mmdb::PPCAtom ppcatom, const int natom ); }; } // namespace clipper #endif clipper-2.1/clipper/mmdb/Makefile.am0000644000374100011300000000105611372264321014341 00000000000000# Makefile.am, passed: clipper/mmdb, extracted subdir: mmdb # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper/mmdb ## -*- mode: Makefile; mode: font-lock -*- INCLUDES=${FFTW_CXXFLAGS} ${MMDB_CXXFLAGS} library_include_HEADERS = \ clipper_mmdb.h lib_LTLIBRARIES = libclipper-mmdb.la libclipper_mmdb_la_SOURCES = \ clipper_mmdb.cpp library_includedir = $(pkgincludedir)/mmdb libclipper_mmdb_la_LDFLAGS = -version-info @CLIPPER_LT_VERSION@ libclipper_mmdb_la_LIBADD = \ $(top_builddir)/clipper/core/libclipper-core.la $(MMDB_LIBS) clipper-2.1/clipper/mmdb/Makefile.in0000644000374100011300000004453011372264333014361 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am, passed: clipper/mmdb, extracted subdir: mmdb # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper/mmdb VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = clipper/mmdb DIST_COMMON = $(library_include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ccp4.m4 \ $(top_srcdir)/config/clipper.m4 $(top_srcdir)/config/fftw.m4 \ $(top_srcdir)/config/gpp4.m4 $(top_srcdir)/config/mmdb.m4 \ $(top_srcdir)/config/utimbuf.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(library_includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libclipper_mmdb_la_DEPENDENCIES = \ $(top_builddir)/clipper/core/libclipper-core.la \ $(am__DEPENDENCIES_1) am_libclipper_mmdb_la_OBJECTS = clipper_mmdb.lo libclipper_mmdb_la_OBJECTS = $(am_libclipper_mmdb_la_OBJECTS) libclipper_mmdb_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libclipper_mmdb_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libclipper_mmdb_la_SOURCES) DIST_SOURCES = $(libclipper_mmdb_la_SOURCES) HEADERS = $(library_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AR = @AR@ AR_FLAGS = @AR_FLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCP4_CXXFLAGS = @CCP4_CXXFLAGS@ CCP4_LIBS = @CCP4_LIBS@ CFLAGS = @CFLAGS@ CLIPPER_CCP4_DIR = @CLIPPER_CCP4_DIR@ CLIPPER_CIF_DIR = @CLIPPER_CIF_DIR@ CLIPPER_CNS_DIR = @CLIPPER_CNS_DIR@ CLIPPER_CONTRIB_DIR = @CLIPPER_CONTRIB_DIR@ CLIPPER_LT_VERSION = @CLIPPER_LT_VERSION@ CLIPPER_MINIMOL_DIR = @CLIPPER_MINIMOL_DIR@ CLIPPER_MMDB_DIR = @CLIPPER_MMDB_DIR@ CLIPPER_PHS_DIR = @CLIPPER_PHS_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_CXXFLAGS = @FFTW_CXXFLAGS@ FFTW_LIBS = @FFTW_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMDB_CXXFLAGS = @MMDB_CXXFLAGS@ MMDB_LIBS = @MMDB_LIBS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = ${FFTW_CXXFLAGS} ${MMDB_CXXFLAGS} library_include_HEADERS = \ clipper_mmdb.h lib_LTLIBRARIES = libclipper-mmdb.la libclipper_mmdb_la_SOURCES = \ clipper_mmdb.cpp library_includedir = $(pkgincludedir)/mmdb libclipper_mmdb_la_LDFLAGS = -version-info @CLIPPER_LT_VERSION@ libclipper_mmdb_la_LIBADD = \ $(top_builddir)/clipper/core/libclipper-core.la $(MMDB_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu clipper/mmdb/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu clipper/mmdb/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): 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 \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ 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)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libclipper-mmdb.la: $(libclipper_mmdb_la_OBJECTS) $(libclipper_mmdb_la_DEPENDENCIES) $(libclipper_mmdb_la_LINK) -rpath $(libdir) $(libclipper_mmdb_la_OBJECTS) $(libclipper_mmdb_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clipper_mmdb.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-library_includeHEADERS: $(library_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(library_includedir)" || $(MKDIR_P) "$(DESTDIR)$(library_includedir)" @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(library_includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \ done uninstall-library_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(library_includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(library_includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(library_includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-library_includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-library_includeHEADERS \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: clipper-2.1/clipper/Makefile.in0000644000374100011300000004716011372264332013443 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am, passed: clipper, extracted subdir: clipper # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = clipper DIST_COMMON = $(library_include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in COPYING ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ccp4.m4 \ $(top_srcdir)/config/clipper.m4 $(top_srcdir)/config/fftw.m4 \ $(top_srcdir)/config/gpp4.m4 $(top_srcdir)/config/mmdb.m4 \ $(top_srcdir)/config/utimbuf.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(library_includedir)" HEADERS = $(library_include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AR = @AR@ AR_FLAGS = @AR_FLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCP4_CXXFLAGS = @CCP4_CXXFLAGS@ CCP4_LIBS = @CCP4_LIBS@ CFLAGS = @CFLAGS@ CLIPPER_CCP4_DIR = @CLIPPER_CCP4_DIR@ CLIPPER_CIF_DIR = @CLIPPER_CIF_DIR@ CLIPPER_CNS_DIR = @CLIPPER_CNS_DIR@ CLIPPER_CONTRIB_DIR = @CLIPPER_CONTRIB_DIR@ CLIPPER_LT_VERSION = @CLIPPER_LT_VERSION@ CLIPPER_MINIMOL_DIR = @CLIPPER_MINIMOL_DIR@ CLIPPER_MMDB_DIR = @CLIPPER_MMDB_DIR@ CLIPPER_PHS_DIR = @CLIPPER_PHS_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_CXXFLAGS = @FFTW_CXXFLAGS@ FFTW_LIBS = @FFTW_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMDB_CXXFLAGS = @MMDB_CXXFLAGS@ MMDB_LIBS = @MMDB_LIBS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = \ core ${CLIPPER_MMDB_DIR} ${CLIPPER_MINIMOL_DIR} ${CLIPPER_CCP4_DIR} ${CLIPPER_CIF_DIR} ${CLIPPER_PHS_DIR} ${CLIPPER_CNS_DIR} ${CLIPPER_CCTBX_DIR} contrib INCLUDES = ${FFTW_CXXFLAGS} library_include_HEADERS = \ clipper-ccp4.h \ clipper-cctbx.h \ clipper-cif.h \ clipper-cns.h \ clipper-contrib.h \ clipper.h \ clipper-minimol.h \ clipper-mmdb.h \ clipper-mmdbold.h \ clipper-phs.h \ minimal-clipper-hkl.h \ minimal-clipper-map.h library_includedir = $(pkgincludedir) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu clipper/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu clipper/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-library_includeHEADERS: $(library_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(library_includedir)" || $(MKDIR_P) "$(DESTDIR)$(library_includedir)" @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(library_includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \ done uninstall-library_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(library_includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(library_includedir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(library_includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-library_includeHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-library_includeHEADERS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-library_includeHEADERS install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-library_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: clipper-2.1/clipper/clipper-minimol.h0000644000374100011300000000037310736662163014651 00000000000000/* Clipper header file */ /* (C) 2000-2003 Kevin Cowtan */ #ifndef CLIPPER_MINIMOL_H #define CLIPPER_MINIMOL_H #include "clipper/minimol/minimol_utils.h" #include "clipper/minimol/minimol_io.h" #include "clipper/minimol/container_minimol.h" #endif clipper-2.1/clipper/cns/0000777000374100011300000000000011372264353012240 500000000000000clipper-2.1/clipper/cns/cns_map_io.cpp0000644000374100011300000005574111247655175015012 00000000000000/* map_io.cpp: class file for reflection data map importer */ //c Copyright (C) 2006 Jon A. Christopher, Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CNS licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CNS Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "cns_map_io.h" #include #include namespace clipper { namespace data { const char* cns_sg_data[] = { "Null","P 1","-P 1","P 2y","P 2yb","C 2y","P -2y","P -2yc","C -2y","C -2yc","-P 2y","-P 2yb","-C 2y","-P 2yc","-P 2ybc","-C 2yc","P 2 2","P 2c 2","P 2 2ab","P 2ac 2ab","C 2c 2","C 2 2","F 2 2","I 2 2","I 2b 2c","P 2 -2","P 2c -2","P 2 -2c","P 2 -2a","P 2c -2ac","P 2 -2bc","P 2ac -2","P 2 -2ab","P 2c -2n","P 2 -2n","C 2 -2","C 2c -2","C 2 -2c","A 2 -2","A 2 -2c","A 2 -2a","A 2 -2ac","F 2 -2","F 2 -2d","I 2 -2","I 2 -2c","I 2 -2a","-P 2 2","P 2 2 -1n","-P 2 2c","P 2 2 -1ab","-P 2a 2a","-P 2a 2bc","-P 2ac 2","-P 2a 2ac","-P 2 2ab","-P 2ab 2ac","-P 2c 2b","-P 2 2n","P 2 2ab -1ab","-P 2n 2ab","-P 2ac 2ab","-P 2ac 2n","-C 2c 2","-C 2bc 2","-C 2 2","-C 2 2c","-C 2b 2","C 2 2 -1bc","-F 2 2","F 2 2 -1d","-I 2 2","-I 2 2c","-I 2b 2c","-I 2b 2","P 4","P 4w","P 4c","P 4cw","I 4","I 4bw","P -4","I -4","-P 4","-P 4c","P 4ab -1ab","P 4n -1n","-I 4","I 4bw -1bw","P 4 2","P 4ab 2ab","P 4w 2c","P 4abw 2nw","P 4c 2","P 4n 2n","P 4cw 2c","P 4nw 2abw","I 4 2","I 4bw 2bw","P 4 -2","P 4 -2ab","P 4c -2c","P 4n -2n","P 4 -2c","P 4 -2n","P 4c -2","P 4c -2ab","I 4 -2","I 4 -2c","I 4bw -2","I 4bw -2c","P -4 2","P -4 2c","P -4 2ab","P -4 2n","P -4 -2","P -4 -2c","P -4 -2ab","P -4 -2n","I -4 -2","I -4 -2c","I -4 2","I -4 2bw","-P 4 2","-P 4 2c","P 4 2 -1ab","P 4 2 -1n","-P 4 2ab","-P 4 2n","P 4ab 2ab -1ab","P 4ab 2n -1ab","-P 4c 2","-P 4c 2c","P 4n 2c -1n","P 4n 2 -1n","-P 4c 2ab","-P 4n 2n","P 4n 2n -1n","P 4n 2ab -1n","-I 4 2","-I 4 2c","I 4bw 2bw -1bw","I 4bw 2aw -1bw","P 3","P 31","P 32","R 3","-P 3","-R 3","P 3 2","P 3 2\"","P 31 2c (0 0 1)","P 31 2\"","P 32 2c (0 0 -1)","P 32 2\"","R 3 2\"","P 3 -2\"","P 3 -2","P 3 -2\"c","P 3 -2c","R 3 -2\"","R 3 -2\"c","-P 3 2","-P 3 2c","-P 3 2\"","-P 3 2\"c","-R 3 2\"","-R 3 2\"c","P 6","P 61","P 65","P 62","P 64","P 6c","P -6","-P 6","-P 6c","P 6 2","P 61 2 (0 0 -1)","P 65 2 (0 0 1)","P 62 2c (0 0 1)","P 64 2c (0 0 -1)","P 6c 2c","P 6 -2","P 6 -2c","P 6c -2","P 6c -2c","P -6 2","P -6c 2","P -6 -2","P -6c -2c","-P 6 2","-P 6 2c","-P 6c 2","-P 6c 2c","P 2 2 3","F 2 2 3","I 2 2 3","P 2ac 2ab 3","I 2b 2c 3","-P 2 2 3","P 2 2 3 -1n","-F 2 2 3","F 2 2 3 -1d","-I 2 2 3","-P 2ac 2ab 3","-I 2b 2c 3","P 4 2 3","P 4n 2 3","F 4 2 3","F 4d 2 3","I 4 2 3","P 4acd 2ab 3","P 4bd 2ab 3","I 4bd 2c 3","P -4 2 3","F -4 2 3","I -4 2 3","P -4n 2 3","F -4c 2 3","I -4bd 2c 3","-P 4 2 3","-P 4 2 3","-P 4n 2 3","P 4n 2 3 -1n","-F 4 2 3","-F 4c 2 3","F 4d 2 3 -1d","F 4d 2 3 -1cd","-I 4 2 3","-I 4bd 2c 3" }; } // namespace data /*! Constructing an CNSMAPfile does nothing except set the spacegroup and flag the object as not attached to any file for either input or output. The default CNS setting is selected by spacegroup number. \param sg_num The spacegroup number of the CNS setting. */ CNSMAPfile::CNSMAPfile( unsigned int sg_num ) { mode = NONE; if ( sg_num == 0 || sg_num > 230 ) Message::message( Message_fatal( "CNSMAPfile: invalid spacegroup" ) ); Spgr_descr sd( data::cns_sg_data[sg_num], Spgr_descr::Hall ); spacegroup_ = Spacegroup( sd ); } /*! Constructing an CNSMAPfile does nothing except et the spacegroup and flag the object as not attached to any file for either input or output. \param spacegroup The spacegroup. */ CNSMAPfile::CNSMAPfile( Spacegroup spacegroup ) { mode = NONE; spacegroup_ = spacegroup; } /*! Close any files which were left open. This is particularly important since to access the MAP file efficiently, data reads and writes are deferred until the file is closed. */ CNSMAPfile::~CNSMAPfile() { switch ( mode ) { case READ: close_read(); break; case WRITE: close_write(); break; case NONE: break; } } /*! The file is opened for reading. This CNSMAPfile object will remain attached to this file until it is closed. Until that occurs, no other file may be opened with this object, however another CNSMAPfile object could be used to access another file. \param filename_in The input filename or pathname. */ void CNSMAPfile::open_read( const String filename_in ) { if ( mode != NONE ) Message::message( Message_fatal( "CNSMAPfile: open_read - File already open" ) ); filename = filename_in; mode = READ; FILE* f = fopen( filename.c_str(), "r" ); if ( f == NULL ) Message::message( Message_fatal( "CNSMAPfile: open_read - Could not read: "+filename ) ); fclose( f ); mode = READ; } /*! Close the file after reading. */ void CNSMAPfile::close_read() { if ( mode != READ ) Message::message( Message_fatal( "CNSMAPfile: no file open for read" ) ); mode = NONE; } /*! The file is opened for writing. This will be a new file, created entirely from data from within the program, rather than by extending an existing file. Similar restrictions apply as for open_read(). \param filename_out The output filename or pathname. */ void CNSMAPfile::open_write( const String filename_out ) { if ( mode != NONE ) Message::message( Message_fatal( "CNSMAPfile: open_write - File already open" ) ); filename = filename_out; mode = WRITE; } /*! Close the file after writing. */ void CNSMAPfile::close_write() { if ( mode != WRITE ) Message::message( Message_fatal( "CNSMAPfile: no file open for write" ) ); mode = NONE; } /*! When writing an NXmap, the cell for the output map must be set using set_cell(). Note that the NXmap is rather more general than the CNS map, since it can take an arbitrary rotation+skew matrix. The resulting map will only be sensible if the NXmap grid skew matrix reflects the supplied cell. This is not possible in the general case. (Alternatively, opening an equivalent map for read and then closing it again will also set the cell). \param cell The cell description for the output map file. */ void CNSMAPfile::set_cell( const Cell& cell ) { if ( mode != WRITE ) Message::message( Message_fatal( "CNSMAPfile: no file open for write" ) ); cell_ = cell; } /*! Get the spacegroup from the MTZ file. \return The spacegroup. */ const Spacegroup& CNSMAPfile::spacegroup() const { return spacegroup_; } /*! Get the base cell from the MTZ file. \return The cell. */ const Cell& CNSMAPfile::cell() const { return cell_; } /*! Get the grid sampling from the MTZ file. \return The grid sampling. */ const Grid_sampling& CNSMAPfile::grid_sampling() const { return grid_sam_; } /*! Import a complete Xmap object. The supplied Xmap object is examined, and if any of the parameters (spacegroup, cell, or grid_sampling) are unset, then they will be set using values from the file. The data is the imported from the file. If the spacegroups mismatch, the resulting map will obey its spacegroup symmetry, but no expansion will be performed if the file has a higher symmetry and only holds an asymmetric unit. \param xmap The Xmap to be imported. */ template void CNSMAPfile::import_xmap( Xmap& xmap ) { if ( mode != READ ) Message::message( Message_fatal( "CNSMAPfile: no file open for read" ) ); char buf[512]; FILE* f = fopen( filename.c_str(), "r" ); fgets(buf,512,f);; unsigned int n_header_lines; if (sscanf(buf,"%d",&n_header_lines) != 1) fgets(buf,512,f);; // could be blank line first if (sscanf(buf,"%d",&n_header_lines) != 1) Message::message( Message_fatal( "CNSMAPfile: can't get number of header lines" ) ); for (unsigned int i=0;i void CNSMAPfile::export_xmap( const Xmap& xmap ) { if ( mode != WRITE ) Message::message( Message_fatal( "CNSMAPfile: no file open for write" ) ); FILE* f = fopen( filename.c_str(), "w" ); fprintf(f,"\n 1\nFrom clipper Xmap\n"); // get dimensions Grid_sampling gs=xmap.grid_sampling(); Grid_range gr=xmap.grid_asu(); //FIXME: verify these ranges. should they be max+1? int nx=gs.nu(),ny=gs.nv(),nz=gs.nw(); int x0=gr.min().u(),y0=gr.min().v(),z0=gr.min().w(); int xf=gr.max().u(),yf=gr.max().v(),zf=gr.max().w(); fprintf(f,"%8d%8d%8d%8d%8d%8d%8d%8d%8d\n", nx,x0,xf, ny,y0,yf, nz,z0,zf); Cell cell=xmap.cell(); fprintf(f,"%12.5E%12.5E%12.5E%12.5E%12.5E%12.5E\n", cell.a(), cell.b(), cell.c(), cell.alpha_deg(), cell.beta_deg(), cell.gamma_deg()); fprintf(f,"ZYX\n"); int z,y,x; Xmap_base::Map_reference_coord ix( xmap ); for (z=z0; z <=zf; ++z) { fprintf(f,"%8d\n",z); unsigned int i=0; for (y=y0; y<= yf; ++y) { for (x=x0; x<=xf; ++x) { ix.set_coord( Coord_grid( x, y, z) ); fprintf(f,"%12.5E",float(xmap[ix])); i++; if (i==6) { fprintf(f,"\n"); i=0; } } } if ( i != 0 ) fprintf(f,"\n"); } fclose(f); } template void CNSMAPfile::import_nxmap( NXmap& nxmap ) { if ( mode != READ ) Message::message( Message_fatal( "CNSMAPfile: no file open for read" ) ); char buf[512]; FILE* f = fopen( filename.c_str(), "r" ); fgets(buf,512,f);; unsigned int n_header_lines; if (sscanf(buf,"%d",&n_header_lines) != 1) fgets(buf,512,f);; // could be blank line first if (sscanf(buf,"%d",&n_header_lines) != 1) Message::message( Message_fatal( "CNSMAPfile: can't get number of header lines" ) ); for (unsigned int i=0;i void CNSMAPfile::export_nxmap( const NXmap& nxmap ) { if ( mode != WRITE ) Message::message( Message_fatal( "CNSMAPfile: no file open for write" ) ); FILE* f = fopen( filename.c_str(), "w" ); fprintf(f,"\n 1\nFrom clipper NXmap\n"); // get dimensions Grid gs=nxmap.grid(); /* cribbed from ccp4_map_io.cpp. Hope I was smart enough */ /* Because CNS maps don't allow an arbitrary skew matrix, we have to jump through hoops to try and fit an NXmap into one. This code will work for those cases where it is possible and produce garbage otherwise. Don't even try to understand this unless you are pretty smart. */ // cell (set by user, or from previous map) float cp[6]; cp[0] = cell_.descr().a(); cp[3] = cell_.descr().alpha_deg(); cp[1] = cell_.descr().b(); cp[4] = cell_.descr().beta_deg (); cp[2] = cell_.descr().c(); cp[5] = cell_.descr().gamma_deg(); // grid (calculated to fit with cell provided - assume angles match) Coord_frac c0, c1; c0 = nxmap.coord_orth( Coord_map(0,0,0) ).coord_frac(cell_); c1 = nxmap.coord_orth( Coord_map( nxmap.grid().nu(), nxmap.grid().nv(), nxmap.grid().nw() ) ).coord_frac(cell_); grid_sam_ = Grid_sampling( Util::intr( ftype(nxmap.grid().nu())/(c1.u()-c0.u()) ), Util::intr( ftype(nxmap.grid().nv())/(c1.v()-c0.v()) ), Util::intr( ftype(nxmap.grid().nw())/(c1.w()-c0.w()) ) ); Coord_grid g0 = c0.coord_grid(grid_sam_); Coord_grid g1 = g0 + Coord_grid(nxmap.grid()) - Coord_grid(1,1,1); int x0=g0.u(), y0=g0.v(), z0=g0.w(); int xf=g1.u(), yf=g1.v(), zf=g1.w(); fprintf(f,"%8d%8d%8d%8d%8d%8d%8d%8d%8d\n", gs.nu(), g0.u(), g1.u(), gs.nv(), g0.v(), g1.v(), gs.nw(), g0.w(), g1.w()); fprintf(f,"%12.5E%12.5E%12.5E%12.5E%12.5E%12.5E\n", cell_.a(), cell_.b(), cell_.c(), cell_.alpha_deg(), cell_.beta_deg(), cell_.gamma_deg()); fprintf(f,"ZYX\n"); int z,y,x; NXmap_base::Map_reference_coord ix( nxmap ); for (z=z0; z <=zf; ++z) { fprintf(f,"%8d\n",z); unsigned int i=0; for (y=y0; y<= yf; ++y) { for (x=x0; x<=xf; ++x) { ix.set_coord( Coord_grid( x, y, z) ); fprintf(f,"%12.5E",float(nxmap[ix])); i++; if (i==6) { fprintf(f,"\n"); i=0; } } } if ( i != 0 ) fprintf(f,"\n"); } fclose(f); } /*! Import a complete Xmap object. The supplied Xmap object is examined, and if any of the parameters (spacegroup, cell, or grid_sampling) are unset, then they will be set using values from the file. The data is the imported from the file. If the spacegroups mismatch, the resulting map will obey its spacegroup symmetry, but no expansion will be performed if the file has a higher symmetry and only holds an asymmetric unit. This version performs a check on the symmatry of the inport map file. If the import map contains less than a complete ASU, or if it contains more than an ASU and symmetry related positions contain inconsistent values, then an error is returned. This function is only available for float or double maps. \param xmap The Xmap to be imported. \return The ASU check flag */ template CNSMAPfile::ASUerror CNSMAPfile::import_xmap_check_asu( Xmap& xmap, T missing ) { if ( mode != READ ) Message::message( Message_fatal( "CNSMAPfile: no file open for read" ) ); char buf[512]; FILE* f = fopen( filename.c_str(), "r" ); fgets(buf,512,f);; unsigned int n_header_lines; if (sscanf(buf,"%d",&n_header_lines) != 1) fgets(buf,512,f);; // could be blank line first if (sscanf(buf,"%d",&n_header_lines) != 1) Message::message( Message_fatal( "CNSMAPfile: can't get number of header lines" ) ); for (unsigned int i=0;i 0.5 ) s2 = sqrt( s2*s0 - s1*s1 ) / s0; if ( maxerr > 0.01*s2 ) asuerr = ASUINCONSISTENT; return asuerr; } // instantiate the template functions for all reasonable types // xmap import template void CNSMAPfile::import_xmap( Xmap& xmap ); template void CNSMAPfile::import_xmap( Xmap& xmap ); template void CNSMAPfile::import_xmap( Xmap& xmap ); template void CNSMAPfile::import_xmap( Xmap& xmap ); template void CNSMAPfile::import_xmap( Xmap& xmap ); template void CNSMAPfile::import_xmap( Xmap& xmap ); template void CNSMAPfile::import_xmap( Xmap& xmap ); template void CNSMAPfile::import_xmap( Xmap& xmap ); // xmap export template void CNSMAPfile::export_xmap( const Xmap& xmap ); template void CNSMAPfile::export_xmap( const Xmap& xmap ); template void CNSMAPfile::export_xmap( const Xmap& xmap ); template void CNSMAPfile::export_xmap( const Xmap& xmap ); template void CNSMAPfile::export_xmap( const Xmap& xmap ); template void CNSMAPfile::export_xmap( const Xmap& xmap ); template void CNSMAPfile::export_xmap( const Xmap& xmap ); template void CNSMAPfile::export_xmap( const Xmap& xmap ); // nxmap import template void CNSMAPfile::import_nxmap( NXmap& nxmap ); template void CNSMAPfile::import_nxmap( NXmap& nxmap ); template void CNSMAPfile::import_nxmap( NXmap& nxmap ); template void CNSMAPfile::import_nxmap( NXmap& nxmap ); template void CNSMAPfile::import_nxmap( NXmap& nxmap ); template void CNSMAPfile::import_nxmap( NXmap& nxmap ); template void CNSMAPfile::import_nxmap( NXmap& nxmap ); template void CNSMAPfile::import_nxmap( NXmap& nxmap ); // nxmap export template void CNSMAPfile::export_nxmap( const NXmap& nxmap ); template void CNSMAPfile::export_nxmap( const NXmap& nxmap ); template void CNSMAPfile::export_nxmap( const NXmap& nxmap ); template void CNSMAPfile::export_nxmap( const NXmap& nxmap ); template void CNSMAPfile::export_nxmap( const NXmap& nxmap ); template void CNSMAPfile::export_nxmap( const NXmap& nxmap ); template void CNSMAPfile::export_nxmap( const NXmap& nxmap ); template void CNSMAPfile::export_nxmap( const NXmap& nxmap ); // xmap import and check template CNSMAPfile::ASUerror CNSMAPfile::import_xmap_check_asu( Xmap& xmap, ftype32 missing ); template CNSMAPfile::ASUerror CNSMAPfile::import_xmap_check_asu( Xmap& xmap, ftype64 missing ); } // namespace clipper clipper-2.1/clipper/cns/cns_hkl_io.cpp0000644000374100011300000004302611347712651014776 00000000000000/* cns_hkl_io.cpp: class file for reflection data cns_hkl importer */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "cns_hkl_io.h" extern "C" { #include #include } namespace clipper { clipper::String cnstok( FILE* f ) { String s; char c = fgetc( f ); while ( c > '\0' && ! ( c > ' ' && c != '=' ) ) { c = fgetc( f ); } while ( c > '\0' && ( c > ' ' && c != '=' ) ) { s += toupper(c); c = fgetc( f ); } return s; } clipper::String cnsrmk( FILE* f ) { String s; char c = fgetc( f ); while ( c >= ' ' ) { s += toupper(c); c = fgetc( f ); } return s; } /*! Constructing an CNS_HKLfile does nothing except flag the object as not attached to any file for either input or output */ CNS_HKLfile::CNS_HKLfile() { mode = NONE; } /*! Close any files which were left open. This is particularly important since to access the CNS_HKL file efficiently, data reads and writes are deferred until the file is closed. */ CNS_HKLfile::~CNS_HKLfile() { switch ( mode ) { case READ: close_read(); break; case WRITE: close_write(); break; case NONE: break; } } /*! The file is opened for reading. This CNS_HKLfile object will remain attached to this file until it is closed. Until that occurs, no other file may be opened with this object, however another CNS_HKLfile object could be used to access another file. \param filename_in The input filename or pathname. */ void CNS_HKLfile::open_read( const String filename_in ) { if ( mode != NONE ) Message::message( Message_fatal( "CNS_HKLfile: open_read - File already open" ) ); // open the cns_hkl f_sigf_i = NULL; phi_wt_i = NULL; f_phi_i = NULL; abcd_i = NULL; flag_i = NULL; filename = filename_in; FILE* cns_hkl = fopen( filename.c_str(), "r" ); if ( cns_hkl == NULL ) Message::message( Message_fatal( "CNS_HKLfile: open_read - Could not read: "+filename ) ); mode = READ; // read the headers... up to first NREF String s, t, symops; ftype cell[6] = { 0.0, 0.0, 0.0, 90.0, 90.0, 90.0 }; while ( (s=cnstok(cns_hkl)).length() > 0 ) { t = (s+" ").substr(0,4); if ( t == "NREF" ) break; if ( t == "REMA" ) { s = cnsrmk(cns_hkl); std::vector toks = s.split( " =" ); if ( toks[0] == "SYMOP" ) { if ( toks.size() > 1 ) symops += toks[1].split(" ();")[0] + ";"; } if ( toks.size() >= 12 ) { if ( toks[0] == "A" && toks[2] == "B" && toks[4] == "C" ) { cell[0] = toks[1].f(); cell[1] = toks[3].f(); cell[2] = toks[5].f(); } } if ( toks.size() >= 12 ) { if ( toks[6] == "ALPHA" && toks[8] == "BETA" && toks[10] == "GAMMA" ) { cell[3] = toks[7].f(); cell[4] = toks[9].f(); cell[5] = toks[11].f(); } } } } if ( cell[0]*cell[1]*cell[2] > 0.0 ) { Cell_descr cd( cell[0], cell[1], cell[2], cell[3], cell[4], cell[5] ); cell_ = Cell( cd ); resolution_ = resolution( cell_ ); hkl_sampling_ = HKL_sampling( cell_, resolution_ ); std::cerr << cell_.format() << resolution_.limit() << std::endl; } if ( symops.length() > 0 ) { Spgr_descr sd( symops ); spacegroup_ = Spacegroup( sd ); std::cerr << spacegroup_.symbol_xhm() << std::endl; } fclose( cns_hkl ); } /*! Close the file after reading. This command also actually fills in the data in any HKL_data structures which have been marked for import. */ void CNS_HKLfile::close_read() { if ( mode != READ ) Message::message( Message_fatal( "CNS_HKLfile: no file open for read" ) ); // make sure the data list is sized if ( f_sigf_i != NULL ) f_sigf_i->update(); if ( phi_wt_i != NULL ) phi_wt_i->update(); if ( f_phi_i != NULL ) f_phi_i->update(); if ( abcd_i != NULL ) abcd_i->update(); if ( flag_i != NULL ) flag_i->update(); for ( int i = 0; i < fphis_i.size(); i++ ) fphis_i[i].first->update(); xtype fo[2], pw[2], fc[2], hl[4], fl[1]; xtype fphis[256][2]; // limit of 256 fphi column groups per CNS file HKL hkl; FILE* cns_hkl = fopen( filename.c_str(), "r" ); if ( cns_hkl == NULL ) Message::message( Message_fatal( "CNS_HKLfile: import_hkl_data - Could not read: "+filename ) ); // read the data from the CNS_HKL String s, t; while ( (s=cnstok(cns_hkl)).length() > 0 ) { t = (s+" ").substr(0,4); if ( t == "INDE" ) break; } while ( s.length() > 0 ) { hkl.h() = cnstok(cns_hkl).i(); hkl.k() = cnstok(cns_hkl).i(); hkl.l() = cnstok(cns_hkl).i(); fo[0]=fo[1]=pw[0]=pw[1]=fc[0]=fc[1]=hl[0]=hl[1]=hl[2]=hl[3]=fl[0]=0.0; for ( int i = 0; i < fphis_i.size(); i++ ) fphis[i][0]=fphis[i][1]=0.0; while ( 1 ) { s=cnstok(cns_hkl); t = (s+" ").substr(0,4); if ( s.length() == 0 || t == "INDE" ) { break; } else if ( t == "FOBS" ) { fo[0] = cnstok(cns_hkl).f(); pw[0] = Util::d2rad(cnstok(cns_hkl).f()); } else if ( t == "SIGM" ) { fo[1] = cnstok(cns_hkl).f(); } else if ( t == "FOM " ) { pw[1] = cnstok(cns_hkl).f(); } else if ( t == "FCAL" ) { fc[0] = cnstok(cns_hkl).f(); fc[1] = Util::d2rad(cnstok(cns_hkl).f()); } else if ( t == "ABCD" ) { hl[0] = cnstok(cns_hkl).f(); hl[1] = cnstok(cns_hkl).f(); hl[2] = cnstok(cns_hkl).f(); hl[3] = cnstok(cns_hkl).f(); } else if ( t == "TEST" ) { fl[0] = cnstok(cns_hkl).f(); } else { for ( int i = 0; i < fphis_i.size(); i++ ) if ( s == fphis_i[i].second ) { fphis[i][0] = cnstok(cns_hkl).f(); fphis[i][1] = Util::d2rad(cnstok(cns_hkl).f()); } } } if ( f_sigf_i != NULL ) f_sigf_i->data_import( hkl, fo ); if ( phi_wt_i != NULL ) phi_wt_i->data_import( hkl, pw ); if ( f_phi_i != NULL ) f_phi_i->data_import( hkl, fc ); if ( abcd_i != NULL ) abcd_i->data_import( hkl, hl ); if ( flag_i != NULL ) flag_i->data_import( hkl, fl ); for ( int i = 0; i < fphis_i.size(); i++ ) fphis_i[i].first->data_import( hkl, fphis[i] ); } fclose( cns_hkl ); mode = NONE; } /*! The file is opened for writing. This will be a new file, created entirely from data from within the program, rather than by extending an existing file. Similar restrictions apply as for open_read(). \param filename_out The output filename or pathname. */ void CNS_HKLfile::open_write( const String filename_out ) { if ( mode != NONE ) Message::message( Message_fatal( "CNS_HKLfile: open_write - File already open" ) ); // open the output cns_hkl hkl_ptr = NULL; f_sigf_o = NULL; phi_wt_o = NULL; f_phi_o = NULL; abcd_o = NULL; flag_o = NULL; filename = filename_out; FILE* cns_hkl = fopen( filename.c_str(), "w" ); if ( cns_hkl == NULL ) Message::message( Message_fatal( "CNS_HKLfile: open_write - Could not write: "+filename ) ); fclose( cns_hkl ); mode = WRITE; } /*! Close the file after writing. This command also actually writes the data reflection list from the HKL_info object and the data from any HKL_data objects which have been marked for import. */ void CNS_HKLfile::close_write() { if ( mode != WRITE ) Message::message( Message_fatal( "CNS_HKLfile: close_write - no file open for write" ) ); // export the marked list data to an cns_hkl file if ( hkl_ptr == NULL ) Message::message( Message_fatal( "CNS_HKLfile: close_write - no refln list exported" ) ); const HKL_info& hklinf = *hkl_ptr; HKL hkl; xtype x[4]; float f1, f2, f3, f4; FILE* cns_hkl = fopen( filename.c_str(), "w" ); if ( cns_hkl == NULL ) Message::message( Message_fatal( "CNS_HKLfile: close_write - Could not write: "+filename ) ); fprintf( cns_hkl, "NREF=%i\n", hklinf.num_reflections() ); HKL_info::HKL_reference_index ih; for ( ih = hklinf.first(); !ih.last(); ih.next() ) { f1 = f2 = f3 = f4 = 0.0; // default sigf to 0 in case missing hkl = ih.hkl(); fprintf( cns_hkl, "INDE %i %i %i", hkl.h(), hkl.k(), hkl.l() ); if ( f_sigf_o != NULL ) { f_sigf_o->data_export( hkl, x ); for ( int i = 0; i < 4; i++ ) if ( Util::is_nan(x[i]) ) x[i] = 0.0; f1 = float( x[0] ); f2 = float( x[1] ); } if ( phi_wt_o != NULL ) { phi_wt_o->data_export( hkl, x ); for ( int i = 0; i < 4; i++ ) if ( Util::is_nan(x[i]) ) x[i] = 0.0; x[0] = Util::rad2d(x[0]); f3 = float( x[0] ); f4 = float( x[1] ); } fprintf( cns_hkl, " FOBS=%.3f %.3f SIGM=%.3f FOM=%.3f",f1,f3,f2,f4 ); if ( f_phi_o != NULL ) { f_phi_o->data_export( hkl, x ); for ( int i = 0; i < 4; i++ ) if ( Util::is_nan(x[i]) ) x[i] = 0.0; x[1] = Util::rad2d(x[1]); fprintf( cns_hkl, " FCAL=%.3f %.3f",float(x[0]),float(x[1]) ); } if ( abcd_o != NULL ) { abcd_o->data_export( hkl, x ); for ( int i = 0; i < 4; i++ ) if ( Util::is_nan(x[i]) ) x[i] = 0.0; fprintf( cns_hkl, " HLA=%.1f HLB=%.1f HLC=%.1f HLD=%.1f",float(x[0]),float(x[1]),float(x[2]),float(x[3]) ); } if ( flag_o != NULL ) { abcd_o->data_export( hkl, x ); for ( int i = 0; i < 4; i++ ) if ( Util::is_nan(x[i]) ) x[i] = 0.0; fprintf( cns_hkl, " TEST=%i",Util::intr(x[0]) ); } fprintf( cns_hkl, "\n" ); } fclose( cns_hkl ); mode = NONE; } /*! Get the spacegroup from the MTZ file. \return The spacegroup. */ const Spacegroup& CNS_HKLfile::spacegroup() const { return spacegroup_; } /*! Get the base cell from the MTZ file. \return The cell. */ const Cell& CNS_HKLfile::cell() const { return cell_; } /*! Get the resolution limit from the MTZ file. \return The resolution. */ const Resolution& CNS_HKLfile::resolution() const { return resolution_; } /*! Get the HKL sampling from the MTZ file. \return The hkl_sampling. */ const HKL_sampling& CNS_HKLfile::hkl_sampling() const { return hkl_sampling_; } /*! Get the resolution limit from the CNS_HKL file. Since a CNS_HKL file does not contain cell information, a Cell object must be supplied, which will be used to determine the resultion. The result is the resolution determined by the most extreme reflection in the file. \return The resolution. */ Resolution CNS_HKLfile::resolution( const Cell& cell ) const { if ( mode != READ ) Message::message( Message_fatal( "CNS_HKLfile: resolution - no file open for read" ) ); FILE* cns_hkl = fopen( filename.c_str(), "r" ); if ( cns_hkl == NULL ) Message::message( Message_fatal( "CNS_HKLfile: resolution - Could not read: "+filename ) ); // read the reflections from the cns_hkl HKL hkl; ftype slim = 0.0; String s, t; while ( (s=cnstok(cns_hkl)).length() > 0 ) { t = (s+" ").substr(0,4); if ( t == "INDE" ) { hkl.h() = cnstok(cns_hkl).i(); hkl.k() = cnstok(cns_hkl).i(); hkl.l() = cnstok(cns_hkl).i(); slim = Util::max( slim, hkl.invresolsq(cell) ); } } fclose( cns_hkl ); return Resolution( 1.0/sqrt(slim) ); } /*! Import the list of reflection HKLs from an CNS_HKL file into an HKL_info object. For most CNS files, there is no cell or spacegroup information: In this case that data must already be present in the HKL_info object. If the resolution limit of the HKL_info object is lower than the limit of the file, any excess reflections will be rejected, as will any systematic absences or duplicates. For recent CNS files with the cell and symops in the remarks fields, the current state of the HKL_info object is discarded and replaced with the information from the file. \param target The HKL_info object to be initialised. */ void CNS_HKLfile::import_hkl_info( HKL_info& target ) { if ( mode != READ ) Message::message( Message_fatal( "CNS_HKLfile: import_hkl_info - no file open for read" ) ); FILE* cns_hkl = fopen( filename.c_str(), "r" ); if ( cns_hkl == NULL ) Message::message( Message_fatal( "CNS_HKLfile: import_hkl_info - Could not read: "+filename ) ); if ( !cell_.is_null() && !spacegroup_.is_null() && !resolution_.is_null() ) target.init( spacegroup_, cell_, resolution_, false ); ftype slim = target.resolution().invresolsq_limit(); // read the reflections from the cns_hkl std::vector hkls; HKL hkl; String s, t; while ( (s=cnstok(cns_hkl)).length() > 0 ) { t = (s+" ").substr(0,4); if ( t == "INDE" ) { hkl.h() = cnstok(cns_hkl).i(); hkl.k() = cnstok(cns_hkl).i(); hkl.l() = cnstok(cns_hkl).i(); if ( hkl.invresolsq(target.cell()) < slim ) hkls.push_back( hkl ); } } fclose( cns_hkl ); target.add_hkl_list( hkls ); } /*! Import data from an CNS_HKL file into an HKL_data object. This routine does not actually read any data, but rather marks the data to be read when the file is closed. The data to be read (F_sigF or Phi_fom) will be selected based on the type of the HKL_data object. \param cdata The HKL_data object into which data is to be imported. */ void CNS_HKLfile::import_hkl_data( HKL_data_base& cdata ) { if ( mode != READ ) Message::message( Message_fatal( "CNS_HKLfile: import_hkl_data - no file open for read" ) ); if ( cdata.is_null() ) cdata.init( spacegroup_, cell_, hkl_sampling_ ); if ( cdata.type() == data32::F_sigF::type() ) f_sigf_i = &cdata; else if ( cdata.type() == data32::Phi_fom::type() ) phi_wt_i = &cdata; else if ( cdata.type() == data32::F_phi::type() ) f_phi_i = &cdata; else if ( cdata.type() == data32::ABCD::type() ) abcd_i = &cdata; else if ( cdata.type() == data32::Flag::type() ) flag_i = &cdata; else Message::message( Message_fatal( "CNS_HKLfile: import_hkl_data - data must be F_sigF/Phi_fom/F_phi/ABCD/Flag" ) ); } /*! Import data from an CNS_HKL file into an HKL_data object. This routine does not actually read any data, but rather marks the data to be read when the file is closed. The data to be read must be of type F_phi. A column name is given. \param cdata The HKL_data object into which data is to be imported. \param name The column name of the data to import. */ void CNS_HKLfile::import_hkl_data( HKL_data_base& cdata, const String name ) { if ( mode != READ ) Message::message( Message_fatal( "CNS_HKLfile: import_hkl_data - no file open for read" ) ); if ( cdata.is_null() ) cdata.init( spacegroup_, cell_, hkl_sampling_ ); if ( cdata.type() == data32::F_phi::type() ) fphis_i.push_back( std::pair(&cdata,name) ); else Message::message( Message_fatal( "CNS_HKLfile: import_hkl_data - data must be F_phi" ) ); } /*! Export the list of reflection HKLs to an CNS_HKL file from an HKL_info object. */ void CNS_HKLfile::export_hkl_info( const HKL_info& target ) { if ( mode != WRITE ) Message::message( Message_fatal( "CNS_HKLfile: export_hkl_info - no file open for write" ) ); hkl_ptr = ⌖ } /*! Export data from an HKL_data object into an CNS_HKL file. This routine does not actually write any data, but rather marks the data to be written when the file is closed. The data to be read (F_sigF or Phi_fom) will be selected based on the type of the HKL_data object. \param cdata The HKL_data object from which data is to be exported. */ void CNS_HKLfile::export_hkl_data( const HKL_data_base& cdata ) { if ( mode != WRITE ) Message::message( Message_fatal( "CNS_HKLfile: export_hkl_data - no file open for write" ) ); if ( cdata.type() == data32::F_sigF::type() ) f_sigf_o = &cdata; else if ( cdata.type() == data32::Phi_fom::type() ) phi_wt_o = &cdata; else if ( cdata.type() == data32::F_phi::type() ) f_phi_o = &cdata; else if ( cdata.type() == data32::ABCD::type() ) abcd_o = &cdata; else if ( cdata.type() == data32::Flag::type() ) flag_o = &cdata; else Message::message( Message_fatal( "CNS_HKLfile: export_hkl_data - data must be F_sigF/Phi_fom/F_phi/ABCD/Flag" ) ); } } // namespace clipper clipper-2.1/clipper/cns/cns_hkl_io.h0000644000374100011300000001212411144056610014425 00000000000000/*! \file lib/cns_hkl_io.h Header file for reflection data cns_hkl importer */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_CNS_HKL_IO #define CLIPPER_CNS_HKL_IO #include "../core/hkl_datatypes.h" namespace clipper { //! CNS_HKL import/export parent class for clipper objects /*! This is the import/export class which can be linked to an cns_hkl file and be used to transfer data into or out of a Clipper data structure. */ class CNS_HKLfile { public: //! Constructor: does nothing CNS_HKLfile(); //! Destructor: close any file that was left open ~CNS_HKLfile(); //! Open a file for read access void open_read( const String filename_in ); //! Close a file after reading void close_read(); //! Open a file for write access void open_write( const String filename_out ); //! Close a file after writing void close_write(); //! get file spacegroup const Spacegroup& spacegroup() const; //! get file cell const Cell& cell() const; //! get file resolution const Resolution& resolution() const; //! get file HKL sampling const HKL_sampling& hkl_sampling() const; //! get file resolution (if no cell in file) Resolution resolution( const Cell& cell ) const; //! read the reflection list from the CNS_HKL file void import_hkl_info( HKL_info& target ); //! mark a hkl_data for import from CNS_HKL file void import_hkl_data( HKL_data_base& cdata ); //! mark a hkl_data for import from named column of a CNS_HKL file void import_hkl_data( HKL_data_base& cdata, const String name ); //! write the reflection list to the CNS_HKL file void export_hkl_info( const HKL_info& target ); //! mark a hkl_data for export to CNS_HKL file void export_hkl_data( const HKL_data_base& cdata ); private: enum CNS_HKLmode { NONE, READ, WRITE }; CNS_HKLmode mode; //!< file mode String filename; //!< input/output file HKL_data_base* f_sigf_i; //!< input HKL_data object HKL_data_base* phi_wt_i; //!< input HKL_data object HKL_data_base* f_phi_i ; //!< input HKL_data object HKL_data_base* abcd_i; //!< input HKL_data object HKL_data_base* flag_i; //!< input HKL_data object const HKL_data_base* f_sigf_o; //!< output HKL_data object const HKL_data_base* phi_wt_o; //!< output HKL_data object const HKL_data_base* f_phi_o; //!< output HKL_data object const HKL_data_base* abcd_o; //!< output HKL_data object const HKL_data_base* flag_o; //!< output HKL_data object //! object which supplies the hkl list (write mode only) const HKL_info* hkl_ptr; //! input HKL_data object std::vector > fphis_i; //! File spacegroup, cell, resolution Spacegroup spacegroup_; Cell cell_; Resolution resolution_; HKL_sampling hkl_sampling_; }; } // namespace clipper #endif clipper-2.1/clipper/cns/cns_map_io.h0000644000374100011300000001047311247463275014446 00000000000000/*! \file ccp4/ccp4_map_io.h Header file for reflection data map importer */ //c Copyright (C) 2006 Jon A. Christopher, Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_CNS_MAP_IO #define CLIPPER_CNS_MAP_IO #include "../core/container_map.h" namespace clipper { //! MAP import/export parent class for clipper objects /*! This is the import/export class which can be linked to a CNS map file and be used to transfer data into or out of a Clipper data structure. */ class CNSMAPfile { public: //! Constructor: from CNS spacegroup number CNSMAPfile(unsigned int sg_num=1); //! Constructor: from Spacegroup CNSMAPfile( Spacegroup spacegroup ); //! Destructor: close any file that was left open ~CNSMAPfile(); //! Open a file for read access void open_read( const String filename_in ); //! Close a file after reading void close_read(); //! Open a file for read access void open_write( const String filename_out ); //! Close a file after reading void close_write(); //! set cell desription (NXmap write only) void set_cell( const Cell& cell ); //! get file spacegroup const Spacegroup& spacegroup() const; //! get file cell const Cell& cell() const; //! get file grid_sampling const Grid_sampling& grid_sampling() const; //! import data to Xmap template void import_xmap( Xmap& xmap ); //! export data from Xmap template void export_xmap( const Xmap& xmap ); //! import data to NXmap template void import_nxmap( NXmap& nxmap ); //! export data from NXmap template void export_nxmap( const NXmap& nxmap ); enum ASUerror { ASUCORRECT, ASUINCOMPLETE, ASUINCONSISTENT }; //! import data to Xmap and check ASU (float/double only) template ASUerror import_xmap_check_asu( Xmap& xmap, T missing ); protected: enum MAPmode { NONE, READ, WRITE }; String filename; //!< filename MAPmode mode; //!< mode // header info Spacegroup spacegroup_; //!< map spacegroup Cell cell_; //!< map cell Grid_sampling grid_sam_; //!< cell grid sampling Grid_range grid_map_; //!< map grid extent }; } // namespace clipper #endif clipper-2.1/clipper/cns/Makefile.am0000644000374100011300000000106211372264321014202 00000000000000# Makefile.am, passed: clipper/cns, extracted subdir: cns # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper/cns ## -*- mode: Makefile; mode: font-lock -*- INCLUDES=${FFTW_CXXFLAGS} library_include_HEADERS = \ cns_hkl_io.h \ cns_map_io.h lib_LTLIBRARIES = libclipper-cns.la libclipper_cns_la_SOURCES = \ cns_hkl_io.cpp \ cns_map_io.cpp library_includedir = $(pkgincludedir)/cns libclipper_cns_la_LDFLAGS = -version-info @CLIPPER_LT_VERSION@ libclipper_cns_la_LIBADD = \ $(top_builddir)/clipper/core/libclipper-core.la clipper-2.1/clipper/cns/Makefile.in0000644000374100011300000004456211372264333014232 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am, passed: clipper/cns, extracted subdir: cns # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper/cns VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = clipper/cns DIST_COMMON = $(library_include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ccp4.m4 \ $(top_srcdir)/config/clipper.m4 $(top_srcdir)/config/fftw.m4 \ $(top_srcdir)/config/gpp4.m4 $(top_srcdir)/config/mmdb.m4 \ $(top_srcdir)/config/utimbuf.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(library_includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libclipper_cns_la_DEPENDENCIES = \ $(top_builddir)/clipper/core/libclipper-core.la am_libclipper_cns_la_OBJECTS = cns_hkl_io.lo cns_map_io.lo libclipper_cns_la_OBJECTS = $(am_libclipper_cns_la_OBJECTS) libclipper_cns_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libclipper_cns_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libclipper_cns_la_SOURCES) DIST_SOURCES = $(libclipper_cns_la_SOURCES) HEADERS = $(library_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AR = @AR@ AR_FLAGS = @AR_FLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCP4_CXXFLAGS = @CCP4_CXXFLAGS@ CCP4_LIBS = @CCP4_LIBS@ CFLAGS = @CFLAGS@ CLIPPER_CCP4_DIR = @CLIPPER_CCP4_DIR@ CLIPPER_CIF_DIR = @CLIPPER_CIF_DIR@ CLIPPER_CNS_DIR = @CLIPPER_CNS_DIR@ CLIPPER_CONTRIB_DIR = @CLIPPER_CONTRIB_DIR@ CLIPPER_LT_VERSION = @CLIPPER_LT_VERSION@ CLIPPER_MINIMOL_DIR = @CLIPPER_MINIMOL_DIR@ CLIPPER_MMDB_DIR = @CLIPPER_MMDB_DIR@ CLIPPER_PHS_DIR = @CLIPPER_PHS_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_CXXFLAGS = @FFTW_CXXFLAGS@ FFTW_LIBS = @FFTW_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMDB_CXXFLAGS = @MMDB_CXXFLAGS@ MMDB_LIBS = @MMDB_LIBS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = ${FFTW_CXXFLAGS} library_include_HEADERS = \ cns_hkl_io.h \ cns_map_io.h lib_LTLIBRARIES = libclipper-cns.la libclipper_cns_la_SOURCES = \ cns_hkl_io.cpp \ cns_map_io.cpp library_includedir = $(pkgincludedir)/cns libclipper_cns_la_LDFLAGS = -version-info @CLIPPER_LT_VERSION@ libclipper_cns_la_LIBADD = \ $(top_builddir)/clipper/core/libclipper-core.la all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu clipper/cns/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu clipper/cns/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): 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 \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ 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)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libclipper-cns.la: $(libclipper_cns_la_OBJECTS) $(libclipper_cns_la_DEPENDENCIES) $(libclipper_cns_la_LINK) -rpath $(libdir) $(libclipper_cns_la_OBJECTS) $(libclipper_cns_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cns_hkl_io.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cns_map_io.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-library_includeHEADERS: $(library_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(library_includedir)" || $(MKDIR_P) "$(DESTDIR)$(library_includedir)" @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(library_includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \ done uninstall-library_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(library_includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(library_includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(library_includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-library_includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-library_includeHEADERS \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: clipper-2.1/clipper/clipper-mmdbold.h0000644000374100011300000000024510736662163014621 00000000000000/* Clipper header file */ /* (C) 2000-2003 Kevin Cowtan */ #ifndef CLIPPER_MMDBOLD_H #define CLIPPER_MMDBOLD_H #include "clipper/mmdbold/container_mmdb.h" #endif clipper-2.1/clipper/core/0000777000374100011300000000000011372264353012405 500000000000000clipper-2.1/clipper/core/fftmap.h0000644000374100011300000002534110736415734013760 00000000000000/*! \file lib/fftmap.h Header file for P1 fft map */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_FFTMAP #define CLIPPER_FFTMAP #include "coords.h" #include namespace clipper { // fft type typedef float ffttype; // forward definition namespace datatypes { template class F_phi; } // base class for FFT classes class FFTmap_base { public: enum FFTtype { Default, Measure, Estimate }; //!< optimisation options protected: static Mutex mutex; //!< Thread safety }; //! FFTmap_p1: low level P1 map used for calculating FFTs /*! This is a pure real P1 map, with an extra section in reciprocal space to allow generation of the full set of resiprocal space magnitudes. Access is by Coord_grid in both spaces, and indices must be non-negative and in range. The first and last sections along the half-length direction only have half the elements stored, the contents of the other half is ignored. */ class FFTmap_p1 : public FFTmap_base { public: //! Null constructor FFTmap_p1(); //! Copy constructor FFTmap_p1( const FFTmap_p1& other ) { copy(other); } //! Constructor: takes grid FFTmap_p1( const Grid_sampling& grid_sam, const FFTtype type = Default ); //! Assignment operator const FFTmap_p1& operator =(const FFTmap_p1& other) { return copy(other); } //! initialiser: takes grid void init( const Grid_sampling& grid_sam, const FFTtype type = Default ); //! Reset void reset(); //! Return real space grid. const Grid_sampling& grid_real() const { return grid_sam_; } //! Return reciprocal space grid (i.e. half real grid + 1 section). const Grid& grid_reci() const { return grid_reci_; } //! Test whether a coordinate is in the valid part of the recip. grid. bool uniq_reci( const Coord_grid& c ) const { return ( (c.w()>0 && c.w()0 && c.v() get_hkl( const HKL& hkl ) const; //! set reciprocal space data: slow form with hemisphere check void set_hkl( const HKL& hkl, const std::complex& f ); //! get reciprocal space data const std::complex& cplx_data( const Coord_grid& c ) const { return data_c[ grid_reci_.index( c ) ]; } //! set reciprocal space data std::complex& cplx_data( const Coord_grid& c ) { return data_c[ grid_reci_.index( c ) ]; } //! get real space data const ffttype& real_data( const Coord_grid& c ) const { return data_r[ grid_real_.index( c ) ]; } //! set real space data ffttype& real_data( const Coord_grid& c ) { return data_r[ grid_real_.index( c ) ]; } //! set/get default optimisation type static FFTtype& default_type() { return default_type_; } void debug() const; protected: const FFTmap_p1& copy( const FFTmap_p1& other ); //!< copy function enum FFTmode { NONE, RECI, REAL, OTHER }; //!< space enumeration FFTmode mode; //!< real or reciprocal space? FFTtype type_; //!< optimisation options Grid_sampling grid_sam_; //!< unit cell grid Grid grid_reci_; //!< reciprocal space grid Grid grid_real_; //!< real space grid Grid grid_half_; //!< half grid (for marking unique) Matrix req_kl, req_uv; //!< reci section lookup std::vector req_l, req_u; //!< real section lookup std::vector datavec; //!< vector for the data ffttype* data_r; //!< pointer to real data std::complex* data_c; //!< pointer to complex data static FFTtype default_type_; //!< default optimisation options }; //! FFTmap: P1 map with symmetry used for calculating FFTs /*! The FFTmap is represented in P1 in memory. However, it also has a spacegroup, and the contained data remains consistent with this spacegroup at all times. It has three states - unassigned, real-space, and reciprocal space. In real space it contains real map data. In reciprocal space it holds a hemisphere of complex structure factors, with the Friedels duplicated on the zero section. The user should be able to ignore all the issues of spacegroup symmetry, Friedel opposites, and storage order. */ class FFTmap : private FFTmap_p1 { public: //! Null constructor FFTmap(); //! Constructor: takes spacegroup, cell, grid FFTmap( const Spacegroup& spacegroup, const Cell& cell, const Grid_sampling grid_sam, const FFTtype type = Default ); //! initialiser void init( const Spacegroup& spacegroup, const Cell& cell, const Grid_sampling grid_sam, const FFTtype type = Default ); //! Reset void reset(); //! get the cell const Cell& cell() const { return cell_; } //! get the spacegroup const Spacegroup& spacegroup() const { return spacegroup_; } //! get the cell grid const Grid_sampling& grid_sampling() const { return FFTmap_p1::grid_real(); } //! Transform to real space void fft_h_to_x(); //! Transform to reciprocal space void fft_x_to_h(); //! get reciprocal space data template void get_recip_data( const HKL& rfl, datatypes::F_phi& fphi ) const; //! set reciprocal space data template void set_recip_data( const HKL& rfl, const datatypes::F_phi& fphi ); //! get real space data template void get_real_data( const Coord_grid& c, T& datum ) const; //! set real space data template void set_real_data( const Coord_grid& c, const T& datum ); //! get reciprocal space data (No error checking) datatypes::F_phi get_recip_data( const HKL& rfl ) const; //! get real space data (No error checking) const ffttype& get_real_data( const Coord_grid& c ) const { return real_data(c.unit(grid_real())); } //! calculate map-like object from reflection-like object template void fft_rfl_to_map( const H& h, X& x ); //! calculate reflection-like object from map-like object template void fft_map_to_rfl( const X& x, H& h ); void debug() const; protected: Cell cell_; //!< unit cell Spacegroup spacegroup_; //!< spacegroup std::vector isymop; //!< Integerised symops }; // template implementations /*! Fill this FFTmap object from a reflection object, transform it, and fill the given map object from the FFTmap. This will work for any reflection data object which implements a HKL_reference_index, and every map data object which implements a Map_reference_index. For the results to be sensible, the spacegroup, cell and grids should match. (The map will be zeroed if necessary). \param h The source reflection data object. \param x The target map object. */ template void FFTmap::fft_rfl_to_map( const H& h, X& x ) { // zero the map reset(); // copy from reflection data typename H::HKL_reference_index ih; for ( ih = h.first_data(); !ih.last(); h.next_data( ih ) ) set_recip_data( ih.hkl(), h[ih] ); // fft fft_h_to_x(); // and copy into the map typename X::Map_reference_index ix; for ( ix = x.first(); !ix.last(); ix.next() ) get_real_data( ix.coord(), x[ix] ); } /*! Fill this FFTmap object from a map object, transform it, and fill the given reflection object from the FFTmap. This will work for any reflection data object which implements a HKL_reference_index, and every map data object which implements a Map_reference_index. For the results to be sensible, the spacegroup, cell and grids should match. (The map will be zeroed if necessary). \param x The source map object. \param h The target reflection data object. */ template void FFTmap::fft_map_to_rfl( const X& x, H& h ) { // zero the map reset(); // copy into the map typename X::Map_reference_index ix; for ( ix = x.first(); !ix.last(); ix.next() ) set_real_data( ix.coord(), x[ix] ); // fft fft_x_to_h(); // now fill it typename H::HKL_reference_index ih; for ( ih = h.first(); !ih.last(); ih.next() ) get_recip_data( ih.hkl(), h[ih] ); } } // namespace clipper #endif clipper-2.1/clipper/core/clipper_test.cpp0000644000374100011300000000737410363703537015536 00000000000000/* clipper_test.cpp: implementation file for clipper self-test functions */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "clipper_test.h" namespace clipper { Test_base::Test_base() { stream_ = NULL; count = error_count = 0; } void Test_base::set_stream( std::ostream& stream ) { //stream.width(?); stream.precision(8); stream_ = &stream; } //! test that the next value matches the stored data bool Test_base::test( const String& id, const double& value ) { bool pass = false; if ( stream_ != NULL ) *stream_ << value << "\n"; if ( count < data_val.size() ) { double val( data_val[count] ); double tol( data_tol[count] ); if ( fabs( value - val ) < tol ) { pass = true; } else { std::cerr << "Self test: " << id << count << " Result: " << val-tol << " < " << value << " < " << val+tol << "\n"; } } else if ( count == data_val.size() ) { Message::message( Message_warn( "Self test: out of data." ) ); } count++; if ( !pass ) error_count++; return pass; } bool Test_base::test( const String& id, const double& value, const double& val, const double& tol ) { bool pass = false; if ( fabs( value - val ) < tol ) { pass = true; } else { std::cerr << "Self test: " << id << " Result: " << val-tol << " < " << value << " < " << val+tol << "\n"; } if ( !pass ) error_count++; return pass; } bool Test_base::test( const String& id, const int& value, const int& val ) { bool pass = false; if ( value == val ) { pass = true; } else { std::cerr << "Self test: " << id << " Result: " << value << " == " << val << "\n"; } if ( !pass ) error_count++; return pass; } } // namespace clipper clipper-2.1/clipper/core/clipper_memory.h0000644000374100011300000001775211205015646015526 00000000000000/*! \file lib/clipper_memory.h Header file for clipper memory handlers */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_MEMORY #define CLIPPER_MEMORY #include "clipper_thread.h" #include namespace clipper { //! Base class for properties of arbitrary types class Property_base { public: virtual Property_base* clone() const = 0; //!< factory copy method virtual ~Property_base() {}; //!< destructor }; //! Template for a property holding an arbitrary type template class Property : public Property_base { public: //! constructor: takes contents explicit Property( const T& val ) { val_ = val; } ~Property() {} Property_base* clone() const { return new Property( *this ); } const T& value() const { return val_; } //!< return value of contents private: T val_; }; //! Class for holding a list of labelled properties of arbitrary types /*! To add a property list to an object, derive it from this class, or include a member and mirror the methods. To add a property, simply call insert_property(label,property). Properties must be objects derived from clipper::Propert_base. Usually, you can just use the template form, clipper::Property. To read a property which you know exists and is of a particular type, use: \code const T& obj = dynamic_cast& >(list.get_property( label )).value(); \endcode If you are unsure if a property is present, use the exists_property(label) method. If you are unsure of a property's type, dynamic cast a pointer and test for null. e.g. \code if ( !list.exists_property( label ) ) { error("No such property"); } const Property_base* ptr = &list.get_property( label ); if ( dynamic_cast(ptr) == NULL ) { error("Wrong type"); } const T& obj = *(dynamic_cast(ptr)); \endcode */ class PropertyManager { public: PropertyManager() {} //!< null constructor PropertyManager( const PropertyManager& mgr ); //!< copy constructor PropertyManager& operator =( const PropertyManager& mgr ); //!< assign op ~PropertyManager(); //!< destructor PropertyManager& copy( const PropertyManager& mgr ); //!< copy manager //! add a labelled property to the list bool set_property(const std::string& label, const Property_base& property); //! get a labelled property from the list const Property_base& get_property( const std::string& label ) const; bool exists_property(const std::string& label) const; //!< test for property bool delete_property(const std::string& label); //!< delete property private: std::vector > property_; //static Mutex mutex; //!< thread safety }; //! Object Cache manager /*! The object cache is a tool for storing information which may appear several times. Examples include tables of information for spacegroups or crystallographic maps. When a new object is created, a check is first done to see if such an object already exists in the cache, in which case that copy is used. Otherwise a new copy is added to the cache. A cached object must implement: - a constructor from a type T - a method 'matches(T)' which tests if it constructed from that object - a 'format()' method, returning a string description of the contents The type T should be a compact unique description of the object. Referring to the cache returns an ObjectCache::Reference to a cache object. This object performs reference counting, which is used for garbage collection. To retrieve the actual cached data, use the ObjectCache::Reference::data() method. The data is held at a fixed memory location, therefore pointers to the data may be safely kept, as long as they are discarded as soon as the reference is discarded (at which point garbage collection may occur). Ideally this would be a class with static members only, but some compilers have trouble with static members of template classes. Garbage collection modes include: - ObjectCache::NORMAL : Remove an old object only when a new object is required and an old object is no longer in use. (default) - ObjectCache::MINMEM : Remove an old object as soon as it is no longer in use. - ObjectCache::MAXMEM : Never remove old objects. The more memory hungry modes may improve performance for some problems where a new object may be created which was already used and destroyed before. */ template class ObjectCache { public: //! ObjectCache reference class class Reference { public: Reference() : obj_(NULL) {} Reference( const Reference& other ); ~Reference(); void operator =( const Reference& other ); bool is_null() const { return obj_ == NULL; } const T& data() const { return obj_->second; } private: std::pair* obj_; //! unsafe constructor (thread must be locked) Reference( std::pair* obj ) { obj_ = obj; obj_->first++; } friend class ObjectCache; }; enum MODE { NORMAL, MINMEM, MAXMEM }; //!< garbage collection mode ObjectCache(); //!< constructor ~ObjectCache(); //!< destructor, can message on contents void set_mode( const MODE& mode ); //!< set garbage collection mode void purge(); //!< purge unreferenced objects from cache void destroy(); //!< VERY DANGEROUS, DO NOT USE void debug() const; //! cache or return data by key Reference cache( const typename T::Key& key ); private: std::vector*> cache_; //!< the cache ptrs MODE mode_; //!< the garbage collection mode }; // for template implementations, see clipper_instance.cpp } // namespace clipper #endif clipper-2.1/clipper/core/resol_targetfn.h0000644000374100011300000005014411270270267015512 00000000000000/*! \file lib/resol_targetfn.h Header file for resolution function generator */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_RESOL_TARGETFN #define CLIPPER_RESOL_TARGETFN #include "resol_basisfn.h" #include "hkl_datatypes.h" namespace clipper { //! simple mean |F|n target /*! This class implements the target function for calculating mean |F|n as a function of position in reciprocal space. It includes the appropriate multiplicity correction, and so can be applied to any type with an 'f' member with the same dimensions as an |F| or |U| (or an uncorrected |E|). \Note This function should not be used to scale F's to E's. See TargetFn_scaleEsq. */ template class TargetFn_meanFnth : public TargetFn_base { public: //! constructor: takes the datalist against which to calc target, and power TargetFn_meanFnth( const HKL_data& hkl_data_, const ftype& n ); //! return the value and derivatives of the target function Rderiv rderiv( const HKL_info::HKL_reference_index& ih, const ftype& fh ) const; //! the type of the function: optionally used to improve convergence FNtype type() const { return QUADRATIC; } private: ftype power; const HKL_data* hkl_data; }; //! simple mean |E|n target /*! This class implements the target function for calculating mean |E|n as a function of position in reciprocal space. It includes the appropriate multiplicity correction, and so can be applied to any type with an 'E' member with the same dimensions as an |E| (or corrected |F| or |U|). \Note This function should not be used to scale F's to E's. See TargetFn_scaleEsq. */ template class TargetFn_meanEnth : public TargetFn_base { public: //! constructor: takes the datalist against which to calc target, and power TargetFn_meanEnth( const HKL_data& hkl_data_, const ftype& n ); //! return the value and derivatives of the target function Rderiv rderiv( const HKL_info::HKL_reference_index& ih, const ftype& fh ) const; //! the type of the function: optionally used to improve convergence FNtype type() const { return QUADRATIC; } private: ftype power; const HKL_data* hkl_data; }; //! |F|2 scaling target /*! This class implements the target function for calculating the scale factor to scale one set of F's to another. The resulting scale is the square of the factor that scales the first set of data to match the second. */ template class TargetFn_scaleF1F2 : public TargetFn_base { public: //! constructor: takes the datalist against which to calc target TargetFn_scaleF1F2( const HKL_data& hkl_data1_, const HKL_data& hkl_data2_ ); //! return the value and derivatives of the target function Rderiv rderiv( const HKL_info::HKL_reference_index& ih, const ftype& fh ) const; //! the type of the function: optionally used to improve convergence FNtype type() const { return QUADRATIC; } private: const HKL_data* hkl_data1; const HKL_data* hkl_data2; }; //! log |F|2 scaling target /*! This class implements the target function for calculating the scale factor to scale the weighted log of one set of F's to another. The resulting scale is the square of the factor that scales the first set of data to match the second. The log scaling target is used in conjunction with the log-Gaussian basis functions for a fast and robust approximation to iso/aniso Gaussian scaling. */ template class TargetFn_scaleLogF1F2 : public TargetFn_base { public: //! constructor: takes the datalist against which to calc target TargetFn_scaleLogF1F2( const HKL_data& hkl_data1_, const HKL_data& hkl_data2_ ); //! return the value and derivatives of the target function Rderiv rderiv( const HKL_info::HKL_reference_index& ih, const ftype& fh ) const; //! the type of the function: optionally used to improve convergence FNtype type() const { return QUADRATIC; } private: const HKL_data* hkl_data1; const HKL_data* hkl_data2; }; /*! This class implements the target function for calculating the scale factor to scale one set of I's to another. The resulting scale is the square of the factor that scales the first set of data to match the second. */ template class TargetFn_scaleI1I2 : public TargetFn_base { public: //! constructor: takes the datalist against which to calc target TargetFn_scaleI1I2( const HKL_data& hkl_data1_, const HKL_data& hkl_data2_ ); //! return the value and derivatives of the target function Rderiv rderiv( const HKL_info::HKL_reference_index& ih, const ftype& fh ) const; //! the type of the function: optionally used to improve convergence FNtype type() const { return QUADRATIC; } private: const HKL_data* hkl_data1; const HKL_data* hkl_data2; }; //! log |I| scaling target /*! This class implements the target function for calculating the scale factor to scale the weighted log of one set of I's to another. The resulting scale is the square of the factor that scales the first set of data to match the second. The log scaling target is used in conjunction with the log-Gaussian basis functions for a fast and robust approximation to iso/aniso Gaussian scaling. */ template class TargetFn_scaleLogI1I2 : public TargetFn_base { public: //! constructor: takes the datalist against which to calc target TargetFn_scaleLogI1I2( const HKL_data& hkl_data1_, const HKL_data& hkl_data2_ ); //! return the value and derivatives of the target function Rderiv rderiv( const HKL_info::HKL_reference_index& ih, const ftype& fh ) const; //! the type of the function: optionally used to improve convergence FNtype type() const { return QUADRATIC; } private: const HKL_data* hkl_data1; const HKL_data* hkl_data2; }; //! |E|2 scaling target /*! This class implements the target function for calculating the scale factor to normalise to <|E|2> = 1. Note that this is not the same as dividing by <|E|2>, except in a few special cases, e.g. a simple resolution bins calculation. The resulting targen function is the square of the value by which |E| should be multiplied to acheive the correct normalisation. */ template class TargetFn_scaleEsq : public TargetFn_base { public: //! constructor: takes the datalist against which to calc target TargetFn_scaleEsq( const HKL_data& hkl_data_ ); //! return the value and derivatives of the target function Rderiv rderiv( const HKL_info::HKL_reference_index& ih, const ftype& fh ) const; //! the type of the function: optionally used to improve convergence FNtype type() const { return QUADRATIC; } private: const HKL_data* hkl_data; }; //! \deprecated simple sigma_a target function /*! This class implements the target function for calculating sigma_a. Required is a datalist containing Eo, Ec. It actually refines omegaa = sigmaa/(1-sigmaa^2). This has better proerties for refinement. To get sigmaa use \code sigmaa = ( sqrt( 4*omegaa^2 + 1 ) - 1 ) / ( 2*omegaa ) \endcode This is available as a static function: \code sigmaa = targetfn.sigmaa( omegaa ) \endcode This version simplifies terms in |Eo|^2 and |Ec|^2 which should average out to 1 if the normalisation scheme is consistent with the sigmaa calc. Convergence is good for calculations using the 'binner' basis function, however the smooth basis function have convergence problems. This is still under investigation. */ template class TargetFn_sigmaa_omegaa : public TargetFn_base { public: //! constructor: takes the datalist against which to calc target TargetFn_sigmaa_omegaa( const HKL_data& eo, const HKL_data& ec ); //! return the value and derivatives of the target function Rderiv rderiv( const HKL_info::HKL_reference_index& ih, const ftype& omegaa ) const; //! convert omegaa to sigmaa static ftype sigmaa( const ftype& omegaa ) { ftype omeg = (omegaa>0.05) ? omegaa : (0.05*exp(omegaa/0.05-1.0)); return 0.5 * ( sqrt( 4.0*omeg*omeg + 1.0 ) - 1.0 ) / omeg; } private: const HKL_data* eo_data; const HKL_data* ec_data; }; //! \deprecated simple sigma_a target function /*! \par Warning: Convergence of this basis-function can be unreliable under some circumstances. Use clipper::TargetFn_sigmaa_omegaa instead, except for development purposes. This class implements the target function for calculating sigma_a. Required is a datalist containing Eo, Ec. This version simplifies terms in |Eo|^2 and |Ec|^2 which should average out to 1 if the normalisation scheme is consistent with the sigmaa calc. */ template class TargetFn_sigmaa : public TargetFn_base { public: //! constructor: takes the datalist against which to calc target TargetFn_sigmaa( const HKL_data& eo, const HKL_data& ec ); //! return the value and derivatives of the target function Rderiv rderiv( const HKL_info::HKL_reference_index& ih, const ftype& sigmaa0 ) const; //! convert function to sigmaa static ftype sigmaa( const ftype& sigm ) { return sigm; } private: const HKL_data* eo_data; const HKL_data* ec_data; }; // implementations for template functions // mean F^nth template TargetFn_meanFnth::TargetFn_meanFnth( const HKL_data& hkl_data_, const ftype& n ) { power = n; hkl_data = &hkl_data_; } template TargetFn_base::Rderiv TargetFn_meanFnth::rderiv( const HKL_info::HKL_reference_index& ih, const ftype& fh ) const { Rderiv result; const HKL_data& data = *hkl_data; if ( !data[ih].missing() ) { ftype d = fh - pow( ftype(data[ih].f()) / sqrt(ih.hkl_class().epsilon()), power ); result.r = d * d; result.dr = 2.0 * d; result.dr2 = 2.0; } else { result.r = result.dr = result.dr2 = 0.0; } return result; } // mean E^nth template TargetFn_meanEnth::TargetFn_meanEnth( const HKL_data& hkl_data_, const ftype& n ) { power = n; hkl_data = &hkl_data_; } template TargetFn_base::Rderiv TargetFn_meanEnth::rderiv( const HKL_info::HKL_reference_index& ih, const ftype& fh ) const { Rderiv result; const HKL_data& data = *hkl_data; if ( !data[ih].missing() ) { ftype d = fh - pow( ftype(data[ih].E()), power ); result.r = d * d; result.dr = 2.0 * d; result.dr2 = 2.0; } else { result.r = result.dr = result.dr2 = 0.0; } return result; } // F1-F2 scaling template TargetFn_scaleF1F2::TargetFn_scaleF1F2( const HKL_data& hkl_data1_, const HKL_data& hkl_data2_ ) { hkl_data1 = &hkl_data1_; hkl_data2 = &hkl_data2_; } template TargetFn_base::Rderiv TargetFn_scaleF1F2::rderiv( const HKL_info::HKL_reference_index& ih, const ftype& fh ) const { Rderiv result; const T1& ft1 = (*hkl_data1)[ih]; const T2& ft2 = (*hkl_data2)[ih]; if ( !ft1.missing() && !ft2.missing() ) { const ftype eps = ih.hkl_class().epsilon(); const ftype f1 = pow( ft1.f(), 2 ) / eps; const ftype f2 = pow( ft2.f(), 2 ) / eps; const ftype d = fh*f1 - f2; result.r = d * d / f1; result.dr = 2.0 * d; result.dr2 = 2.0 * f1; } else { result.r = result.dr = result.dr2 = 0.0; } return result; } // Log F1-F2 scaling template TargetFn_scaleLogF1F2::TargetFn_scaleLogF1F2( const HKL_data& hkl_data1_, const HKL_data& hkl_data2_ ) { hkl_data1 = &hkl_data1_; hkl_data2 = &hkl_data2_; } template TargetFn_base::Rderiv TargetFn_scaleLogF1F2::rderiv( const HKL_info::HKL_reference_index& ih, const ftype& fh ) const { Rderiv result; result.r = result.dr = result.dr2 = 0.0; const T1& ft1 = (*hkl_data1)[ih]; const T2& ft2 = (*hkl_data2)[ih]; if ( !ft1.missing() && !ft2.missing() ) if ( ft1.f() > 1.0e-6 && ft2.f() > 1.0e-6 ) { const ftype eps = ih.hkl_class().epsilon(); const ftype f1 = pow( ft1.f(), 2 ) / eps; const ftype f2 = pow( ft2.f(), 2 ) / eps; const ftype w = 1.0; // f1 * f2; const ftype d = fh + log(f1) - log(f2); result.r = w * d * d; result.dr = 2.0 * w * d; result.dr2 = 2.0 * w; } return result; } // I1-I2 scaling template TargetFn_scaleI1I2::TargetFn_scaleI1I2( const HKL_data& hkl_data1_, const HKL_data& hkl_data2_ ) { hkl_data1 = &hkl_data1_; hkl_data2 = &hkl_data2_; } template TargetFn_base::Rderiv TargetFn_scaleI1I2::rderiv( const HKL_info::HKL_reference_index& ih, const ftype& fh ) const { Rderiv result; const T1& ft1 = (*hkl_data1)[ih]; const T2& ft2 = (*hkl_data2)[ih]; if ( !ft1.missing() && !ft2.missing() ) { const ftype eps = ih.hkl_class().epsilon(); const ftype f1 = ft1.I() / eps; const ftype f2 = ft2.I() / eps; const ftype d = fh*f1 - f2; result.r = d * d / f1; result.dr = 2.0 * d; result.dr2 = 2.0 * f1; } else { result.r = result.dr = result.dr2 = 0.0; } return result; } // Log I1-I2 scaling template TargetFn_scaleLogI1I2::TargetFn_scaleLogI1I2( const HKL_data& hkl_data1_, const HKL_data& hkl_data2_ ) { hkl_data1 = &hkl_data1_; hkl_data2 = &hkl_data2_; } template TargetFn_base::Rderiv TargetFn_scaleLogI1I2::rderiv( const HKL_info::HKL_reference_index& ih, const ftype& fh ) const { Rderiv result; result.r = result.dr = result.dr2 = 0.0; const T1& ft1 = (*hkl_data1)[ih]; const T2& ft2 = (*hkl_data2)[ih]; if ( !ft1.missing() && !ft2.missing() ) if ( ft1.I() > 1.0e-6 && ft2.I() > 1.0e-6 ) { const ftype eps = ih.hkl_class().epsilon(); const ftype f1 = ft1.I() / eps; const ftype f2 = ft2.I() / eps; const ftype w = 1.0; // f1 * f2; const ftype d = fh + log(f1) - log(f2); result.r = w * d * d; result.dr = 2.0 * w * d; result.dr2 = 2.0 * w; } return result; } // E^2 scaling template TargetFn_scaleEsq::TargetFn_scaleEsq( const HKL_data& hkl_data_ ) { hkl_data = &hkl_data_; } template TargetFn_base::Rderiv TargetFn_scaleEsq::rderiv( const HKL_info::HKL_reference_index& ih, const ftype& fh ) const { Rderiv result; const HKL_data& data = *hkl_data; const ftype two(2.0); if ( !data[ih].missing() ) { ftype fsq = pow( ftype(data[ih].E()), two ); ftype d = fsq * fh - 1.0; result.r = d * d / fsq; result.dr = two * d; result.dr2 = two * fsq; } else { result.r = result.dr = result.dr2 = 0.0; } return result; } // sigmaa (omegaa) template TargetFn_sigmaa_omegaa::TargetFn_sigmaa_omegaa( const HKL_data& eo, const HKL_data& ec ) { eo_data = &eo; ec_data = &ec; } template TargetFn_base::Rderiv TargetFn_sigmaa_omegaa::rderiv( const HKL_info::HKL_reference_index& ih, const ftype& omegaa ) const { Rderiv result; const HKL_data& eodata = *eo_data; const HKL_data& ecdata = *ec_data; if ( eodata[ih].missing() || ecdata[ih].missing() ) { result.r = result.dr = result.dr2 = 0.0; } else { ftype eo = eodata[ih].E(); ftype ec = ecdata[ih].E(); ftype omeg = (omegaa>0.05) ? omegaa : (0.05*exp(omegaa/0.05-1.0)); ftype sigmaa = 0.5*(sqrt(4*omeg*omeg+1)-1)/omeg; ftype dx = 2.0 * eo * ec; ftype x = dx * omeg; ftype t0 = 1.0/(1-sigmaa*sigmaa) + 0.5*log((1-sigmaa*sigmaa)); ftype t1 = sigmaa; ftype t2 = pow(1-sigmaa*sigmaa,2)/(1+sigmaa*sigmaa); if ( ih.hkl_class().centric() ) { result.r = 1.0*t0 - log( cosh( x/2 ) ); result.dr = 1.0*t1 - dx*0.5*tanh( x/2 ); result.dr2 = 1.0*t2 - dx*dx*0.25*(1.0 - pow(tanh(x/2),2) ); } else { result.r = 2.0*t0 - Util::sim_integ( x ); result.dr = 2.0*t1 - dx*Util::sim( x ); result.dr2 = 2.0*t2 - dx*dx*Util::sim_deriv( x ); } if ( omegaa < 0.05 ) { ftype dy = exp( omegaa/0.05 ) / exp( 1.0 ); ftype dy2 = exp( omegaa/0.05 ) / ( 0.05*exp( 1.0 ) ); result.dr2 = result.dr*dy2 + result.dr2*dy*dy; result.dr = result.dr*dy; } } return result; } // sigmaa (norm) template TargetFn_sigmaa::TargetFn_sigmaa( const HKL_data& eo, const HKL_data& ec ) { eo_data = &eo; ec_data = &ec; } template TargetFn_base::Rderiv TargetFn_sigmaa::rderiv( const HKL_info::HKL_reference_index& ih, const ftype& sigmaa0 ) const { Rderiv result; const HKL_data& eodata = *eo_data; const HKL_data& ecdata = *ec_data; if ( eodata[ih].missing() || ecdata[ih].missing() ) { result.r = result.dr = result.dr2 = 0.0; } else { ftype eo = eodata[ih].E(); ftype ec = ecdata[ih].E(); ftype sigmaa = Util::min( Util::max( sigmaa0, 0.01 ), 0.99 ); ftype dx = 2.0 * eo * ec; ftype x = dx * sigmaa/(1-sigmaa*sigmaa); ftype t0 = 1.0/(1-sigmaa*sigmaa) + 0.5*log((1-sigmaa*sigmaa)); ftype t1 = sigmaa; ftype t2 = pow(1-sigmaa*sigmaa,2)/(1+sigmaa*sigmaa); if ( ih.hkl_class().centric() ) { result.r = 1.0*t0 - log( cosh( x/2 ) ); result.dr = 1.0*t1 - dx*0.5*tanh( x/2 ); result.dr2 = 1.0*t2 - dx*dx*0.25*(1.0 - pow(tanh(x/2),2) ); } else { result.r = 2.0*t0 - Util::sim_integ( x ); result.dr = 2.0*t1 - dx*Util::sim( x ); result.dr2 = 2.0*t2 - dx*dx*Util::sim_deriv( x ); } ftype ds = (1+sigmaa*sigmaa)/pow(1-sigmaa*sigmaa,2); ftype ds2 = 2*sigmaa*(3+sigmaa*sigmaa)/pow(1-sigmaa*sigmaa,3); result.dr2 = result.dr*ds2 + result.dr2*ds*ds; result.dr = result.dr*ds; } return result; } } // namespace clipper #endif clipper-2.1/clipper/core/coords.h0000644000374100011300000011454211252436042013763 00000000000000/*! \file lib/coords.h Fundamental types for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_COORDS #define CLIPPER_COORDS #include "cell.h" #include "spacegroup.h" #include "clipper_stats.h" namespace clipper { // forward definitions class Grid; class Grid_sampling; class Grid_range; class Coord_grid; class Coord_map; class Coord_reci_frac; class Coord_reci_orth; class Coord_frac; class Coord_orth; class U_aniso_frac; class U_aniso_orth; //! Resolution in angstroms /*! This object represents a resolution limit which will be used for all aspects of a calculation. This is a base for a donor type. */ class Resolution { public: inline Resolution() : resol(0.0) {} //!< null constructor explicit Resolution( const ftype& resol_ ); //!< constructor: from ftype void init( const ftype& resol_ ); //!< initialiser: from ftype const ftype& limit() const; //!< get resolution limit ftype invresolsq_limit() const; //!< get invresolsq limit bool is_null() const; //!< test if value has been initialised private: ftype resol; }; //! reflection class /*! This describes the type of a reflection in a given spacegroup, including centricity, systematic absence, phase restriction, and multiplicity. */ class HKL_class { public: //! null constructor inline HKL_class() { epsilon_ = 0; allowed_ = 255; } //! constructor - from spacegroup and HKL HKL_class( const Spacegroup& spgr, const HKL& hkl ); //! get epsilon inline ftype epsilon() const { return ftype(epsilon_); } //! get epsilon for acentric, 2x epsilon for centric inline ftype epsilonc() const { if ( centric() ) return 2.0*ftype(epsilon_); else return ftype(epsilon_); } //! get allowed phase inline ftype allowed() const { return ftype(allowed_) * (Util::pi()/12.0); } inline bool centric() const { return allowed_ != 255; } //!< is centric? inline bool sys_abs() const { return epsilon_ == 0; } //!< is sys abs? private: unsigned char epsilon_, allowed_; }; //! Orthogonal operator class. /*! This class is used for any RT-operator which operates on orthogonal coordinates. For a full list of methods, see clipper::RTop */ class RTop_orth : public RTop<> { public: //! null constructor inline RTop_orth() {} //! constructor: copy/convert inline explicit RTop_orth( const RTop<>& o ) : RTop<>( o ) {} //! constructor: from rotation inline explicit RTop_orth( const Mat33<>& r ) : RTop<>( r ) {} //! constructor: from rotation and translation inline RTop_orth( const Mat33<>& r, const Vec3<>& t ) : RTop<>( r, t ) {} //! constructor: from two vectors of Coord_orth RTop_orth( const std::vector& src, const std::vector& tgt ); //! constructor: from two vectors of Coord_orth RTop_orth( const std::vector& src, const std::vector& tgt, const std::vector& wgt ); //! constructor: from two atom-list type objects template RTop_orth( const T& src, const T& tgt ); //! orthogonal-fractional conversion RTop_frac rtop_frac( const Cell& cell ) const; //! inverse operator RTop_orth inverse() const; //! return point on axis near the specified coordinate Coord_orth axis_coordinate_near( const Coord_orth& centre ) const; //! return screw translation Coord_orth screw_translation() const; //! return identity operator static RTop_orth identity(); //! return null (uninitialised) operator static RTop_orth null(); }; //! reflection 'Miller' index class HKL : public Vec3 { public: inline HKL() {} //!< null constructor inline explicit HKL( const Vec3& v ) : Vec3( v ) {} //!< constructor: copy/convert inline HKL( const int& h, const int& k, const int& l ) : Vec3( h, k, l ) {} //!< constructor: from H,K,L inline const int& h() const { return (*this)[0]; } //!< get h inline const int& k() const { return (*this)[1]; } //!< get k inline const int& l() const { return (*this)[2]; } //!< get l inline int& h() { return (*this)[0]; } //!< set h inline int& k() { return (*this)[1]; } //!< set k inline int& l() { return (*this)[2]; } //!< set l //! return inverse resolution squared for this reflection in given cell inline ftype invresolsq( const Cell& cell ) const; //! return fractional reciprocal coordinate (i.e. non-integer HKL) inline Coord_reci_frac coord_reci_frac() const; //! orthogonal-fractional reciprocal space coordinate conversion inline Coord_reci_orth coord_reci_orth( const Cell& cell ) const; //! return transformed hkl inline HKL transform( const Symop& op ) const; //! return transformed hkl inline HKL transform( const Isymop& op ) const; //! return symmetry phase shift for this HKL under op inline ftype sym_phase_shift( const Symop& op ) const; String format() const; //!< return formatted String representation friend inline HKL operator -(const HKL& h1) { return HKL( -h1.h(), -h1.k(), -h1.l() ); } friend inline HKL operator +(const HKL& h1, const HKL& h2) { return HKL( h1.h()+h2.h(), h1.k()+h2.k(), h1.l()+h2.l() ); } friend inline HKL operator -(const HKL& h1, const HKL& h2) { return HKL( h1.h()-h2.h(), h1.k()-h2.k(), h1.l()-h2.l() ); } friend inline HKL operator *(const int& s, const HKL& h1) { return HKL( s*h1.h(), s*h1.k(), s*h1.l() ); } friend inline HKL operator *(const Isymop& op, const HKL& h1) { return HKL( h1 * op.rot() ); } }; //! orthogonal reciprocal coordinate (length of which is invresolsq) class Coord_reci_orth : public Vec3<> { public: inline Coord_reci_orth() {} //!< null constructor inline explicit Coord_reci_orth( const Vec3<>& v ) : Vec3<>( v ) {} //!< constructor: copy/convert inline Coord_reci_orth( const ftype& xs, const ftype& ys, const ftype& zs ) : Vec3<>( xs, ys, zs ) {} //!< constructor: from x*,y*,z* inline const ftype& xs() const { return (*this)[0]; } //!< get x* inline const ftype& ys() const { return (*this)[1]; } //!< get y* inline const ftype& zs() const { return (*this)[2]; } //!< get z* //! return inverse resolution squared for this coord inline ftype invresolsq() const; //! orthogonal-fractional reciprocal space coordinate conversion inline Coord_reci_frac coord_reci_frac( const Cell& cell ) const; //! return transformed coordinate inline Coord_reci_orth transform( const RTop_orth& op ) const { return Coord_reci_orth( (*this) * op.rot() ); } String format() const; //!< return formatted String representation }; //! fractional reciprocal coordinate (i.e. non-integer hkl) class Coord_reci_frac : public Vec3<> { public: inline Coord_reci_frac() {} //!< null constructor inline explicit Coord_reci_frac( const Vec3<>& v ) : Vec3<>( v ) {} //!< constructor: copy/convert inline Coord_reci_frac( const ftype& us, const ftype& vs, const ftype& ws ) : Vec3<>( us, vs, ws ) {} //!< constructor: from u,v,w //! constructor: from HKL inline Coord_reci_frac( const HKL& hkl ) : Vec3<>( ftype(hkl[0]), ftype(hkl[1]), ftype(hkl[2]) ) {} //! round to HKL inline HKL hkl() const { return HKL( Util::intr(us()), Util::intr(vs()), Util::intr(ws()) ); } //! return inverse resolution squared for this reflection in given cell inline ftype invresolsq( const Cell& cell ) const; inline const ftype& us() const { return (*this)[0]; } //!< get u* inline const ftype& vs() const { return (*this)[1]; } //!< get v* inline const ftype& ws() const { return (*this)[2]; } //!< get w* //! fractional-orthogonal reciprocal space coordinate conversion inline Coord_reci_orth coord_reci_orth( const Cell& cell ) const; //! return transformed coordinate inline Coord_reci_frac transform( const RTop_frac& op ) const { return Coord_reci_frac( (*this) * op.rot() ); } String format() const; //!< return formatted String representation }; //! Grid coordinate class Coord_grid : public Vec3 { public: inline Coord_grid() {} //!< null constructor //! constructor: copy/convert inline explicit Coord_grid( const Vec3 v ) : Vec3( v ) {} //! constructor: from u,v,w inline Coord_grid( const int& u, const int& v, const int& w ) : Vec3(u,v,w) {} //! constructor: from a grid and an index in that grid inline Coord_grid( const Grid& g, const int& index ) { deindex( g, index ); } inline const int& u() const { return (*this)[0]; } //!< get u inline const int& v() const { return (*this)[1]; } //!< get v inline const int& w() const { return (*this)[2]; } //!< get w inline int& u() { return (*this)[0]; } //!< set u inline int& v() { return (*this)[1]; } //!< set v inline int& w() { return (*this)[2]; } //!< set w //! convert to Coord_map inline Coord_map coord_map() const; //! convert to Coord_frac using given Grid_sampling inline Coord_frac coord_frac( const Grid_sampling& g ) const; //! return transformed coordinate inline Coord_grid transform( const Isymop& op ) const { return op * (*this); } //! reduce to unit box: (0..nu-1, 0..nv-1, 0..nw-1) inline Coord_grid unit( const Grid_sampling& g ) const; //! increment in storage order (see index()) /*! guaranteed to increment index(g) by 1 */ inline const Coord_grid& next( const Grid& g ); //! increment in storage order (see index()) /*! guaranteed to increment index(g) by 1 */ inline const Coord_grid& next( const Grid_range& g ); //! test if done in storage order (see index()) inline bool last( const Grid& g ) const; //! test if done in storage order (see index()) inline bool last( const Grid_range& g ) const; //! grid indexing operator inline int index( const Grid& g ) const; //! grid deindexing operator inline void deindex( const Grid& g, const int& index ); // grid indexing operator //inline int index( const Grid_range& g ) const; // grid deindexing operator //inline void deindex( const Grid_range& g, const int& index ); String format() const; //!< return formatted String representation friend inline Coord_grid operator -(const Coord_grid& r1) { return ( Coord_grid( -r1.u(), -r1.v(), -r1.w() ) ); } friend inline Coord_grid operator +(const Coord_grid& r1, const Coord_grid& r2) { return ( Coord_grid( r1.u()+r2.u(), r1.v()+r2.v(), r1.w()+r2.w() ) ); } friend inline Coord_grid operator -(const Coord_grid& r1, const Coord_grid& r2) { return ( Coord_grid( r1.u()-r2.u(), r1.v()-r2.v(), r1.w()-r2.w() ) ); } friend inline Coord_grid operator *(const int& s, const Coord_grid& r1) { return ( Coord_grid( s*r1.u(), s*r1.v(), s*r1.w() ) ); } friend inline int operator == (const Coord_grid& r1, const Coord_grid& r2) { return (r1.u()==r2.u() && r1.v()==r2.v() && r1.w()==r2.w()); } friend inline int operator != (const Coord_grid& r1, const Coord_grid& r2) { return (r1.u()!=r2.u() || r1.v()!=r2.v() || r1.w()!=r2.w()); } friend inline Coord_grid operator *(const Isymop& op, const Coord_grid& r1) { return Coord_grid( op.rot() * r1 + op.trn() ); } }; //! orthogonal (Angstrom) coordinates class Coord_orth : public Vec3<> { public: inline Coord_orth() {} //!< null constructor inline explicit Coord_orth( const Vec3<>& v ) : Vec3<>( v ) {} //!< constructor: copy/convert inline Coord_orth( const ftype& x, const ftype& y, const ftype& z ) : Vec3<>( x, y, z ) {} //!< constructor: from x,y,z //! constructor: from 3 coords and bond length, angle, torsion Coord_orth( const Coord_orth& x1, const Coord_orth& x2, const Coord_orth& x3, const ftype& length, const ftype& angle, const ftype& torsion ); inline const ftype& x() const { return (*this)[0]; } //!< get x inline const ftype& y() const { return (*this)[1]; } //!< get y inline const ftype& z() const { return (*this)[2]; } //!< get z //! return square of length of vector in Angstroms inline ftype lengthsq() const; //! orthogonal-fractional coordinate conversion inline Coord_frac coord_frac( const Cell& cell ) const; //! return transformed coordinate inline Coord_orth transform( const RTop_orth& op ) const { return op*(*this); } String format() const; //!< return formatted String representation //! Return length of vector between two coord orths static ftype length( const Coord_orth& x1, const Coord_orth& x2); //! Return angle between three coord orths static ftype angle( const Coord_orth& x1, const Coord_orth& x2, const Coord_orth& x3); //! Return torsion between four coord orths static ftype torsion( const Coord_orth& x1, const Coord_orth& x2, const Coord_orth& x3, const Coord_orth& x4); friend inline Coord_orth operator -(const Coord_orth& x1) { return Coord_orth( -x1.x(), -x1.y(), -x1.z() ); } friend inline Coord_orth operator +(const Coord_orth& x1, const Coord_orth& x2) { return Coord_orth( x1.x()+x2.x(), x1.y()+x2.y(), x1.z()+x2.z() ); } friend inline Coord_orth operator -(const Coord_orth& x1, const Coord_orth& x2) { return Coord_orth( x1.x()-x2.x(), x1.y()-x2.y(), x1.z()-x2.z() ); } friend inline Coord_orth operator *(const ftype& s, const Coord_orth& x1) { return Coord_orth( s*x1.x(), s*x1.y(), s*x1.z() ); } friend inline Coord_orth operator *(const RTop_orth& op, const Coord_orth& x1) { return Coord_orth( op.rot() * x1 + op.trn() ); } }; //! fractional (cell) coordinates class Coord_frac : public Vec3<> { public: inline Coord_frac() {} //!< null constructor inline explicit Coord_frac( const Vec3<>& v ) : Vec3<>( v ) {} //!< constructor: copy/convert inline Coord_frac( const ftype& u, const ftype& v, const ftype& w ) : Vec3<>( u, v, w ) {} //!< constructor: from u,v,w inline const ftype& u() const { return (*this)[0]; } //!< get u inline const ftype& v() const { return (*this)[1]; } //!< get v inline const ftype& w() const { return (*this)[2]; } //!< get w //! return square of length of vector in Angstroms inline ftype lengthsq( const Cell& cell ) const; //! fractional-orthogonal coordinate conversion inline Coord_orth coord_orth( const Cell& cell ) const; //! fractional-grid coordinate conversion inline Coord_map coord_map( const Grid& g ) const; //! fractional-grid coordinate conversion inline Coord_grid coord_grid( const Grid& g ) const; //! return transformed coordinate inline Coord_frac transform( const RTop_frac& op ) const { return op*(*this); } //! return lattice copy nearest origin inline Coord_frac lattice_copy_zero() const { return Coord_frac(u()-rint(u()),v()-rint(v()),w()-rint(w())); } //! return lattice copy in unit box (0...1,0...1,0...1) inline Coord_frac lattice_copy_unit() const { return Coord_frac(u()-floor(u()),v()-floor(v()),w()-floor(w())); } //! return lattice copy near the specified coordinate inline Coord_frac lattice_copy_near(const Coord_frac& n) const { return (*this-n).lattice_copy_zero()+n; } //! return symmetry copy near the specified coordinate Coord_frac symmetry_copy_near(const Spacegroup& spgr, const Cell& cell, const Coord_frac& n) const; String format() const; //!< return formatted String representation friend inline Coord_frac operator -(const Coord_frac& u1) { return Coord_frac( -u1.u(), -u1.v(), -u1.w() ); } friend inline Coord_frac operator +(const Coord_frac& u1, const Coord_frac& u2) { return Coord_frac( u1.u()+u2.u(), u1.v()+u2.v(), u1.w()+u2.w() ); } friend inline Coord_frac operator -(const Coord_frac& u1, const Coord_frac& u2) { return Coord_frac( u1.u()-u2.u(), u1.v()-u2.v(), u1.w()-u2.w() ); } friend inline Coord_frac operator *(const ftype& s, const Coord_frac& u1) { return Coord_frac( s*u1.u(), s*u1.v(), s*u1.w() ); } friend inline Coord_frac operator *(const RTop_frac& op, const Coord_frac& x1) { return Coord_frac( op.rot() * x1 + op.trn() ); } }; //! map coordinate: this is like Coord_grid, but non-integer class Coord_map : public Vec3<> { public: inline Coord_map() {} //!< null constructor //! constructor: copy/convert inline explicit Coord_map( const Vec3<>& v ) : Vec3<>( v ) {} //! constructor: from Coord_grid inline explicit Coord_map( const Coord_grid& c ) : Vec3<>( ftype(c[0]), ftype(c[1]), ftype(c[2]) ) {} //! constructor: from u,v,w inline Coord_map( const ftype& u, const ftype& v, const ftype& w ) : Vec3<>( u, v, w ) {} //! grid-fractional coordinate conversion inline Coord_frac coord_frac( const Grid& g ) const; //! return integer Coord_grid nearest this coordinate inline Coord_grid coord_grid() const { return Coord_grid( Util::intr((*this)[0]), Util::intr((*this)[1]), Util::intr((*this)[2]) ); } //! return integer Coord_grid below this coordinate inline Coord_grid floor() const { return Coord_grid( Util::intf((*this)[0]), Util::intf((*this)[1]), Util::intf((*this)[2]) ); } //! return integer Coord_grid above this coordinate inline Coord_grid ceil() const { return Coord_grid( Util::intc((*this)[0]), Util::intc((*this)[1]), Util::intc((*this)[2]) ); } inline const ftype& u() const { return (*this)[0]; } //!< get u inline const ftype& v() const { return (*this)[1]; } //!< get v inline const ftype& w() const { return (*this)[2]; } //!< get w String format() const; //!< return formatted String representation friend inline Coord_map operator -(const Coord_map& u1) { return Coord_map( -u1.u(), -u1.v(), -u1.w() ); } friend inline Coord_map operator +(const Coord_map& u1, const Coord_map& u2) { return Coord_map( u1.u()+u2.u(), u1.v()+u2.v(), u1.w()+u2.w() ); } friend inline Coord_map operator -(const Coord_map& u1, const Coord_map& u2) { return Coord_map( u1.u()-u2.u(), u1.v()-u2.v(), u1.w()-u2.w() ); } friend inline Coord_map operator *(const ftype& s, const Coord_map& u1) { return Coord_map( s*u1.u(), s*u1.v(), s*u1.w() ); } }; //! Anisotropic orthogonal atomic displacement parameters /*! These are defined on orthogonal atomic coordinates in A-2, i.e. they are anisotropic U values. */ class U_aniso_orth : public Mat33sym<> { public: //! null constructor inline U_aniso_orth() {}; //! constructor: from Mat33sym inline explicit U_aniso_orth( const Mat33sym<>& m ) : Mat33sym<>(m) {} //! constructor: from isotropic U inline explicit U_aniso_orth( const ftype& u ) : Mat33sym<>( u, u, u, 0.0, 0.0, 0.0 ) {} //! constructor: from Uij U_aniso_orth( const ftype& u11, const ftype& u22, const ftype& u33, const ftype& u12, const ftype& u13, const ftype& u23 ) : Mat33sym<>( u11, u22, u33, u12, u13, u23 ) {} //! return nearest isotropic U ftype u_iso() const; //! orthogonal-fractional conversion U_aniso_frac u_aniso_frac( const Cell& cell ) const; //! return transformed U_aniso U_aniso_orth transform( const RTop_orth& op ) const; friend U_aniso_orth operator +(const U_aniso_orth& u1, const U_aniso_orth& u2) { return U_aniso_orth( u1.mat00()+u2.mat00(), u1.mat11()+u2.mat11(), u1.mat22()+u2.mat22(), u1.mat01()+u2.mat01(), u1.mat02()+u2.mat02(), u1.mat12()+u2.mat12() ); } friend U_aniso_orth operator -(const U_aniso_orth& u) { return U_aniso_orth( -u.mat00(), -u.mat11(), -u.mat22(), -u.mat01(), -u.mat02(), -u.mat12() ); } friend U_aniso_orth operator *(const ftype& s, const U_aniso_orth& u) { return U_aniso_orth( s*u.mat00(), s*u.mat11(), s*u.mat22(), s*u.mat01(), s*u.mat02(), s*u.mat12() ); } }; //! Anisotropic fractional atomic displacement parameters /*! These are defined on fractional atomic coordinates in A-2, i.e. they are anisotropic U values. */ class U_aniso_frac : public Mat33sym<> { public: //! null constructor inline U_aniso_frac() {}; //! constructor: from Mat33sym inline explicit U_aniso_frac( const Mat33sym<>& m ) : Mat33sym<>(m) {} //! constructor: from Uij U_aniso_frac( const ftype& u11, const ftype& u22, const ftype& u33, const ftype& u12, const ftype& u13, const ftype& u23 ) : Mat33sym<>( u11, u22, u33, u12, u13, u23 ) {} //! fractional-orthogonal conversion U_aniso_orth u_aniso_orth( const Cell& cell ) const; //! return transformed U_aniso U_aniso_frac transform( const RTop_frac& op ) const; friend U_aniso_frac operator +(const U_aniso_frac& u1, const U_aniso_frac& u2) { return U_aniso_frac( u1.mat00()+u2.mat00(), u1.mat11()+u2.mat11(), u1.mat22()+u2.mat22(), u1.mat01()+u2.mat01(), u1.mat02()+u2.mat02(), u1.mat12()+u2.mat12() ); } friend U_aniso_frac operator -(const U_aniso_frac& u) { return U_aniso_frac( -u.mat00(), -u.mat11(), -u.mat22(), -u.mat01(), -u.mat02(), -u.mat12() ); } friend U_aniso_frac operator *(const ftype& s, const U_aniso_frac& u) { return U_aniso_frac( s*u.mat00(), s*u.mat11(), s*u.mat22(), s*u.mat01(), s*u.mat02(), s*u.mat12() ); } }; //! generic grid /*! This holds the dimensions of a 3D array, indexed from 0 along each dimension. */ class Grid : public Vec3 { public: inline Grid() {} //!< null constructor inline Grid( const int& nu, const int& nv, const int& nw ) : Vec3( nu, nv, nw ) {} //!< constructor: from nu,nv,nw inline const int& nu() const { return (*this)[0]; } //!< get nu inline const int& nv() const { return (*this)[1]; } //!< get nv inline const int& nw() const { return (*this)[2]; } //!< get nw //! return size of grid array inline int size() const { return nu()*nv()*nw(); } //! determine if a point is in the grid inline bool in_grid( Coord_grid g ) const { return (g.u() >= 0 && g.u() < nu() && g.v() >= 0 && g.v() < nv() && g.w() >= 0 && g.w() < nw()); } //! grid indexing operator inline int index( const Coord_grid& c ) const { return c.index(*this); } //! grid deindexing operator inline Coord_grid deindex( const int& index ) const { return Coord_grid( *this, index ); } String format() const; //!< return formatted String representation void debug() const; }; //! Grid sampling of a unit cell /*! This class represents the grid sampling of a unit cell. It is otherwise identical to its parent, clipper::Grid_cell, but has an additional constructor which takes a spacegroup, cell and resolution and produces an appropriate grid obeying all of the symmetry constraints, and using efficient factors for the calculation of FFTs. \note The following methods are inherited from Grid and Grid_cell but are documented here for convenience: nu(), nv(), nw(), size(), index(), deindex(), format(), coord_frac(), coord_grid(), to_unit(). */ class Grid_sampling : public Grid { public: //! null constructor inline Grid_sampling() : Grid(Grid(0,0,0)) {} //! constructor: from nu, nv, nw inline Grid_sampling( const int& nu, const int& nv, const int& nw ) : Grid( nu, nv, nw ) {} //! constructor: from Spacegroup, Cell, Resolution, Shannon rate Grid_sampling( const Spacegroup& spacegroup, const Cell& cell, const Resolution& resol, const ftype rate = 1.5 ); //! initialiser: from Spacegroup, Cell, Resolution, Shannon rate void init( const Spacegroup& spacegroup, const Cell& cell, const Resolution& resol, const ftype rate = 1.5 ); //! return matrix which converts grid to fractional coordinates Mat33<> matrix_grid_frac() const; //! return matrix which converts fractional to grid coordinates Mat33<> matrix_frac_grid() const; //! test if object has been initialised bool is_null() const; // inherited functions listed for documentation purposes //-- const int& nu() const; //-- const int& nv() const; //-- const int& nw() const; //-- int size() const; //-- int index( const Coord_grid& c ) const; //-- Coord_grid deindex( const int& index ) const; //-- const String format() const; }; //! HKL sampling of reciprocal space /*! The HKL_sampling class uniquely describes a P0 reflection list bounded by some resolution limit in reciprocal space. It is described in terms of large integers, and so immune from rounding errors once the object is constructed. */ class HKL_sampling { public: //! null constructor HKL_sampling(); //!< Null constructor //! constructor: takes parameters of normal or inverse cell HKL_sampling( const Cell& cell, const Resolution& resolution ); //! return limiting values of H, K, L HKL hkl_limit() const; //! return approximate resolution given cell Resolution resolution( const Cell& cell ) const; //! test if a reflection is within the resolution limit inline bool in_resolution( const HKL& h ) const { return ( m00*itype64(h.h()*h.h()) + m11*itype64(h.k()*h.k()) + m22*itype64(h.l()*h.l()) + m01*itype64(h.h()*h.k()) + m02*itype64(h.h()*h.l()) + m12*itype64(h.k()*h.l()) ) <= ( sqrt_limit_value*sqrt_limit_value ); } //! test if object has been initialised bool is_null() const; String format() const; //!< return formatted String representation friend inline int operator == (const HKL_sampling& h1, const HKL_sampling& h2) { return ( h1.m00==h2.m00 && h1.m11==h2.m11 && h1.m22==h2.m22 && h1.m01==h2.m01 && h1.m02==h2.m02 && h1.m12==h2.m12 ); } private: static itype64 sqrt_limit_value; itype64 m00, m11, m22, m01, m02, m12; }; //! Grid range class: defines array limits for a grid /*! This class is used for describing 3D grids covering an arbitrary part of the 3D space, i.e. which do not start from (0,0,0). */ class Grid_range : public Grid { public: //! null constructor inline Grid_range() {} //! constructor: takes grid limits Grid_range( const Coord_grid& min, const Coord_grid& max ); //! constructor: takes cell grid and fractional limits Grid_range( const Grid& grid, const Coord_frac& min, const Coord_frac& max ); //! constructor: make grid to hold a sphere from cell, grid, radius Grid_range( const Cell& cell, const Grid& grid, const ftype& radius ); //! access grid limits const Coord_grid& min() const { return min_; } //! access grid limits const Coord_grid& max() const { return max_; } //! border: increase grid to include given border void add_border( const int b ); //! determine if a point is in the grid bool in_grid( Coord_grid g ) const { return (g.u() >= min_.u() && g.u() <= max_.u() && g.v() >= min_.v() && g.v() <= max_.v() && g.w() >= min_.w() && g.w() <= max_.w()); } //! grid indexing operator int index( const Coord_grid& c ) const { return (c - min_).index(*this); } //! grid deindexing operator Coord_grid deindex( const int& index ) const { return Coord_grid( *this, index ) + min_; } private: Coord_grid min_, max_; }; //! Obsolete form for Grid_range typedef Grid_range Grid_map; //! Atom class /*! This class defines a minimal atom object providing only those properties required for an electron density calculation. A template constructor allows it to be constructed from any other object with appropriate properties. */ class Atom { public: //! null constructor Atom() {} //! Constructor: from atom-like object template Atom( const T& atom ) : element_(atom.element()), coord_orth_(atom.coord_orth()), u_aniso_orth_(atom.u_aniso_orth()) , occupancy_(atom.occupancy()), u_iso_(atom.u_iso()){} //! get atom element name: e.g. "C", "N", "Zn2+" const String& element() const { return element_; } //! get atom orthogonal (Angstrom) coordinate const Coord_orth& coord_orth() const { return coord_orth_; } //! get atom occupancy const ftype& occupancy() const { return occupancy_; } //! get atom orthogonal isotropic U value const ftype& u_iso() const { return u_iso_; } //! get atom orthogonal anisotropic U value const U_aniso_orth& u_aniso_orth() const { return u_aniso_orth_; } void set_element( const String& s ); //!< set element void set_coord_orth( const Coord_orth& s ); //!< set coord_orth void set_occupancy( const ftype& s ); //!< set occupancy void set_u_iso( const ftype& s ); //!< set u_iso void set_u_aniso_orth( const U_aniso_orth& s ); //!< set u_aniso //! apply a rotation-translation operator (RTop) to the atom void transform( const RTop_orth rt ); //! test for null atom: atom is null is coord is null bool is_null() const { return coord_orth_.is_null(); } //! return null atom static Atom null(); private: String element_; Coord_orth coord_orth_; U_aniso_orth u_aniso_orth_; ftype occupancy_, u_iso_; }; //! Atom list class /*! This class defines a minimal atom list object providing only those properties required for an electron density calculation. It is a trivial derivation from std::vector. In addition a template constructor allows it to be constructed from any other object with appropriate properties. */ class Atom_list : public std::vector { public: //! null constructor Atom_list() {} //! constructor: from std::vector Atom_list( const std::vector& list ) : std::vector( list ) {} //! Constructor: from vector-like list of atom-like objects template Atom_list( const T& list ) { for ( int i = 0; i < list.size(); i++ ) push_back( Atom( list[i] ) ); } }; // some template function definitions /*! Construct the operator which relates one atom-list like object onto another. The lists must be the same size, and have the following properties: - a size() method. - a [int] operator, with int ranging from 0 to size()-1. - the object returned by the [] operator must have a coord_orth() method. Suitable objects include a vector of Atom, or an Atom_list. */ template RTop_orth::RTop_orth( const T& src, const T& tgt ) { std::vector vsrc( src.size() ); std::vector vtgt( tgt.size() ); for ( int i = 0; i < src.size(); i++ ) vsrc[i] = src[i].coord_orth(); for ( int i = 0; i < tgt.size(); i++ ) vtgt[i] = tgt[i].coord_orth(); (*this) = RTop_orth( vsrc, vtgt ); } // some inline function definitions /*! Requires integer->ftype->integer transformation. \param op The symmetry operator \return The transformed coordinate */ HKL HKL::transform( const Symop& op ) const { return Coord_reci_frac(*this).transform(op).hkl(); } /*! Optimal version. \param op The symmetry operator \return The transformed coordinate */ HKL HKL::transform( const Isymop& op ) const { return op*(*this); } /*! Get the symmetry phase shift incurred when transforming a reflection by this operator. \param hkl The reflection HKL to transform. \return The phase shift. */ ftype HKL::sym_phase_shift( const Symop& op ) const { return -Util::twopi()*( Coord_reci_frac(*this) * op.trn() ); } /*! The grid coordinate is incremented efficiently in a manner which is exaclty equivalent to increasing index() by 1 in a zero based grid. \param g The grid with which this increment is synchronised. */ const Coord_grid& Coord_grid::next( const Grid& g ) { w()++; if ( w() >= g.nw() ) { w() = 0; v()++; if ( v() >= g.nv() ) { v() = 0; u()++; } } return *this; } /*! The grid coordinate is incremented efficiently in a manner which is exaclty equivalent to increasing index() by 1 in a non-zero based grid. \param g The grid with which this increment is synchronised. */ const Coord_grid& Coord_grid::next( const Grid_range& g ) { w()++; if ( w() > g.max().w() ) { w() = g.min().w(); v()++; if ( v() > g.max().v() ) { v() = g.min().v(); u()++; } } return *this; } /*! Test whether this coordinate has been incremented using next() beyond the end of the specified zero based grid. \param g The grid concerned. */ bool Coord_grid::last( const Grid& g ) const { return ( u() >= g.nu() ); } /*! Test whether this coordinate has been incremented using next() beyond the end of the specified non-zero based grid. \param g The grid concerned. */ bool Coord_grid::last( const Grid_range& g ) const { return ( u() > g.max().u() ); } /*! Return the index in a 1-d array corresponding to this coordinate for a zero based grid. \param g The grid concerned. \return The corresponding index. */ int Coord_grid::index( const Grid& g ) const { return ( u()*g.nv() + v() )*g.nw() + w(); } /*! Return the coordinate corresponding to a given index in a zero based grid. \param g The grid concerned. \return The corresponding coordinate. */ void Coord_grid::deindex( const Grid& g, const int& index ) { u() = index/(g.nv()*g.nw()); v() = (index/g.nw()) % g.nv(); w() = (index) % g.nw(); } /*! \param g The grid concerned \return The transformed coordinate. */ Coord_grid Coord_grid::unit( const Grid_sampling& g ) const { return Coord_grid( Util::mod(u(), g.nu()), Util::mod(v(), g.nv()), Util::mod(w(), g.nw()) ); } /*! \return The non-integer coordinate. */ Coord_map Coord_grid::coord_map() const { return Coord_map( *this ); } /*! Fractional coordinate is not normalised onto range 0..1 \param g The grid concerned \return The fractional coordinate */ Coord_frac Coord_grid::coord_frac( const Grid_sampling& g ) const { return Coord_frac( ftype(u())/ftype(g.nu()), ftype(v())/ftype(g.nv()), ftype(w())/ftype(g.nw()) ); } /*! \note Normally you would get a value through clipper::HKL_info, unless you specifically want a value for a different cell. */ ftype HKL::invresolsq( const Cell& cell ) const { return cell.metric_reci().lengthsq( Coord_reci_frac( *this ) ); } /*! \return The non-integer coordinate. */ Coord_reci_frac HKL::coord_reci_frac() const { return Coord_reci_frac( *this ); } /*! \param cell The cell concerned \return The transformed coordinate. */ Coord_reci_orth HKL::coord_reci_orth( const Cell& cell ) const { return coord_reci_frac().coord_reci_orth( cell ); } /*! \return The inverse resolution squared. */ ftype Coord_reci_orth::invresolsq() const { return xs()*xs() + ys()*ys() + zs()*zs(); } /*! \param cell The cell concerned \return The transformed coordinate. */ Coord_reci_frac Coord_reci_orth::coord_reci_frac( const Cell& cell ) const { return Coord_reci_frac( (*this) * cell.matrix_orth() ); } /*! \param cell The cell concerned \return The inverse resolution squared. */ ftype Coord_reci_frac::invresolsq( const Cell& cell ) const { return cell.metric_reci().lengthsq( *this ); } /*! \param cell The cell concerned \return The transformed coordinate. */ Coord_reci_orth Coord_reci_frac::coord_reci_orth( const Cell& cell ) const { return Coord_reci_orth( (*this) * cell.matrix_frac() ); } /*! \return The squared length in Angstroms squared */ ftype Coord_orth::lengthsq() const { return x()*x()+y()*y()+z()*z(); } /*! \param cell The cell concerned \return The transformed coordinate. */ Coord_frac Coord_orth::coord_frac( const Cell& cell ) const { return Coord_frac( cell.matrix_frac() * (*this) ); } /*! \return The squared length in Angstroms squared */ ftype Coord_frac::lengthsq( const Cell& cell ) const { return cell.metric_real().lengthsq( *this ); } /*! \param cell The cell concerned \return The transformed coordinate. */ Coord_orth Coord_frac::coord_orth( const Cell& cell ) const { return Coord_orth( cell.matrix_orth() * (*this) ); } /*! \param g The grid concerned \return The transformed coordinate. */ Coord_map Coord_frac::coord_map( const Grid& g ) const { return Coord_map( u()*ftype(g.nu()), v()*ftype(g.nv()), w()*ftype(g.nw()) ); } /*! \param g The grid concerned \return The transformed coordinate. */ Coord_grid Coord_frac::coord_grid( const Grid& g ) const { return Coord_grid( Util::intr(u()*ftype(g.nu())), Util::intr(v()*ftype(g.nv())), Util::intr(w()*ftype(g.nw())) ); } /*! \param g The grid concerned \return The transformed coordinate. */ Coord_frac Coord_map::coord_frac( const Grid& g ) const { return Coord_frac( u()/ftype(g.nu()), v()/ftype(g.nv()), w()/ftype(g.nw()) ); } } // namespace clipper #endif clipper-2.1/clipper/core/container_hkl.cpp0000644000374100011300000001205310363703537015647 00000000000000/* container_hkl.cpp: class file for reflection data containers */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "container_hkl.h" namespace clipper { const HKL_info NullHKL_info; //is_null() ) sp = parent_of_type_ptr(); if ( cp->is_null() ) cp = parent_of_type_ptr(); if ( rp->is_null() ) rp = parent_of_type_ptr(); generate_ = generate_ | generate; // update generate flag // initialise if ( sp != NULL && cp != NULL && rp != NULL ) if ( !sp->is_null() && !cp->is_null() && !rp->is_null() ) HKL_info::init( *sp, *cp, *rp, generate_ ); Container::update(); } /*! The reflection list is sythesized to match the given spacegroup, cell, and resolution, and a hierarchical update is triggered to update the sizes of the reflection lists for all dependent HKL_data objects. */ void CHKL_info::generate_hkl_list() { HKL_info::generate_hkl_list(); Container::update(); } /*! Hierarchical update. If this object is uninitialised, an attempt is made to initialise the object using information from its parents in the hierarchy. The childen of the object are then updated. */ void CHKL_info::update() { if ( HKL_info::is_null() ) init( NullSpacegroup, NullCell, NullResolution, 0.0 ); else Container::update(); } } // namespace clipper clipper-2.1/clipper/core/container.cpp0000644000374100011300000001612210363703537015012 00000000000000/* container.cpp: implementation for base class of reflection heirarchy */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "container.h" namespace clipper { Message_fatal message_parent_of_root( "Container: attempt to access parent of root" ); Message_fatal message_child_out_of_range( "Container: child index out of range" ); Message_fatal message_duplicate_path( "Container: attempt to create duplicate path" ); void Container::add_child( Container& c ) { children.push_back( &c ); } void Container::del_child( Container& c ) { for ( int i = 0; i < children.size(); i++ ) if ( children[i] == &c ) { children.erase( children.begin() + i ); break; } } void Container::update() { // recursively update entire tree for ( int i = 0; i < children.size(); i++ ) child(i).update(); } Container::Container( const String name ) { destroyed_with_parent = false; parent_ = NULL; if ( name != "" ) name_ = name; else name_ = "unnamed"; // log object if required if ( Message::message_level() <= Message_ctor::level() ) Message::message( Message_ctor( "[Container: contructed (root)/"+name_+">" ) ); } Container::Container( Container& parent, const String& path ) { destroyed_with_parent = false; parent_ = NULL; name_ = path.tail(); // find desired parent using working root and path provided parent_ = parent.find_path_ptr( path.notail() ); if ( parent_ == NULL ) Message::message( Message_fatal( "Container: No such path- "+path ) ); // if no name given, make one up if ( name_ == "" ) for (int i = 1; i < 100; i++ ) { name_ = "unnamed" + String(i,2); if ( parent_->find_path_ptr( name_ ) == NULL ) break; } // otherwise check for dulicates if ( parent_->find_path_ptr( name_ ) != NULL ) Message::message( message_duplicate_path ); parent_->add_child(*this); // log object if required if ( Message::message_level() <= Message_ctor::level() ) Message::message( Message_ctor( "[Container: contructed "+parent_->name()+"/"+name_+">" ) ); } Container::~Container() { for ( int i = 0; i < children.size(); i++ ) { children[i]->parent_ = NULL; if ( children[i]->is_destroyed_with_parent() ) delete children[i]; } if ( parent_ != NULL ) parent_->del_child(*this); // log object if required if ( Message::message_level() <= Message_dtor::level() ) Message::message( Message_dtor( "= children.size() ) Message::message( message_child_out_of_range ); return *children[i]; } Container& Container::child( const int& i ) { if ( i < 0 || i >= children.size() ) Message::message( message_child_out_of_range ); return *children[i]; } const Container& Container::ultimate_parent() const { if ( has_parent() ) return parent().ultimate_parent(); else return *this; } Container& Container::ultimate_parent() { if ( has_parent() ) return parent().ultimate_parent(); else return *this; } Container* Container::parent_ptr() { return parent_; } Container* Container::find_path_ptr( const String& path_ ) { // find an object in the heirarchy using UNIX path semantics String path = path_; // check for this object if ( path == "" ) return this; // check for root-ed path if ( path[0] == '/' ) { if ( has_parent() ) { return parent().find_path_ptr( path ); } else { path = path.nohead(); if ( path.head() != name() ) return NULL; path = path.nohead(); } } // check for a child of this object for ( int i = 0; i < num_children(); i++ ) if ( path.head() == "*" || path.head() == child(i).name() ) return child(i).find_path_ptr( path.nohead() ); // else fail return NULL; } void Container::move( const String& path ) { // move this object in heirarchy to 'path' if ( has_parent() ) parent().del_child( *this ); parent_ = find_path_ptr( path.notail() ); if ( parent_ == NULL ) Message::message( Message_fatal( "Container: No such path- "+path ) ); parent_->add_child( *this ); name_ = path.tail(); update(); } void Container::debug() { std::cout << path() << "\n"; for ( int i = 0; i < num_children(); i++ ) child(i).debug(); } } // namespace clipper clipper-2.1/clipper/core/resol_targetfn.cpp0000644000374100011300000000671311270270145016043 00000000000000/* resol_targetfn.cpp: implementation file for resolution target functions */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA /* This code is derived from the 'dm' source code */ #include "resol_targetfn.h" namespace clipper { template class TargetFn_meanFnth; template class TargetFn_meanFnth; template class TargetFn_scaleF1F2; template class TargetFn_scaleLogF1F2; template class TargetFn_scaleI1I2; template class TargetFn_scaleLogI1I2; template class TargetFn_meanEnth; template class TargetFn_scaleEsq; template class TargetFn_sigmaa_omegaa; template class TargetFn_sigmaa; template class TargetFn_meanFnth; template class TargetFn_meanFnth; template class TargetFn_scaleF1F2; template class TargetFn_scaleLogF1F2; template class TargetFn_scaleI1I2; template class TargetFn_scaleLogI1I2; template class TargetFn_meanEnth; template class TargetFn_scaleEsq; template class TargetFn_sigmaa_omegaa; template class TargetFn_sigmaa; } // namespace clipper clipper-2.1/clipper/core/resol_fn.cpp0000644000374100011300000003175011311437407014635 00000000000000/* resol_fn.cpp: implementation file for resolution functions */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA /* This code is derived from the 'dm' source code */ #include "resol_fn.h" namespace clipper { void TargetFn_base::debug( const HKL_info& hkl_info ) const { Rderiv r0, r1, r2; ftype d = 0.0001; for ( HKL_info::HKL_reference_index ih = hkl_info.first(); !ih.last(); ih.next() ) { if ( ih.index()%100 == 0 ) for ( ftype f = 0.1; f < 10; f*=3.15 ) { r0 = rderiv( ih, f - d ); r1 = rderiv( ih, f ); r2 = rderiv( ih, f + d ); std::cout << ih.hkl().format() << " " << f << " val " << r1.r << " grad " << r1.dr << " " << (r2.r-r0.r)/(2*d) << " curv " << r1.dr2 << " " << (r2.dr-r0.dr)/(2*d) << " " << (r2.r+r0.r-2*r1.r)/(d*d) << "\n"; } } } /*! Defaults to GENERAL, which will always work. If the basis function is linearly dependent on the parameters, override this with a function returning LINEAR for improved performance. See the provided basis functions for examples. \return The function type enumeration. */ BasisFn_base::FNtype BasisFn_base::type() const { return GENERAL; } /*! Defaults to 0, which will always work. If the basis function has compact support among the parameters, i.e. the value for any HKL depends only on a few parameters, then set this to the number of non-zero diagonals in the upper triangle of the matrix, i.e. 1 for a diagonal matrix, 2 for a tri-diagonal matrix etc. \return The number of non-zero upper diagonals, or zero for full-matrix. */ int BasisFn_base::num_diagonals() const { return 0; } /*! The target and its derivatives are calculated by the chain rule and accumulated over all HKLs. \param params Current value of parameters. \param r The value of the target function. \param drdp The derivative of the target function. \param drdp2 The curvature of the target function. */ void ResolutionFn::calc_derivs( const std::vector& params, ftype& r, std::vector& drdp, Matrix<>& drdp2 ) const { HKL_class cls; HKL_info::HKL_reference_index ih; TargetFn_base::Rderiv rderiv; ftype w; int j, k; int nparams = basisfn_->num_params(); int ndiag = basisfn_->num_diagonals() - 1; // zero the results r = 0.0; for ( j = 0; j < nparams; j++ ) { drdp[j] = 0.0; for ( k = 0; k < nparams; k++ ) drdp2(j,k) = 0.0; } // calc dr/dp vector and d2r/dp2 matrix for ( ih = hkl_info_->first(); !ih.last(); ih.next() ) { cls = ih.hkl_class(); rderiv = targetfn_->rderiv( ih, f( ih ) ); const BasisFn_base::Fderiv& fderiv = basisfn_->fderiv( ih.hkl(), cell_, params ); const std::vector& dfdp = fderiv.df; const Matrix<>& dfdp2 = fderiv.df2; // weight for this term w = 2.0 / cls.epsilonc(); // residual, gradient r += w * rderiv.r; for ( j = 0; j < nparams; j++ ) drdp[j] += w * rderiv.dr * dfdp[j]; // curvature: optimised for special cases if ( ndiag < 0 ) { // general case for ( j = 0; j < nparams; j++ ) for ( k = 0; k < nparams; k++ ) drdp2(j,k) += w * ( rderiv.dr2*dfdp[j]*dfdp[k] + rderiv.dr*dfdp2(j,k) ); } else { // curvature matrix is (2n-1)-diagonal for ( j = 0; j < nparams; j++ ) for ( k = Util::max(j-ndiag,0); k <= Util::min(j+ndiag,nparams-1); k++ ) drdp2(j,k) += w*( rderiv.dr2*dfdp[j]*dfdp[k] + rderiv.dr*dfdp2(j,k) ); } } } /*! The constructor performs the full minimisation calculation. \param hkl_info HKL_info object which provides the reflection list. \param basisfn The basis function used to describe the desired property. \param targetfn The target function to be minimised. \param params Initial values for the function parameters. \param damp_ If > 0.0, shifts are fdamped during early cycles to help convergence with difficult bases/target conbinations. */ ResolutionFn::ResolutionFn( const HKL_info& hkl_info, const BasisFn_base& basisfn, const TargetFn_base& targetfn, const std::vector& params, const ftype damp, const bool debug ) { ftype r, g0, g1, scale; int i, k, n; hkl_info_ = &hkl_info; basisfn_ = &basisfn; targetfn_ = &targetfn; params_ = params; cell_ = hkl_info.cell(); int nparams = basisfn_->num_params(); Matrix<> dfdp2( nparams, nparams ); Matrix<> drdp2( nparams, nparams ); std::vector drdp( nparams ), dfdp( nparams ); std::vector shiftn( nparams ); params_.resize( nparams ); // loop for 20 cycles refining the params g0 = 1.0e25; for ( n = 0; n < 20; n++ ) { // calc target fn and derivs calc_derivs( params_, r, drdp, drdp2 ); g1 = 0.0; for ( k = 0; k < nparams; k++ ) g1 += drdp[k]*drdp[k]; g1 = sqrt(g1); // stop if gradient starts increasing if ( g1 < 1.0e-10 || g1 >= g0 ) break; g0 = g1; // solve for Newton-Raphson shift shiftn = drdp2.solve( drdp ); // apply shift scale = (1.0+ftype(n)) / (1.0+ftype(n)+damp); for ( i = 0; i< nparams; i++ ) params_[i] -= scale*shiftn[i]; if ( debug ) std::cout << " Resolution function cycle " << n << " " << g0 << " " << g1 << " " << scale << "\n"; // stop if the target is quadratic if ( basisfn.type() == BasisFn_base::LINEAR && targetfn.type() == TargetFn_base::QUADRATIC ) break; } } /*! \return The refined basis function parameters */ const std::vector& ResolutionFn::params() const { return params_; } /*! The constructor performs the full minimisation calculation. \param hkl_info HKL_info object which provides the reflection list. \param basisfn The basis function used to describe the desired property. \param targetfn The target function to be minimised. \param damp_ If > 0.0, shifts are fdamped during early cycles to help convergence with difficult bases/target conbinations */ ResolutionFn_nonlinear::ResolutionFn_nonlinear( const HKL_info& hkl_info, const BasisFn_base& basisfn, const TargetFn_base& targetfn, const std::vector& params, const ftype damp, const bool debug ) { ftype r0, r1, w, scale, g, s, dotprod; HKL_class cls; HKL_info::HKL_reference_index ih; int i, j, k, n; hkl_info_ = &hkl_info; basisfn_ = &basisfn; targetfn_ = &targetfn; params_ = params; cell_ = hkl_info.cell(); int nparams = basisfn_->num_params(); Matrix<> dfdp2( nparams, nparams ); Matrix<> drdp2( nparams, nparams ); std::vector drdp( nparams ), dfdp( nparams ); std::vector shiftn( nparams ), shiftg( nparams ); std::vector params_old( nparams ); params_.resize( nparams ); // loop for 20 cycles refining the params for ( n = 0; n < 20; n++ ) { params_old = params_; // calc target fn and derivs calc_derivs( params_, r0, drdp, drdp2 ); // solve for Newton-Raphson shift shiftn = drdp2.solve( drdp ); // get step sizes and check direction g = s = dotprod = 0.0; for ( k = 0; k < nparams; k++ ) { g += drdp[k]*drdp[k]; s += shiftn[k]*shiftn[k]; dotprod += drdp[k]*shiftn[k]; } g = sqrt(g); s = sqrt(s); // make gradient shift to match NR shift for ( k = 0; k < nparams; k++ ) shiftg[k] = drdp[k] * s / g; // if NR shift opposes gradient, then ignore the NR shift if ( dotprod < 0.0 ) shiftn = shiftg; if ( debug ) { std::cout << "\nResolution function cycle: " << n << "\n"; if ( dotprod < 0.0 ) std::cout << " Using scaled grad " << s / g << "\n"; std::cout << " Gradient " << g << "\n"; for ( j = 0; j < nparams; j++ ) { for ( k = 0; k < nparams; k++ ) std::cout << " " << drdp2(j,k); std::cout << "\n"; } for ( k = 0; k < nparams; k++ ) std::cout << " " << k << " " << params_[k] << " " << drdp[k] << " " << shiftn[k] << "\n"; } // now try the step and if necessary reduce the shift scale = (1.0+ftype(n)) / (1.0+ftype(n)+damp); for ( j = 0; j < 20; j++ ) { for ( i = 0; i< nparams; i++ ) params_[i] = params_old[i] - scale*shiftn[i]; r1 = 0.0; for ( ih = hkl_info.first(); !ih.last(); ih.next() ) { cls = ih.hkl_class(); w = 2.0 / cls.epsilonc(); r1 += w * targetfn.rderiv( ih, f( ih ) ).r; } if ( Util::is_nan(r1) ) { scale *= 0.5; } else { scale *= 0.5; if ( (r1-r0) <= 0.0 ) break; } } if ( debug ) std::cout << " Resolution function cycle " << n << " " << r0 << " " << r1 << " " << scale << "\n"; if ( fabs( r1 - r0 ) < 1.0e-10 ) break; } } /* ResolutionFn( const HKL_info& hkl_info, const BasisFn_base& basisfn, const TargetFn_base& targetfn, const std::vector& params, const std::vector& targetval, const std::vector& targetwgt, const ftype damp = 0.0, const bool debug = false ); The constructor performs the full minimisation calculation. Additional parameters allow the function parameters to be restrained. \param hkl_info HKL_info object which provides the reflection list. \param basisfn The basis function used to describe the desired property. \param targetfn The target function to be minimised. \param params Initial values for the function parameters. \param targetval Target values for the function parameters. \param targetwgt Target sigmas for the function parameters. \param damp_ If > 0.0, shifts are fdamped during early cycles to help convergence with difficult bases/target conbinations. ResolutionFn::ResolutionFn( const HKL_info& hkl_info, const BasisFn_base& basisfn, const TargetFn_base& targetfn, const std::vector& params, const std::vector& targetval, const std::vector& targetwgt, const ftype damp, const bool debug ) { ftype r, g0, g1, scale; int i, k, n; hkl_info_ = &hkl_info; basisfn_ = &basisfn; targetfn_ = &targetfn; params_ = params; cell_ = hkl_info.cell(); int nparams = basisfn_->num_params(); Matrix<> dfdp2( nparams, nparams ); Matrix<> drdp2( nparams, nparams ); std::vector drdp( nparams ), dfdp( nparams ); std::vector shiftn( nparams ); params_.resize( nparams ); // loop for 20 cycles refining the params g0 = 1.0e25; for ( n = 0; n < 20; n++ ) { // calc target fn and derivs calc_derivs( params_, r, drdp, drdp2 ); // add parameter restraint terms for ( k = 0; k < nparams; k++ ) { ftype d = params[k] - targetval[k]; r += targetwgt[k] * d * d; drdp[k] += 2.0 * targetwgt[k] * d; drdp2(k,k) += 2.0 * targetwgt[k]; } g1 = 0.0; for ( k = 0; k < nparams; k++ ) g1 += drdp[k]*drdp[k]; g1 = sqrt(g1); // stop if gradient starts increasing if ( g1 < 1.0e-10 || g1 >= g0 ) break; g0 = g1; // solve for Newton-Raphson shift shiftn = drdp2.solve( drdp ); // apply shift scale = (1.0+ftype(n)) / (1.0+ftype(n)+damp); for ( i = 0; i< nparams; i++ ) params_[i] -= scale*shiftn[i]; if ( debug ) std::cout << " Resolution function cycle " << n << " " << g0 << " " << g1 << " " << scale << "\n"; // stop if the target is quadratic if ( basisfn.type() == BasisFn_base::LINEAR && targetfn.type() == TargetFn_base::QUADRATIC ) break; } } */ } // namespace clipper clipper-2.1/clipper/core/nxmap.cpp0000644000374100011300000000755110363703537014161 00000000000000/* nxmap.cpp: implementation file for crystal maps */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "nxmap.h" namespace clipper { Message_ctor message_ctor_nxmap( " [NXmap: constructed]" ); /*! For later initialisation: see init() */ NXmap_base::NXmap_base() { rt_orth_grid = RTop_orth( RTop<>::null() ); Message::message( message_ctor_nxmap ); } /*! Initialise an NXmap to some rhomboid chosen from within a crystal coordinate space, specified by the grid and a transformation from orthogonal to grid coordinates. \param grid The grid dimensions of the desired map. \param rt The rotation translation op from orthogonal to grid coordinates. */ void NXmap_base::init( const Grid& grid, const RTop<>& rt ) { // set up grid and orth->grid operator grid_ = grid; rt_orth_grid = rt; rt_grid_orth = rt.inverse(); // set up grid steps du = grid_.index( Coord_grid(1,0,0) ); dv = grid_.index( Coord_grid(0,1,0) ); dw = grid_.index( Coord_grid(0,0,1) ); } /*! Initialise an NXmap to some rhomboid chosen from within a crystal grid coordinate space, specified by a cell, sampling and box within that grid. This is useful for creating an NXmap which exactly matches some subregion of a crystallographic map. \param cell Unit cell defining the crystal space. \param grid The grid sampling of the given unit cell. \param grid_extent The map extent within that cell. */ void NXmap_base::init( const Cell& cell, const Grid_sampling& grid, const Grid_range& grid_extent ) { // initialise init( grid_extent, RTop<>( grid.matrix_frac_grid() * cell.matrix_frac(), -Coord_map( grid_extent.min() ) ) ); } /*! \return true if the object has not been initalised. */ bool NXmap_base::is_null() const { return rt_orth_grid.is_null(); } } // namespace clipper clipper-2.1/clipper/core/resol_fn.h0000644000374100011300000002515711311437215014303 00000000000000/*! \file lib/resol_fn.h Header file for resolution function generator */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_RESOL_FN #define CLIPPER_RESOL_FN #include "hkl_data.h" namespace clipper { //! abstract base class for resolution function basis functions /*! A basis function must be able to return its value and derivatives for any given HKL. Optionally, performance can be improved by returning a flag to indicate if the value of the basis function for a given reflection is linearly dependent on the values of the parameter, and a value indicating whether the curvature matrix takes an N-diagonal form. \b NOTE: for performance reasons the derivatives are returned as a reference to an internal object, so if you store a reference to the result (which is also good for performance, it will be overwritten on the next call. If this matters, store a copy rather than a reference. */ class BasisFn_base { public: //! enumeration of function types: optionally used to improve convergence enum FNtype { GENERAL, LINEAR }; //! object holding the basis function and its first two derivatives class Fderiv { public: ftype f; //!< value of function std::vector df; //!< first derivative vector w.r.t params Matrix<> df2; //!< second derivative matrix w.r.t params Fderiv() {} //!< null constructor Fderiv(const int& np) : df(np,0.0), df2(np,np,0.0) {} //& params ) const { return fderiv( hkl, cell, params ).f; } //! the value of the resolution function and its first two derivatives virtual const Fderiv& fderiv( const HKL& hkl, const Cell& cell, const std::vector& params ) const = 0; //! the type of the function: optionally used to improve convergence virtual FNtype type() const; //! number of non-zero diagonals in the upper triangle of the curvatures virtual int num_diagonals() const; protected: //! provide write access to result for subclasses Fderiv& result() const { return result_; } virtual ~BasisFn_base() {} //!< destructor private: int np_; //!< number of params mutable Fderiv result_; //!< internal cache for result }; //! abstract base class for least-squares resolution function target functions /*! A target function must be able to return its value given the value of the basis function for all HKL, and its derivative with respect the values of the basis function for all HKL. Optionally, performance can be improved by returning a flag to indicate if the target function is quadratic. */ class TargetFn_base { public: //! object holding the residual function and first two derivatives class Rderiv { public: ftype r; //!< the value of the function ftype dr; //!< first derivative w.r.t basis fn ftype dr2; //!< second derivative w.r.t basis fn }; //! enumeration of function types: optionally used to improve convergence enum FNtype { GENERAL, QUADRATIC }; //! return the value and derivatives of the target function /*! If the value of f(h) is invalid, rderiv.r should be set to NaN */ virtual Rderiv rderiv( const HKL_info::HKL_reference_index& ih, const ftype& fh ) const = 0; //! the type of the function: optionally used to improve convergence virtual FNtype type() const { return GENERAL; } virtual ~TargetFn_base() {} //!< destructor //! test that the residuals, gradients, and curvatures are consistent void debug( const HKL_info& hkl_info ) const; }; //! 2nd order resolution function evaluator /*! This is an automatic evaluator for arbitrary functions of HKL, most commonly used for evaluating a function of resolution (such a mean F^2 or sigmaa), although more general tasks including local scaling of reflections and anisotropic functions can also be handled. This form is for target functions which approach zero quadratically, e.g. least-squares targets. This version implements a naive Newton-Raphson minimiser, which only uses the gradient and curvature of the target function, ignoring its value. It is ideal for quadratic targets with linear basis functions. To evaluate a resolution function, this class must be provided with two objects: - The basis function (and gradients), which describes the value of the function for any reflection given a set of paramters. - The target function (and derivatives), which is used to determine the values of the basis function parameters. For example, the following code may be used to calculate a smooth scaling function to scale one set of data to another using an anisotropic Gaussian scaling function: \code // make data object clipper::HKL_info hkls; clipper::HKL_data fsig1( hkls ); clipper::HKL_data fsig2( hkls ); // INITIALISE THEM HERE! // calculate the scaling function std::vector params( 7, 0.0 ); // initial parameters clipper::BasisFn_aniso_gaussian basisfn; // aniso gaussian clipper::TargetFn_scaleF1F2targetfn( fsig1, fsig2 ); clipper::ResolutionFn_nonlinear rfn( hkls, basisfn, targetfn, params ); // now scale the data clipper::HKL_info::HKL_reference_index ih; for ( ih = hkls.first(); !ih.last(); ih.next() ) fsig1[ih].scale( sqrt( rfn.f(ih) ) ); \endcode The most useful isotropic resolution function is the BasisFn_spline, since it is linear and provides a good fit to most data. */ class ResolutionFn { public: //! constructor: need reflections, basis fn and target fn. ResolutionFn( const HKL_info& hkl_info, const BasisFn_base& basisfn, const TargetFn_base& targetfn, const std::vector& params, const ftype damp = 0.0, const bool debug = false ); //! return the value of the basis function with the current paramters inline ftype f( const HKL_info::HKL_reference_index& ih ) const { return basisfn_->f( ih.hkl(), cell_, params_ ); } //! return the values of the parameters const std::vector& params() const; //! print the target, gradient, and curvatures with respect to the params void debug() const; protected: const HKL_info* hkl_info_; //!< reflection list const TargetFn_base* targetfn_; //!< target function const BasisFn_base* basisfn_; //!< basis function std::vector params_; //!< basis function parameters Cell cell_; //!< cell //! calculate derivatives of target wrt params \internal void calc_derivs( const std::vector& params, ftype& r, std::vector& drdp, Matrix<>& drdp2 ) const; //! null constructor ResolutionFn() {} }; //! 2nd order resolution function evaluator /*! This is an automatic evaluator for arbitrary functions of HKL, most commonly used for evaluating a function of resolution (such a mean F^2 or sigmaa), although more general tasks including local scaling of reflections and anisotropic functions can also be handled. This form is for target functions which approach zero quadratically, e.g. least-squares targets. \note This version implements a minimiser which uses both Newton-Raphson and gradient steps depending on the situation. It can be used for non-quadratic targets or non-linear basis functions. To evaluate a resolution function, this class must be provided with two objects: - The basis function (and gradients), which describes the value of the function for any reflection given a set of paramters. - The target function (and derivatives), which is used to determine the values of the basis function parameters. */ class ResolutionFn_nonlinear: public ResolutionFn { public: //! constructor: need reflections, basis fn and target fn. ResolutionFn_nonlinear( const HKL_info& hkl_info, const BasisFn_base& basisfn, const TargetFn_base& targetfn, const std::vector& params, const ftype damp = 0.0, const bool debug = false ); }; } // namespace clipper #endif clipper-2.1/clipper/core/nxmap_operator.h0000644000374100011300000002230310363703537015531 00000000000000/*! \file lib/nxmap_operator.h Header file for non-crystal map operator */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_NXMAP_OPERATOR #define CLIPPER_NXMAP_OPERATOR #include "xmap.h" #include "nxmap.h" namespace clipper { //! NX_operator: non-crystal map operator /*! This class holds a reference to a non-crystal map frame from somewhere within a crystallographic map frame. In the general case, an orthogonal rotation-translation operator is provided which maps the orthogonal frame of the crystal space onto the orthogonal frame of the NXmap space. The object calculates and stores optimised transformations between the crystallgoraphic frame (described either in fractional or grid coordinates), and the NXmap grid. Fast paths are generated automatically if the grids are related. */ class NX_operator { public: //! null constructor NX_operator(); //! constructor: from Xmap, NXmap, and operator NX_operator( const Xmap_base& xmap, const NXmap_base& nxmap, const RTop_orth& rtop ); //! constructor: from cell, grid sampling, NXmap, and operator NX_operator( const Cell& cell, const Grid_sampling& grid, const NXmap_base& nxmap, const RTop_orth& rtop ); //! initialiser:: from Xmap, NXmap, and operator void init( const Xmap_base& xmap, const NXmap_base& nxmap, const RTop_orth& rtop ); //! initialiser:: from cell, grid sampling, NXmap, and operator void init( const Cell& cell, const Grid_sampling& grid, const NXmap_base& nxmap, const RTop_orth& rtop ); //! convert xtal frac coord to nxmap map coord inline Coord_map coord_map( const Coord_frac& c ) const { return Coord_map( xfrac_nxgrid * c ); } //! convert nxmap map coord to xtal frac coord inline Coord_frac coord_frac( const Coord_map& c ) const { return Coord_frac( nxgrid_xfrac * c ); } //! get value of nxmap at xmap grid coord using fastest appropriate method template T nxmap_data( const M& nxmap, const Coord_grid& c ) const; //! get value of xmap at nxmap grid coord using fastest appropriate method template T xmap_data( const M& xmap, const Coord_grid& c ) const; //! test if object has been initialised bool is_null() const; void debug() const; protected: RTop<> xfrac_nxgrid; //!< xtal_cell -> nxmap operator RTop<> nxgrid_xfrac; //!< nxmap -> xtal_cell operator RTop<> xgrid_nxgrid; //!< xtal_grid -> nxmap operator RTop<> nxgrid_xgrid; //!< nxmap -> xtal_grid operator RTop xgrid_nxgrid_int; //!< xtal_grid -> nxmap integer operator RTop nxgrid_xgrid_int; //!< nxmap -> xtal_grid integer operator bool x_nx_is_int; //!< true if int operator exists bool x_nx_is_trn; //!< true if int operator exists and is pure transln bool nx_x_is_int; //!< true if int operator exists bool nx_x_is_trn; //!< true if int operator exists and is pure transln }; //! NXmap_operator: non-crystal map operator referencing a particular NXmap /*! This class holds a reference to a non-crystal map object from somewhere within a crystallographic map frame. In the general case, an orthogonal rotation-translation operator is provided which maps the orthogonal frame of the crystal space onto the orthogonal frame of the NXmap space. The object calculates and stores optimised transformations between the crystallgoraphic frame (described either in fractional or grid coordinates), and the NXmap grid. Fast paths are generated automatically if the grids are related. \note This object differes from NX_operator in that it keeps a reference to an individual NXmap, which may be used to access that object directly. */ template class NXmap_operator : public NX_operator { public: //! null constructor NXmap_operator() {} //! constructor: from Xmap, NXmap, and operator NXmap_operator( const Xmap_base& xmap, const NXmap& nxmap, const RTop_orth& rtop ) { init( xmap, nxmap, rtop ); } //! constructor: from cell, grid sampling, NXmap, and operator NXmap_operator( const Cell& cell, const Grid_sampling& grid, const NXmap& nxmap, const RTop_orth& rtop ) { init( cell, grid, nxmap, rtop ); } //! initialiser:: from Xmap, NXmap, and operator void init( const Xmap_base& xmap, const NXmap& nxmap, const RTop_orth& rtop ) { init( xmap.cell(), xmap.grid_sampling(), nxmap, rtop ); } //! initialiser:: from cell, grid sampling, NXmap, and operator void init( const Cell& cell, const Grid_sampling& grid, const NXmap& nxmap, const RTop_orth& rtop ) { nxmap_ = &nxmap; NX_operator::init( cell, grid, nxmap, rtop ); } //! access NXmap directly from xmap grid coord using fastest method template T nxmap_data( const Coord_grid& c ) const { return NX_operator::nxmap_data( *nxmap_, c ); } //! get the target NXmap of this operator const NXmap& nxmap() const { return *nxmap_; } private: const NXmap* nxmap_; //!< pointer to the nxmap }; // template implementations /*! The density of the non-crystal map at the position corresponding to a crystallographic map grid coordinate is returned. If the grids match exactly either by pure translation or by rotation+translation, then fast paths are used to return the requested density directly. Otherwise the supplied interpolation template is used. No checking is performed for coordinates outside the NXmap. \param nxmap The non-crystal map (NXmap) to be queried. \param c The grid coordinate in the crystallographic coordinate frame. \return The value of the NXmap at the requested position. */ template T NX_operator::nxmap_data( const M& nxmap, const Coord_grid& c ) const { if ( x_nx_is_trn ) { return T( nxmap.get_data( Coord_grid( c + xgrid_nxgrid_int.trn() ) ) ); } else if ( x_nx_is_int ) { return T( nxmap.get_data( Coord_grid( xgrid_nxgrid_int * c ) ) ); } else { T val; I::interp( nxmap, Coord_map( xgrid_nxgrid * c.coord_map() ), val ); return val; } } /*! The density of the crystal map at the position corresponding to a non-crystallographic map grid coordinate is returned. If the grids match exactly either by pure translation or by rotation+translation, then fast paths are used to return the requested density directly. Otherwise the supplied interpolation template is used. \param xmap The crystal map (Xmap) to be queried. \param c The grid coordinate in the crystallographic coordinate frame. \return The value of the Xmap at the requested position. */ template T NX_operator::xmap_data( const M& xmap, const Coord_grid& c ) const { if ( nx_x_is_trn ) { return T( xmap.get_data( Coord_grid( c + nxgrid_xgrid_int.trn() ) ) ); } else if ( nx_x_is_int ) { return T( xmap.get_data( Coord_grid( nxgrid_xgrid_int * c ) ) ); } else { T val; I::interp( xmap, Coord_map( nxgrid_xgrid * c.coord_map() ), val ); return val; } } } // namespace clipper #endif clipper-2.1/clipper/core/resol_basisfn.cpp0000644000374100011300000002755511271603054015665 00000000000000/* resol_basisfn.cpp: implementation file for resolution basis functions */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA /* This code is derived from the 'dm' source code */ #include "resol_basisfn.h" namespace clipper { // resolution ordinal void Resolution_ordinal::init( const HKL_info& hklinfo, const ftype& power ) { HKL_info::HKL_reference_index ih; Range range; for ( ih = hklinfo.first(); !ih.last(); ih.next() ) range.include( ih.invresolsq() ); Generic_ordinal::init( range, 1000 ); for ( ih = hklinfo.first(); !ih.last(); ih.next() ) accumulate( ih.invresolsq() ); prep_ordinal(); for ( int i = 0; i < hist.size(); i++ ) hist[i] = pow( hist[i], 1.0/power ); } void Resolution_ordinal::init( const HKL_data_base& hkldata, const ftype& power ) { HKL_info::HKL_reference_index ih; Range range; for ( ih = hkldata.first_data(); !ih.last(); hkldata.next_data(ih) ) range.include( ih.invresolsq() ); Generic_ordinal::init( range, 1000 ); for ( ih = hkldata.first_data(); !ih.last(); hkldata.next_data(ih) ) accumulate( ih.invresolsq() ); prep_ordinal(); for ( int i = 0; i < hist.size(); i++ ) hist[i] = pow( hist[i], 1.0/power ); } void Resolution_ordinal::init( const HKL_data_base& hkldata, const Cell& cell, const ftype& power ) { HKL_info::HKL_reference_index ih; Range range; for ( ih = hkldata.first_data(); !ih.last(); hkldata.next_data(ih) ) range.include( ih.hkl().invresolsq( cell ) ); Generic_ordinal::init( range, 1000 ); for ( ih = hkldata.first_data(); !ih.last(); hkldata.next_data(ih) ) accumulate( ih.hkl().invresolsq( cell ) ); prep_ordinal(); for ( int i = 0; i < hist.size(); i++ ) hist[i] = pow( hist[i], 1.0/power ); } // binner ftype BasisFn_binner::f_s( const ftype& s, const std::vector& params ) const { const int& nbins = num_params(); // convert reso to int const int bin = Util::bound( 0, Util::intf( ftype(nbins) * s_ord.ordinal( s ) ), nbins-1 ); return params[bin]; } const BasisFn_base::Fderiv& BasisFn_binner::fderiv_s( const ftype& s, const std::vector& params ) const { const int& nbins = num_params(); for ( int i = 0; i < nbins; i++ ) result().df[i] = 0.0; // convert reso to int const int bin = Util::bound( 0, Util::intf( ftype(nbins) * s_ord.ordinal( s ) ), nbins-1 ); // make vector of derivatives result().f = params[bin]; result().df[bin] = 1.0; return result(); } // linear binner ftype BasisFn_linear::f_s( const ftype& s_, const std::vector& params ) const { const int& nbins = num_params(); const ftype s = ftype(nbins) * s_ord.ordinal( s_ ); const int i = Util::intf( s ); const ftype ds = s - ftype(i); const int i0 = Util::bound( 0, i , nbins-1 ); const int i1 = Util::bound( 0, i+1, nbins-1 ); return ( params[i0]*(1.0-ds) + params[i1]*(ds) ); } const BasisFn_base::Fderiv& BasisFn_linear::fderiv_s( const ftype& s_, const std::vector& params ) const { const int& nbins = num_params(); for ( int i = 0; i < nbins; i++ ) result().df[i] = 0.0; const ftype s = ftype(nbins) * s_ord.ordinal( s_ ); const int i = Util::intf( s ); const ftype ds = s - ftype(i); const int i0 = Util::bound( 0, i , nbins-1 ); const int i1 = Util::bound( 0, i+1, nbins-1 ); result().f = params[i0]*(1.0-ds) + params[i1]*(ds); result().df[i0] += (1.0-ds); result().df[i1] += (ds); return result(); } // smooth binner ftype BasisFn_spline::f_s( const ftype& s_, const std::vector& params ) const { const int& nbins = num_params(); const ftype s = ftype(nbins) * s_ord.ordinal( s_ ); const int i = Util::intf( s ); const ftype ds = s - ftype(i) - 0.5; const int i0 = Util::bound( 0, i-1, nbins-1 ); const int i1 = Util::bound( 0, i , nbins-1 ); const int i2 = Util::bound( 0, i+1, nbins-1 ); return ( params[i0]*0.5*(ds-0.5)*(ds-0.5) + params[i1]*(0.75-ds*ds) + params[i2]*0.5*(ds+0.5)*(ds+0.5) ); } const BasisFn_base::Fderiv& BasisFn_spline::fderiv_s( const ftype& s_, const std::vector& params ) const { const int& nbins = num_params(); for ( int i = 0; i < nbins; i++ ) result().df[i] = 0.0; const ftype s = ftype(nbins) * s_ord.ordinal( s_ ); const int i = Util::intf( s ); const ftype ds = s - ftype(i) - 0.5; const int i0 = Util::bound( 0, i-1, nbins-1 ); const int i1 = Util::bound( 0, i , nbins-1 ); const int i2 = Util::bound( 0, i+1, nbins-1 ); result().f = params[i0]*0.5*(ds-0.5)*(ds-0.5) + params[i1]*(0.75-ds*ds) + params[i2]*0.5*(ds+0.5)*(ds+0.5); result().df[i0] += 0.5*(ds-0.5)*(ds-0.5); result().df[i1] += 0.75-ds*ds; result().df[i2] += 0.5*(ds+0.5)*(ds+0.5); return result(); } // gaussian /* ftype BasisFn_gaussian::f_s( const ftype& s, const std::vector& params ) const { // generate Gaussian return exp( - params[1] * s + params[0] ); } */ const BasisFn_base::Fderiv& BasisFn_gaussian::fderiv_s( const ftype& s, const std::vector& params ) const { ftype f = exp( - params[1] * s + params[0] ); result().f = result().df[0] = result().df2(0,0) = f; result().df[1] = result().df2(0,1) = result().df2(1,0) = -s * f; result().df2(1,1) = s * s * f; return result(); } ftype BasisFn_gaussian::scale( const std::vector& params ) const { return exp( params[0] ); } ftype BasisFn_gaussian::u_iso( const std::vector& params ) const { return params[1] / Util::twopi2(); } // aniso gaussian /* ftype BasisFn_aniso_gaussian::f_coord( const Coord_reci_orth& xs, const std::vector& params ) const { // generate Gaussian return exp( params[0] - ( xs[0]*xs[0]*params[1] + xs[1]*xs[1]*params[2] + xs[2]*xs[2]*params[3] + 2.0*(xs[0]*xs[1]*params[4] + xs[0]*xs[2]*params[5] + xs[1]*xs[2]*params[6]) ) ); } */ const BasisFn_base::Fderiv& BasisFn_aniso_gaussian::fderiv_coord( const Coord_reci_orth& xs, const std::vector& params ) const { ftype c[7]; c[0] = 1.0; c[1] = -xs[0]*xs[0]; c[2] = -xs[1]*xs[1]; c[3] = -xs[2]*xs[2]; c[4] = -2.0*xs[0]*xs[1]; c[5] = -2.0*xs[0]*xs[2]; c[6] = -2.0*xs[1]*xs[2]; ftype f = exp( params[0] + c[1]*params[1] + c[2]*params[2] + c[3]*params[3] + c[4]*params[4] + c[5]*params[5] + c[6]*params[6] ); result().f = f; int i, j; for ( j = 0; j < 7; j++ ) { result().df[j] = c[j]*f; for ( i = 0; i < 7; i++ ) result().df2(i,j) = c[i]*c[j]*f; } return result(); } ftype BasisFn_aniso_gaussian::scale( const std::vector& params ) const { return exp( params[0] ); } U_aniso_orth BasisFn_aniso_gaussian::u_aniso_orth( const std::vector& params ) const { return U_aniso_orth( params[1]/Util::twopi2(), params[2]/Util::twopi2(), params[3]/Util::twopi2(), params[4]/Util::twopi2(), params[5]/Util::twopi2(), params[6]/Util::twopi2() ); } // log_gaussian /* ftype BasisFn_log_gaussian::f_s( const ftype& s, const std::vector& params ) const { // generate Gaussian return exp( - params[1] * s + params[0] ); } */ const BasisFn_base::Fderiv& BasisFn_log_gaussian::fderiv_s( const ftype& s, const std::vector& params ) const { ftype f = - params[1] * s + params[0]; result().f = f; result().df[0] = 1.0; result().df[1] = -s; return result(); } ftype BasisFn_log_gaussian::scale( const std::vector& params ) const { return exp( params[0] ); } ftype BasisFn_log_gaussian::u_iso( const std::vector& params ) const { return params[1] / Util::twopi2(); } // log_aniso gaussian /* ftype BasisFn_log_aniso_gaussian::f_coord( const Coord_reci_orth& xs, const std::vector& params ) const { // generate Gaussian return exp( params[0] - ( xs[0]*xs[0]*params[1] + xs[1]*xs[1]*params[2] + xs[2]*xs[2]*params[3] + 2.0*(xs[0]*xs[1]*params[4] + xs[0]*xs[2]*params[5] + xs[1]*xs[2]*params[6]) ) ); } */ const BasisFn_base::Fderiv& BasisFn_log_aniso_gaussian::fderiv_coord( const Coord_reci_orth& xs, const std::vector& params ) const { result().df[0] = 1.0; result().df[1] = -xs[0]*xs[0]; result().df[2] = -xs[1]*xs[1]; result().df[3] = -xs[2]*xs[2]; result().df[4] = -2.0*xs[0]*xs[1]; result().df[5] = -2.0*xs[0]*xs[2]; result().df[6] = -2.0*xs[1]*xs[2]; result().f = ( params[0] + result().df[1]*params[1] + result().df[2]*params[2] + result().df[3]*params[3] + result().df[4]*params[4] + result().df[5]*params[5] + result().df[6]*params[6] ); return result(); } ftype BasisFn_log_aniso_gaussian::scale( const std::vector& params ) const { return exp( params[0] ); } U_aniso_orth BasisFn_log_aniso_gaussian::u_aniso_orth( const std::vector& params ) const { return U_aniso_orth( params[1]/Util::twopi2(), params[2]/Util::twopi2(), params[3]/Util::twopi2(), params[4]/Util::twopi2(), params[5]/Util::twopi2(), params[6]/Util::twopi2() ); } // expcubic /* ftype BasisFn_expcubic::f_s( const ftype& s, const std::vector& params ) const { // generate Expcubic return exp( ( ( - params[3]*s + params[2] )*s - params[1] )*s + params[0] ); } */ const BasisFn_base::Fderiv& BasisFn_expcubic::fderiv_s( const ftype& s, const std::vector& params ) const { ftype f = exp( ( ( -params[3]*s + params[2] )*s - params[1] )*s + params[0] ); result().f = result().df[0] = result().df2(0,0) = f; f *= -s; result().df[1] = result().df2(0,1) = result().df2(1,0) = f; f *= -s; result().df[2] = result().df2(0,2) = result().df2(1,1) = result().df2(2,0) = f; f *= -s; result().df[3] = result().df2(0,3) = result().df2(1,2) = result().df2(2,1) = result().df2(3,0) = f; f *= -s; result().df2(1,3) = result().df2(2,2) = result().df2(3,1) = f; f *= -s; result().df2(2,3) = result().df2(3,2) = f; f *= -s; result().df2(3,3) = f; return result(); } } // namespace clipper clipper-2.1/clipper/core/hkl_datatypes.h0000644000374100011300000006054411102576702015332 00000000000000/*! \file lib/hkl_datatypes.h Fundamental data types for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_HKL_DATATYPES #define CLIPPER_HKL_DATATYPES #include #include "hkl_data.h" namespace clipper { // Now define some actual datatypes namespace datatypes { //! Reflection data type: I + sigI /*! Note that I_sigI also has methods for returning I_pl(), sigI_pl(), I_mi, sigI_mi(), so you can use this type in any template type where you would use I_sigI_ano. */ template class I_sigI : private Datatype_base { public: I_sigI() { Util::set_null(I_); Util::set_null(sigI_); } I_sigI( const dtype& I, const dtype& sigI ) : I_(I), sigI_(sigI) {} void set_null() { Util::set_null(I_); Util::set_null(sigI_); } static String type() { return "I_sigI"; } void friedel() {} void shift_phase(const ftype& dphi) {} bool missing() const { return (Util::is_nan(I_) || Util::is_nan(sigI_)); } static int data_size() { return 2; } static String data_names() { return "I sigI"; } void data_export( xtype array[] ) const { array[0] = I(); array[1] = sigI(); } void data_import( const xtype array[] ) { I() = array[0]; sigI() = array[1]; } //! this type is scalable - apply magnitude scale factor void scale(const ftype& s) { I_ *= (s*s); sigI_ *= (s*s); } // accessors const dtype& I() const { return I_; } // class I_sigI_ano : private Datatype_base { public: I_sigI_ano() { set_null(); } void set_null() { Util::set_null(I_pl_); Util::set_null(I_mi_); Util::set_null(sigI_pl_); Util::set_null(sigI_mi_); Util::set_null(cov_); } static String type() { return "I_sigI_ano"; } void friedel() { dtype I=I_pl_; I_pl_=I_mi_; I_mi_=I; I=sigI_pl_; sigI_pl_=sigI_mi_; sigI_mi_=I; } void shift_phase(const ftype& dphi) {} bool missing() const { return (Util::is_nan(I_pl_) && Util::is_nan(I_mi_)); } static int data_size() { return 5; } static String data_names() { return "I+ sigI+ I- sigI- covI+-"; } void data_export( xtype a[] ) const { a[0] = I_pl(); a[1] = sigI_pl(); a[2] = I_mi(); a[3] = sigI_mi(); a[4] = cov(); } void data_import( const xtype a[] ) { I_pl() = a[0]; sigI_pl() = a[1]; I_mi() = a[2]; sigI_mi() = a[3]; cov() = a[4]; } //! this type is scalable - apply magnitude scale factor void scale(const ftype& s) { I_pl_ *= (s*s); sigI_pl_ *= (s*s); I_mi_ *= (s*s); sigI_mi_ *= (s*s); cov_ *= (s*s); } // accessors const dtype& I_pl() const { return I_pl_; } // class F_sigF : private Datatype_base { public: F_sigF() { Util::set_null(f_); Util::set_null(sigf_); } F_sigF( const dtype& f, const dtype& sigf ) : f_(f), sigf_(sigf) {} void set_null() { Util::set_null(f_); Util::set_null(sigf_); } static String type() { return "F_sigF"; } void friedel() {} void shift_phase(const ftype& dphi) {} bool missing() const { return (Util::is_nan(f_) || Util::is_nan(sigf_)); } static int data_size() { return 2; } static String data_names() { return "F sigF"; } void data_export( xtype array[] ) const { array[0] = f(); array[1] = sigf(); } void data_import( const xtype array[] ) { f() = array[0]; sigf() = array[1]; } //! this type is scalable - apply magnitude scale factor void scale(const ftype& s) { f_ *= s; sigf_ *= s; } // accessors const dtype& f() const { return f_; } // class F_sigF_ano : private Datatype_base { public: F_sigF_ano() { set_null(); } void set_null() { Util::set_null(f_pl_); Util::set_null(f_mi_); Util::set_null(sigf_pl_); Util::set_null(sigf_mi_); Util::set_null(cov_); } static String type() { return "F_sigF_ano"; } void friedel() { dtype f=f_pl_; f_pl_=f_mi_; f_mi_=f; f=sigf_pl_; sigf_pl_=sigf_mi_; sigf_mi_=f; } void shift_phase(const ftype& dphi) {} bool missing() const { return (Util::is_nan(f_pl_) && Util::is_nan(f_mi_)); } static int data_size() { return 5; } static String data_names() { return "F+ sigF+ F- sigF- covF+-"; } void data_export( xtype a[] ) const { a[0] = f_pl(); a[1] = sigf_pl(); a[2] = f_mi(); a[3] = sigf_mi(); a[4] = cov(); } void data_import( const xtype a[] ) { f_pl() = a[0]; sigf_pl() = a[1]; f_mi() = a[2]; sigf_mi() = a[3]; cov() = a[4]; } //! this type is scalable - apply magnitude scale factor void scale(const ftype& s) { f_pl_ *= s; sigf_pl_ *= s; f_mi_ *= s; sigf_mi_ *= s; cov_ *= (s*s); } // accessors const dtype& f_pl() const { return f_pl_; } // fsigf; clipper::HKL_data esige; esige.compute( fsigf, clipper::data32::Compute_EsigE_from_FsigF() ); \endcode */ template class E_sigE : private Datatype_base { public: E_sigE() { Util::set_null(E_); Util::set_null(sigE_); } E_sigE( const dtype& E, const dtype& sigE ) : E_(E), sigE_(sigE) {} void set_null() { Util::set_null(E_); Util::set_null(sigE_); } static String type() { return "E_sigE"; } void friedel() {} void shift_phase(const ftype& dphi) {} bool missing() const { return (Util::is_nan(E_) || Util::is_nan(sigE_)); } static int data_size() { return 2; } static String data_names() { return "E sigE"; } void data_export( xtype array[] ) const { array[0] = E(); array[1] = sigE(); } void data_import( const xtype array[] ) { E() = array[0]; sigE() = array[1]; } //! this type is scalable - apply magnitude scale factor void scale(const ftype& s) { E_ *= s; sigE_ *= s; } // accessors const dtype& E() const { return E_; } // class E_sigE_ano : private Datatype_base { public: E_sigE_ano() { set_null(); } void set_null() { Util::set_null(E_pl_); Util::set_null(E_mi_); Util::set_null(sigE_pl_); Util::set_null(sigE_mi_); Util::set_null(cov_); } static String type() { return "E_sigE_ano"; } void friedel() { dtype e=E_pl_; E_pl_=E_mi_; E_mi_=e; e=sigE_pl_; sigE_pl_=sigE_mi_; sigE_mi_=e; } void shift_phase(const ftype& dphi) {} bool missing() const { return (Util::is_nan(E_pl_) && Util::is_nan(E_mi_)); } static int data_size() { return 5; } static String data_names() { return "E+ sigE+ E- sigE- covE+-"; } void data_export( xtype a[] ) const { a[0] = E_pl(); a[1] = sigE_pl(); a[2] = E_mi(); a[3] = sigE_mi(); a[4] = cov(); } void data_import( const xtype a[] ) { E_pl() = a[0]; sigE_pl() = a[1]; E_mi() = a[2]; sigE_mi() = a[3]; cov() = a[4]; } //! this type is scalable - apply magnitude scale factor void scale(const ftype& s) { E_pl_ *= s; sigE_pl_ *= s; E_mi_ *= s; sigE_mi_ *= s; cov_ *= (s*s); } // accessors const dtype& E_pl() const { return E_pl_; } // class F_phi : private Datatype_base { public: F_phi() { Util::set_null(f_); Util::set_null(phi_); } F_phi( const dtype& f, const dtype& phi ) : f_(f), phi_(phi) {} void set_null() { Util::set_null(f_); Util::set_null(phi_); } static String type() { return "F_phi"; } void friedel() { if (!Util::is_nan(phi_)) phi_=-phi_; } void shift_phase(const ftype& dphi) { if (!Util::is_nan(phi_)) phi_+=dphi; } bool missing() const { return (Util::is_nan(f_) || Util::is_nan(phi_)); } static int data_size() { return 2; } static String data_names() { return "F phi"; } void data_export( xtype array[] ) const { array[0] = f(); array[1] = phi(); } void data_import( const xtype array[] ) { f() = array[0]; phi() = array[1]; } //! this type is scalable - apply magnitude scale factor void scale(const ftype& s) { f_ *= s; } // accessors const dtype& f() const { return f_; } // c) { f_=std::abs(c); phi_=std::arg(c); } //! convert to complex operator std::complex() const { return std::polar(f_, phi_); } //! resolve along phase direction dtype resolve(const dtype phi) { return f_ * cos( phi_ - phi ); } //! tidy up so that real part is positive and phase 0...twopi const F_phi& norm() { if ( f_ < 0.0 ) { f_ = -f_; phi_ += Util::pi(); } phi_ = Util::mod( phi_, Util::twopi() ); return *this; } private: dtype f_,phi_; }; //! Reflection data type: best phi + fom template class Phi_fom : private Datatype_base { public: Phi_fom() { Util::set_null(phi_); Util::set_null(fom_); } Phi_fom( const dtype& phi, const dtype& fom ) : phi_(phi), fom_(fom) {} void set_null() { Util::set_null(phi_); Util::set_null(fom_); } static String type() { return "Phi_fom"; } void friedel() { if (!Util::is_nan(phi_)) phi_=-phi_; } void shift_phase(const ftype& dphi) { if (!Util::is_nan(phi_)) phi_+=dphi; } bool missing() const { return (Util::is_nan(phi_) || Util::is_nan(fom_)); } static int data_size() { return 2; } static String data_names() { return "phi fom"; } void data_export( xtype array[] ) const { array[0] = phi(); array[1] = fom(); } void data_import( const xtype array[] ) { phi() = array[0]; fom() = array[1]; } // accessors const dtype& phi() const { return phi_; } // class ABCD : private Datatype_base { public: ABCD() { Util::set_null(a_); Util::set_null(b_); Util::set_null(c_); Util::set_null(d_); } ABCD( const dtype& a, const dtype& b, const dtype& c, const dtype& d ) : a_(a), b_(b), c_(c), d_(d) {} void set_null() { Util::set_null(a_); Util::set_null(b_); Util::set_null(c_); Util::set_null(d_); } static String type() { return "ABCD"; } void friedel() { if ( !missing() ) { b_=-b_; d_=-d_; } } void shift_phase(const ftype& dphi) { if ( !missing() ) { ftype cosd,sind; dtype a1, b1, c1, d1; cosd = cos(dphi); sind = sin(dphi); a1 = a_*cosd - b_*sind; b1 = a_*sind + b_*cosd; cosd = cos(2.0*dphi); sind = sin(2.0*dphi); c1 = c_*cosd - d_*sind; d1 = c_*sind + d_*cosd; a_ = a1; b_ = b1; c_ = c1; d_ = d1; } } bool missing() const { return (Util::is_nan(a_) || Util::is_nan(b_) || Util::is_nan(c_) || Util::is_nan(d_)); } static int data_size() { return 4; } static String data_names() { return "A B C D"; } void data_export( xtype array[] ) const { array[0] = a(); array[1] = b(); array[2] = c(); array[3] = d(); } void data_import( const xtype array[] ) { a() = array[0]; b() = array[1]; c() = array[2]; d() = array[3]; } // accessors const dtype& a() const { return a_; } // class D_sigD : private Datatype_base { public: D_sigD() { Util::set_null(d_); Util::set_null(sigd_); } D_sigD( const dtype& d, const dtype& sigd ) : d_(d), sigd_(sigd) {} void set_null() { Util::set_null(d_); Util::set_null(sigd_); } static String type() { return "D_sigD"; } void friedel() { d_ = -d_; } void shift_phase(const ftype& dphi) {} bool missing() const { return (Util::is_nan(d_) || Util::is_nan(sigd_)); } static int data_size() { return 2; } static String data_names() { return "Dano sigDano"; } void data_export( xtype array[] ) const { array[0] = d(); array[1] = sigd(); } void data_import( const xtype array[] ) { d() = array[0]; sigd() = array[1]; } //! this type is scalable - apply magnitude scale factor void scale(const ftype& s) { d_ *= s; sigd_ *= s; } // accessors const dtype& d() const { return d_; } // I_sigI; //!< datatype typedef clipper::datatypes::I_sigI_ano I_sigI_ano; //!< datatype typedef clipper::datatypes::F_sigF F_sigF; //!< datatype typedef clipper::datatypes::F_sigF_ano F_sigF_ano; //!< datatype typedef clipper::datatypes::E_sigE E_sigE; //!< datatype typedef clipper::datatypes::F_phi F_phi; //!< datatype typedef clipper::datatypes::Phi_fom Phi_fom; //!< datatype typedef clipper::datatypes::ABCD ABCD; //!< datatype typedef clipper::datatypes::Flag Flag; //!< datatype typedef clipper::datatypes::Flag_bool Flag_bool; //!< datatype typedef clipper::datatypes::D_sigD D_sigD; //!< datatype } namespace data64 { typedef clipper::datatypes::I_sigI I_sigI; //!< datatype typedef clipper::datatypes::I_sigI_ano I_sigI_ano; //!< datatype typedef clipper::datatypes::F_sigF F_sigF; //!< datatype typedef clipper::datatypes::F_sigF_ano F_sigF_ano; //!< datatype typedef clipper::datatypes::E_sigE E_sigE; //!< datatype typedef clipper::datatypes::F_phi F_phi; //!< datatype typedef clipper::datatypes::Phi_fom Phi_fom; //!< datatype typedef clipper::datatypes::ABCD ABCD; //!< datatype typedef clipper::datatypes::Flag Flag; //!< datatype typedef clipper::datatypes::Flag_bool Flag_bool; //!< datatype typedef clipper::datatypes::D_sigD D_sigD; //!< datatype } } // namespace clipper #endif clipper-2.1/clipper/core/coords.cpp0000644000374100011300000006050311252436705014321 00000000000000/* coords.cpp: fundamental data types for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "coords.h" #include "spacegroup.h" #include "rotation.h" namespace clipper { /*! \param resol_ The resolution limit in Angstroms. */ Resolution::Resolution( const ftype& resol_ ) { init( resol_ ); } /*! \param resol_ The resolution limit in Angstroms. */ void Resolution::init( const ftype& resol_ ) { resol = resol_; } /*! \return The resolution limit in Angstroms. */ const ftype& Resolution::limit() const { return resol; } /*! \return The resolution limit in inverse squared Angstroms. */ ftype Resolution::invresolsq_limit() const { return 1.0/(resol*resol); } /*! \return true if the object has not been initalised. */ bool Resolution::is_null() const { return ( resol <= 0.0 ); } /*! Determine the class of a reflection for a give spacegroup. \param spgr The spacegroup. \param hkl The reflection HKL */ HKL_class::HKL_class( const Spacegroup& spgr, const HKL& hkl ) { HKL equiv; ftype shift; epsilon_ = 1; allowed_ = 255; for ( int i = 1; i < spgr.num_symops(); i++ ) { equiv = hkl.transform(spgr.symop(i)); shift = hkl.sym_phase_shift(spgr.symop(i)); if ( equiv == hkl ) { // if reflection is related to itself, then it is special or sysabs if ( cos(shift) > 0.999 ) { epsilon_++; // increase multiplicity } else { epsilon_ = allowed_ = 0; // flag sysabs break; } } else if ( equiv == -hkl ) { // if reflection is related to opposite, it is centric allowed_ = Util::intr( Util::mod(-0.5*shift, Util::pi()) / (Util::pi()/12.0) ); } } if ( hkl.h() == 0 && hkl.k() == 0 && hkl.l() == 0 ) allowed_ = 0; } /*! Construct the operator which give the least-squares fit of one set of coordinates onto another. The coodinates are stored as STL vectors of Coord_orth. The lists must be the same size, and each atom in the source list must correspond to the same atom in the target list. The algorithm employed is that of Kearsley, S.K. (1989) 'On the orthogonal transformation used for structural comparisons'. Acta Cryst. A45, 208-210. \param src The source list (i.e. the atoms to be transformed). \param tgt The target list (i.e. the fixed atoms). */ RTop_orth::RTop_orth( const std::vector& src, const std::vector& tgt ) { if ( src.size() != tgt.size() ) Message::message(Message_fatal("RTop_orth: coordinate list size mismatch")); // get centre of mass Coord_orth s, t, p, m; Coord_orth src_cen(0.0,0.0,0.0); Coord_orth tgt_cen(0.0,0.0,0.0); int n = src.size(); for ( int i = 0; i < n; i++ ) { src_cen = src_cen + src[i]; tgt_cen = tgt_cen + tgt[i]; } src_cen = (1.0/ftype(n)) * src_cen; tgt_cen = (1.0/ftype(n)) * tgt_cen; // prepare cross-sums Matrix<> mat( 4, 4, 0.0 ); for ( int i = 0; i < n; i++ ) { s = src[i] - src_cen; t = tgt[i] - tgt_cen; p = s + t; m = s - t; mat(0,0) = mat(0,0) + m[0]*m[0] + m[1]*m[1] + m[2]*m[2]; mat(1,1) = mat(1,1) + m[0]*m[0] + p[1]*p[1] + p[2]*p[2]; mat(2,2) = mat(2,2) + p[0]*p[0] + m[1]*m[1] + p[2]*p[2]; mat(3,3) = mat(3,3) + p[0]*p[0] + p[1]*p[1] + m[2]*m[2]; mat(0,1) = mat(0,1) + m[2]*p[1] - m[1]*p[2]; mat(0,2) = mat(0,2) + m[0]*p[2] - m[2]*p[0]; mat(0,3) = mat(0,3) + m[1]*p[0] - m[0]*p[1]; mat(1,2) = mat(1,2) + m[0]*m[1] - p[0]*p[1]; mat(1,3) = mat(1,3) + m[0]*m[2] - p[0]*p[2]; mat(2,3) = mat(2,3) + m[1]*m[2] - p[1]*p[2]; } mat(1,0) = mat(0,1); mat(2,0) = mat(0,2); mat(2,1) = mat(1,2); mat(3,0) = mat(0,3); mat(3,1) = mat(1,3); mat(3,2) = mat(2,3); // eigenvalue calc std::vector v = mat.eigen( true ); // get result Rotation r( mat(0,0), mat(1,0), mat(2,0), mat(3,0) ); Mat33<> rot = r.norm().matrix(); (*this) = RTop_orth( rot, tgt_cen - rot*src_cen ); } /*! Construct the operator which give the least-squares fit of one set of coordinates onto another. The coodinates are stored as STL vectors of Coord_orth. The lists must be the same size, and each atom in the source list must correspond to the same atom in the target list. The algorithm employed is that of Kearsley, S.K. (1989) 'On the orthogonal transformation used for structural comparisons'. Acta Cryst. A45, 208-210. \param src The source list (i.e. the atoms to be transformed). \param tgt The target list (i.e. the fixed atoms). \param wgt The weight to apply to each atom. */ RTop_orth::RTop_orth( const std::vector& src, const std::vector& tgt, const std::vector& wgt ) { if ( src.size() != wgt.size() || tgt.size() != wgt.size() ) Message::message(Message_fatal("RTop_orth: coordinate list size mismatch")); // get centre of mass Coord_orth s, t, p, m; Coord_orth src_cen(0.0,0.0,0.0); Coord_orth tgt_cen(0.0,0.0,0.0); ftype w = 0.0; int n = src.size(); for ( int i = 0; i < n; i++ ) { w += wgt[i]; src_cen += wgt[i] * src[i]; tgt_cen += wgt[i] * tgt[i]; } src_cen = (1.0/w) * src_cen; tgt_cen = (1.0/w) * tgt_cen; // prepare cross-sums Matrix<> mat( 4, 4, 0.0 ); for ( int i = 0; i < n; i++ ) { w = wgt[i]; s = src[i] - src_cen; t = tgt[i] - tgt_cen; p = s + t; m = s - t; mat(0,0) = mat(0,0) + w * ( m[0]*m[0] + m[1]*m[1] + m[2]*m[2] ); mat(1,1) = mat(1,1) + w * ( m[0]*m[0] + p[1]*p[1] + p[2]*p[2] ); mat(2,2) = mat(2,2) + w * ( p[0]*p[0] + m[1]*m[1] + p[2]*p[2] ); mat(3,3) = mat(3,3) + w * ( p[0]*p[0] + p[1]*p[1] + m[2]*m[2] ); mat(0,1) = mat(0,1) + w * ( m[2]*p[1] - m[1]*p[2] ); mat(0,2) = mat(0,2) + w * ( m[0]*p[2] - m[2]*p[0] ); mat(0,3) = mat(0,3) + w * ( m[1]*p[0] - m[0]*p[1] ); mat(1,2) = mat(1,2) + w * ( m[0]*m[1] - p[0]*p[1] ); mat(1,3) = mat(1,3) + w * ( m[0]*m[2] - p[0]*p[2] ); mat(2,3) = mat(2,3) + w * ( m[1]*m[2] - p[1]*p[2] ); } mat(1,0) = mat(0,1); mat(2,0) = mat(0,2); mat(2,1) = mat(1,2); mat(3,0) = mat(0,3); mat(3,1) = mat(1,3); mat(3,2) = mat(2,3); // eigenvalue calc std::vector v = mat.eigen( true ); // get result Rotation r( mat(0,0), mat(1,0), mat(2,0), mat(3,0) ); Mat33<> rot = r.norm().matrix(); (*this) = RTop_orth( rot, tgt_cen - rot*src_cen ); } /*! \param cell The cell concerned \return The transformed coordinate. */ RTop_frac RTop_orth::rtop_frac( const Cell& cell ) const { return RTop_frac( RTop<>(cell.matrix_frac()) * (*this) * RTop<>(cell.matrix_orth()) ); } /*! \return The inverse of the operator. */ RTop_orth RTop_orth::inverse() const { return RTop_orth( RTop<>::inverse() ); } /*! \param centre An arbitrary point. \return point on axis near the specified coordinate, 000 if rotation is zero */ Coord_orth RTop_orth::axis_coordinate_near( const Coord_orth& centre ) const { Rotation R(rot()); // Rotation part if ( R.abs_angle() < 0.001) return Coord_orth(0.0,0.0,0.0); Vec3<> t = trn(); // translation part // direction cosines of rotation axis n Vec3<> n = Vec3<>(R.x(),R.y(),R.z()).unit(); // parallel component of translation r = n (n.t) Vec3<> r = n * Vec3<>::dot(n, t); // Perpendicular component s = t - r Vec3<> s = t - r; // Rotation angle kappa double kappa = R.norm().polar_ccp4().kappa(); // Origin x0 = 0.5*[s + (n x s)/tan(kappa/2)] Vec3<> x0 = 0.5*(s + Vec3<>::cross(n, s) * (1./tan(0.5*kappa))); // Find closest position on axis to centre // projection on to axis through origin return Coord_orth( x0 + n * Vec3<>::dot((centre-x0), n) ); } /*! \return screw translation, 000 if rotation is zero */ Coord_orth RTop_orth::screw_translation() const { Rotation R(rot()); // Rotation part if ( R.abs_angle() < 0.001) return Coord_orth(0.0,0.0,0.0); Vec3<> t = trn(); // translation part // direction cosines of rotation axis n Vec3<> n = Vec3<>(R.x(),R.y(),R.z()).unit(); // parallel component of translation r = n (n.t) return Coord_orth( n * Vec3<>::dot(n, t) ); } /*! \return The identity operator. */ RTop_orth RTop_orth::identity() { return RTop_orth( RTop<>::identity() ); } /*! \return The null (uninitialised) operator. */ RTop_orth RTop_orth::null() { return RTop_orth( RTop<>::null() ); } /*! \return The formatted text string */ String HKL::format() const { return "HKL = ("+String(h())+","+String(k())+","+String(l())+")"; } /*! \return The formatted text string */ String Coord_reci_orth::format() const { return "x*y*z* = ("+String(xs())+","+String(ys())+","+String(zs())+")"; } /*! \return The formatted text string */ String Coord_reci_frac::format() const { return "u*v*w* = ("+String(us())+","+String(vs())+","+String(ws())+")"; } /*! The coordinate is calculated which extends the sequence of coordinates x1, x2, x3 with the specified distance to x3, angle to x2,x3, and torsion to x1,x2,x3. \param x1 First coordinate. \param x2 Second coordinate. \param x3 Third coordinate. \param length x3-new bond length in Angstroms. \param angle x2-x3-new opening angle in Radians. \param torsion x1-x2-x3-new torsion angle in Radians. */ Coord_orth::Coord_orth( const Coord_orth& x1, const Coord_orth& x2, const Coord_orth& x3, const ftype& length, const ftype& angle, const ftype& torsion ) { const Coord_orth xa( (x3-x2).unit() ); const Coord_orth xc( Vec3<>::cross( x2-x1, xa ).unit() ); const Coord_orth xb( Vec3<>::cross( xa, xc ) ); const ftype wa = -length*cos( angle ); const ftype wb = -length*sin( angle )*cos( -torsion ); const ftype wc = -length*sin( angle )*sin( -torsion ); (*this) = x3 + wa*xa + wb*xb + wc*xc; } /*! \return The bond length x1-x2 in Angstroms. */ ftype Coord_orth::length( const Coord_orth& x1, const Coord_orth& x2) { return sqrt( (x2-x1).lengthsq() ); } /*! \return The bond angle x1-x2-x3 in Radians. */ ftype Coord_orth::angle( const Coord_orth& x1, const Coord_orth& x2, const Coord_orth& x3) { return acos( (x3-x2).unit() * (x1-x2).unit() ); } /*! \return The bond torsion x1-x2-x3-x4 in Radians. */ ftype Coord_orth::torsion( const Coord_orth& x1, const Coord_orth& x2, const Coord_orth& x3, const Coord_orth& x4) { const Vec3<> xu( (x3-x2).unit() ); const Vec3<> xa( Vec3<>::cross( x2-x1, xu ) ); const Vec3<> xb( Vec3<>::cross( xu, x4-x3 ) ); const Vec3<> xc( Vec3<>::cross( xa, xb ) ); return atan2( xc*xu, xa*xb ); } /*! \return The formatted text string */ String Coord_orth::format() const { return "xyz = ("+String(x(),10,4)+","+String(y(),10,4)+","+String(z(),10,4)+")"; } Coord_frac Coord_frac::symmetry_copy_near(const Spacegroup& spgr, const Cell& cell, const Coord_frac& n) const { Coord_frac c, cmin(*this); double d2, d2min(1.0e12); for ( int k = 0; k < spgr.num_symops(); k++ ) { c = spgr.symop(k) * (*this); c = c.lattice_copy_near( n ); d2 = ( c - n ).lengthsq( cell ); if ( d2 < d2min ) { d2min = d2; cmin = c; } } return cmin; } /*! \return The formatted text string */ String Coord_frac::format() const { return "uvw = ("+String(u(),10,4)+","+String(v(),10,4)+","+String(w(),10,4)+")"; } /*! \return The formatted text string */ String Coord_grid::format() const { return "uvw = ("+String(u())+","+String(v())+","+String(w())+")"; } /*! \return The formatted text string */ String Coord_map::format() const { return "uvw = ("+String(u(),10,4)+","+String(v(),10,4)+","+String(w(),10,4)+")"; } /*! \return The formatted text string */ String Grid::format() const { return "Nuvw = ("+String(nu())+","+String(nv())+","+String(nw())+")"; } void Grid::debug() const { std::cout << format() << "\n"; } /*! Make a map grid with an oblong bounded by the coordinates min and max. \param min The lower bound coordinate in u,v,w. \param max The upper bound coordinate in u,v,w. */ Grid_range::Grid_range( const Coord_grid& min, const Coord_grid& max ) { min_ = min; max_ = max; (*this)[0] = max_.u()-min_.u()+1; (*this)[1] = max_.v()-min_.v()+1; (*this)[2] = max_.w()-min_.w()+1; } /*! Make a map grid with an oblong bounded by the fractional coordinates min and max, when the sampling of the cell is g \param g The grid sampling of the whole unit cell. \param min The lower bound coordinate in u,v,w. \param max The upper bound coordinate in u,v,w. */ Grid_range::Grid_range( const Grid& g, const Coord_frac& min, const Coord_frac& max ) { min_ = Coord_grid( Util::intc( g.nu() * min.u() ), Util::intc( g.nv() * min.v() ), Util::intc( g.nw() * min.w() ) ); max_ = Coord_grid( Util::intf( g.nu() * max.u() ), Util::intf( g.nv() * max.v() ), Util::intf( g.nw() * max.w() ) ); (*this)[0] = max_.u()-min_.u()+1; (*this)[1] = max_.v()-min_.v()+1; (*this)[2] = max_.w()-min_.w()+1; } /*! Make a map grid large enough to fully enclose a sphere about the origin of a given radius with a given cell and grid sampling. \param cell The cell parameters. \param grid The grid sampling of the whole cell. \param radius The radius of the sphere in Angstroms. */ Grid_range::Grid_range( const Cell& cell, const Grid& grid, const ftype& radius ) { Coord_grid lim( Util::intc( radius * cell.a_star() * ftype(grid.nu()) ), Util::intc( radius * cell.b_star() * ftype(grid.nv()) ), Util::intc( radius * cell.c_star() * ftype(grid.nw()) ) ); min_ = -lim; max_ = lim; (*this)[0] = max_.u()-min_.u()+1; (*this)[1] = max_.v()-min_.v()+1; (*this)[2] = max_.w()-min_.w()+1; } /*! Enlarge the grid by adding \c b cells in every direction. Will shrink the grid if \c b is negative. \param b The number of cells by which to enlarge/shrink. */ void Grid_range::add_border( const int b ) { min_ = min_ - Coord_grid(b,b,b); max_ = max_ + Coord_grid(b,b,b); (*this)[0] = max_.u()-min_.u()+1; (*this)[1] = max_.v()-min_.v()+1; (*this)[2] = max_.w()-min_.w()+1; } /*! A grid is chosen to represent the specified cell at the given resolution, obeying any restrictions imposed by the spacegroup. A slightly finer grid may be chosen if doing so is liable to significantly increase the speed of FFTs on that grid. \param spacegroup The spacegroup which the grid must obey. \param cell The cell which the grid must contain. \param resol The resolution to which the grid must sample. \param rate The linear Shannon rate (oversampling) required. If rate = 1, the grid spaceing will be half the resolution (the the minimum required). For a grid spaceing of resol/3, use the default rate=1.5. */ Grid_sampling::Grid_sampling( const Spacegroup& spacegroup, const Cell& cell, const Resolution& resol, const ftype rate ) { init( spacegroup, cell, resol, rate ); } /*! A grid is chosen to represent the specified cell at the given resolution, obeying any restrictions imposed by the spacegroup. A slightly finer grid may be chosen if doing so is liable to significantly increase the speed of FFTs on that grid. \param spacegroup The spacegroup which the grid must obey. \param cell The cell which the grid must contain. \param resol The resolution to which the grid must sample. \param rate The linear Shannon rate (oversampling) required. If rate = 1, the grid spaceing will be half the resolution (the the minimum required). For a grid spaceing of resol/3, use the default rate=1.5. */ void Grid_sampling::init( const Spacegroup& spacegroup, const Cell& cell, const Resolution& resol, const ftype rate ) { int i, j, l, n, m, nbest; bool eqxy, eqxz, eqyz; ftype t, tbest; // search symops to find grid factors and equalities Grid g( 48, 48, 48 ); Grid factors( 1, 1, 1 ); eqxy = eqxz = eqyz = false; for ( i = 0; i < spacegroup.num_symops(); i++ ) { Isymop isymop( spacegroup.symop(i), g ); eqxy = eqxy || ( isymop.rot()(0,1) != 0 ); eqxz = eqxz || ( isymop.rot()(0,2) != 0 ); eqyz = eqyz || ( isymop.rot()(1,2) != 0 ); for ( j = 0; j < 3; j++ ) factors[j] = Util::max( factors[j], g[j]/(Util::mod(isymop.trn()[j]-1, g[j])+1) ); } // now try a grid // first (lowest) estimate Grid_sampling nuvw( Util::intc( 2.0 * cell.descr().a() * rate / resol.limit() ), Util::intc( 2.0 * cell.descr().b() * rate / resol.limit() ), Util::intc( 2.0 * cell.descr().c() * rate / resol.limit() ) ); // now check against restrictions, speed for ( i = 0; i < 3; i++ ) { nbest = 0; tbest = 1.0e12; for ( n = nuvw[i]; n < 2*nuvw[i]+16; n++ ) { if ( n % (2*factors[i]) == 0 ) { l = 0; // sum of factors (approx. log n) m = n; // what is left in factorisation for ( j = 2; j <= n; j++ ) while ( m%j == 0 ) { m /= j; l += j; } // FFT time O( n * l ) - introduce an extra n^2 for 3D. t = pow( ftype(n), 3 ) * ftype(l); if ( t < tbest ) { nbest = n; tbest = t; } } } nuvw[i] = nbest; } // now check symmetry relationships if ( eqxy ) { n = Util::max( nuvw[0], nuvw[1] ); nuvw[0] = nuvw[1] = n; } if ( eqxz ) { n = Util::max( nuvw[0], nuvw[2] ); nuvw[0] = nuvw[2] = n; } if ( eqyz ) { n = Util::max( nuvw[1], nuvw[2] ); nuvw[1] = nuvw[2] = n; } (*this) = nuvw; } /*! The result is an RT operator. This is a redudent representation, but is handy for assembling compound operators. \return The operator */ Mat33<> Grid_sampling::matrix_grid_frac() const { Mat33<> m( Mat33<>::identity() ); m(0,0) = 1.0/ftype(nu()); m(1,1) = 1.0/ftype(nv()); m(2,2) = 1.0/ftype(nw()); return m; } /*! The result is an RT operator. This is a redudent representation, but is handy for assembling compound operators. \return The operator */ Mat33<> Grid_sampling::matrix_frac_grid() const { Mat33<> m( Mat33<>::identity() ); m(0,0) = ftype(nu()); m(1,1) = ftype(nv()); m(2,2) = ftype(nw()); return m; } /*! \return true if the object has not been initalised. */ bool Grid_sampling::is_null() const { return ( size() <= 0 ); } /*! Threshold value for scaling HKL-sampling coefficients */ itype64 HKL_sampling::sqrt_limit_value = 0x100000; /*! Initialise to 'null' */ HKL_sampling::HKL_sampling() { m00 = -1; } /*! Initialise using cell and resolution. */ HKL_sampling::HKL_sampling( const Cell& cell, const Resolution& resolution ) { itype64 limit_value = sqrt_limit_value*sqrt_limit_value; ftype s = ftype( limit_value ) / resolution.invresolsq_limit(); m00 = itype64( s * cell.a_star()*cell.a_star() ); m11 = itype64( s * cell.b_star()*cell.b_star() ); m22 = itype64( s * cell.c_star()*cell.c_star() ); m01 = itype64( s * 2.0*cell.a_star()*cell.b_star()*cos(cell.gamma_star()) ); m02 = itype64( s * 2.0*cell.a_star()*cell.c_star()*cos(cell.beta_star() ) ); m12 = itype64( s * 2.0*cell.b_star()*cell.c_star()*cos(cell.alpha_star()) ); } /*! Returned HKL contains maximum possible values of H, K, L respectively. \return Limiting h,k,l. */ HKL HKL_sampling::hkl_limit() const { itype64 s00(m00/sqrt_limit_value), s11(m11/sqrt_limit_value), s22(m22/sqrt_limit_value), s01(m01/sqrt_limit_value), s02(m02/sqrt_limit_value), s12(m12/sqrt_limit_value); s01 /= 2; s02 /= 2; s12 /= 2; itype64 det = s00*s11*s22 + s01*s12*s02 + s02*s12*s01 - s00*s12*s12 - s11*s02*s02 - s22*s01*s01; itype64 n00 = ( sqrt_limit_value * ( s11*s22 - s12*s12 + 1 ) ) / ( det - 3 ); itype64 n11 = ( sqrt_limit_value * ( s00*s22 - s02*s02 + 1 ) ) / ( det - 3 ); itype64 n22 = ( sqrt_limit_value * ( s00*s11 - s01*s01 + 1 ) ) / ( det - 3 ); return HKL( Util::isqrt(n00), Util::isqrt(n11), Util::isqrt(n22) ); } /*! Returned resolution is an estimate based on highest reflection in list. \return The resolution. */ Resolution HKL_sampling::resolution( const Cell& cell ) const { HKL lim = hkl_limit(); HKL rfl; // make a list of valid reflections ftype slim(0.0); for (rfl.h()= 0; rfl.h()<=lim.h(); rfl.h()++) for (rfl.k()=-lim.k(); rfl.k()<=lim.k(); rfl.k()++) for (rfl.l()=-lim.l(); rfl.l()<=lim.l(); rfl.l()++) if ( in_resolution( rfl ) ) slim = Util::max( slim, rfl.invresolsq( cell ) ); return Resolution( 0.999999 / sqrt( slim ) ); } bool HKL_sampling::is_null() const { return m00 < 0; } String HKL_sampling::format() const { return "CANNOT FORMAT HKL_sampling"; //return "m00=" + String(m00,12) + " m11=" + String(m11,12) + " m22=" + String(m22,12) + " m01=" + String(m01,12) + " m02=" + String(m02,12) + " m12=" + String(m12,12); } /*! The best isotropic U is the cube root of the determinant of the matrix of anisotropic coefficients. NOTE: This is not the conventional definition, but the mathematically correct one, and gives a better approximation to the anisotropic U (i.e. lower R-factors). \return The nearest isotropic U. */ ftype U_aniso_orth::u_iso() const { return pow( det(), 0.3333333333 ); } /*! \param cell The cell concerned \return The transformed coordinate. */ U_aniso_frac U_aniso_orth::u_aniso_frac( const Cell& cell ) const { return U_aniso_frac( Mat33sym<>( cell.matrix_frac() * Mat33<>(*this) * cell.matrix_frac().transpose() ) ); } /*! The aniso U is transformed by the given RT op. \param u The aniso U. */ U_aniso_orth U_aniso_orth::transform( const RTop_orth& op ) const { Mat33<> r = op.rot().inverse(); return U_aniso_orth( Mat33sym<> ( r.transpose() * Mat33<>( *this ) * r ) ); } /*! \param cell The cell concerned \return The transformed coordinate. */ U_aniso_orth U_aniso_frac::u_aniso_orth( const Cell& cell ) const { return U_aniso_orth( Mat33sym<>( cell.matrix_orth() * Mat33<>(*this) * cell.matrix_orth().transpose() ) ); } /*! The aniso U is transformed by the given RT op. \param u The aniso U. */ U_aniso_frac U_aniso_frac::transform( const RTop_frac& op ) const { Mat33<> r = op.rot().inverse(); return U_aniso_frac( Mat33sym<> ( r.transpose() * Mat33<>( *this ) * r ) ); } void Atom::set_element( const String& s ) { element_ = s; } void Atom::set_coord_orth( const Coord_orth& s ) { coord_orth_ = s; } void Atom::set_occupancy( const ftype& s ) { occupancy_ = s; } void Atom::set_u_iso( const ftype& s ) { u_iso_ = s; } void Atom::set_u_aniso_orth( const U_aniso_orth& s ) { u_aniso_orth_ = s; } /*! The coordinates and U_aniso_orth are transformed. The sigmas are not, since without the full variance-covariance matrix this transformation is impossible. \param rt The operator to apply. */ void Atom::transform( const RTop_orth rt ) { set_coord_orth( coord_orth().transform( rt ) ); set_u_aniso_orth( u_aniso_orth().transform( rt ) ); } Atom Atom::null() { Atom atom; atom.set_element( "" ); atom.set_coord_orth( Coord_orth( Coord_orth::null() ) ); atom.set_u_aniso_orth( U_aniso_orth( U_aniso_orth::null() ) ); atom.set_occupancy( Util::nan() ); atom.set_u_iso( Util::nan() ); return atom; } } // namespace clipper clipper-2.1/clipper/core/hkl_operators.h0000644000374100011300000001364010363703537015353 00000000000000/*! \file lib/hkl_operators.h HKL_data operators for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_HKL_OPERATORS #define CLIPPER_HKL_OPERATORS #include "hkl_datatypes.h" namespace clipper { namespace datatypes { // logical operators HKL_data operator &( const HKL_data_base& d1, const HKL_data_base& d2 ); HKL_data operator |( const HKL_data_base& d1, const HKL_data_base& d2 ); HKL_data operator ^( const HKL_data_base& d1, const HKL_data_base& d2 ); HKL_data operator !( const HKL_data_base& d1 ); HKL_data operator ==( const HKL_data& d1, const int& n ); HKL_data operator !=( const HKL_data& d1, const int& n ); HKL_data operator >=( const HKL_data& d1, const int& n ); HKL_data operator <=( const HKL_data& d1, const int& n ); HKL_data operator >( const HKL_data& d1, const int& n ); HKL_data operator <( const HKL_data& d1, const int& n ); // individual data operators template F_phi operator +( const F_phi& d1, const F_phi& d2 ); template F_phi operator -( const F_phi& d1, const F_phi& d2 ); template F_phi operator -( const F_phi& d1 ); template ABCD operator +( const ABCD& d1, const ABCD& d2 ); // data list operators template HKL_data > operator +( const HKL_data >& d1, const HKL_data >& d2 ); template HKL_data > operator -( const HKL_data >& d1, const HKL_data >& d2 ); template HKL_data > operator *( const HKL_data >& d1, const ftype& s ); template HKL_data > operator -( const HKL_data >& d1 ); template HKL_data > operator +( const HKL_data >& d1, const HKL_data >& d2 ); template HKL_data > operator *( const ftype& s, const HKL_data >& d1 ) { return d1*s; } } // namespace datatypes //! Log phase probability distribution object /*! This object is used to store and manipulate phase log-probability distributions. Centrics are handled by two values on the phase circle, acentrics by a list of values. The values can be indexed like and array. The phase() function returns the phase corresponding to the given array index. Conversion to and from Hendrickson-Lattman coefficients is provided. The object is templatised on the sampling of the phase circle. */ template class LogPhaseProb { public: //! constructor: from HKL class LogPhaseProb( const HKL_class& hkl_class ); //! set HL coeffs template void set_abcd( const datatypes::ABCD& abcd ); //! get HL coeffs template void get_abcd( datatypes::ABCD& abcd ) const; //! set phi/fom template void set_phi_fom( const datatypes::Phi_fom& phifom ); //! get phi/fom template void get_phi_fom( datatypes::Phi_fom& phifom ) const; //! get log probability const ftype& operator[] ( const int& p ) const { return q[p]; } //! set log probability ftype& operator[] ( const int& p ) { return q[p]; } //! return phase associated with index ftype phase( const int& p ) const { return Util::twopi()*ftype(p*pinc+pmin)/ftype(N); } int size() const { return q.size(); } //!< return num. of phases static int sampling() { return N; } //!< return phase sampling private: int pmin, pinc; std::vector q; }; } // namespace clipper #endif clipper-2.1/clipper/core/map_interp.cpp0000644000374100011300000000443010363703537015165 00000000000000/* map_interp.cpp: fundamental conversion ops for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "map_interp.h" namespace clipper { } // namespace clipper clipper-2.1/clipper/core/xmap.cpp0000644000374100011300000002072310776420536014002 00000000000000/* xmap.cpp: implementation file for crystal maps */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "xmap.h" #include "clipper_instance.h" namespace clipper { Message_ctor message_ctor_xmap( " [Xmap: constructed]" ); Mutex Xmap_cacheobj::mutex = Mutex(); Xmap_cacheobj::Xmap_cacheobj( const Key& xmap_cachekey ) : key( xmap_cachekey ) { Spacegroup spacegroup_( xmap_cachekey.spgr_descr() ); xtl_grid = xmap_cachekey.grid_sampling(); // Get the map grid - must contain ASU map_grid = asu_grid = Grid_range( xtl_grid, spacegroup_.asu_min(), spacegroup_.asu_max() ); map_grid.add_border(1); // Create the intergised symops (assumes legal grid) & // Precalculate shifts to index due to symmetry transformed grid steps int sym; nsym = spacegroup_.num_symops(); isymop.resize( nsym ); du.resize( nsym ); dv.resize( nsym ); dw.resize( nsym ); for ( sym = 0; sym < nsym; sym++ ) { Isymop op = Isymop( spacegroup_.symop(sym), xtl_grid ); isymop[sym] = op; du[sym] = map_grid.Grid::index( Coord_grid( op.rot()*Coord_grid(1,0,0) ) ); dv[sym] = map_grid.Grid::index( Coord_grid( op.rot()*Coord_grid(0,1,0) ) ); dw[sym] = map_grid.Grid::index( Coord_grid( op.rot()*Coord_grid(0,0,1) ) ); } // now store the symmetry permutations symperm.resize( nsym, nsym ); for ( int s1 = 0; s1 < nsym; s1++ ) for ( int s2 = 0; s2 < nsym; s2++ ) symperm( s1, s2 ) = spacegroup_.product_op( s1, s2 ); // Flag all non-ASU points in the grid with sym number + 1 Coord_grid base, rot; asu.clear(); asu.resize( map_grid.size(), 255 ); // set all non-asu flags to 255 for ( base = asu_grid.min(); !base.last(asu_grid); base.next(asu_grid) ) { for ( sym = 1; sym < nsym; sym++ ) { rot = base.transform(isymop[sym]).unit(xtl_grid); if ( asu_grid.in_grid( rot ) ) if ( asu[ map_grid.index( rot ) ] == 0 ) break; } if ( sym == nsym ) asu[ map_grid.index( base ) ] = 0; } for ( base = map_grid.min(); !base.last(map_grid); base.next(map_grid) ) if ( asu[ map_grid.index( base ) ] == 255 ) { for ( sym = 0; sym < nsym; sym++ ) { rot = base.transform(isymop[sym]).unit(xtl_grid); if ( asu_grid.in_grid( rot ) ) if ( asu[ map_grid.index( rot ) ] == 0 ) break; } asu[ map_grid.index( base ) ] = sym + 1; } } bool Xmap_cacheobj::matches( const Key& xmap_cachekey ) const { return key.spgr_descr().hash() == xmap_cachekey.spgr_descr().hash() && key.grid_sampling().nu() == xmap_cachekey.grid_sampling().nu() && key.grid_sampling().nv() == xmap_cachekey.grid_sampling().nv() && key.grid_sampling().nw() == xmap_cachekey.grid_sampling().nw(); } String Xmap_cacheobj::format() const { return key.spgr_descr().symbol_hall() + " " + key.grid_sampling().format(); } Xmap_base::FFTtype Xmap_base::default_type_ = Xmap_base::Sparse; /*! For later initialisation: see init() */ Xmap_base::Xmap_base() { Message::message( message_ctor_xmap ); } Xmap_base::Map_reference_coord& Xmap_base::Map_reference_coord::set_coord( const Coord_grid& pos ) { // use pos_ as a temporary variable to try out the current symop pos_ = map_->to_map_unit( pos.transform(map_->isymop[sym_]) ); if ( map_->asu_grid.in_grid( pos_ ) ) { index_ = map_->map_grid.index( pos_ ); if ( map_->asu[ index_ ] == 0 ) { pos_ = pos; return *this; } } map_->find_sym( pos, index_, sym_ ); // general case pos_ = pos; // store the unmodified coord return *this; } void Xmap_base::Map_reference_coord::edge() { int newsym = map_->asu[index_]-1; index_ = map_->map_grid.index( map_->to_map_unit( map_->map_grid.deindex(index_).transform( map_->isymop[newsym] ) ) ); sym_ = map_->cacheref.data().symperm( newsym, sym_ ); } /*! The Xmap is initialised with a given cell, spacegroup, and grid sampling. A unique assymetric unit (ASU) of grid cells is selected and will be used to store a unique set of data. If any of the parameters have null values, the existing values will be unchanged. The object will only be fully initialised once all parameters are available. \param spacegroup The spacegroup for the map \param cell The cell for the map \param grid_sam The grid sampling for the map, i.e. the sampling along each axis for one whole cell */ void Xmap_base::init( const Spacegroup& spacegroup, const Cell& cell, const Grid_sampling& grid_sam ) { // set parameters spacegroup_ = spacegroup; cell_ = cell; grid_sam_ = grid_sam; // check parameters if ( is_null() ) return; // get cache ref and fast access copies Xmap_cacheobj::Key key( spacegroup, grid_sam ); cacheref = ClipperInstantiator::instance().xmap_cache().cache( key ); asu = &(cacheref.data().asu[0]); isymop = &(cacheref.data().isymop[0]); du = &(cacheref.data().du[0]); dv = &(cacheref.data().dv[0]); dw = &(cacheref.data().dw[0]); asu_grid = cacheref.data().asu_grid; map_grid = cacheref.data().map_grid; nsym = cacheref.data().nsym; // store orthogonal conversions rt_grid_orth = RTop<>( cell_.matrix_orth()*grid_sam_.matrix_grid_frac() ); rt_orth_grid = rt_grid_orth.inverse(); } /*! \return true if the object has not been initalised. */ bool Xmap_base::is_null() const { return ( spacegroup_.is_null() || cell_.is_null() || grid_sam_.is_null() ); } /*! The multiplicity is the number of times the spacegroup operators map a particular grid point onto itself. This is required in order to properly weight map statistics so as to get the same result from just an ASU as using the whole cell. \param pos The coordinate of the grid point. \return The multiplicty of the point. */ int Xmap_base::multiplicity( const Coord_grid& pos ) const { int mult = 1; Coord_grid base = pos.unit(grid_sam_); for ( int sym = 1; sym < cacheref.data().nsym; sym++ ) if ( base.transform(isymop[sym]).unit(grid_sam_) == base ) mult++; return mult; } void Xmap_base::asu_error( const Coord_grid& pos ) const { std::cerr << "Failure to find grid coordinate " << pos.format() << std::endl; Message::message( Message_fatal( "Xmap: Internal map ASU error - " + cacheref.data().format() ) ); } // compile templates template class Xmap; template class Xmap; template class Xmap; template class Xmap; template class Xmap; template class Xmap; template class Xmap; template class Xmap; } // namespace clipper clipper-2.1/clipper/core/clipper_types.cpp0000644000374100011300000001242411350422676015712 00000000000000/* clipper_types.cpp: implementation file for clipper helper functions */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "clipper_types.h" #include namespace clipper { String::String( const char* str, const int l ) { std::ostringstream s; for ( int i = 0; i < l; i++ ) s << str[i]; *this = s.str(); } String::String( const int i, const int w ) { std::ostringstream s; s.width(w); s << i; *this = s.str(); } String::String( const long i, const int w ) { std::ostringstream s; s.width(w); s << i; *this = s.str(); } String::String( const float f, const int w, const int p ) { std::ostringstream s; s.width(w); s.precision(p); s << f; *this = s.str(); } String::String( const double f, const int w, const int p ) { std::ostringstream s; s.width(w); s.precision(p); s << f; *this = s.str(); } std::vector String::split(const String sep) const { std::vector splitstr; size_t tokbeg = 0, tokend = 0; while (1) { tokbeg = find_first_not_of(sep, tokend); if (tokbeg == String::npos) return splitstr; tokend = find_first_of(sep, tokbeg); if (tokend == String::npos) break; splitstr.push_back( substr(tokbeg, tokend-tokbeg) ); } splitstr.push_back( substr(tokbeg) ); return splitstr; } String String::trim() const { String trimmed; int i, j; for ( i = 0; i < length(); i++ ) if ( !isspace( (*this)[i] ) ) break; for ( j = length()-1; j >= 0; j-- ) if ( !isspace( (*this)[j] ) ) break; return substr( i, j-i+1 ); } String String::tail() const { return substr( rfind( '/' ) + 1 ); } String String::head() const { return substr( 0, find( '/' ) ); } String String::nohead() const { size_t p = find( '/' ); return ( p == String::npos ) ? "" : substr( p + 1 ); } String String::notail() const { size_t p = rfind( '/' ); return ( p == String::npos ) ? "" : substr( 0, p ); } String String::rational( const double f, const int b, const bool sign ) { std::ostringstream s; int n = Util::intr( fabs( b * f ) ); int d = b; if (sign) s << ( ( f > 0 ) ? "+" : "-" ); else s << ( ( f > 0 ) ? "" : "-" ); for ( int i = 5; i > 1; i-- ) { if ( ( n % i == 0 ) && ( d % i == 0 ) ) { n /= i; d /= i; } } s << n; if ( d != 1 ) s << "/" << d; return s.str();; } int String::i() const { std::istringstream s(*this); int i; s >> i; return i; } long String::l() const { std::istringstream s(*this); long i; s >> i; return i; } ftype32 String::f32() const { std::istringstream s(*this); float f; s >> f; return f; } ftype64 String::f64() const { std::istringstream s(*this); double f; s >> f; return f; } ftype String::f() const { std::istringstream s(*this); ftype f; s >> f; return f; } ftype String::rational() const { const String& s = (*this); int i; for ( i = 0; i < s.length(); i++ ) if ( s[i] == '/' ) break; if ( i == s.length() ) return ( s.f() ); return ( String(s.substr(0,i)).f() / String(s.substr(i+1)).f() ); } // template compilations template class Vec3; template class Mat33; template class Mat33sym; template class Matrix; template class Vec3; template class Mat33; template class Mat33sym; template class Matrix; } // namespace clipper clipper-2.1/clipper/core/spacegroup.h0000644000374100011300000002442411244731657014654 00000000000000/*! \file lib/spacegroup.h Header file for spacegroup symmetry class */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA /* some code & data converted from CCP4 library symlib.f (various authors) */ #ifndef CLIPPER_SPACEGROUP #define CLIPPER_SPACEGROUP #include "symop.h" #include "spacegroup_data.h" namespace clipper { // forward definitions class HKL; class HKL_class; class Coord_frac; //! spacegroup description /*! The spacegroup description is a compact description of a spacegroup. It may be initialised from Hall or H-M symbols, a string of symops or a number. Internally a hash code is used to refer to the spacegroup, so this object is only 32 bits in size. For more details of spacegroup symbols, see Sydney R. Hall & Ralf W. Grosse-Kunstleve 'Concise Space-Group Symbols', http://www.kristall.ethz.ch/LFK/software/sginfo/hall_symbols.html */ class Spgr_descr { public: enum TYPE { Hall, HM, XHM, Symops, Number, Unknown }; //! null constructor Spgr_descr(); //! constructor: from symbol or operators. explicit Spgr_descr( const String& symb, TYPE type = Unknown ); //! constructor: from number. explicit Spgr_descr( const int& num ); //! return the spacegroup number int spacegroup_number() const; //! return the Hall symbol String symbol_hall() const; //! return the H-M symbol String symbol_hm() const; //! return the extended H-M symbol String symbol_xhm() const; //! return the extension H-M symbol String symbol_hm_ext() const; //! set preferred default spacegroup choice static void set_preferred( const char& c ); //! Vector of symop codes and associated methods class Symop_codes : public std::vector { public: //! initialise from Hall symbol void init_hall( const String& symb ); //! initialise from symops void init_symops( const String& symb ); //! expand (incomplete) list of symops Symop_codes expand() const; //! return primitive non-inversion ops (by computation) Symop_codes primitive_noninversion_ops() const; //! return inversion ops (by computation) Symop_codes inversion_ops() const; //! return primitive incl inversion ops (by computation) Symop_codes primitive_ops() const; //! return lattice centering ops (by computation) Symop_codes centering_ops() const; //! return Laue ops Symop_codes laue_ops() const; //! return point group ops Symop_codes pgrp_ops() const; //! return Patterson ops Symop_codes patterson_ops() const; //! return minimal list of generator ops Symop_codes generator_ops() const; //! return product of this (expanded) list by another (expanded) list Symop_codes product( const Symop_codes& ops2 ) const; //! return hash code of symop list unsigned int hash() const; }; //! constructor: from symop list. explicit Spgr_descr( const Symop_codes& ops ); //! return the generators for the spacegroup const Symop_codes& generator_ops() const { return generators_; } //! return the hash code for the spacegroup \internal const unsigned int& hash() const { return hash_; } protected: unsigned int hash_; //!< hash code of spacegroup Symop_codes generators_; //!< codes for symop generators static char pref_12, pref_hr; //!< preferred origin and hex/romb symbols }; // ObjectCache data type class Spgr_cacheobj { public: typedef Spgr_descr Key; Spgr_cacheobj( const Key& spgr_cachekey ); //!< construct entry bool matches( const Key& spgr_cachekey ) const; //!< compare entry String format() const; //!< string description // data Key spgr_cachekey_; //!< spacegroup cachekey int nsym, nsymn, nsymi, nsymc, nsymp; //!< number of syms: total, primitive int lgrp; //!< Laue group number std::vector symops; //!< symmetry operators std::vector isymops; //!< symmetry operators Vec3<> asu_min_, asu_max_; //!< real space ASU static Mutex mutex; //!< thread safety }; //! Spacegroup object /*! The spacegroup object is a full description of a spacegroup, including all the most regularly used information in an efficient form. It may be initialised from a clipper::Spgr_descr. This object. For more details of spacegroup symbols, see Sydney R. Hall & Ralf W. Grosse-Kunstleve 'Concise Space-Group Symbols', http://www.kristall.ethz.ch/LFK/software/sginfo/hall_symbols.html */ class Spacegroup : public Spgr_descr { public: //! enumeration for fast construction of Null or P1 spacegroup enum TYPE { Null, P1 }; //! enumeration for cell axes enum AXIS { A=0, B=1, C=2 }; //! null constructor Spacegroup() {}; //! constructor: fast constructor for Null or P1 spacegroup explicit Spacegroup( TYPE type ); //! constructor: from spacegroup description explicit Spacegroup( const Spgr_descr& spgr_descr ); //! initialiser: from spacegroup description void init( const Spgr_descr& spgr_descr ); //! test if object has been initialised bool is_null() const; // methods //! get spacegroup description inline const Spgr_descr& descr() const { return (*this); } //! get number of symops inline const int& num_symops() const { return nsym; } //! get number of primitive symops (identical to num_primitive_symops()) inline const int& num_primops() const { return num_primitive_symops(); } //! get number of primitive symops (inc identity and inversion) inline const int& num_primitive_symops() const { return nsymp; } //! get number of centering symops (inc identity) inline const int& num_centering_symops() const { return nsymc; } //! get number of inversion symops (inc identity) inline const int& num_inversion_symops() const { return nsymi; } //! get number of primitive non-inversion symops (inc identity) inline const int& num_primitive_noninversion_symops() const { return nsymn;} //! get n'th symop inline const Symop& symop( const int& sym_no ) const { return symops[sym_no]; } //! get n'th primitive symop (identical to symop(sym_no)) inline const Symop& primitive_symop( const int& sym_no ) const { return symops[sym_no]; } //! get n'th inversion symop (0...1 max) inline const Symop& inversion_symop( const int& sym_no ) const { return symops[nsymn*sym_no]; } //! get n'th centering symop (0...3 max) inline const Symop& centering_symop( const int& sym_no ) const { return symops[nsymp*sym_no]; } //! get the order of rotational symmetry about a given axis int order_of_symmetry_about_axis( const AXIS axis ) const; //! get 'class' of reflection: multiplicity, allowed phase, absence HKL_class hkl_class( const HKL& hkl ) const; //! test if hkl is in default reciprocal ASU bool recip_asu( const HKL& hkl ) const; //! get symop number corresponding to the product of two symops int product_op( const int& s1, int& s2 ) const; //! get symop number corresponding to the inverse of a symop int inverse_op( const int& s ) const; //! get map ASU, upper bound Coord_frac asu_max() const; //! get map ASU, lower bound Coord_frac asu_min() const; //! test if change of hand preserves spacegroup bool invariant_under_change_of_hand() const; // inherited functions listed for documentation purposes //-- int spacegroup_number() const; //-- String symbol_hall() const; //-- String symbol_hm() const; //! return the Laue group symbol String symbol_laue() const; //! Return P1 spacegroup static Spacegroup p1() { return Spacegroup( P1 ); } //! Return null spacegroup static Spacegroup null() { return Spacegroup( Null ); } void debug() const; private: ObjectCache::Reference cacheref; //!< object cache reference const Symop* symops; //!< fast access ptr const Isymop* isymops; //!< fast access ptr data::ASUfn asufn; //!< fast access ptr int nsym, nsymn, nsymi, nsymc, nsymp; //!< fast access copies }; } // namespace clipper #endif clipper-2.1/clipper/core/container_map.cpp0000644000374100011300000000440610363703537015651 00000000000000/* container_map.cpp: class file for map containers */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "container_map.h" namespace clipper { } // namespace clipper clipper-2.1/clipper/core/clipper_stats.h0000644000374100011300000002067710777707715015376 00000000000000/*! \file lib/clipper_stats.h Header file for clipper helper functions */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_STATS #define CLIPPER_STATS #include "clipper_types.h" namespace clipper { //! Range - upper and lower bounds of some type template class Range { public: //! null constructor inline Range() { lmin = 999999999; lmax = -999999999; } //! constructor inline Range( const T& min, const T& max ) { lmin = min; lmax = max; } inline const T& min() const { return lmin; } //!< minimum value inline const T& max() const { return lmax; } //!< maximum value inline T range() const { return lmax-lmin; } //!< range = max - min //! update limits to include a new datum inline void include( const T& datum ) { lmin = Util::min( lmin, datum ); lmax = Util::max( lmax, datum ); } //! test if data is within limits ( min <= datum <= max ) inline bool contains( const T& datum ) const { return ( datum >= lmin && datum <= lmax ); } //! truncate data to be within range inline T truncate( const T& datum ) const { return Util::bound( lmin, datum, lmax ); } private: T lmin, lmax; }; //! Range sampling: discrete sampling of a real range. class Range_sampling : public Range { public: //! null constructor inline Range_sampling() : n_(0) {} //! constructor: from number of samplings inline Range_sampling( const int& n ) : n_(n) {} //! constructor: from range and number of samplings inline Range_sampling( const Range& range, const int& n ) : Range( range ), n_(n) {} //! return fractional posn in counting range from x-value (0..n) inline ftype indexf( const ftype& x ) const { return ftype(size())*(x-min())/range(); } //! return x-value (0..n) from fractional posn in counting range inline ftype x( const ftype& i ) const { return range()*i/ftype(size())+min(); } //! return nearest index to particular x-value inline int index( const ftype& x ) const { return Util::intf( indexf(x) ); } //! return nearest index to particular x-value (bounded 0...n-1) inline int index_bounded( const ftype& x ) const { return Util::bound( 0, Util::intf( indexf(x) ), size()-1 ); } //! return x-value corresponding to centre of i'th range inline ftype x( const int& i ) const { return x( ftype(i)+0.5 ); } //! return x-value corresponding to bottom of i'th range inline ftype x_min( const int& i ) const { return x( ftype(i) ); } //! return x-value corresponding to top of i'th range inline ftype x_max( const int& i ) const { return x( ftype(i)+1.0 ); } //! return number of samplings in range inline int size() const { return n_; } private: int n_; }; //! General histogram class /*! This class is used to accumulate and access a histogram of values spread over a specified range. On storing data or retrieving by interpolation the range is checked. */ class Histogram : public Range_sampling { public: //! null constructor Histogram() {} //! constructor: from range and sampling Histogram( const Range& range, const int& n ) : Range_sampling( range, n ), data( n, 0.0 ) {} //! add value to histogram (if it is in range) void accumulate( const ftype& x ) { if ( contains(x) ) data[ index_bounded(x) ] += 1.0; } //! add specified value to histogram (if it is in range) void accumulate( const ftype& x, const ftype& w ) { if ( contains(x) ) data[ index_bounded(x) ] += w; } //! return sum of whole histogram ftype sum() const; //! return value at index in histogram (Note: no bound check on i) inline const ftype& y( const int& i ) const { return data[i]; } //! return value at interpolated position in histogram ftype y( const ftype& x ) const; //! add the contents of two histograms (size must match) const Histogram& operator += ( const Histogram& h ); // inherited functions listed for documentation purposes //-- inline ftype x( const int& i ) const; //-- inline ftype x_min( const int& i ) const; //-- inline ftype x_max( const int& i ) const; //-- inline int size() const; private: std::vector data; }; //! Generic ordinal gernerator /*! This is a generic fast ordinal calculator. It is supplied with a list of values, from which it prepares a cumulative distribution function. This may the used to return the approximate fracitonal ordinal (in the range 0...1) for any given value from the distibution. The distibution may be initialised by providing a vector of values from the distribution, or by adding the values and calling prep_ordinal(). This distribution may also be inverted. Generation of a value from an ordinal may be used for generating random values from a given distribution, or for histogram matching. */ class Generic_ordinal { public: //! null constructor Generic_ordinal() {} //! constructor: from range and sampling Generic_ordinal( const Range& range, const int& n ) { init( range, n ); } //! initialiser: takes the source range and sampling void init( const Range& range, const int num_ranges = 1000 ); //! initialiser: takes the source distibution and a number of bins void init( const std::vector& values, const int num_ranges = 1000 ); //! return reflection ordinal ftype ordinal( const ftype& value ) const; //! accumulate values to build the distribution void accumulate( const ftype& value ); //! accumulate values to build the distribution void accumulate( const ftype& value, const ftype& weight ); //! generate the ordinal histogram void prep_ordinal(); //! invert distribution to get value from ordinal void invert(); //! DEPRECATED: initialiser: takes a number of bins for histogram void init( const int num_ranges = 1000 ); //! DEPRECATED: add a value to the distribution (pass 1 of 2) void add_pass_1( const ftype& value ); //! DEPRECATED: add a value to the distribution (pass 2 of 2) void add_pass_2( const ftype& value ); protected: ftype nranges; //!< number of ranges Range range_; //!< resolution range of data std::vector hist; //!< histogram of reflections vs resolution }; } // namespace clipper #endif clipper-2.1/clipper/core/container_types.cpp0000644000374100011300000001353610363703537016244 00000000000000/* container_types.cpp: class file for basic containers */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "container_types.h" namespace clipper { const Resolution NullResolution; //(*this) = resolution_; Container::update(); } /*! The object is initialised, and children are updated. \param spacegroup_ The value to give to the contained object. */ void CSpacegroup::init( const Spacegroup& spacegroup_ ) { dynamic_cast(*this) = spacegroup_; Container::update(); } /*! The object is initialised, and children are updated. \param cell_ The value to give to the contained object. */ void CCell::init( const Cell& cell_ ) { dynamic_cast(*this) = cell_; Container::update(); } /*! The top object in a tree is initialised from a known grid. \param name The object name. \param grid The grid sampling. */ CGrid_sampling::CGrid_sampling( const String name, const Grid_sampling& grid ) : Container( name ), Grid_sampling( grid ), rate_( 1.5 ) {} /*! The normal form for a child object - spacegroup and cell inherited. \param parent The objects parent. \param name The object name. \param rate The Shannon rate (default 1.5). */ CGrid_sampling::CGrid_sampling( Container& parent, const String name, const ftype rate ) : Container( parent, name ), rate_( rate ) { init( NullSpacegroup, NullCell, NullResolution, 0.0 ); } /*! This is still a child object but is initialised directly. \param parent The objects parent. \param name The object name. \param grid The grid sampling. */ CGrid_sampling::CGrid_sampling( Container& parent, const String name, const Grid_sampling& grid ) : Container( parent, name ), Grid_sampling( grid ), rate_( 1.5 ) {} /*! The object is initialised if the appropriate parent objects are available, and children are updated. \param spacegroup The spacegroup. \param cell The cell. \param resolution The resolution. \param rate_ The Shannon rate (If <1 previous value is used, default 1.5). */ void CGrid_sampling::init( const Spacegroup& spacegroup, const Cell& cell, const Resolution& resolution, const ftype rate ) { // use supplied values by default const Spacegroup* sp = &spacegroup; // use pointers so we can reassign const Cell* cp = &cell; const Resolution* rp = &resolution; // otherwise get them from the tree if ( sp->is_null() ) sp = parent_of_type_ptr(); if ( cp->is_null() ) cp = parent_of_type_ptr(); if ( rp->is_null() ) rp = parent_of_type_ptr(); if ( rate >= 1.0 ) rate_ = rate; // use rate if given // initialise if ( sp != NULL && cp != NULL && rp != NULL ) if ( !sp->is_null() && !cp->is_null() && !rp->is_null() ) Grid_sampling::init( *sp, *cp, *rp, rate_ ); Container::update(); } /*! The object is initialised, and children are updated. \param grid_sampling_ The value to give to the contained object. */ void CGrid_sampling::init( const Grid_sampling& grid_sampling_ ) { dynamic_cast(*this) = grid_sampling_; Container::update(); } /*! Hierarchical update. If this object is uninitialised, an attempt is made to initialise the object using information from its parents in the hierarchy. The childen of the object are then updated. */ void CGrid_sampling::update() { if ( Grid_sampling::is_null() ) init( NullSpacegroup, NullCell, NullResolution, 0.0 ); else Container::update(); } } // namespace clipper clipper-2.1/clipper/core/hkl_data.cpp0000644000374100011300000001514111205462346014573 00000000000000/* hkl_data.cpp: class file for reflection data class + children */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "hkl_data.h" #include "clipper_instance.h" namespace clipper { Message_ctor message_ctor_hkl_data( " [HKL_data: constructed]" ); Mutex HKL_data_cacheobj::mutex = Mutex(); HKL_data_cacheobj::HKL_data_cacheobj( const Key& hkl_data_cachekey ) : key( hkl_data_cachekey ) { init( Spacegroup( hkl_data_cachekey.spgr_descr() ), Cell( hkl_data_cachekey.cell_descr() ), hkl_data_cachekey.hkl_sampling(), true ); } bool HKL_data_cacheobj::matches( const Key& hkl_data_cachekey ) const { return ( key.spgr_descr().hash() == hkl_data_cachekey.spgr_descr().hash() && key.hkl_sampling() == hkl_data_cachekey.hkl_sampling() ); } String HKL_data_cacheobj::format() const { return key.spgr_descr().symbol_hall() + " " + key.hkl_sampling().format(); } /*! For later initialisation: see init() */ HKL_data_base::HKL_data_base() { parent_hkl_info = NULL; parent_cell = NULL; Message::message( message_ctor_hkl_data ); } /*! Initialise the object using a given reflection list and cell. \param hkl_info The reflection list object. \param cell The unit cell for this datalist. */ void HKL_data_base::init( const HKL_info& hkl_info, const Cell& cell ) { parent_hkl_info = &hkl_info; parent_cell = &cell; cell_matches_parent = cell.equals( hkl_info.cell(), 0.5 ); } /*! Initialise the object using a given reflection list and cell. \param hkl_data Object from which to inherit spacegrpoup, cell, sampling. */ void HKL_data_base::init( const HKL_data_base& hkl_data ) { (*this) = hkl_data; } /*! Initialise the object using a given spacegroup, cell, and sampling. \param spacegroup The spacegroup for this datalist. \param cell The unit cell for this datalist. \param hkl_sampling The reflection list description. */ void HKL_data_base::init( const Spacegroup& spacegroup, const Cell& cell, const HKL_sampling& hkl_sampling ) { // set parameters spacegroup_ = spacegroup; cell_ = cell; hkl_sampling_ = hkl_sampling; // check parameters if ( spacegroup_.is_null() || cell_.is_null() || hkl_sampling_.is_null() ) return; // estimate resolution resolution_ = hkl_sampling.resolution( cell ); // get cache ref HKL_data_cacheobj::Key key( spacegroup, cell, hkl_sampling ); cacheref = ClipperInstantiator::instance().hkl_data_cache().cache( key ); // store legacy and fast access pointers init( cacheref.data(), cell_ ); } /*! \return true if the object has not been initalised. */ bool HKL_data_base::is_null() const { if ( parent_hkl_info != NULL && parent_cell != NULL ) return ( parent_hkl_info->is_null() || parent_cell->is_null() ); else return true; } /*! Return the resolution of a particular reflection. If the cell of this list closely matches (to within 0.5A) the cell of the parent list, this is a simple lookup, otherwise a metric calculation is required. */ ftype HKL_data_base::invresolsq( const int& index ) const { if ( cell_matches_parent ) return base_hkl_info().invresolsq(index); else return base_hkl_info().hkl_of(index).invresolsq(base_cell()); } /*! \return The high and low resolution limits of the non-missing data. */ Range HKL_data_base::invresolsq_range() const { Range slim; HKL_info::HKL_reference_index ih; for ( ih = first_data(); !ih.last(); next_data(ih) ) slim.include( invresolsq( ih.index() ) ); return slim; } /*! \return The number of non-missing data in the object. */ int HKL_data_base::num_obs() const { int num = 0; HKL_info::HKL_reference_index ih; for ( ih = first_data(); !ih.last(); next_data(ih) ) num++; return num; } /*! \return HKL reference to the first data in this object. */ HKL_info::HKL_reference_index HKL_data_base::first() const { return HKL_reference_index( *parent_hkl_info, 0 ); } /*! \return HKL reference to the first non-missing data in this object. */ HKL_info::HKL_reference_index HKL_data_base::first_data() const { HKL_reference_index it( *parent_hkl_info, -1 ); return next_data(it); } /*! \param ih The HKL reference to increment. \return HKL reference to the next non-missing data in this object. */ HKL_info::HKL_reference_index& HKL_data_base::next_data( HKL_info::HKL_reference_index& ih ) const { do { ih.next(); if ( ih.last() ) break; } while ( missing( ih.index() ) ); return ih; } void HKL_data_base::debug() const { base_hkl_info().debug(); base_hkl_info().spacegroup().debug(); base_hkl_info().cell().debug(); base_cell().debug(); } } // namespace clipper clipper-2.1/clipper/core/atomsf.cpp0000644000374100011300000014241110721250650014311 00000000000000/* atomsf.cpp: implementation file for atomic scattering factors */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "atomsf.h" namespace clipper { namespace data { /* This implementation uses the coefficients from Waasmaier & Kirfel (1995), Acta Cryst. A51, 416-431. The source data can be found at: ftp://wrzx02.rz.uni-wuerzburg.de/pub/local/Crystallography/sfac.dat */ struct SFdata { char name[8]; ftype64 a[6]; ftype64 b[6]; }; SFdata sfdata[] = { {"H" ,{ 0.413048, 0.294953, 0.187491, 0.080701, 0.023736, 0.000049}, { 15.569946, 32.398468, 5.711404, 61.889874, 1.334118, 0.000000}}, {"He" ,{ 0.732354, 0.753896, 0.283819, 0.190003, 0.039139, 0.000487}, { 11.553918, 4.595831, 1.546299, 26.463964, 0.377523, 0.000000}}, {"Li" ,{ 0.974637, 0.158472, 0.811855, 0.262416, 0.790108, 0.002542}, { 4.334946, 0.342451, 97.102966,201.363831, 1.409234, 0.000000}}, {"Be" ,{ 1.533712, 0.638283, 0.601052, 0.106139, 1.118414, 0.002511}, { 42.662079, 0.595420, 99.106499, 0.151340, 1.843093, 0.000000}}, {"B" ,{ 2.085185, 1.064580, 1.062788, 0.140515, 0.641784, 0.003823}, { 23.494068, 1.137894, 61.238976, 0.114886, 0.399036, 0.000000}}, {"C" ,{ 2.657506, 1.078079, 1.490909, -4.241070, 0.713791, 4.297983}, { 14.780758, 0.776775, 42.086842, -0.000294, 0.239535, 0.000000}}, {"N" ,{ 11.893780, 3.277479, 1.858092, 0.858927, 0.912985,-11.804902}, { 0.000158, 10.232723, 30.344690, 0.656065, 0.217287, 0.000000}}, {"O" ,{ 2.960427, 2.508818, 0.637853, 0.722838, 1.142756, 0.027014}, { 14.182259, 5.936858, 0.112726, 34.958481, 0.390240, 0.000000}}, {"F" ,{ 3.511943, 2.772244, 0.678385, 0.915159, 1.089261, 0.032557}, { 10.687859, 4.380466, 0.093982, 27.255203, 0.313066, 0.000000}}, {"Ne" ,{ 4.183749, 2.905726, 0.520513, 1.135641, 1.228065, 0.025576}, { 8.175457, 3.252536, 0.063295, 21.813910, 0.224952, 0.000000}}, {"Na" ,{ 4.910127, 3.081783, 1.262067, 1.098938, 0.560991, 0.079712}, { 3.281434, 9.119178, 0.102763,132.013947, 0.405878, 0.000000}}, {"Mg" ,{ 4.708971, 1.194814, 1.558157, 1.170413, 3.239403, 0.126842}, { 4.875207,108.506081, 0.111516, 48.292408, 1.928171, 0.000000}}, {"Al" ,{ 4.730796, 2.313951, 1.541980, 1.117564, 3.154754, 0.139509}, { 3.628931, 43.051167, 0.095960,108.932388, 1.555918, 0.000000}}, {"Si" ,{ 5.275329, 3.191038, 1.511514, 1.356849, 2.519114, 0.145073}, { 2.631338, 33.730728, 0.081119, 86.288643, 1.170087, 0.000000}}, {"P" ,{ 1.950541, 4.146930, 1.494560, 1.522042, 5.729711, 0.155233}, { 0.908139, 27.044952, 0.071280, 67.520187, 1.981173, 0.000000}}, {"S" ,{ 6.372157, 5.154568, 1.473732, 1.635073, 1.209372, 0.154722}, { 1.514347, 22.092527, 0.061373, 55.445175, 0.646925, 0.000000}}, {"Cl" ,{ 1.446071, 6.870609, 6.151801, 1.750347, 0.634168, 0.146773}, { 0.052357, 1.193165, 18.343416, 46.398396, 0.401005, 0.000000}}, {"Ar" ,{ 7.188004, 6.638454, 0.454180, 1.929593, 1.523654, 0.265954}, { 0.956221, 15.339877, 15.339862, 39.043823, 0.062409, 0.000000}}, {"K" ,{ 8.163991, 7.146945, 1.070140, 0.877316, 1.486434, 0.253614}, { 12.816323, 0.808945,210.327011, 39.597652, 0.052821, 0.000000}}, {"Ca" ,{ 8.593655, 1.477324, 1.436254, 1.182839, 7.113258, 0.196255}, { 10.460644, 0.041891, 81.390381,169.847839, 0.688098, 0.000000}}, {"Sc" ,{ 1.476566, 1.487278, 1.600187, 9.177463, 7.099750, 0.157765}, { 53.131023, 0.035325,137.319489, 9.098031, 0.602102, 0.000000}}, {"Ti" ,{ 9.818524, 1.522646, 1.703101, 1.768774, 7.082555, 0.102473}, { 8.001879, 0.029763, 39.885422,120.157997, 0.532405, 0.000000}}, {"V" ,{ 10.473575, 1.547881, 1.986381, 1.865616, 7.056250, 0.067744}, { 7.081940, 0.026040, 31.909672,108.022842, 0.474882, 0.000000}}, {"Cr" ,{ 11.007069, 1.555477, 2.985293, 1.347855, 7.034779, 0.065510}, { 6.366281, 0.023987, 23.244839,105.774498, 0.429369, 0.000000}}, {"Mn" ,{ 11.709542, 1.733414, 2.673141, 2.023368, 7.003180, -0.147293}, { 5.597120, 0.017800, 21.788420, 89.517914, 0.383054, 0.000000}}, {"Fe" ,{ 12.311098, 1.876623, 3.066177, 2.070451, 6.975185, -0.304931}, { 5.009415, 0.014461, 18.743040, 82.767876, 0.346506, 0.000000}}, {"Co" ,{ 12.914510, 2.481908, 3.466894, 2.106351, 6.960892, -0.936572}, { 4.507138, 0.009126, 16.438129, 76.987320, 0.314418, 0.000000}}, {"Ni" ,{ 13.521865, 6.947285, 3.866028, 2.135900, 4.284731, -2.762697}, { 4.077277, 0.286763, 14.622634, 71.966080, 0.004437, 0.000000}}, {"Cu" ,{ 14.014192, 4.784577, 5.056806, 1.457971, 6.932996, -3.254477}, { 3.738280, 0.003744, 13.034982, 72.554794, 0.265666, 0.000000}}, {"Zn" ,{ 14.741002, 6.907748, 4.642337, 2.191766, 38.424042,-36.915829}, { 3.388232, 0.243315, 11.903689, 63.312130, 0.000397, 0.000000}}, {"Ga" ,{ 15.758946, 6.841123, 4.121016, 2.714681, 2.395246, -0.847395}, { 3.121754, 0.226057, 12.482196, 66.203621, 0.007238, 0.000000}}, {"Ge" ,{ 16.540613, 1.567900, 3.727829, 3.345098, 6.785079, 0.018726}, { 2.866618, 0.012198, 13.432163, 58.866047, 0.210974, 0.000000}}, {"As" ,{ 17.025642, 4.503441, 3.715904, 3.937200, 6.790175, -2.984117}, { 2.597739, 0.003012, 14.272119, 50.437996, 0.193015, 0.000000}}, {"Se" ,{ 17.354071, 4.653248, 4.259489, 4.136455, 6.749163, -3.160982}, { 2.349787, 0.002550, 15.579460, 45.181202, 0.177432, 0.000000}}, {"Br" ,{ 17.550570, 5.411882, 3.937180, 3.880645, 6.707793, -2.492088}, { 2.119226, 16.557184, 0.002481, 42.164009, 0.162121, 0.000000}}, {"Kr" ,{ 17.655279, 6.848105, 4.171004, 3.446760, 6.685200, -2.810592}, { 1.908231, 16.606236, 0.001598, 39.917473, 0.146896, 0.000000}}, {"Rb" ,{ 8.123134, 2.138042, 6.761702, 1.156051, 17.679546, 1.139548}, { 15.142385, 33.542667, 0.129372,224.132507, 1.713368, 0.000000}}, {"Sr" ,{ 17.730219, 9.795867, 6.099763, 2.620025, 0.600053, 1.140251}, { 1.563060, 14.310868, 0.120574,135.771317, 0.120574, 0.000000}}, {"Y" ,{ 17.792040, 10.253252, 5.714949, 3.170516, 0.918251, 1.131787}, { 1.429691, 13.132816, 0.112173,108.197029, 0.112173, 0.000000}}, {"Zr" ,{ 17.859772, 10.911038, 5.821115, 3.512513, 0.746965, 1.124859}, { 1.310692, 12.319285, 0.104353, 91.777542, 0.104353, 0.000000}}, {"Nb" ,{ 17.958399, 12.063054, 5.007015, 3.287667, 1.531019, 1.123452}, { 1.211590, 12.246687, 0.098615, 75.011948, 0.098615, 0.000000}}, {"Mo" ,{ 6.236218, 17.987711, 12.973127, 3.451426, 0.210899, 1.108770}, { 0.090780, 1.108310, 11.468720, 66.684151, 0.090780, 0.000000}}, {"Tc" ,{ 17.840963, 3.428236, 1.373012, 12.947364, 6.335469, 1.074784}, { 1.005729, 41.901382,119.320541, 9.781542, 0.083391, 0.000000}}, {"Ru" ,{ 6.271624, 17.906738, 14.123269, 3.746008, 0.908235, 1.043992}, { 0.077040, 0.928222, 9.555345, 35.860680,123.552246, 0.000000}}, {"Rh" ,{ 6.216648, 17.919739, 3.854252, 0.840326, 15.173498, 0.995452}, { 0.070789, 0.856121, 33.889484,121.686691, 9.029517, 0.000000}}, {"Pd" ,{ 6.121511, 4.784063, 16.631683, 4.318258, 13.246773, 0.883099}, { 0.062549, 0.784031, 8.751391, 34.489983, 0.784031, 0.000000}}, {"Ag" ,{ 6.073874, 17.155437, 4.173344, 0.852238, 17.988686, 0.756603}, { 0.055333, 7.896512, 28.443739,110.376106, 0.716809, 0.000000}}, {"Cd" ,{ 6.080986, 18.019468, 4.018197, 1.303510, 17.974669, 0.603504}, { 0.048990, 7.273646, 29.119284, 95.831207, 0.661231, 0.000000}}, {"In" ,{ 6.196477, 18.816183, 4.050479, 1.638929, 17.962912, 0.333097}, { 0.042072, 6.695665, 31.009790,103.284348, 0.610714, 0.000000}}, {"Sn" ,{ 19.325171, 6.281571, 4.498866, 1.856934, 17.917318, 0.119024}, { 6.118104, 0.036915, 32.529045, 95.037186, 0.565651, 0.000000}}, {"Sb" ,{ 5.394956, 6.549570, 19.650681, 1.827820, 17.867832, -0.290506}, { 33.326523, 0.030974, 5.564929, 87.130966, 0.523992, 0.000000}}, {"Te" ,{ 6.660302, 6.940756, 19.847015, 1.557175, 17.802427, -0.806668}, { 33.031654, 0.025750, 5.065547, 84.101616, 0.487660, 0.000000}}, {"I" ,{ 19.884502, 6.736593, 8.110516, 1.170953, 17.548716, -0.448811}, { 4.628591, 0.027754, 31.849096, 84.406387, 0.463550, 0.000000}}, {"Xe" ,{ 19.978920, 11.774945, 9.332182, 1.244749, 17.737501, -6.065902}, { 4.143356, 0.010142, 28.796200, 75.280685, 0.413616, 0.000000}}, {"Cs" ,{ 17.418674, 8.314444, 10.323193, 1.383834, 19.876251, -2.322802}, { 0.399828, 0.016872, 25.605827,233.339676, 3.826915, 0.000000}}, {"Ba" ,{ 19.747343, 17.368477, 10.465718, 2.592602, 11.003653, -5.183497}, { 3.481823, 0.371224, 21.226641,173.834274, 0.010719, 0.000000}}, {"La" ,{ 19.966019, 27.329655, 11.018425, 3.086696, 17.335455,-21.745489}, { 3.197408, 0.003446, 19.955492,141.381973, 0.341817, 0.000000}}, {"Ce" ,{ 17.355122, 43.988499, 20.546650, 3.130670, 11.353665,-38.386017}, { 0.328369, 0.002047, 3.088196,134.907654, 18.832960, 0.000000}}, {"Pr" ,{ 21.551311, 17.161730, 11.903859, 2.679103, 9.564197, -3.871068}, { 2.995675, 0.312491, 17.716705,152.192825, 0.010468, 0.000000}}, {"Nd" ,{ 17.331244, 62.783924, 12.160097, 2.663483, 22.239950,-57.189842}, { 0.300269, 0.001320, 17.026001,148.748993, 2.910268, 0.000000}}, {"Pm" ,{ 17.286388, 51.560162, 12.478557, 2.675515, 22.960947,-45.973682}, { 0.286620, 0.001550, 16.223755,143.984512, 2.796480, 0.000000}}, {"Sm" ,{ 23.700363, 23.072214, 12.777782, 2.684217, 17.204367,-17.452166}, { 2.689539, 0.003491, 15.495437,139.862473, 0.274536, 0.000000}}, {"Eu" ,{ 17.186195, 37.156837, 13.103387, 2.707246, 24.419271,-31.586687}, { 0.261678, 0.001995, 14.787360,134.816299, 2.581883, 0.000000}}, {"Gd" ,{ 24.898117, 17.104952, 13.222581, 3.266152, 48.995213,-43.505684}, { 2.435028, 0.246961, 13.996325,110.863091, 0.001383, 0.000000}}, {"Tb" ,{ 25.910013, 32.344139, 13.765117, 2.751404, 17.064405,-26.851971}, { 2.373912, 0.002034, 13.481969,125.836510, 0.236916, 0.000000}}, {"Dy" ,{ 26.671785, 88.687576, 14.065445, 2.768497, 17.067781,-83.279831}, { 2.282593, 0.000665, 12.920230,121.937187, 0.225531, 0.000000}}, {"Ho" ,{ 27.150190, 16.999819, 14.059334, 3.386979, 46.546471,-41.165253}, { 2.169660, 0.215414, 12.213148,100.506783, 0.001211, 0.000000}}, {"Er" ,{ 28.174887, 82.493271, 14.624002, 2.802756, 17.018515,-77.135223}, { 2.120995, 0.000640, 11.915256,114.529938, 0.207519, 0.000000}}, {"Tm" ,{ 28.925894, 76.173798, 14.904704, 2.814812, 16.998117,-70.839813}, { 2.046203, 0.000656, 11.465375,111.411980, 0.199376, 0.000000}}, {"Yb" ,{ 29.676760, 65.624069, 15.160854, 2.830288, 16.997850,-60.313812}, { 1.977630, 0.000720, 11.044622,108.139153, 0.192110, 0.000000}}, {"Lu" ,{ 30.122866, 15.099346, 56.314899, 3.540980, 16.943729,-51.049416}, { 1.883090, 10.342764, 0.000780, 89.559250, 0.183849, 0.000000}}, {"Hf" ,{ 30.617033, 15.145351, 54.933548, 4.096253, 16.896156,-49.719837}, { 1.795613, 9.934469, 0.000739, 76.189705, 0.175914, 0.000000}}, {"Ta" ,{ 31.066359, 15.341823, 49.278297, 4.577665, 16.828321,-44.119026}, { 1.708732, 9.618455, 0.000760, 66.346199, 0.168002, 0.000000}}, {"W" ,{ 31.507900, 15.682498, 37.960129, 4.885509, 16.792112,-32.864574}, { 1.629485, 9.446448, 0.000898, 59.980675, 0.160798, 0.000000}}, {"Re" ,{ 31.888456, 16.117104, 42.390297, 5.211669, 16.767591,-37.412682}, { 1.549238, 9.233474, 0.000689, 54.516373, 0.152815, 0.000000}}, {"Os" ,{ 32.210297, 16.678440, 48.559906, 5.455839, 16.735533,-43.677956}, { 1.473531, 9.049695, 0.000519, 50.210201, 0.145771, 0.000000}}, {"Ir" ,{ 32.004436, 1.975454, 17.070105, 15.939454, 5.990003, 4.018893}, { 1.353767, 81.014175, 0.128093, 7.661196, 26.659403, 0.000000}}, {"Pt" ,{ 31.273891, 18.445440, 17.063745, 5.555933, 1.575270, 4.050394}, { 1.316992, 8.797154, 0.124741, 40.177994, 1.316997, 0.000000}}, {"Au" ,{ 16.777390, 19.317156, 32.979683, 5.595453, 10.576854, -6.279078}, { 0.122737, 8.621570, 1.256902, 38.008820, 0.000601, 0.000000}}, {"Hg" ,{ 16.839890, 20.023823, 28.428564, 5.881564, 4.714706, 4.076478}, { 0.115905, 8.256927, 1.195250, 39.247227, 1.195250, 0.000000}}, {"Tl" ,{ 16.630795, 19.386616, 32.808571, 1.747191, 6.356862, 4.066939}, { 0.110704, 7.181401, 1.119730, 90.660263, 26.014978, 0.000000}}, {"Pb" ,{ 16.419567, 32.738590, 6.530247, 2.342742, 19.916475, 4.049824}, { 0.105499, 1.055049, 25.025890, 80.906593, 6.664449, 0.000000}}, {"Bi" ,{ 16.282274, 32.725136, 6.678302, 2.694750, 20.576559, 4.040914}, { 0.101180, 1.002287, 25.714146, 77.057549, 6.291882, 0.000000}}, {"Po" ,{ 16.289164, 32.807171, 21.095163, 2.505901, 7.254589, 4.046556}, { 0.098121, 0.966265, 6.046622, 76.598068, 28.096128, 0.000000}}, {"At" ,{ 16.011461, 32.615547, 8.113899, 2.884082, 21.377867, 3.995684}, { 0.092639, 0.904416, 26.543257, 68.372963, 5.499512, 0.000000}}, {"Rn" ,{ 16.070229, 32.641106, 21.489658, 2.299218, 9.480184, 4.020977}, { 0.090437, 0.876409, 5.239687, 69.188477, 27.632641, 0.000000}}, {"Fr" ,{ 16.007385, 32.663830, 21.594351, 1.598497, 11.121192, 4.003472}, { 0.087031, 0.840187, 4.954467,199.805801, 26.905106, 0.000000}}, {"Ra" ,{ 32.563690, 21.396671, 11.298093, 2.834688, 15.914965, 3.981773}, { 0.801980, 4.590666, 22.758972,160.404388, 0.083544, 0.000000}}, {"Ac" ,{ 15.914053, 32.535042, 21.553976, 11.433394, 3.612409, 3.939212}, { 0.080511, 0.770669, 4.352206, 21.381622,130.500748, 0.000000}}, {"Th" ,{ 15.784024, 32.454899, 21.849222, 4.239077, 11.736191, 3.922533}, { 0.077067, 0.735137, 4.097976,109.464111, 20.512138, 0.000000}}, {"Pa" ,{ 32.740208, 21.973675, 12.957398, 3.683832, 15.744058, 3.886066}, { 0.709545, 4.050881, 19.231543,117.255005, 0.074040, 0.000000}}, {"U" ,{ 15.679275, 32.824306, 13.660459, 3.687261, 22.279434, 3.854444}, { 0.071206, 0.681177, 18.236156,112.500038, 3.930325, 0.000000}}, {"Np" ,{ 32.999901, 22.638077, 14.219973, 3.672950, 15.683245, 3.769391}, { 0.657086, 3.854918, 17.435474,109.464485, 0.068033, 0.000000}}, {"Pu" ,{ 33.281178, 23.148544, 15.153755, 3.031492, 15.704215, 3.664200}, { 0.634999, 3.856168, 16.849735,121.292038, 0.064857, 0.000000}}, {"Am" ,{ 33.435162, 23.657259, 15.576339, 3.027023, 15.746100, 3.541160}, { 0.612785, 3.792942, 16.195778,117.757004, 0.061755, 0.000000}}, {"Cm" ,{ 15.804837, 33.480801, 24.150198, 3.655563, 15.499866, 3.390840}, { 0.058619, 0.590160, 3.674720,100.736191, 15.408296, 0.000000}}, {"Bk" ,{ 15.889072, 33.625286, 24.710381, 3.707139, 15.839268, 3.213169}, { 0.055503, 0.569571, 3.615472, 97.694786, 14.754303, 0.000000}}, {"Cf" ,{ 33.794075, 25.467693, 16.048487, 3.657525, 16.008982, 3.005326}, { 0.550447, 3.581973, 14.357388, 96.064972, 0.052450, 0.000000}}, {"H1-" ,{ 0.702260, 0.763666, 0.248678, 0.261323, 0.023017, 0.000425}, { 23.945604, 74.897919, 6.773289,233.583450, 1.337531, 0.000000}}, {"Li1+",{ 0.432724, 0.549257, 0.376575, -0.336481, 0.976060, 0.001764}, { 0.260367, 1.042836, 7.885294, 0.260368, 3.042539, 0.000000}}, {"Be2+",{ 3.055430, -2.372617, 1.044914, 0.544233, 0.381737, -0.653773}, { 0.001226, 0.001227, 1.542106, 0.456279, 4.047479, 0.000000}}, {"Cval",{ 1.258489, 0.728215, 1.119856, 2.168133, 0.705239, 0.019722}, { 10.683769, 0.208177, 0.836097, 24.603704, 58.954273, 0.000000}}, {"O1-" ,{ 3.106934, 3.235142, 1.148886, 0.783981, 0.676953, 0.046136}, { 19.868080, 6.960252, 0.170043, 65.693512, 0.630757, 0.000000}}, {"O2-" ,{ 3.990247, 2.300563, 0.607200, 1.907882, 1.167080, 0.025429}, { 16.639956, 5.636819, 0.108493, 47.299709, 0.379984, 0.000000}}, {"F1-" ,{ 0.457649, 3.841561, 1.432771, 0.801876, 3.395041, 0.069525}, { 0.917243, 5.507803, 0.164955, 51.076206, 15.821679, 0.000000}}, {"Na1+",{ 3.148690, 4.073989, 0.767888, 0.995612, 0.968249, 0.045300}, { 2.594987, 6.046925, 0.070139, 14.122657, 0.217037, 0.000000}}, {"Mg2+",{ 3.062918, 4.135106, 0.853742, 1.036792, 0.852520, 0.058851}, { 2.015803, 4.417941, 0.065307, 9.669710, 0.187818, 0.000000}}, {"Al3+",{ 4.132015, 0.912049, 1.102425, 0.614876, 3.219136, 0.019397}, { 3.528641, 7.378344, 0.133708, 0.039065, 1.644728, 0.000000}}, {"Siva",{ 2.879033, 3.072960, 1.515981, 1.390030, 4.995051, 0.146030}, { 1.239713, 38.706276, 0.081481, 93.616333, 2.770293, 0.000000}}, {"Si4+",{ 3.676722, 3.828496, 1.258033, 0.419024, 0.720421, 0.097266}, { 1.446851, 3.013144, 0.064397, 0.206254, 5.970222, 0.000000}}, {"Cl1-",{ 1.061802, 7.139886, 6.524271, 2.355626, 35.829403,-34.916603}, { 0.144727, 1.171795, 19.467655, 60.320301, 0.000436, 0.000000}}, {"K1+" ,{-17.609339, 1.494873, 7.150305, 10.899569, 15.808228, 0.257164}, { 18.840979, 0.053453, 0.812940, 22.264105, 14.351593, 0.000000}}, {"Ca2+",{ 8.501441, 12.880483, 9.765095, 7.156669, 0.711160,-21.013187}, { 10.525848, -0.004033, 0.010692, 0.684443, 27.231771, 0.000000}}, {"Sc3+",{ 7.104348, 1.511488,-53.669773, 38.404816, 24.532240, 0.118642}, { 0.601957, 0.033386, 12.572138, 10.859736, 14.125230, 0.000000}}, {"Ti2+",{ 7.040119, 1.496285, 9.657304, 0.006534, 1.649561, 0.150362}, { 0.537072, 0.031914, 8.009958,201.800293, 24.039482, 0.000000}}, {"Ti3+",{ 36.587933, 7.230255, -9.086077, 2.084594, 17.294008,-35.111282}, { 0.000681, 0.522262, 5.262317, 15.881716, 6.149805, 0.000000}}, {"Ti4+",{ 45.355537, 7.092900, 7.483858,-43.498817, 1.678915, -0.110628}, { 9.252186, 0.523046, 13.082852, 10.193876, 0.023064, 0.000000}}, {"V2+" ,{ 7.754356, 2.064100, 2.576998, 2.011404, 7.126177, -0.533379}, { 7.066315, 0.014993, 7.066308, 22.055786, 0.467568, 0.000000}}, {"V3+" ,{ 9.958480, 1.596350, 1.483442,-10.846044, 17.332867, 0.474921}, { 6.763041, 0.056895, 17.750029, 0.328826, 0.388013, 0.000000}}, {"V5+" ,{ 15.575018, 8.448095, 1.612040, -9.721855, 1.534029, 0.552676}, { 0.682708, 5.566640, 10.527077, 0.907961, 0.066667, 0.000000}}, {"Cr2+",{ 10.598877, 1.565858, 2.728280, 0.098064, 6.959321, 0.049870}, { 6.151846, 0.023519, 17.432816, 54.002388, 0.426301, 0.000000}}, {"Cr3+",{ 7.989310, 1.765079, 2.627125, 1.829380, 6.980908, -0.192123}, { 6.068867, 0.018342, 6.068887, 16.309284, 0.420864, 0.000000}}, {"Mn2+",{ 11.287712, 26.042414, 3.058096, 0.090258, 7.088306,-24.566132}, { 5.506225, 0.000774, 16.158575, 54.766354, 0.375580, 0.000000}}, {"Mn3+",{ 6.926972, 2.081342, 11.128379, 2.375107, -0.419287, -0.093713}, { 0.378315, 0.015054, 5.379957, 14.429586, 0.004939, 0.000000}}, {"Mn4+",{ 12.409131, 7.466993, 1.809947,-12.138477, 10.780248, 0.672146}, { 0.300400, 0.112814, 12.520756, 0.168653, 5.173237, 0.000000}}, {"Fe2+",{ 11.776765, 11.165097, 3.533495, 0.165345, 7.036932, -9.676919}, { 4.912232, 0.001748, 14.166556, 42.381958, 0.341324, 0.000000}}, {"Fe3+",{ 9.721638, 63.403847, 2.141347, 2.629274, 7.033846,-61.930725}, { 4.869297, 0.000293, 4.867602, 13.539076, 0.338520, 0.000000}}, {"Co2+",{ 6.993840, 26.285812, 12.254289, 0.246114, 4.017407,-24.796852}, { 0.310779, 0.000684, 4.400528, 35.741447, 12.536393, 0.000000}}, {"Co3+",{ 6.861739, 2.678570, 12.281889, 3.501741, -0.179384, -1.147345}, { 0.309794, 0.008142, 4.331703, 11.914167, 11.914167, 0.000000}}, {"Ni2+",{ 12.519017, 37.832058, 4.387257, 0.661552, 6.949072,-36.344471}, { 3.933053, 0.000442, 10.449184, 23.860998, 0.283723, 0.000000}}, {"Ni3+",{ 13.579366, 1.902844, 12.859268, 3.811005, -6.838595, -0.317618}, { 0.313140, 0.012621, 3.906407, 10.894311, 0.344379, 0.000000}}, {"Cu1+",{ 12.960763, 16.342150, 1.110102, 5.520682, 6.915452,-14.849320}, { 3.576010, 0.000975, 29.523218, 10.114283, 0.261326, 0.000000}}, {"Cu2+",{ 11.895569, 16.344978, 5.799817, 1.048804, 6.789088,-14.878383}, { 3.378519, 0.000924, 8.133653, 20.526524, 0.254741, 0.000000}}, {"Zn2+",{ 13.340772, 10.428857, 5.544489, 0.762295, 6.869172, -8.945248}, { 3.215913, 0.001413, 8.542680, 21.891756, 0.239215, 0.000000}}, {"Ga3+",{ 13.123875, 35.288189, 6.126979, 0.611551, 6.724807,-33.875122}, { 2.809960, 0.000323, 6.831534, 16.784311, 0.212002, 0.000000}}, {"Ge4+",{ 6.876636, 6.779091, 9.969591, 3.135857, 0.152389, 1.086542}, { 2.025174, 0.176650, 3.573822, 7.685848, 16.677574, 0.000000}}, {"Br1-",{ 17.714310, 6.466926, 6.947385, 4.402674, -0.697279, 1.152674}, { 2.122554, 19.050768, 0.152708, 58.690361, 58.690372, 0.000000}}, {"Rb1+",{ 17.684320, 7.761588, 6.680874, 2.668883, 0.070974, 1.133263}, { 1.710209, 14.919863, 0.128542, 31.654478, 0.128543, 0.000000}}, {"Sr2+",{ 17.694973, 1.275762, 6.154252, 9.234786, 0.515995, 1.125309}, { 1.550888, 30.133041, 0.118774, 13.821799, 0.118774, 0.000000}}, {"Y3+" ,{ 46.660366, 10.369686, 4.623042,-62.170834, 17.471146, 19.023842}, { -0.019971, 13.180257, 0.176398, -0.016727, 1.467348, 0.000000}}, {"Zr4+",{ 6.802956, 17.699253, 10.650647, -0.248108, 0.250338, 0.827902}, { 0.096228, 1.296127, 11.240715, -0.219259, -0.219021, 0.000000}}, {"Nb3+",{ 17.714323, 1.675213, 7.483963, 8.322464, 11.143573, -8.339573}, { 1.172419, 30.102791, 0.080255, -0.002983, 10.456687, 0.000000}}, {"Nb5+",{ 17.580206, 7.633277, 10.793497, 0.180884, 67.837921,-68.024780}, { 1.165852, 0.078558, 9.507652, 31.621656, -0.000438, 0.000000}}, {"Mo3+",{ 7.447050, 17.778122, 11.886068, 1.997905, 1.789626, -1.898764}, { 0.072000, 1.073145, 9.834720, 28.221746, -0.011674, 0.000000}}, {"Mo5+",{ 7.929879, 17.667669, 11.515987, 0.500402, 77.444084,-78.056595}, { 0.068856, 1.068064, 9.046229, 26.558945, -0.000473, 0.000000}}, {"Mo6+",{ 34.757683, 9.653037, 6.584769,-18.628115, 2.490594, 1.141916}, { 1.301770, 7.123843, 0.094097, 1.617443, 12.335434, 0.000000}}, {"Ru3+",{ 17.894758, 13.579529, 10.729251, 2.474095, 48.227997,-51.905243}, { 0.902827, 8.740579, 0.045125, 24.764954, -0.001699, 0.000000}}, {"Ru4+",{ 17.845776, 13.455084, 10.229087, 1.653524, 14.059795,-17.241762}, { 0.901070, 8.482392, 0.045972, 23.015272, -0.004889, 0.000000}}, {"Rh3+",{ 17.758621, 14.569813, 5.298320, 2.533579, 0.879753, 0.960843}, { 0.841779, 8.319533, 0.069050, 23.709131, 0.069050, 0.000000}}, {"Rh4+",{ 17.716188, 14.446654, 5.185801, 1.703448, 0.989992, 0.959941}, { 0.840572, 8.100647, 0.068995, 22.357307, 0.068995, 0.000000}}, {"Pd2+",{ 6.122282, 15.651012, 3.513508, 9.060790, 8.771199, 0.879336}, { 0.062424, 8.018296, 24.784275, 0.776457, 0.776457, 0.000000}}, {"Pd4+",{ 6.152421,-96.069023, 31.622141, 81.578255, 17.801403, 0.915874}, { 0.063951, 11.090354, 13.466152, 9.758302, 0.783014, 0.000000}}, {"Ag1+",{ 6.091192, 4.019526, 16.948174, 4.258638, 13.889437, 0.785127}, { 0.056305, 0.719340, 7.758938, 27.368349, 0.719340, 0.000000}}, {"Ag2+",{ 6.401808, 48.699802, 4.799859,-32.332523, 16.356710, 1.068247}, { 0.068167, 0.942270, 20.639496, 1.100365, 6.883131, 0.000000}}, {"Cd2+",{ 6.093711, 43.909691, 17.041306,-39.675117, 17.958918, 0.664795}, { 0.050624, 8.654143, 15.621396, 11.082067, 0.667591, 0.000000}}, {"In3+",{ 6.206277, 18.497746, 3.078131, 10.524613, 7.401234, 0.293677}, { 0.041357, 6.605563, 18.792250, 0.608082, 0.608082, 0.000000}}, {"Sn2+",{ 6.353672, 4.770377, 14.672025, 4.235959, 18.002131, -0.042519}, { 0.034720, 6.167891, 6.167879, 29.006456, 0.561774, 0.000000}}, {"Sn4+",{ 15.445732, 6.420892, 4.562980, 1.713385, 18.033537, -0.172219}, { 6.280898, 0.033144, 6.280899, 17.983601, 0.557980, 0.000000}}, {"Sb3+",{ 10.189171, 57.461918, 19.356573, 4.862206,-45.394096, 1.516108}, { 0.089485, 0.375256, 5.357987, 22.153736, 0.297768, 0.000000}}, {"Sb5+",{ 17.920622, 6.647932, 12.724075, 1.555545, 7.600591, -0.445371}, { 0.522315, 0.029487, 5.718210, 16.433775, 5.718204, 0.000000}}, {"I1-" ,{ 20.010330, 17.835524, 8.104130, 2.231118, 9.158548, -3.341004}, { 4.565931, 0.444266, 32.430672, 95.149040, 0.014906, 0.000000}}, {"Cs1+",{ 19.939056, 24.967621, 10.375884, 0.454243, 17.660248,-19.394306}, { 3.770511, 0.004040, 25.311275, 76.537766, 0.384730, 0.000000}}, {"Ba2+",{ 19.750200, 17.513683, 10.884892, 0.321585, 65.149834,-59.618172}, { 3.430748, 0.361590, 21.358307, 70.309402, 0.001418, 0.000000}}, {"La3+",{ 19.688887, 17.345703, 11.356296, 0.099418, 82.358124,-76.846909}, { 3.146211, 0.339586, 18.753832, 90.345459, 0.001072, 0.000000}}, {"Ce3+",{ 26.593231, 85.866432, -6.677695, 12.111847, 17.401903,-80.313423}, { 3.280381, 0.001012, 4.313575, 17.868504, 0.326962, 0.000000}}, {"Ce4+",{ 17.457533, 25.659941, 11.691037, 19.695251,-16.994749, -3.515096}, { 0.311812, -0.003793, 16.568687, 2.886395, -0.008931, 0.000000}}, {"Pr3+",{ 20.879841, 36.035797, 12.135341, 0.283103, 17.167803,-30.500784}, { 2.870897, 0.002364, 16.615236, 53.909359, 0.306993, 0.000000}}, {"Pr4+",{ 17.496082, 21.538509, 20.403114, 12.062211, -7.492043, -9.016722}, { 0.294457, -0.002742, 2.772886, 15.804613, -0.013556, 0.000000}}, {"Nd3+",{ 17.120077, 56.038139, 21.468307, 10.000671, 2.905866,-50.541992}, { 0.291295, 0.001421, 2.743681, 14.581367, 22.485098, 0.000000}}, {"Pm3+",{ 22.221066, 17.068142, 12.805423, 0.435687, 52.238770,-46.767181}, { 2.635767, 0.277039, 14.927315, 45.768017, 0.001455, 0.000000}}, {"Sm3+",{ 15.618565, 19.538092, 13.398946, -4.358811, 24.490461, -9.714854}, { 0.006001, 0.306379, 14.979594, 0.748825, 2.454492, 0.000000}}, {"Eu2+",{ 23.899035, 31.657497, 12.955752, 1.700576, 16.992199,-26.204315}, { 2.467332, 0.002230, 13.625002, 35.089481, 0.253136, 0.000000}}, {"Eu3+",{ 17.758327, 33.498665, 24.067188, 13.436883, -9.019134,-19.768026}, { 0.244474, -0.003901, 2.487526, 14.568011, -0.015628, 0.000000}}, {"Gd3+",{ 24.344999, 16.945311, 13.866931, 0.481674, 93.506378,-88.147179}, { 2.333971, 0.239215, 12.982995, 43.876347, 0.000673, 0.000000}}, {"Tb3+",{ 24.878252, 16.856016, 13.663937, 1.279671, 39.271294,-33.950317}, { 2.223301, 0.227290, 11.812528, 29.910065, 0.001527, 0.000000}}, {"Dy3+",{ 16.864344, 90.383461, 13.675473, 1.687078, 25.540651,-85.150650}, { 0.216275, 0.000593, 11.121207, 26.250975, 2.135930, 0.000000}}, {"Ho3+",{ 16.837524, 63.221336, 13.703766, 2.061602, 26.202621,-58.026505}, { 0.206873, 0.000796, 10.500283, 24.031883, 2.055060, 0.000000}}, {"Er3+",{ 16.810127, 22.681061, 13.864114, 2.294506, 26.864477,-17.513460}, { 0.198293, 0.002126, 9.973341, 22.836388, 1.979442, 0.000000}}, {"Tm3+",{ 16.787500, 15.350905, 14.182357, 2.299111, 27.573771,-10.192087}, { 0.190852, 0.003036, 9.602934, 22.526880, 1.912862, 0.000000}}, {"Yb2+",{ 28.443794, 16.849527, 14.165081, 3.445311, 28.308853,-23.214935}, { 1.863896, 0.183811, 9.225469, 23.691355, 0.001463, 0.000000}}, {"Yb3+",{ 28.191629, 16.828087, 14.167848, 2.744962, 23.171774,-18.103676}, { 1.842889, 0.182788, 9.045957, 20.799847, 0.001759, 0.000000}}, {"Lu3+",{ 28.828693, 16.823227, 14.247617, 3.079559, 25.647667,-20.626528}, { 1.776641, 0.175560, 8.575531, 19.693701, 0.001453, 0.000000}}, {"Hf4+",{ 29.267378, 16.792543, 14.785310, 2.184128, 23.791996,-18.820383}, { 1.697911, 0.168313, 8.190025, 18.277578, 0.001431, 0.000000}}, {"Ta5+",{ 29.539469, 16.741854, 15.182070, 1.642916, 16.437447,-11.542459}, { 1.612934, 0.160460, 7.654408, 17.070732, 0.001858, 0.000000}}, {"W6+" ,{ 29.729357, 17.247808, 15.184488, 1.154652, 0.739335, 3.945157}, { 1.501648, 0.140803, 6.880573, 14.299601, 14.299618, 0.000000}}, {"Os4+",{ 17.113485, 15.792370, 23.342392, 4.090271, 7.671292, 3.988390}, { 0.131850, 7.288542, 1.389307, 19.629425, 1.389307, 0.000000}}, {"Ir3+",{ 31.537575, 16.363338, 15.597141, 5.051404, 1.436935, 4.009459}, { 1.334144, 7.451918, 0.127514, 21.705648, 0.127515, 0.000000}}, {"Ir4+",{ 30.391249, 16.146996, 17.019068, 4.458904, 0.975372, 4.006865}, { 1.328519, 7.181766, 0.127337, 19.060146, 1.328519, 0.000000}}, {"Pt2+",{ 31.986849, 17.249048, 15.269374, 5.760234, 1.694079, 4.032512}, { 1.281143, 7.625512, 0.123571, 24.190826, 0.123571, 0.000000}}, {"Pt4+",{ 41.932713, 16.339224, 17.653894, 6.012420,-12.036877, 4.094551}, { 1.111409, 6.466086, 0.128917, 16.954155, 0.778721, 0.000000}}, {"Au1+",{ 32.124306, 16.716476, 16.814100, 7.311565, 0.993064, 4.040792}, { 1.216073, 7.165378, 0.118715, 20.442486, 53.095985, 0.000000}}, {"Au3+",{ 31.704271, 17.545767, 16.819551, 5.522640, 0.361725, 4.042679}, { 1.215561, 7.220506, 0.118812, 20.050970, 1.215562, 0.000000}}, {"Hg1+",{ 28.866837, 19.277540, 16.776051, 6.281459, 3.710289, 4.068430}, { 1.173967, 7.583842, 0.115351, 29.055994, 1.173968, 0.000000}}, {"Hg2+",{ 32.411079, 18.690371, 16.711773, 9.974835, -3.847611, 4.052869}, { 1.162980, 7.329806, 0.114518, 22.009489, 22.009493, 0.000000}}, {"Tl1+",{ 32.295044, 16.570049, 17.991013, 1.535355, 7.554591, 4.054030}, { 1.101544, 0.110020, 6.528559, 52.495068, 20.338634, 0.000000}}, {"Tl3+",{ 32.525639, 19.139185, 17.100321, 5.891115, 12.599463, -9.256075}, { 1.094966, 6.900992, 0.103667, 18.489614, -0.001401, 0.000000}}, {"Pb2+",{ 27.392647, 16.496822, 19.984501, 6.813923, 5.233910, 4.065623}, { 1.058874, 0.106305, 6.708123, 24.395554, 1.058874, 0.000000}}, {"Pb4+",{ 32.505657, 20.014240, 14.645661, 5.029499, 1.760138, 4.044678}, { 1.047035, 6.670321, 0.105279, 16.525040, 0.105279, 0.000000}}, {"Bi3+",{ 32.461437, 19.438683, 16.302486, 7.322662, 0.431704, 4.043703}, { 0.997930, 6.038867, 0.101338, 18.371586, 46.361046, 0.000000}}, {"Bi5+",{ 16.734028, 20.580494, 9.452623, 61.155834,-34.041023, 4.113663}, { 0.105076, 4.773282, 11.762162, 1.211775, 1.619408, 0.000000}}, {"Ra2+",{ 4.986228, 32.474945, 21.947443, 11.800013, 10.807292, 3.956572}, { 0.082597, 0.791468, 4.608034, 24.792431, 0.082597, 0.000000}}, {"Ac3+",{ 15.584983, 32.022125, 21.456327, 0.757593, 12.341252, 3.838984}, { 0.077438, 0.739963, 4.040735, 47.525002, 19.406845, 0.000000}}, {"Th4+",{ 15.515445, 32.090691, 13.996399, 12.918157, 7.635514, 3.831122}, { 0.074499, 0.711663, 3.871044, 18.596891, 3.871044, 0.000000}}, {"U3+" ,{ 15.360309, 32.395657, 21.961290, 1.325894, 14.251453, 3.706622}, { 0.067815, 0.654643, 3.643409, 39.604965, 16.330570, 0.000000}}, {"U4+" ,{ 15.355091, 32.235306, 0.557745, 14.396367, 21.751173, 3.705863}, { 0.067789, 0.652613, 42.354237, 15.908239, 3.553231, 0.000000}}, {"U6+" ,{ 15.333844, 31.770849, 21.274414, 13.872636, 0.048519, 3.700591}, { 0.067644, 0.646384, 3.317894, 14.650250, 75.339699, 0.000000}}, {"Np3+",{ 15.378152, 32.572132, 22.206125, 1.413295, 14.828381, 3.603370}, { 0.064613, 0.631420, 3.561936, 37.875511, 15.546129, 0.000000}}, {"Np4+",{ 15.373926, 32.423019, 21.969994, 0.662078, 14.969350, 3.603039}, { 0.064597, 0.629658, 3.476389, 39.438942, 15.135764, 0.000000}}, {"Np6+",{ 15.359986, 31.992825, 21.412458, 0.066574, 14.568174, 3.600942}, { 0.064528, 0.624505, 3.253441, 67.658318, 13.980832, 0.000000}}, {"Pu3+",{ 15.356004, 32.769127, 22.680210, 1.351055, 15.416232, 3.428895}, { 0.060590, 0.604663, 3.491509, 37.260635, 14.981921, 0.000000}}, {"Pu4+",{ 15.416219, 32.610569, 22.256662, 0.719495, 15.518152, 3.480408}, { 0.061456, 0.607938, 3.411848, 37.628792, 14.464360, 0.000000}}, {"Pu6+",{ 15.436506, 32.289719, 14.726737, 15.012391, 7.024677, 3.502325}, { 0.061815, 0.606541, 3.245363, 13.616438, 3.245364, 0.000000}} }; } // namespace data /*! If the atom has an anisotropic U (even if the values are isotropic), then it is initialised as anisotropic, otherwise it is isotropic. \param atom The atom object. */ AtomShapeFn::AtomShapeFn( const Atom& atom ) { init( atom ); } /*! The atom is initialised as isotropic. \param xyz The atom coordinate. \param element The atom element. \param u_iso The isotropic U-value. \param occ The occupancy. */ AtomShapeFn::AtomShapeFn( const Coord_orth& xyz, const String& element, const ftype u_iso, const ftype occ ) { init( xyz, element, u_iso, occ ); } /*! The atom is initialised as anisotropic. \param xyz The atom coordinate. \param element The atom element. \param u_aniso The anisotropic U-value. \param occ The occupancy. */ AtomShapeFn::AtomShapeFn( const Coord_orth& xyz, const String& element, const U_aniso_orth& u_aniso, const ftype occ ) { init( xyz, element, u_aniso, occ ); } /*! If the atom has an anisotropic U (even if the values are isotropic), then it is initialised as anisotropic, otherwise it is isotropic. \param atom The atom object. */ void AtomShapeFn::init( const Atom& atom ) { ftype occ = atom.occupancy(); if ( Util::is_nan( occ ) ) occ = 1.0; if ( atom.u_aniso_orth().is_null() ) { ftype u_iso = atom.u_iso(); if ( Util::is_nan( u_iso ) ) u_iso = 0.001; init( atom.coord_orth(), atom.element(), u_iso, occ ); } else { init( atom.coord_orth(), atom.element(), atom.u_aniso_orth(), occ ); } } /*! The atom is initialised as isotropic. \param xyz The atom coordinate. \param element The atom element. \param u_iso The isotropic U-value. \param occ The occupancy. */ void AtomShapeFn::init( const Coord_orth& xyz, const String& element, const ftype u_iso, const ftype occ ) { is_iso = true; coord_ = xyz; occ_ = occ; init( element, u_iso ); } /*! The atom is initialised as anisotropic. \param xyz The atom coordinate. \param element The atom element. \param u_aniso The anisotropic U-value. \param occ The occupancy. */ void AtomShapeFn::init( const Coord_orth& xyz, const String& element, const U_aniso_orth& u_aniso, const ftype occ ) { is_iso = false; coord_ = xyz; occ_ = occ; u_aniso_ = u_aniso; while ( u_aniso_.det() < 1.0e-20 ) // fix non-positive definites (crude) u_aniso_ = u_aniso_ + U_aniso_orth( 0.01, 0.01, 0.01, 0.0, 0.0, 0.0 ); init( element, u_aniso_.u_iso() ); // intialise aniso matrices for real space uaninv.resize(6); const ftype fourpi2 = Util::twopi() * Util::twopi(); const ftype pi3 = Util::pi() * Util::pi()* Util::pi(); for ( int i = 0; i < 6; i++ ) { uaninv[i] = Mat33sym<>( -2.0*u_aniso_.mat00()-b[i]/fourpi2, -2.0*u_aniso_.mat11()-b[i]/fourpi2, -2.0*u_aniso_.mat22()-b[i]/fourpi2, -2.0*u_aniso_.mat01(), -2.0*u_aniso_.mat02(), -2.0*u_aniso_.mat12() ).inverse(); double det = -uaninv[i].det(); //std::cout << aw[i] << "\t" << bw[i] << "\t"; aw[i] = a[i] * sqrt( det / pi3 ); bw[i] = -pow( det, 0.3333333333 ); //std::cout << aw[i] << "\t" << bw[i] << "\n"; } } /*! Return the scattering factor as a function of position in reciprocal space in electrons. \param rfl Position in reciprocal space. \return The scattering factor in electrons. */ ftype AtomShapeFn::f( const Coord_reci_orth& rfl ) const { // iso if ( is_iso ) return f( rfl.invresolsq() ); // aniso ftype s4 = 0.25 * rfl.invresolsq(); return occ_ * exp( -Util::twopi2() * u_aniso_.quad_form( rfl ) ) * ( a[0]*exp( -b[0]*s4 ) + a[1]*exp( -b[1]*s4 ) + a[2]*exp( -b[2]*s4 ) + a[3]*exp( -b[3]*s4 ) + a[4]*exp( -b[4]*s4 ) + a[5] ); } /*! Return the density as a function of position in real space in electrons. \param xyz Position in real space. \param The density in electrons. */ ftype AtomShapeFn::rho( const Coord_orth& xyz ) const { // iso const Coord_orth dxyz( xyz - coord_ ); if ( is_iso ) return rho( dxyz.lengthsq() ); // aniso return occ_ * ( aw[0]*exp( uaninv[0].quad_form( dxyz ) ) + aw[1]*exp( uaninv[1].quad_form( dxyz ) ) + aw[2]*exp( uaninv[2].quad_form( dxyz ) ) + aw[3]*exp( uaninv[3].quad_form( dxyz ) ) + aw[4]*exp( uaninv[4].quad_form( dxyz ) ) + aw[5]*exp( uaninv[5].quad_form( dxyz ) ) ); } /*! Return the scattering factor as a function of position in reciprocal space in electrons. \param invresolsq Inverse resolution squared in inverse Angstroms squared. \return The scattering factor in electrons. */ ftype AtomShapeFn::f( const ftype& invresolsq ) const { ftype s4 = 0.25 * invresolsq; return occ_ * exp( -Util::u2b(u_iso_)*s4 ) * ( a[0]*exp( -b[0]*s4 ) + a[1]*exp( -b[1]*s4 ) + a[2]*exp( -b[2]*s4 ) + a[3]*exp( -b[3]*s4 ) + a[4]*exp( -b[4]*s4 ) + a[5] ); } /*! Return the density as a function of position in real space in electrons. \param invresolsq Radius squared in Angstroms squared. \param The density in electrons. */ ftype AtomShapeFn::rho( const ftype& rsq ) const { return occ_ * ( aw[0]*exp(bw[0]*rsq) + aw[1]*exp(bw[1]*rsq) + aw[2]*exp(bw[2]*rsq) + aw[3]*exp(bw[3]*rsq) + aw[4]*exp(bw[4]*rsq) + aw[5]*exp(bw[5]*rsq) ); } /*! Return the Agarwal gradients of the density with respect to tha atomic parameters as a function of position in real space in electrons. The parameter list is defined by assignment to agarwal_params(). \param xyz Position in real space. \patam rho The density in electrons. \param grad Vector gradient in electrons (pre-size for best performance). */ bool AtomShapeFn::rho_grad( const Coord_orth& xyz, ftype& rho, std::vector& grad ) const { if ( is_iso ) { if ( grad.size() < params.size() ) grad.resize( params.size() ); const Coord_orth dxyz( xyz - coord_ ); const ftype rsq = dxyz.lengthsq(); const ftype r0 = aw[0]*exp(bw[0]*rsq); const ftype r1 = aw[1]*exp(bw[1]*rsq); const ftype r2 = aw[2]*exp(bw[2]*rsq); const ftype r3 = aw[3]*exp(bw[3]*rsq); const ftype r4 = aw[4]*exp(bw[4]*rsq); const ftype r5 = aw[5]*exp(bw[5]*rsq); const ftype r = r0 + r1 + r2 + r3 + r4 + r5; ftype g[5]; // temp array for gradients ftype gxyz = (r0*bw[0]+r1*bw[1]+r2*bw[2]+r3*bw[3]+r4*bw[4]+r5*bw[5]); rho = occ_ * r; g[X] = -2.0 * occ_ * gxyz * dxyz.x(); g[Y] = -2.0 * occ_ * gxyz * dxyz.y(); g[Z] = -2.0 * occ_ * gxyz * dxyz.z(); g[Occ] = r; g[Uiso] = 2.0 * occ_ * ( r0*bw[0]*(1.5+bw[0]*rsq) + r1*bw[1]*(1.5+bw[1]*rsq) + r2*bw[2]*(1.5+bw[2]*rsq) + r3*bw[3]*(1.5+bw[3]*rsq) + r4*bw[4]*(1.5+bw[4]*rsq) + r5*bw[5]*(1.5+bw[5]*rsq) ); for ( int i = 0; i < params.size(); i++ ) if ( params[i] < 5 ) grad[i] = g[params[i]]; return true; } else { if ( grad.size() < params.size() ) grad.resize( params.size() ); const Coord_orth dxyz( xyz - coord_ ); double ex[6]; for ( int i = 0; i < 6; i++ ) ex[i] = exp( uaninv[i].quad_form( dxyz ) ); const ftype r0 = aw[0]*ex[0]; const ftype r1 = aw[1]*ex[1]; const ftype r2 = aw[2]*ex[2]; const ftype r3 = aw[3]*ex[3]; const ftype r4 = aw[4]*ex[4]; const ftype r5 = aw[5]*ex[5]; const ftype r = r0 + r1 + r2 + r3 + r4 + r5; ftype g[11]; // temp array for gradients Vec3<> gxyz = r0*(uaninv[0]*dxyz) + r1*(uaninv[1]*dxyz) + r2*(uaninv[2]*dxyz) + r3*(uaninv[3]*dxyz) + r4*(uaninv[4]*dxyz) + r5*(uaninv[5]*dxyz); rho = occ_ * r; g[X] = -2.0 * occ_ * gxyz[0]; g[Y] = -2.0 * occ_ * gxyz[1]; g[Z] = -2.0 * occ_ * gxyz[2]; g[Occ] = r; // gradients wrt U_aniso double gradu[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; double aexp; Vec3<> v; for ( int i = 0; i < 6; i++ ) { // loop over Gaussian params v = uaninv[i] * dxyz; aexp = aw[i] * ex[i]; gradu[0] += ( v[0]*v[0] + 0.5*uaninv[i].mat00() ) * aexp; gradu[1] += ( v[1]*v[1] + 0.5*uaninv[i].mat11() ) * aexp; gradu[2] += ( v[2]*v[2] + 0.5*uaninv[i].mat22() ) * aexp; gradu[3] += ( v[0]*v[1] + 0.5*uaninv[i].mat01() ) * aexp; gradu[4] += ( v[0]*v[2] + 0.5*uaninv[i].mat02() ) * aexp; gradu[5] += ( v[1]*v[2] + 0.5*uaninv[i].mat12() ) * aexp; } g[U11] = 2.0 * occ_ * gradu[0]; g[U22] = 2.0 * occ_ * gradu[1]; g[U33] = 2.0 * occ_ * gradu[2]; g[U12] = 4.0 * occ_ * gradu[3]; g[U13] = 4.0 * occ_ * gradu[4]; g[U23] = 4.0 * occ_ * gradu[5]; // assemble result array for ( int i = 0; i < params.size(); i++ ) grad[i] = g[params[i]]; return true; } } /*! Return the Agarwal gradients of the density with respect to tha atomic parameters as a function of position in real space in electrons. The parameter list is defined by assignment to agarwal_params(). \param xyz Position in real space. \patam rho The density in electrons. \param grad Vector gradient in electrons (pre-size for best performance). \param curv Matrix curvature in electrons (pre-size for best performance).*/ bool AtomShapeFn::rho_curv( const Coord_orth& xyz, ftype& rho, std::vector& grad, Matrix& curv ) const { if ( is_iso ) { if ( grad.size() < params.size() ) grad.resize( params.size() ); const Coord_orth dxyz( xyz - coord_ ); const ftype rsq = dxyz.lengthsq(); const ftype rsq2 = rsq*rsq; const ftype r0 = aw[0]*exp(bw[0]*rsq); const ftype r1 = aw[1]*exp(bw[1]*rsq); const ftype r2 = aw[2]*exp(bw[2]*rsq); const ftype r3 = aw[3]*exp(bw[3]*rsq); const ftype r4 = aw[4]*exp(bw[4]*rsq); const ftype r5 = aw[5]*exp(bw[5]*rsq); const ftype r = r0 + r1 + r2 + r3 + r4 + r5; ftype bw2[6]; bw2[0] = bw[0]*bw[0]; bw2[1] = bw[1]*bw[1]; bw2[2] = bw[2]*bw[2]; bw2[3] = bw[3]*bw[3]; bw2[4] = bw[4]*bw[4]; bw2[5] = bw[5]*bw[5]; ftype g[5], c[5][5]; // temp array for gradients and curvatures ftype gxyz = (r0*bw[0] +r1*bw[1] +r2*bw[2] + r3*bw[3] +r4*bw[4] +r5*bw[5] ); ftype cxyz = (r0*bw2[0]+r1*bw2[1]+r2*bw2[2]+ r3*bw2[3]+r4*bw2[4]+r5*bw2[5]); g[X] = -2.0 * occ_ * gxyz * dxyz.x(); g[Y] = -2.0 * occ_ * gxyz * dxyz.y(); g[Z] = -2.0 * occ_ * gxyz * dxyz.z(); g[Occ] = r; g[Uiso] = 2.0 * occ_ * ( r0*bw[0]*(1.5+bw[0]*rsq) + r1*bw[1]*(1.5+bw[1]*rsq) + r2*bw[2]*(1.5+bw[2]*rsq) + r3*bw[3]*(1.5+bw[3]*rsq) + r4*bw[4]*(1.5+bw[4]*rsq) + r5*bw[5]*(1.5+bw[5]*rsq) ); c[X][X] = 2.0 * occ_ * ( gxyz + 2.0 * cxyz * dxyz.x() * dxyz.x() ); c[Y][Y] = 2.0 * occ_ * ( gxyz + 2.0 * cxyz * dxyz.y() * dxyz.y() ); c[Z][Z] = 2.0 * occ_ * ( gxyz + 2.0 * cxyz * dxyz.z() * dxyz.z() ); c[X][Y] = c[Y][X] = 4.0 * occ_ * cxyz * dxyz.x() * dxyz.y(); c[Y][Z] = c[Z][Y] = 4.0 * occ_ * cxyz * dxyz.y() * dxyz.z(); c[Z][X] = c[X][Z] = 4.0 * occ_ * cxyz * dxyz.z() * dxyz.x(); c[Occ][Occ] = 0.0; c[Occ][X] = c[X][Occ] = -2.0 * gxyz * dxyz.x(); c[Occ][Y] = c[Y][Occ] = -2.0 * gxyz * dxyz.y(); c[Occ][Z] = c[Z][Occ] = -2.0 * gxyz * dxyz.z(); c[Uiso][Uiso] = 4.0 * occ_ * ( r0*bw2[0]*(3.75 + 5.0*bw[0]*rsq + bw2[0]*rsq2) + r1*bw2[1]*(3.75 + 5.0*bw[1]*rsq + bw2[1]*rsq2) + r2*bw2[2]*(3.75 + 5.0*bw[2]*rsq + bw2[2]*rsq2) + r3*bw2[3]*(3.75 + 5.0*bw[3]*rsq + bw2[3]*rsq2) + r4*bw2[4]*(3.75 + 5.0*bw[4]*rsq + bw2[4]*rsq2) + r5*bw2[5]*(3.75 + 5.0*bw[5]*rsq + bw2[5]*rsq2) ); c[Uiso][X] = c[Uiso][Y] = c[Uiso][Z] = c[Uiso][Occ] = Util::nan(); c[X][Uiso] = c[Y][Uiso] = c[Z][Uiso] = c[Occ][Uiso] = Util::nan(); rho = occ_ * r; for ( int i = 0; i < params.size(); i++ ) if ( params[i] < 5 ) grad[i] = g[params[i]]; for ( int i = 0; i < params.size(); i++ ) if ( params[i] < 5 ) for ( int j = 0; j < params.size(); j++ ) if ( params[j] < 5 ) curv(i,j) = c[params[i]][params[j]]; return true; } else { Message::message( Message_fatal( "AtomShapeFn: missing method" ) ); return false; } } /* OBSOLETE FORM */ bool AtomShapeFn::rho_grad( const Coord_orth& xyz, std::vector& grad ) const { if ( is_iso ) { if ( grad.size() < params.size() ) grad.resize( params.size() ); const Coord_orth dxyz( xyz - coord_ ); const ftype rsq = dxyz.lengthsq(); const ftype r0 = aw[0]*exp(bw[0]*rsq); const ftype r1 = aw[1]*exp(bw[1]*rsq); const ftype r2 = aw[2]*exp(bw[2]*rsq); const ftype r3 = aw[3]*exp(bw[3]*rsq); const ftype r4 = aw[4]*exp(bw[4]*rsq); const ftype r5 = aw[5]*exp(bw[5]*rsq); ftype g[5]; // temp array for gradients ftype gxyz = -(r0*bw[0]+r1*bw[1]+r2*bw[2]+r3*bw[3]+r4*bw[4]+r5*bw[5]); g[X] = 2.0 * occ_ * gxyz * dxyz.x(); g[Y] = 2.0 * occ_ * gxyz * dxyz.y(); g[Z] = 2.0 * occ_ * gxyz * dxyz.z(); g[Occ] = r0+r1+r2+r3+r4+r5; g[Uiso] = 2.0 * occ_ * ( r0*bw[0]*(1.5+bw[0]*rsq) + r1*bw[1]*(1.5+bw[1]*rsq) + r2*bw[2]*(1.5+bw[2]*rsq) + r3*bw[3]*(1.5+bw[3]*rsq) + r4*bw[4]*(1.5+bw[4]*rsq) + r5*bw[5]*(1.5+bw[5]*rsq) ); for ( int i = 0; i < params.size(); i++ ) grad[i] = g[params[i]]; return true; } else { Message::message( Message_fatal( "AtomShapeFn: missing method" ) ); return false; } } /*! \internal */ void AtomShapeFn::init( const String& element, const ftype& u_iso ) { // standardise the atom name int nalpha = 0; String atyp; for ( int i = 0; i < element.length(); i++ ) { if ( isalpha( element[i] ) ) { nalpha++; if ( nalpha == 1 ) atyp += toupper( element[i] ); else atyp += tolower( element[i] ); } else if ( !isspace( element[i] ) ) { atyp += element[i]; } } int ntyp = sizeof(data::sfdata) / sizeof(data::sfdata[0]); int ityp = 0; for ( ityp = 0; ityp < ntyp; ityp++ ) if ( atyp == String( data::sfdata[ityp].name ) ) break; if ( ityp == ntyp ) Message::message( Message_fatal("Unknown atom type: <"+atyp+">") ); // store coeffs and derived info for ( int i = 0; i < 6; i++ ) { a[i] = data::sfdata[ityp].a[i]; b[i] = data::sfdata[ityp].b[i]; bw[i] = -4.0*Util::pi()*Util::pi() / ( b[i] + Util::u2b(u_iso) ); aw[i] = a[i] * pow( -bw[i]/Util::pi(), 1.5 ); } u_iso_ = u_iso; } // legacy AtomSF interface AtomSF::AtomSF( const String& type, const ftype u_iso, const ftype occ ) { init( type, u_iso, occ ); } AtomSF::AtomSF( const String& type, const U_aniso_orth& u_aniso, const ftype occ ) { init( type, u_aniso, occ ); } void AtomSF::init( const String& type, const ftype u_iso, const ftype occ ) { AtomShapeFn::init( clipper::Coord_orth(0.0,0.0,0.0), type, u_iso, occ ); } void AtomSF::init( const String& type, const U_aniso_orth& u_aniso, const ftype occ ) { AtomShapeFn::init( clipper::Coord_orth(0.0,0.0,0.0), type, u_aniso, occ ); } ftype AtomSF::f_iso( const ftype& s ) const { return AtomShapeFn::f( s ); } ftype AtomSF::f_aniso( const Coord_reci_orth& rfl ) const { return AtomShapeFn::f( rfl ); } ftype AtomSF::rho_iso( const ftype& d2 ) const { return AtomShapeFn::rho( d2 ); } ftype AtomSF::rho_aniso( const Coord_orth& uvw ) const { return AtomShapeFn::rho( uvw ); } } // namespace clipper clipper-2.1/clipper/core/map_utils.h0000644000374100011300000001226111001075364014460 00000000000000/*! \file lib/map_utils.h Header file for map statistics type */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_MAP_UTILS #define CLIPPER_MAP_UTILS #include "derivs.h" namespace clipper { //! Generic map statistics class /*! This class is used to calculate and store the mean and standard deviation of a generic map object of scalar types (e.g. Xmap, NXmap). If the map contains NaN values, those points are excluded for the calculation. In the case of an Xmap, the proper multiplicty corrections are applied to give statistics for a whole unit cell */ class Map_stats { public: Map_stats() {} //!< null constructor template Map_stats( const M& map ); //!< Constructor: from Xmap const ftype& mean() const { return mean_; } //!< Mean of map const ftype& std_dev() const { return std_dev_; } //!< Std deviation of map const ftype& min() const { return min_; } //!< Minimum of map const ftype& max() const { return max_; } //!< Maximum of map const Range<> range() const { return Range<>( min_, max_ ); } //!< Range private: ftype mean_, std_dev_, min_, max_; }; //! Generic map sorting class /*! This class is used to sort a vector of integer indices into a map. This includes sorting the whole map to get highest or lowest density first, or sorting some subset, e.g. a list of peak indices. Integer indices are used because they are the most compact way of referencing a unique map location. e.g. \code clipper::Xmap::Map_reference_index ix; std::vector index; for ( ix = xmap.first(); !ix.last(); ix.next() ) index.push_back( ix.index() ); Map_index_sort::sort_decreasing( xmap, index ); \endcode */ class Map_index_sort { public: //! Sort a list into increasing order template static void sort_increasing( const M& map, std::vector& index ); //! Sort a list into decreasing order template static void sort_decreasing( const M& map, std::vector& index ); //! Internal helper class used for sorting private: template class Compare_density { public: Compare_density( const M& m ) { p = &m; } bool operator() ( const int& i1, const int& i2 ) const { return p->get_data(i1) < p->get_data(i2); } private: const M* p; }; }; // template implementations /*! For float and double maps \params map The map for which moments are to be calculated. */ template Map_stats::Map_stats( const M& map ) { ftype64 w, x, s, sx, sxx; s = sx = sxx = 0.0; min_ = 1.0e12; max_ = -1.0e12; for ( typename M::Map_reference_index im = map.first(); !im.last(); im.next() ) { w = 1.0 / ftype64( map.multiplicity( im.coord() ) ); x = ftype64( map[im] ); if ( !Util::is_nan(x) ) { s += w; sx += w*x; sxx += w*x*x; if ( x < min_ ) min_ = x; if ( x > max_ ) max_ = x; } } sx /= s; sxx /= s; mean_ = sx; std_dev_ = sqrt( sxx - sx*sx ); } } // namespace clipper #endif clipper-2.1/clipper/core/test_core.cpp0000644000374100011300000003612710717057106015023 00000000000000/* test_core.cpp: implementation file for clipper core self-test */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "test_core.h" #include "test_data.h" #include "hkl_compute.h" #include "hkl_operators.h" #include "resol_targetfn.h" #include "atomsf.h" #include "xmap.h" #include namespace clipper { bool Test_core::operator() () { typedef HKL_info::HKL_reference_index HRI; data::Test_data data; const HKL_data& fsig = data.hkl_data_f_sigf(); const HKL_data& abcd = data.hkl_data_abcd(); const Spacegroup spgr = fsig.hkl_info().spacegroup(); const Cell cell = fsig.hkl_info().cell(); const Resolution reso = fsig.hkl_info().resolution(); // test data sizes { test( "FTYPE32", sizeof(clipper::ftype32), 4 ); test( "ITYPE32", sizeof(clipper::itype32), 4 ); test( "FTYPE64", sizeof(clipper::ftype64), 8 ); test( "ITYPE64", sizeof(clipper::itype64), 8 ); } // test NaN functions { ftype64 nandd = Util::nand(); ftype64 nandf = Util::nanf(); ftype32 nanfd = Util::nand(); ftype32 nanff = Util::nanf(); test( "ISNANDD", Util::isnan( nandd )?1:0, 1 ); test( "ISNANDF", Util::isnan( nandf )?1:0, 1 ); test( "ISNANFD", Util::isnan( nanfd )?1:0, 1 ); test( "ISNANFF", Util::isnan( nanff )?1:0, 1 ); test( "IS_NANDD", Util::is_nan( nandd )?1:0, 1 ); test( "IS_NANDF", Util::is_nan( nandf )?1:0, 1 ); test( "IS_NANFD", Util::is_nan( nanfd )?1:0, 1 ); test( "IS_NANFF", Util::is_nan( nanff )?1:0, 1 ); for ( double x = -30.0; x < 30.5; x += 1.0 ) { test( "ISNANX", Util::isnan(exp(x))?1:0, 0 ); test( "IS_NANX", Util::is_nan(exp(x))?1:0, 0 ); } } // test Sim functions for consistency for ( double x=0.1; x<50.0; x*=1.5 ) { test( "SIMINV", x, Util::invsim(Util::sim(x)), 0.001*x ); test( "SIMNEG", Util::sim(x), -Util::sim(-x), 0.001 ); test( "SIMINT", Util::sim(x), (Util::sim_integ(x+0.0001)-Util::sim_integ(x))/0.0001, 0.001 ); test( "SIMDRV", Util::sim_deriv(x), (Util::sim(x+0.0001)-Util::sim(x))/0.0001, 0.001 ); if ( x < 2.0 ) test( "SIM_I0", Util::sim(x), (Util::bessel_i0(x+0.0001)/Util::bessel_i0(x)-1.0)/0.0001, 0.001 ); } // test HL<->abcd conversion for ( HRI ih = abcd.first(); !ih.last(); ih.next() ) { data32::Compute_phifom_from_abcd cap; data32::Compute_abcd_from_phifom cpa; data32::Phi_fom phiw1, phiw2; data32::ABCD abcd1, abcd2; LogPhaseProb<24> q(ih.hkl_class()); q.set_abcd( abcd[ih] ); // 1st route q.get_phi_fom( phiw1 ); abcd1 = cpa( ih, phiw1 ); phiw1 = cap( ih, abcd1 ); phiw2 = cap( ih, abcd[ih] ); // 2nd route q.set_phi_fom( phiw2 ); q.get_abcd( abcd2 ); phiw2 = cap( ih, abcd2 ); test( "HLW", phiw1.fom(), phiw2.fom(), 0.003 ); } // test map calculation { HKL_data pw( fsig.hkl_info() ); HKL_data fp1( fsig.hkl_info() ), fp2( fsig.hkl_info() ); pw.compute( abcd, data32::Compute_phifom_from_abcd() ); fp1.compute( fsig, pw, data32::Compute_fphi_from_fsigf_phifom() ); Grid_sampling grid( spgr, cell, reso ); Xmap xmap( spgr, cell, grid ); xmap.fft_from( fp1 ); xmap.fft_to( fp2 ); for ( HRI ih = fp1.first(); !ih.last(); ih.next() ) { std::complex ab1(0.0,0.0), ab2(0.0,0.0); if ( !fp1[ih].missing() ) ab1 = fp1[ih]; if ( !fp2[ih].missing() ) ab2 = fp2[ih]; test( "FFT-A", ab1.real(), ab2.real(), 0.01 ); test( "FFT-B", ab1.imag(), ab2.imag(), 0.01 ); } } // test resolution ordinals { std::vector resols; for ( HRI ih = fsig.first(); !ih.last(); ih.next() ) resols.push_back( ih.invresolsq() ); clipper::Generic_ordinal ordinal; ordinal.init(resols); clipper::Generic_ordinal ordinv = ordinal; ordinv.invert(); clipper::Resolution_ordinal resord; resord.init( fsig.hkl_info(), 1.0 ); std::sort( resols.begin(), resols.end() ); for ( int i = 0; i < resols.size(); i++ ) test( "RESORD", resols[i], ordinv.ordinal(resord.ordinal(resols[i])), 0.001 ); } // test resolution functions { std::vector param( 10, 1.0 ); BasisFn_spline basisfn( fsig, 10 ); TargetFn_meanFnth targetfn( fsig, 2.0 ); ResolutionFn rfn( fsig.hkl_info(), basisfn, targetfn, param ); test( "RESFN0", rfn.params()[0], 229690.9746, 0.1 ); test( "RESFN1", rfn.params()[1], 216481.7609, 0.1 ); test( "RESFN2", rfn.params()[2], 78484.9498, 0.1 ); test( "RESFN3", rfn.params()[3], 148774.2654, 0.1 ); test( "RESFN4", rfn.params()[4], 69255.6000, 0.1 ); test( "RESFN5", rfn.params()[5], 143032.5088, 0.1 ); test( "RESFN6", rfn.params()[6], 110371.3524, 0.1 ); test( "RESFN7", rfn.params()[7], 108711.3487, 0.1 ); test( "RESFN8", rfn.params()[8], 150487.5496, 0.1 ); test( "RESFN9", rfn.params()[9], 141713.7420, 0.1 ); } // test atom shape function derivatives { ftype d = 0.001; Coord_orth co( 1.0, 2.0, 3.0 ); AtomShapeFn sf( co, "N", 0.25, 1.0 ); AtomShapeFn sfx( co+Coord_orth(d,0.0,0.0), "N", 0.25, 1.0 ); AtomShapeFn sfy( co+Coord_orth(0.0,d,0.0), "N", 0.25, 1.0 ); AtomShapeFn sfz( co+Coord_orth(0.0,0.0,d), "N", 0.25, 1.0 ); AtomShapeFn sfo( co, "N", 0.25, 1.0+d ); AtomShapeFn sfu( co, "N", 0.251, 1.0 ); AtomShapeFn sfx2( co+Coord_orth(2.0*d,0.0,0.0), "N", 0.25, 1.0 ); AtomShapeFn sfy2( co+Coord_orth(0.0,2.0*d,0.0), "N", 0.25, 1.0 ); AtomShapeFn sfz2( co+Coord_orth(0.0,0.0,2.0*d), "N", 0.25, 1.0 ); AtomShapeFn sfo2( co, "N", 0.25, 1.0+d+d ); AtomShapeFn sfu2( co, "N", 0.252, 1.0 ); AtomShapeFn sfxy( co+Coord_orth(d,d,0.0), "N", 0.25, 1.0 ); AtomShapeFn sfyz( co+Coord_orth(0.0,d,d), "N", 0.25, 1.0 ); AtomShapeFn sfzx( co+Coord_orth(d,0.0,d), "N", 0.25, 1.0 ); U_aniso_orth uai( 0.25, 0.25, 0.25, 0.0, 0.0, 0.0 ); AtomShapeFn sfuai( co, "N", uai, 1.0 ); std::vector params; params.push_back( AtomShapeFn::X ); params.push_back( AtomShapeFn::Y ); params.push_back( AtomShapeFn::Z ); params.push_back( AtomShapeFn::Occ ); params.push_back( AtomShapeFn::Uiso ); params.push_back( AtomShapeFn::U11 ); params.push_back( AtomShapeFn::U22 ); params.push_back( AtomShapeFn::U33 ); params.push_back( AtomShapeFn::U12 ); params.push_back( AtomShapeFn::U13 ); params.push_back( AtomShapeFn::U23 ); sf.agarwal_params() = params; for ( int i = 0; i < 100; i++ ) { Coord_orth c2 = co + Coord_orth( 0.11*(i%5-1.9), 0.13*(i%7-2.8), 0.15*(i%9-3.7) ); double f; std::vector g(11); Matrix c(11,11); test( "ATOMSF-A", sfuai.rho(c2), sf.rho(c2), 1.0e-8 ); sf.rho_curv( c2, f, g, c ); test( "ATOMSF-G", (sfx.rho(c2)-sf.rho(c2))/d, g[0], 0.01 ); test( "ATOMSF-G", (sfy.rho(c2)-sf.rho(c2))/d, g[1], 0.01 ); test( "ATOMSF-G", (sfz.rho(c2)-sf.rho(c2))/d, g[2], 0.01 ); test( "ATOMSF-G", (sfo.rho(c2)-sf.rho(c2))/d, g[3], 0.01 ); test( "ATOMSF-G", (sfu.rho(c2)-sf.rho(c2))/d, g[4], 0.05 ); test( "ATOMSF-C", (sfx2.rho(c2)-2*sfx.rho(c2)+sf.rho(c2))/(d*d), c(0,0), 0.1 ); test( "ATOMSF-C", (sfy2.rho(c2)-2*sfy.rho(c2)+sf.rho(c2))/(d*d), c(1,1), 0.1 ); test( "ATOMSF-C", (sfz2.rho(c2)-2*sfz.rho(c2)+sf.rho(c2))/(d*d), c(2,2), 0.1 ); test( "ATOMSF-C", (sfxy.rho(c2)-sfx.rho(c2)-sfy.rho(c2)+sf.rho(c2))/(d*d), c(0,1), 0.1 ); test( "ATOMSF-C", (sfyz.rho(c2)-sfy.rho(c2)-sfz.rho(c2)+sf.rho(c2))/(d*d), c(1,2), 0.1 ); test( "ATOMSF-C", (sfzx.rho(c2)-sfz.rho(c2)-sfx.rho(c2)+sf.rho(c2))/(d*d), c(2,0), 0.1 ); } for ( int j = 0; j < 20; j++ ) { ftype x = 0.19*(j%5-1.9); ftype y = 0.15*(j%7-2.8); ftype z = 0.13*(j%9-3.7); U_aniso_orth ua ( x*x+0.2, y*y+0.2, z*z+0.2, y*z, z*x, x*y ); U_aniso_orth ua00( ua.mat00()+d, ua.mat11(), ua.mat22(), ua.mat01(), ua.mat02(), ua.mat12() ); U_aniso_orth ua11( ua.mat00(), ua.mat11()+d, ua.mat22(), ua.mat01(), ua.mat02(), ua.mat12() ); U_aniso_orth ua22( ua.mat00(), ua.mat11(), ua.mat22()+d, ua.mat01(), ua.mat02(), ua.mat12() ); U_aniso_orth ua01( ua.mat00(), ua.mat11(), ua.mat22(), ua.mat01()+d, ua.mat02(), ua.mat12() ); U_aniso_orth ua02( ua.mat00(), ua.mat11(), ua.mat22(), ua.mat01(), ua.mat02()+d, ua.mat12() ); U_aniso_orth ua12( ua.mat00(), ua.mat11(), ua.mat22(), ua.mat01(), ua.mat02(), ua.mat12()+d ); AtomShapeFn sfua ( co, "N", ua, 1.0 ); AtomShapeFn sfuax( co+Coord_orth(d,0.0,0.0), "N", ua, 1.0 ); AtomShapeFn sfuay( co+Coord_orth(0.0,d,0.0), "N", ua, 1.0 ); AtomShapeFn sfuaz( co+Coord_orth(0.0,0.0,d), "N", ua, 1.0 ); AtomShapeFn sfuao( co, "N", ua, 1.0+d ); AtomShapeFn sfua00( co, "N", ua00, 1.0 ); AtomShapeFn sfua11( co, "N", ua11, 1.0 ); AtomShapeFn sfua22( co, "N", ua22, 1.0 ); AtomShapeFn sfua01( co, "N", ua01, 1.0 ); AtomShapeFn sfua02( co, "N", ua02, 1.0 ); AtomShapeFn sfua12( co, "N", ua12, 1.0 ); sfua.agarwal_params() = params; for ( int i = 0; i < 50; i++ ) { Coord_orth c2 = co + Coord_orth( 0.11*(i%5-1.9), 0.13*(i%7-2.8), 0.15*(i%9-3.7) ); double f; std::vector g(11); Matrix c(11,11); sfua.rho_grad( c2, f, g ); test( "ATOMSF-AG", ( sfuax.rho(c2)-sfua.rho(c2))/d, g[0], 0.01 ); test( "ATOMSF-AG", ( sfuay.rho(c2)-sfua.rho(c2))/d, g[1], 0.01 ); test( "ATOMSF-AG", ( sfuaz.rho(c2)-sfua.rho(c2))/d, g[2], 0.01 ); test( "ATOMSF-AG", ( sfuao.rho(c2)-sfua.rho(c2))/d, g[3], 0.01 ); test( "ATOMSF-AG", (sfua00.rho(c2)-sfua.rho(c2))/d, g[5], 0.05 ); test( "ATOMSF-AG", (sfua11.rho(c2)-sfua.rho(c2))/d, g[6], 0.05 ); test( "ATOMSF-AG", (sfua22.rho(c2)-sfua.rho(c2))/d, g[7], 0.05 ); test( "ATOMSF-AG", (sfua01.rho(c2)-sfua.rho(c2))/d, g[8], 0.05 ); test( "ATOMSF-AG", (sfua02.rho(c2)-sfua.rho(c2))/d, g[9], 0.05 ); test( "ATOMSF-AG", (sfua12.rho(c2)-sfua.rho(c2))/d, g[10], 0.05 ); } } } // test spacegroups { const char *pgs[] = {"-P 1", "-P 2", "-P 2y", "-P 2x", "-P 2\"", "-P 2y\"", "-P 2x\"", "-P 2'", "-P2y'", "-P 2x'", "-P 2 2", "-P 2 2\"", "-P 2 2\"(y,z,x)", "-P 2 2\"(z,x,y)", "-P3", "-P 3 (y,z,x)", "-P 3 (z,x,y)", "-P 3 (-x,y,z)", "-P 3 (y,z,-x)", "-P 3 (z,-x,y)", "-P 3*", "-P 3* (-x,y,z)", "-P 3* (x,-y,z)", "-P 3* (x,y,-z)", "-P 3 2", "-P 3 2 (y,z,x)", "-P 3 2 (z,x,y)", "-P 3* 2", "-P 3* 2 (-x,y,z)", "-P 3* 2 (x,-y,z)", "-P 3* 2 (-x,-y,z)", "-P 3 2\"", "-P 3 2\"(z,x,y)", "-P 3 2\"(y,z,x)", "-P 3 2\"(-x,y,z)", "-P 3 2\"(z,-x,y)", "-P 3 2\"(y,z,-x)", "-P 4", "-P 4 (y,z,x)", "-P 4 (z,x,y)", "-P 4 2", "-P 4 2 (y,z,x)", "-P 4 2 (z,x,y)", "-P 6", "-P 6 (y,z,x)", "-P 6 (z,x,y)", "-P 6 2", "-P 6 2 (y,z,x)", "-P 6 2 (z,x,y)", "-P 2 2 3", "-P 4 2 3" }; std::vector hallsymbols; for ( int i = 0; i < data::sgdata_size; i++ ) hallsymbols.push_back( data::sgdata[i].hall ); for ( int i = 0; i < sizeof(pgs)/sizeof(pgs[0]); i++ ) hallsymbols.push_back( pgs[i] ); Cell cellc( Cell_descr( 37, 37, 37 ) ); Cell cellha( Cell_descr( 37, 37, 37, 120, 90, 90 ) ); Cell cellhb( Cell_descr( 37, 37, 37, 90, 120, 90 ) ); Cell cellhc( Cell_descr( 37, 37, 37, 90, 90, 120 ) ); Cell cellha1( Cell_descr( 37, 37, 37, 60, 90, 90 ) ); Cell cellhb1( Cell_descr( 37, 37, 37, 90, 60, 90 ) ); Cell cellhc1( Cell_descr( 37, 37, 37, 90, 90, 60 ) ); Cell cell; String symbol; Spacegroup sg; for ( int s = 0; s < hallsymbols.size(); s++ ) { try { symbol = hallsymbols[s]; sg = Spacegroup( Spgr_descr( symbol, Spgr_descr::Hall ) ); // identify trigonal/hexagonal groups cell = cellc; for ( int sym = 1; sym < sg.num_symops(); sym++ ) { if ( ( sg.symop(sym).rot()(1,1) * sg.symop(sym).rot()(1,2) == -1 ) || ( sg.symop(sym).rot()(2,1) * sg.symop(sym).rot()(2,2) == -1 ) ) cell = cellha; if ( ( sg.symop(sym).rot()(0,0) * sg.symop(sym).rot()(0,2) == -1 ) || ( sg.symop(sym).rot()(2,0) * sg.symop(sym).rot()(2,2) == -1 ) ) cell = cellhb; if ( ( sg.symop(sym).rot()(0,0) * sg.symop(sym).rot()(0,1) == -1 ) || ( sg.symop(sym).rot()(1,0) * sg.symop(sym).rot()(1,1) == -1 ) ) cell = cellhc; if ( ( sg.symop(sym).rot()(1,1) * sg.symop(sym).rot()(1,2) == 1 ) || ( sg.symop(sym).rot()(2,1) * sg.symop(sym).rot()(2,2) == 1 ) ) cell = cellha1; if ( ( sg.symop(sym).rot()(0,0) * sg.symop(sym).rot()(0,2) == 1 ) || ( sg.symop(sym).rot()(2,0) * sg.symop(sym).rot()(2,2) == 1 ) ) cell = cellhb1; if ( ( sg.symop(sym).rot()(0,0) * sg.symop(sym).rot()(0,1) == 1 ) || ( sg.symop(sym).rot()(1,0) * sg.symop(sym).rot()(1,1) == 1 ) ) cell = cellhc1; } for ( int i = 0; i < 100; i++ ) { HKL rfl( i%5-2, i%7-3, i%9-4 ); ftype s0 = rfl.invresolsq(cell); for ( int sym = 1; sym < sg.num_symops(); sym++ ) { ftype s1 = rfl.transform(sg.symop(sym)).invresolsq(cell); test( "SG "+symbol, s0, s1, 1.0e-12 ); } } Grid_sampling grid( sg, cell, Resolution( 4.0 ) ); Xmap xmap( sg, cell, grid ); } catch ( Message_base ) { test( "SG "+symbol, sg.spacegroup_number(), -1 ); } } } return ( error_count == 0 ); } } // namespace clipper clipper-2.1/clipper/core/hkl_compute.cpp0000644000374100011300000003317311071154260015335 00000000000000/* hkl_compute.cpp: fundamental conversion ops for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "hkl_compute.h" namespace clipper { namespace datatypes { template Compute_phifom_from_abcd::Compute_phifom_from_abcd() { for ( int i = 0; i < 144; i++ ) { costab[i] = cos( Util::d2rad(ftype(5*i)) ); sintab[i] = sin( Util::d2rad(ftype(5*i)) ); } } template const Phi_fom Compute_phifom_from_abcd::operator()( const HKL_info::HKL_reference_index& ih, const ABCD& abcd ) const { clipper::datatypes::Phi_fom phifom; if ( !abcd.missing() ) { const HKL_class& cls = ih.hkl_class(); Range qrange( -50.0, 50.0 ); ftype64 q, pq, scos, ssin, ssum; if ( cls.centric() ) { // centric case: integrate over 2 allowed phases int i = Util::mod( Util::intr( Util::rad2d( cls.allowed() ) / 5 ), 36 ); q = abcd.a()*costab[i] + abcd.b()*sintab[i]; pq = exp( qrange.truncate(q) ); scos = ( pq - 1.0/pq ) * costab[i]; ssin = ( pq - 1.0/pq ) * sintab[i]; ssum = ( pq + 1.0/pq ); } else { // acentric case: integrate over phase circle in 5 degree steps scos = ssin = ssum = 0.0; for ( int i = 0; i < 72; i++ ) { q = abcd.a()*costab[i] + abcd.b()*sintab[i] + abcd.c()*costab[2*i] + abcd.d()*sintab[2*i]; pq = exp( qrange.truncate(q) ); scos += pq * costab[i]; ssin += pq * sintab[i]; ssum += pq; } } std::complex c( scos/ssum, ssin/ssum ); phifom.phi() = std::arg(c); phifom.fom() = std::abs(c); } return phifom; } template const ABCD Compute_abcd_from_phifom::operator()( const HKL_info::HKL_reference_index& ih, const Phi_fom& phifom ) const { clipper::datatypes::ABCD abcd; if ( !phifom.missing() ) { const HKL_class& cls = ih.hkl_class(); dtype x = Util::min( phifom.fom(), dtype(0.9999) ); if ( cls.centric() ) x = Util::atanh( x ); else x = Util::invsim( x ); abcd.a() = x * cos( phifom.phi() ); abcd.b() = x * sin( phifom.phi() ); abcd.c() = abcd.d() = 0.0; } return abcd; } template const F_phi Compute_fphi_from_fsigf_phifom::operator()( const HKL_info::HKL_reference_index& ih, const F_sigF& fsigf, const Phi_fom& phifom ) const { clipper::datatypes::F_phi fphi; if ( !fsigf.missing() && !phifom.missing() ) { fphi.f() = fsigf.f() * phifom.fom(); fphi.phi() = phifom.phi(); } return fphi; } template const E_sigE Compute_EsigE_from_FsigF::operator()( const HKL_info::HKL_reference_index& ih, const F_sigF& fsigf ) const { clipper::datatypes::E_sigE esige; if ( !fsigf.missing() ) { ftype sqrteps = sqrt( ih.hkl_class().epsilon() ); esige.E() = fsigf.f()/sqrteps; esige.sigE() = fsigf.sigf()/sqrteps; } return esige; } template const F_sigF Compute_mean_fsigf_from_fsigfano::operator()( const HKL_info::HKL_reference_index& ih, const F_sigF_ano& fsigfano ) const { clipper::datatypes::F_sigF fsigf; if ( Util::is_nan( fsigfano.f_pl() ) ) { fsigf.f() = fsigfano.f_mi(); fsigf.sigf() = fsigfano.sigf_mi(); } else if ( Util::is_nan( fsigfano.f_mi() ) ) { fsigf.f() = fsigfano.f_pl(); fsigf.sigf() = fsigfano.sigf_pl(); } else { fsigf.f() = 0.5 * ( fsigfano.f_pl() + fsigfano.f_mi() ); if ( Util::is_nan(fsigfano.cov()) ) fsigf.sigf() = 0.5 * sqrt( fsigfano.sigf_pl()*fsigfano.sigf_pl() + fsigfano.sigf_mi()*fsigfano.sigf_mi() ); else fsigf.sigf() = 0.5 * sqrt( fsigfano.sigf_pl()*fsigfano.sigf_pl() + fsigfano.sigf_mi()*fsigfano.sigf_mi() + 2.0 * fsigfano.cov() ); } return fsigf; } template const F_sigF Compute_diff_fsigf_from_fsigfano::operator()( const HKL_info::HKL_reference_index& ih, const F_sigF_ano& fsigfano ) const { clipper::datatypes::F_sigF fsigf; if ( Util::is_nan( fsigfano.f_pl() ) || Util::is_nan( fsigfano.f_mi() ) ) { fsigf.f() = fsigf.sigf() = Util::nan(); } else { fsigf.f() = 1.0 * ( fsigfano.f_pl() - fsigfano.f_mi() ); if ( Util::is_nan(fsigfano.cov()) ) fsigf.sigf() = 1.0 * sqrt( fsigfano.sigf_pl()*fsigfano.sigf_pl() + fsigfano.sigf_mi()*fsigfano.sigf_mi() ); else fsigf.sigf() = 1.0 * sqrt( fsigfano.sigf_pl()*fsigfano.sigf_pl() + fsigfano.sigf_mi()*fsigfano.sigf_mi() - 2.0 * fsigfano.cov() ); } return fsigf; } template const F_phi Compute_neg_fphi::operator()( const HKL_info::HKL_reference_index& ih, const F_phi& fphi1 ) const { clipper::datatypes::F_phi fphi; if ( !fphi.missing() ) fphi = clipper::datatypes::F_phi( -std::complex(fphi1) ); return fphi; } template const F_phi Compute_add_fphi::operator()( const HKL_info::HKL_reference_index& ih, const F_phi& fphi1, const F_phi& fphi2 ) const { clipper::datatypes::F_phi fphi; if ( !fphi1.missing() && !fphi2.missing() ) fphi = clipper::datatypes::F_phi( std::complex(fphi1) + std::complex(fphi2) ); return fphi; } template const F_phi Compute_sub_fphi::operator()( const HKL_info::HKL_reference_index& ih, const F_phi& fphi1, const F_phi& fphi2 ) const { clipper::datatypes::F_phi fphi; if ( !fphi1.missing() && !fphi2.missing() ) fphi = clipper::datatypes::F_phi( std::complex(fphi1) - std::complex(fphi2) ); return fphi; } template const ABCD Compute_add_abcd::operator()( const HKL_info::HKL_reference_index& ih, const ABCD& abcd1, const ABCD& abcd2 ) const { clipper::datatypes::ABCD abcd; if ( !abcd1.missing() && !abcd2.missing() ) { abcd.a() = abcd1.a() + abcd2.a(); abcd.b() = abcd1.b() + abcd2.b(); abcd.c() = abcd1.c() + abcd2.c(); abcd.d() = abcd1.d() + abcd2.d(); } return abcd; } /*! DEPRECATED: This operator applies the scale factor against intensities and the U value against magnitudes, which is counterintuitive. Compute_scale_u_iso is more intutive. Construct conversion operator to scale list according to the formula I_new = s.exp( b.|h|^2/2 ) I_old or F_new^2 = s.exp( b.|h|^2/2 ) F_old^2 where |h| = invresolsq. \param s The intensity scale factor. \param u The temperature factor (U-value). */ template Compute_scale_u::Compute_scale_u( const ftype& s, const ftype& u ) { s_ = sqrt(s); u_ = Util::twopi2()*u; } template const T Compute_scale_u::operator()( const HKL_info::HKL_reference_index& ih, T data ) const { if ( !data.missing() ) data.scale( s_ * exp( u_ * ih.invresolsq() ) ); return data; } /*! Construct conversion operator to scale list according to the formula I_new = s^2 .exp( 4 π^2 u.|h|^2 ) I_old or F_new = s.exp( 2 π^2 u.|h|^2 ) F_old where |h|^2 = invresolsq. \param s The scale factor. \param u The temperature factor (U-value). */ template Compute_scale_u_iso::Compute_scale_u_iso( const ftype& s, const ftype& u ) { s_ = s; u_ = Util::twopi2()*u; } template const T Compute_scale_u_iso::operator()( const HKL_info::HKL_reference_index& ih, T data ) const { if ( !data.missing() ) data.scale( s_ * exp( u_ * ih.invresolsq() ) ); return data; } /*! Construct conversion operator to scale list according to the formula I_new = s^2 .exp( 4 π^2 h^T U h ) I_old or F_new = s.exp( 2 π^2 h^T U h ) F_old \param s The scale factor. \param u The temperature factor (U-value). */ template Compute_scale_u_aniso::Compute_scale_u_aniso( const ftype& s, const U_aniso_orth& u ) { s_ = s; u_ = Util::twopi2()*u; } template const T Compute_scale_u_aniso::operator()( const HKL_info::HKL_reference_index& ih, T data ) const { if ( !data.missing() ) data.scale( s_ * exp( u_.quad_form( ih.hkl().coord_reci_orth( ih.base_hkl_info().cell() ) ) ) ); return data; } template const F_sigF Compute_FsigF::operator()( const HKL_info::HKL_reference_index& ih, const T& fsigf ) const { clipper::datatypes::F_sigF fsigfnew; if ( !fsigf.missing() ) { fsigfnew.f() = fsigf.f(); fsigfnew.sigf() = fsigf.sigf(); } return fsigfnew; } // compile template types template class Compute_phifom_from_abcd; template class Compute_abcd_from_phifom; template class Compute_fphi_from_fsigf_phifom; template class Compute_EsigE_from_FsigF; template class Compute_mean_fsigf_from_fsigfano; template class Compute_diff_fsigf_from_fsigfano; template class Compute_neg_fphi; template class Compute_add_fphi; template class Compute_sub_fphi; template class Compute_add_abcd; template class Compute_scale_u_iso >; template class Compute_scale_u_iso >; template class Compute_scale_u_iso >; template class Compute_scale_u_iso >; template class Compute_scale_u_iso >; template class Compute_scale_u_aniso >; template class Compute_scale_u_aniso >; template class Compute_scale_u_aniso >; template class Compute_scale_u_aniso >; template class Compute_scale_u_aniso >; template class Compute_FsigF >; template class Compute_FsigF >; template class Compute_phifom_from_abcd; template class Compute_abcd_from_phifom; template class Compute_fphi_from_fsigf_phifom; template class Compute_EsigE_from_FsigF; template class Compute_mean_fsigf_from_fsigfano; template class Compute_diff_fsigf_from_fsigfano; template class Compute_neg_fphi; template class Compute_add_fphi; template class Compute_sub_fphi; template class Compute_add_abcd; template class Compute_scale_u_iso >; template class Compute_scale_u_iso >; template class Compute_scale_u_iso >; template class Compute_scale_u_iso >; template class Compute_scale_u_iso >; template class Compute_scale_u_aniso >; template class Compute_scale_u_aniso >; template class Compute_scale_u_aniso >; template class Compute_scale_u_aniso >; template class Compute_scale_u_aniso >; template class Compute_FsigF >; template class Compute_FsigF >; // DEPRECATED template class Compute_scale_u >; template class Compute_scale_u >; template class Compute_scale_u >; template class Compute_scale_u >; template class Compute_scale_u >; template class Compute_scale_u >; template class Compute_scale_u >; template class Compute_scale_u >; template class Compute_scale_u >; template class Compute_scale_u >; } // namespace datatypes } // namespace clipper clipper-2.1/clipper/core/symop.h0000644000374100011300000001335510363703537013651 00000000000000/*! \file lib/symop.h Fundamental types for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_SYMOP #define CLIPPER_SYMOP #include "clipper_types.h" namespace clipper { // forward definitions class Cell; class Grid; class RTop_orth; //! Fractional operator class. /*! This class is used for any RT-operator which operates on fractional coordinates. For a full list of methods, see clipper::RTop */ class RTop_frac : public RTop<> { public: //! null constructor inline RTop_frac() {} //! constructor: copy/convert inline explicit RTop_frac( const RTop<>& o ) : RTop<>( o ) {} //! constructor: from rotation inline explicit RTop_frac( const Mat33<>& r ) : RTop<>( r ) {} //! constructor: from string description explicit RTop_frac( const String& strop ); //! constructor: from rotation and translation inline RTop_frac( const Mat33<>& r, const Vec3<>& t ) : RTop<>( r, t ) {} //! fractional-orthogonal conversion RTop_orth rtop_orth( const Cell& cell ) const; //! inverse operator RTop_frac inverse() const; //! return identity operator static RTop_frac identity(); //! return null (uninitialised) operator static RTop_frac null(); }; //! Crystallographic symmetry operator /*! This is identical to a fractional RTop, but has its own class since not all fractional RTops are symops. For a full list of methods, see clipper::RTop and clipper::RTop_frac */ class Symop : public RTop_frac { public: //! null constructor inline Symop() {} //! constructor: RTop explicit Symop( const RTop<>& rt ); //! constructor: from 4x4 matrix explicit Symop( const ftype mat[4][4] ); //! return formatted String representation String format() const; }; //! Integerised symmetry matrix /*! This is used for optimised calculations in real and reciprocal space */ class Isymop : public RTop { public: //! null constructor inline Isymop() {} //! constructor: RTop inline explicit Isymop( const RTop& rt ) : RTop(rt) {} //! constructor Isymop( const Symop& symop, const Grid& grid ); }; //! Compressed encoded symmetry operator /*! This is a compresses representation of a crystallographic symmetry operator, stored as a single 32-bit integer. It may be converted to or from a symop or an int and compared, sorted, etc. The following guarantees are made concerning the code: - The identity operator has a code of zero. - Operators with non-identity rotations will have higher codes than operators with identity rotations, for the same translation. - Operators with non-zero translations will have higher codes than operators with zero translations, for the same rotation. */ class Symop_code { public: //! null constructor inline Symop_code() {} //! constructor: from int inline explicit Symop_code( const int& code ) : code_(code) {} //! constructor: from Symop explicit Symop_code( const Symop& op ); //! constructor: from Isymop explicit Symop_code( const Isymop& op ); //! initialiser: from Isymop void init( const Isymop& op ); Symop_code code_rot() const; //!< return code for rotation part Symop_code code_trn() const; //!< return code for translation part Symop symop() const; //!< convert to symop Isymop isymop() const; //!< convert to integerised symop static Symop_code identity() { return Symop_code(0); } //!< identity code //! convert to integer inline operator int() const { return code_; } private: int code_; }; } // namespace clipper #endif clipper-2.1/clipper/core/derivs.cpp0000644000374100011300000000441410363703537014325 00000000000000/* derivs.cpp: fundamental data types for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "derivs.h" namespace clipper { } // namespace clipper clipper-2.1/clipper/core/spacegroup.cpp0000644000374100011300000010067011252053545015175 00000000000000/* spacegroup.cpp: methods for spacegroup symmetry class */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "spacegroup.h" #include "coords.h" #include "clipper_instance.h" #include #include namespace clipper { namespace data { // matrices Mat33<> mat_i ( 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0 ); Mat33<> mat_inv (-1.0, 0.0, 0.0, 0.0,-1.0, 0.0, 0.0, 0.0,-1.0 ); Mat33<> mat_2z (-1.0, 0.0, 0.0, 0.0,-1.0, 0.0, 0.0, 0.0, 1.0 ); Mat33<> mat_3z ( 0.0,-1.0, 0.0, 1.0,-1.0, 0.0, 0.0, 0.0, 1.0 ); Mat33<> mat_4z ( 0.0,-1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ); Mat33<> mat_6z ( 1.0,-1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ); Mat33<> mat_2q ( 0.0,-1.0, 0.0,-1.0, 0.0, 0.0, 0.0, 0.0,-1.0 ); Mat33<> mat_2qq ( 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0,-1.0 ); Mat33<> mat_3abc( 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0 ); Vec3<> vec_0( 0.0, 0.0, 0.0 ); Vec3<> vec_a( 0.5, 0.0, 0.0 ); Vec3<> vec_b( 0.0, 0.5, 0.0 ); Vec3<> vec_c( 0.0, 0.0, 0.5 ); Vec3<> vec_n( 0.5, 0.5, 0.5 ); Vec3<> vec_u( 0.25, 0.0, 0.0 ); Vec3<> vec_v( 0.0, 0.25, 0.0 ); Vec3<> vec_w( 0.0, 0.0, 0.25 ); Vec3<> vec_d( 0.25, 0.25, 0.25 ); Vec3<> vec_A( 0.0, 0.5, 0.5 ); Vec3<> vec_B( 0.5, 0.0, 0.5 ); Vec3<> vec_C( 0.5, 0.5, 0.0 ); Vec3<> vec_I( 0.5, 0.5, 0.5 ); Vec3<> vec_R( 0.666667, 0.333333, 0.333333 ); Vec3<> vec_S( 0.333333, 0.666667, 0.333333 ); Vec3<> vec_T( 0.333333, 0.333333, 0.666667 ); Vec3<> vec_H( 0.666667, 0.333333, 0.0 ); Vec3<> vec_F1( 0.0, 0.5, 0.5 ); Vec3<> vec_F2( 0.5, 0.0, 0.5 ); } // namespace data // spacegroup description object void Spgr_descr::Symop_codes::init_hall( const String& symb ) { // interpret Hall symbol using namespace data; Symop_codes& ops = (*this); std::vector tokens; String token, sym, chb; char c, inv, lat; int i, j, k, l; // separate the Hall symbol from the change of basis tokens = symb.split("()"); if ( tokens.size() > 0 ) sym = tokens[0].trim(); if ( tokens.size() > 1 ) chb = tokens[1].trim(); // now separate the parts of the Hall symbol tokens = sym.split(" \t"); // first part: lattice and inversion inv = lat = ' '; token = tokens[0]; for ( j = 0; j < token.length(); j++ ) { c = toupper( token[j] ); if ( c == '-' ) inv = c; else lat = c; } // next 1-3 parts: generating matrices int nmat = tokens.size()-1; std::vector invop(nmat,' '), order(nmat,' '), screw(nmat,' '), axis1(nmat,' '), axis2(nmat,' '); std::vector trans(nmat); for ( i = 0; i < nmat; i++ ) { token = tokens[i+1]; for ( j = 0; j < token.length(); j++ ) { c = tolower( token[j] ); if ( c == '-' ) invop[i] = c; else if ( c >= '1' && c <= '6' ) if ( order[i] == ' ' ) order[i] = c; else screw[i] = c; else if ( c >= 'x' && c <= 'z' ) axis1[i] = c; else if ( c >= '"' && c <= '*' ) axis2[i] = c; else if ( c >= 'a' && c <= 'w' ) trans[i] += c; } } // now interpret all the default conventions // default first axis to z if ( nmat >= 1 ) { if ( axis1[0] == ' ' ) axis1[0] = 'z'; } // default second axis on basis of first if ( nmat >= 2 ) { if ( axis1[1] == ' ' ) { if ( order[1] == '2' ) { if ( order[0] == '2' || order[0] == '4' ) { if ( axis2[1] == ' ' ) axis1[1] = 'x'; } else if ( order[0] == '3' || order[0] == '6' ) { axis1[1] = axis1[0]; if ( axis2[1] == ' ' ) axis2[1] = '\''; } } else if ( order[1] == '3' ) { if ( order[0] == '2' || order[0] == '4' ) { if ( axis2[1] == ' ' ) axis2[1] = '*'; } } } } // default third axis (not much choice here) if ( nmat >= 3 ) { if ( axis1[2] == ' ' ) { if ( order[2] == '3' ) { if ( axis2[2] == ' ' ) axis2[2] = '*'; } } } // now check we have everything for ( i = 0; i < nmat; i++ ) { // add fake z axes for non-axis ops if ( axis1[i] == ' ' ) { if ( order[i] == '1' ) axis1[i] = 'z'; // fake axis if ( axis2[i] != ' ' ) axis1[i] = 'z'; // fake axis } // error messages if ( axis1[i] == ' ' ) Message::message( Message_fatal("Spacegroup: Missing x/y/z in Hall symb:"+tokens[i+1]) ); if ( order[i] == ' ' ) Message::message( Message_fatal("Spacegroup: Missing order in Hall symb:"+tokens[i+1]) ); } // add identity and inversion ops.clear(); ops.push_back( Symop_code::identity() ); if ( inv == '-' ) ops.push_back(Symop_code(Symop(RTop<>(mat_inv)))); // now make the generator matrices Mat33<> mat, matperm; Vec3<> vec; for ( i = 0; i < nmat; i++ ) { // make matrix part mat = mat_i; if ( order[i] == '2' && axis2[i] == ' ' ) mat = mat_2z; if ( order[i] == '2' && axis2[i] == '\'') mat = mat_2q; if ( order[i] == '2' && axis2[i] == '"' ) mat = mat_2qq; if ( order[i] == '3' && axis2[i] == ' ' ) mat = mat_3z; if ( order[i] == '3' && axis2[i] == '*' ) mat = mat_3abc; if ( order[i] == '4' && axis2[i] == ' ' ) mat = mat_4z; if ( order[i] == '6' && axis2[i] == ' ' ) mat = mat_6z; // inverse (improper) if ( invop[i] == '-' ) mat = mat_inv * mat; // axis permutation if ( axis1[i] == 'x' ) j = 0; else if ( axis1[i] == 'y' ) j = 1; else j = 2; for ( k = 0; k < 3; k++ ) for ( l = 0; l < 3; l++ ) matperm( k, l ) = mat( (k+2-j)%3, (l+2-j)%3 ); // make translation part vec = vec_0; for ( k = 0; k < trans[i].length(); k++ ) { if ( trans[i][k] == 'a' ) vec = vec + vec_a; else if ( trans[i][k] == 'b' ) vec = vec + vec_b; else if ( trans[i][k] == 'c' ) vec = vec + vec_c; else if ( trans[i][k] == 'n' ) vec = vec + vec_n; else if ( trans[i][k] == 'u' ) vec = vec + vec_u; else if ( trans[i][k] == 'v' ) vec = vec + vec_v; else if ( trans[i][k] == 'w' ) vec = vec + vec_w; else if ( trans[i][k] == 'd' ) vec = vec + vec_d; } // screw translation if ( screw[i] != ' ' ) vec[j] += ftype( screw[i] - '0' ) / ftype( order[i] - '0' ); // store the matrix ops.push_back( Symop_code( Symop( RTop<>( matperm, vec ) ) ) ); } // add lattice centering if (lat=='A') ops.push_back(Symop_code(Symop(RTop<>(mat_i,vec_A)))); if (lat=='B') ops.push_back(Symop_code(Symop(RTop<>(mat_i,vec_B)))); if (lat=='C') ops.push_back(Symop_code(Symop(RTop<>(mat_i,vec_C)))); if (lat=='I') ops.push_back(Symop_code(Symop(RTop<>(mat_i,vec_I)))); if (lat=='R') ops.push_back(Symop_code(Symop(RTop<>(mat_i,vec_R)))); if (lat=='S') ops.push_back(Symop_code(Symop(RTop<>(mat_i,vec_S)))); if (lat=='T') ops.push_back(Symop_code(Symop(RTop<>(mat_i,vec_T)))); if (lat=='H') ops.push_back(Symop_code(Symop(RTop<>(mat_i,vec_H)))); if (lat=='Q') ops.push_back(Symop_code(Symop(RTop<>(mat_i,vec_S)))); if (lat=='F') { ops.push_back(Symop_code(Symop(RTop<>(mat_i,vec_F1)))); ops.push_back(Symop_code(Symop(RTop<>(mat_i,vec_F2)))); } // apply the change of basis operator RTop_frac cbop( RTop_frac::identity() ); if ( chb.find( ',' ) != String::npos ) { cbop = RTop_frac( chb ); } else { std::vector t = chb.split(" "); for ( i = 0; i < Util::min( int(t.size()), 3 ); i++ ) cbop.trn()[i] = ftype( t[i].i() ) / 12.0; } RTop_frac cbopi( cbop.inverse() ); for ( i = 0; i < ops.size(); i++ ) ops[i] = Symop_code( Symop( cbop*ops[i].symop()*cbopi ) ); } void Spgr_descr::Symop_codes::init_symops( const String& symb ) { Symop_codes& ops = (*this); std::vector symops = symb.split(";"); for ( int i = 0; i < symops.size(); i++ ) ops.push_back( Symop_code( Symop( RTop_frac( symops[i] ) ) ) ); } Spgr_descr::Symop_codes Spgr_descr::Symop_codes::expand() const { int i, j, l, size; Symop_code k; const Symop_codes& generators = (*this); Symop_codes ops; ops.push_back( Symop_code::identity() ); // identity is compulsory // generate all the symops do { size = ops.size(); for ( i = 0; i < generators.size(); i++ ) if ( generators[i] != Symop_code::identity() ) { for ( j = 0; j < size; j++ ) { k = Symop_code( Isymop( generators[i].isymop() * ops[j].isymop() ) ); for ( l = 0; l < ops.size(); l++ ) if ( ops[l] == k ) break; if ( l == ops.size() ) ops.push_back( k ); } } } while ( ops.size() > size ); return ops; } Spgr_descr::Symop_codes Spgr_descr::Symop_codes::primitive_noninversion_ops() const { Symop_codes pops = primitive_ops(); if ( inversion_ops().size() > 1 ) { Symop_codes nops; for ( int i = 0; i < pops.size(); i++ ) if ( pops[i].symop().rot().det() > 0.0 ) nops.push_back( pops[i] ); pops = nops; } return pops; } Spgr_descr::Symop_codes Spgr_descr::Symop_codes::inversion_ops() const { const Symop_codes& ops = (*this); Symop_codes pops; Symop_code invop = Symop_code( Symop( RTop<>( data::mat_inv ) ) ); pops.push_back( Symop_code::identity() ); int i; for ( i = 0; i < ops.size(); i++ ) if ( ops[i].code_rot() == invop ) { pops.push_back( ops[i] ); break; } return pops; } Spgr_descr::Symop_codes Spgr_descr::Symop_codes::primitive_ops() const { const Symop_codes& ops = (*this); Symop_codes pops; int i, j; pops.push_back( Symop_code::identity() ); for ( i = 0; i < ops.size(); i++ ) { for ( j = 0; j < pops.size(); j++ ) if ( ops[i].code_rot() == pops[j].code_rot() ) break; if ( j == pops.size() ) pops.push_back( ops[i] ); } return pops; } Spgr_descr::Symop_codes Spgr_descr::Symop_codes::centering_ops() const { const Symop_codes& ops = (*this); Symop_codes cops; for ( int i = 0; i < ops.size(); i++ ) if ( ops[i].code_rot() == Symop_code::identity() ) cops.push_back( ops[i] ); return cops; } Spgr_descr::Symop_codes Spgr_descr::Symop_codes::laue_ops() const { const Symop_codes& ops = (*this); Symop_codes lops; lops.push_back( Symop_code( Symop( RTop<>( data::mat_inv ) ) ) ); for ( int i = 0; i < ops.size(); i++ ) lops.push_back( ops[i].code_rot() ); return lops.expand(); } Spgr_descr::Symop_codes Spgr_descr::Symop_codes::pgrp_ops() const { const Symop_codes& ops = (*this); Symop_codes lops; for ( int i = 0; i < ops.size(); i++ ) lops.push_back( ops[i].code_rot() ); return lops.expand(); } Spgr_descr::Symop_codes Spgr_descr::Symop_codes::patterson_ops() const { const Symop_codes& ops = (*this); Symop_codes lops; lops.push_back( Symop_code( Symop( RTop<>( data::mat_inv ) ) ) ); for ( int i = 0; i < ops.size(); i++ ) if ( ops[i].code_rot() == Symop_code::identity() ) lops.push_back( ops[i] ); else lops.push_back( ops[i].code_rot() ); return lops.expand(); } Spgr_descr::Symop_codes Spgr_descr::Symop_codes::generator_ops() const { Symop_codes ops = expand(); std::sort( ops.begin(), ops.end() ); Symop_codes cens = ops.centering_ops(); Symop_codes prms = ops.primitive_ops(); Symop_codes gens; Symop_codes gend = gens.expand(); // first make the centering generators for ( int i = 1; i < cens.size(); i++ ) { for ( int j = 0; j < gend.size(); j++ ) if ( cens[i] == gend[j] ) goto skip1; gens.push_back( cens[i] ); gend = gens.expand(); if ( gend.size() == cens.size() ) break; // optional optimisation skip1:; } int ncen = gens.size(); // now add the rest of the generators for ( int i = 1; i < prms.size(); i++ ) { for ( int j = 0; j < gend.size(); j++ ) if ( prms[i] == gend[j] ) goto skip2; gens.push_back( prms[i] ); gend = gens.expand(); if ( gend.size() == ops.size() ) break; // optional optimisation skip2:; } back: // finally remove any redundent ops for ( int i = ncen; i < gens.size(); i++ ) { Symop_codes genp = gens; genp.erase( genp.begin() + i ); if ( genp.expand().size() == ops.size() ) { gens = genp; goto back; } } return gens; // return result } Spgr_descr::Symop_codes Spgr_descr::Symop_codes::product( const Symop_codes& ops2 ) const { Symop_codes ops1 = (*this); // copy first list, implying identity int i, j, n1, n2; n1 = ops1.size(); n2 = ops2.size(); for ( j = 0; j < n2; j++ ) if ( ops2[j] != Symop_code::identity() ) // skip identity, if present for ( i = 0; i < n1; i++ ) ops1.push_back(Symop_code(Isymop(ops1[i].isymop()*ops2[j].isymop()))); return ops1; } unsigned int Spgr_descr::Symop_codes::hash() const { Symop_codes data = expand(); std::sort( data.begin(), data.end() ); unsigned int polynomial = 0x04c11db7; unsigned int remainder = 0xffffffff; unsigned int datum; for ( int word = 0; word < data.size(); word++ ) { datum = data[word]; remainder ^= datum; for ( int bit = 0; bit < 32; bit++ ) { if ( remainder & 0x80000000 ) remainder = (remainder << 1) ^ polynomial; else remainder = (remainder << 1); } } return remainder; } // Spacegroup desciption object char Spgr_descr::pref_12 = '1'; char Spgr_descr::pref_hr = 'H'; /*! Construct a null description spacegroup. The result is initialised to an invalid spacegroup code. */ Spgr_descr::Spgr_descr() { hash_ = 0; } /*! Construct a spacegroup description from a text description, i.e. a symbol or operators. This may be one of the following: - Hall symbol, e.g. " P 2ac 2ab" - H-M symbol, e.g. "P 21 21 21" - Number, e.g. "19" - List of symmetry operators separated by semicolons, e.g. "x,y,z;-x+1/2,-y,z+1/2;x+1/2,-y+1/2,-z;-x,y+1/2,-z+1/2" It is best to specify the type of symbol being used, however if this parameter is omitted a guess will be made. Unfortunately, Hall and H-M symbols may be ambiguous. Any ambiguity may be removed by appending parentheses "()" to the end of the Hall symbol, otherwise the symbol will be interpreted as an H-M symbol, and a Hall symbol if that fails. H-M symbols and spacegroup numbers may correspond to 2 different entries in international tables. The choice between 2 origin settings or hexagonal/rhomohedral settings is made using the set_preferred() method. \param name The spacegroup symbol or operators. \param type The type of symbol: Spacegroup::Symops, Spacegroup::Hall, Spacegroup::HM, Spacegroup::XHM, Spacegroup::Number */ Spgr_descr::Spgr_descr( const String& symb, TYPE type ) { using clipper::data::sgdata; String symbx = symb.trim(); // try and guess symbol type (don't do this!) if ( type == Unknown ) { if ( symbx.find_first_of( "()" ) != String::npos ) type = Hall; else if ( symbx.find_first_of( ":" ) != String::npos ) type = XHM; else if ( symbx.find_first_of( "," ) != String::npos ) type = Symops; else if ( symbx.find_first_of( "ABCFHIPRSTQ" ) == String::npos ) type = Number; // otherwise still unknown: try HM then Hall. } // now make the ops int i; Symop_codes ops; if ( type == Symops ) { ops.init_symops( symbx ); } else if ( type == Hall ) { ops.init_hall( symbx ); } else if ( type == XHM ) { char ext = ' '; int c = symbx.find_first_of( ":" ); if ( c != String::npos ) { if ( c+1 < symbx.length() ) ext = symbx[c+1]; symbx = symbx.substr(0,c); symbx = symbx.trim(); } for ( i = 0; i < data::sgdata_size; i++ ) if ( symbx == String( sgdata[i].hm ) && sgdata[i].ext == ext ) break; if ( i == data::sgdata_size ) Message::message( Message_fatal( "Spgr_descr: No such HM symbol" ) ); ops.init_hall( String( sgdata[i].hall ) ); } else if ( type == HM ) { for ( i = 0; i < data::sgdata_size; i++ ) if ( symbx == String( sgdata[i].hm ) && ( sgdata[i].ext == pref_12 || sgdata[i].ext == pref_hr || sgdata[i].ext == ' ' ) ) break; if ( i == data::sgdata_size ) Message::message( Message_fatal( "Spgr_descr: No such HM symbol" ) ); ops.init_hall( String( sgdata[i].hall ) ); } else if ( type == Number ) { int num = symbx.i(); for ( i = 0; i < data::sgdata_size; i++ ) if ( num == sgdata[i].num && ( sgdata[i].ext == pref_12 || sgdata[i].ext == pref_hr || sgdata[i].ext == ' ' ) ) break; if ( i == data::sgdata_size ) Message::message( Message_fatal( "Spgr_descr: No such SG number" ) ); ops.init_hall( String( sgdata[i].hall ) ); } else { for ( i = 0; i < data::sgdata_size; i++ ) // try H-M then Hall. if ( symbx == String( sgdata[i].hm ) && ( sgdata[i].ext == pref_12 || sgdata[i].ext == pref_hr || sgdata[i].ext == ' ' ) ) break; if ( i != data::sgdata_size ) ops.init_hall( String( sgdata[i].hall ) ); else ops.init_hall( symbx ); } // store the hash and generators hash_ = ops.hash(); generators_ = ops.generator_ops(); } /*! See previous constuctor. \param num The spacegroup number. */ Spgr_descr::Spgr_descr( const int& num ) { using data::sgdata; Symop_codes ops; int i; for ( i = 0; i < data::sgdata_size; i++ ) if ( num == sgdata[i].num && ( sgdata[i].ext == pref_12 || sgdata[i].ext == pref_hr || sgdata[i].ext == ' ' ) ) break; if ( i == data::sgdata_size ) Message::message( Message_fatal( "Spgr_descr: No such SG number" ) ); ops.init_hall( String( sgdata[i].hall ) ); ops = ops.expand(); // store the hash and generators hash_ = ops.hash(); generators_ = ops.generator_ops(); } /*! This is not normally used, except in conjunction with Spgr_desc::generator_ops() to derive one group from another. */ Spgr_descr::Spgr_descr( const Symop_codes& ops ) { // store the hash and generators hash_ = ops.hash(); generators_ = ops.generator_ops(); } /*! The spacegroup number is only available if the spacegroup exists in the internal table, see Hall & Grosse-Kunstleve. \return The spacegroup number, or 0 if unavailable. */ int Spgr_descr::spacegroup_number() const { for ( int i = 0; i < data::sgdata_size; i++ ) if ( data::sgdata[i].sghash == hash_ ) return data::sgdata[i].num; return 0; } /*! The Hall symbol is only available if the spacegroup exists in the internal table, see Hall & Grosse-Kunstleve. \return The Hall symbol, or "Unknown" if unavailable. */ String Spgr_descr::symbol_hall() const { for ( int i = 0; i < data::sgdata_size; i++ ) if ( data::sgdata[i].sghash == hash_ ) return String(data::sgdata[i].hall); return "Unknown"; } /*! The H-M symbol is only available if the spacegroup exists in the internal table, see Hall & Grosse-Kunstleve. \return The H-M symbol, or "Unknown" if unavailable. */ String Spgr_descr::symbol_hm() const { for ( int i = 0; i < data::sgdata_size; i++ ) if ( data::sgdata[i].sghash == hash_ ) return String(data::sgdata[i].hm); return "Unknown"; } /*! The extended H-M symbol is only available if the spacegroup exists in the internal table, see Hall & Grosse-Kunstleve. \return The extended H-M symbol, or "Unknown" if unavailable. */ String Spgr_descr::symbol_xhm() const { for ( int i = 0; i < data::sgdata_size; i++ ) if ( data::sgdata[i].sghash == hash_ ) { String xhm( data::sgdata[i].hm ); if ( data::sgdata[i].ext != ' ' ) xhm = xhm + " :" + data::sgdata[i].ext; return xhm; } return "Unknown"; } /*! The extension H-M symbol is only available if the spacegroup exists in the internal table, see Hall & Grosse-Kunstleve. \return The extension H-M symbol, or "" */ String Spgr_descr::symbol_hm_ext() const { String ext = ""; for ( int i = 0; i < data::sgdata_size; i++ ) if ( data::sgdata[i].sghash == hash_ ) if ( data::sgdata[i].ext != ' ' ) return ext + data::sgdata[i].ext; return ext; } /*! Sets the preferred origin or setting for initialising all Spgr_descr objects using H-M symbols or Spacegroup numbers. cctbx uses origin choice '1' by default, CCP4 uses '2'. Both packages use 'H' in preference to 'R'. Preferred values are stored for both. Defaults are '1' and 'H'. CCP4 users may wish to add the following before using H-M codes or numbers. \code Spgr_descr::set_preferred('2'); \endcode \param c Either '1' or '2', 'H' or 'R'. */ void Spgr_descr::set_preferred( const char& c ) { if ( c == '1' || c == '2' ) pref_12 = c; if ( c == 'H' || c == 'R' ) pref_hr = c; } // Spacegroup cache object Mutex Spgr_cacheobj::mutex = Mutex(); struct Compare_grid{ bool operator() ( const Vec3<>& c1, const Vec3<>& c2 ) const { return (c1[0]*c1[1]*c1[2]+0.001*c1[1]+0.00001*c1[0]) <= (c2[0]*c2[1]*c2[ 2]+0.001*c2[1]+0.00001*c2[0]); } }; bool reci_asu( const Spgr_descr::Symop_codes& ops, data::ASUfn asufn ) { HKL hkl, equ; int i; // make integerised symops std::vector symops( ops.size() ); for ( i = 0; i < ops.size(); i++ ) symops[i] = ops[i].isymop(); // now test asu for uniqueness and completeness for ( hkl.h() = -2; hkl.h() <= 2; hkl.h()++ ) for ( hkl.k() = -2; hkl.k() <= 2; hkl.k()++ ) for ( hkl.l() = -2; hkl.l() <= 2; hkl.l()++ ) { if ( asufn( hkl.h(), hkl.k(), hkl.l() ) ) { for ( i = 0; i < symops.size(); i++ ) { equ = hkl.transform( symops[i] ); if ( equ != hkl && asufn(equ.h(),equ.k(),equ.l()) ) break; equ = -equ; if ( equ != hkl && asufn(equ.h(),equ.k(),equ.l()) ) break; } if ( i != symops.size() ) return false; } else { for ( i = 0; i < symops.size(); i++ ) { equ = hkl.transform( symops[i] ); if ( asufn(equ.h(),equ.k(),equ.l()) ) break; equ = -equ; if ( asufn(equ.h(),equ.k(),equ.l()) ) break; } if ( i == symops.size() ) return false; } } return true; } Vec3<> real_asu( const Spgr_descr::Symop_codes& ops ) { int i, j, sym, nasu; // make integerised symops std::vector symops( ops.size() ); for ( i = 0; i < ops.size(); i++ ) symops[i] = ops[i].isymop(); // classify each grid point by a unique 'ASU number' Coord_grid c; Grid_sampling cgrid(24,24,24); int symmap[13824], tstmap[13824]; for ( i = 0; i < cgrid.size(); i++ ) symmap[i] = -1; nasu = 0; for ( c = Coord_grid(0,0,0); !c.last(cgrid); c.next(cgrid) ) { i = c.index(cgrid); if ( symmap[i] == -1 ) { for ( sym = 0; sym < symops.size(); sym++ ) symmap[ c.transform(symops[sym]).unit(cgrid).index(cgrid) ] = nasu; nasu++; } } // identify trigonal/hexagonal groups bool trighex = false; for ( sym = 0; sym < symops.size(); sym++ ) for ( i = 0; i < 3; i++ ) { int c = 0, r = 0; // trigonal if any row/col adds to 2 for ( j = 0; j < 3; j++ ) { c += abs( symops[sym].rot()(i,j) ); r += abs( symops[sym].rot()(j,i) ); trighex = trighex || ( c == 2 ) || ( r == 2 ); } } // now set search ASU search grid, dependent on symmetry std::vector gridlim; const ftype d = 0.0001; if ( trighex ) { ftype lim[] = { 1./12-d, 1./6-d, 1./6+d, 1./3-d, 1./3+d, 1./2-d, 1./2+d, 2./3+d, 1.-d }; gridlim = std::vector( &lim[0], &lim[ sizeof(lim)/sizeof(ftype) ] ); } else { ftype lim[] = { 1./8+d, 1./4-d, 1./4+d, 1./2-d, 1./2+d, 1.-d }; gridlim = std::vector( &lim[0], &lim[ sizeof(lim)/sizeof(ftype) ] ); } // make a sorted list of grids std::vector > grids; for ( int gui = 0; gui < gridlim.size(); gui++ ) for ( int gvi = 0; gvi < gridlim.size(); gvi++ ) for ( int gwi = 0; gwi < gridlim.size(); gwi++ ) grids.push_back( Vec3<>(gridlim[gui],gridlim[gvi],gridlim[gwi]) ); std::sort( grids.begin(), grids.end(), Compare_grid() ); // now find smallest viable grid for ( j = 0; j < grids.size(); j++ ) { Grid mgrid = Grid( Util::intc(grids[j][0]*cgrid.nu()), Util::intc(grids[j][1]*cgrid.nv()), Util::intc(grids[j][2]*cgrid.nw()) ); if ( mgrid.size() >= nasu ) { // is grid big enough to be ASU? for ( i = 0; i < nasu; i++ ) tstmap[i] = 0; // if so, check for all pts for ( c = Coord_grid(0,0,0); !c.last(mgrid); c.next(mgrid) ) tstmap[ symmap[ c.index(cgrid) ] ] = 1; for ( i = 0; i < nasu; i++ ) if ( tstmap[i] == 0 ) break; if ( i == nasu ) break; // found a full asu, so we're done } } return grids[j]; } Spgr_cacheobj::Spgr_cacheobj( const Key& spgr_cachekey ) { spgr_cachekey_ = spgr_cachekey; // tidy the ops Spgr_descr::Symop_codes ops = spgr_cachekey.generator_ops().expand(); std::sort( ops.begin(), ops.end() ); Spgr_descr::Symop_codes pops = ops.primitive_noninversion_ops(); Spgr_descr::Symop_codes iops = ops.inversion_ops(); Spgr_descr::Symop_codes cops = ops.centering_ops(); std::sort( pops.begin(), pops.end() ); std::sort( iops.begin(), iops.end() ); std::sort( cops.begin(), cops.end() ); ops = pops; ops = ops.product( iops ); ops = ops.product( cops ); nsym = ops.size(); nsymn = pops.size(); nsymi = iops.size(); nsymc = cops.size(); nsymp = nsymn*nsymi; // consistency check (redundent) if ( ops.hash() != spgr_cachekey.hash() ) Message::message( Message_fatal( "Spgr_cacheobj: symops fail" ) ); // Laue group unsigned int lghash = ops.laue_ops().hash(); // first guess from the hash for ( lgrp = 0; lgrp < data::lgdata_size; lgrp++ ) if ( data::lgdata[lgrp].lghash == lghash ) break; if ( lgrp == data::lgdata_size ) lgrp = 0; // if that fails, try all the ASU functions if ( !reci_asu( pops, data::lgdata[lgrp].asufn ) ) { std::ostringstream s; s << "Spacegroup_registry: ASU warning, LGhash=0x"; s.width( 8 ); s.fill( '0' ); s.flags( s.hex | s.right ); s << lghash; Message::message( Message_warn( s.str() ) ); for ( lgrp = 0; lgrp < data::lgdata_size; lgrp++ ) if ( reci_asu( pops, data::lgdata[lgrp].asufn ) ) break; if ( lgrp == data::lgdata_size ) Message::message( Message_fatal( "Spacegroup_registry: ASU fail" ) ); } // real ASU asu_min_ = Vec3<>( -0.0001, -0.0001, -0.0001 ); asu_max_ = real_asu( ops ); // now make real symop lists for ( int i = 0; i < ops.size(); i++ ) { symops.push_back( ops[i].symop() ); isymops.push_back( ops[i].isymop() ); } } bool Spgr_cacheobj::matches( const Key& spgr_cachekey ) const { return spgr_cachekey_.hash() == spgr_cachekey.hash(); } String Spgr_cacheobj::format() const { return spgr_cachekey_.symbol_hall(); } // spacegroup object /*! Construct null or P1 spacegroup. This is faster than the normal constructor. \param type Spacegroup::Null or Spacegroup::P1 */ Spacegroup::Spacegroup( TYPE type ) { if ( type == P1 ) init( Spgr_descr( "x,y,z", Spgr_descr::Symops ) ); } /*! Construct a spacegroup and initialise with a spacegroup description. \param spgr_descr The spacegroup description. */ Spacegroup::Spacegroup( const Spgr_descr& spgr_descr ) { init( spgr_descr ); } /*! Initialise the spacegroup. \param spgr_descr The spacegroup description. */ void Spacegroup::init( const Spgr_descr& spgr_descr ) { // init spgr descr hash_ = spgr_descr.hash(); generators_ = spgr_descr.generator_ops(); // init cache entry cacheref = ClipperInstantiator::instance().spacegroup_cache().cache( spgr_descr ); symops = &(cacheref.data().symops[0]); isymops = &(cacheref.data().isymops[0]); nsym = cacheref.data().nsym; nsymn = cacheref.data().nsymn; nsymi = cacheref.data().nsymi; nsymc = cacheref.data().nsymc; nsymp = cacheref.data().nsymp; asufn = data::lgdata[cacheref.data().lgrp].asufn; } /*! \return true if the object has not been initalised. */ bool Spacegroup::is_null() const { return cacheref.is_null(); } /*! The number of rotational operators parallel to the specified axis is returned. \param axis The axis, A, B or C. \return The order of the axis. */ int Spacegroup::order_of_symmetry_about_axis( const AXIS axis ) const { int n = 0; int a0 = int( axis ); int a1 = (a0+1)%3; int a2 = (a0+2)%3; for ( int i = 0; i < nsymp; i++ ) if ( symops[i].rot().det() > 0.0 ) if ( fabs( symops[i].rot()(a0,a1) ) + fabs( symops[i].rot()(a1,a0) ) + fabs( symops[i].rot()(a0,a2) ) + fabs( symops[i].rot()(a2,a0) ) + fabs( symops[i].rot()(a0,a0) - 1.0 ) < 1.0e-6 ) n++; return n; } /*! The reflection class describes the type of a reflection in a given spacegroup, including centricity, systematic absence, phase restriction, and multiplicity. This is a shortcut to constructing an HKL_class from the spacegroup and HKL. \param hkl The reflection HKL */ HKL_class Spacegroup::hkl_class( const HKL& hkl ) const { return HKL_class( *this, hkl ); } /*! The reciprocal ASU is chosen from one of 47 optimised functions. \param hkl The HKL to test. \return true if the HKL is in the ASU. */ bool Spacegroup::recip_asu( const HKL& hkl ) const { return asufn( hkl.h(), hkl.k(), hkl.l() ); } int Spacegroup::product_op( const int& s1, int& s2 ) const { Symop mat( symops[s1] * symops[s2] ); for ( int s3 = 0; s3 < nsym; s3++ ) if ( mat.equals( symops[s3], 0.001 ) ) return s3; Message::message( Message_fatal("Spacegroup: Internal spacegroup error - missing product") ); return -1; } int Spacegroup::inverse_op( const int& s1 ) const { for ( int s2 = 0; s2 < nsym; s2++ ) if ( symops[0].equals( symops[s1] * symops[s2], 0.001 ) ) return s2; Message::message( Message_fatal("Spacegroup: Internal spacegroup error - missing inverse") ); return -1; } /*! The map ASU is an oblong which contains at least one assymetric unit. It is guaranteed to be contained withing the unit box. The lower limit is always 0,0,0. \return Fractional coordinate of the upper bound of the ASU. */ Coord_frac Spacegroup::asu_max() const { return Coord_frac( cacheref.data().asu_max_ ); } /*! The map ASU is an oblong which contains at least one assymetric unit. It is guaranteed to be contained withing the unit box. The lower limit is always 0,0,0. \return Fractional coordinate of the lower bound of the ASU. */ Coord_frac Spacegroup::asu_min() const { return Coord_frac( cacheref.data().asu_min_ ); } /*! Test if hand-change is possible. \return true if a change of hand preserves the spacegroup. */ bool Spacegroup::invariant_under_change_of_hand() const { for ( int k=0; k(); for ( int i = 0; i < num_reflections(); i++ ) { hkl_class_lookup[i] = spacegroup_.hkl_class( hkl_of( i ) ); invresolsq_lookup[i] = hkl_of( i ).invresolsq( cell_ ); invresolsq_range_.include( invresolsq_lookup[i] ); } } // public methods: // constructors/destructor HKL_info::HKL_info() { Message::message( message_ctor_hkl_info ); } /*! Construct and initialise HKL_info object. This updates the spacegroup and cell and clears the reflection list. The resolution is used as a rejection criterion for reflections - no HKL will be stored beyond the given limit. Initially there are no reflections in the reflection list: see generate_hkl_list(). If any of the parameters have null values, the existing values will be unchanged. The object will only be fully initialised once all parameters are available. \param spacegroup The spacegroup. \param cell The unit cell. \param resolution The resolution limit. */ HKL_info::HKL_info( const Spacegroup& spacegroup, const Cell& cell, const Resolution& resolution, const bool& generate ) { init( spacegroup, cell, resolution, generate ); Message::message( message_ctor_hkl_info ); } /*! Initialise the HKL_info object. This updates the spacegroup and cell and clears the reflection list. The resolution is used as a rejection criterion for reflections - no HKL will be stored beyond the given limit. Initially there are no reflections in the reflection list: see generate_hkl_list(). If any of the parameters have null values, the existing values will be unchanged. The object will only be fully initialised once all parameters are available. \param spacegroup The spacegroup. \param cell The unit cell. \param resolution The resolution limit. \param generate If true, a reflection list will be generated for an ASU. */ void HKL_info::init( const Spacegroup& spacegroup, const Cell& cell, const Resolution& resolution, const bool& generate ) { // set spacegroup and cell spacegroup_ = spacegroup; cell_ = cell; resolution_ = resolution; // check parameters if ( is_null() ) return; // Create the intergised symops (grid irrelevent) Grid g( 24, 24, 24 ); isymop.resize( spacegroup_.num_symops() ); for ( int sym = 0; sym < spacegroup_.num_symops(); sym++ ) isymop[sym] = Isymop( spacegroup_.symop(sym), g ); // reflection lists hkl.clear(); if ( generate ) generate_hkl_list(); update_hkl_list(); } /*! Initialise the HKL_info object. This updates the spacegroup and cell and clears the reflection list. The HKL_sampling determines the reflection list. If any of the parameters have null values, the existing values will be unchanged. The object will only be fully initialised once all parameters are available. \param spacegroup The spacegroup. \param cell The unit cell. \param hkl_sampling The resolution limit. \param generate If true, a reflection list will be generated for an ASU. */ void HKL_info::init( const Spacegroup& spacegroup, const Cell& cell, const HKL_sampling& hkl_sampling, const bool& generate ) { // set spacegroup and cell spacegroup_ = spacegroup; cell_ = cell; hkl_sampling_ = hkl_sampling; // check parameters if ( spacegroup_.is_null() || cell_.is_null() || hkl_sampling_.is_null() ) return; // estimate resolution resolution_ = hkl_sampling.resolution( cell ); // Create the intergised symops (grid irrelevent) Grid g( 24, 24, 24 ); isymop.resize( spacegroup_.num_symops() ); for ( int sym = 0; sym < spacegroup_.num_symops(); sym++ ) isymop[sym] = Isymop( spacegroup_.symop(sym), g ); // reflection lists hkl.clear(); if ( generate ) { std::vector add; // make a reflection list for the given refln sampling HKL lim = hkl_sampling.hkl_limit(); HKL rfl; // make a list of valid reflections for (rfl.h()=-lim.h(); rfl.h()<=lim.h(); rfl.h()++) for (rfl.k()=-lim.k(); rfl.k()<=lim.k(); rfl.k()++) for (rfl.l()=-lim.l(); rfl.l()<=lim.l(); rfl.l()++) if ( spacegroup_.recip_asu(rfl) && hkl_sampling.in_resolution( rfl ) && !( spacegroup_.hkl_class(rfl).sys_abs() ) ) add.push_back(rfl); // update the reflection data lists add_hkl_list( add ); } update_hkl_list(); } /*! \return true if the object has not been initalised. */ bool HKL_info::is_null() const { return ( spacegroup_.is_null() || cell_.is_null() || resolution_.is_null() ); } /*! Using current cell, spacegroup, resolution. */ void HKL_info::generate_hkl_list() { std::vector add; // make a reflection list for the given cell, symm and resolution /* TO MAKE A BOX TO HOLD A SPHERE IN REAL OR RECIPROCAL SPACE In reciprocal space, use the real space cell dimension / resolution In real space, use the recip space dimension * radius */ HKL rfl; int hmax = int(cell_.descr().a()/resolution_.limit()); int kmax = int(cell_.descr().b()/resolution_.limit()); int lmax = int(cell_.descr().c()/resolution_.limit()); ftype s_lim = resolution_.invresolsq_limit(); // make a list of valid reflections for (rfl.h()=-hmax; rfl.h()<=hmax; rfl.h()++) for (rfl.k()=-kmax; rfl.k()<=kmax; rfl.k()++) for (rfl.l()=-lmax; rfl.l()<=lmax; rfl.l()++) if ( spacegroup_.recip_asu(rfl) && rfl.invresolsq(cell_) < s_lim && !( spacegroup_.hkl_class(rfl).sys_abs() ) ) add.push_back(rfl); // update the reflection data lists hkl.clear(); add_hkl_list( add ); } /*! The new HKLs are transformed to the default reciprocal ASU, and added to the reflection list. Duplicates and reflections outside the resoluution limit are ignored. Then the fast lookup tables for HKL, invresolsq, and reflection class are rebuilt. \param add The list of new reflections to add. */ void HKL_info::add_hkl_list( const std::vector& add ) { HKL equiv; int sym; bool friedel; for ( int i = 0; i < add.size(); i++ ) { if ( add[i].invresolsq( cell_ ) <= resolution_.invresolsq_limit() ) { equiv = find_sym( add[i], sym, friedel ); if ( lookup.index_of( equiv ) < 0 ) hkl.push_back( equiv ); } } update_hkl_list(); } /*! Returns the index of the reflection, the sym no. and Friedel flag. \internal */ HKL HKL_info::find_sym( const HKL& rfl, int& sym, bool& friedel ) const { // find the symmetry operator mapping hkl into the reflection // list and determine the friedel flag HKL equiv; // now find the symop which gives a reflection from the list for (sym = 0; sym < spacegroup_.num_primops(); sym++) { equiv = rfl.transform(isymop[sym]); if ( spacegroup_.recip_asu(equiv) ) { friedel = false; return equiv; } equiv = -equiv; if ( spacegroup_.recip_asu(equiv) ) { friedel = true ; return equiv; } } Message::message( message_recip_asu_error ); return equiv; } void HKL_info::debug() const { std::cout << "Num reflns " << hkl.size() << "\n"; } } // namespace clipper clipper-2.1/clipper/core/clipper_precision.h0000644000374100011300000000526110363703537016210 00000000000000/*! \file lib/clipper_precision.h Header file for clipper precision */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_PRECISION #define CLIPPER_PRECISION namespace clipper { typedef float ftype32; typedef double ftype64; //! ftype definition for floating point representation /*! This type is used for all floating point values except data. The whole package could be templatised on ftype. However for now it is typedef'ed */ typedef ftype64 ftype; //! xtype definition for import/export of data typedef ftype64 xtype; } // namespace clipper #endif clipper-2.1/clipper/core/fftmap.cpp0000644000374100011300000004051710736415736014317 00000000000000/* fftmap.cpp: implementation file for P1 fft map */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "fftmap.h" #include "hkl_datatypes.h" #include #include namespace clipper { Message_fatal message_fftmap_get_real_space_error( "FFTmap: get_real_data in reciprocal space" ); Message_fatal message_fftmap_set_real_space_error( "FFTmap: set_real_data in reciprocal space" ); Message_fatal message_fftmap_get_reci_space_error( "FFTmap: get_recip_data in real space" ); Message_fatal message_fftmap_set_reci_space_error( "FFTmap: set_recip_data in real space" ); Message_ctor message_ctor_fftmap( " [FFTmap: constructed]" ); FFTmap_base::FFTtype FFTmap_p1::default_type_ = FFTmap_base::Estimate; Mutex FFTmap_base::mutex = Mutex(); /*! For later initialisation: see init() */ FFTmap_p1::FFTmap_p1() {} /*! Construct an FFTmap_p1 for a given spacegroup, cell, and grid. The map values are initialised to zero. The FFTmap_p1 is initially in neither real nor reciprocal spce, however as soon as one of the 'set' methods is called, it will be defined as in either real or reciprocal space until the next fft. \param grid_sam The grid sampling of the unit cell. \param type Can be FFTmap_p1::Measure, FFTmap_p1::Estimate. Measure performs slow precalculation (first time only) to get faster FFT. */ FFTmap_p1::FFTmap_p1( const Grid_sampling& grid_sam, const FFTtype type ) { init( grid_sam, type ); } /*! Initialise an FFTmap_p1 for a given spacegroup, cell, and grid. The map values are initialised to zero. The FFTmap_p1 is initially in neither real nor reciprocal spce, however as soon as one of the 'set' methods is called, it will be defined as in either real or reciprocal space until the next fft. \param grid_sam The grid sampling of the unit cell. \param type Can be FFTmap_p1::Measure, FFTmap_p1::Estimate. Measure performs slow precalculation (first time only) to get faster FFT. */ void FFTmap_p1::init( const Grid_sampling& grid_sam, const FFTtype type ) { grid_sam_ = grid_sam; type_ = type; if ( type_ == Default ) type_ = default_type(); // to start out with, we don't know which space we are in mode = NONE; // allocate data grid_reci_ = Grid( grid_sam_.nu(), grid_sam_.nv(), grid_sam_.nw()/2+1 ); grid_real_ = Grid( grid_reci_.nu(), grid_reci_.nv(), grid_reci_.nw()*2 ); grid_half_ = Grid( grid_sam_.nu()/2, grid_sam_.nv()/2, grid_sam_.nw()/2 ); datavec.resize( grid_real_.size(), 0.0 ); // set pointers to data data_r = &datavec[0]; data_c = (std::complex*)data_r; } /*! Reset the space and zero all the data, if necessary. */ void FFTmap_p1::reset() { mode = NONE; std::vector::iterator i; for ( i = datavec.begin(); i != datavec.end(); i++ ) *i = 0.0; } /*! \fn const Grid_sampling& FFTmap_p1::grid_real() const \return The grid sampling of the real space grid. */ /*! \fn const Grid& FFTmap_p1::grid_reci() const The reciprocal grid is half-length, plus one section, in the w direction. The remainder of the grid may be generated by Hermitian symmetry. When accessing data with reci_data, the coordinate should always be in this grid. Some points in this grid are redundent, see FFTmap_p1::uniq_reci(). \return The reciprocal grid. */ /*! \fn bool FFTmap_p1::uniq_reci( const Coord_grid& c ) const The w=0 and w=nw/2 sections contain some duplicated points related by a cetre of symmetry. On of these is considered to be significant, and the other redundent. This function returns 'true' for the significant point. \note For some calculations it may be quicker to set the whole grid than call this function for every coordinate. \param c The coordinate to test. Must be in grid_reci(). \return true if the coordinate is for a significant point. */ /*! The data is transformed from recirocal to real space. If the FFTmap_p1 is already in real space, no action is taken. \param Scale factor to apply (normally 1/cell_volume). */ void FFTmap_p1::fft_h_to_x( const ftype& scale ) { if ( mode == REAL ) return; // scale ffttype s = ffttype( scale ); int n = grid_reci_.size(); for ( int i = 0; i < n; i++ ) data_c[i] = std::conj( s * data_c[i] ); // fft int flags = ( type_ == Measure ) ? ( FFTW_IN_PLACE | FFTW_USE_WISDOM | FFTW_MEASURE ) : ( FFTW_IN_PLACE | FFTW_USE_WISDOM | FFTW_ESTIMATE ); mutex.lock(); fftwnd_plan plan = rfftw3d_create_plan( grid_sam_.nu(), grid_sam_.nv(), grid_sam_.nw(), FFTW_COMPLEX_TO_REAL, flags ); mutex.unlock(); rfftwnd_one_complex_to_real(plan, (fftw_complex*)data_c, NULL); mutex.lock(); rfftwnd_destroy_plan(plan); mutex.unlock(); // done mode = REAL; } /*! The data is transformed from real to recirocal space. If the FFTmap_p1 is already in reciproal space, no action is taken. \param Scale factor to apply (in addition to 1/N_grid factor) (normally cell_volume). */ void FFTmap_p1::fft_x_to_h( const ftype& scale ) { if ( mode == RECI ) return; // fft int flags = ( type_ == Measure ) ? ( FFTW_IN_PLACE | FFTW_USE_WISDOM | FFTW_MEASURE ) : ( FFTW_IN_PLACE | FFTW_USE_WISDOM | FFTW_ESTIMATE ); mutex.lock(); fftwnd_plan plan = rfftw3d_create_plan( grid_sam_.nu(), grid_sam_.nv(), grid_sam_.nw(), FFTW_REAL_TO_COMPLEX, flags ); mutex.unlock(); rfftwnd_one_real_to_complex(plan, (fftw_real*)data_r, NULL); mutex.lock(); rfftwnd_destroy_plan(plan); mutex.unlock(); // scale ffttype s = ffttype( scale ) / grid_sam_.size(); int n = grid_reci_.size(); for ( int i = 0; i < n; i++ ) data_c[i] = std::conj( s * data_c[i] ); // done mode = RECI; } /*! This form returns the data for an HKL. The HKL is converted into a grid reference, and the data, or if necessary the conjugate of the opposite, is returned. \param hkl The HKL of the data. */ std::complex FFTmap_p1::get_hkl( const HKL& hkl ) const { Coord_grid c = Coord_grid( hkl ).unit( grid_sam_ ); if ( c.w() < grid_reci_.nw() ) return cplx_data(c); else return std::conj( cplx_data( Coord_grid( (grid_sam_.nu()-c.u())%grid_sam_.nu(), (grid_sam_.nv()-c.v())%grid_sam_.nv(), (grid_sam_.nw()-c.w())%grid_sam_.nw() ) ) ); } /*! This form returns the data for an HKL. The HKL is converted into a grid reference, and the data, and if necessary the conjugate of the opposite, is set. \param hkl The HKL of the data. */ void FFTmap_p1::set_hkl( const HKL& hkl, const std::complex& f ) { Coord_grid c; c = Coord_grid( hkl ).unit( grid_sam_ ); if ( c.w() < grid_reci_.nw() ) cplx_data(c) = f; c = Coord_grid( -hkl ).unit( grid_sam_ ); if ( c.w() < grid_reci_.nw() ) cplx_data(c) = std::conj(f); } void FFTmap_p1::debug() const { Coord_grid c; int i, j, k; i = j = k = 0; for ( c.u() = 0; c.u() < grid_sam_.nu(); c.u()++ ) for ( c.v() = 0; c.v() < grid_sam_.nv(); c.v()++ ) for ( c.w() = 0; c.w() < grid_sam_.nw(); c.w()++ ) { if ( uniq_reci( c ) && uniq_reci( (-c).unit(grid_sam_) ) ) i++; if ( uniq_reci( c ) ) j++; k++; } std::cout << "FFTmap_p1 debug: " << i << "\t" << j << "\t" << k << "\n"; grid_sam_.debug(); for ( int i = 0; i < datavec.size(); i++ ) std::cout << i << " " << datavec[i] << "\n"; } const FFTmap_p1& FFTmap_p1::copy( const FFTmap_p1& other ) { mode = other.mode; type_ = other.type_; grid_sam_ = other.grid_sam_; grid_reci_ = other.grid_reci_; grid_real_ = other.grid_real_; grid_half_ = other.grid_half_; req_kl = other.req_kl; req_uv = other.req_uv; req_l = other.req_l; req_u = other.req_u; datavec = other.datavec; data_r = &datavec[0]; data_c = (std::complex*)data_r; return *this; } /*! For later initialisation: see init() */ FFTmap::FFTmap() { Message::message( message_ctor_fftmap ); } /*! Construct an FFTmap for a given spacegroup, cell, and grid. The map values are initialised to zero. The FFTmap is initially in neither real nor reciprocal spce, however as soon as one of the 'set' methods is called, it will be defined as in either real or reciprocal space until the next fft. \param spacegroup The spacegroup. \param cell The cell, used for scaling. \param grid_sam The grid sampling of the unit cell. \param precalc Perform slow precalculation to get faster FFT. (default: no) */ FFTmap::FFTmap( const Spacegroup& spacegroup, const Cell& cell, const Grid_sampling grid_sam, const FFTtype type ) { Message::message( message_ctor_fftmap ); init( spacegroup, cell, grid_sam, type ); } /*! Initialise an FFTmap for a given spacegroup, cell, and grid. The map values are initialised to zero. The FFTmap is initially in neither real nor reciprocal spce, however as soon as one of the 'set' methods is called, it will be defined as in either real or reciprocal space until the next fft. \param spacegroup The spacegroup. \param cell The cell, used for scaling. \param grid_sam The grid sampling of the unit cell. \param precalc Perform slow precalculation to get faster FFT. This adds a penalty of about 4s on Linux for the first FFT of any grid and direction. Subsequent FFTs will be faster. Set to true for programs which will use many FFTs. default: false.*/ void FFTmap::init( const Spacegroup& spacegroup, const Cell& cell, const Grid_sampling grid_sam, const FFTtype type ) { FFTmap_p1::init( grid_sam, type ); spacegroup_ = spacegroup; cell_ = cell; // Create the intergised symops (assumes legal grid) isymop.resize( spacegroup.num_symops() ); for ( int sym = 0; sym < spacegroup.num_symops(); sym++ ) isymop[sym] = Isymop( spacegroup.symop(sym), grid_sam ); } /*! Reset the space and zero all the data, if necessary. */ void FFTmap::reset() { mode = NONE; std::vector::iterator i; for ( i = datavec.begin(); i != datavec.end(); i++ ) *i = 0.0; } /*! The data is transformed from recirocal to real space. A scale factor of 1/v (where v is the cell volume) is applied. If the FFTmap is already in real space, no action is taken. */ void FFTmap::fft_h_to_x() { if ( mode != RECI ) return; FFTmap_p1::fft_h_to_x( 1.0/cell().volume() ); } /*! The data is transformed from real to recirocal space. A scale factor of v/n (where v is the cell volume and n the number of grid points) is applied. If the FFTmap is already in reciproal space, no action is taken. */ void FFTmap::fft_x_to_h() { if ( mode != REAL ) return; FFTmap_p1::fft_x_to_h( cell().volume() ); } /*! The data value for the given HKL, or the conjugate of its Friedel opposite if required, is returned. The symmetry related copies of the data are ignored. \param rfl The HKL of the data to be returned. \param fphi The value, as a magnitude and phase of type \c ffttype */ template void FFTmap::get_recip_data( const HKL& rfl, datatypes::F_phi& fphi ) const { if ( mode != RECI ) Message::message(message_fftmap_get_reci_space_error); fphi = std::complex( FFTmap_p1::get_hkl( rfl ) ); } /*! The data value for the given HKL, or the conjugate of its Friedel opposite if required, is set. All the symmetry related copies of the data, and any Friedel copies in the zero section, are also set. \param rfl The HKL of the data to be set. \param fphi The value, as a magnitude and phase of type \c ffttype */ template void FFTmap::set_recip_data( const HKL& rfl, const datatypes::F_phi& fphi ) { // check space if ( mode != RECI ) { if ( mode == NONE ) mode = RECI; else Message::message(message_fftmap_set_reci_space_error); } // store all sym copies of reflection // could use the F_phi type to do sym stuff, but this is faster T phi = fphi.phi(); FFTmap_p1::set_hkl( rfl, std::complex( fphi.f() * cos( phi ), fphi.f() * sin( phi ) ) ); for ( int sym = 1; sym < spacegroup_.num_primops(); sym++ ) { phi = fphi.phi() + rfl.sym_phase_shift( spacegroup_.symop(sym) ); FFTmap_p1::set_hkl( rfl.transform( isymop[sym] ), std::complex( fphi.f() * cos( phi ), fphi.f() * sin( phi ) ) ); } } /*! The data value for the given grid coordinate is returned. Symmetry related copies are ignored. \param c The coordinate of the data to be returned. \param datum The value of the data. */ template void FFTmap::get_real_data( const Coord_grid& c, T& datum ) const { if ( mode != REAL ) Message::message(message_fftmap_get_real_space_error); datum = real_data(c.unit(grid_real())); } /*! The data value for the given grid coordinate is set. All the symmetry related copies of the data are also set. \param c The coordinate of the data to be set. \param datum The value of the data. */ template void FFTmap::set_real_data( const Coord_grid& c, const T& datum ) { // check space if ( mode != REAL ) { if ( mode == NONE ) mode = REAL; else Message::message(message_fftmap_set_real_space_error); } // set all sym copies of map value real_data( c.unit(grid_sam_) ) = ffttype( datum ); for ( int sym = 1; sym < isymop.size(); sym++ ) real_data( c.transform(isymop[sym]).unit(grid_sam_) ) = ffttype( datum ); } /*! \fn datatypes::F_phi FFTmap::get_recip_data( const HKL& rfl ) const No error is produced if the space is wrong. \param rfl The HKL of the data to be returned. \return The value, as magnitude and phase of type \c ffttype */ datatypes::F_phi FFTmap::get_recip_data( const HKL& rfl ) const { return datatypes::F_phi( get_hkl(rfl) ); } /*! \fn const ffttype& FFTmap::get_real_data( const Coord_grid& c ) const No error is produced if the space is wrong. \param c The grid coordinate of the data to be returned. \return The value, as type \c ffttype */ // template instantiations template void FFTmap::get_recip_data( const HKL& rfl, datatypes::F_phi& fphi ) const; template void FFTmap::set_recip_data( const HKL& rfl, const datatypes::F_phi& fphi ); template void FFTmap::get_real_data( const Coord_grid& c, ftype32& datum ) const; template void FFTmap::set_real_data( const Coord_grid& c, const ftype32& datum ); template void FFTmap::get_recip_data( const HKL& rfl, datatypes::F_phi& fphi ) const; template void FFTmap::set_recip_data( const HKL& rfl, const datatypes::F_phi& fphi ); template void FFTmap::get_real_data( const Coord_grid& c, ftype64& datum ) const; template void FFTmap::set_real_data( const Coord_grid& c, const ftype64& datum ); } // namespace clipper clipper-2.1/clipper/core/clipper_test.h0000644000374100011300000000557110363703537015200 00000000000000/*! \file lib/clipper_test.h Header file for clipper self-test functions */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_TEST #define CLIPPER_TEST #include "clipper_types.h" namespace clipper { //! Base class for clipper self-test classes. /*! Override this class with test classes for each clipper package. */ class Test_base { public: Test_base(); void set_stream( std::ostream& stream ); protected: bool test( const String& id, const double& value ); bool test( const String& id, const double& value, const double& val, const double& tol ); bool test( const String& id, const int& value, const int& val ); std::ostream* stream_; std::vector data_val, data_tol; int count, error_count; }; } // namespace clipper #endif clipper-2.1/clipper/core/cell.h0000644000374100011300000001606310363703537013420 00000000000000/*! \file lib/cell.h Header file for unit cell class */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA /* This code is derived from the 'dm' source code */ #ifndef CLIPPER_CELL #define CLIPPER_CELL #include "clipper_types.h" namespace clipper { //! Metric tensor /*! The metric tensor is used to determine a distance in real or reciprocal space using fraction coordinates or Miller indices. It is symmetrical, so only the upper triangle is stored with the off-diagonal elements doubled. */ class Metric_tensor { public: //! null constructor inline Metric_tensor() {} //!< Null constructor //! constructor: takes parameters of normal or inverse cell Metric_tensor( const ftype& a, const ftype& b, const ftype& c, const ftype& alph, const ftype& beta, const ftype& gamm ); //! apply metric to vector inline ftype lengthsq( const Vec3<>& v ) const { return ( v[0]*(v[0]*m00 + v[1]*m01 + v[2]*m02) + v[1]*(v[1]*m11 + v[2]*m12) + v[2]*(v[2]*m22) ); } //! apply metric to int vector inline ftype lengthsq( const Vec3& v ) const { ftype h = ftype(v[0]); ftype k = ftype(v[1]); ftype l = ftype(v[2]); return h*(h*m00 + k*m01 + l*m02) + k*(k*m11 + l*m12) + l*(l*m22); } String format() const; //!< return formatted String representation private: ftype m00, m11, m22, m01, m02, m12; }; //! cell description (automatically converts to radians) /*! The cell description is a compact description of a cell, containing just the cell parameters. It is usually used to construct a full Cell object, which provides the expected functionality. */ class Cell_descr { public: inline Cell_descr() {} //!< null constructor //! constructor: from cell parameters Cell_descr( const ftype& a, const ftype& b, const ftype& c, const ftype& alpha=90.0f, const ftype& beta=90.0f, const ftype& gamma=90.0f ); inline const ftype& a() const { return a_; } //!< get a inline const ftype& b() const { return b_; } //!< get b inline const ftype& c() const { return c_; } //!< get c inline const ftype& alpha() const { return alpha_; } //!< get alpha inline const ftype& beta() const { return beta_; } //!< get beta inline const ftype& gamma() const { return gamma_; } //!< get gamma ftype alpha_deg() const; //!< get alpha in degrees ftype beta_deg() const; //!< get alpha in degrees ftype gamma_deg() const; //!< get gamma in degrees String format() const; //!< return formatted String representation protected: ftype a_,b_,c_,alpha_,beta_,gamma_; }; //! Cell object /*! The Cell class is the fully functional description of the unit cell. In addition to the cell parameters, it stores derived information including the cell volume, orthogonalising and fractionalising matrices, and the metric tensors. */ class Cell : public Cell_descr { public: //! null constructor: must initialise later inline Cell() { vol = 0.0; } //! constructor: takes a Cell descriptor explicit Cell( const Cell_descr& cell_ ) { init( cell_ ); } //! initialiser void init( const Cell_descr& cell_ ); //! test if object has been initialised bool is_null() const; ftype a_star() const; //!< get a* ftype b_star() const; //!< get b* ftype c_star() const; //!< get c* ftype alpha_star() const; //!< get alpha* ftype beta_star() const; //!< get beta* ftype gamma_star() const; //!< get gamma* // inherited functions listed for documentation purposes //-- const ftype& a() const; //-- const ftype& b() const; //-- const ftype& c() const; //-- const ftype& alpha() const; //-- const ftype& beta() const; //-- const ftype& gamma() const; //-- ftype alpha_deg() const; //-- ftype beta_deg() const; //-- ftype gamma_deg() const; //-- String format() const; //! return cell dimensions inline const Cell_descr& descr() const { return (*this); } //! return cell volume inline const ftype& volume() const { return vol; } //! test equality with another cell bool equals( const Cell& other, const ftype tol=1.0 ) const; //! return orthogonalisation matrix inline const Mat33<>& matrix_orth() const { return orthmat; } //! return fractionalisation matrix inline const Mat33<>& matrix_frac() const { return fracmat; } //! return real space metric tensor inline const Metric_tensor& metric_real() const { return realmetric; } //! return reciprocal space metric tensor inline const Metric_tensor& metric_reci() const { return recimetric; } void debug() const; private: Cell_descr descr_; //!< unit cell parameters ftype vol; //!< unit cell volume Mat33<> orthmat; //!< orthogonalisation matrix Mat33<> fracmat; //!< fractionalisation matrix Metric_tensor realmetric; //!< real space metric tensor Metric_tensor recimetric; //!< reciprocal space metric tensor }; } // namespace clipper #endif clipper-2.1/clipper/core/ramachandran.cpp0000644000374100011300000007423710363703537015462 00000000000000/* ramachandran.cpp: ramachandran plot class */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "ramachandran.h" namespace clipper { namespace data { int rama_data_size = 36; ftype32 rama_gly[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,// 0 0, 0, 0, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,// 1 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,// 2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0,// 3 0, 0, 0, 11, 37, 21, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 15, 18, 74, 36, 3, 5, 2, 0, 0, 0, 0, 3, 3, 0, 0,// 4 1, 3, 30, 146, 193, 137, 30, 6, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 16, 60, 237, 329, 131, 25, 7, 2, 0, 3, 2, 0, 0, 0, 0, 1,// 5 42, 154, 432, 857, 603, 201, 52, 3, 0, 0, 0, 0, 3, 8, 0, 3, 8, 8, 49, 97, 204, 334, 409, 593, 320, 63, 11, 0, 0, 4, 3, 0, 0, 2, 5, 15,// 6 616, 1527, 1975, 1407, 577, 144, 51, 0, 0, 0, 0, 0, 1, 0, 0, 5, 34, 93, 178, 366, 452, 310, 236, 305, 210, 53, 22, 16, 3, 2, 0, 0, 7, 9, 26, 111,// 7 2655, 2916, 2032, 816, 205, 61, 14, 10, 5, 2, 7, 11, 13, 5, 19, 73, 171, 337, 524, 493, 460, 222, 127, 97, 57, 28, 21, 12, 4, 19, 31, 29, 24, 41, 196, 1032,// 8 2461, 1984, 840, 240, 74, 29, 16, 5, 10, 15, 15, 22, 23, 40, 75, 253, 356, 406, 464, 420, 289, 144, 53, 24, 20, 19, 15, 15, 0, 19, 26, 30, 41, 145, 798, 1998,// 9 1122, 937, 278, 55, 30, 6, 16, 6, 19, 12, 29, 39, 51, 83, 119, 216, 327, 228, 292, 250, 168, 101, 47, 32, 9, 19, 6, 9, 12, 0, 9, 30, 40, 218, 929, 1231,//10 467, 301, 148, 54, 6, 3, 3, 0, 6, 2, 26, 28, 41, 50, 66, 173, 205, 172, 190, 206, 112, 45, 17, 22, 2, 12, 11, 7, 3, 0, 5, 12, 58, 195, 402, 443,//11 190, 104, 33, 19, 24, 10, 5, 0, 1, 10, 17, 15, 29, 36, 71, 87, 127, 173, 156, 135, 68, 48, 32, 13, 7, 16, 5, 4, 7, 1, 16, 13, 16, 86, 102, 111,//12 64, 32, 12, 11, 32, 9, 0, 0, 0, 7, 8, 11, 10, 38, 43, 61, 86, 106, 112, 140, 132, 67, 40, 15, 9, 12, 1, 0, 13, 10, 2, 11, 11, 24, 68, 101,//13 15, 11, 9, 2, 3, 1, 0, 0, 0, 2, 3, 0, 14, 9, 28, 45, 101, 102, 169, 169, 162, 112, 60, 18, 2, 1, 0, 0, 5, 2, 0, 10, 16, 15, 26, 36,//14 7, 12, 5, 0, 0, 0, 0, 0, 0, 2, 5, 4, 10, 4, 31, 40, 76, 139, 259, 193, 137, 116, 51, 18, 4, 0, 0, 1, 0, 4, 6, 1, 21, 8, 11, 18,//15 4, 8, 0, 0, 0, 0, 0, 1, 12, 0, 1, 6, 0, 7, 6, 27, 93, 150, 202, 253, 211, 105, 30, 23, 6, 5, 3, 8, 1, 17, 16, 0, 0, 1, 3, 10,//16 0, 0, 0, 0, 0, 6, 1, 10, 0, 0, 1, 6, 9, 6, 9, 30, 104, 187, 324, 399, 208, 126, 48, 19, 12, 6, 3, 0, 0, 3, 1, 0, 0, 0, 0, 0,//17 0, 2, 1, 0, 0, 6, 0, 0, 0, 0, 0, 10, 10, 16, 38, 35, 153, 303, 421, 352, 184, 72, 54, 19, 21, 8, 7, 0, 0, 0, 0, 5, 4, 1, 0, 1,//18 4, 6, 3, 0, 1, 3, 1, 9, 0, 0, 0, 3, 3, 18, 38, 72, 191, 401, 430, 252, 172, 74, 40, 9, 9, 0, 11, 6, 7, 0, 0, 3, 12, 10, 2, 8,//19 18, 1, 0, 3, 12, 8, 11, 3, 0, 2, 0, 0, 1, 23, 71, 164, 338, 358, 286, 185, 125, 46, 17, 5, 1, 7, 4, 10, 2, 0, 0, 0, 0, 1, 0, 1,//20 4, 14, 12, 6, 5, 4, 0, 0, 2, 8, 0, 1, 14, 39, 97, 183, 245, 212, 178, 143, 107, 51, 36, 13, 11, 1, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0,//21 7, 21, 18, 46, 23, 4, 10, 1, 0, 0, 0, 6, 25, 62, 150, 258, 187, 143, 150, 125, 62, 16, 35, 17, 14, 7, 4, 1, 3, 6, 0, 0, 0, 1, 6, 2,//22 24, 31, 34, 55, 25, 13, 9, 4, 0, 0, 1, 20, 40, 82, 144, 259, 208, 150, 148, 151, 88, 50, 33, 26, 25, 11, 7, 14, 8, 4, 14, 0, 0, 10, 19, 21,//23 24, 61, 51, 26, 24, 5, 6, 2, 0, 0, 0, 15, 42, 107, 142, 154, 151, 140, 113, 141, 96, 76, 31, 22, 9, 16, 19, 13, 7, 8, 12, 1, 0, 4, 23, 28,//24 86, 126, 147, 42, 16, 27, 25, 3, 0, 1, 3, 35, 54, 94, 145, 114, 153, 147, 180, 151, 129, 114, 86, 33, 24, 31, 22, 22, 25, 11, 24, 6, 9, 20, 24, 40,//25 244, 273, 176, 62, 6, 16, 20, 6, 1, 4, 31, 58, 80, 90, 107, 157, 181, 206, 254, 225, 269, 151, 100, 87, 41, 43, 30, 20, 18, 24, 10, 1, 10, 34, 73, 137,//26 499, 309, 145, 71, 18, 30, 21, 36, 30, 25, 22, 43, 45, 132, 180, 216, 225, 325, 436, 455, 378, 138, 72, 51, 21, 37, 28, 3, 17, 26, 5, 21, 32, 79, 158, 357,//27 463, 119, 15, 44, 15, 33, 40, 30, 24, 27, 19, 35, 53, 113, 225, 313, 425, 594, 531, 432, 223, 92, 34, 8, 0, 5, 4, 7, 8, 13, 28, 104, 249, 318, 354, 531,//28 174, 21, 1, 0, 1, 17, 10, 3, 4, 13, 20, 23, 72, 120, 275, 490, 579, 477, 271, 124, 48, 17, 2, 0, 0, 0, 8, 7, 0, 13, 91, 851, 2514, 1280, 752, 630,//29 36, 3, 7, 1, 0, 1, 0, 0, 0, 0, 1, 5, 48, 158, 339, 299, 137, 111, 57, 29, 2, 1, 0, 0, 0, 0, 0, 0, 0, 11, 179, 2348, 4535, 1658, 748, 240,//30 4, 0, 16, 1, 0, 0, 0, 0, 0, 0, 5, 12, 14, 74, 122, 40, 1, 10, 7, 2, 0, 0, 0, 0, 0, 0, 0, 0, 10, 12, 140, 626, 736, 309, 95, 15,//31 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 13, 6, 4, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 10, 60, 85, 28, 8, 0, 0,//32 0, 0, 0, 0, 0, 3, 9, 0, 0, 0, 0, 0, 3, 9, 3, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 10, 5, 6, 5, 0, 0, 0, 0,//33 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 4, 0, 0, 0, 0, 0, 0, 0,//34 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//35 }; ftype32 rama_pro[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,// 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,// 1 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,// 2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,// 3 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,// 4 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,// 5 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,// 6 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,// 7 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,// 8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,// 9 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//10 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//11 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//12 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//13 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//14 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//15 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//16 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//17 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//18 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//19 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//20 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//21 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//22 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//23 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//24 3, 7, 8, 8, 18, 16, 7, 0, 0, 0, 0, 0, 0, 0, 3, 7, 11, 11, 6, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//25 89, 84, 65, 44, 8, 7, 10, 0, 0, 0, 0, 4, 23, 29, 25, 34, 70, 44, 34, 9, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 47,//26 245, 142, 121, 55, 11, 26, 52, 86, 22, 15, 15, 16, 45, 95, 111, 269, 327, 234, 109, 37, 3, 2, 2, 2, 6, 0, 0, 0, 0, 0, 0, 0, 0, 9, 122, 217,//27 399, 100, 43, 21, 45, 111, 203, 246, 126, 59, 69, 61, 149, 349, 658, 1240, 1354, 828, 239, 58, 16, 12, 7, 6, 1, 4, 2, 0, 0, 0, 0, 0, 28, 138, 434, 704,//28 309, 35, 10, 3, 10, 67, 101, 68, 42, 34, 26, 75, 280, 912, 2196, 3282, 2681, 1103, 162, 21, 3, 1, 1, 2, 11, 4, 2, 4, 2, 1, 7, 45, 400, 1155, 1852, 1359,//29 62, 9, 2, 5, 4, 3, 8, 0, 0, 9, 36, 37, 404, 1893, 3871, 3571, 1491, 290, 38, 11, 0, 0, 0, 0, 0, 0, 0, 4, 2, 14, 48, 615, 2889, 4269, 2608, 601,//30 0, 4, 3, 0, 0, 0, 0, 0, 0, 4, 14, 19, 366, 1302, 1543, 683, 130, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 93, 961, 2346, 1684, 400, 18,//31 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 20, 82, 119, 85, 14, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 81, 230, 242, 85, 11, 0,//32 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 8, 2, 5, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 5, 33, 31, 4, 1, 0, 0,//33 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, 3, 0, 0, 0, 0,//34 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//35 }; ftype32 rama_ngp[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 2, 3, 0, 0, 0, 0,// 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7, 5, 2, 0, 0, 0, 0, 0, 0,// 1 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 3, 8, 0, 0, 0, 0,// 2 0, 0, 0, 0, 1, 26, 46, 23, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,// 3 0, 0, 1, 14, 170, 518, 444, 135, 18, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7, 10, 29, 22, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,// 4 0, 7, 164, 821, 2467, 2335, 972, 229, 38, 7, 10, 8, 0, 0, 0, 0, 0, 0, 0, 1, 4, 29, 51, 157, 87, 29, 22, 0, 0, 0, 0, 0, 0, 5, 2, 0,// 5 46, 354, 1203, 2297, 2859, 1352, 417, 140, 36, 3, 19, 19, 3, 0, 0, 1, 2, 7, 29, 9, 36, 49, 58, 85, 90, 45, 22, 1, 3, 14, 22, 11, 18, 16, 15, 10,// 6 276, 752, 962, 848, 373, 77, 42, 30, 15, 5, 10, 10, 9, 3, 6, 8, 14, 16, 42, 15, 9, 13, 11, 10, 16, 14, 8, 0, 2, 26, 99, 65, 35, 12, 32, 65,// 7 166, 207, 109, 52, 7, 10, 9, 15, 17, 5, 5, 7, 3, 6, 18, 22, 16, 7, 3, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 33, 39, 17, 6, 21, 111,// 8 18, 15, 0, 0, 0, 3, 6, 1, 12, 0, 10, 1, 9, 11, 5, 8, 1, 0, 0, 0, 2, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 14,// 9 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,//10 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1,//11 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2,//12 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 0, 0, 0,//13 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 14, 3, 1, 0,//14 0, 0, 0, 0, 0, 5, 3, 0, 0, 0, 0, 3, 8, 9, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 2, 0,//15 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0,//16 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 6, 16, 12, 16, 3, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 5, 2, 0, 0,//17 0, 0, 0, 0, 0, 0, 0, 4, 5, 7, 8, 5, 4, 11, 36, 74, 164, 192, 69, 20, 4, 7, 0, 0, 0, 0, 0, 0, 0, 7, 3, 0, 0, 0, 0, 0,//18 2, 2, 3, 1, 3, 7, 9, 23, 37, 57, 40, 35, 62, 161, 397, 884, 1539, 1299, 524, 153, 31, 8, 0, 0, 0, 1, 6, 0, 0, 5, 3, 0, 0, 0, 0, 0,//19 16, 22, 24, 18, 31, 41, 55, 135, 119, 122, 187, 269, 365, 760, 1462, 2646, 4068, 2973, 1140, 323, 91, 27, 2, 0, 1, 2, 16, 2, 20, 13, 11, 2, 8, 9, 5, 2,//20 65, 105, 141, 97, 107, 112, 206, 297, 260, 302, 376, 583, 976, 1843, 3301, 4919, 5142, 3134, 1234, 421, 112, 36, 12, 2, 5, 15, 9, 9, 13, 42, 22, 11, 15, 40, 34, 36,//21 215, 326, 337, 260, 286, 224, 427, 636, 531, 416, 627, 1304, 2420, 4039, 5543, 6810, 6445, 3344, 1056, 322, 109, 11, 10, 11, 15, 17, 3, 19, 33, 92, 76, 61, 39, 78, 103, 174,//22 807, 852, 845, 653, 539, 340, 574, 1144, 1005, 652, 999, 2377, 5342, 8103, 7864, 7454, 6508, 3025, 893, 281, 109, 29, 13, 17, 29, 18, 15, 42, 72, 91, 122, 192, 213, 318, 367, 670,//23 1774, 1897, 1793, 1122, 556, 188, 227, 471, 600, 823, 1461, 3182, 7185,10522, 7989, 5999, 4607, 1941, 688, 286, 147, 58, 60, 21, 49, 29, 27, 68, 76, 128, 222, 341, 383, 670, 1032, 1362,//24 2961, 3726, 2711, 1208, 435, 157, 106, 90, 221, 646, 1795, 4095, 8039, 9609, 6837, 4629, 3183, 1428, 604, 199, 87, 32, 29, 7, 19, 30, 48, 55, 93, 136, 278, 545, 710, 1067, 1726, 2191,//25 5516, 5175, 2490, 769, 268, 141, 209, 303, 458, 875, 2273, 4174, 6766, 7542, 5419, 3686, 2828, 1522, 709, 257, 65, 18, 29, 8, 15, 30, 19, 34, 83, 147, 324, 1002, 1361, 1833, 2523, 3674,//26 7319, 4002, 1093, 251, 193, 284, 568, 878, 1058, 1420, 2200, 3704, 5133, 6007, 4894, 3567, 3106, 1918, 926, 405, 72, 4, 4, 6, 4, 31, 3, 7, 51, 130, 424, 1324, 2216, 3224, 4255, 6717,//27 4905, 1403, 224, 68, 80, 205, 495, 811, 922, 945, 1401, 2495, 4199, 6009, 5594, 5039, 4551, 2869, 990, 337, 49, 5, 0, 0, 0, 2, 0, 2, 39, 113, 547, 2674, 6560, 7703, 7839, 8289,//28 1646, 228, 24, 16, 11, 52, 44, 93, 153, 115, 312, 1043, 2929, 6120, 7732, 6801, 4734, 1953, 396, 36, 4, 1, 0, 0, 0, 0, 5, 3, 12, 65, 1086,21027,57767,28567,15321, 8073,//29 188, 23, 3, 0, 5, 3, 0, 2, 15, 23, 40, 295, 1803, 5781, 7356, 4257, 1641, 351, 28, 4, 0, 0, 0, 0, 6, 5, 2, 3, 14, 74, 2655,49493,86255,29323,10531, 2193,//30 5, 4, 3, 0, 0, 0, 0, 0, 0, 6, 6, 85, 795, 2705, 2139, 709, 97, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 14, 85, 1433,10936,11859, 4044, 687, 60,//31 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 39, 187, 346, 118, 18, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 48, 323, 729, 469, 110, 5, 2,//32 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 36, 15, 1, 4, 7, 0, 0, 0, 0, 0, 0, 0, 4, 3, 0, 2, 12, 25, 26, 41, 8, 4, 15, 1,//33 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 18, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 7, 3, 13, 0, 0, 2, 0,//34 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 6, 0, 0, 0, 0,//35 }; } void Prob_phi_2d::init( const int& size ) { n = size; data_.clear(); data_.resize( n*n, 0.0 ); } void Prob_phi_2d::accumulate( const ftype32 table[] ) { for ( int i = 0; i < data_.size(); i++ ) data_[i] += table[i]; } /*! linear interpolation onto grid */ void Prob_phi_2d::accumulate( const ftype& phi1, const ftype& phi2, ftype wgt ) { int i1_0, i2_0, i1_1, i2_1; ftype w1_0, w2_0, w1_1, w2_1; w1_1 = ftype(n) * phi1 / Util::twopi(); w2_1 = ftype(n) * phi2 / Util::twopi(); i1_0 = Util::intf( w1_1 ); i2_0 = Util::intf( w2_1 ); w1_1 -= ftype( i1_0 ); w2_1 -= ftype( i2_0 ); w1_0 = 1.0 - w1_1; w2_0 = 1.0 - w2_1; i1_0 = Util::mod( i1_0 , n ); i2_0 = Util::mod( i2_0 , n ); i1_1 = Util::mod( i1_0+1, n ); i2_1 = Util::mod( i2_0+1, n ); data( i1_0, i2_0 ) += wgt * w1_0 * w2_0; data( i1_0, i2_1 ) += wgt * w1_0 * w2_1; data( i1_1, i2_0 ) += wgt * w1_1 * w2_0; data( i1_1, i2_1 ) += wgt * w1_1 * w2_1; } /*! normalise mean value to 1/(2pi)^2 */ void Prob_phi_2d::normalise() { ftype s = 0.0; for ( int i = 0; i < data_.size(); i++ ) s += data_[i]; s = ftype( data_.size() ) / ( Util::twopi() * Util::twopi() * s ); for ( int i = 0; i < data_.size(); i++ ) data_[i] *= s; } /*! linear interpolation off of grid */ ftype Prob_phi_2d::probability( const ftype& phi1, const ftype& phi2 ) const { int i1_0, i2_0, i1_1, i2_1; ftype w1_0, w2_0, w1_1, w2_1; w1_1 = ftype(n) * phi1 / Util::twopi(); w2_1 = ftype(n) * phi2 / Util::twopi(); i1_0 = Util::intf( w1_1 ); i2_0 = Util::intf( w2_1 ); w1_1 -= ftype( i1_0 ); w2_1 -= ftype( i2_0 ); w1_0 = 1.0 - w1_1; w2_0 = 1.0 - w2_1; i1_0 = Util::mod( i1_0 , n ); i2_0 = Util::mod( i2_0 , n ); i1_1 = Util::mod( i1_0+1, n ); i2_1 = Util::mod( i2_0+1, n ); return w1_0 * ( w2_0 * data( i1_0, i2_0 ) + w2_1 * data( i1_0, i2_1 ) ) + w1_1 * ( w2_0 * data( i1_1, i2_0 ) + w2_1 * data( i1_1, i2_1 ) ); } String Prob_phi_2d::format() const { String s; for ( int i = 0; i < n; i++ ) { for ( int j = 0; j < n; j++ ) { if ( j % 12 == 0 ) s += "\n "; int k = Util::intr( data(i,j) ); s += String( k, 5 ) + ","; } s += "//" + String( i, 2 ); } return s; } /*! Construct a Ramachandran plot of a given type. \param type The residue type of the plot. Options include: Ramachandran::Gly, Ramachandran::Pro, Ramachandran::NonGlyPro, Ramachandran::NonGly, Ramachandran::All */ Ramachandran::Ramachandran( TYPE type ) { init( type ); } /*! Construct a Ramachandran plot of a given type. \param type The residue type of the plot. Options include: Ramachandran::Gly, Ramachandran::Pro, Ramachandran::NonGlyPro, Ramachandran::NonGly, Ramachandran::All */ void Ramachandran::init( TYPE type ) { switch (type) { case Gly: Prob_phi_2d::init( data::rama_data_size ); Prob_phi_2d::accumulate( data::rama_gly ); break; case Pro: Prob_phi_2d::init( data::rama_data_size ); Prob_phi_2d::accumulate( data::rama_pro ); break; case NonGlyPro: Prob_phi_2d::init( data::rama_data_size ); Prob_phi_2d::accumulate( data::rama_ngp ); break; case NonGly: Prob_phi_2d::init( data::rama_data_size ); Prob_phi_2d::accumulate( data::rama_ngp ); Prob_phi_2d::accumulate( data::rama_pro ); break; default: Prob_phi_2d::init( data::rama_data_size ); Prob_phi_2d::accumulate( data::rama_ngp ); Prob_phi_2d::accumulate( data::rama_pro ); Prob_phi_2d::accumulate( data::rama_gly ); break; } Prob_phi_2d::normalise(); set_thresholds(); } /*! Set thresholds for favorable and allowed regions of the Ramachandran plot. The US spelling is used because it is the same length as 'allowed'. I should get out more. Sorry. \param prob_favored The probability threshold for the favored region. \param prob_allowed The probability threshold for the allowed region. */ void Ramachandran::set_thresholds( ftype prob_favored, ftype prob_allowed ) { p_favored = prob_favored; p_allowed = prob_allowed; } } // namespace clipper clipper-2.1/clipper/core/hkl_data.h0000644000374100011300000005425511205463740014250 00000000000000/*! \file lib/hkl_data.h Header file for reflection data class */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_HKL_DATA #define CLIPPER_HKL_DATA #include "hkl_info.h" namespace clipper { class HKL_data_cacheobj : public HKL_info { public: class Key { public: Key( const Spgr_descr& spgr_descr, const Cell& cell_descr, const HKL_sampling& hkl_sam ) : spgr_descr_(spgr_descr), cell_descr_(cell_descr), hkl_sampling_(hkl_sam) {} const Spgr_descr& spgr_descr() const { return spgr_descr_; } const Cell_descr& cell_descr() const { return cell_descr_; } const HKL_sampling& hkl_sampling() const { return hkl_sampling_; } private: Spgr_descr spgr_descr_; Cell_descr cell_descr_; HKL_sampling hkl_sampling_; }; HKL_data_cacheobj( const Key& hkl_data_cachekey ); bool matches( const Key& hkl_data_cachekey ) const; String format() const; static Mutex mutex; //!< thread safety private: Key key; }; //! Reflection data type objects. /*! A class from which data type objects are usually derived To define a new type for use in an HKL_data structure, subclass this class and override the following methods: - constructor - initialises to NAN - type() - returns type name, which is a list of the contained data - friedel() - applies Fridel transformation - shift_phase() - applies phase shift transformation - missing() - checks if data is present - data_size() - number of data elements in this type - data_names() - names of data elements in this type - data_export() - conversion to array (for I/O) - data_import() - conversion from array (for I/O) - scale() - (OPTIONAL) apply magnitude scale factor to data \note polymorphism is NOT used here because virtual tables would be to expensive for every individual reflection, both in terms of space and cpu cycles. */ class Datatype_base { protected: //! initialise to 'missing' //-- Datatype_base(); //! initialise to 'missing' (all elements are set to null) void set_null(); //! return the name of this data type static String type(); //! apply Friedel transformation to the data void friedel(); //! apply phase shift to the data void shift_phase(const ftype& dphi); //! return true if data is missing bool missing() const; //! return number of data elements in this type static int data_size(); //! return names of data elements in this type static String data_names(); //! conversion to array (for I/O) void data_export( xtype array[] ) const; //! conversion from array (for I/O) void data_import( const xtype array[] ); }; //! HKL_data_base /*! This is the virtual base for the typed hkl_data objects. It exists to guarantee and interface by which data can be managed without knowledge of the specific data type. */ class HKL_data_base { public: // Coordinate reference types //! Basic HKL_reference_index: see HKL_info typedef HKL_info::HKL_reference_index HKL_reference_index; //! HKL HKL_reference_index: see HKL_info typedef HKL_info::HKL_reference_coord HKL_reference_coord; //! initialiser: from parent hkl_info and cell virtual void init( const HKL_info& hkl_info, const Cell& cell ); //! initialiser: from another hkl_data virtual void init( const HKL_data_base& hkl_data ); //! [CLIPPER2] initialiser: from spacegroup, cell, and HKL_sampling virtual void init( const Spacegroup& spacegroup, const Cell& cell, const HKL_sampling& hkl_sampling ); // generic methods //! test if object has been initialised bool is_null() const; //! get the parent HKL_info object const HKL_info& base_hkl_info() const { return *parent_hkl_info; } //! get the parent cell const Cell& base_cell() const { return *parent_cell; } //! [CLIPPER2] get spacegroup const Spacegroup& spacegroup() const { return spacegroup_; } //! [CLIPPER2] get cell const Cell& cell() const { return cell_; } //! [CLIPPER2] get resolution const Resolution& resolution() const { return resolution_; } //! [CLIPPER2] get HKL_sampling const HKL_sampling& hkl_sampling() const { return hkl_sampling_; } //! [CLIPPER2] get HKL_info object const HKL_info& hkl_info() const { return *parent_hkl_info; } //! get resolution by reflection index (based on true cell) ftype invresolsq( const int& index ) const; //! get resolution limits of the list (based on true cell and missing data) Range invresolsq_range() const; //! get number of observations in this list (based on missing data) int num_obs() const; //! update: synchornize info with parent HKL_info virtual void update() = 0; //! get data type (a list of names corresponding to the im/export values) virtual String type() const = 0; //! check if a data entry in the list is marked as 'missing' virtual bool missing(const int& index) const = 0; //! set data entry in the list to its null value virtual void set_null(const int& index) = 0; //! return number of data elements in this type virtual int data_size() const = 0; //! return names of data elements in this type virtual String data_names() const = 0; //! conversion to array (for I/O) virtual void data_export( const HKL& hkl, xtype array[] ) const = 0; //! conversion from array (for I/O) virtual void data_import( const HKL& hkl, const xtype array[] ) = 0; //! mask the data by marking any data missing in 'mask' as missing virtual void mask(const HKL_data_base& mask) = 0; //! return HKL_reference_index pointing to first reflection HKL_reference_index first() const; //! return HKL_reference_index pointing to first non-missing data HKL_reference_index first_data() const; //! increment HKL_reference_index to next non-missing data HKL_reference_index& next_data( HKL_reference_index& ih ) const; void debug() const; protected: const HKL_info* parent_hkl_info; const Cell* parent_cell; bool cell_matches_parent; // clipper2 members ObjectCache::Reference cacheref; //!< object cache ref Spacegroup spacegroup_; Cell cell_; HKL_sampling hkl_sampling_; Resolution resolution_; //! null constructor HKL_data_base(); //! destructor virtual ~HKL_data_base() {} }; //! HKL_data<> /*! An actual hkl_data object, containing actual data of type T. This implements the generic interface, and in addition provides type-specific access functions. \note The following methods are inherited from HKL_data_base but are documented here for convenience: base_hkl_info(), base_cell(), invresolsq(), invresolsq_range(), num_obs(), first(), first_data(), next_data(). */ template class HKL_data : public HKL_data_base { public: //! null constructor HKL_data() {} //! constructor: from parent hkl_info explicit HKL_data( const HKL_info& hkl_info ); //! constructor: from parent hkl_info and cell HKL_data( const HKL_info& hkl_info, const Cell& cell ); //! [CLIPPER2] constructor: from spacegroup, cell and hkl_sampling HKL_data( const Spacegroup& spacegroup, const Cell& cell, const HKL_sampling& hkl_sampling ); //! [CLIPPER2] constructor: from another HKL_data object explicit HKL_data( const HKL_data_base& hkl_data ); //! initialiser: from parent hkl_info and cell void init( const HKL_info& hkl_info, const Cell& cell ); //! [CLIPPER2] initialiser: from spacegroup, cell, and HKL_sampling void init( const Spacegroup& spacegroup, const Cell& cell, const HKL_sampling& hkl_sampling ); //! [CLIPPER2] initialiser: from another HKL_data object void init( const HKL_data_base& hkl_data ); //! update: synchornize info with parent HKL_info void update(); // type specific methods String type() const { return T::type(); } bool missing(const int& index) const { return list[index].missing(); } void set_null(const int& index) { list[index].set_null(); } int data_size() const { return T::data_size(); } String data_names() const { return T::data_names(); } void data_export( const HKL& hkl, xtype array[] ) const { T datum; get_data( hkl, datum ); datum.data_export( array ); } void data_import( const HKL& hkl, const xtype array[] ) { T datum; datum.data_import( array ); set_data( hkl, datum ); } void mask(const HKL_data_base& mask); // data access methods: by HKL_reference_index //! get data by reflection HKL_reference_index const T& operator[] (const HKL_info::HKL_reference_index& i) const { return list[i.index()]; } //! set data by reflection HKL_reference_index T& operator[] (const HKL_info::HKL_reference_index& i) { return list[i.index()]; } // data access methods: by HKL_reference_coord //! get data by HKL_reference_coord T operator[] (const HKL_info::HKL_reference_coord& ih) const; //! get data by HKL_reference_coord (returns false if no equivalent hkl) bool get_data(const HKL_info::HKL_reference_coord& ih, T& data) const; //! set data by HKL_reference_coord (returns false if no equivalent hkl) bool set_data(const HKL_info::HKL_reference_coord& ih, const T& data); // data access methods: by index //! get data by reflection index const T& operator[] (const int& index) const { return list[index]; } //! set data by reflection index T& operator[] (const int& index) { return list[index]; } // data access methods: by hkl //! get data by hkl (returns missing if no equivalent hkl) T operator[] (const HKL& hkl) const; //! get data by hkl (returns false if no equivalent hkl) bool get_data(const HKL& hkl, T& data) const; //! set data by hkl (returns false if no equivalent hkl) bool set_data(const HKL& hkl, const T& data); // COMPUTATION OPERATORS //! Basic computation: fill this data list by function call template void compute( const C& op ) { for (HKL_info::HKL_reference_index ih=parent_hkl_info->first(); !ih.last(); ih.next()) list[ih.index()] = op( ih ); } //! Unary computation: fill this data list by computation from another template void compute( const HKL_data& src, const C& op ) { for (HKL_info::HKL_reference_index ih=parent_hkl_info->first(); !ih.last(); ih.next()) list[ih.index()] = op( ih, src[ih] ); } //! Binary computation: fill this data list by computation from another template void compute( const HKL_data& src1, const HKL_data& src2, const C& op ) { for (HKL_info::HKL_reference_index ih=parent_hkl_info->first(); !ih.last(); ih.next()) list[ih.index()] = op( ih, src1[ih], src2[ih] ); } // inherited functions lists for documentation purposes //-- const HKL_info& base_hkl_info() const; //-- const Cell& base_cell() const; //-- const ftype invresolsq(const int& index) const; //-- const Range invresolsq_range() const; //-- const int num_obs() const; //-- HKL_reference_index first() const; //-- HKL_reference_index first_data() const; //-- HKL_reference_index& next_data( HKL_reference_index& ih ) const; //! assignment operator: copies the data from another list HKL_data& operator =( const HKL_data& other ); //! assignment operator: assigns a single value to the whole list HKL_data& operator =( const T& value ); void debug() const; protected: // members std::vector list; }; // Template implementations ftype HKL_info::HKL_reference_base::invresolsq( const HKL_data_base& hkldata ) const { return hkldata.invresolsq( index_ ); } /*! Construct the object using a given reflection list and cell. \param hkl_info The reflection list object. */ template HKL_data::HKL_data( const HKL_info& hkl_info ) { init( hkl_info, hkl_info.cell() ); } /*! Construct the object using a given reflection list and cell. \param hkl_info The reflection list object. \param cell The unit cell for this datalist. */ template HKL_data::HKL_data( const HKL_info& hkl_info, const Cell& cell ) { init( hkl_info, cell ); } /*! Construct the object using a given spacegroup, cell, and sampling. \param spacegroup The spacegroup for this datalist. \param cell The unit cell for this datalist. \param hkl_sampling The reflection list description. */ template HKL_data::HKL_data( const Spacegroup& spacegroup, const Cell& cell, const HKL_sampling& hkl_sampling ) { init( spacegroup, cell, hkl_sampling ); } /*! Construct the object using a given HKL_data object. The properties of the object (spacegroup, cell, sampling) are the copied, but the actual data is not. \param hkl_data The HKL_data object to provide the data. */ template HKL_data::HKL_data( const HKL_data_base& hkl_data ) { init( hkl_data ); } /*! Initialise the object using a given reflection list and cell. \param hkl_info The reflection list object. \param cell The unit cell for this datalist. */ template void HKL_data::init( const HKL_info& hkl_info, const Cell& cell ) { HKL_data_base::init( hkl_info, cell ); update(); } /*! Initialise the object using a given spacegroup, cell, and sampling. \param spacegroup The spacegroup for this datalist. \param cell The unit cell for this datalist. \param hkl_sampling The reflection list description. */ template void HKL_data::init( const Spacegroup& spacegroup, const Cell& cell, const HKL_sampling& hkl_sampling ) { HKL_data_base::init( spacegroup, cell, hkl_sampling ); update(); } /*! Initialise the object using a given HKL_data object. The properties of the object (spacegroup, cell, sampling) are the copied, but the actual data is not. \param hkl_data The HKL_data object to provide the data. */ template void HKL_data::init( const HKL_data_base& hkl_data ) { HKL_data_base::init( hkl_data ); update(); } /*! The datalist is resized if necessary to match the parent. */ template void HKL_data::update() { if ( parent_hkl_info != NULL ) { T null; null.set_null(); list.resize( parent_hkl_info->num_reflections(), null ); } } /*! For each data element, if the corresponding element in \c mask is missing, then that element in this list is also set to missing. \param mask The list to provide the mask. */ template void HKL_data::mask(const HKL_data_base& mask) { T null; null.set_null(); for ( int i = 0; i < list.size(); i++ ) if ( mask.missing(i) ) list[i] = null; } /*! If a symmetry mate of the requested HKL exists in the list, then the correct symmetry transformations are applied and the data is returned, otherwise the value of 'missing' for the datatype is returned. \param ih The reference to the HKL. \return The data, or 'missing'. */ template T HKL_data::operator[] (const HKL_info::HKL_reference_coord& ih) const { if ( ih.index() < 0 ) { T null; null.set_null(); return null; } T data = list[ih.index()]; if ( ih.friedel() ) data.friedel(); data.shift_phase( -ih.hkl().sym_phase_shift( parent_hkl_info->spacegroup().symop(ih.sym()) ) ); return data; } /*! If a symmetry mate of the requested HKL exists in the list, then the correct symmetry transformations are applied and the data is returned, otherwise the value of 'missing' for the datatype is returned. \param ih The reference to the HKL. \param data Returned with the value of the data. \return true if the data was returned. */ template bool HKL_data::get_data(const HKL_info::HKL_reference_coord& ih, T& data) const { if ( ih.index() < 0 ) { data.set_null(); return false; } data = list[ih.index()]; if ( ih.friedel() ) data.friedel(); data.shift_phase( -ih.hkl().sym_phase_shift( parent_hkl_info->spacegroup().symop(ih.sym()) ) ); return true; } /*! If a symmetry mate of the requested HKL exists in the list, then the correct symmetry transformations are applied and data is set to the supplied values, otherwise the function returns false. \param ih The reference to the HKL. \param data Value of the data to set. \return true if the data was set. */ template bool HKL_data::set_data(const HKL_info::HKL_reference_coord& ih, const T& data) { if ( ih.index() < 0 ) return false; T& ldata = list[ih.index()]; ldata = data; ldata.shift_phase( ih.hkl().sym_phase_shift( parent_hkl_info->spacegroup().symop(ih.sym()) ) ); if ( ih.friedel() ) ldata.friedel(); return true; } /*! If a symmetry mate of the requested HKL exists in the list, then the correct symmetry transformations are applied and the data is returned, otherwise the value of 'missing' for the datatype is returned. \param hkl The reflection HKL. \return The data, or 'missing'. */ template T HKL_data::operator[] (const HKL& hkl) const { int index, sym; bool friedel; index = parent_hkl_info->index_of( parent_hkl_info-> find_sym(hkl, sym, friedel) ); if ( index < 0 ) { T null; null.set_null(); return null; } T data = list[index]; if (friedel) data.friedel(); data.shift_phase( -hkl.sym_phase_shift( parent_hkl_info->spacegroup().symop(sym) ) ); return data; } /*! If a symmetry mate of the requested HKL exists in the list, then the correct symmetry transformations are applied and the supplied datatype is set, otherwise the function returns false. \param hkl The reflection HKL. \param data Returned with the value of the data. \return true if the data was returned. */ template bool HKL_data::get_data(const HKL& hkl, T& data) const { int index, sym; bool friedel; index = parent_hkl_info->index_of( parent_hkl_info-> find_sym(hkl, sym, friedel) ); if ( index < 0 ) { data.set_null(); return false; } data = list[index]; if (friedel) data.friedel(); data.shift_phase( -hkl.sym_phase_shift(parent_hkl_info->spacegroup().symop(sym)) ); return true; } /*! If a symmetry mate of the requested HKL exists in the list, then the correct symmetry transformations are applied and data is set to the supplied values, otherwise the function returns false. \param hkl The reflection HKL. \param data Value of the data to set. \return true if the data was set. */ template bool HKL_data::set_data(const HKL& hkl, const T& data_) { int index, sym; bool friedel; index = parent_hkl_info->index_of( parent_hkl_info-> find_sym(hkl, sym, friedel) ); if ( index < 0 ) { return false; } T& ldata = list[index]; ldata = data_; ldata.shift_phase( hkl.sym_phase_shift(parent_hkl_info->spacegroup().symop(sym)) ); if (friedel) ldata.friedel(); return true; } /*! The data list is copied from the assignment source to the target. If the target does not have a defined HKL_info, then that and the Cell are copied as well. If however the target does have a defined HKL_info the HKL_info objects are compared, and if they do not match an exception is thrown. \param other The datalist to copy. \return This list. */ template HKL_data& HKL_data::operator =( const HKL_data& other ) { if ( parent_hkl_info == NULL ) { init( other ); } else { if ( parent_hkl_info != other.parent_hkl_info ) Message::message( Message_fatal( "HKL_data: mismatched parent HKL_info is assignment" ) ); } list = other.list; return *this; } /*! All values, including missing values, are overwritten by the value. \param value The value to which the list is to be set. */ template HKL_data& HKL_data::operator =( const T& value ) { for ( int i = 0; i < list.size(); i++ ) list[i] = value; return *this; } template void HKL_data::debug() const { HKL_data_base::debug(); std::cout << "Size " << list.size() << "\n"; } } // namespace clipper #endif clipper-2.1/clipper/core/test_data.cpp0000644000374100011300000026415110363703537015007 00000000000000/* test_data.cpp: implementation file for clipper test data */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "test_data.h" namespace clipper { namespace data { double rnasecell[] = {64.8970,78.3230,38.7920,90.0000,90.0000,90.0000}; char rnasespgr[] = "P 2ac 2ab"; double rnasereso = 5.0; struct TESThkldata { int h,k,l; float f,s,a,b,c,d; }; TESThkldata rnasehkldata[] = { {0,0,2,29.2,87.7,0.01,-0,0,0}, {0,0,4,455.7,12.2,-65.09,-0,0,0}, {0,0,6,714.2,8.5,5.31,-0,0,0}, {0,1,1,1368.6,12.2,0,5.56,0,0}, {0,1,2,523.7,8.5,-0,-0.13,0,0}, {0,1,3,191,2.4,-0,-11.65,0,0}, {0,1,4,292.9,6.1,0,11.53,0,0}, {0,1,5,374.8,10.9,-0,-8.1,0,0}, {0,1,6,323.2,8.5,0,0.21,0,0}, {0,1,7,336.9,7.2,-0,-5.57,0,0}, {0,2,0,1485.6,17.1,-12.38,-0,0,0}, {0,2,1,1139.3,8.5,-9.22,-0,0,0}, {0,2,2,146.1,20.7,-0.77,-0,0,0}, {0,2,3,350.4,7.3,-0.09,-0,0,0}, {0,2,4,476.3,12.1,1.74,-0,0,0}, {0,2,5,103.1,2.4,-1.69,-0,0,0}, {0,2,6,243.3,4.8,6.89,-0,0,0}, {0,2,7,417.7,13.3,-16.66,-0,0,0}, {0,3,1,227.8,12.2,-0,-1.6,0,0}, {0,3,2,747.5,8.5,0,0.07,0,0}, {0,3,3,20.7,1.2,-0,-0.08,0,0}, {0,3,4,10.9,1.2,0,-0.32,0,0}, {0,3,5,397.7,8.5,-0,-1.59,0,0}, {0,3,6,670.4,10.9,-0,-0.26,0,0}, {0,3,7,534.7,10.9,0,2.3,0,0}, {0,4,0,471.4,6.1,-0.84,-0,0,0}, {0,4,1,248.4,12.2,0.38,-0,0,0}, {0,4,2,210.6,3.7,-8.84,-0,0,0}, {0,4,3,110.7,1.2,0.26,-0,0,0}, {0,4,4,216.1,3.6,0.72,-0,0,0}, {0,4,5,369.7,8.5,0.52,-0,0,0}, {0,4,6,241.9,3.6,-1.06,-0,0,0}, {0,4,7,182.2,2.4,-3.62,-0,0,0}, {0,5,1,415.1,8.5,-0,-29.92,0,0}, {0,5,2,197.1,2.4,-0,-0.55,0,0}, {0,5,3,111.8,2.4,0,5.59,0,0}, {0,5,4,140.8,2.4,0,-0.29,0,0}, {0,5,5,471.4,9.7,-0,-3.02,0,0}, {0,5,6,603.4,16.9,0,0.87,0,0}, {0,5,7,158,2.4,0,8.01,0,0}, {0,6,0,1390.9,12.2,-22.22,-0,0,0}, {0,6,1,132.6,2.4,-1.62,-0,0,0}, {0,6,2,193.3,2.4,-2.16,-0,0,0}, {0,6,3,223.5,4.9,1.36,-0,0,0}, {0,6,4,135.9,2.4,-7.14,-0,0,0}, {0,6,5,142.9,2.4,0.28,-0,0,0}, {0,6,6,15.7,2.4,0.31,-0,0,0}, {0,6,7,171.2,2.4,-5.76,-0,0,0}, {0,7,1,625,12.2,0,0.08,0,0}, {0,7,2,207.8,2.4,-0,-0.02,0,0}, {0,7,3,325.4,6.1,-0,-3.12,0,0}, {0,7,4,628,8.5,-0,-16.81,0,0}, {0,7,5,472,13.3,-0,-9.2,0,0}, {0,7,6,88.2,1.2,0,0.05,0,0}, {0,8,0,385.2,7.3,-18.35,-0,0,0}, {0,8,1,377.9,4.9,-2.97,-0,0,0}, {0,8,2,886.5,12.1,62.91,-0,0,0}, {0,8,3,287.5,6.1,0.19,-0,0,0}, {0,8,4,395,8.5,-5.48,-0,0,0}, {0,8,5,433,7.3,9.3,-0,0,0}, {0,8,6,292.1,4.8,-37.35,-0,0,0}, {0,9,1,108.1,1.2,0,2.84,0,0}, {0,9,2,525.4,12.1,0,0.23,0,0}, {0,9,3,293.4,6.1,0,0.19,0,0}, {0,9,4,173.1,3.6,0,0.57,0,0}, {0,9,5,436.3,7.3,-0,-2.15,0,0}, {0,9,6,410,7.2,-0,-0.54,0,0}, {0,10,0,10.9,6.1,0.15,-0,0,0}, {0,10,1,14.6,3.6,-0.22,-0,0,0}, {0,10,2,452.2,8.5,-11.34,-0,0,0}, {0,10,3,142.9,2.4,-6.06,-0,0,0}, {0,10,4,381,7.3,-0.81,-0,0,0}, {0,10,5,642.4,10.9,4.87,-0,0,0}, {0,11,1,77.6,2.4,0,0.21,0,0}, {0,11,2,93.3,2.4,0,-0.14,0,0}, {0,11,3,542.1,10.9,-0,-0.26,0,0}, {0,11,4,445.9,9.7,0,10.42,0,0}, {0,11,5,223.2,4.8,0,0.17,0,0}, {0,12,0,238.5,7.3,24.05,-0,0,0}, {0,12,1,130.7,2.4,2.01,-0,0,0}, {0,12,2,65.3,2.4,-0.08,-0,0,0}, {0,12,4,348.8,7.2,26.57,-0,0,0}, {0,13,1,72.5,2.4,0,2.07,0,0}, {0,13,2,235.6,4.8,0,0.08,0,0}, {0,13,3,414.1,8.5,-0,-49.34,0,0}, {0,13,4,517.2,10.9,0,0.73,0,0}, {0,14,0,588.2,16.9,2.04,-0,0,0}, {0,14,1,429.9,9.7,0.24,-0,0,0}, {0,14,2,26.6,3.6,0.78,-0,0,0}, {0,14,3,125.4,2.4,-6.07,-0,0,0}, {0,15,1,161.6,3.6,0,0.05,0,0}, {0,15,2,97.6,2.4,0,-0.06,0,0}, {1,0,1,129.2,6.1,0,1.42,0,0}, {1,0,2,406.8,6.1,-1.33,-0,0,0}, {1,0,3,9.7,2.4,-0,-0.06,0,0}, {1,0,4,295.3,6.1,-0.28,-0,0,0}, {1,0,5,346.9,7.3,0,1.6,0,0}, {1,0,6,283.3,6.1,-11.31,-0,0,0}, {1,0,7,170.3,3.6,0,0.79,0,0}, {1,1,1,386.3,6.1,2.57,-0.11,-0.45,0.23}, {1,1,2,339.8,6.1,-1.33,-3.81,3.49,-1.3}, {1,1,3,582.8,6.1,-10.31,-4.05,-3.72,-3.74}, {1,1,4,467.8,9.7,1.29,-0.24,-0.55,0.38}, {1,1,5,139.5,2.4,-2.02,-2.01,-0.46,-1.74}, {1,1,6,541.1,10.9,8.64,11.11,0.53,-3.76}, {1,1,7,422.6,6,1.41,3.07,0.15,-0.32}, {1,2,0,214.5,6.1,0,0.11,0,0}, {1,2,1,433.8,6.1,0.07,-0.11,-0.03,0.02}, {1,2,2,93.8,17,-0.27,-0.04,0.12,0.22}, {1,2,3,222.6,2.4,0.4,-1.61,1.38,0.36}, {1,2,4,432.5,6.1,-0.32,0.8,0.12,0.12}, {1,2,5,213.5,2.4,-0.08,-0.1,-0.01,-0.06}, {1,2,6,290.5,3.6,-21.13,10.63,-5.07,6.49}, {1,2,7,525.2,8.5,0.06,-8.51,2.34,0.66}, {1,3,0,342.4,6.1,-0,-5.24,0,0}, {1,3,1,430,6.1,-2.11,0.27,-0.53,-0.51}, {1,3,2,361.6,4.9,0.1,-1.42,0.55,0.15}, {1,3,3,841.7,8.5,-4.25,5.17,0.29,1.37}, {1,3,4,471.3,6.1,0.23,-1.35,0.77,2.63}, {1,3,5,605.1,8.5,16.61,-8.61,-3.84,4.99}, {1,3,6,280.7,2.4,-0.32,-0.92,0.38,-0.31}, {1,4,0,321.5,8.5,-0,-10.67,0,0}, {1,4,1,116.9,17,1.34,-0.3,-0.4,0.34}, {1,4,2,647.5,6.1,5.42,35.2,2.95,-0.92}, {1,4,3,235.9,2.4,7.29,7.79,0.47,-4.84}, {1,4,4,262.3,2.4,1.72,-17.01,5.54,1.13}, {1,4,5,50.9,1.2,-0.96,0.43,-0.23,0.1}, {1,4,6,205.6,2.4,1.69,1.42,2.13,-1.33}, {1,5,0,674.5,6.1,-0,-2.15,0,0}, {1,5,1,472.3,6.1,-3.35,1.06,-1.49,0.89}, {1,5,2,643.5,8.5,-6.1,13.27,1.33,1.54}, {1,5,3,223.6,2.4,-2.6,-2.64,0.08,-1.37}, {1,5,4,400.5,4.9,1.2,-1.52,-0.25,2.67}, {1,5,5,401,4.8,10.95,7.49,-0.28,-1.33}, {1,5,6,116.1,1.2,3.03,-4.71,0.73,1.69}, {1,5,7,190.6,2.4,0.91,0.96,-0.01,-0.09}, {1,6,0,53.5,1.2,-0,-0.42,0,0}, {1,6,1,166.7,2.4,5.09,-2.35,-1.56,2.06}, {1,6,2,155.6,2.4,-0.73,0.23,-0.19,0.33}, {1,6,3,402.1,10.9,0.02,-0.05,0.42,0.35}, {1,6,4,562.9,8.5,-1.87,-0.65,-0.33,-0.29}, {1,6,5,122.3,1.2,3.09,-3.26,0.12,2.49}, {1,6,6,161.9,1.2,-1.23,0.27,-0.12,0.77}, {1,6,7,136.2,1.2,-0.58,-3.86,1.91,-0.55}, {1,7,0,402.5,10.9,-0,-10.69,0,0}, {1,7,1,396.4,4.9,0.07,-0.46,0.16,0.14}, {1,7,2,534.7,12.2,0.64,0.67,0.02,-0.31}, {1,7,3,188.2,2.4,-4.2,4.86,0.04,1.55}, {1,7,4,173.4,1.2,-0.85,1.92,1.66,3.43}, {1,7,5,325.6,3.6,-2.92,-2.44,-0.79,-2.31}, {1,7,6,324.9,2.4,-8.48,-8.39,-0.01,-3.9}, {1,8,0,238.2,3.6,-0,-0.13,0,0}, {1,8,1,132.4,1.2,-0.13,-1.96,1.44,-0.27}, {1,8,2,365.5,4.9,5.76,14.55,3.92,-3.57}, {1,8,3,293.6,3.6,0.4,-0.92,0.43,0.29}, {1,8,4,77.5,1.2,0.34,0.44,0.08,-0.3}, {1,8,5,250.3,2.4,-0.33,-0.28,-0.01,-0.03}, {1,8,6,179.8,2.4,-1.45,-1.34,0.16,-0.6}, {1,9,0,78.9,1.2,-0,-3.32,0,0}, {1,9,1,103.2,1.2,0.08,0.17,-1.18,-0.57}, {1,9,2,252.4,2.4,0.22,-1.06,1.49,0.27}, {1,9,3,217,2.4,-20.15,2.6,-0.93,0.24}, {1,9,4,204.6,2.4,-3.65,-13.99,1.69,-1.03}, {1,9,5,761.3,10.9,-5.49,-2.47,-0.56,-0.84}, {1,9,6,109.7,1.2,0.29,0.96,0.02,-0.02}, {1,10,0,230.5,3.6,0,3.19,0,0}, {1,10,1,361.5,4.9,-2.24,14.11,2.49,0.22}, {1,10,2,337,3.6,-4.77,15.35,1.86,1.17}, {1,10,3,254.3,2.4,2.32,4.47,1.25,-1.53}, {1,10,4,327.8,3.6,-0.28,0.15,0.35,0.78}, {1,10,5,431,4.8,0.66,-2.6,1.05,0.33}, {1,11,0,37.6,2.4,-0,-0.68,0,0}, {1,11,1,315.1,3.6,-4.61,0.39,-1.27,0.12}, {1,11,2,444.5,4.8,0.68,-2.26,0.45,0.3}, {1,11,3,113.7,1.2,0.85,-1.34,0.02,0.09}, {1,11,4,211.4,2.4,4.86,6.04,0.49,-2.82}, {1,11,5,405.3,4.8,1.2,-0.64,0.41,1.54}, {1,12,0,323.2,4.8,0,42.78,0,0}, {1,12,1,256.6,2.4,6.63,1.87,-1.41,-1.3}, {1,12,2,414.9,4.8,1.6,0.38,-0.18,-0.1}, {1,12,3,461.7,4.8,-0.06,-0.31,-0.35,-0.52}, {1,12,4,143.6,1.2,-0.74,-3.67,0.42,-0.64}, {1,13,0,786,10.9,-0,-6.73,0,0}, {1,13,1,993.8,14.5,0.17,-0.33,0.01,0.01}, {1,13,4,442.4,4.8,-0.05,0.93,0.95,-1.03}, {1,14,0,22.9,3.6,0,0.38,0,0}, {1,14,1,601.3,7.2,-3.48,-0.29,-1.94,0.96}, {1,14,3,490.7,6,-1.95,1.03,-0.35,0.54}, {1,15,0,341.3,6,-0,-1.93,0,0}, {1,15,1,869.4,14.5,0.44,0.23,-0.42,-0.76}, {1,15,2,284.4,3.6,-0.46,-6.92,1.85,-0.32}, {2,0,0,615.4,6.1,-0.26,-0,0,0}, {2,0,1,350.9,6.1,-0,-10.85,0,0}, {2,0,2,93.8,14.6,-0.2,-0,0,0}, {2,0,3,305.3,4.9,-0,-20.16,0,0}, {2,0,4,82.6,1.2,-0.32,-0,0,0}, {2,0,5,282.6,3.6,-0,-24.07,0,0}, {2,0,6,107.7,1.2,12.98,-0,0,0}, {2,0,7,453.9,9.7,0,4.35,0,0}, {2,1,0,782.3,6.1,0.16,-0,0,0}, {2,1,1,166.9,8.5,-0.35,0.35,0.49,0}, {2,1,2,485.8,9.7,-0.14,-0.18,0.01,-0.05}, {2,1,3,172.7,1.2,-0.71,1.98,1.65,-0.03}, {2,1,4,302.5,3.6,-5.88,-5.46,-0.34,-0.9}, {2,1,5,160.1,2.4,11.63,-4.93,-3.56,3.8}, {2,1,6,367.9,4.8,3.85,2.07,-0.53,-0.98}, {2,2,0,64.6,20.7,-0.39,-0,0,0}, {2,2,1,269.2,6.1,0.09,0.38,-0.08,-0.27}, {2,2,2,411.5,6.1,-0.11,-0.18,0.27,0.02}, {2,2,3,467.1,9.7,-0.99,-0.91,-0.02,-0.38}, {2,2,4,253.9,2.4,-18.53,7.1,-6.63,5.64}, {2,2,5,403.8,4.9,0.57,0.03,-0.16,-0.56}, {2,2,6,210.5,2.4,4.5,14.42,4.52,-3.19}, {2,2,7,111,1.2,-0.35,0.48,0.03,0.05}, {2,3,0,248.5,6.1,0.59,-0,0,0}, {2,3,1,649.1,6.1,0.15,-0.06,-0.57,0.42}, {2,3,2,438.2,6.1,6.73,-1.03,-3.25,-0.35}, {2,3,3,520.5,6.1,-0.54,-0.17,-0.11,-0.15}, {2,3,4,188.2,2.4,4.63,2.45,-0.21,-0.48}, {2,3,5,66.7,1.2,3.55,-0.14,-0.77,0.13}, {2,3,6,398,4.8,0.06,0.59,0.05,-0.01}, {2,4,0,256.9,8.5,-6.68,-0,0,0}, {2,4,1,375,6.1,0.12,-0.02,-0.07,-0.11}, {2,4,2,856.6,8.5,-9.29,-9.01,-0.04,-1.4}, {2,4,3,367.1,3.6,-0.24,-0.33,0.04,-0.29}, {2,4,4,161.5,1.2,0.48,-0.06,-2.28,-1.77}, {2,4,5,391.4,3.6,7.89,0.56,-2.19,-0.77}, {2,4,6,240.7,2.4,3.24,4.64,0.84,-2.23}, {2,5,0,114.4,2.4,3.52,-0,0,0}, {2,5,1,333.4,4.9,1.85,0.11,-1.24,-0.51}, {2,5,2,317.4,4.9,23.69,0.5,-1.32,0.05}, {2,5,3,294.1,3.6,7.48,-3.57,-0.66,1.7}, {2,5,4,523,8.5,21.3,-3.75,-4.19,2.49}, {2,5,5,241.1,2.4,0.24,-0.37,0.02,0.05}, {2,5,6,201.9,2.4,0.17,0.01,-0.05,-0}, {2,6,0,19.5,3.6,0.1,-0,0,0}, {2,6,1,295.6,4.9,-1.03,0.86,-0.04,0.37}, {2,6,2,306.3,3.6,-5.49,-1.69,-2.45,-3.87}, {2,6,3,155.5,2.4,-0.35,-4.49,0.9,-0.37}, {2,6,4,409.9,4.9,4.6,0.8,-0.9,-0.37}, {2,6,5,457.7,6.1,-3.85,-1.4,-0.68,-0.6}, {2,6,7,303.7,2.4,0.93,7.03,2.04,-0.55}, {2,7,0,604.3,8.5,1.26,-0,0,0}, {2,7,1,459.5,13.4,6.83,-10.93,2.15,4.44}, {2,7,2,115.4,1.2,-0.38,0.86,0.15,0.13}, {2,7,3,258.5,3.6,-13.32,-11.94,-0.74,-8.65}, {2,7,4,327.3,3.6,-0.82,-1.03,-0.01,-0.6}, {2,7,5,428.3,4.8,-5.82,-8.82,1,-2.45}, {2,8,0,286.7,6.1,-8.1,-0,0,0}, {2,8,1,422.7,6.1,4.68,-24.93,10.73,3.91}, {2,8,2,233.1,3.6,1.27,0.77,-0.56,-0.74}, {2,8,3,120.1,2.4,-0.99,-5.01,2.11,-0.71}, {2,8,4,331.9,4.8,-11.14,7,-1.76,3.58}, {2,8,5,343.4,3.6,0.13,6.04,3.09,1.53}, {2,8,6,30.2,1.2,0.2,0.57,0.11,-0.09}, {2,9,0,380,8.5,-1.6,-0,0,0}, {2,9,1,166.3,2.4,8.22,2.58,-3.96,-2.51}, {2,9,2,106.7,1.2,-0.93,-1.73,0.53,-0.72}, {2,9,3,185.4,2.4,2.6,0.02,-2.81,0.51}, {2,9,4,61.7,1.2,-0.36,-0.85,0.36,-0.46}, {2,9,5,234.4,2.4,0.42,0.24,0.29,-0.34}, {2,9,6,256.8,2.4,-1.96,-5.44,1.47,-0.97}, {2,10,0,249.9,4.9,-8.43,-0,0,0}, {2,10,1,471.7,7.3,4.95,9.76,2.41,-1.74}, {2,10,2,32.7,2.4,0.4,-0.16,-0.11,0.1}, {2,10,3,122.3,1.2,-0.23,0.31,0.3,0.18}, {2,10,4,163.2,2.4,-1.26,-0.08,-0.99,-0.69}, {2,10,5,178.7,2.4,-1.36,-3.72,1.56,-1.74}, {2,11,0,481.1,9.7,4.82,-0,0,0}, {2,11,1,284.7,3.6,3.46,4.07,-0.25,-3.96}, {2,11,2,446.8,4.8,6.15,-0.2,-2.26,0.26}, {2,11,3,464.5,4.8,8.12,-3.56,-1.66,2.04}, {2,11,5,513.7,6,0.6,-0.88,0.08,0.45}, {2,12,0,346.2,6.1,-1.93,-0,0,0}, {2,12,1,188.8,2.4,2.88,-1.53,-0.54,0.44}, {2,12,2,264.9,3.6,-10.54,4.38,-0.32,0.46}, {2,12,3,409.6,4.8,2.27,1.7,-0.58,-2.07}, {2,12,4,35,2.4,0.33,0.11,-0.12,-0.08}, {2,13,0,37.5,2.4,0.18,-0,0,0}, {2,13,1,501.6,6,0.36,-0.58,0.08,0.24}, {2,13,2,270.6,3.6,-0.87,0.47,-4.83,0.59}, {2,13,3,379,4.8,-0.94,-1.65,0.35,-0.67}, {2,13,4,237.4,2.4,-6.67,-2.4,-0.62,-0.15}, {2,14,0,223.4,3.6,-8.18,-0,0,0}, {2,14,1,536,6,-0.16,0.63,0.3,-0.01}, {2,14,3,283.3,3.6,0.74,-1.53,0.33,0.69}, {2,15,0,1002,14.5,1.28,-0,0,0}, {2,15,1,315.9,3.6,1.19,2.28,0.85,-1.03}, {3,0,1,104.7,12.2,-0,-0.3,0,0}, {3,0,2,484.5,6.1,-0.01,-0,0,0}, {3,0,3,495,6.1,-0,-24.37,0,0}, {3,0,4,122.7,1.2,3.64,-0,0,0}, {3,0,5,61.8,1.2,-0,-0.06,0,0}, {3,0,6,549.3,8.5,3.26,-0,0,0}, {3,0,7,29,2.4,0,0.49,0,0}, {3,1,0,49.9,26.8,-0,-0.08,0,0}, {3,1,1,427.5,6.1,-1.86,-1.01,-0.17,-0.26}, {3,1,2,315.3,3.7,0.8,8.92,1.07,-0.18}, {3,1,3,537.5,9.7,5.27,-5.62,0.07,3.31}, {3,1,4,213.7,2.4,3.39,-8.67,2.31,2.06}, {3,1,5,389.2,4.8,1.03,-1.51,0.35,0.75}, {3,1,6,125.8,1.2,-0.18,0.22,0,0.11}, {3,2,0,263.1,6.1,-0,-1.74,0,0}, {3,2,1,96.2,17,0.05,0.01,-0.11,0.22}, {3,2,2,85.2,1.2,0.69,-1.93,0.33,0.38}, {3,2,3,581.2,12.2,-7.36,-6.15,-0.19,-5.89}, {3,2,4,133.6,1.2,-0.24,-1.69,0.4,-0.05}, {3,2,5,344.3,3.6,4.57,-2.31,-0.64,0.71}, {3,2,6,304.8,3.6,-5.7,6.18,0.15,3.02}, {3,2,7,377.7,6,-0.49,-1.05,2.51,-1.82}, {3,3,0,283.7,6.1,0,1.35,0,0}, {3,3,1,266.6,3.7,-1.87,-0.17,-0.11,-0.61}, {3,3,2,749.5,6.1,-3.52,-28.34,4.81,-0.98}, {3,3,3,967.6,8.5,-2.62,1.1,-0.64,0.8}, {3,3,4,437,3.6,-2.7,-1.48,-1.74,-1.18}, {3,3,5,489.6,6.1,11.05,-2.83,-2.76,1.34}, {3,3,6,445,4.8,-8.09,-15.83,1.87,-1.02}, {3,3,7,515.1,6,0.34,-0.79,0.18,0.12}, {3,4,0,25.6,2.4,0,0.21,0,0}, {3,4,1,372.4,4.9,-21.86,-6.87,-1.91,-2.29}, {3,4,2,285.8,3.6,0.44,-0.8,0.12,0.27}, {3,4,3,172.6,2.4,0.42,-0.72,0.32,1.79}, {3,4,4,466,6.1,0.2,-2.57,0.45,0.14}, {3,4,5,87.2,1.2,-0.26,-0.23,-0.74,-0.55}, {3,4,6,394.1,3.6,0.95,-0.26,-0.14,0.28}, {3,4,7,96.5,1.2,0.11,-0.14,0.42,0.49}, {3,5,0,49.9,1.2,-0,-2.38,0,0}, {3,5,1,223.8,3.6,-0.43,0.09,-0.4,0.25}, {3,5,2,418.2,6.1,-0.91,0.57,-0.2,0.46}, {3,5,3,490.7,13.4,-4.54,3.59,-0.44,1.38}, {3,5,4,232.9,2.4,7.67,-10.54,1.7,6.61}, {3,5,5,383.9,3.6,-0.34,-1,0.14,-0.1}, {3,5,6,349.2,3.6,2.76,-1.16,-2,1.27}, {3,5,7,231.4,2.4,1.56,-5.53,0.58,0.88}, {3,6,0,127.7,2.4,-0,-3.71,0,0}, {3,6,1,359.9,4.9,-1.13,-17.84,1.6,-0.15}, {3,6,2,473.9,9.7,5.6,5.49,0.26,-3.03}, {3,6,3,633.7,8.5,7.77,12.5,1.07,-2.5}, {3,6,4,412.2,4.8,0.43,-3.56,0.97,0.17}, {3,6,5,236,2.4,2.46,4.04,3.19,-2.99}, {3,6,6,72.5,1.2,0.34,0.13,-0.3,-0.3}, {3,7,0,455.8,9.7,0,2.01,0,0}, {3,7,1,334.2,4.9,-1.5,-0.1,-1.6,0.82}, {3,7,2,421.4,8.5,0.06,0.28,0.12,-0.05}, {3,7,3,406.5,8.5,4.31,1.81,-0.95,-2.76}, {3,7,4,768.2,8.5,0.66,-0.48,-0.28,0.59}, {3,7,5,347.2,4.8,1.84,3.91,0.44,-0.43}, {3,7,6,428.5,4.8,0.07,-0.54,0.14,0.2}, {3,8,0,115.4,2.4,0,0.3,0,0}, {3,8,1,252.6,3.6,-5.76,9.72,3.84,7}, {3,8,2,280.3,3.6,4.39,13.34,4.06,-2.95}, {3,8,3,489.8,7.3,-5.95,-3.22,-0.93,-1.4}, {3,8,4,152.6,2.4,-5.77,-0.01,-3.1,-0.01}, {3,8,5,353,4.8,-5.26,12.93,4.49,5.12}, {3,8,6,256.9,2.4,0.58,1.35,0.69,-0.52}, {3,9,0,135.9,2.4,0,0.09,0,0}, {3,9,1,440.4,6.1,-0,-0.22,-0.54,0.28}, {3,9,2,83.7,1.2,-0.29,3.91,1.11,0.03}, {3,9,3,266.5,3.6,-6.02,0.07,-2.82,0.15}, {3,9,4,526.3,7.3,0.48,2.46,0.58,-0.16}, {3,9,5,55.6,1.2,0.3,0.27,0.02,-0.28}, {3,9,6,460.4,4.8,0.63,-6.36,0.79,-0.02}, {3,10,0,310.4,6.1,-0,-14.82,0,0}, {3,10,1,180.6,2.4,-4.54,-4.37,-0.34,-2.11}, {3,10,2,266.5,3.6,1.52,-2.54,0.37,0.87}, {3,10,3,268.7,3.6,-14.18,0.79,-1.48,0.19}, {3,10,4,282.9,3.6,-2.68,-5.74,1.19,-1.26}, {3,10,5,113.4,1.2,1.97,4.14,1,-1.28}, {3,11,0,390,8.5,0,29.6,0,0}, {3,11,1,17,4.8,0.03,0.07,-0,-0.03}, {3,11,2,111.4,1.2,0.01,0.01,-0,-0}, {3,11,3,206.8,3.6,-9.24,7.04,-1.3,4.81}, {3,11,4,528.9,7.2,3.21,6.71,0.81,-1.95}, {3,11,5,242.3,3.6,0.86,-0.57,0,0.1}, {3,12,0,88.3,2.4,0,1.69,0,0}, {3,12,1,407.7,6,-6.65,7.43,1.1,5.06}, {3,12,2,217.6,3.6,2.34,-2.67,0.02,0.95}, {3,12,4,442.7,6,-0.2,0.18,0.38,0.17}, {3,13,0,87,2.4,0,0.05,0,0}, {3,13,1,261,3.6,-0.74,-1.56,1.04,-0.46}, {3,13,2,254.8,3.6,-0.25,0.12,-0.1,-0.03}, {3,13,3,388.5,6,-0,0.08,0.02,0.03}, {3,14,0,295.7,6,-0,-12.82,0,0}, {3,14,1,164.1,2.4,-2.86,3.18,-0.14,2.56}, {3,14,2,417.3,6,-0.41,0.04,-0.12,0}, {3,15,0,219.4,3.6,0,5.51,0,0}, {3,15,1,303.7,3.6,3.52,-0.31,-1.11,0.25}, {4,0,0,899.8,6.1,5.1,-0,0,0}, {4,0,1,214.3,3.7,0,2.2,0,0}, {4,0,2,174,2.4,3.61,-0,0,0}, {4,0,3,543.3,6.1,-0,-0.87,0,0}, {4,0,4,264.6,3.6,1.49,-0,0,0}, {4,0,5,141.8,2.4,-0,-5.22,0,0}, {4,0,6,216.5,3.6,-2.96,-0,0,0}, {4,0,7,228,3.6,-0,-0.78,0,0}, {4,1,0,210.6,3.7,-3.01,-0,0,0}, {4,1,1,764.5,6.1,-7.52,-0.05,-8.22,-0.32}, {4,1,2,450.2,6.1,0.38,-0.26,-1.82,0.61}, {4,1,3,230.9,2.4,-0.28,0.28,-1.01,1.11}, {4,1,4,239.1,2.4,-13.76,-9.99,-1.7,-2.56}, {4,1,5,237.5,2.4,-6.91,1.66,-7.28,2.11}, {4,1,6,154.8,1.2,-0.41,-0.19,-0.66,-0.22}, {4,1,7,235.2,2.4,0.6,0.59,-0.11,-0.11}, {4,2,0,774.3,6.1,2.33,-0,0,0}, {4,2,1,444.3,6.1,0.43,0.04,3.06,-1.35}, {4,2,2,573,12.2,0.18,-0.08,-0.04,0.06}, {4,2,3,398.6,3.6,-4.4,-22.53,8.71,-3.45}, {4,2,4,29.1,2.4,-0.58,0.18,-0.14,0.12}, {4,2,5,409.5,3.6,0.19,0.39,0.21,-0.27}, {4,2,6,182.6,2.4,0.49,-0.02,-0.26,0.02}, {4,3,0,1167.2,8.5,-8.28,-0,0,0}, {4,3,1,366.3,4.9,-2.72,-2,-0.4,-1.48}, {4,3,2,227.4,2.4,0,0,-0,-0.01}, {4,3,3,307.4,3.6,5.41,-5.98,0.86,4.74}, {4,3,4,422.3,4.9,-2.59,-1.72,-0.23,-1.06}, {4,3,5,284.7,2.4,-0.18,0.14,-0.03,0.11}, {4,3,6,382,3.6,0.08,0.19,0.12,-0.21}, {4,3,7,287,2.4,-5.76,1.96,-0.39,0.45}, {4,4,0,416.1,8.5,0.04,-0,0,0}, {4,4,1,835.7,6.1,5.12,3.86,-0.65,-1.39}, {4,4,2,781.7,6.1,-0.18,0.63,0.1,0.04}, {4,4,3,280.6,3.6,-0.01,-7.75,2.57,-0.15}, {4,4,4,615,6.1,1,13.39,5.06,-0.52}, {4,4,5,284.6,2.4,-0.52,0.1,-0.38,0.14}, {4,4,6,406,4.8,-0.06,4.55,0.68,-0.07}, {4,4,7,202.5,2.4,-2.36,-1.77,-0.35,-2.67}, {4,5,0,490.1,9.7,-1.17,-0,0,0}, {4,5,1,800.1,8.5,-2.13,-1.14,-1.49,-2.9}, {4,5,2,700,6.1,0.35,-0.11,-0.06,0.02}, {4,5,3,323,3.6,12.03,-17.32,2.54,7.1}, {4,5,4,270.4,3.6,-5.49,-2.44,-0.99,-1.21}, {4,5,5,219.1,2.4,-2.02,-0.3,-3.88,-0.65}, {4,5,6,252.4,2.4,-0.02,-0.08,0.01,-0}, {4,6,0,134.9,2.4,8.43,-0,0,0}, {4,6,1,533.5,8.5,-5.3,13.14,5.72,5.2}, {4,6,2,44.9,2.4,-0.45,0.29,-0.12,0.18}, {4,6,3,311.9,4.9,-1.23,21.4,10.96,1.27}, {4,6,4,328.4,3.6,-1.67,3.57,0.92,1.1}, {4,6,5,360.5,3.6,-3.72,8.51,2.54,2.47}, {4,6,6,540.8,6,0.1,-0.06,-0.02,-0}, {4,7,0,355.9,7.3,-35.26,-0,0,0}, {4,7,1,672.9,6.1,7.76,1.2,-1.92,-0.76}, {4,7,2,332.6,4.9,2.9,0.74,-3.56,-0.55}, {4,7,3,139.5,2.4,7.62,-2.62,-2.65,2.28}, {4,7,4,153.8,2.4,-6.94,3.32,-1.26,1.28}, {4,7,5,187.4,2.4,-4.74,1.27,-1.96,0.85}, {4,7,6,395.7,4.8,3.42,-1.29,-1.07,0.79}, {4,8,0,365.4,7.3,25.64,-0,0,0}, {4,8,1,487.9,7.3,0.15,-0.52,0.26,0.08}, {4,8,2,189.2,2.4,1.08,0.16,-0.19,-0.06}, {4,8,3,376.9,6.1,-0.6,-0.23,-0.2,-0.11}, {4,8,4,269.9,3.6,5.84,2.65,-1.11,-1.51}, {4,8,5,300.8,3.6,0.09,0.83,0.26,-0.04}, {4,8,6,247.2,2.4,-0.54,-0.27,-0.42,-0.03}, {4,9,0,168.6,4.9,-0.11,-0,0,0}, {4,9,1,229.2,4.9,0,-0.01,0.01,-0}, {4,9,2,300.6,4.8,3.11,-0.02,-1.93,0.86}, {4,9,3,165.9,2.4,14.31,0.33,-5.75,-0.24}, {4,9,4,255.2,3.6,0.9,-3.07,1.86,0.65}, {4,9,5,297,3.6,0.75,-0.27,-0.3,0.06}, {4,10,0,409.6,8.5,-8.06,-0,0,0}, {4,10,1,238.7,3.6,0.42,1.18,0.49,-0.88}, {4,10,2,289.4,4.8,0.06,0.15,-0.25,0.42}, {4,10,3,502.1,10.9,0.56,2.55,0.3,-0.15}, {4,10,4,256.1,3.6,-1.6,0.84,-0.08,0.17}, {4,10,5,496.9,6,0.36,0.08,0.27,-0.23}, {4,11,0,109,2.4,4.24,-0,0,0}, {4,11,1,445.5,6.1,-2.13,0.83,-0.58,0.57}, {4,11,2,604.9,9.7,7.23,-0.42,-1.37,0.15}, {4,11,3,70.1,1.2,0.7,1.18,0.19,-0.51}, {4,11,4,360.9,7.2,-5.7,-3.4,-0.95,-2.69}, {4,12,0,430.6,8.5,1.86,-0,0,0}, {4,12,1,194.7,2.4,0.44,2.07,2.3,-1.65}, {4,12,2,188.5,2.4,0.12,-0.34,0.09,0.04}, {4,12,3,161.8,2.4,-0.44,-2.62,1.16,-0.4}, {4,12,4,588.4,8.4,0.55,0.29,0.53,-0.5}, {4,13,0,224.7,4.8,0.03,-0,0,0}, {4,13,1,466.2,7.2,5.24,-3.15,-1.56,1.43}, {4,13,2,198,2.4,0.45,-0.12,-0.2,0.12}, {4,13,3,382.3,4.8,7.77,5.65,-0.75,-4.97}, {4,14,0,253.4,4.8,-0.85,-0,0,0}, {4,14,1,442.7,7.2,-2.06,1.33,0.97,1.76}, {4,14,2,483.4,7.2,0.05,-0.11,0.01,0.01}, {5,0,1,429.5,8.5,-0,-17.83,0,0}, {5,0,2,1364.3,12.2,-16.95,-0,0,0}, {5,0,3,258.7,3.6,-0,-17.04,0,0}, {5,0,4,84.9,1.2,-2.48,-0,0,0}, {5,0,5,65.4,2.4,-0,-0.58,0,0}, {5,0,6,73.7,2.4,0.45,-0,0,0}, {5,0,7,487,7.2,0,2.39,0,0}, {5,1,0,929.6,8.5,-0,-1.52,0,0}, {5,1,1,101,1.2,-0.52,0.5,0.2,0.46}, {5,1,2,437.7,6.1,-0.19,1.04,0.41,0.16}, {5,1,3,222.3,2.4,6.78,-4.36,-1.23,2.79}, {5,1,4,109.2,2.4,-0.95,-0.36,-0.26,-0.27}, {5,1,5,443.2,4.8,5.49,-0.69,-0.83,0.21}, {5,1,6,108.8,1.2,0,0,-0,-0.01}, {5,1,7,315.8,3.6,-2.81,2.32,-0.21,0.57}, {5,2,0,479.4,9.7,-0,-0.71,0,0}, {5,2,1,821.1,10.9,3.99,2.78,-1.86,-9.98}, {5,2,2,906.9,8.5,-1.75,10.49,1.8,0.56}, {5,2,3,614.6,6.1,8.57,-8.56,-0.4,4.49}, {5,2,4,439.1,3.6,1.18,-2.48,0.67,0.84}, {5,2,5,123.5,1.2,-1.77,-0.36,-1.35,-1.59}, {5,2,6,151,2.4,0.05,0.08,-0.09,0.14}, {5,2,7,198.9,2.4,0.36,-0.4,0.02,0.22}, {5,3,0,278.5,4.9,0,5.9,0,0}, {5,3,1,621.4,10.9,3.39,-0.55,-1.55,0.94}, {5,3,2,55.9,1.2,-0.45,1.94,0.35,0.16}, {5,3,3,603.5,8.5,-0.12,0.5,0.32,0.74}, {5,3,4,41.2,1.2,0.22,0.24,0.09,-0.22}, {5,3,5,94.4,1.2,-4.97,3.75,-0.41,1.79}, {5,3,6,124.4,1.2,-0.88,3.33,1.18,1.07}, {5,4,0,181.2,3.6,-0,-8.21,0,0}, {5,4,1,263.8,3.6,-0.28,8.1,1.21,0.36}, {5,4,2,507.9,7.3,-0.24,-0.33,0.09,-0.13}, {5,4,3,452.8,6.1,-0.16,-4.84,1.82,-0.28}, {5,4,4,209.7,2.4,-0.5,-1.22,0.48,-0.14}, {5,4,5,415.1,4.8,3.65,-7.97,2.13,2.5}, {5,4,6,178.7,2.4,-0.91,1.88,0.6,0.71}, {5,5,0,374.4,8.5,-0,-12.82,0,0}, {5,5,1,333,4.9,-1.25,0.65,-0.23,0.64}, {5,5,2,416.6,6.1,-2.12,-2.88,0.19,-2.15}, {5,5,3,145.6,1.2,-0.22,-3.06,1.53,-1.28}, {5,5,4,144.2,1.2,-1.41,5.24,0.93,0.47}, {5,5,5,245.6,2.4,0.38,1.57,1.03,-0.77}, {5,5,6,408,3.6,-0.59,0.77,-1.13,-0.79}, {5,6,0,349.9,7.3,-0,-0.39,0,0}, {5,6,1,183.4,2.4,2.1,1.51,-1.54,-1.5}, {5,6,2,463.7,7.3,-0.85,1.59,1.9,0.72}, {5,6,3,320.2,3.6,-3.36,1.87,-1.01,4.8}, {5,6,4,344,3.6,-0.85,-0.4,-0.07,-0.09}, {5,6,5,235.8,3.6,1.84,2.05,0.33,-0.81}, {5,6,6,248.5,2.4,-0.38,-0.11,-0.34,0}, {5,7,0,204,3.6,0,4.73,0,0}, {5,7,1,537.7,7.3,1.4,0.27,-0.69,-0.36}, {5,7,2,214.7,2.4,-1.31,-6.98,4.67,-1.55}, {5,7,3,596.3,12.1,-0.04,-0.13,0.04,-0.02}, {5,7,4,158.6,2.4,3,-3.34,0.52,2.41}, {5,7,5,529.2,6,-1.33,-0.41,-0.3,-0.07}, {5,7,6,401.5,4.8,-0.11,-0.09,0.29,-0.14}, {5,8,0,257.2,4.9,0,0.25,0,0}, {5,8,1,508.2,7.3,8.88,3.42,-2.25,-1.85}, {5,8,2,486.1,7.3,-2.28,-3.29,0.86,-2.26}, {5,8,3,312.5,4.8,5.51,-2.7,-0.61,0.79}, {5,8,4,476.5,6,4.96,0.88,-1.09,-0.52}, {5,8,5,345.3,3.6,3.43,7.66,0.2,-2.94}, {5,9,0,441.3,9.7,-0,-3.84,0,0}, {5,9,1,327.2,4.8,-0.57,0.96,0.24,0.27}, {5,9,2,193.8,2.4,-0.48,-0.41,0.98,0.09}, {5,9,3,507.1,7.3,3.65,0.71,-1.18,-0.48}, {5,9,4,315.4,4.8,0.23,0.75,0.14,-0.11}, {5,9,5,213.5,2.4,-0.15,-0.87,0.09,-0.03}, {5,10,0,197.4,3.6,-0,-3.5,0,0}, {5,10,1,182.9,2.4,-5.33,1.2,-2.13,1.59}, {5,10,2,344.9,4.8,-0.81,1.31,0.31,1.68}, {5,10,3,310.7,4.8,10.18,4.01,-2.87,-2.74}, {5,10,4,100.2,1.2,-1.91,3.78,0.87,1.18}, {5,10,5,362.8,4.8,10.54,-11.75,0.61,5.48}, {5,11,0,9.7,8.5,0,0.03,0,0}, {5,11,1,125.8,2.4,-3.48,2.41,-0.04,0.31}, {5,11,2,218.8,3.6,0.93,-3.55,1.87,1.17}, {5,11,3,181.2,2.4,-0.31,-0.2,-0.02,-0.27}, {5,11,4,358.3,4.8,-3.49,-8.08,4,-2.94}, {5,12,1,215.1,4.8,1.09,-1.65,0.28,1.02}, {5,12,2,378,4.8,-0.16,-0.06,-0.02,-0.01}, {5,12,3,73.6,2.4,0.19,1.92,0.68,-0.14}, {5,13,0,234.2,6,-0,-0.11,0,0}, {5,13,1,218.5,4.8,0.09,-0.39,0.22,-0.01}, {5,13,2,417.4,8.4,-1.14,0.81,-0.32,0.47}, {5,13,3,250.7,4.8,0.98,-3.47,0.89,0.57}, {5,14,0,542.6,10.9,0,0.18,0,0}, {5,14,1,614.8,12.1,0.09,-1.85,1.32,1.01}, {6,0,0,875.5,6.1,0.15,-0,0,0}, {6,0,1,351.3,7.3,0,0.61,0,0}, {6,0,2,462.9,9.7,-1.1,-0,0,0}, {6,0,3,32.8,1.2,0,0.03,0,0}, {6,0,4,441.3,6.1,0.29,-0,0,0}, {6,0,5,71.4,1.2,-0,-4.32,0,0}, {6,0,6,759.6,15.7,-6.73,-0,0,0}, {6,1,0,556.9,10.9,-6.62,-0,0,0}, {6,1,1,521.5,7.3,-6.27,-12.63,1.69,-3.18}, {6,1,2,345.1,4.9,1.78,-2.48,0.53,1.84}, {6,1,3,647,13.4,-4.65,4.99,0.49,5.28}, {6,1,4,247.3,2.4,6.23,-4,-2.15,3.8}, {6,1,5,612.3,8.5,-0.46,8.38,2.75,0.45}, {6,1,6,602.6,7.2,-1.64,8.92,1.23,0.41}, {6,2,0,31.6,4.9,-0.1,-0,0,0}, {6,2,1,373.2,6.1,-1.26,-3.9,1.61,-1.55}, {6,2,2,102,1.2,3.93,-0.94,-1.38,0.89}, {6,2,3,165.1,1.2,-0.04,0.38,-0,0.4}, {6,2,4,160,2.4,3.74,2.11,-2.53,-2.68}, {6,2,5,290.4,2.4,0.02,-0.13,1.71,0.61}, {6,2,6,257.2,2.4,-0.2,0.1,0.18,-0.15}, {6,3,0,437.6,8.5,-0.1,-0,0,0}, {6,3,1,386.4,4.9,-16.37,-10.53,-1.8,-2.84}, {6,3,2,174.9,2.4,2.2,-0.48,-0.55,0.22}, {6,3,3,26.7,2.4,-0.23,0.01,-0.09,0.04}, {6,3,4,235.1,2.4,-0.01,0.26,0.11,-0.23}, {6,3,5,349.6,3.6,7.63,4.89,-1.86,-3.64}, {6,3,6,514.2,6,-0.04,0.03,-0.06,0.06}, {6,4,0,323.2,6.1,13.92,-0,0,0}, {6,4,1,375.4,4.9,-0,1.14,0.21,0.03}, {6,4,2,829.2,17,0.14,0.65,0.53,-0.38}, {6,4,3,838.1,17,-7.86,2.7,-1.27,1.07}, {6,4,4,112.7,1.2,-3.77,0.81,-0.71,0.4}, {6,4,5,304.7,3.6,10.97,-1.73,-4.88,1.49}, {6,4,6,181,2.4,0.21,1.11,0.53,-0.57}, {6,5,0,167.6,3.6,-10.82,-0,0,0}, {6,5,1,205.2,2.4,-0.73,-0.2,-0.41,-1.02}, {6,5,2,422.3,4.9,4.78,0.41,-1.34,-0.31}, {6,5,3,180.7,2.4,-6.67,-3.2,-1.85,-2.35}, {6,5,4,181.6,2.4,-9.68,-4.98,-2.08,-2.87}, {6,5,6,314.8,3.6,-0.32,0.1,-0.03,0.03}, {6,6,0,177.2,3.6,1.96,-0,0,0}, {6,6,1,417.5,6.1,0.28,-6.39,1.72,0.15}, {6,6,2,146.8,2.4,-0.89,0.35,-2.68,-0.55}, {6,6,3,60.6,1.2,0.09,0.14,0.33,-0.33}, {6,6,4,214.2,2.4,-2.44,0.48,-1.51,0.48}, {6,6,5,224.7,2.4,2.17,1.07,-0.85,-1.3}, {6,6,6,127.8,1.2,-4.47,-0.88,-1.8,-0.82}, {6,7,0,144.4,3.6,-3.99,-0,0,0}, {6,7,1,322.6,4.9,1.72,-13.91,4.31,-0.42}, {6,7,2,275.2,3.6,-7.71,-3.84,-0.91,-2.02}, {6,7,3,500.2,7.3,0.22,3.03,3.76,0.46}, {6,7,4,85.9,1.2,-0.29,0.27,-0.44,0.11}, {6,7,5,32.6,2.4,-0,0.11,0.06,-0.06}, {6,8,0,134.6,2.4,7.13,-0,0,0}, {6,8,1,344.2,4.8,-0.2,-0.29,0.02,-0.05}, {6,8,2,381.6,4.8,3.05,-0.15,-2.24,-0.76}, {6,8,3,153.7,2.4,-0.02,0.11,0.53,-0.12}, {6,8,4,297.3,4.8,-0.73,-0.96,-0.04,-0.66}, {6,8,5,211.1,2.4,-0.03,-0.16,0.01,-0.01}, {6,9,0,603.2,12.1,-0,-0,0,0}, {6,9,1,415.4,6.1,4.31,-1.93,-1.41,1.92}, {6,9,2,268.7,3.6,-1.43,1.09,1.53,2.17}, {6,9,3,117.3,2.4,-0.85,-0.3,-0.29,-0.31}, {6,9,4,501.2,7.2,-0.44,1.74,0.39,0.22}, {6,9,5,353.2,3.6,8.72,-2.36,-4.28,2.5}, {6,10,0,3.6,13.3,0.08,-0,0,0}, {6,10,1,174.2,2.4,1.53,1.38,-0.2,-1.05}, {6,10,2,189.9,2.4,-4.25,0.51,-3.24,0.33}, {6,10,3,694.7,9.7,-0.18,0.09,0.05,-0.13}, {6,10,4,254.6,3.6,-0.16,0.75,0.18,0.14}, {6,11,0,258.7,4.8,2.64,-0,0,0}, {6,11,1,599.6,8.5,5.52,-11.85,2.59,3.11}, {6,11,2,403.5,6,1.07,-1.44,0.08,0.13}, {6,11,3,336.7,4.8,-5.6,-4.79,-0.25,-2.27}, {6,11,4,409.8,4.8,2.05,1.07,-1.3,-0.4}, {6,12,0,132.9,3.6,-0.5,-0,0,0}, {6,12,1,78.5,2.4,-0.99,-1.67,0.01,-0.15}, {6,12,2,255.9,3.6,-2.19,2.4,-3.27,3.08}, {6,12,3,185.7,2.4,-1.58,1.67,-0.53,2.32}, {6,13,0,530.8,10.9,1.97,-0,0,0}, {6,13,1,477.6,7.2,-0.42,0.38,-0.02,0.1}, {6,13,2,241.1,3.6,-0.06,-0.04,-0.16,-0.08}, {7,0,1,223.5,2.4,0,2.21,0,0}, {7,0,2,15.8,3.6,0.31,-0,0,0}, {7,0,3,179.5,2.4,0,8.67,0,0}, {7,0,4,221.6,2.4,5.26,-0,0,0}, {7,0,5,373.6,4.8,0,19.03,0,0}, {7,0,6,523.6,7.2,0.09,-0,0,0}, {7,1,0,195.6,3.6,0,0.65,0,0}, {7,1,1,188.3,2.4,-0.32,0.04,-0.06,0.09}, {7,1,2,378.7,4.9,-0.36,-1.13,4.89,1.16}, {7,1,3,286.2,3.6,-1,-3.48,0.7,-0.46}, {7,1,4,299.1,3.6,0.57,1.49,0.54,-0.49}, {7,1,5,742.3,15.7,-0.47,-0.14,-0.02,-0.02}, {7,1,6,246.1,2.4,-0.04,2.95,2.11,1.84}, {7,2,0,35.2,4.9,0,0.22,0,0}, {7,2,1,332.7,3.6,-0.35,3.6,0.85,0.16}, {7,2,2,128.7,1.2,0.47,9.71,0.86,0.07}, {7,2,3,675.4,9.7,3.91,-2.41,-0.8,1.53}, {7,2,4,109,1.2,0.09,1.09,0.54,-1.16}, {7,2,5,540.4,6,-0.18,-0.63,0.11,1.16}, {7,2,6,281.1,3.6,-3.51,-5.84,1.33,-2.09}, {7,3,0,191.9,3.6,0,0.19,0,0}, {7,3,1,173.6,2.4,-10.93,-2.53,-4.7,-2.49}, {7,3,2,71.6,1.2,-0.53,-0.26,-0.23,-0.46}, {7,3,3,503.1,6.1,-17.61,-2.88,-6.34,-2.27}, {7,3,4,279.7,2.4,3.03,-2.76,-0.01,0.82}, {7,3,5,372.2,3.6,-1.88,0.08,-2.51,-0.21}, {7,3,6,273.8,2.4,4.53,4.21,-0.14,-0.43}, {7,4,0,295,6.1,0,0.28,0,0}, {7,4,1,270.7,3.6,-5.7,-5.38,-0.08,-1.39}, {7,4,2,111.6,1.2,-0.72,1.3,0.69,0.72}, {7,4,3,676.2,9.7,4.04,-2.05,-2.4,4.45}, {7,4,4,387.3,3.6,1.34,1.72,0.06,-0.25}, {7,4,5,404.7,3.6,-0.25,-0.82,0.24,-0.21}, {7,4,6,520.8,4.8,-0.95,1.92,0.35,1.18}, {7,5,0,400.4,7.3,-0,-7.39,0,0}, {7,5,1,34,3.6,0.28,-0.21,-0.01,0.16}, {7,5,2,538.4,8.5,-2.16,-4.13,1.85,-3.74}, {7,5,3,402.2,4.8,-2.31,-0.7,-1.19,-0.81}, {7,5,4,752.5,10.9,-3.11,3.95,0.23,2.53}, {7,5,5,483.1,4.8,5.45,-2.56,-1.13,1.14}, {7,5,6,169.9,1.2,-8.24,-4.62,-2.12,-3.04}, {7,6,0,490,10.9,0,12.46,0,0}, {7,6,1,506.9,7.3,0.5,0.53,0.07,-0.58}, {7,6,2,404.8,6.1,-0.44,-6.1,1.86,-0.26}, {7,6,3,204.6,2.4,-5.51,0.7,-0.56,0.24}, {7,6,4,555,8.5,6.01,-8.09,0.75,2.38}, {7,6,5,783.4,8.4,0.01,0.99,0.33,0.06}, {7,7,0,129.7,2.4,0,6.71,0,0}, {7,7,1,513.8,7.3,7.01,-0.77,-3.12,0.37}, {7,7,2,112.6,2.4,0.33,-5.35,2.32,0.28}, {7,7,3,505.8,6,-1.46,1.6,-0.14,1.2}, {7,7,4,385.5,4.8,0.71,8.19,3.5,-0.62}, {7,7,5,521.1,7.2,-5.24,-0.4,-0.85,0.1}, {7,8,0,76.3,2.4,-0,-1.04,0,0}, {7,8,1,145.3,2.4,-0.17,0.47,0.18,0.15}, {7,8,2,191.2,2.4,1.49,3.52,2.16,-1.02}, {7,8,3,43.5,2.4,-0.06,-0.2,0.15,0.05}, {7,8,4,70,1.2,-0.77,0.75,-0.11,0.24}, {7,8,5,24.1,3.6,0.16,0.38,0,-0.01}, {7,9,0,58.1,2.4,0,1.77,0,0}, {7,9,1,187.6,2.4,-1,2.05,0.94,1.05}, {7,9,2,70.1,2.4,0.03,-0.01,0.02,0.01}, {7,9,3,367.3,4.8,0.68,0.2,0.08,-0.56}, {7,9,4,230.5,3.6,0.81,-4.28,0.91,0.56}, {7,10,0,302.3,8.5,-0,-6.81,0,0}, {7,10,1,280.5,6,0.32,1.13,0.58,-0.36}, {7,10,2,186.1,2.4,1.59,-5.81,1.18,0.46}, {7,10,3,191.9,2.4,2.13,5.06,0.74,-0.14}, {7,10,4,317,4.8,6.93,4.84,-1.13,-4.39}, {7,11,0,85.8,2.4,0,0.58,0,0}, {7,11,1,158.2,2.4,-2.24,-1.07,-1.22,-0.61}, {7,11,2,260.7,3.6,0.03,-0.26,0.57,0.12}, {7,11,3,349.7,4.8,0.47,-0.72,-2.02,-0.33}, {7,12,0,120.7,3.6,-0,-0.43,0,0}, {7,12,1,63.9,2.4,-1.27,1.2,-0,0.61}, {7,12,2,349.7,4.8,0.08,-2.51,0.35,-0.03}, {7,13,0,169.9,3.6,0,7.26,0,0}, {7,13,1,127.7,2.4,1.07,3.56,1.51,-0.76}, {8,0,0,299.8,8.5,35.42,-0,0,0}, {8,0,1,465.9,9.7,0,3.11,0,0}, {8,0,2,17,2.4,-0.46,-0,0,0}, {8,0,3,300.5,4.8,-0,-12.73,0,0}, {8,0,4,160.9,2.4,-10.4,-0,0,0}, {8,0,5,41.1,2.4,-0,-1.94,0,0}, {8,0,6,278.4,3.6,-0.45,-0,0,0}, {8,1,0,564.3,10.9,2.72,-0,0,0}, {8,1,1,78.9,1.2,0.75,1.77,0.75,-0.66}, {8,1,2,499.6,8.5,-0.8,-0.1,-1.13,0.16}, {8,1,3,127.2,1.2,0.93,2.4,1.34,-1.88}, {8,1,4,104,1.2,-0.26,-0.61,0.31,-0.44}, {8,1,5,154.6,1.2,0.81,1.18,0.31,-0.72}, {8,1,6,341.1,3.6,1.88,0.36,-0.3,-0.23}, {8,2,0,202.6,3.6,-0.1,-0,0,0}, {8,2,1,418.5,6.1,0.17,-1.35,1.08,1.46}, {8,2,2,166.1,2.4,-7.11,0.95,-1.58,0.33}, {8,2,3,110.2,1.2,-0.13,-0.77,1.27,0.16}, {8,2,4,235.9,2.4,-1.26,2.67,1.42,0.94}, {8,2,5,314,3.6,6.98,-2.13,-0.46,0.22}, {8,2,6,590.5,8.4,7.11,-0.09,-2.86,0.1}, {8,3,0,21.8,7.3,-0.8,-0,0,0}, {8,3,1,254.7,3.6,0.2,-0.01,-0.4,0.8}, {8,3,2,275.2,3.6,-0.93,-0.02,-0.74,0.47}, {8,3,3,195,2.4,-0.1,0.06,0.01,0.02}, {8,3,4,62.9,1.2,-0.63,0.91,0.16,0.39}, {8,3,5,591.6,7.2,-0.25,-0.05,0.14,0.32}, {8,4,0,84.9,3.6,-0.29,-0,0,0}, {8,4,1,134.6,2.4,0.48,0.35,-0.49,-0.76}, {8,4,2,422.9,4.8,-3.69,-0.59,-2.45,-0.4}, {8,4,3,162.2,2.4,0.04,0.06,0.02,-0.07}, {8,4,4,488.4,4.8,-0.01,-1.61,1.86,0.96}, {8,4,5,439.3,4.8,1.05,0.89,-0.19,-0.43}, {8,5,0,621.9,12.1,-22.18,-0,0,0}, {8,5,1,152.7,2.4,2.33,6.4,0.81,-0.44}, {8,5,2,265.3,3.6,-0.07,-0.81,0.28,-0.11}, {8,5,3,43.6,2.4,-0.11,0.38,0.18,0.06}, {8,5,4,339.6,3.6,3.05,0.16,-0.64,-0.2}, {8,5,5,349.9,3.6,-0.69,-2.01,0.79,-0.43}, {8,6,0,147.8,3.6,-15.24,-0,0,0}, {8,6,1,393.7,6.1,-0.81,4,0.76,0.5}, {8,6,2,185.2,2.4,0.9,0.12,-0.19,-0.07}, {8,6,3,251.6,2.4,-0.14,-1.42,1.17,-0.55}, {8,6,4,94.2,1.2,1.86,-0.51,-0.33,0.42}, {8,6,5,475.1,6,0.72,0.64,0.01,-0.2}, {8,7,0,261.5,4.8,-13.79,-0,0,0}, {8,7,1,854.7,8.5,2.76,-3.1,0.06,4.67}, {8,7,2,612.2,8.5,-0.19,0.09,-1.13,-0.85}, {8,7,3,91.9,2.4,0.22,0.63,0.67,-0.23}, {8,7,4,198,2.4,-1.08,0.16,-0.41,0.12}, {8,7,5,588.1,8.4,1.29,-0.94,-0.1,1.2}, {8,8,0,634,13.3,-2.19,-0,0,0}, {8,8,1,370.2,4.8,4.87,4.41,-0.16,-1.19}, {8,8,2,216.4,3.6,-10.31,0.31,-1.21,0.14}, {8,8,3,357.5,4.8,-1.58,2.78,1.48,0.48}, {8,8,4,200.2,2.4,0.45,-1.58,0.11,0.06}, {8,9,0,391.7,7.3,-1.4,-0,0,0}, {8,9,1,423.1,6,0.91,0.38,-0.31,-0.65}, {8,9,2,103.9,2.4,0.21,0.04,-0.01,-0.07}, {8,9,3,697.6,9.7,1.7,1.61,-0.14,-0.34}, {8,9,4,212.1,2.4,-0.39,-0.05,1.13,-0.65}, {8,10,0,205.4,3.6,1.82,-0,0,0}, {8,10,1,413,6,0.88,2.65,0.36,-0.28}, {8,10,2,95.4,2.4,2.34,0.23,-1.03,-0.27}, {8,10,3,818.8,22.9,3.39,-8.68,1.87,2.26}, {8,11,0,173.8,4.8,-4.86,-0,0,0}, {8,11,1,275.1,6,-0.21,0.05,0.01,-0.54}, {8,11,2,208.6,4.8,2.62,-2.56,-0.27,1.23}, {8,12,0,94,2.4,2.56,-0,0,0}, {8,12,1,249.5,3.6,-1.09,-1.76,0.39,-0.6}, {9,0,1,47.3,1.2,0,0.24,0,0}, {9,0,2,93.3,1.2,0.02,-0,0,0}, {9,0,3,710.3,12.1,-0,-0.48,0,0}, {9,0,4,271.9,3.6,-6.4,-0,0,0}, {9,1,0,81.2,2.4,0,0.51,0,0}, {9,1,1,242.4,3.6,6.54,1.25,-6.55,-1.03}, {9,1,2,260.4,2.4,1.02,2.19,1.33,-2.72}, {9,1,3,105.3,1.2,0.24,0.05,-0.6,-0.08}, {9,1,4,224.8,2.4,0.96,-4.82,1.48,0.63}, {9,1,5,416.2,3.6,8.46,1.64,-3.91,-1.57}, {9,2,0,143,3.6,0,0.72,0,0}, {9,2,1,201.2,2.4,1.96,1.2,-0.91,-2.52}, {9,2,2,187.7,2.4,-0.31,0.27,0.35,0.3}, {9,2,3,333.9,3.6,8.67,-8.67,0.02,7.03}, {9,2,4,242.9,2.4,-1.37,0.02,-0.37,0.03}, {9,2,5,513.8,7.2,1.27,-2.06,0.48,0.66}, {9,3,0,35.1,7.3,0,1.57,0,0}, {9,3,1,207.2,2.4,2.64,1.72,-0.24,-0.64}, {9,3,2,359.6,3.6,-0.17,-0.29,-0.88,-0.9}, {9,3,3,298.8,3.6,0.22,0.1,-0.57,-0.22}, {9,3,4,147.4,1.2,-0.39,-3.16,2.04,-0.27}, {9,3,5,168.8,1.2,2.2,1.22,-0.08,-0.2}, {9,4,0,340.4,7.3,-0,-1.98,0,0}, {9,4,1,467.5,6.1,-1.21,2.2,0.64,0.81}, {9,4,2,182.8,2.4,-0.99,-13.81,2.26,-0.06}, {9,4,3,166.9,2.4,-0.38,2.12,0.45,-0.06}, {9,4,4,175.1,2.4,-0.1,3.01,2.15,0.24}, {9,4,5,347.2,3.6,-0.21,0.07,-0.24,0.16}, {9,5,0,450.4,8.5,-0,-2.33,0,0}, {9,5,1,663.4,9.7,-2.07,3.73,0.73,1.36}, {9,5,2,157.3,2.4,1.63,6.32,3.35,-2.15}, {9,5,3,371.1,4.8,-0.67,-0.14,-0.39,0.03}, {9,5,4,549.2,6,-0.06,-0.95,0.22,-0.03}, {9,5,5,382,4.8,-1.21,1.81,0.6,0.56}, {9,6,0,611.1,12.1,0,0.55,0,0}, {9,6,1,340,4.8,3.18,-1.75,-0.47,0.88}, {9,6,2,199.5,3.6,-0.25,4.4,2.24,0.17}, {9,6,3,304.4,3.6,-0.03,-1.2,0.14,-1.49}, {9,6,4,417.4,4.8,0.79,-0.43,-0.03,0.04}, {9,7,0,88.3,2.4,0,0.21,0,0}, {9,7,1,273.3,3.6,0.22,0.01,-0.32,-0.36}, {9,7,2,168,2.4,-1.71,-3.44,0.24,-0.98}, {9,7,3,282.5,3.6,0.09,-0.19,0.05,0.06}, {9,7,4,303.8,3.6,-0.1,0.08,-0.06,0.24}, {9,8,0,49.6,4.8,-0,-0.07,0,0}, {9,8,1,180,2.4,1.39,-0.6,-0.4,0.58}, {9,8,2,301.9,4.8,0.15,-1.13,0.67,0.37}, {9,8,3,518.8,8.4,3,1.15,-0.64,-0.67}, {9,9,0,213.7,4.8,0,4.26,0,0}, {9,9,1,575.9,8.5,-14.09,-1.71,-6.77,-0.83}, {9,9,2,623.9,8.4,-0.15,0.04,0.5,0.1}, {9,9,3,699.2,9.6,-2.1,-0.04,-1.17,0.08}, {9,10,0,63.9,3.6,0,0.61,0,0}, {9,10,1,265.4,3.6,3.63,-1.92,-0.41,0.29}, {9,10,2,689.6,9.6,-0.01,-0.13,0.34,-0.06}, {9,11,0,49.4,3.6,0,0.19,0,0}, {9,11,1,174.7,2.4,-0.05,-0.22,0.08,-0.02}, {10,0,0,38.7,6.1,0.38,-0,0,0}, {10,0,1,121,2.4,-0,-2.3,0,0}, {10,0,2,225,3.6,-15.35,-0,0,0}, {10,0,3,350.5,4.8,-0,-11.28,0,0}, {10,0,4,135.2,2.4,1.4,-0,0,0}, {10,1,0,393.4,7.3,-1.63,-0,0,0}, {10,1,1,142.8,1.2,-3.74,0.6,-1.67,0.52}, {10,1,2,323,3.6,7.9,-7.23,0.11,0.61}, {10,1,3,336,3.6,0.44,1.24,0.29,-0.98}, {10,1,4,630,8.4,-2.32,-1.62,-0.31,-0.81}, {10,2,0,447.9,8.5,-7.57,-0,0,0}, {10,2,1,544.6,8.5,-0.28,0.47,0.11,0.29}, {10,2,2,344.7,4.8,-4.45,-0.11,-3.85,-1.14}, {10,2,3,234.4,2.4,0.3,-0.07,-0.09,0.05}, {10,2,4,342.7,4.8,4.64,-3.87,-0.24,1.67}, {10,3,0,265,4.8,-2.94,-0,0,0}, {10,3,1,359.3,4.8,1.74,3.13,1.35,-3.08}, {10,3,2,443.8,6,0.95,1.11,0.1,-0.5}, {10,3,3,212.6,2.4,-0.08,0.28,0.02,0.01}, {10,3,4,242.5,2.4,1.03,0.78,-0.1,-0.55}, {10,4,0,428.2,8.5,-9.69,-0,0,0}, {10,4,1,506.8,7.3,3,1.22,-1.09,-0.99}, {10,4,3,253.6,2.4,-6.01,1.3,-1.72,0.73}, {10,4,4,422.1,4.8,-7.34,0.26,-0.99,0.15}, {10,5,0,91.9,3.6,0.84,-0,0,0}, {10,5,1,50.8,4.8,0.16,0.57,0.05,-0.03}, {10,5,2,238,2.4,3.84,-1.35,-1.93,0.89}, {10,5,3,503.4,7.2,3.2,-3.87,0.12,1.95}, {10,5,4,184.4,2.4,4.83,-1.26,-1.87,1.12}, {10,6,1,122,2.4,-1.68,1.59,0.11,0.53}, {10,6,2,26.6,6,-0.03,-0.05,-0.01,-0.04}, {10,6,3,346.3,3.6,-3.76,-2.93,-0.79,-2.33}, {10,7,0,273,6,-0.06,-0,0,0}, {10,7,1,233.1,3.6,-0.58,-0.12,-0.2,-0.13}, {10,7,2,211.2,3.6,1.86,1.39,-0.54,-0.67}, {10,7,3,406.3,4.8,-1.18,-0.82,-0.41,-0.91}, {10,8,0,251.1,4.8,-5.96,-0,0,0}, {10,8,1,644.4,9.7,-0.27,-1.71,1.44,0.82}, {10,8,2,221.9,3.6,-5.17,1.27,-0.48,0.1}, {10,9,0,37.4,4.8,-0.14,-0,0,0}, {10,9,1,393.1,6,-0.27,-0.13,-0.14,-0.18}, {10,9,2,139.8,2.4,0.28,0.13,0.45,0.3}, {11,0,1,375.9,7.3,-0,-3.57,0,0}, {11,0,2,152.2,2.4,-1.14,-0,0,0}, {11,0,4,662.9,13.3,-1.78,-0,0,0}, {11,1,0,265.9,4.8,-0,-13.97,0,0}, {11,1,1,72.5,2.4,0.05,0.01,-0.04,-0.22}, {11,1,2,163.1,2.4,0.12,0.28,0.46,-0.47}, {11,1,3,359.6,3.6,0.9,-1.28,0.25,0.23}, {11,1,4,184.4,2.4,0.69,-6.04,0.95,0.52}, {11,2,0,117.2,3.6,0,0.02,0,0}, {11,2,1,357.7,4.8,0.31,-0.35,-0.14,0.47}, {11,2,2,159.4,2.4,-0.11,0.22,0.12,0.12}, {11,2,3,503.2,9.7,-0.02,0.1,0.22,-0.02}, {11,3,0,870,25.4,0,0.27,0,0}, {11,3,1,196.9,2.4,-0.24,1.42,0.54,0.26}, {11,3,2,285,3.6,2.54,-11.95,4.22,1.97}, {11,3,3,19.3,3.6,0.1,0.42,0.08,-0.03}, {11,4,0,126.8,4.8,0,0.64,0,0}, {11,4,1,144.9,2.4,-0.36,0.54,-1.55,-0.45}, {11,4,2,317.5,3.6,0.18,1.05,0.77,-0.2}, {11,4,3,125.4,1.2,0.33,0.23,-1.07,0.42}, {11,5,0,206.5,4.8,0,5.32,0,0}, {11,5,1,280.1,3.6,0.09,-2.61,0.41,-0.02}, {11,5,2,290.8,4.8,0.18,0.18,-0,-0.07}, {11,5,3,512.3,7.2,-0.3,0.1,-0.08,0.06}, {11,6,0,414,8.4,-0,-0.32,0,0}, {11,6,1,433.2,6,-2.74,-9.78,3.07,-2.06}, {11,6,2,305.1,3.6,0.06,0.04,0.05,0.3}, {11,7,0,208.7,4.8,0,1.77,0,0}, {11,7,1,432.9,6,0.83,-2.2,0.27,0.14}, {11,7,2,499,7.2,-1.09,1.91,0.26,0.28}, {11,8,0,165.1,3.6,0,4.09,0,0}, {11,8,1,343.4,4.8,1.93,-4.61,1.8,1.9}, {12,0,0,457.5,12.1,-1.25,-0,0,0}, {12,0,1,505.6,9.7,0,3.34,0,0}, {12,0,2,253.3,3.6,-8.27,-0,0,0}, {12,1,0,755.6,14.5,0.33,-0,0,0}, {12,1,1,260.7,3.6,-0.74,0.15,-0.19,0.08}, {12,1,2,513.8,7.2,-1.17,-0.08,-0.65,-0.28}, {12,2,0,47.1,12.1,1.32,-0,0,0}, {12,2,1,451.3,6,-0.46,0.51,0.03,0.19}, {12,2,2,162.8,2.4,-0.11,0.18,-0.18,-0.03}, {12,3,0,774.6,15.7,7.24,-0,0,0}, {12,3,1,308.8,3.6,-1.33,-3.83,0.28,-0.19}, {12,3,2,531.7,8.4,0.21,-0.31,-0.02,0.31}, {12,4,0,518.6,10.9,-0.12,-0,0,0}, {12,4,1,259.3,3.6,-0.64,-0.22,-0.1,-0.24}, {12,4,2,653.2,10.8,-0.37,1.13,0.18,0.13}, {12,5,0,350.8,7.2,-16.35,-0,0,0}, {12,5,1,242.3,3.6,-6.99,-5.89,-0.02,-0.96}}; int rnasehkldata_size = sizeof( rnasehkldata ) / sizeof( rnasehkldata[0] ); struct TESTxyzdata { const char* element; float x,y,z,u_iso,occ; }; TESTxyzdata rnasexyzdata[] = { {"N",45.187,12.906,9.095,0.381,1}, {"O",42.435,14.184,8.265,0.725,1}, {"O",41.943,12.878,6.527,0.751,1}, {"C",42.812,13.495,7.237,0.716,1}, {"C",44.299,13.384,6.812,0.628,1}, {"C",45.241,12.515,7.674,0.452,1}, {"C",46.685,12.547,7.1,0.394,1}, {"O",47.612,13.255,7.476,0.323,1}, {"N",46.794,11.672,6.084,0.444,1}, {"C",48.093,9.185,6.279,0.39,1}, {"C",49.528,9.785,4.235,0.345,1}, {"C",48.253,10.056,5.021,0.423,1}, {"C",48.103,11.539,5.403,0.324,1}, {"C",48.199,12.621,4.353,0.371,1}, {"O",47.298,12.969,3.578,0.295,1}, {"N",49.407,13.203,4.322,0.314,1}, {"O",50.307,15.798,5.009,0.443,1}, {"C",50.798,15.174,3.823,0.309,1}, {"C",49.686,14.243,3.321,0.376,1}, {"C",50.037,13.673,1.946,0.372,1}, {"O",50.494,14.518,1.133,0.501,1}, {"N",49.876,12.516,1.386,0.289,1}, {"C",50.385,12.329,0.007,0.272,1}, {"C",51.491,11.238,0.211,0.245,1}, {"O",51.73,10.839,1.388,0.254,1}, {"N",51.932,10.774,-0.938,0.238,1}, {"C",53.4,7.466,-2.602,0.287,1}, {"O",51.293,8.136,-1.674,0.358,1}, {"C",52.564,8.674,-2.263,0.272,1}, {"C",52.967,9.734,-1.184,0.234,1}, {"C",54.232,10.484,-1.596,0.252,1}, {"O",54.092,11.564,-2.247,0.28,1}, {"N",55.4,10.028,-1.188,0.181,1}, {"C",58.59,12.293,-1.009,0.178,1}, {"C",57.502,10.963,0.829,0.174,1}, {"C",57.258,11.659,-0.505,0.178,1}, {"C",56.661,10.729,-1.577,0.143,1}, {"C",57.59,9.542,-1.997,0.126,1}, {"O",57.577,8.495,-1.285,0.134,1}, {"N",58.281,9.749,-3.068,0.119,1}, {"S",58.644,8.782,-6.092,0.165,1}, {"C",59.837,9.043,-4.746,0.142,1}, {"C",59.21,8.649,-3.442,0.103,1}, {"C",60.312,8.596,-2.377,0.112,1}, {"O",60.651,9.647,-1.84,0.16,1}, {"N",60.815,7.431,-2.09,0.132,1}, {"C",63.607,3.83,-0.269,0.105,1}, {"C",63.176,5.877,1.191,0.169,1}, {"C",63.43,5.308,-0.221,0.135,1}, {"C",62.261,5.661,-1.211,0.08,1}, {"C",61.937,7.18,-1.195,0.111,1}, {"C",63.176,8.04,-1.631,0.155,1}, {"O",63.948,8.686,-0.861,0.154,1}, {"N",63.363,8.068,-2.943,0.13,1}, {"O",63.713,9.243,-5.759,0.259,1}, {"C",64.674,8.507,-4.981,0.169,1}, {"C",64.514,8.842,-3.5,0.19,1}, {"C",64.317,10.294,-3.22,0.228,1}, {"O",65.387,10.965,-3.269,0.218,1}, {"N",63.169,10.881,-2.921,0.193,1}, {"C",61.602,12.757,-3.133,0.14,1}, {"C",62.995,12.289,-2.639,0.167,1}, {"C",63.211,12.599,-1.169,0.174,1}, {"O",63.29,13.785,-0.811,0.211,1}, {"N",63.302,11.641,-0.262,0.184,1}, {"C",60.774,11.852,2.374,0.187,1}, {"C",60.818,9.342,2.603,0.211,1}, {"C",61.313,10.545,1.786,0.189,1}, {"C",62.84,10.645,1.861,0.171,1}, {"C",63.485,11.896,1.176,0.195,1}, {"C",64.985,11.912,1.559,0.255,1}, {"O",65.787,11.418,0.738,0.244,1}, {"N",65.377,12.383,2.734,0.253,1}, {"C",65.547,13.634,4.727,0.287,1}, {"C",64.532,12.983,3.787,0.28,1}, {"C",66.753,12.736,4.607,0.245,1}, {"C",66.795,12.343,3.105,0.222,1}, {"C",67.258,10.934,2.971,0.167,1}, {"O",66.54,9.911,3.213,0.179,1}, {"N",68.557,10.718,2.673,0.205,1}, {"C",70.894,11.037,2.558,0.226,1}, {"C",69.548,11.794,2.401,0.245,1}, {"C",70.647,9.595,2.216,0.213,1}, {"C",69.137,9.388,2.567,0.172,1}, {"C",69.04,8.569,3.87,0.101,1}, {"O",69.036,7.364,3.707,0.129,1}, {"N",68.997,9.29,5.003,0.116,1}, {"O",71.736,11.345,6.212,0.266,1}, {"O",69.702,11.868,5.944,0.205,1}, {"C",70.522,11.17,6.519,0.263,1}, {"C",70.384,10.104,7.552,0.193,1}, {"C",69.09,9.366,7.421,0.169,1}, {"C",68.941,8.492,6.225,0.116,1}, {"C",67.573,7.764,6.267,0.132,1}, {"O",67.484,6.777,6.963,0.122,1}, {"N",66.525,8.231,5.537,0.14,1}, {"C",64.198,8.213,4.637,0.173,1}, {"C",65.261,7.483,5.499,0.138,1}, {"C",65.517,6.142,4.891,0.115,1}, {"O",64.95,5.016,5.254,0.131,1}, {"N",66.337,6.042,3.828,0.112,1}, {"C",68.026,3.62,1.336,0.151,1}, {"O",66.803,5.646,1.081,0.2,1}, {"C",67.634,4.924,1.96,0.117,1}, {"C",66.683,4.779,3.206,0.105,1}, {"C",67.365,3.862,4.215,0.112,1}, {"O",67.11,2.667,4.328,0.12,1}, {"N",68.294,4.448,4.995,0.107,1}, {"O",71.344,4.491,5.033,0.235,1}, {"O",71.576,6.14,6.464,0.224,1}, {"C",71.012,5.114,6.056,0.207,1}, {"C",69.889,4.552,6.864,0.119,1}, {"C",68.991,3.627,5.983,0.082,1}, {"C",68.07,2.929,6.986,0.133,1}, {"O",68.194,1.757,7.316,0.118,1}, {"N",67.127,3.773,7.507,0.154,1}, {"C",64.173,3.788,10.052,0.122,1}, {"O",66.054,5.414,9.591,0.185,1}, {"C",65.214,4.357,9.039,0.118,1}, {"C",66.155,3.218,8.491,0.114,1}, {"C",65.336,2.084,7.886,0.112,1}, {"O",65.11,1.058,8.519,0.155,1}, {"N",64.819,2.248,6.649,0.124,1}, {"C",61.239,2.046,5.537,0.193,1}, {"C",61.979,3.198,3.387,0.182,1}, {"C",62.376,2.75,4.761,0.212,1}, {"C",63.473,1.696,4.682,0.141,1}, {"C",64.001,1.2,6.043,0.12,1}, {"C",64.859,-0.017,5.907,0.127,1}, {"O",64.35,-1.148,6.105,0.141,1}, {"N",66.196,0.138,5.659,0.145,1}, {"N",68.987,0.221,2.623,0.28,1}, {"O",67.348,-1.203,2.864,0.325,1}, {"C",68.27,-0.562,3.439,0.267,1}, {"C",68.447,-0.802,4.924,0.232,1}, {"C",67.051,-1.079,5.55,0.149,1}, {"C",67.2,-1.819,6.871,0.108,1}, {"O",67.163,-3.037,6.741,0.156,1}, {"N",67.266,-1.005,7.918,0.129,1}, {"C",70.076,-1.137,10.322,0.213,1}, {"C",69.387,1.24,11.011,0.158,1}, {"C",69.151,0.07,10.087,0.172,1}, {"C",67.719,-0.52,10.244,0.147,1}, {"C",67.326,-1.591,9.212,0.124,1}, {"C",65.983,-2.268,9.531,0.122,1}, {"O",66.015,-3.313,10.152,0.13,1}, {"N",64.925,-1.607,9.123,0.151,1}, {"C",61.553,1.026,9.516,0.11,1}, {"C",62.444,-0.084,10.133,0.111,1}, {"C",62.484,-1.199,9.104,0.141,1}, {"C",61.121,-2.031,9.142,0.18,1}, {"C",63.624,-2.233,9.452,0.151,1}, {"C",63.504,-3.573,8.766,0.171,1}, {"O",63.034,-4.565,9.376,0.16,1}, {"N",63.954,-3.736,7.523,0.205,1}, {"C",64.324,-4.83,5.282,0.233,1}, {"C",63.905,-5.003,6.748,0.21,1}, {"C",64.764,-6.126,7.313,0.249,1}, {"O",64.43,-7.33,7.273,0.252,1}, {"N",65.894,-5.748,7.9,0.268,1}, {"O",68.431,-5,9.105,0.273,1}, {"C",68.311,-6.155,8.275,0.232,1}, {"C",66.882,-6.703,8.46,0.306,1}, {"C",66.642,-6.948,9.935,0.309,1}, {"O",67.385,-7.684,10.617,0.356,1}, {"N",65.645,-6.303,10.443,0.255,1}, {"O",63.298,-6.328,13.84,0.59,1}, {"O",63.18,-8.634,13.665,0.659,1}, {"C",63.587,-7.481,13.375,0.587,1}, {"C",64.621,-7.625,12.267,0.458,1}, {"C",65.233,-6.292,11.839,0.283,1}, {"C",66.345,-5.787,12.785,0.339,1}, {"O",66.638,-6.285,13.904,0.36,1}, {"N",66.907,-4.705,12.303,0.303,1}, {"C",67.898,-3.974,13.068,0.302,1}, {"C",69.268,-4.558,12.785,0.335,1}, {"O",69.485,-5.142,11.737,0.37,1}, {"N",70.112,-4.263,13.745,0.442,1}, {"C",71.981,-4.117,15.152,0.442,1}, {"C",71.517,-4.593,13.756,0.479,1}, {"C",70.748,-4.044,16.051,0.466,1}, {"C",69.783,-3.531,15.003,0.396,1}, {"C",69.784,-2.071,14.667,0.224,1}, {"O",70.15,-1.596,13.565,0.33,1}, {"N",69.276,-1.415,15.655,0.208,1}, {"C",66.116,-0.067,13.663,0.165,1}, {"C",65.221,-0.845,12.909,0.176,1}, {"C",64.727,-2.062,13.351,0.144,1}, {"C",65.116,-2.56,14.619,0.271,1}, {"C",66.002,-1.794,15.403,0.213,1}, {"C",66.495,-0.565,14.918,0.145,1}, {"C",67.468,0.28,15.771,0.204,1}, {"C",68.993,0.027,15.495,0.223,1}, {"C",69.888,0.817,16.42,0.234,1}, {"O",70.22,0.266,17.487,0.267,1}, {"N",70.124,2.016,15.959,0.19,1}, {"C",70.104,4,14.817,0.224,1}, {"C",69.709,2.554,14.649,0.17,1}, {"C",71.24,4.031,15.845,0.191,1}, {"C",70.969,2.865,16.768,0.206,1}, {"C",70.387,3.291,18.119,0.332,1}, {"O",71.2,3.68,19.02,0.27,1}, {"N",69.075,3.324,18.366,0.235,1}, {"O",70.317,9.853,17.956,0.27,1}, {"C",68.509,6.705,17.397,0.171,1}, {"C",69.167,7.888,17.108,0.197,1}, {"C",69.681,8.654,18.13,0.258,1}, {"C",69.525,8.209,19.465,0.271,1}, {"C",68.837,7.015,19.711,0.286,1}, {"C",68.299,6.231,18.67,0.24,1}, {"C",67.538,4.982,19.094,0.227,1}, {"C",68.345,3.786,19.558,0.228,1}, {"C",67.54,2.671,20.162,0.281,1}, {"O",66.976,1.859,19.394,0.225,1}, {"N",67.58,2.57,21.495,0.317,1}, {"O",67.73,-0.069,23.778,0.535,1}, {"C",67.135,1.251,23.649,0.44,1}, {"C",66.842,1.487,22.177,0.383,1}, {"C",65.31,1.659,21.92,0.295,1}, {"O",64.843,0.487,21.717,0.36,1}, {"N",64.764,2.836,21.841,0.324,1}, {"N",61.162,6.953,22.051,0.685,1}, {"O",62.125,7.583,23.911,0.656,1}, {"C",62.177,6.796,22.921,0.66,1}, {"C",63.169,5.699,22.539,0.609,1}, {"C",63.161,4.818,21.336,0.352,1}, {"C",63.409,3.272,21.506,0.431,1}, {"C",62.882,2.896,20.08,0.426,1}, {"O",61.728,3.162,19.668,0.357,1}, {"N",63.815,2.414,19.25,0.285,1}, {"O",64.605,4.4,16.742,0.226,1}, {"O",66.355,3.308,16.034,0.269,1}, {"C",65.196,3.337,16.578,0.191,1}, {"C",64.634,2.047,17.024,0.199,1}, {"C",63.429,2.092,17.907,0.22,1}, {"C",62.636,0.789,17.994,0.236,1}, {"O",63.011,-0.276,18.532,0.214,1}, {"N",61.425,0.936,17.384,0.197,1}, {"C",60.537,-0.235,17.325,0.174,1}, {"C",59.398,-0.157,18.358,0.166,1}, {"O",58.666,-1.102,18.39,0.23,1}, {"N",59.32,0.803,19.23,0.209,1}, {"C",58.829,3.418,20.749,0.209,1}, {"C",59.517,1.565,22.167,0.295,1}, {"C",58.434,2.021,21.209,0.154,1}, {"C",58.212,0.932,20.184,0.198,1}, {"C",56.952,1.275,19.323,0.175,1}, {"O",56.99,1.864,18.236,0.166,1}, {"N",55.854,1.009,20.026,0.21,1}, {"C",53.498,-0.768,20.331,0.295,1}, {"C",51.93,0.959,19.792,0.162,1}, {"C",53.322,0.717,20.349,0.195,1}, {"C",54.498,1.32,19.484,0.191,1}, {"C",54.314,2.798,19.365,0.152,1}, {"O",54.665,3.61,20.215,0.197,1}, {"N",53.67,3.193,18.262,0.138,1}, {"C",53.65,7.5,16.887,0.127,1}, {"C",53.152,8.791,16.643,0.157,1}, {"C",52.078,8.941,15.792,0.148,1}, {"C",51.479,7.834,15.165,0.17,1}, {"C",51.944,6.56,15.433,0.147,1}, {"C",53.042,6.394,16.302,0.163,1}, {"C",53.54,5.002,16.562,0.155,1}, {"C",53.242,4.545,18,0.137,1}, {"C",51.729,4.439,18.281,0.127,1}, {"O",51.128,3.609,17.588,0.14,1}, {"N",51.221,5.277,19.161,0.166,1}, {"N",50.589,6.236,23.989,0.343,1}, {"O",48.429,6.236,23.344,0.301,1}, {"C",49.63,5.882,23.166,0.334,1}, {"C",50.07,5.053,21.944,0.249,1}, {"C",49.557,5.912,20.812,0.186,1}, {"C",49.789,5.188,19.475,0.192,1}, {"C",48.774,5.803,18.52,0.192,1}, {"O",47.595,5.352,18.619,0.207,1}, {"N",49.216,6.722,17.695,0.149,1}, {"N",45.877,6.54,14.081,0.157,1}, {"O",47.378,8.223,14.272,0.163,1}, {"C",46.975,7.111,14.611,0.135,1}, {"C",47.699,6.393,15.739,0.133,1}, {"C",48.322,7.405,16.735,0.165,1}, {"C",47.22,8.132,17.551,0.196,1}, {"O",46.037,8.183,17.146,0.174,1}, {"N",47.583,8.642,18.686,0.21,1}, {"N",44.727,9.11,25.494,0.478,1}, {"N",46.471,7.611,25.64,0.392,1}, {"C",45.946,8.734,25.059,0.565,1}, {"N",46.727,9.307,24.165,0.568,1}, {"C",47.379,10.28,23.329,0.489,1}, {"C",46.745,10.42,21.962,0.415,1}, {"C",47.464,9.58,20.921,0.285,1}, {"C",46.654,9.31,19.633,0.225,1}, {"C",45.888,10.497,19.065,0.225,1}, {"O",44.673,10.68,19.414,0.195,1}, {"N",46.55,11.217,18.167,0.167,1}, {"O",48.658,13.097,20.141,0.289,1}, {"O",49.393,12.245,18.22,0.309,1}, {"C",48.68,13.024,18.883,0.285,1}, {"C",47.651,14.012,18.357,0.154,1}, {"C",46.954,13.419,17.129,0.202,1}, {"C",45.905,12.36,17.528,0.187,1}, {"C",45.052,12.047,16.307,0.166,1}, {"O",44.484,12.978,15.667,0.209,1}, {"N",44.984,10.789,15.978,0.162,1}, {"O",42.122,9.373,14.13,0.162,1}, {"C",42.715,10.324,15.155,0.203,1}, {"C",44.272,10.267,14.808,0.215,1}, {"C",44.735,10.875,13.487,0.235,1}, {"O",43.877,11.011,12.589,0.177,1}, {"N",46.024,11.223,13.224,0.176,1}, {"C",47.678,13.519,13.121,0.198,1}, {"C",48.216,13.051,10.699,0.216,1}, {"C",47.817,12.453,12.055,0.203,1}, {"C",46.52,11.709,11.943,0.158,1}, {"C",46.533,10.524,11.024,0.133,1}, {"O",46.109,10.726,9.903,0.186,1}, {"N",46.908,9.303,11.364,0.145,1}, {"C",49.747,8.489,9.579,0.192,1}, {"C",50.569,7.016,11.351,0.197,1}, {"C",49.408,7.951,10.947,0.175,1}, {"C",48.054,7.191,10.936,0.126,1}, {"C",46.879,8.136,10.559,0.114,1}, {"C",45.518,7.396,10.708,0.15,1}, {"O",44.821,7.556,11.703,0.155,1}, {"N",45.297,6.541,9.76,0.177,1}, {"C",45.035,5.504,7.685,0.218,1}, {"C",46.069,6.244,8.528,0.188,1}, {"C",44.19,4.694,8.649,0.184,1}, {"C",44.118,5.691,9.807,0.206,1}, {"C",44.032,4.977,11.141,0.208,1}, {"O",44.982,4.444,11.683,0.175,1}, {"N",42.784,4.878,11.669,0.181,1}, {"C",40.727,3.705,14.694,0.216,1}, {"O",40.692,5.765,13.21,0.234,1}, {"C",40.935,4.338,13.34,0.175,1}, {"C",42.454,4.119,12.878,0.146,1}, {"C",42.689,2.638,12.705,0.138,1}, {"O",42.2,1.965,11.759,0.138,1}, {"N",43.473,2.075,13.65,0.155,1}, {"N",43.802,-1.008,11.171,0.196,1}, {"O",44.539,0.139,9.406,0.189,1}, {"C",44.454,-0.081,10.717,0.183,1}, {"C",45.277,0.82,11.606,0.083,1}, {"C",45.335,0.509,13.034,0.095,1}, {"C",43.906,0.679,13.664,0.131,1}, {"C",43.982,0.112,15.06,0.141,1}, {"O",44.036,1.061,15.872,0.21,1}, {"N",44.094,-1.116,15.432,0.154,1}, {"O",45.148,-3.559,15.936,0.332,1}, {"C",44.2,-3.05,16.94,0.187,1}, {"C",44.237,-1.539,16.815,0.169,1}, {"C",45.593,-1.038,17.35,0.185,1}, {"O",46.536,-0.66,16.589,0.178,1}, {"N",45.717,-1.004,18.61,0.184,1}, {"O",51.36,-0.006,23.938,0.269,1}, {"C",48.474,0.724,21.895,0.19,1}, {"C",49.605,0.988,22.667,0.187,1}, {"C",50.205,-0.126,23.192,0.161,1}, {"C",49.724,-1.404,22.981,0.227,1}, {"C",48.591,-1.666,22.233,0.212,1}, {"C",47.951,-0.527,21.685,0.19,1}, {"C",46.682,-0.748,20.877,0.145,1}, {"C",46.918,-0.643,19.377,0.199,1}, {"C",48.025,-1.654,18.983,0.198,1}, {"O",47.822,-2.899,19.004,0.218,1}, {"N",49.196,-1.088,18.645,0.178,1}, {"C",50.312,-2.014,18.263,0.173,1}, {"C",50.423,-2.212,16.753,0.218,1}, {"O",51.308,-2.926,16.227,0.187,1}, {"N",49.521,-1.632,15.942,0.164,1}, {"O",47.703,-1.451,8.253,0.122,1}, {"C",48.577,-0.239,11.604,0.103,1}, {"C",48.44,-0.273,10.19,0.108,1}, {"C",47.735,-1.348,9.631,0.094,1}, {"C",47.274,-2.411,10.406,0.088,1}, {"C",47.354,-2.342,11.781,0.09,1}, {"C",48.033,-1.275,12.392,0.116,1}, {"C",48.184,-1.167,13.897,0.146,1}, {"C",49.484,-1.746,14.504,0.133,1}, {"C",50.632,-0.802,14.037,0.137,1}, {"O",51.214,-1.174,12.943,0.187,1}, {"N",50.916,0.278,14.691,0.109,1}, {"O",47.214,3.681,10.731,0.178,1}, {"C",50.511,2.861,11.945,0.106,1}, {"C",49.409,3.098,11.094,0.163,1}, {"C",48.157,3.392,11.662,0.184,1}, {"C",47.968,3.476,13.036,0.147,1}, {"C",49.067,3.227,13.874,0.142,1}, {"C",50.341,2.929,13.34,0.168,1}, {"C",51.515,2.674,14.261,0.094,1}, {"C",51.987,1.229,14.248,0.109,1}, {"C",53.199,1.148,15.207,0.157,1}, {"O",53.045,0.935,16.415,0.108,1}, {"N",54.388,1.288,14.58,0.137,1}, {"C",55.728,-1.536,17.123,0.232,1}, {"N",54.922,-2.588,17.243,0.197,1}, {"C",54.385,-2.75,16.053,0.22,1}, {"N",54.785,-1.876,15.135,0.141,1}, {"C",55.678,-1.123,15.82,0.128,1}, {"C",56.463,-0.004,15.272,0.118,1}, {"C",55.648,1.273,15.386,0.148,1}, {"C",56.544,2.421,14.935,0.147,1}, {"O",56.408,2.828,13.756,0.155,1}, {"N",57.336,2.993,15.823,0.117,1}, {"O",59.579,6.025,18.864,0.386,1}, {"O",60.775,6.477,17.038,0.348,1}, {"C",59.718,6.352,17.684,0.362,1}, {"C",58.355,6.494,17.026,0.366,1}, {"C",57.881,5.238,16.399,0.141,1}, {"C",58.142,4.175,15.409,0.121,1}, {"C",59.675,3.836,15.367,0.131,1}, {"O",60.169,3.079,16.219,0.104,1}, {"N",60.365,4.407,14.41,0.151,1}, {"O",59.803,-1.782,14.028,0.207,1}, {"C",60.181,1.701,12.947,0.139,1}, {"C",59.625,0.471,13.175,0.112,1}, {"C",60.357,-0.549,13.744,0.201,1}, {"C",61.723,-0.334,14.098,0.189,1}, {"C",62.28,0.901,13.853,0.113,1}, {"C",61.586,1.948,13.29,0.155,1}, {"C",62.143,3.329,12.992,0.147,1}, {"C",61.824,4.221,14.201,0.128,1}, {"C",62.441,5.543,13.937,0.16,1}, {"O",61.909,6.37,13.233,0.141,1}, {"N",63.597,5.869,14.524,0.147,1}, {"C",66.027,8.758,15.017,0.161,1}, {"O",65.025,6.84,16.428,0.17,1}, {"C",65.486,7.333,15.173,0.148,1}, {"C",64.211,7.158,14.217,0.146,1}, {"C",64.82,7.235,12.812,0.115,1}, {"O",65.383,6.237,12.353,0.156,1}, {"N",64.81,8.352,12.214,0.141,1}, {"C",63.603,8.395,9.458,0.11,1}, {"C",65.486,9.939,8.751,0.121,1}, {"C",64.629,9.437,9.904,0.118,1}, {"C",65.465,8.776,10.985,0.129,1}, {"C",66.502,9.771,11.594,0.126,1}, {"O",66.195,10.847,12.103,0.148,1}, {"N",67.775,9.291,11.518,0.191,1}, {"C",71.322,7.216,13.031,0.243,1}, {"C",70.193,8.254,13.115,0.141,1}, {"C",70.263,9.369,12.082,0.174,1}, {"C",71.433,10.415,12.272,0.205,1}, {"C",68.883,10.167,12.057,0.148,1}, {"C",68.965,11.468,11.25,0.118,1}, {"O",68.843,11.572,10.043,0.139,1}, {"N",69.072,12.563,11.991,0.127,1}, {"C",68.905,16.397,12.028,0.195,1}, {"O",67.038,14.797,12.177,0.195,1}, {"C",68.461,15.016,12.496,0.199,1}, {"C",69.29,13.927,11.671,0.182,1}, {"C",70.851,14.203,11.817,0.202,1}, {"O",71.386,14.227,12.961,0.194,1}, {"N",71.516,14.336,10.663,0.262,1}, {"C",72.196,14.272,8.389,0.261,1}, {"C",70.99,14.304,9.282,0.235,1}, {"C",73.293,14.909,9.217,0.287,1}, {"C",72.987,14.605,10.666,0.266,1}, {"C",73.307,15.826,11.542,0.215,1}, {"O",72.677,16.898,11.343,0.256,1}, {"N",74.236,15.623,12.475,0.26,1}, {"C",74.729,16.687,13.344,0.193,1}, {"C",73.881,16.822,14.558,0.256,1}, {"O",74.425,17.502,15.469,0.297,1}, {"N",72.705,16.22,14.708,0.221,1}, {"C",70.446,15.871,15.631,0.166,1}, {"C",71.915,16.398,15.916,0.178,1}, {"C",72.506,15.605,17.068,0.211,1}, {"O",72.947,14.443,16.976,0.19,1}, {"N",72.407,16.251,18.211,0.212,1}, {"N",71.474,21.044,21.543,0.209,1}, {"N",73.209,20.847,23.078,0.191,1}, {"C",72.637,20.461,21.915,0.212,1}, {"N",73.043,19.604,20.973,0.201,1}, {"C",74.297,18.827,21.055,0.173,1}, {"C",74.267,17.566,20.339,0.142,1}, {"C",73.109,16.648,20.661,0.199,1}, {"C",72.77,15.671,19.516,0.24,1}, {"C",71.582,14.817,19.98,0.266,1}, {"O",71.778,13.86,20.736,0.281,1}, {"N",70.369,15.153,19.528,0.242,1}, {"C",68.793,16.585,21.553,0.273,1}, {"O",67.664,16.225,19.468,0.233,1}, {"C",68.171,15.507,20.586,0.168,1}, {"C",69.165,14.432,20.001,0.23,1}, {"C",68.643,13.563,18.853,0.261,1}, {"O",69.196,13.572,17.697,0.235,1}, {"N",67.544,12.826,19.205,0.21,1}, {"N",62.174,8.847,19.899,0.439,1}, {"N",63.093,7.856,18.052,0.455,1}, {"C",63.214,8.47,19.22,0.406,1}, {"N",64.263,8.827,19.965,0.401,1}, {"C",65.575,8.601,19.412,0.303,1}, {"C",66.528,9.755,19.39,0.236,1}, {"C",66.089,10.974,18.684,0.242,1}, {"C",67.016,11.999,18.09,0.193,1}, {"C",66.323,12.846,17.01,0.241,1}, {"O",65.865,12.413,15.934,0.271,1}, {"N",66.185,14.15,17.225,0.222,1}, {"C",65.603,15.189,16.407,0.236,1}, {"C",64.093,14.863,16.151,0.259,1}, {"O",63.401,14.257,16.977,0.271,1}, {"N",63.697,15.277,14.958,0.222,1}, {"C",62.143,17.752,15.273,0.223,1}, {"O",62.482,17.19,12.915,0.221,1}, {"C",61.876,16.759,14.118,0.171,1}, {"C",62.305,15.258,14.484,0.276,1}, {"C",61.905,14.327,13.391,0.262,1}, {"O",60.66,14.273,13.16,0.222,1}, {"N",62.801,13.577,12.809,0.149,1}, {"N",66.222,17.376,8.125,0.349,1}, {"N",67.005,15.307,7.571,0.295,1}, {"C",66.168,16.057,8.25,0.333,1}, {"N",65.224,15.551,9.069,0.285,1}, {"C",64.927,14.123,9.236,0.188,1}, {"C",63.838,14.196,10.31,0.159,1}, {"C",63.543,12.743,10.647,0.147,1}, {"C",62.449,12.694,11.724,0.137,1}, {"C",62.22,11.317,12.265,0.161,1}, {"O",62.956,10.777,13.1,0.155,1}, {"N",61.159,10.695,11.688,0.136,1}, {"N",62.955,11.586,15.718,0.171,1}, {"N",62.242,11.786,17.865,0.185,1}, {"C",62.153,11.155,16.691,0.202,1}, {"N",61.245,10.159,16.55,0.191,1}, {"C",60.959,9.444,15.27,0.155,1}, {"C",59.976,10.194,14.396,0.147,1}, {"C",59.675,9.264,13.219,0.165,1}, {"C",60.773,9.332,12.088,0.121,1}, {"C",60.102,8.641,10.906,0.091,1}, {"O",59.57,9.267,9.965,0.137,1}, {"N",60.218,7.359,10.977,0.099,1}, {"C",61.836,5.441,7.183,0.176,1}, {"C",60.927,6.38,7.983,0.131,1}, {"C",60.303,5.498,9.151,0.183,1}, {"C",59.454,4.293,8.626,0.169,1}, {"C",59.521,6.468,10.068,0.165,1}, {"C",58.54,5.703,11,0.15,1}, {"O",58.921,5.08,11.986,0.14,1}, {"N",57.255,5.741,10.547,0.167,1}, {"C",55.913,6.925,13.641,0.178,1}, {"C",55.161,7.103,12.301,0.212,1}, {"C",54.833,5.797,11.552,0.164,1}, {"C",53.803,4.861,12.308,0.133,1}, {"C",56.146,4.982,11.184,0.158,1}, {"C",55.781,3.793,10.312,0.123,1}, {"O",55.304,3.967,9.165,0.168,1}, {"N",55.908,2.558,10.746,0.1,1}, {"S",56.184,-0.323,11.759,0.206,0.6}, {"S",58.035,0.284,9.688,0.237,0.4}, {"C",56.3,0.247,10.096,0.21,1}, {"C",55.424,1.471,9.904,0.147,1}, {"C",53.958,1.04,10.365,0.149,1}, {"O",53.645,1.139,11.597,0.127,1}, {"N",53.204,0.528,9.418,0.144,1}, {"C",51.868,-0.006,9.741,0.105,1}, {"C",52.057,-1.426,9.467,0.125,1}, {"O",53.009,-1.74,8.702,0.172,1}, {"N",51.21,-2.347,9.889,0.123,1}, {"O",48.481,-5.989,12.069,0.556,1}, {"O",49.006,-5.074,13.943,0.486,1}, {"C",49.308,-5.256,12.751,0.521,1}, {"C",50.545,-4.687,12.004,0.334,1}, {"C",50.367,-4.631,10.487,0.19,1}, {"C",51.323,-3.759,9.634,0.111,1}, {"C",51.136,-4.18,8.188,0.11,1}, {"O",51.578,-5.281,7.786,0.165,1}, {"N",50.537,-3.415,7.316,0.101,1}, {"C",49.34,-2.814,5.245,0.107,1}, {"C",50.322,-3.807,5.938,0.148,1}, {"C",51.625,-3.776,5.132,0.132,1}, {"O",52.579,-3.071,5.467,0.166,1}, {"N",51.595,-4.507,4.059,0.126,1}, {"C",53.526,-5.856,0.966,0.221,1}, {"O",52.218,-6.963,2.5,0.296,1}, {"C",52.35,-5.62,1.921,0.174,1}, {"C",52.676,-4.615,3.086,0.198,1}, {"C",53.035,-3.242,2.582,0.164,1}, {"O",52.186,-2.504,2.065,0.147,1}, {"N",54.322,-2.811,2.71,0.17,1}, {"N",57.068,-1.295,-0.658,0.34,1}, {"O",56.819,-3.475,-0.047,0.525,1}, {"C",56.354,-2.398,-0.389,0.356,1}, {"C",54.838,-2.246,-0.385,0.336,1}, {"C",54.487,-1.281,0.739,0.198,1}, {"C",54.752,-1.497,2.22,0.157,1}, {"C",54.094,-0.269,2.884,0.132,1}, {"O",54.156,0.831,2.266,0.156,1}, {"N",53.451,-0.393,4.032,0.106,1}, {"O",49.554,-0.294,7.145,0.095,1}, {"O",48.937,1.905,7.152,0.155,1}, {"C",49.574,0.879,6.87,0.052,1}, {"C",50.794,1.403,6.017,0.122,1}, {"C",51.66,0.218,5.537,0.097,1}, {"C",52.84,0.783,4.668,0.103,1}, {"C",53.885,1.459,5.562,0.109,1}, {"O",54.059,0.841,6.668,0.126,1}, {"N",54.446,2.584,5.084,0.099,1}, {"O",57.418,0.812,6.684,0.14,1}, {"O",57,0.573,4.594,0.158,1}, {"C",57.155,1.313,5.585,0.118,1}, {"C",56.949,2.787,5.575,0.137,1}, {"C",55.472,3.161,5.951,0.14,1}, {"C",55.277,4.61,5.758,0.103,1}, {"O",55.227,4.968,4.584,0.155,1}, {"N",55.27,5.393,6.776,0.108,1}, {"O",49.261,4.292,6.391,0.196,1}, {"C",51.732,7,6.341,0.146,1}, {"C",50.587,6.28,5.989,0.121,1}, {"C",50.377,5.07,6.709,0.149,1}, {"C",51.211,4.468,7.72,0.107,1}, {"C",52.324,5.271,8.025,0.112,1}, {"C",52.591,6.445,7.313,0.137,1}, {"C",53.861,7.252,7.664,0.103,1}, {"C",55.067,6.794,6.699,0.104,1}, {"C",56.325,7.573,7.268,0.145,1}, {"O",56.884,7.225,8.301,0.148,1}, {"N",56.598,8.642,6.577,0.127,1}, {"O",62.711,13.508,7.203,0.233,1}, {"C",60.895,10.311,6.738,0.176,1}, {"C",61.906,11.209,7.117,0.223,1}, {"C",61.775,12.567,6.865,0.237,1}, {"C",60.621,13.077,6.214,0.176,1}, {"C",59.61,12.154,5.871,0.159,1}, {"C",59.738,10.8,6.108,0.197,1}, {"C",58.55,9.884,5.752,0.179,1}, {"C",57.649,9.56,7.03,0.157,1}, {"C",57.003,10.812,7.622,0.134,1}, {"O",56.131,11.535,7.114,0.137,1}, {"N",57.658,11.186,8.749,0.126,1}, {"C",57.208,11.583,11.94,0.128,1}, {"O",56.338,13.704,11.221,0.158,1}, {"C",56.566,12.328,10.769,0.106,1}, {"C",57.366,12.46,9.403,0.118,1}, {"C",58.703,13.213,9.613,0.146,1}, {"O",59.625,12.597,10.195,0.16,1}, {"N",58.743,14.435,9.235,0.135,1}, {"C",59.928,15.317,9.443,0.162,1}, {"C",59.69,16.346,10.516,0.225,1}, {"O",60.62,17.144,10.762,0.214,1}, {"N",58.54,16.39,11.191,0.211,1}, {"O",55.552,16.631,11.17,0.198,1}, {"O",55.149,18.571,10.305,0.305,1}, {"C",55.866,17.845,10.969,0.28,1}, {"C",57.191,18.476,11.479,0.271,1}, {"C",58.123,17.429,12.145,0.171,1}, {"C",57.521,16.9,13.466,0.178,1}, {"O",56.658,17.459,14.111,0.231,1}, {"N",58.097,15.78,13.843,0.204,1}, {"C",59.341,14.282,18.035,0.398,1}, {"N",58.848,13.816,19.232,0.344,1}, {"C",57.625,14.28,19.411,0.406,1}, {"N",57.318,15.078,18.386,0.432,1}, {"C",58.391,15.097,17.49,0.339,1}, {"C",58.414,15.898,16.228,0.257,1}, {"C",57.854,15.024,15.051,0.214,1}, {"C",56.37,14.68,15.195,0.266,1}, {"O",55.758,15.12,16.187,0.193,1}, {"N",55.863,13.912,14.217,0.223,1}, {"O",58.211,9.356,17.463,0.241,1}, {"C",55.786,12.153,17.389,0.201,1}, {"C",56.805,11.326,17.851,0.207,1}, {"C",57.258,10.257,17.082,0.2,1}, {"C",56.628,9.949,15.868,0.212,1}, {"C",55.646,10.808,15.352,0.214,1}, {"C",55.212,11.908,16.12,0.178,1}, {"C",54.115,12.736,15.517,0.187,1}, {"C",54.495,13.396,14.173,0.264,1}, {"C",53.446,14.447,13.853,0.277,1}, {"O",52.289,14.031,14.08,0.315,1}, {"N",53.693,15.661,13.436,0.246,1}, {"C",53.279,18.055,13.045,0.233,1}, {"C",52.688,16.638,13.044,0.258,1}, {"C",52.058,16.24,11.674,0.305,1}, {"O",50.804,16.256,11.503,0.26,1}, {"N",52.837,15.887,10.651,0.245,1}, {"C",51.954,18.175,8.741,0.231,1}, {"O",54.01,16.995,8.18,0.264,1}, {"C",52.58,16.806,8.345,0.263,1}, {"C",52.392,15.56,9.294,0.229,1}, {"C",53.051,14.251,8.871,0.223,1}, {"O",54.093,14.003,9.511,0.193,1}, {"N",52.553,13.473,7.934,0.186,1}, {"C",53.405,10.223,10.303,0.237,1}, {"C",53.474,10.211,11.712,0.207,1}, {"C",52.572,11.01,12.444,0.207,1}, {"C",51.652,11.851,11.764,0.22,1}, {"C",51.572,11.8,10.396,0.222,1}, {"C",52.432,10.995,9.632,0.239,1}, {"C",52.347,10.962,8.128,0.147,1}, {"C",53.086,12.154,7.533,0.169,1}, {"C",52.897,12.061,6.044,0.179,1}, {"O",51.89,12.617,5.567,0.196,1}, {"N",53.798,11.349,5.449,0.161,1}, {"O",54.405,13.261,3.196,0.234,1}, {"C",54.688,11.885,3.123,0.147,1}, {"C",53.64,11.172,3.982,0.14,1}, {"C",53.848,9.683,3.894,0.145,1}, {"O",54.695,9.13,4.652,0.16,1}, {"N",53.129,9.031,2.996,0.13,1}, {"C",52.027,4.739,2.925,0.255,1}, {"C",51.591,5.377,0.455,0.348,1}, {"C",51.515,5.792,1.954,0.303,1}, {"C",52.26,7.067,1.955,0.158,1}, {"C",53.394,7.631,2.762,0.136,1}, {"C",54.681,7.541,1.811,0.101,1}, {"O",54.794,8.259,0.845,0.1,1}, {"N",55.469,6.557,2.206,0.085,1}, {"C",58.997,6.22,4.608,0.137,1}, {"C",58.191,6.967,3.461,0.138,1}, {"C",57.877,5.881,2.384,0.131,1}, {"C",59.154,5.548,1.534,0.164,1}, {"C",56.687,6.368,1.433,0.133,1}, {"C",56.454,5.354,0.318,0.111,1}, {"O",55.958,4.239,0.593,0.136,1}, {"N",56.892,5.802,-0.891,0.113,1}, {"O",56.611,3.525,-4.433,0.111,1}, {"O",55.398,5.107,-5.296,0.153,1}, {"C",56.108,4.66,-4.344,0.093,1}, {"C",56.227,5.659,-3.219,0.096,1}, {"C",56.871,4.899,-2.035,0.105,1}, {"C",58.344,4.396,-2.306,0.092,1}, {"O",59.143,5.224,-2.786,0.111,1}, {"N",58.569,3.184,-1.968,0.116,1}, {"N",61.131,-0.426,0.826,0.2,1}, {"O",59.258,0.205,1.871,0.26,1}, {"C",60.106,0.416,1.003,0.254,1}, {"C",60.053,1.643,0.158,0.15,1}, {"C",60.033,1.248,-1.326,0.074,1}, {"C",59.897,2.524,-2.158,0.129,1}, {"C",60.213,2.14,-3.581,0.179,1}, {"O",61.344,1.694,-3.895,0.15,1}, {"N",59.245,2.322,-4.48,0.144,1}, {"C",57.372,0.343,-5.593,0.109,1}, {"O",57.277,2.519,-6.806,0.197,1}, {"C",58.079,1.34,-6.504,0.155,1}, {"C",59.453,1.933,-5.874,0.142,1}, {"C",60.056,3.106,-6.639,0.143,1}, {"O",60.356,2.964,-7.848,0.191,1}, {"N",60.275,4.298,-6.105,0.13,1}, {"S",58.368,6.852,-6.278,0.147,1}, {"C",59.561,6.16,-7.475,0.162,1}, {"C",60.792,5.428,-6.832,0.164,1}, {"C",61.712,6.353,-6.019,0.155,1}, {"O",61.87,6.084,-4.84,0.143,1}, {"O",62.207,7.359,-6.59,0.158,1}, {"O",69.525,17.646,18.603,0.268,1}, {"O",69.766,19.578,17.208,0.269,1}, {"O",71.627,19.064,18.389,0.263,1}, {"O",69.815,20.036,19.556,0.311,1}, {"S",70.122,18.969,18.501,0.29,1}, {"N",13.897,16.109,23.054,0.258,1}, {"O",11.633,17.326,23.783,0.343,1}, {"O",11.574,19.581,24.046,0.448,1}, {"C",12.112,18.508,23.657,0.412,1}, {"C",13.425,18.614,22.895,0.306,1}, {"C",13.811,17.296,22.188,0.268,1}, {"C",15.2,17.498,21.52,0.31,1}, {"O",16.214,17.147,22.144,0.35,1}, {"N",15.161,18.029,20.309,0.283,1}, {"C",16.168,16.647,17.796,0.371,1}, {"C",17.492,18.644,17.267,0.27,1}, {"C",16.328,18.135,18.094,0.376,1}, {"C",16.42,18.405,19.599,0.372,1}, {"C",16.731,19.826,20.118,0.36,1}, {"O",15.822,20.71,20.108,0.332,1}, {"N",17.967,20.066,20.571,0.258,1}, {"O",19.191,20.339,22.852,0.401,1}, {"C",19.768,21.331,21.946,0.268,1}, {"C",18.411,21.353,21.141,0.3,1}, {"C",18.495,22.544,20.225,0.329,1}, {"O",18.674,23.67,20.755,0.393,1}, {"N",18.285,22.266,18.976,0.27,1}, {"C",18.323,23.441,18.036,0.327,1}, {"C",19.261,22.898,16.949,0.263,1}, {"O",19.499,21.672,16.963,0.275,1}, {"N",19.695,23.844,16.171,0.308,1}, {"C",20.844,23.617,12.436,0.493,1}, {"O",18.785,24.221,13.531,0.536,1}, {"C",20.226,24.272,13.686,0.492,1}, {"C",20.592,23.546,15.05,0.292,1}, {"C",21.999,24.103,15.316,0.284,1}, {"O",22.122,25.151,15.948,0.282,1}, {"N",22.822,23.278,14.668,0.218,1}, {"C",26.401,23.348,16.036,0.241,1}, {"C",25.145,21.299,15.108,0.144,1}, {"C",25.062,22.711,15.692,0.244,1}, {"C",24.253,23.688,14.767,0.261,1}, {"C",24.866,23.744,13.355,0.264,1}, {"O",24.662,22.782,12.589,0.225,1}, {"N",25.619,24.827,13.073,0.211,1}, {"S",25.687,27.581,11.402,0.216,1}, {"C",26.893,26.294,11.665,0.206,1}, {"C",26.313,24.876,11.811,0.165,1}, {"C",27.388,23.795,11.79,0.157,1}, {"O",28.096,23.562,12.77,0.172,1}, {"N",27.509,23.153,10.63,0.185,1}, {"C",29.463,20.159,7.276,0.218,1}, {"C",29.602,19.406,9.659,0.171,1}, {"C",29.633,20.6,8.709,0.188,1}, {"C",28.478,21.614,8.958,0.115,1}, {"C",28.52,22.134,10.386,0.192,1}, {"C",29.901,22.74,10.714,0.187,1}, {"O",30.841,22.129,11.198,0.207,1}, {"N",29.967,23.986,10.389,0.208,1}, {"O",30.495,27.099,10.605,0.232,1}, {"C",31.13,26.145,9.778,0.158,1}, {"C",31.165,24.795,10.55,0.268,1}, {"C",31.492,24.994,12.004,0.247,1}, {"O",32.724,25.126,12.252,0.336,1}, {"N",30.666,25.021,12.983,0.228,1}, {"C",29.582,25.705,15.066,0.161,1}, {"C",30.856,25.197,14.389,0.207,1}, {"C",31.306,23.86,14.991,0.228,1}, {"O",31.745,23.914,16.158,0.254,1}, {"N",31.206,22.718,14.308,0.174,1}, {"C",28.809,20.393,15.923,0.168,1}, {"C",28.51,19.333,13.563,0.204,1}, {"C",29.144,20.426,14.437,0.21,1}, {"C",30.69,20.311,14.213,0.169,1}, {"C",31.544,21.44,14.926,0.197,1}, {"C",33.025,21.078,14.779,0.229,1}, {"O",33.656,21.629,13.855,0.189,1}, {"N",33.502,20.102,15.565,0.221,1}, {"C",34.118,18.806,17.369,0.246,1}, {"C",32.864,19.349,16.605,0.193,1}, {"C",35.041,18.393,16.273,0.224,1}, {"C",34.909,19.603,15.343,0.228,1}, {"C",35.037,19.189,13.89,0.215,1}, {"O",34.124,18.669,13.16,0.194,1}, {"N",36.209,19.382,13.323,0.177,1}, {"C",38.486,19.579,12.99,0.233,1}, {"C",37.373,19.969,14.011,0.207,1}, {"C",37.878,19.43,11.647,0.229,1}, {"C",36.428,18.998,11.964,0.161,1}, {"C",36.144,17.529,11.701,0.187,1}, {"O",35.771,17.293,10.494,0.189,1}, {"N",36.252,16.575,12.594,0.144,1}, {"O",39.579,15.98,14.43,0.241,1}, {"O",37.69,16.577,15.267,0.205,1}, {"C",38.331,15.745,14.599,0.252,1}, {"C",37.867,14.469,13.911,0.185,1}, {"C",36.336,14.403,13.667,0.162,1}, {"C",35.975,15.16,12.387,0.162,1}, {"C",34.504,14.852,12.005,0.117,1}, {"O",34.196,13.848,11.377,0.171,1}, {"N",33.677,15.783,12.482,0.182,1}, {"C",31.47,17.021,12.818,0.089,1}, {"C",32.195,15.812,12.19,0.204,1}, {"C",31.998,15.794,10.657,0.181,1}, {"O",31.219,15.025,10.093,0.18,1}, {"N",32.803,16.644,9.958,0.158,1}, {"C",33.844,17.872,6.502,0.246,1}, {"O",32.946,19.068,8.484,0.243,1}, {"C",33.625,17.893,8.014,0.178,1}, {"C",32.779,16.668,8.514,0.127,1}, {"C",33.281,15.381,7.934,0.128,1}, {"O",32.775,14.873,6.927,0.149,1}, {"N",34.298,14.735,8.489,0.144,1}, {"O",37.39,14.619,7.785,0.299,1}, {"O",37.807,13.862,9.817,0.336,1}, {"C",37.151,13.882,8.776,0.288,1}, {"C",35.974,12.937,8.745,0.116,1}, {"C",34.792,13.482,7.915,0.165,1}, {"C",33.71,12.387,7.996,0.155,1}, {"O",33.675,11.576,7.071,0.171,1}, {"N",33.092,12.413,9.197,0.175,1}, {"C",30.406,10.231,11.008,0.113,1}, {"O",32.653,11.318,11.606,0.169,1}, {"C",31.436,11.32,10.787,0.185,1}, {"C",32.065,11.34,9.356,0.179,1}, {"C",30.91,11.534,8.348,0.157,1}, {"O",30.517,10.489,7.803,0.139,1}, {"N",30.493,12.797,8.205,0.201,1}, {"C",27.032,14.259,8.334,0.341,1}, {"C",27.995,16.664,7.996,0.341,1}, {"C",28.265,15.18,8.242,0.359,1}, {"C",29.077,14.586,7.111,0.253,1}, {"C",29.415,13.095,7.217,0.247,1}, {"C",29.876,12.588,5.831,0.284,1}, {"O",29.071,12.038,5.098,0.229,1}, {"N",31.136,12.809,5.482,0.188,1}, {"N",34.05,15.191,3.851,0.329,1}, {"O",32.018,14.834,2.817,0.464,1}, {"C",33.006,14.417,3.505,0.339,1}, {"C",33.091,12.975,3.942,0.249,1}, {"C",31.722,12.349,4.222,0.199,1}, {"C",31.692,10.846,4.187,0.217,1}, {"O",31.339,10.335,3.075,0.238,1}, {"N",32.03,10.049,5.182,0.181,1}, {"C",34.664,7.569,5.184,0.279,1}, {"C",34.662,7.569,7.692,0.271,1}, {"C",34.092,8.224,6.459,0.191,1}, {"C",32.583,8.018,6.376,0.229,1}, {"C",31.915,8.605,5.093,0.193,1}, {"C",30.465,8.088,4.964,0.216,1}, {"O",30.225,7.023,4.37,0.226,1}, {"N",29.599,8.86,5.617,0.216,1}, {"C",27.052,9.956,9.108,0.136,1}, {"C",27.555,8.943,8.069,0.172,1}, {"C",27.388,9.365,6.621,0.258,1}, {"C",25.922,9.062,6.261,0.25,1}, {"C",28.175,8.485,5.596,0.218,1}, {"C",27.708,8.591,4.139,0.241,1}, {"O",27.073,7.659,3.609,0.255,1}, {"N",28.047,9.673,3.486,0.228,1}, {"C",28.181,11.267,1.625,0.235,1}, {"C",27.658,9.901,2.078,0.262,1}, {"C",28.083,8.757,1.165,0.376,1}, {"O",27.268,8.216,0.361,0.361,1}, {"N",29.317,8.264,1.294,0.311,1}, {"O",32.041,7.143,1.536,0.414,1}, {"C",31.393,7.39,0.284,0.363,1}, {"C",29.878,7.182,0.46,0.31,1}, {"C",29.611,5.774,0.953,0.305,1}, {"O",30.006,4.8,0.298,0.33,1}, {"N",28.953,5.809,2.103,0.295,1}, {"O",27.012,2.802,4.015,0.475,1}, {"O",27.016,1.408,2.266,0.505,1}, {"C",27.192,2.551,2.775,0.488,1}, {"C",27.695,3.714,1.912,0.368,1}, {"C",28.65,4.56,2.774,0.266,1}, {"C",29.961,3.848,3.147,0.298,1}, {"O",30.112,2.631,2.985,0.237,1}, {"N",30.873,4.622,3.731,0.261,1}, {"C",32.088,3.905,4.208,0.235,1}, {"C",33.17,3.859,3.1,0.289,1}, {"O",33.092,4.59,2.105,0.299,1}, {"N",34.181,3.031,3.282,0.241,1}, {"C",35.765,1.558,2.468,0.239,1}, {"C",35.249,2.992,2.262,0.271,1}, {"C",35.658,1.339,3.94,0.283,1}, {"C",34.439,2.116,4.414,0.231,1}, {"C",34.568,2.842,5.752,0.236,1}, {"O",35.021,4.006,5.8,0.273,1}, {"N",34.062,2.339,6.865,0.21,1}, {"C",31.335,4.871,8.387,0.21,1}, {"C",30.269,5.53,7.7,0.294,1}, {"C",29.389,4.774,6.878,0.186,1}, {"C",29.623,3.412,6.752,0.234,1}, {"C",30.668,2.748,7.418,0.226,1}, {"C",31.526,3.501,8.247,0.203,1}, {"C",32.677,2.759,8.931,0.186,1}, {"C",34.02,3.033,8.154,0.242,1}, {"C",35.203,2.617,9.015,0.178,1}, {"O",35.532,1.413,8.884,0.196,1}, {"N",35.707,3.505,9.86,0.168,1}, {"C",36.196,5.408,11.153,0.244,1}, {"C",35.333,4.895,9.987,0.158,1}, {"C",37.277,4.369,11.369,0.187,1}, {"C",36.817,3.064,10.715,0.14,1}, {"C",36.487,2.033,11.765,0.183,1}, {"O",37.264,1.098,12.102,0.171,1}, {"N",35.303,2.149,12.446,0.173,1}, {"O",38.498,4.748,17.267,0.312,1}, {"C",35.635,4.123,15.129,0.161,1}, {"C",36.683,4.814,15.812,0.211,1}, {"C",37.534,4.048,16.622,0.329,1}, {"C",37.434,2.642,16.809,0.255,1}, {"C",36.379,2.017,16.114,0.284,1}, {"C",35.475,2.777,15.335,0.161,1}, {"C",34.391,2.004,14.677,0.122,1}, {"C",34.935,1.202,13.528,0.137,1}, {"C",33.881,0.23,13.069,0.126,1}, {"O",32.993,0.588,12.25,0.148,1}, {"N",33.99,-0.936,13.586,0.123,1}, {"O",33.501,-3.552,15.194,0.226,1}, {"C",33.456,-3.409,13.83,0.155,1}, {"C",33.031,-2.035,13.342,0.191,1}, {"C",31.61,-1.605,13.847,0.198,1}, {"O",30.645,-2.179,13.256,0.171,1}, {"N",31.479,-0.732,14.803,0.174,1}, {"N",28.262,-1.334,18.613,0.3,1}, {"O",29.124,-2.936,17.227,0.475,1}, {"C",29.256,-1.835,17.85,0.407,1}, {"C",30.559,-1.066,17.674,0.22,1}, {"C",30.531,0.226,16.849,0.21,1}, {"C",30.252,-0.189,15.397,0.155,1}, {"C",29.674,0.932,14.579,0.183,1}, {"O",28.557,1.428,14.885,0.253,1}, {"N",30.334,1.395,13.527,0.142,1}, {"O",31.375,4.459,13.62,0.177,1}, {"O",32.869,4.132,12.099,0.157,1}, {"C",31.729,3.936,12.515,0.162,1}, {"C",30.792,3.074,11.644,0.122,1}, {"C",29.817,2.454,12.67,0.15,1}, {"C",28.632,1.9,11.825,0.164,1}, {"O",28.81,0.852,11.22,0.144,1}, {"N",27.53,2.634,11.875,0.179,1}, {"C",26.351,2.246,11.06,0.199,1}, {"C",25.405,1.303,11.75,0.171,1}, {"O",24.557,0.69,11.06,0.283,1}, {"N",25.457,1.134,13.023,0.155,1}, {"C",25.392,0.735,16.144,0.177,1}, {"C",26.391,-1.22,14.752,0.213,1}, {"C",25.14,-0.322,15.092,0.211,1}, {"C",24.551,0.252,13.768,0.145,1}, {"C",23.284,1.158,13.974,0.177,1}, {"O",23.274,2.41,13.956,0.19,1}, {"N",22.198,0.37,14.178,0.215,1}, {"C",19.631,-0.58,13.217,0.248,1}, {"C",18.43,0.788,14.995,0.231,1}, {"C",19.717,0.06,14.558,0.215,1}, {"C",20.928,1.072,14.466,0.25,1}, {"C",21.037,1.78,15.807,0.189,1}, {"O",21.522,1.284,16.85,0.186,1}, {"N",20.518,2.945,15.793,0.175,1}, {"C",21.25,5.835,19.206,0.227,1}, {"C",20.933,6.625,20.345,0.226,1}, {"C",19.868,7.602,20.354,0.271,1}, {"C",19.106,7.79,19.185,0.226,1}, {"C",19.423,6.988,18.099,0.187,1}, {"C",20.464,6.024,18.067,0.172,1}, {"C",20.671,5.236,16.777,0.189,1}, {"C",20.352,3.75,17.006,0.23,1}, {"C",18.871,3.502,17.502,0.273,1}, {"O",17.933,3.903,16.777,0.257,1}, {"N",18.7,2.934,18.699,0.261,1}, {"N",18.983,-1.779,20.383,0.573,1}, {"O",17.555,-0.734,21.87,0.61,1}, {"C",18.096,-0.815,20.746,0.596,1}, {"C",17.768,0.234,19.672,0.471,1}, {"C",17.386,1.554,20.355,0.302,1}, {"C",17.375,2.652,19.263,0.349,1}, {"C",16.59,3.859,19.793,0.361,1}, {"O",15.357,3.69,19.992,0.329,1}, {"N",17.223,4.984,20.074,0.295,1}, {"N",13.756,8.385,19.408,0.197,1}, {"O",15.678,8.746,20.508,0.291,1}, {"C",14.943,7.991,19.825,0.284,1}, {"C",15.532,6.649,19.454,0.291,1}, {"C",16.457,6.138,20.568,0.301,1}, {"C",15.626,5.742,21.802,0.381,1}, {"O",14.526,6.262,21.972,0.324,1}, {"N",16.213,4.833,22.55,0.349,1}, {"N",17.324,3.937,29.123,0.637,1}, {"N",16.219,1.967,29.159,0.687,1}, {"C",17.153,2.722,28.53,0.666,1}, {"N",17.849,2.399,27.441,0.674,1}, {"C",18.085,1.833,26.119,0.648,1}, {"C",17.349,2.078,24.828,0.576,1}, {"C",16.634,3.354,24.605,0.372,1}, {"C",15.756,4.22,23.792,0.378,1}, {"C",15.312,5.38,24.696,0.386,1}, {"O",14.242,5.107,25.276,0.414,1}, {"N",15.881,6.547,24.853,0.371,1}, {"O",18.25,6.292,27.096,0.725,1}, {"O",18.71,6.541,24.893,0.745,1}, {"C",18.294,6.953,26.005,0.705,1}, {"C",17.714,8.337,26.302,0.646,1}, {"C",16.212,8.307,26.671,0.5,1}, {"C",15.227,7.544,25.765,0.407,1}, {"C",14.354,8.608,25.074,0.429,1}, {"O",14.116,9.656,25.765,0.478,1}, {"N",13.892,8.383,23.846,0.32,1}, {"O",11.194,7.867,22.896,0.568,1}, {"C",11.586,9.175,23.392,0.447,1}, {"C",13.095,9.287,23.048,0.321,1}, {"C",13.545,10.748,23.083,0.409,1}, {"O",12.732,11.736,23.191,0.353,1}, {"N",14.871,10.893,22.942,0.251,1}, {"C",17.153,12.029,24.741,0.364,1}, {"C",17.415,13.83,22.993,0.278,1}, {"C",16.868,12.436,23.305,0.321,1}, {"C",15.354,12.295,22.915,0.255,1}, {"C",14.962,12.81,21.537,0.188,1}, {"O",14.644,13.994,21.347,0.235,1}, {"N",15.1,11.903,20.544,0.256,1}, {"C",17.608,13.325,17.949,0.151,1}, {"C",18.005,10.923,17.368,0.196,1}, {"C",17.271,11.905,18.284,0.172,1}, {"C",15.764,11.582,18.128,0.219,1}, {"C",14.76,12.216,19.122,0.247,1}, {"C",13.295,11.696,18.913,0.258,1}, {"O",12.82,10.807,19.681,0.227,1}, {"N",12.671,12.253,17.889,0.257,1}, {"C",11.816,13.805,16.319,0.26,1}, {"C",13.173,13.322,16.955,0.292,1}, {"C",11.107,12.485,16.128,0.232,1}, {"C",11.298,11.848,17.527,0.226,1}, {"C",11.156,10.349,17.44,0.231,1}, {"O",12.034,9.658,16.827,0.208,1}, {"N",10.074,9.818,18.043,0.211,1}, {"C",7.979,6.615,18.745,0.211,1}, {"O",8.959,8.495,20.09,0.288,1}, {"C",8.485,8.027,18.807,0.223,1}, {"C",9.774,8.366,17.944,0.21,1}, {"C",9.533,7.938,16.509,0.168,1}, {"O",8.858,8.655,15.799,0.181,1}, {"N",10.166,6.883,16.04,0.232,1}, {"N",9.623,7.877,12.141,0.13,1}, {"O",10.481,9.992,12.179,0.225,1}, {"C",10.441,8.838,12.622,0.167,1}, {"C",11.319,8.276,13.717,0.156,1}, {"C",11.374,6.774,13.81,0.197,1}, {"C",10.182,6.314,14.696,0.216,1}, {"C",10.266,4.816,14.838,0.193,1}, {"O",10.576,4.404,15.979,0.217,1}, {"N",9.96,4.057,13.818,0.22,1}, {"O",8.258,2.005,12.569,0.328,1}, {"C",9.687,1.871,12.609,0.23,1}, {"C",10.111,2.59,13.911,0.26,1}, {"C",11.591,2.223,14.195,0.314,1}, {"O",12.531,2.987,13.871,0.22,1}, {"N",11.808,1.072,14.792,0.287,1}, {"O",18.259,-3.197,15.821,0.522,1}, {"C",15.293,-1.249,16.986,0.434,1}, {"C",16.564,-1.851,16.998,0.439,1}, {"C",17.022,-2.581,15.899,0.42,1}, {"C",16.214,-2.723,14.755,0.529,1}, {"C",14.949,-2.125,14.719,0.478,1}, {"C",14.484,-1.39,15.843,0.475,1}, {"C",13.082,-0.802,15.656,0.381,1}, {"C",13.181,0.566,14.981,0.288,1}, {"C",13.821,0.417,13.595,0.285,1}, {"O",13.281,-0.169,12.613,0.256,1}, {"N",15.014,1.028,13.469,0.275,1}, {"C",15.739,0.968,12.19,0.223,1}, {"C",15.763,2.225,11.396,0.21,1}, {"O",16.452,2.366,10.331,0.258,1}, {"N",15.043,3.253,11.829,0.194,1}, {"O",13.004,10.419,9.473,0.167,1}, {"C",14.42,7.881,11.642,0.165,1}, {"C",14.199,9.125,11.032,0.186,1}, {"C",13.196,9.234,10.066,0.166,1}, {"C",12.502,8.084,9.705,0.183,1}, {"C",12.713,6.87,10.289,0.189,1}, {"C",13.714,6.74,11.32,0.143,1}, {"C",13.907,5.408,11.933,0.145,1}, {"C",15.002,4.561,11.208,0.199,1}, {"C",16.33,5.362,11.359,0.136,1}, {"O",16.775,6.109,10.523,0.186,1}, {"N",16.916,5.176,12.51,0.207,1}, {"O",13.978,10.326,15.243,0.183,1}, {"C",16.991,8.604,14.133,0.155,1}, {"C",15.998,9.563,14.313,0.183,1}, {"C",14.867,9.256,15.104,0.206,1}, {"C",14.736,8.028,15.707,0.159,1}, {"C",15.721,7.04,15.478,0.175,1}, {"C",16.852,7.337,14.691,0.193,1}, {"C",17.922,6.277,14.478,0.182,1}, {"C",18.152,5.839,12.999,0.168,1}, {"C",19.352,4.888,12.958,0.146,1}, {"O",19.243,3.732,13.353,0.15,1}, {"N",20.474,5.491,12.595,0.175,1}, {"C",21.328,2.05,10.846,0.253,1}, {"N",20.279,1.517,10.212,0.305,1}, {"C",19.681,2.495,9.589,0.274,1}, {"N",20.318,3.697,9.82,0.204,1}, {"C",21.377,3.379,10.62,0.268,1}, {"C",22.385,4.326,11.222,0.154,1}, {"C",21.776,4.758,12.575,0.221,1}, {"C",22.859,5.674,13.229,0.168,1}, {"O",22.707,6.904,13.114,0.154,1}, {"N",23.813,4.892,13.824,0.149,1}, {"O",25.779,2.977,17.873,0.565,1}, {"O",26.172,5.188,18.119,0.468,1}, {"C",25.732,4.178,17.557,0.486,1}, {"C",24.999,4.31,16.215,0.276,1}, {"C",24.926,5.83,15.925,0.184,1}, {"C",24.831,5.86,14.468,0.143,1}, {"C",26.241,5.578,13.886,0.115,1}, {"O",26.543,4.467,13.43,0.122,1}, {"N",26.953,6.717,13.883,0.157,1}, {"O",24.876,4.663,8.531,0.26,1}, {"C",26.076,7.104,10.993,0.189,1}, {"C",25.214,6.379,10.157,0.186,1}, {"C",25.723,5.369,9.359,0.243,1}, {"C",27.065,4.992,9.341,0.155,1}, {"C",27.882,5.684,10.198,0.128,1}, {"C",27.431,6.714,10.995,0.18,1}, {"C",28.385,7.461,11.924,0.214,1}, {"C",28.338,6.742,13.292,0.158,1}, {"C",29.254,7.509,14.254,0.165,1}, {"O",28.865,8.519,14.897,0.131,1}, {"N",30.514,7.022,14.405,0.194,1}, {"C",33.673,7.212,16.671,0.128,1}, {"O",32.203,5.405,15.807,0.136,1}, {"C",32.754,6.678,15.533,0.129,1}, {"C",31.477,7.657,15.319,0.154,1}, {"C",31.982,8.971,14.727,0.094,1}, {"O",32.258,9.007,13.492,0.118,1}, {"N",32.17,9.991,15.497,0.129,1}, {"C",30.868,12.663,14.747,0.137,1}, {"C",33.157,13.78,15.354,0.146,1}, {"C",32.174,12.558,15.561,0.161,1}, {"C",32.861,11.244,15.243,0.152,1}, {"C",34.19,11.023,16.137,0.15,1}, {"O",34.141,11.04,17.381,0.165,1}, {"N",35.267,10.797,15.377,0.188,1}, {"C",38.308,8.317,13.434,0.147,1}, {"C",37.452,8.782,14.618,0.142,1}, {"C",37.712,10.186,15.175,0.149,1}, {"C",39.069,10.352,15.96,0.175,1}, {"C",36.523,10.555,16.155,0.184,1}, {"C",36.911,11.799,16.967,0.134,1}, {"O",36.762,12.974,16.509,0.156,1}, {"N",37.384,11.474,18.198,0.158,1}, {"C",37.831,13.434,21.526,0.196,1}, {"O",35.787,12.616,20.47,0.217,1}, {"C",37.244,12.392,20.575,0.203,1}, {"C",37.874,12.507,19.144,0.14,1}, {"C",39.43,12.31,19.199,0.17,1}, {"O",39.764,11.303,19.841,0.148,1}, {"N",40.182,13.208,18.568,0.162,1}, {"C",40.994,14.824,17.077,0.243,1}, {"C",39.741,14.394,17.844,0.208,1}, {"C",42.1,14.519,18.066,0.214,1}, {"C",41.64,13.184,18.639,0.199,1}, {"C",42.032,13.233,20.143,0.202,1}, {"O",41.463,14.058,20.91,0.183,1}, {"N",42.919,12.375,20.588,0.198,1}, {"C",43.363,12.311,21.953,0.21,1}, {"C",42.53,11.384,22.811,0.247,1}, {"O",43.136,11.165,23.868,0.229,1}, {"N",41.353,10.922,22.43,0.212,1}, {"C",39.222,9.967,23.023,0.152,1}, {"C",40.689,9.99,23.376,0.183,1}, {"C",41.307,8.593,23.236,0.198,1}, {"O",41.87,8.26,22.141,0.236,1}, {"N",41.232,7.72,24.241,0.151,1}, {"N",41.94,1.705,26.279,0.231,1}, {"N",40.139,2.709,27.311,0.22,1}, {"C",41.445,2.741,26.994,0.261,1}, {"N",42.283,3.761,27.329,0.234,1}, {"C",42.037,5.113,27.753,0.2,1}, {"C",41.701,6.112,26.69,0.212,1}, {"C",42.362,5.708,25.396,0.244,1}, {"C",41.749,6.381,24.14,0.155,1}, {"C",40.662,5.401,23.675,0.138,1}, {"O",40.959,4.218,23.431,0.163,1}, {"N",39.417,5.97,23.647,0.172,1}, {"C",37.754,4.599,25.686,0.199,1}, {"O",36.503,6.311,24.524,0.157,1}, {"C",37.146,5.001,24.323,0.179,1}, {"C",38.253,5.149,23.197,0.175,1}, {"C",37.647,5.844,21.971,0.162,1}, {"O",38.1,6.899,21.471,0.182,1}, {"N",36.533,5.203,21.585,0.176,1}, {"N",30.491,2.331,19.363,0.274,1}, {"N",30.684,4.02,17.816,0.271,1}, {"C",31.257,3.155,18.643,0.351,1}, {"N",32.593,3.073,18.804,0.383,1}, {"C",33.701,3.55,18.052,0.27,1}, {"C",34.864,3.767,19.017,0.314,1}, {"C",34.599,4.837,20.047,0.219,1}, {"C",35.692,5.774,20.522,0.197,1}, {"C",35.095,7.113,21.045,0.178,1}, {"O",34.602,7.903,20.233,0.206,1}, {"N",35.12,7.429,22.329,0.114,1}, {"C",34.69,8.677,22.908,0.143,1}, {"C",33.141,8.911,22.862,0.171,1}, {"O",32.389,7.93,22.776,0.202,1}, {"N",32.785,10.18,22.895,0.171,1}, {"C",31.772,10.327,25.614,0.201,1}, {"O",31.713,12.474,24.339,0.199,1}, {"C",31.175,11.149,24.421,0.135,1}, {"C",31.316,10.453,23.005,0.197,1}, {"C",30.683,11.176,21.865,0.193,1}, {"O",29.469,11.442,22.019,0.173,1}, {"N",31.407,11.5,20.821,0.12,1}, {"N",35.113,17.489,21.688,0.204,1}, {"N",35.63,16.864,19.592,0.153,1}, {"C",34.928,16.636,20.67,0.15,1}, {"N",34.092,15.602,20.759,0.18,1}, {"C",33.477,14.863,19.677,0.131,1}, {"C",32.519,13.868,20.304,0.126,1}, {"C",31.75,13.213,19.121,0.173,1}, {"C",30.785,12.241,19.719,0.13,1}, {"C",30.278,11.265,18.688,0.136,1}, {"O",30.909,10.245,18.355,0.109,1}, {"N",29.058,11.696,18.182,0.122,1}, {"N",31.332,8.075,19.76,0.171,1}, {"N",30.85,6.061,21.02,0.151,1}, {"C",30.594,6.976,20.06,0.201,1}, {"N",29.449,6.754,19.355,0.149,1}, {"C",28.876,7.634,18.363,0.082,1}, {"C",28.003,8.722,19.003,0.104,1}, {"C",27.516,9.691,17.939,0.059,1}, {"C",28.423,10.731,17.238,0.099,1}, {"C",27.575,11.603,16.331,0.121,1}, {"O",27.206,12.71,16.685,0.133,1}, {"N",27.41,10.977,15.227,0.169,1}, {"C",28.083,13.823,11.782,0.26,1}, {"C",27.697,13.247,13.142,0.203,1}, {"C",26.888,11.959,13.037,0.158,1}, {"C",25.789,12.219,12.002,0.166,1}, {"C",26.334,11.512,14.382,0.13,1}, {"C",25.289,10.443,14.117,0.145,1}, {"O",25.613,9.271,13.926,0.158,1}, {"N",24.066,10.875,14.304,0.147,1}, {"C",23.664,8.649,16.933,0.304,1}, {"C",22.487,9.571,16.774,0.221,1}, {"C",21.939,9.969,15.405,0.2,1}, {"C",20.707,9.114,14.865,0.235,1}, {"C",22.92,9.942,14.217,0.139,1}, {"C",22.182,10.385,12.955,0.132,1}, {"O",21.912,11.574,12.692,0.163,1}, {"N",21.945,9.47,12.059,0.165,1}, {"S",21.685,7.603,9.714,0.255,0.7}, {"S",23.398,9.942,8.972,0.231,0.3}, {"C",21.84,9.337,9.586,0.202,1}, {"C",21.206,9.913,10.845,0.192,1}, {"C",19.73,9.399,10.982,0.187,1}, {"O",19.464,8.341,11.608,0.196,1}, {"N",18.864,10.198,10.322,0.205,1}, {"C",17.462,9.671,10.344,0.231,1}, {"C",17.24,9.341,8.88,0.203,1}, {"O",18.117,9.636,8.047,0.265,1}, {"N",16.103,8.74,8.534,0.255,1}, {"O",14.579,3.972,7.853,0.547,1}, {"O",12.995,5.367,7.144,0.447,1}, {"C",14.144,5.087,7.467,0.496,1}, {"C",15.197,6.158,7.459,0.342,1}, {"C",14.75,7.46,6.797,0.238,1}, {"C",15.883,8.468,7.111,0.276,1}, {"C",15.571,9.712,6.334,0.312,1}, {"O",15.758,9.5,5.114,0.379,1}, {"N",15.152,10.859,6.834,0.299,1}, {"C",14.137,13.07,6.677,0.314,1}, {"C",14.895,11.984,5.918,0.311,1}, {"C",16.22,12.527,5.366,0.406,1}, {"O",17.365,12.212,5.717,0.36,1}, {"N",15.998,13.556,4.21,0.412,1}, {"C",15.889,13.729,1.302,0.432,1}, {"O",15.796,15.89,2.323,0.529,1}, {"C",16.652,14.771,2.121,0.503,1}, {"C",17.155,14.182,3.544,0.356,1}, {"C",17.822,15.159,4.607,0.341,1}, {"O",17.11,16.014,5.205,0.328,1}, {"N",19.165,15.038,4.775,0.376,1}, {"N",21.514,19.422,3.487,0.588,1}, {"O",21.533,17.127,3.251,0.458,1}, {"C",20.986,18.303,3.555,0.528,1}, {"C",19.548,18.199,4.065,0.532,1}, {"C",19.417,17.515,5.404,0.467,1}, {"C",19.81,16.043,5.668,0.35,1}, {"C",19.394,15.956,7.126,0.225,1}, {"O",19.703,16.873,7.913,0.276,1}, {"N",18.676,14.878,7.403,0.246,1}, {"O",14.982,12.074,9.66,0.205,1}, {"O",14.866,12.762,11.758,0.277,1}, {"C",15.322,12.786,10.623,0.225,1}, {"C",16.497,13.693,10.314,0.198,1}, {"C",17.135,13.644,8.918,0.171,1}, {"C",18.258,14.679,8.801,0.22,1}, {"C",19.498,14.097,9.493,0.206,1}, {"O",19.597,12.846,9.537,0.224,1}, {"N",20.46,14.881,9.966,0.217,1}, {"O",22.83,12.617,8.229,0.305,1}, {"O",22.524,14.498,7.392,0.283,1}, {"C",22.761,13.826,8.419,0.268,1}, {"C",22.935,14.578,9.75,0.258,1}, {"C",21.689,14.338,10.63,0.169,1}, {"C",21.793,15.113,11.911,0.124,1}, {"O",21.738,16.332,11.887,0.166,1}, {"N",21.928,14.388,12.993,0.144,1}, {"O",15.683,14.447,13.435,0.309,1}, {"C",18.821,15.441,15.061,0.164,1}, {"C",17.499,15.517,14.553,0.187,1}, {"C",16.98,14.38,13.895,0.248,1}, {"C",17.716,13.206,13.668,0.229,1}, {"C",19.057,13.179,14.121,0.211,1}, {"C",19.59,14.283,14.824,0.19,1}, {"C",21.04,14.238,15.316,0.122,1}, {"C",21.994,14.988,14.31,0.153,1}, {"C",23.431,14.815,14.878,0.143,1}, {"O",23.933,13.693,14.651,0.181,1}, {"N",23.846,15.772,15.608,0.138,1}, {"O",31.047,16.826,18.794,0.219,1}, {"C",28.48,16.08,16.195,0.202,1}, {"C",29.735,16.056,16.869,0.231,1}, {"C",29.882,16.772,18.07,0.243,1}, {"C",28.766,17.493,18.608,0.269,1}, {"C",27.524,17.515,17.901,0.208,1}, {"C",27.372,16.779,16.708,0.17,1}, {"C",26.01,16.848,16.004,0.155,1}, {"C",25.152,15.593,16.266,0.156,1}, {"C",24.927,15.454,17.767,0.17,1}, {"O",24.092,16.294,18.289,0.177,1}, {"N",25.7,14.574,18.376,0.148,1}, {"C",25.463,11.914,20.009,0.124,1}, {"O",25.093,13.392,21.884,0.134,1}, {"C",24.949,13.253,20.43,0.121,1}, {"C",25.718,14.483,19.845,0.166,1}, {"C",27.232,14.476,20.272,0.139,1}, {"O",28.018,13.681,19.724,0.16,1}, {"N",27.54,15.316,21.214,0.164,1}, {"C",28.973,15.337,21.68,0.18,1}, {"C",29.017,14.781,23.064,0.243,1}, {"O",30.04,14.697,23.755,0.23,1}, {"N",27.861,14.347,23.574,0.227,1}, {"O",25.114,14.616,24.424,0.193,1}, {"O",25.102,16.33,25.803,0.291,1}, {"C",25.638,15.304,25.326,0.247,1}, {"C",27.054,14.896,25.835,0.254,1}, {"C",27.758,13.826,24.98,0.21,1}, {"C",27.169,12.428,25.078,0.228,1}, {"O",26.589,12.078,26.161,0.281,1}, {"N",27.368,11.604,24.025,0.245,1}, {"C",28.74,7.34,24.2,0.452,1}, {"N",28.461,5.997,24.141,0.491,1}, {"C",27.338,5.856,24.845,0.45,1}, {"N",26.882,6.994,25.357,0.351,1}, {"C",27.784,7.968,24.948,0.39,1}, {"C",27.653,9.437,25.272,0.3,1}, {"C",26.935,10.201,24.067,0.322,1}, {"C",25.413,10.138,24.222,0.334,1}, {"O",24.871,9.543,25.206,0.288,1}, {"N",24.785,10.861,23.3,0.3,1}, {"O",26.112,5.917,20.047,0.451,1}, {"C",24.247,7.411,22.793,0.381,1}, {"C",25.037,6.56,22.028,0.481,1}, {"C",25.286,6.831,20.674,0.481,1}, {"C",24.719,7.945,20.039,0.375,1}, {"C",23.932,8.782,20.822,0.393,1}, {"C",23.676,8.544,22.175,0.316,1}, {"C",22.797,9.433,23.028,0.286,1}, {"C",23.297,10.882,23.223,0.355,1}, {"C",22.528,11.54,24.362,0.376,1}, {"O",21.329,11.199,24.514,0.393,1}, {"N",23.108,12.44,25.14,0.238,1}, {"C",23.167,13.629,27.299,0.272,1}, {"C",22.314,13.105,26.164,0.282,1}, {"C",21.588,14.224,25.422,0.295,1}, {"O",20.386,14.444,25.593,0.324,1}, {"N",22.231,14.967,24.552,0.246,1}, {"C",21.993,17.55,25.96,0.296,1}, {"O",23.344,17.746,24.037,0.237,1}, {"C",21.997,17.45,24.435,0.276,1}, {"C",21.62,16.079,23.796,0.191,1}, {"C",21.988,15.882,22.332,0.236,1}, {"O",22.977,15.181,21.926,0.219,1}, {"N",21.125,16.44,21.481,0.172,1}, {"C",21.571,13.059,18.913,0.212,1}, {"C",21.763,11.705,19.221,0.244,1}, {"C",21.088,11.196,20.332,0.193,1}, {"C",20.262,11.972,21.162,0.22,1}, {"C",20.054,13.268,20.824,0.208,1}, {"C",20.705,13.84,19.713,0.189,1}, {"C",20.405,15.285,19.375,0.154,1}, {"C",21.297,16.309,20.044,0.138,1}, {"C",20.992,17.643,19.414,0.177,1}, {"O",20.114,18.309,19.999,0.177,1}, {"N",21.653,17.95,18.327,0.146,1}, {"O",22.648,20.939,18.8,0.377,1}, {"C",22.628,20.147,17.655,0.268,1}, {"C",21.458,19.175,17.586,0.16,1}, {"C",21.324,18.712,16.123,0.147,1}, {"O",21.967,17.767,15.768,0.154,1}, {"N",20.407,19.344,15.395,0.147,1}, {"C",17.864,20.141,11.313,0.333,1}, {"C",18.359,17.675,11.728,0.308,1}, {"C",18.774,19.124,11.952,0.262,1}, {"C",18.845,19.411,13.478,0.192,1}, {"C",20.237,19.008,13.984,0.155,1}, {"C",21.39,19.809,13.233,0.165,1}, {"O",21.657,21.012,13.414,0.169,1}, {"N",22.137,19.089,12.407,0.178,1}, {"C",25.803,16.848,12.081,0.175,1}, {"C",24.804,17.954,12.548,0.125,1}, {"C",24.332,18.645,11.234,0.134,1}, {"C",25.413,19.476,10.479,0.189,1}, {"C",23.221,19.712,11.651,0.202,1}, {"C",22.702,20.412,10.39,0.208,1}, {"O",21.991,19.879,9.561,0.198,1}, {"N",23.142,21.664,10.295,0.2,1}, {"O",22.559,24.494,7.235,0.232,1}, {"O",21.711,25.889,8.598,0.295,1}, {"C",22.301,24.792,8.392,0.239,1}, {"C",22.564,23.886,9.594,0.155,1}, {"C",22.932,22.517,9.148,0.16,1}, {"C",24.27,22.598,8.362,0.146,1}, {"O",25.219,23.303,8.742,0.178,1}, {"N",24.237,21.884,7.297,0.159,1}, {"N",25.99,17.688,4.954,0.481,1}, {"O",24.286,17.229,6.406,0.378,1}, {"C",25.241,18.008,5.895,0.424,1}, {"C",25.365,19.351,6.575,0.306,1}, {"C",25.294,20.537,5.598,0.198,1}, {"C",25.445,21.8,6.41,0.179,1}, {"C",25.686,22.999,5.529,0.205,1}, {"O",26.633,22.939,4.741,0.248,1}, {"N",24.865,24.035,5.624,0.213,1}, {"C",22.994,24.497,3.511,0.26,1}, {"O",22.801,26.346,5.25,0.246,1}, {"C",23.61,25.693,4.237,0.197,1}, {"C",25.013,25.2,4.796,0.194,1}, {"C",25.702,26.348,5.483,0.175,1}, {"O",25.844,27.382,4.856,0.181,1}, {"N",26.087,26.129,6.699,0.177,1}, {"S",24.83,27.111,9.609,0.216,1}, {"C",25.787,28.063,8.333,0.181,1}, {"C",26.73,27.242,7.436,0.154,1}, {"C",27.914,26.73,8.276,0.182,1}, {"O",28.065,25.496,8.349,0.197,1}, {"O",28.487,27.688,8.839,0.213,1}, {"O",38.115,8.296,25.493,0.545,1}, {"O",40.251,8.969,26.756,0.589,1}, {"O",38.054,8.459,27.913,0.634,1}, {"O",38.578,10.575,26.544,0.637,1}, {"S",38.722,9.032,26.659,0.619,1}}; int rnasexyzdata_size = sizeof( rnasexyzdata ) / sizeof( rnasexyzdata[0] ); Test_data::Test_data() { Spacegroup spgr = Spacegroup( Spgr_descr( rnasespgr ) ); Cell cell = Cell( Cell_descr( rnasecell[0], rnasecell[1], rnasecell[2], rnasecell[3], rnasecell[4], rnasecell[5] ) ); Resolution reso( rnasereso - 1.0e-3 ); std::vector hkl; hklinfo.init( spgr, cell, reso, true ); fsig.init( hklinfo, hklinfo.cell() ); abcd.init( hklinfo, hklinfo.cell() ); datatypes::F_sigF fs; datatypes::ABCD hl; bool flag = true; for ( int i = 0; i < rnasehkldata_size; i++ ) { HKL hkl( rnasehkldata[i].h, rnasehkldata[i].k, rnasehkldata[i].l ); fs.f() = rnasehkldata[i].f; fs.sigf() = rnasehkldata[i].s; hl.a() = rnasehkldata[i].a; hl.b() = rnasehkldata[i].b; hl.c() = rnasehkldata[i].c; hl.d() = rnasehkldata[i].d; flag = flag && fsig.set_data( hkl, fs ); flag = flag && abcd.set_data( hkl, hl ); } std::vector v; for ( int i = 0; i < rnasexyzdata_size; i++ ) { Atom a = Atom::null(); a.set_element( rnasexyzdata[i].element ); a.set_coord_orth( Coord_orth( rnasexyzdata[i].x, rnasexyzdata[i].y, rnasexyzdata[i].z ) ); a.set_u_iso( rnasexyzdata[i].u_iso ); a.set_occupancy( rnasexyzdata[i].occ ); v.push_back(a); } atoms = Atom_list( v ); if ( flag == false ) Message::message( Message_warn( "Self test: error filling data." ) ); } } // namespace data } // namespace clipper clipper-2.1/clipper/core/clipper_message.cpp0000644000374100011300000000604110363703537016171 00000000000000/* clipper_message.cpp: implementation file for clipper helper functions */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "clipper_message.h" namespace clipper { int Message::message_level_ = 5; int Message::fatal_level_ = 9; std::ostream* Message::stream_ = &std::cerr; Message message; Message::Message() { message_level_ = 5; fatal_level_ = 9; set_stream( std::cerr ); } void Message::set_stream( std::ostream& stream ) { stream_ = &stream; } void Message::set_message_level( const int& level ) { if ( level < 1 ) message_level_ = 1; else if ( level > fatal_level_ ) message_level_ = fatal_level_; else message_level_ = level; } void Message::set_fatal_level( const int& level ) { if ( level < message_level_ ) fatal_level_ = message_level_; else if ( level > 9 ) fatal_level_ = 9; else fatal_level_ = level; } } // namespace clipper clipper-2.1/clipper/core/clipper_util.h0000644000374100011300000002171310363703537015172 00000000000000/*! \file lib/clipper_util.h Header file for clipper helper functions */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_UTIL #define CLIPPER_UTIL #include "clipper_precision.h" #include "clipper_sysdep.h" namespace clipper { //! Utility class /*! This class holds a set of useful static functions and values. You should never need to instantiate this class: Refer to members using Util:: */ class Util { public: Util(); //!< null constructor //! fast Util::nan() value static const ftype& nan() { return nan_; } //! fast Util::nan() value static const float& nanf() { return nanf_; } //! fast Util::nan() value static const double& nand() { return nand_; } //! set null floating value - a specific value of NaN used for missings inline static void set_null( ftype32& f ) { *((uitype32*)&f) = *((const uitype32*)&nanf_); } //! set null floating value - a specific value of NaN used for missings inline static void set_null( ftype64& f ) { *((uitype64*)&f) = *((const uitype64*)&nand_); } //! fast test for null floating value - only works if set from Util::null() inline static bool is_null( const ftype32& f ) { return ( *((const uitype32*)&f) == *((const uitype32*)&nanf_) ); } //! fast test for null floating value - only works if set from Util::null() inline static bool is_null( const ftype64& f ) { return ( *((const uitype64*)&f) == *((const uitype64*)&nand_) ); } //! fast Util::nan() test /*! Used for missing entries: THIS DOES NOT DISTINGUISH BETWEEN NAN & INF */ inline static bool is_nan( const ftype32 f ) { return ((*((const uitype32*)&f)&CLIPPER_NAN_MASK_A_32)==CLIPPER_NAN_MASK_A_32); } //! fast Util::nan() test /*! Used for missing entries: THIS DOES NOT DISTINGUISH BETWEEN NAN & INF */ inline static bool is_nan( const ftype64 f ) { return ((*((const uitype64*)&f)&CLIPPER_NAN_MASK_A_64)==CLIPPER_NAN_MASK_A_64); } //! slow general NaN test for compatibility /*! Works for all architectures with IEEE arithmetic only */ inline static bool isnan(const ftype32 f) { return ((*((const uitype32*)&f)&CLIPPER_NAN_MASK_A_32)==CLIPPER_NAN_MASK_A_32)&&((*((const uitype32*)&f)&CLIPPER_NAN_MASK_B_32)!=0U); } //! slow general NaN test for compatibility /*! Works for all architectures with IEEE arithmetic only */ inline static bool isnan(const ftype64 f) { return ((*((const uitype64*)&f)&CLIPPER_NAN_MASK_A_64)==CLIPPER_NAN_MASK_A_64)&&((*((const uitype64*)&f)&CLIPPER_NAN_MASK_B_64)!=0U); } //! Sim function: I1(X)/I0(X) static ftype sim( const ftype& x ); //! Inverse Sim function: I1(X)/I0(X) static ftype invsim( const ftype& x ); //! Integral of Sim function: log(I0(X)) static ftype sim_integ( const ftype& x ); //! Derivative of Sim function: d/dx( I1(X)/I0(x) ) static ftype sim_deriv( const ftype& x ); //! Derivative of Sim function using recurrance: -sim(x)/x + (1 - sim(x)^2) static ftype sim_deriv_recur( const ftype& x ); //! Arc hyperbolic tangent static ftype atanh( const ftype& x ) { return log((1.0+x)/(1.0-x))/2.0; } //! Modified Bessel function of the first kind static ftype bessel_i0( const ftype& x ); //! Convert isotropic U-value to B-factor static ftype u2b( const ftype& x ) { return x * eightpi2_; } //! Convert isotropic B-factor to U-value static ftype b2u( const ftype& x ) { return x / eightpi2_; } //! Convert F+/F- to mean F, with NaN checks template inline static T mean( const T& pl, const T& mi ) { if ( Util::is_nan(pl) ) return mi; else if (Util::is_nan(mi) ) return pl; else return 0.5*(pl+mi); } //! Convert sigF+/sigF-/cov to sig F, with NaN checks template inline static T sig_mean( const T& pl, const T& mi, const T& cov ) { if ( Util::is_nan(pl) ) return mi; else if (Util::is_nan(mi) ) return pl; else if (Util::is_nan(cov) ) return 0.5*sqrt(pl*pl+mi*mi); else return 0.5*sqrt(pl*pl+mi*mi+2*cov); } //! Truncate-to-integer: int(floor(a)) inline static int intf( const ftype& a ) { return int( floor( a ) ); } //! Truncate-to-integer above: int(ceil(a)) inline static int intc( const ftype& a ) { return int( ceil( a ) ); } //! Round-to-integer: int(round(a)) inline static int intr( const ftype& a ) { return int( rint( a ) ); } //! Corrected mod inline static ftype mod( const ftype& a, const ftype& b ) { ftype c = fmod(a, b); if (c < 0) c+=b; return c;} //! Corrected mod inline static int mod( const int& a, const int& b ) { int c = a%b; if (c < 0) c+=b; return c; } //! max template inline static T max(const T& a, const T& b) { return (a > b) ? a : b; } //! min template inline static T min(const T& a, const T& b) { return (a < b) ? a : b; } //! bound a value by limits template inline static T bound( const T& min, const T& val, const T& max ) { return ( (val < max) ? ( (val > min ) ? val : min ) : max ); } //! swap the contents of two objects template inline static void swap( T& a, T& b ) { T c = a; a = b; b = c; } //! swap the contents of two objects, using third as store (for speed) template inline static void swap( T& a, T& b, T& c ) { c = a; a = b; b = c; } //! square template inline static T sqr( const T& a ) { return a*a; } //! Integer square root (returns floor of sqrt) template inline static T isqrt( const T& n ) { return T(floor(sqrt(ftype(n)))); } //! pi inline static const ftype& pi() { return onepi_; } //! 2 pi inline static const ftype& twopi() { return twopi_; } //! 2 pi squared inline static const ftype& twopi2() { return twopi2_; } //! 8 pi squared inline static const ftype& eightpi2() { return eightpi2_; } //! degree-to-radian conversion static ftype d2rad( const ftype& x ); //! degree-to-radian conversion static ftype rad2d( const ftype& x ); private: static float nanf_; //!< float NaN static double nand_; //!< double NaN static ftype nan_; //!< ftype nan static ftype onepi_; //!< one*pi static ftype twopi_; //!< two*pi static ftype twopi2_; //!< two*pi*pi static ftype eightpi2_; //!< eight*pi*pi static ftype d2rad_; //!< degree-radian conversion static ftype sim_a; //!< sim fn param static ftype sim_b; //!< sim fn param static ftype sim_c; //!< sim fn param static ftype sim_d; //!< sim fn param static ftype sim_e; //!< sim fn param static ftype sim_A; //!< invsim fn param static ftype sim_B; //!< invsim fn param static ftype sim_C; //!< invsim fn param static ftype sim_g; //!< invsim fn param static ftype sim_p; //!< invsim fn param static ftype sim_q; //!< invsim fn param static ftype sim_r; //!< invsim fn param }; } // namespace clipper #endif clipper-2.1/clipper/core/test_core.h0000644000374100011300000000470710363703537014472 00000000000000/*! \file lib/test_core.h Header file for clipper core self-test functions */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_TEST_CORE #define CLIPPER_TEST_CORE #include "clipper_test.h" namespace clipper { class Test_core : public Test_base { public: //! do the self-tests bool operator() (); }; } // namespace clipper #endif clipper-2.1/clipper/core/hkl_lookup.h0000644000374100011300000000621610363703537014647 00000000000000/*! \file lib/hkl_lookup.h Header file for reflection lookup class */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_HKL_LOOKUP #define CLIPPER_HKL_LOOKUP #include "coords.h" namespace clipper { //! Fast reflection lookup object /*! This version uses a ragged array index to get reflection indices from Miller indices. */ class HKL_lookup { public: //! initialise: make a reflection index for a list of HKLs void init(const std::vector& hkl); //! lookup function int index_of(const HKL& rfl) const; void debug(); struct llookup { int min, max; std::vector p; llookup() {min=32000;max=-32000;} }; //!< lookup on l struct klookup { int min, max; std::vector p; klookup() {min=32000;max=-32000;} }; //!< lookup on k struct hlookup { int min, max; std::vector p; hlookup() {min=32000;max=-32000;} }; //!< lookup on h private: //! pointer to first list hlookup h_ptr; }; } // namespace clipper #endif clipper-2.1/clipper/core/nxmap_operator.cpp0000644000374100011300000001516510363703537016074 00000000000000/* nxmap_operator.cpp: implementation file for non-crystal map operator */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "nxmap_operator.h" namespace clipper { /*! The object is not initialised, and will return is_null(). */ NX_operator::NX_operator() { xfrac_nxgrid = RTop<>::null(); } /*! The operator and inverse operator, together with any possible optimisations, are constructed to relate the give crystallographic and non-crystallographic grid frames, using the supplied orthogonal operator. \param xmap An Xmap defining the crystal grid frame. \param nxmap An NXmap defining the non-crystal grid frame. \param rtop The operator relating the orthogonal frame of the NXmap onto the orthogonal frame of the Xmap. */ NX_operator::NX_operator( const Xmap_base& xmap, const NXmap_base& nxmap, const RTop_orth& rtop ) { init( xmap, nxmap, rtop ); } /*! The operator and inverse operator, together with any possible optimisations, are constructed to relate the give crystallographic and non-crystallographic grid frames, using the supplied orthogonal operator. \param cell The cell defining the crystal grid frame. \param grid The grid defining the crystal grid frame. \param nxmap An NXmap defining the non-crystal grid frame. \param rtop The operator relating the orthogonal frame of the NXmap onto the orthogonal frame of the Xmap. */ NX_operator::NX_operator( const Cell& cell, const Grid_sampling& grid, const NXmap_base& nxmap, const RTop_orth& rtop ) { init( cell, grid, nxmap, rtop ); } /*! The operator and inverse operator, together with any possible optimisations, are constructed to relate the give crystallographic and non-crystallographic grid frames, using the supplied orthogonal operator. \param xmap An Xmap defining the crystal grid frame. \param nxmap An NXmap defining the non-crystal grid frame. \param rtop The operator relating the orthogonal frame of the NXmap onto the orthogonal frame of the Xmap. */ void NX_operator::init( const Xmap_base& xmap, const NXmap_base& nxmap, const RTop_orth& rtop ) { init( xmap.cell(), xmap.grid_sampling(), nxmap, rtop ); } /*! The operator and inverse operator, together with any possible optimisations, are constructed to relate the give crystallographic and non-crystallographic grid frames, using the supplied orthogonal operator. \param cell The cell defining the crystal grid frame. \param grid The grid defining the crystal grid frame. \param nxmap An NXmap defining the non-crystal grid frame. \param rtop The operator relating the orthogonal frame of the NXmap onto the orthogonal frame of the Xmap. */ void NX_operator::init( const Cell& cell, const Grid_sampling& grid, const NXmap_base& nxmap, const RTop_orth& rtop ) { // make op to map nxmap grid -> cell frac coords nxgrid_xfrac = RTop_orth(cell.matrix_frac()) * rtop * nxmap.operator_grid_orth(); // make op for grid coords nxgrid_xgrid = RTop_orth(grid.matrix_frac_grid()) * nxgrid_xfrac; // make inverse op xfrac_nxgrid = nxgrid_xfrac.inverse(); xgrid_nxgrid = nxgrid_xgrid.inverse(); // now make nearest int op to cell -> nxmap op RTop_orth xgrid_nxgrid_rnd, nxgrid_xgrid_rnd; for ( int j = 0; j < 3; j++ ) { xgrid_nxgrid_rnd.trn()[j] = rint( xgrid_nxgrid.trn()[j] ); nxgrid_xgrid_rnd.trn()[j] = rint( nxgrid_xgrid.trn()[j] ); xgrid_nxgrid_int.trn()[j] = int( xgrid_nxgrid_rnd.trn()[j] ); nxgrid_xgrid_int.trn()[j] = int( nxgrid_xgrid_rnd.trn()[j] ); for ( int i = 0; i < 3; i++ ) { xgrid_nxgrid_rnd.rot()(i,j) = rint( xgrid_nxgrid.rot()(i,j) ); nxgrid_xgrid_rnd.rot()(i,j) = rint( nxgrid_xgrid.rot()(i,j) ); xgrid_nxgrid_int.rot()(i,j) = int( xgrid_nxgrid_rnd.rot()(i,j) ); nxgrid_xgrid_int.rot()(i,j) = int( nxgrid_xgrid_rnd.rot()(i,j) ); } } // check for integer mapping x_nx_is_int = xgrid_nxgrid_rnd.equals( xgrid_nxgrid, 0.01 ); x_nx_is_trn = x_nx_is_int && xgrid_nxgrid_rnd.rot().equals( Mat33<>::identity(), 0.01 ); nx_x_is_int = nxgrid_xgrid_rnd.equals( nxgrid_xgrid, 0.01 ); nx_x_is_trn = nx_x_is_int && nxgrid_xgrid_rnd.rot().equals( Mat33<>::identity(), 0.01 ); } bool NX_operator::is_null() const { return xfrac_nxgrid.is_null(); } void NX_operator::debug() const { std::cout << " X->NX is int? " << x_nx_is_int << "\n"; std::cout << " X->NX is trn? " << x_nx_is_trn << "\n"; std::cout << xgrid_nxgrid.format() << "\n"; std::cout << " NX->X is int? " << x_nx_is_int << "\n"; std::cout << " NX->X is trn? " << x_nx_is_trn << "\n"; std::cout << nxgrid_xgrid.format() << "\n"; } } // namespace clipper clipper-2.1/clipper/core/clipper_thread.cpp0000644000374100011300000000540210776417005016014 00000000000000/* clipper_thread.cpp: implementation file for threading handlers */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "clipper_thread.h" #ifndef CLIPPER_DISABLE_THREADS namespace clipper { Mutex Thread_base::mutex_global = Mutex(); int Thread_base::next_id = 0; Thread_base::Thread_base() { lock(); id_ = next_id++; unlock(); } bool Thread_base::run() { return CLIPPER_THREAD_EXEC( thread, Thread_base::Entry, this ); } bool Thread_base::join() { return CLIPPER_THREAD_JOIN( thread ); } CLIPPER_THREAD_RETTYPE Thread_base::Entry( CLIPPER_THREAD_ARGTYPE thisptr ) { ((Thread_base*)thisptr)->Run(); return NULL; } } // namespace clipper #endif clipper-2.1/clipper/core/Makefile.am0000644000374100011300000000445111372264321014354 00000000000000# Makefile.am, passed: clipper/core, extracted subdir: core # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper/core ## -*- mode: Makefile; mode: font-lock -*- INCLUDES=${FFTW_CXXFLAGS} library_include_HEADERS = \ atomsf.h \ cell.h \ clipper_instance.h \ clipper_memory.h \ clipper_message.h \ clipper_precision.h \ clipper_stats.h \ clipper_sysdep.h \ clipper_test.h \ clipper_thread.h \ clipper_types.h \ clipper_util.h \ container.h \ container_hkl.h \ container_map.h \ container_types.h \ coords.h \ derivs.h \ fftmap.h \ fftmap_sparse.h \ hkl_compute.h \ hkl_data.h \ hkl_datatypes.h \ hkl_info.h \ hkl_lookup.h \ hkl_operators.h \ map_interp.h \ map_utils.h \ nxmap.h \ nxmap_operator.h \ ramachandran.h \ resol_basisfn.h \ resol_fn.h \ resol_targetfn.h \ rotation.h \ spacegroup_data.h \ spacegroup.h \ symop.h \ test_core.h \ test_data.h \ xmap.h lib_LTLIBRARIES = libclipper-core.la libclipper_core_la_SOURCES = \ atomsf.cpp \ cell.cpp \ clipper_instance.cpp \ clipper_memory.cpp \ clipper_message.cpp \ clipper_stats.cpp \ clipper_test.cpp \ clipper_thread.cpp \ clipper_types.cpp \ clipper_util.cpp \ container.cpp \ container_hkl.cpp \ container_map.cpp \ container_types.cpp \ coords.cpp \ derivs.cpp \ fftmap.cpp \ fftmap_sparse.cpp \ hkl_compute.cpp \ hkl_data.cpp \ hkl_datatypes.cpp \ hkl_info.cpp \ hkl_lookup.cpp \ hkl_operators.cpp \ map_interp.cpp \ map_utils.cpp \ nxmap.cpp \ nxmap_operator.cpp \ ramachandran.cpp \ resol_basisfn.cpp \ resol_fn.cpp \ resol_targetfn.cpp \ rotation.cpp \ spacegroup.cpp \ spacegroup_data.cpp \ symop.cpp \ test_core.cpp \ test_data.cpp \ xmap.cpp library_includedir = $(pkgincludedir)/core libclipper_core_la_LDFLAGS = -version-info @CLIPPER_LT_VERSION@ libclipper_core_la_LIBADD = \ $(FFTW_LIBS) \ -lpthread clipper-2.1/clipper/core/clipper_message.h0000644000374100011300000001415410363703537015642 00000000000000/*! \file lib/clipper_message.h Header file for clipper message handler */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_MESSAGE #define CLIPPER_MESSAGE #include #include namespace clipper { //! Message handler class /*! The message handler is a static class which handles messages and errors. It has 3 properties: - the output stream: to which messages will be directed (default stderr) - message level: messages with a level >= this will be output (default 5) - fatal level: messages with a level >= this will be fatal (default 9) Levels may be in the range 1-9. They are priorotised as follows: - 1-4 messages, never fatal - 5-8 warning, may be fatal - 9: always fatal. The fatal level must be greater than or equal to the message level, and greater than or equal to 5. A message is any object which implements the following methods: \code const std::string& text() const; int level() const; \endcode The level method may be static. Messages are usually derived from Message_base. */ class Message { public: Message(); //!< null constuctor //! return the current stream static std::ostream& stream() { return *stream_; } //! return the current message level static const int& message_level() { return message_level_; } //! return the current fatal error level static const int& fatal_level() { return fatal_level_; } //! set the output stream static void set_stream( std::ostream& stream ); //! set the current message level static void set_message_level( const int& level ); //! set the current fatal error level static void set_fatal_level( const int& level ); //! pass a message template inline static void message( const T& message ) { if ( message.level() >= Message::message_level() ) { Message::stream() << message.text() << "\n"; if ( message.level() >= Message::fatal_level() ) throw message; } } private: static int message_level_; static int fatal_level_; static std::ostream* stream_; }; //! Base type for messages class Message_base { public: const std::string& text() const; int level() const; protected: Message_base() {} }; //! Generic message class Message_generic : public Message_base { public: Message_generic( const int& level, const std::string& text ) : text_( text ), level_( level ) {} const std::string& text() const { return text_; } const int& level() const { return level_; } private: std::string text_; int level_; }; //! Fatal message (level = 9) class Message_fatal : public Message_base { public: Message_fatal( const std::string& text ) : text_( text ) {} const std::string& text() const { return text_; } static int level() { return 9; } private: std::string text_; }; //! Warning message (level = 5) class Message_warn : public Message_base { public: Message_warn( const std::string& text ) : text_( text ) {} const std::string& text() const { return text_; } static int level() { return 5; } private: std::string text_; }; //! Info message (level = 1) class Message_info : public Message_base { public: Message_info( const std::string& text ) : text_( text ) {} const std::string& text() const { return text_; } static int level() { return 1; } private: std::string text_; }; //! Constructor message (level = 2) class Message_ctor : public Message_base { public: Message_ctor( const std::string& text ) : text_( "+"+text ) {} const std::string& text() const { return text_; } static int level() { return 2; } private: std::string text_; }; //! Destructor message (level = 2) class Message_dtor : public Message_base { public: Message_dtor( const std::string& text ) : text_( "-"+text ) {} const std::string& text() const { return text_; } static int level() { return 2; } private: std::string text_; }; } // namespace clipper #endif clipper-2.1/clipper/core/container_map.h0000644000374100011300000002133110363703537015312 00000000000000/*! \file lib/container_map.h Header file for Container versions of various objects */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_CONTAINER_MAP #define CLIPPER_CONTAINER_MAP #include "container_types.h" #include "nxmap_operator.h" namespace clipper { //! Crystallographic map container /*! CXmap: This is a crystallographic map. */ template class CXmap : public Container, public Xmap { public: //! null constructor CXmap() {} //! constructor: inherit spacegroup, cell and grid CXmap( Container& parent, const String name = "" ); //! initialiser: supply or inherit spacegroup, cell and grid void init( const Spacegroup& spacegroup, const Cell& cell, const Grid_sampling& grid_sampling ); //! hierarchical update void update(); }; //! Non-Crystallographic map container /*! CNXmap: This is a non-crystallographic map. Since it does not exist in a crystallographic frame, it does not inherit anything. */ template class CNXmap : public Container, public NXmap { public: //! null constructor CNXmap() {} //! constructor: CNXmap( Container& parent, const String name = "" ) : Container( parent, name ) {} }; //! Non-Crystallographic map operator container /*! CNXmap: This is an operator relating a non-crystallographic map into a crystallgraphic frame. It can inherit the crystallographic cell and grid sampling. */ template class CNXmap_operator : public Container, public NXmap_operator { public: //! null constructor CNXmap_operator() {} //! constructor: do not initialise CNXmap_operator( Container& parent, const String name = "" ); //! constructor: inherit cell and grid CNXmap_operator( Container& parent, const String name, const NXmap& nxmap, const RTop_orth& nxop = RTop_orth(RTop<>::null()) ); //! initialier: supply or inherit cell, grid, NXmap, RTop_orth void init( const Cell& cell, const Grid_sampling& grid, const NXmap& nxmap, const RTop_orth& nxop ); //! hierarchical update void update(); private: const NXmap* nxmap_; //!< Store for later initialisation RTop_orth nxop_; //!< Store for later initialisation }; // template implementations /*! The object is constructed at the given location in the hierarchy. An attempt is made to initialise the object using information from its parents in the hierarchy. \param parent An object in the hierarchy (usually the parent of the new object). \param name The path from \c parent to the new object (usually just the name of the new object). */ template CXmap::CXmap( Container& parent, const String name ) : Container( parent, name ) { init( NullSpacegroup, NullCell, NullGrid_sampling ); } /*! An attempt is made to initialise the object using information from the supplied parameters, or if they are Null, from its parents in the hierarchy. \param spacegroup The spacegroup for the map. \param name The cell for the map. \param grid The grid for the map. */ template void CXmap::init( const Spacegroup& spacegroup, const Cell& cell, const Grid_sampling& grid_sampling ) { // use supplied values by default const Spacegroup* sp = &spacegroup; // use pointers so we can reassign const Cell* cp = &cell; const Grid_sampling* gp = &grid_sampling; // otherwise get them from the tree if ( sp->is_null() ) sp = parent_of_type_ptr(); if ( cp->is_null() ) cp = parent_of_type_ptr(); if ( gp->is_null() ) gp = parent_of_type_ptr(); // initialise if ( sp != NULL && cp != NULL && gp != NULL ) if ( !sp->is_null() && !cp->is_null() && !gp->is_null() ) Xmap::init( *sp, *cp, *gp ); Container::update(); } /*! Hierarchical update. If this object is uninitialised, an attempt is made to initialise the object using information from its parents in the hierarchy. The childen of the object are then updated. */ template void CXmap::update() { if ( Xmap_base::is_null() ) init( NullSpacegroup, NullCell, NullGrid_sampling ); else Container::update(); } /*! The object is not initialised. \param parent The objects parent. \param name The object name. */ template CNXmap_operator::CNXmap_operator( Container& parent, const String name ) : Container( parent, name ), nxmap_( NULL ), nxop_( RTop_orth::null() ) {} /*! The object is initialised if the appropriate parent objects are available, and children are updated. \param parent The objects parent. \param name The object name. \param nxmap The non-crystal map object. \param nxop The orth. operator mapping the NXmap into the crystal frame. */ template CNXmap_operator::CNXmap_operator( Container& parent, const String name, const NXmap& nxmap, const RTop_orth& nxop ) : Container( parent, name ), nxmap_( &nxmap ), nxop_( nxop ) { init( NullCell, NullGrid_sampling, NXmap(), RTop_orth::null() ); } /*! An attempt is made to initialise the object using information from the supplied parameters, or if they are Null, from its parents in the hierarchy. \param cell The unit cell for the crystallographic frame. \param grid The grid sampling for the crystallographic frame. \param nxmap The non-crystal map object. \param nxop The orth. operator mapping the NXmap into the crystal frame. */ template void CNXmap_operator::init( const Cell& cell, const Grid_sampling& grid_sampling, const NXmap& nxmap, const RTop_orth& nxop ) { // use supplied values by default const Cell* cp = &cell; const Grid_sampling* gp = &grid_sampling; // otherwise get them from the tree if ( cp->is_null() ) cp = parent_of_type_ptr(); if ( gp->is_null() ) gp = parent_of_type_ptr(); if ( !nxmap.is_null() ) nxmap_ = &nxmap; if ( !nxop.is_null() ) nxop_ = nxop; // initialise if ( cp != NULL && gp != NULL & nxmap_ != NULL ) if ( !cp->is_null() && !gp->is_null() && !nxmap_->is_null() ) NXmap_operator::init( *cp, *gp, *nxmap_, nxop_ ); Container::update(); } /*! Hierarchical update. If this object is uninitialised, an attempt is made to initialise the object using information from its parents in the hierarchy. The childen of the object are then updated. */ template void CNXmap_operator::update() { if ( NX_operator::is_null() ) init( NullCell, NullGrid_sampling, NXmap(), RTop_orth::null() ); else Container::update(); } } // namespace clipper #endif clipper-2.1/clipper/core/hkl_lookup.cpp0000644000374100011300000001153410363703537015201 00000000000000/* hkl_lookup.cpp: class file for reflection data lookup */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "hkl_lookup.h" namespace clipper { void HKL_lookup::init(const std::vector& hkl) { // generate an efficient 3-d lookup table for finding a reflection // given its index. We could use hash_map, but this approach is // more efficient and uses far less memory int i, h, k; if ( hkl.size() == 0 ) return; // make h lookup table for (i=0; i= h_ptr.min ) h_ptr.p.resize( h_ptr.max - h_ptr.min + 1 ); // now add k lists // make k lookup tables for (i=0; i= k_ptr.min ) k_ptr.p.resize( k_ptr.max - k_ptr.min + 1 ); // now add l lists } // make l lookup tables for (i=0; i= l_ptr.min ) l_ptr.p.resize( l_ptr.max - l_ptr.min + 1, -1 ); } } // now fill in the data for (i=0; i= h_ptr.min && h <= h_ptr.max ) { const klookup& k_ptr = h_ptr.p[h - h_ptr.min]; if ( k >= k_ptr.min && k <= k_ptr.max ) { const llookup& l_ptr = k_ptr.p[k - k_ptr.min]; if ( l >= l_ptr.min && l <= l_ptr.max ) { return l_ptr.p[ l - l_ptr.min ]; } } } // if not found, return -1 return -1; } void HKL_lookup::debug() { int size=0, h, k; for (h=h_ptr.min; h<=h_ptr.max; h++) { klookup& k_ptr = h_ptr.p[h - h_ptr.min]; for (k=k_ptr.min; k<=k_ptr.max; k++) { llookup& l_ptr = k_ptr.p[k - k_ptr.min]; size+=l_ptr.p.size(); } } std::cout << "lookup: size " << size << "\n"; } } // namespace clipper clipper-2.1/clipper/core/map_interp.h0000644000374100011300000004201710363703537014635 00000000000000/*! \file lib/map_interp.h Generic interpolation methods for crystal and non-crystal maps. */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_MAP_INTERP #define CLIPPER_MAP_INTERP #include "derivs.h" namespace clipper { //! Wrapper class for zeroth-order (nearest neighbour) interpolation fns /*! These can be used through the built-in methods in Xmap/NXmap, or passed to methods to allow a choice of interpolation methods, or directly by providing the map as an argument. For example: \code NXmap nxmap; Coord_map c; ... x1 = Interp_nearest::interp( nxmap, c ); x2 = nxmap.interp( c ); \endcode */ class Interp_nearest { public: template static bool can_interp( const M& map, const Coord_map& pos ); //!< Test if we can interpolate in map M at coord template static void interp( const M& map, const Coord_map& pos, T& val ); //!< Interpolate map M using type T at coord inline static int order() { return 0; } //!< Order of interpolant }; //! Wrapper class for first-order (linear) interpolation fns /*! These can be used through the built-in methods in Xmap/NXmap, or passed to methods to allow a choice of interpolation methods, or directly by providing the map as an argument. For example: \code NXmap nxmap; Coord_map c; float x1, x2; ... Interp_linear::interp( nxmap, c, x1 ); x2 = nxmap.interp( c ); \endcode */ class Interp_linear { public: template static bool can_interp( const M& map, const Coord_map& pos ); //!< Test if we can interpolate in map M at coord template static void interp( const M& map, const Coord_map& pos, T& val ); //!< Interpolate map M using type T at coord inline static int order() { return 1; } //!< Order of interpolant }; //! Wrapper class for third-order (cubic) interpolation fns /*! These can be used through the built-in methods in Xmap/NXmap, or passed to methods to allow a choice of interpolation methods, or directly by providing the map as an argument. For example: \code NXmap nxmap; Coord_map c; float x1, x2; ... Interp_cubic::interp( nxmap, c, x1 ); x2 = nxmap.interp( c ); \endcode */ class Interp_cubic { public: template static bool can_interp( const M& map, const Coord_map& pos ); //!< Test if we can interpolate in map M at coord template static void interp( const M& map, const Coord_map& pos, T& val ); //!< Interpolate map M using type T at coord template static void interp_grad( const M& map, const Coord_map& pos, T& val, Grad_map& grad ); template static void interp_curv( const M& map, const Coord_map& pos, T& val, Grad_map& grad, Curv_map& curv ); inline static int order() { return 3; } //!< Order of interpolant }; // template implementations /*! The map is queried to see if interpolation is possible at the given coord. For a crystallographic map, this is always true. For a non-crystallographic map, this depends if the point and enough neighbours are in the grid. \param map The map on which to perform the calculation. \param pos The map coord at which the density is to be calcuated. */ template bool Interp_nearest::can_interp( const M& map, const Coord_map& pos ) { return map.in_map( pos.coord_grid() ); } /*! The value of the map at the supplied map coordinate is calculated by zeroth order (nearest neighbour) interpolation based on 1 point. \param map The map on which to perform the calculation. \param pos The map coord at which the density is to be calcuated. \return The value of the density at that point. */ template void Interp_nearest::interp( const M& map, const Coord_map& pos, T& val ) { val = map.get_data( pos.coord_grid() ); } /*! The map is queried to see if interpolation is possible at the given coord. For a crystallographic map, this is always true. For a non-crystallographic map, this depends if the point and enough neighbours are in the grid. \param map The map on which to perform the calculation. \param pos The map coord at which the density is to be calcuated. */ template bool Interp_linear::can_interp( const M& map, const Coord_map& pos ) { Coord_grid c( pos.floor() ); // for even order change floor to coord_grid c.u() -= order()/2; c.v() -= order()/2; c.w() -= order()/2; if ( map.in_map( c ) ) { c.u() += order(); c.v() += order(); c.w() += order(); return map.in_map( c ); } return false; } /*! The value of the map at the supplied map coordinate is calculated by first order (linear) interpolation based on 8 neighbouring points. \param map The map on which to perform the calculation. \param pos The map coord at which the density is to be calcuated. \return The value of the density at that point. */ template void Interp_linear::interp( const M& map, const Coord_map& pos, T& val ) { ftype u0 = floor( pos.u() ); ftype v0 = floor( pos.v() ); ftype w0 = floor( pos.w() ); typename M::Map_reference_coord r( map, Coord_grid( int(u0), int(v0), int(w0) ) ); T cu1( pos.u() - u0 ); T cv1( pos.v() - v0 ); T cw1( pos.w() - w0 ); T cu0( 1.0 - cu1 ); T cv0( 1.0 - cv1 ); T cw0( 1.0 - cw1 ); T r00 = cw0 * map[ r ]; // careful with evaluation order r00 += cw1 * map[ r.next_w() ]; T r01 = cw1 * map[ r.next_v() ]; r01 += cw0 * map[ r.prev_w() ]; T r11 = cw0 * map[ r.next_u() ]; r11 += cw1 * map[ r.next_w() ]; T r10 = cw1 * map[ r.prev_v() ]; r10 += cw0 * map[ r.prev_w() ]; val = ( cu0*( cv0*r00 + cv1*r01 ) + cu1*( cv0*r10 + cv1*r11 ) ); } /*! The map is queried to see if interpolation is possible at the given coord. For a crystallographic map, this is always true. For a non-crystallographic map, this depends if the point and enough neighbours are in the grid. \param map The map on which to perform the calculation. \param pos The map coord at which the density is to be calcuated. */ template bool Interp_cubic::can_interp( const M& map, const Coord_map& pos ) { Coord_grid c( pos.floor() ); // for even order change floor to coord_grid c.u() -= order()/2; c.v() -= order()/2; c.w() -= order()/2; if ( map.in_map( c ) ) { c.u() += order(); c.v() += order(); c.w() += order(); return map.in_map( c ); } return false; } /*! The value of the map at the supplied map coordinate is calculated by third order (cubic) interpolation based on the surrounding 64 points. \param pos The fractional coord at which the density is to be calcuated. \return The value of the density at that point. */ template void Interp_cubic::interp( const M& map, const Coord_map& pos, T& val ) { ftype u0 = floor( pos.u() ); ftype v0 = floor( pos.v() ); ftype w0 = floor( pos.w() ); typename M::Map_reference_coord iw, iv, iu( map, Coord_grid( int(u0)-1, int(v0)-1, int(w0)-1 ) ); T su, sv, sw, cu[4], cv[4], cw[4]; T cu1( pos.u() - u0 ); T cv1( pos.v() - v0 ); T cw1( pos.w() - w0 ); T cu0( 1.0 - cu1 ); T cv0( 1.0 - cv1 ); T cw0( 1.0 - cw1 ); cu[0] = -0.5*cu1*cu0*cu0; // cubic spline coeffs: u cu[1] = cu0*( -1.5*cu1*cu1 + cu1 + 1.0 ); cu[2] = cu1*( -1.5*cu0*cu0 + cu0 + 1.0 ); cu[3] = -0.5*cu1*cu1*cu0; cv[0] = -0.5*cv1*cv0*cv0; // cubic spline coeffs: v cv[1] = cv0*( -1.5*cv1*cv1 + cv1 + 1.0 ); cv[2] = cv1*( -1.5*cv0*cv0 + cv0 + 1.0 ); cv[3] = -0.5*cv1*cv1*cv0; cw[0] = -0.5*cw1*cw0*cw0; // cubic spline coeffs: w cw[1] = cw0*( -1.5*cw1*cw1 + cw1 + 1.0 ); cw[2] = cw1*( -1.5*cw0*cw0 + cw0 + 1.0 ); cw[3] = -0.5*cw1*cw1*cw0; su = 0.0; int i, j; for ( j = 0; j < 4; j++ ) { iv = iu; sv = 0.0; for ( i = 0; i < 4; i++ ) { iw = iv; sw = cw[0] * T( map[ iw ] ); sw += cw[1] * T( map[ iw.next_w() ] ); sw += cw[2] * T( map[ iw.next_w() ] ); sw += cw[3] * T( map[ iw.next_w() ] ); sv += cv[i] * sw; iv.next_v(); } su += cu[j] * sv; iu.next_u(); } val = su; } /*! The value of the map at the supplied map coordinate and its gradient are calculated by third order (cubic) interpolation based on the surrounding 64 points. \param pos The fractional coord at which the density is to be calcuated. \param val The value of the density at that point. \param grad The interpolated value as a gradient vector with respect to the fractional coordinates (see Cell::coord_orth). */ template void Interp_cubic::interp_grad( const M& map, const Coord_map& pos, T& val, Grad_map& grad ) { ftype u0 = floor( pos.u() ); ftype v0 = floor( pos.v() ); ftype w0 = floor( pos.w() ); typename M::Map_reference_coord iw, iv, iu( map, Coord_grid( int(u0)-1, int(v0)-1, int(w0)-1 ) ); T s1, s2, s3, du1, dv1, dv2, dw1, dw2, dw3; T cu[4], cv[4], cw[4], gu[4], gv[4], gw[4]; T cu1( pos.u() - u0 ); T cv1( pos.v() - v0 ); T cw1( pos.w() - w0 ); T cu0( 1.0 - cu1 ); T cv0( 1.0 - cv1 ); T cw0( 1.0 - cw1 ); cu[0] = -0.5*cu1*cu0*cu0; // cubic spline coeffs: u cu[1] = cu0*( -1.5*cu1*cu1 + cu1 + 1.0 ); cu[2] = cu1*( -1.5*cu0*cu0 + cu0 + 1.0 ); cu[3] = -0.5*cu1*cu1*cu0; cv[0] = -0.5*cv1*cv0*cv0; // cubic spline coeffs: v cv[1] = cv0*( -1.5*cv1*cv1 + cv1 + 1.0 ); cv[2] = cv1*( -1.5*cv0*cv0 + cv0 + 1.0 ); cv[3] = -0.5*cv1*cv1*cv0; cw[0] = -0.5*cw1*cw0*cw0; // cubic spline coeffs: w cw[1] = cw0*( -1.5*cw1*cw1 + cw1 + 1.0 ); cw[2] = cw1*( -1.5*cw0*cw0 + cw0 + 1.0 ); cw[3] = -0.5*cw1*cw1*cw0; gu[0] = cu0*( 1.5*cu1 - 0.5 ); // cubic spline grad coeffs: u gu[1] = cu1*( 4.5*cu1 - 5.0 ); gu[2] = -cu0*( 4.5*cu0 - 5.0 ); gu[3] = -cu1*( 1.5*cu0 - 0.5 ); gv[0] = cv0*( 1.5*cv1 - 0.5 ); // cubic spline grad coeffs: v gv[1] = cv1*( 4.5*cv1 - 5.0 ); gv[2] = -cv0*( 4.5*cv0 - 5.0 ); gv[3] = -cv1*( 1.5*cv0 - 0.5 ); gw[0] = cw0*( 1.5*cw1 - 0.5 ); // cubic spline grad coeffs: w gw[1] = cw1*( 4.5*cw1 - 5.0 ); gw[2] = -cw0*( 4.5*cw0 - 5.0 ); gw[3] = -cw1*( 1.5*cw0 - 0.5 ); s1 = du1 = dv1 = dw1 = 0.0; int i, j; for ( j = 0; j < 4; j++ ) { iv = iu; s2 = dv2 = dw2 = 0.0; for ( i = 0; i < 4; i++ ) { iw = iv; s3 = cw[0] * T( map[ iw ] ); dw3 = gw[0] * T( map[ iw ] ); iw.next_w(); s3 += cw[1] * T( map[ iw ] ); dw3 += gw[1] * T( map[ iw ] ); iw.next_w(); s3 += cw[2] * T( map[ iw ] ); dw3 += gw[2] * T( map[ iw ] ); iw.next_w(); s3 += cw[3] * T( map[ iw ] ); dw3 += gw[3] * T( map[ iw ] ); s2 += cv[i] * s3; dv2 += gv[i] * s3; dw2 += cv[i] * dw3; iv.next_v(); } s1 += cu[j] * s2; du1 += gu[j] * s2; dv1 += cu[j] * dv2; dw1 += cu[j] * dw2; iu.next_u(); } val = s1; grad = Grad_map( du1, dv1, dw1 ); } /*! The value of the map at the supplied map coordinate and its gradient are calculated by third order (cubic) interpolation based on the surrounding 64 points. \param pos The fractional coord at which the density is to be calcuated. \param val The value of the density at that point. \param grad The interpolated value as a gradient vector with respect to the fractional coordinates (see Cell::coord_orth). */ template void Interp_cubic::interp_curv( const M& map, const Coord_map& pos, T& val, Grad_map& grad, Curv_map& curv ) { ftype u0 = floor( pos.u() ); ftype v0 = floor( pos.v() ); ftype w0 = floor( pos.w() ); typename M::Map_reference_coord iw, iv, iu( map, Coord_grid( int(u0)-1, int(v0)-1, int(w0)-1 ) ); T s1, s2, s3, du1, dv1, dv2, dw1, dw2, dw3; T duv1, duw1, dvw1, dvw2, duu1, dvv1, dvv2, dww1, dww2, dww3; T cu[4], cv[4], cw[4], gu[4], gv[4], gw[4], ggu[4], ggv[4], ggw[4]; T cu1( pos.u() - u0 ); T cv1( pos.v() - v0 ); T cw1( pos.w() - w0 ); T cu0( 1.0 - cu1 ); T cv0( 1.0 - cv1 ); T cw0( 1.0 - cw1 ); cu[0] = -0.5*cu1*cu0*cu0; // cubic spline coeffs: u cu[1] = cu0*( -1.5*cu1*cu1 + cu1 + 1.0 ); cu[2] = cu1*( -1.5*cu0*cu0 + cu0 + 1.0 ); cu[3] = -0.5*cu1*cu1*cu0; cv[0] = -0.5*cv1*cv0*cv0; // cubic spline coeffs: v cv[1] = cv0*( -1.5*cv1*cv1 + cv1 + 1.0 ); cv[2] = cv1*( -1.5*cv0*cv0 + cv0 + 1.0 ); cv[3] = -0.5*cv1*cv1*cv0; cw[0] = -0.5*cw1*cw0*cw0; // cubic spline coeffs: w cw[1] = cw0*( -1.5*cw1*cw1 + cw1 + 1.0 ); cw[2] = cw1*( -1.5*cw0*cw0 + cw0 + 1.0 ); cw[3] = -0.5*cw1*cw1*cw0; gu[0] = cu0*( 1.5*cu1 - 0.5 ); // cubic spline grad coeffs: u gu[1] = cu1*( 4.5*cu1 - 5.0 ); gu[2] = -cu0*( 4.5*cu0 - 5.0 ); gu[3] = -cu1*( 1.5*cu0 - 0.5 ); gv[0] = cv0*( 1.5*cv1 - 0.5 ); // cubic spline grad coeffs: v gv[1] = cv1*( 4.5*cv1 - 5.0 ); gv[2] = -cv0*( 4.5*cv0 - 5.0 ); gv[3] = -cv1*( 1.5*cv0 - 0.5 ); gw[0] = cw0*( 1.5*cw1 - 0.5 ); // cubic spline grad coeffs: w gw[1] = cw1*( 4.5*cw1 - 5.0 ); gw[2] = -cw0*( 4.5*cw0 - 5.0 ); gw[3] = -cw1*( 1.5*cw0 - 0.5 ); ggu[0] = 2.0 - 3.0*cu1; // cubic spline curv coeffs: u ggu[1] = 9.0*cu1 - 5.0; ggu[2] = 9.0*cu0 - 5.0; ggu[3] = 2.0 - 3.0*cu0; ggv[0] = 2.0 - 3.0*cv1; // cubic spline curv coeffs: v ggv[1] = 9.0*cv1 - 5.0; ggv[2] = 9.0*cv0 - 5.0; ggv[3] = 2.0 - 3.0*cv0; ggw[0] = 2.0 - 3.0*cw1; // cubic spline curv coeffs: w ggw[1] = 9.0*cw1 - 5.0; ggw[2] = 9.0*cw0 - 5.0; ggw[3] = 2.0 - 3.0*cw0; s1 = du1 = dv1 = dw1 = duv1 = duw1 = dvw1 = duu1 = dvv1 = dww1 = 0.0; int i, j; for ( j = 0; j < 4; j++ ) { iv = iu; s2 = dv2 = dw2 = dvw2 = dvv2 = dww2 = 0.0; for ( i = 0; i < 4; i++ ) { iw = iv; s3 = cw[0] * T( map[ iw ] ); dw3 = gw[0] * T( map[ iw ] ); dww3 = ggw[0] * T( map[ iw ] ); iw.next_w(); s3 += cw[1] * T( map[ iw ] ); dw3 += gw[1] * T( map[ iw ] ); dww3 += ggw[1] * T( map[ iw ] ); iw.next_w(); s3 += cw[2] * T( map[ iw ] ); dw3 += gw[2] * T( map[ iw ] ); dww3 += ggw[2] * T( map[ iw ] ); iw.next_w(); s3 += cw[3] * T( map[ iw ] ); dw3 += gw[3] * T( map[ iw ] ); dww3 += ggw[3] * T( map[ iw ] ); s2 += cv[i] * s3; dv2 += gv[i] * s3; dw2 += cv[i] * dw3; dvw2 += gv[i] * dw3; dvv2 += ggv[i] * s3; dww2 += cv[i] * dww3; iv.next_v(); } s1 += cu[j] * s2; du1 += gu[j] * s2; dv1 += cu[j] * dv2; dw1 += cu[j] * dw2; duv1 += gu[j] * dv2; duw1 += gu[j] * dw2; dvw1 += cu[j] * dvw2; duu1 += ggu[j] * s2; dvv1 += cu[j] * dvv2; dww1 += cu[j] * dww2; iu.next_u(); } val = s1; grad = Grad_map( du1, dv1, dw1 ); curv = Curv_map( Mat33( duu1, duv1, duw1, duv1, dvv1, dvw1, duw1, dvw1, dww1 ) ); } } // namespace clipper #endif clipper-2.1/clipper/core/container.h0000644000374100011300000001301210363703537014452 00000000000000/*! \file lib/container.h Header for generic container object */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_CONTAINER #define CLIPPER_CONTAINER #include "coords.h" namespace clipper { //! Definition for a generic container Object /*! Container is a definition for a generic container object with a name, parents, and children. Any object that wants to be part of the tree simply subclasses this class. The class also implements search and move objects. The tree is navigate using unix-like pathnames. A recursive update method can be overridden to update content after altering the hierarchy. The top container in a tree is created by passing Container() as its parent. */ class Container { public: //! constructor: make null object or top object in a tree Container( const String name = "" ); //! constructor: from any other member and a relative path Container( Container& parent, const String& path ); //! update: hierarchical content update function virtual void update(); //! get the path of this tree object String path() const; //! get the name of this tree object String name() const; //! set the name of this tree object void set_name( const String& name ); //! is this object to be destroyed when parent is destroyed? bool is_destroyed_with_parent() const; //! set this object to be destroyed when parent is destroyed void set_destroyed_with_parent( const bool d=true ); //! 'move' method moves this object to somewhere else in the hierarchy void move( const String& path ); //! test if this object has a parent bool has_parent() const; //! get the parent of this object const Container& parent() const; //! get the parent of this object Container& parent(); //! return number of children int num_children() const; //! get the i'th child of this object const Container& child( const int& i ) const; //! get the i'th child of this object Container& child( const int& i ); //! get the ultimate parent of this object - the top of the tree const Container& ultimate_parent() const; //! get the ultimate parent of this object - the top of the tree Container& ultimate_parent(); //! get the parent of this object (NULL on fail) Container* parent_ptr(); //! search up the tree for a parent of the specified type (NULL on fail) template T* parent_of_type_ptr(); //! find an object using a directory-like path (NULL on fail) Container* find_path_ptr( const String& path ); //! destructor: virtual virtual ~Container(); void debug(); private: // members String name_; Container* parent_; std::vector children; bool destroyed_with_parent; //! add a child: called by a child on construction void add_child( Container& c ); //! delete a child: called by a child on destruction void del_child( Container& c ); //! override copy constructor to prevent its use Container( const Container& c ) {} }; // template function definitions template T* Container::parent_of_type_ptr() { // this can be done recursively with references, but gcc won't compile it. Container* p = this; while ( p->has_parent() ) { p = &(p->parent()); T* pt = dynamic_cast(p); if ( pt != NULL ) return pt; } return NULL; } } // namespace clipper #endif clipper-2.1/clipper/core/rotation.h0000644000374100011300000002047710654070346014342 00000000000000/*! \file lib/rotation.h Fundamental types for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_ROTATION #define CLIPPER_ROTATION #include "clipper_types.h" namespace clipper { // forward definition class Rotation; //! Euler angle class /* Rotations are generally handled through the clipper::Rotation class. This class only exists for conversion purposes. This particular class represents generic Euler angles. The convention is selected from the 24 possible conventions according to the template parameter. The integer convention code is enumerated in the Rotation::EULERtype enumation in the form Rotation::EulerZYZr, Rotation::EulerXYZs etc., where the X/Y/Z indicates the axes of rotation in order, and the r/s indicates static or rotating axes. The type of an Euler class is also given as a prefix to the result of format(). */ template class Euler { public: //! constructor: null Euler() {} //! constructor: from specified angles Euler( const ftype& alpha, const ftype& beta, const ftype& gamma ) : alpha_(alpha), beta_(beta), gamma_(gamma) {} //! constructor: from rotation Euler( const Rotation& rot ); //! return rotation Rotation rotation() const; const ftype& alpha() const { return alpha_; } //!< return alpha const ftype& beta() const { return beta_; } //!< return beta const ftype& gamma() const { return gamma_; } //!< return gamma String format() const; //!< return formatted String representation private: static void params( int& r1, int& r2, int& r3, int& s ); ftype alpha_, beta_, gamma_; }; //! Euler_ccp4 angle class /* Rotations are generally handled through the clipper::Rotation class. This class only exists for conversion purposes. This particular class represents Euler_ccp4 angles according to the CCP4 standard, i.e. - Rotation 1 (alpha) about K, - Rotation 2 (beta) about the new J, - Rotation 3 (gamma) about the new K. */ class Euler_ccp4 { public: //! constructor: null Euler_ccp4() {} //! constructor: from specified angles Euler_ccp4( const ftype& alpha, const ftype& beta, const ftype& gamma ) : alpha_(alpha), beta_(beta), gamma_(gamma) {} const ftype& alpha() const { return alpha_; } //!< return alpha const ftype& beta() const { return beta_; } //!< return beta const ftype& gamma() const { return gamma_; } //!< return gamma String format() const; //!< return formatted String representation private: ftype alpha_, beta_, gamma_; }; //! Polar_ccp4 angle class /* Rotations are generally handled through the clipper::Rotation class. This class only exists for conversion purposes. This particular class represents Polar_ccp4 angles according to the CCP4 standard, i.e. - omega gives inclination of rotation axis to K axis, - phi gives anticlockwise rotation from I to projection of rotation axis onto I-J plane, - kappa is the rotation about the rotation axis. */ class Polar_ccp4 { public: //! null constructor Polar_ccp4() {} //! constructor: from specified angles Polar_ccp4( const ftype& omega, const ftype& phi, const ftype& kappa ) : omega_(omega), phi_(phi), kappa_(kappa) {} const ftype& psi() const { return omega_; } //!< return omega const ftype& omega() const { return omega_; } //!< return omega const ftype& phi() const { return phi_; } //!< return phi const ftype& kappa() const { return kappa_; } //!< return kappa String format() const; //!< return formatted String representation private: ftype omega_, phi_, kappa_; }; //! Rotation class /*! This class represents a rotation. The internal representation is as a unit quaternion, which is easily combined, inverted, or converted to or from other commonly used forms. */ class Rotation { public: //! null constructor Rotation() {} //! constructor: from generic Euler template explicit Rotation( const Euler& euler ) { (*this) = euler.rotation(); } //! constructor: from Euler_ccp4 explicit Rotation( const Euler_ccp4& euler ); //! constructor: from Polar_ccp4 explicit Rotation( const Polar_ccp4& polar ); //! constructor: from Matrix explicit Rotation( const Mat33<>& matrix ); //! constructor: from components Rotation( const ftype& w, const ftype& x, const ftype& y, const ftype& z ) : w_(w), x_(x), y_(y), z_(z) {} const ftype& w() const { return w_; } //!< return w component const ftype& x() const { return x_; } //!< return x component const ftype& y() const { return y_; } //!< return y component const ftype& z() const { return z_; } //!< return z component template Euler euler() const //!< return Euler angles { return Euler( *this ); } Euler_ccp4 euler_ccp4() const; //!< return Euler_ccp4 angles Polar_ccp4 polar_ccp4() const; //!< return Polar_ccp4 angles Mat33<> matrix() const; //!< return 3x3 matrix //! normalise this quaternion const Rotation& norm(); //! return absolute rotation angle ftype abs_angle() const { return acos(Util::min(2.0*(w_*w_)/(w_*w_+x_*x_+y_*y_+z_*z_)-1.0,1.0)); } //! return inverse rotation Rotation inverse() const { return Rotation( w_, -x_, -y_, -z_ ); } //! return zero rotation static Rotation zero() { return Rotation( 1.0, 0.0, 0.0, 0.0 ); } //! return null rotation static Rotation null() { return Rotation( Util::nan(), 0.0, 0.0, 0.0 ); } //! test for null (uninitialised) rotation bool is_null() const { return Util::is_nan( w_ ); } //! combine two rotations friend Rotation operator* ( const Rotation& r1, const Rotation& r2 ); String format() const; //!< return formatted String representation //! Enumeration of Euler conventions enum EULERtype { EulerXYZr,EulerXYZs,EulerXYXr,EulerXYXs, EulerXZXr,EulerXZXs,EulerXZYr,EulerXZYs, EulerYZXr,EulerYZXs,EulerYZYr,EulerYZYs, EulerYXYr,EulerYXYs,EulerYXZr,EulerYXZs, EulerZXYr,EulerZXYs,EulerZXZr,EulerZXZs, EulerZYZr,EulerZYZs,EulerZYXr,EulerZYXs }; protected: ftype w_, x_, y_, z_; }; } // namespace clipper #endif clipper-2.1/clipper/core/cell.cpp0000644000374100011300000001705210363703537013752 00000000000000/* cell.cpp: class file for unit cell class */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA /* This code is derived from the 'dm' source code */ #include "cell.h" namespace clipper { /*! \param a A axis in Angstroms. \param b B axis in Angstroms. \param c C axis in Angstroms. \param alpha Angle between B and C axes in radians or degrees, default=90 \param beta Angle between A and C axes in radians or degrees, default=90 \param gamma Angle between A and C axes in radians or degrees, default=90 */ Cell_descr::Cell_descr( const ftype& a, const ftype& b, const ftype& c, const ftype& alpha, const ftype& beta, const ftype& gamma ) { a_=a; b_=b; c_=c; alpha_=alpha; beta_=beta; gamma_=gamma; if (alpha_>M_PI) alpha_=Util::d2rad(alpha_); if (beta_ >M_PI) beta_ =Util::d2rad(beta_ ); if (gamma_>M_PI) gamma_=Util::d2rad(gamma_); } /*! \return The cell angle in degrees */ ftype Cell_descr::alpha_deg() const { return Util::rad2d(alpha_); } /*! \return The cell angle in degrees */ ftype Cell_descr::beta_deg() const { return Util::rad2d(beta_ ); } /*! \return The cell angle in degrees */ ftype Cell_descr::gamma_deg() const { return Util::rad2d(gamma_); } /*! \return A string describing the cell */ String Cell_descr::format() const { return " Cell ("+String(a())+","+String(b())+","+String(c())+","+String(alpha_deg())+","+String(beta_deg())+","+String(gamma_deg())+")"; } /*! Construct and initialise a metric tensor, given a set of real or reciprocal cell parameters. \param a Length of \b a axis in Angstroms or reciprocal Angstroms. \param b Length of \b b axis in Angstroms or reciprocal Angstroms. \param c Length of \b c axis in Angstroms or reciprocal Angstroms. \param alph Angle between \b b and \b c in radians. \param beta Angle between \b a and \b c in radians. \param gamm Angle between \b a and \b b in radians. */ Metric_tensor::Metric_tensor( const ftype& a, const ftype& b, const ftype& c, const ftype& alph, const ftype& beta, const ftype& gamm ) { m00 = a*a; m11 = b*b; m22 = c*c; m01 = 2.0*a*b*cos(gamm); m02 = 2.0*a*c*cos(beta); m12 = 2.0*b*c*cos(alph); } String Metric_tensor::format() const { return "m00=" + String(m00) + " m11=" + String(m11) + " m22=" + String(m22) + " m01=" + String(m01) + " m02=" + String(m02) + " m12=" + String(m12); } // Cell object /*! Initialise the Cell object from a cell description. \param cell_ The cell descirption. */ void Cell::init(const Cell_descr& cell_) { // store cell (allows a/b/c/alpha/beta/gamma methods) a_ = cell_.a(); b_ = cell_.b(); c_ = cell_.c(); alpha_ = cell_.alpha(); beta_ = cell_.beta(); gamma_ = cell_.gamma(); // calculate cell volume (allows a_star../alpha_star.. methods) vol = a() * b() * c() * sqrt( 2.0*cos(alpha())*cos(beta())*cos(gamma()) - cos(alpha())*cos(alpha()) - cos( beta())*cos( beta()) - cos(gamma())*cos(gamma()) + 1.0 ); // deal with null cell if ( is_null() ) return; // othogonalisation+fractionisation matrices orthmat = Mat33<>::identity(); orthmat(0,0) = a(); orthmat(0,1) = b()*cos(gamma()); orthmat(0,2) = c()*cos( beta()); orthmat(1,1) = b()*sin(gamma()); orthmat(1,2) = -c()*sin( beta())*cos(alpha_star()); orthmat(2,2) = c()*sin( beta())*sin(alpha_star()); //std::cout << sin( beta()) << " " << sin(alpha_star()) << " " << alpha_star() << "\n"; fracmat = orthmat.inverse(); // metric tensors realmetric = Metric_tensor( a(), b(), c(), alpha(), beta(), gamma() ); recimetric = Metric_tensor( a_star(), b_star(), c_star(), alpha_star(), beta_star(), gamma_star() ); } /*! \return true if the object has not been initalised. */ bool Cell::is_null() const { return ( vol <= 0.0 ); } ftype Cell::a_star() const { return b()*c()*sin(alpha())/vol; } ftype Cell::b_star() const { return c()*a()*sin(beta())/vol; } ftype Cell::c_star() const { return a()*b()*sin(gamma())/vol; } ftype Cell::alpha_star() const { return acos( (cos(gamma())*cos(beta())-cos(alpha())) / (sin(beta())*sin(gamma())) ); } ftype Cell::beta_star() const { return acos( (cos(alpha())*cos(gamma())-cos(beta())) / (sin(gamma())*sin(alpha())) ); } ftype Cell::gamma_star() const { return acos( (cos(beta())*cos(alpha())-cos(gamma())) / (sin(alpha())*sin(beta())) ); } /*! Two cells disagree if the difference in their orthogonalisation matrices is sufficient to map a reflection from one cell onto a different reflection in the other cell at the given tolerance, which is the resolution of the reflection in Angstroms. \param other The other cell to compare. \param tol The tolerance, in Angstroms. */ bool Cell::equals( const Cell& other, const ftype tol ) const { if ( is_null() || other.is_null() ) return false; ftype s = 0.0; for ( int i = 0; i < 3; i++ ) for ( int j = 0; j < 3; j++ ) s += pow( fracmat(i,j) - other.fracmat(i,j), 2.0 ); return s < ( pow( tol, 2.0 ) / pow( vol, 1.333 ) ); } void Cell::debug() const { std::cout << descr().format() << "\n"; std::cout << "Vol" << vol << "\n"; std::cout << "Orth mat\n" << orthmat.format() << "\n"; std::cout << "Frac mat\n" << fracmat.format() << "\n"; std::cout << "Prod mat\n" << (orthmat*fracmat).format() << "\n"; std::cout << "Real metric " << realmetric.format() << "\n"; std::cout << "Reci metric " << recimetric.format() << "\n"; //std::cout << "Real metric\n"+(orthmat.transpose()*orthmat).format()+"\n"; //std::cout << "Reci metric\n"+(fracmat*fracmat.transpose()).format()+"\n"; } } // namespace clipper clipper-2.1/clipper/core/atomsf.h0000644000374100011300000001455110363703537013772 00000000000000/*! \file atomsf.h Header file for atomic scattering factors \ingroup g_fftmapbspl */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_ATOMSF #define CLIPPER_ATOMSF #include "coords.h" namespace clipper { //! Atomic shape function object /*! The atomic scattering factor object is instantiated for each atom in turn, giving the atom parameters: position, element, occupancy and the isotropic or anisotropic U-value. (See clipper::Util for conversion from B-factors.). The methods of the class may then be called to return the scattering in reciprocal space or density in real space using either isotropic or anistropic models as required. If the atom only has an isotropic U, the faster isotropic methods will be used where available. This implementation uses the coefficients from Waasmaier & Kirfel (1995), Acta Cryst. A51, 416-431. The source data can be found at: ftp://wrzx02.rz.uni-wuerzburg.de/pub/local/Crystallography/sfac.dat */ class AtomShapeFn { public: enum TYPE { X, Y, Z, Uiso, Occ, U11, U22, U33, U12, U13, U23 }; //! null constructor AtomShapeFn() {} //! constructor: from atom object AtomShapeFn( const Atom& atom ); //! constructor: from coord, element, isotropic U, occupancy AtomShapeFn( const Coord_orth& xyz, const String& element, const ftype u_iso = 0.0, const ftype occ = 1.0 ); //! constructor: from coord, element, anisotropic U, occupancy AtomShapeFn( const Coord_orth& xyz, const String& element, const U_aniso_orth& u_aniso, const ftype occ = 1.0 ); //! initialiser: from atom object void init( const Atom& atom ); //! initialiser: from coord, element, isotropic U, occupancy void init( const Coord_orth& xyz, const String& element, const ftype u_iso = 0.0, const ftype occ = 1.0 ); //! initialiser: from coord, element, anisotropic U, occupancy void init( const Coord_orth& xyz, const String& element, const U_aniso_orth& u_aniso, const ftype occ = 1.0 ); //! return scattering factor as a function of reflection posn ftype f( const Coord_reci_orth& rfl ) const; //! return electron density as a function of coordinate ftype rho( const Coord_orth& xyz ) const; //! return Agarwal density gradients as a function of coordinate bool rho_grad( const Coord_orth& xyz, ftype& rho, std::vector& grad ) const; //! return Agarwal density gradient/curvature as a function of coordinate bool rho_curv( const Coord_orth& xyz, ftype& rho, std::vector& grad, Matrix& curv ) const; //! \deprecated return Agarwal density gradients as a function of coordinate bool rho_grad( const Coord_orth& xyz, std::vector& grad ) const; //! return (isotropic) scattering factor as a function of resolution ftype f( const ftype& invresolsq ) const; //! return (isotropic) electron density as a function of radius ftype rho( const ftype& rsq ) const; //! define parameters for Agarwal gradient/curvature calcs std::vector& agarwal_params() { return params; } private: //! look up atom coeffs void init( const String& element, const ftype& u_iso ); // members Coord_orth coord_; U_aniso_orth u_aniso_; ftype u_iso_, occ_; ftype a[6], b[6]; //!< atom coeffs ftype aw[6], bw[6]; //!< intermediate results (iso) std::vector > uaninv; //!< intermediate results (aniso) bool is_iso; std::vector params; }; //! Atomic scattering factor object /*! \deprecated This class has been replaced by AtomShapeFn, which is smaller, faster, and more capable. This class is now a wrapper for that class. */ class AtomSF : private AtomShapeFn { public: AtomSF( const String& type, const ftype u_iso = 0.0, const ftype occ = 1.0 ); AtomSF( const String& type, const U_aniso_orth& u_aniso, const ftype occ = 1.0 ); void init( const String& type, const ftype u_iso = 0.0, const ftype occ = 1.0 ); void init( const String& type, const U_aniso_orth& u_aniso, const ftype occ = 1.0 ); ftype f_iso( const ftype& s ) const; ftype f_aniso( const Coord_reci_orth& rfl ) const; ftype rho_iso( const ftype& d2 ) const; ftype rho_aniso( const Coord_orth& uvw ) const; }; } // namespace clipper #endif clipper-2.1/clipper/core/map_utils.cpp0000644000374100011300000001015010363703537015020 00000000000000/* map_utils.cpp: implementation file for crystal maps */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "map_utils.h" #include "xmap.h" #include "nxmap.h" #include namespace clipper { /*! The index is sorted in place \params map The map to be sorted. \params index The list of indices to sort. */ template void Map_index_sort::sort_increasing( const M& map, std::vector& index ) { std::sort( index.begin(), index.end(), Compare_density( map ) ); } /*! The index is sorted in place \params map The map to be sorted. \params index The list of indices to sort. */ template void Map_index_sort::sort_decreasing( const M& map, std::vector& index ) { std::sort( index.begin(), index.end(), Compare_density( map ) ); std::reverse( index.begin(), index.end() ); } // compile templates //template Map_stats::Map_stats( const Xmap& map ); //template Map_stats::Map_stats( const Xmap& map ); //template Map_stats::Map_stats( const NXmap& map ); //template Map_stats::Map_stats( const NXmap& map ); template void Map_index_sort::sort_increasing >( const Xmap& map, std::vector& index ); template void Map_index_sort::sort_decreasing >( const Xmap& map, std::vector& index ); template void Map_index_sort::sort_increasing >( const Xmap& map, std::vector& index ); template void Map_index_sort::sort_decreasing >( const Xmap& map, std::vector& index ); template void Map_index_sort::sort_increasing >( const Xmap& map, std::vector& index ); template void Map_index_sort::sort_decreasing >( const Xmap& map, std::vector& index ); template void Map_index_sort::sort_increasing >( const Xmap& map, std::vector& index ); template void Map_index_sort::sort_decreasing >( const Xmap& map, std::vector& index ); } // namespace clipper clipper-2.1/clipper/core/spacegroup_data.h0000644000374100011300000000562110363703537015640 00000000000000/* file lib/spacegroup_data.h Header file for spacegroup data tables */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA /* some code & data converted from CCP4 library symlib.f (various authors) */ #ifndef CLIPPER_SPACEGROUP_DATA #define CLIPPER_SPACEGROUP_DATA namespace clipper { // data namespace namespace data { // ASU function pointer typedef bool (*ASUfn)( const int&, const int&, const int& ); // Spacegroup data record struct SGdata { int sghash; const char* hall; const char* hm; char ext; int num; }; // Laue group data record struct LGdata { int lghash; ASUfn asufn; const char* lgname; }; // data tables extern LGdata lgdata[]; extern int lgdata_size; extern SGdata sgdata[]; extern int sgdata_size; } // namespace data } // namespace clipper #endif clipper-2.1/clipper/core/rotation.cpp0000644000374100011300000002624610463653243014676 00000000000000/* rotation.cpp: fundamental data types for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "rotation.h" namespace clipper { template Euler::Euler( const Rotation& rot ) { int r1, r2, r3, s; params( r1, r2, r3, s ); ftype ca, cb, cg, sa, sb, sg; if ( r1 == r3 ) { ftype w, x, y, z; w = rot.w(); x = y = z = 0.0; if ( r1==2 && r2==1 && r3==2 ) { x= rot.x(); y= rot.y(); z= rot.z(); } else if ( r1==1 && r2==0 && r3==1 ) { x= rot.z(); y= rot.x(); z= rot.y(); } else if ( r1==0 && r2==2 && r3==0 ) { x= rot.y(); y= rot.z(); z= rot.x(); } else if ( r1==2 && r2==0 && r3==2 ) { x=-rot.y(); y= rot.x(); z= rot.z(); } else if ( r1==1 && r2==2 && r3==1 ) { x=-rot.x(); y= rot.z(); z= rot.y(); } else if ( r1==0 && r2==1 && r3==0 ) { x=-rot.z(); y= rot.y(); z= rot.x(); } else Message::message( Message_fatal( "Rotation::euler() type invalid" ) ); cb = 1.0 - 2.0 * (x*x + y*y); sb = 2.0 * sqrt( (x*x + y*y) * (w*w + z*z) ); if ( sb > 0.0001 ) { ca = 2.0 * (x*z + w*y); sa = 2.0 * (y*z - w*x); cg = 2.0 * (w*y - x*z); sg = 2.0 * (y*z + w*x); } else { ca = 1.0; sa = 0.0; cg = cb; sg = 2.0*(y*z + w*x); } if ( s==1 ) (*this) = Euler( atan2(sg,cg), atan2(sb,cb), atan2(sa,ca) ); else (*this) = Euler( atan2(sa,ca), atan2(sb,cb), atan2(sg,cg) ); } else { ftype w, x, y, z; w = rot.w(); x = y = z = 0.0; if ( r1==0 && r2==1 && r3==2 ) { x= rot.x(); y= rot.y(); z= rot.z(); } else if ( r1==2 && r2==0 && r3==1 ) { x= rot.z(); y= rot.x(); z= rot.y(); } else if ( r1==1 && r2==2 && r3==0 ) { x= rot.y(); y= rot.z(); z= rot.x(); } else if ( r1==1 && r2==0 && r3==2 ) { x=-rot.y(); y= rot.x(); z= rot.z(); } else if ( r1==0 && r2==2 && r3==1 ) { x=-rot.x(); y= rot.z(); z= rot.y(); } else if ( r1==2 && r2==1 && r3==0 ) { x=-rot.z(); y= rot.y(); z= rot.x(); } else Message::message( Message_fatal( "Rotation::euler() type invalid" ) ); if ( s == 0 ) x = -x; sa = 2.0 * ( x*y + z*w ); ca = x*x - y*y - z*z + w*w; sb = 2.0 * ( y*w - x*z ); cb = sqrt( 1.0 - sb*sb ); sg = 2.0 * ( z*y + x*w ); cg = z*z - x*x - y*y + w*w; if ( ( 1 + r1 - r2 + s ) % 3 == 0 ) sg = -sg; (*this) = Euler( atan2(sg,cg), atan2(sb,cb), atan2(sa,ca) ); } } template Rotation Euler::rotation() const { int r1, r2, r3, s; params( r1, r2, r3, s ); ftype x[3]; x[0] = x[1] = x[2] = 0.0; x[r1] = sin(0.5*alpha()); Rotation rot1( cos(0.5*alpha()), x[0], x[1], x[2] ); x[0] = x[1] = x[2] = 0.0; x[r2] = sin(0.5*beta() ); Rotation rot2( cos(0.5*beta() ), x[0], x[1], x[2] ); x[0] = x[1] = x[2] = 0.0; x[r3] = sin(0.5*gamma()); Rotation rot3( cos(0.5*gamma()), x[0], x[1], x[2] ); if ( s == 1 ) return rot1*(rot2*rot3); else return rot3*(rot2*rot1); } template String Euler::format() const { char xyz[] = {'X','Y','Z'}; char rs[] = {'r','s'}; int r1, r2, r3, s; params( r1, r2, r3, s ); return String("Euler") + xyz[r1] + xyz[r2] + xyz[r3] + rs[s] + " = ("+String(Util::rad2d(alpha()))+","+String(Util::rad2d(beta()))+","+String(Util::rad2d(gamma()))+")"; } template void Euler::params( int& r1, int& r2, int& r3, int& s ) { r1 = ( ((T>>3)&3) ) % 3; r2 = ( r1 + ((T>>2)&1) + 1 ) % 3; r3 = ( r2 + ((T>>1)&1) + 1 ) % 3; s = ( T&1 ); } String Euler_ccp4::format() const { return "Euler = ("+String(Util::rad2d(alpha()))+","+String(Util::rad2d(beta()))+","+String(Util::rad2d(gamma()))+")"; } String Polar_ccp4::format() const { return "Polar = ("+String(Util::rad2d(omega()))+","+String(Util::rad2d(phi()))+","+String(Util::rad2d(kappa()))+")"; } Rotation::Rotation( const Euler_ccp4& euler ) { // not optimised ftype a1 = 0.5 * euler.alpha(); ftype a2 = 0.5 * euler.beta(); ftype a3 = 0.5 * euler.gamma(); Rotation r1( cos(a1), 0.0, 0.0, sin(a1) ); Rotation r2( cos(a2), 0.0, sin(a2), 0.0 ); Rotation r3( cos(a3), 0.0, 0.0, sin(a3) ); *this = r3*(r2*r1); } Rotation::Rotation( const Polar_ccp4& polar ) { w_ = cos( 0.5 * polar.kappa() ); x_ = sin( 0.5 * polar.kappa() ) * cos( polar.phi() ) * sin( polar.omega() ); y_ = sin( 0.5 * polar.kappa() ) * sin( polar.phi() ) * sin( polar.omega() ); z_ = sin( 0.5 * polar.kappa() ) * cos( polar.omega() ); } Rotation::Rotation( const Mat33<>& m ) { ftype tr = m(0,0) + m(1,1) + m(2,2) + 1.0; // check the diagonal if ( tr > 1.0e-8 ) { ftype s( sqrt(tr) ); w_ = s * 0.5; s = 0.5 / s; x_ = s * ( m(2,1) - m(1,2) ); y_ = s * ( m(0,2) - m(2,0) ); z_ = s * ( m(1,0) - m(0,1) ); } else { if ( m(0,0) > m(1,1) && m(0,0) > m(2,2) ) { ftype s( sqrt(1.0 + m(0,0) - m(1,1) - m(2,2) ) ); x_ = 0.5 * s; if ( s != 0.0 ) s = 0.5 / s; w_ = s * ( m(2,1) - m(1,2) ); y_ = s * ( m(0,1) + m(1,0) ); z_ = s * ( m(0,2) + m(2,0) ); } else if ( m(1,1) > m(2,2) ) { ftype s( sqrt(1.0 + m(1,1) - m(2,2) - m(0,0) ) ); y_ = 0.5 * s; if ( s != 0.0 ) s = 0.5 / s; w_ = s * ( m(0,2) - m(2,0) ); z_ = s * ( m(1,2) + m(2,1) ); x_ = s * ( m(1,0) + m(0,1) ); } else { ftype s( sqrt(1.0 + m(2,2) - m(0,0) - m(1,1) ) ); z_ = 0.5 * s; if ( s != 0.0 ) s = 0.5 / s; w_ = s * ( m(1,0) - m(0,1) ); x_ = s * ( m(2,0) + m(0,2) ); y_ = s * ( m(2,1) + m(1,2) ); } } } /*! The normalisation is performed in-place. If a rotation becomes significantly denormalised, the conversion methods will fail. Therefore it may be safer to call this before a conversion. */ const Rotation& Rotation::norm() { ftype s = w_*w_+x_*x_+y_*y_+z_*z_; if ( s < 1.0e-12 ) { w_ = 1.0; x_ = y_ = z_ = 0.0; } else { s = 1.0/sqrt(s); w_ *= s; x_ *= s; y_ *= s; z_ *= s; } return *this; } /*! If beta ~= 0, then alpha is set to zero. \return The Euler_ccp4 angles. */ Euler_ccp4 Rotation::euler_ccp4() const { ftype ca, cb, cg, sa, sb, sg; cb = 1.0 - 2.0 * (x_*x_ + y_*y_); sb = 2.0 * sqrt( (x_*x_ + y_*y_) * (w_*w_ + z_*z_) ); if ( sb > 0.0001 ) { ca = 2.0 * (x_*z_ + w_*y_); sa = 2.0 * (y_*z_ - w_*x_); cg = 2.0 * (w_*y_ - x_*z_); sg = 2.0 * (y_*z_ + w_*x_); } else { ca = 1.0; sa = 0.0; cg = cb; sg = 2.0*(y_*z_ + w_*x_); } return Euler_ccp4( atan2(sa,ca), atan2(sb,cb), atan2(sg,cg) ); } /*! If omega ~= 0, then phi is set to zero. \return The Polar_ccp4 angles. */ Polar_ccp4 Rotation::polar_ccp4() const { ftype om, ph, ka; om = ph = ka = 0.0; if ( fabs(w_) < 0.999999 ) { ftype r = sqrt( x_*x_ + y_*y_ ); om = atan2( r, z_ ); if ( r > 0.000001 ) ph = atan2( y_, x_ ); ka = 2.0*acos( w_ ); } return Polar_ccp4( om, ph, ka ); } /*! The resulting rotation matrix would commonly be used to construct a clipper::RTop_orth. \return The rotation matrix. */ Mat33<> Rotation::matrix() const { ftype xx( 2.0*x_*x_ ); ftype yy( 2.0*y_*y_ ); ftype zz( 2.0*z_*z_ ); ftype xy( 2.0*x_*y_ ); ftype yz( 2.0*y_*z_ ); ftype xz( 2.0*z_*x_ ); ftype wx( 2.0*w_*x_ ); ftype wy( 2.0*w_*y_ ); ftype wz( 2.0*w_*z_ ); return Mat33<>( 1.0-yy-zz, xy-wz, xz+wy, xy+wz, 1.0-xx-zz, yz-wx, xz-wy, yz+wx, 1.0-xx-yy ); } /*! Note: This multiplication operator combines rotations in left-to-right order, rather than the right-to-left order used for matrices. Thus, the rotation which arises from applying rotation r1 followed by rotation r2 is given by r1*r2. Similarly, the rotation which arises from applying rotation r1 followed by rotation r2 and rotation r3 is given by (r1*r2)*r3. */ /* THE FOLLOWING DOCUMENTATION IS WRONG! IT DESCRIBES THE INTENDED BEHAVIOUR, NOT THE IMPLEMENTED BEHAVIOUR. Note: This multiplication operator combines rotations in reverse order, as if they were matrices. Thus, the rotation which arises from applying rotation r1 followed by rotation r2 is given by r2*r1. Similarly, the rotation which arises from applying rotation r1 followed by rotation r2 and rotation r3 is given by r3*(r2*r1). */ Rotation operator* ( const Rotation& r1, const Rotation& r2 ) { return Rotation( r1.w_*r2.w_ - r1.x_*r2.x_ - r1.y_*r2.y_ - r1.z_*r2.z_, r1.w_*r2.x_ + r1.x_*r2.w_ + r1.z_*r2.y_ - r1.y_*r2.z_, r1.w_*r2.y_ + r1.y_*r2.w_ + r1.x_*r2.z_ - r1.z_*r2.x_, r1.w_*r2.z_ + r1.z_*r2.w_ + r1.y_*r2.x_ - r1.x_*r2.y_ ); } String Rotation::format() const { return "Quaternion wxyz = ("+String(w_)+","+String(x_)+","+String(y_)+","+String(z_)+")"; } template class Euler< 0>; template class Euler< 1>; template class Euler< 2>; template class Euler< 3>; template class Euler< 4>; template class Euler< 5>; template class Euler< 6>; template class Euler< 7>; template class Euler< 8>; template class Euler< 9>; template class Euler<10>; template class Euler<11>; template class Euler<12>; template class Euler<13>; template class Euler<14>; template class Euler<15>; template class Euler<16>; template class Euler<17>; template class Euler<18>; template class Euler<19>; template class Euler<20>; template class Euler<21>; template class Euler<22>; template class Euler<23>; } // namespace clipper clipper-2.1/clipper/core/clipper_stats.cpp0000644000374100011300000001245010777707757015725 00000000000000/* clipper_stats.cpp: implementation file for clipper helper functions */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "clipper_stats.h" namespace clipper { ftype Histogram::sum() const { ftype s = 0.0; for ( int i = 0; i < data.size(); i++ ) s += data[i]; return s; } ftype Histogram::y( const ftype& x ) const { ftype xi = indexf( truncate( x ) ) - 0.5; int i = Util::intf( xi ); ftype xf = xi - ftype( i ); ftype y0 = ( i >= 0 ) ? data[i ] : -data.front(); ftype y1 = ( i+1 < size() ) ? data[i+1] : -data.back(); return ( (1.0-xf)*y0 + xf*y1 ); } const Histogram& Histogram::operator += ( const Histogram& h ) { if ( data.size() != h.data.size() ) Message::message( Message_fatal("Histogram: sum of unequal histograms") ); for ( int i = 0; i < data.size(); i++ ) data[i] += h.data[i]; return (*this); } // generic ordinal void Generic_ordinal::init( const Range& range, const int num_ranges ) { nranges = ftype( num_ranges ); hist.clear(); hist.resize( num_ranges + 1, 0.0 ); range_ = range; } void Generic_ordinal::init( const std::vector& values, const int num_ranges ) { Range range; for ( int i = 0; i < values.size(); i++ ) range.include( values[i] ); init( range, num_ranges ); for ( int i = 0; i < values.size(); i++ ) accumulate( values[i] ); prep_ordinal(); } ftype Generic_ordinal::ordinal( const ftype& value ) const { ftype r = ( value - range_.min() ) / ( range_.max() - range_.min() ); r = Util::bound( 0.0, r, 0.99999 ) * nranges; int i = int( r ); r -= floor( r ); return (1.0-r)*hist[i] + r*hist[i+1]; } void Generic_ordinal::accumulate( const ftype& value ) { ftype r = ( value - range_.min() ) / ( range_.max() - range_.min() ); r = Util::bound( 0.0, r, 0.99999 ) * nranges; int i = int( r ); hist[i+1] += 1.0; } void Generic_ordinal::accumulate( const ftype& value, const ftype& weight ) { ftype r = ( value - range_.min() ) / ( range_.max() - range_.min() ); r = Util::bound( 0.0, r, 0.99999 ) * nranges; int i = int( r ); hist[i+1] += weight; } void Generic_ordinal::prep_ordinal() { for ( int i = 1; i < hist.size(); i++ ) hist[i] += hist[i-1]; for ( int i = 0; i < hist.size(); i++ ) hist[i] = hist[i] / hist.back(); } void Generic_ordinal::invert() { std::vector hinv( hist.size() ); hinv[0] = range_.min(); hinv[hist.size()-1] = range_.max(); for ( int i = 1; i < hist.size()-1; i++ ) { ftype target = ftype(i)/nranges; ftype guess = 0.5 * ( range_.max() + range_.min() ); ftype step = 0.5 * ( range_.max() - range_.min() ); for ( int j = 0; j < 10; j++ ) { if ( ordinal( guess ) > target ) guess -= step; else guess += step; step *= 0.5; } hinv[i] = Util::bound( range_.min(), guess, range_.max() ); } range_ = Range( 0.0, 1.0 ); hist = hinv; } // deprecated fns void Generic_ordinal::init( const int num_ranges ) { nranges = ftype( num_ranges ); hist.clear(); hist.resize( num_ranges + 1, 0.0 ); } void Generic_ordinal::add_pass_1( const ftype& value ) { range_.include( value ); } void Generic_ordinal::add_pass_2( const ftype& value ) { accumulate( value ); } } // namespace clipper clipper-2.1/clipper/core/xmap.h0000644000374100011300000007611510776420424013451 00000000000000/*! \file lib/xmap.h Header file for crystal maps */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_XMAP #define CLIPPER_XMAP #include "fftmap.h" #include "fftmap_sparse.h" #include "derivs.h" namespace clipper { class Xmap_cacheobj { public: class Key { public: Key( const Spgr_descr& spgr_descr, const Grid_sampling& grid ) : spgr_descr_(spgr_descr), grid_sampling_(grid) {} const Spgr_descr& spgr_descr() const { return spgr_descr_; } const Grid_sampling& grid_sampling() const { return grid_sampling_; } private: Spgr_descr spgr_descr_; Grid_sampling grid_sampling_; }; Xmap_cacheobj( const Key& xmap_cachekey ); //!< construct entry bool matches( const Key& xmap_cachekey ) const; //!< compare entry String format() const; //!< string description // data Key key; //!< key Grid_sampling xtl_grid; //!< grid for the cell Grid_range asu_grid; //!< grid for the ASU Grid_range map_grid; //!< grid for the ASU, plus border int nsym; // number of symops std::vector asu; //!< ASU flag array std::vector isymop; //!< Integerised symops std::vector du, dv, dw; //!< symmetry grid shifts to index Array2d symperm; //!< Perumtation matrix of symops Mat33<> mat_grid_orth; //!< for backward compatibility static Mutex mutex; //!< thread safety }; //! Xmap_base: base for crystallographic map class /*! The crystallographic map class stores a map of arbitrary data type. Its main difference from a 3-d array is that the data extent appears to be infinite, and yet internally only a unique ASU is stored. Iterators provide efficient access to data. This base contains everything except the data, which is templated in the derived type Xmap */ class Xmap_base { public: enum FFTtype { Default, Normal, Sparse }; //!< FFT backend selection //! test if object has been initialised bool is_null() const; //! get the cell const Cell& cell() const { return cell_; } //! get the spacegroup const Spacegroup& spacegroup() const { return spacegroup_; } //! get the cell grid const Grid_sampling& grid_sampling() const { return grid_sam_; } //! get the ASU grid const Grid_range& grid_asu() const { return cacheref.data().asu_grid; } //! map coordinate from index /*! \param index The index. \return The corresponding grid coordinate. */ inline Coord_grid coord_of( const int& index ) const { return cacheref.data().map_grid.deindex( index ); } //! map index from coordinate /*! This does not check symmetry equivalents. \param coord The coordinate. \return The index, or -1 if it does not exist. */ inline int index_of( const Coord_grid& coord ) const { if ( cacheref.data().asu_grid.in_grid( coord ) ) { const int i = cacheref.data().map_grid.index( coord ); if ( asu[ i ] == 0 ) return i; } return -1; } //! function to pick right cell repeat for any grid coord Coord_grid to_map_unit( const Coord_grid& pos ) const { return pos.unit( grid_sam_ ); } //! return the orthogonal-to-grid coordinate operator (translation is zero) const RTop<>& operator_orth_grid() const { return rt_orth_grid; } //! return the grid-to-orthogonal coordinate operator (translation is zero) const RTop<>& operator_grid_orth() const { return rt_grid_orth; } //! convert map coordinate to orthogonal /*! \param cm The grid coordinate to be converted. \return The equivalent orthogonal coordinate. */ inline Coord_orth coord_orth( const Coord_map& cm ) const { return Coord_orth( rt_grid_orth.rot()*cm ); } //! convert orthogonal coordinate to map /*! \param co The orthogonal coordinate to be converted. \return The equivalent grid coordinate. */ inline Coord_map coord_map( const Coord_orth& co ) const { return Coord_map ( rt_orth_grid.rot()*co ); } //! (This method is for compatibility with NXmap - it always returns true) bool in_map( const Coord_grid& pos ) const { return true; } //! (This method is for compatibility with NXmap - it always returns true) template bool in_map( const Coord_map& cm ) const { return true; } //! get multiplicity of a map grid point int multiplicity( const Coord_grid& pos ) const; //! Map reference base class /*! This is a reference to an Map. It forms a base class for index-like and coordinate-like Map references. If you write a method which will work with either, then specify this instead of either of the derived classed. \internal */ class Map_reference_base { public: //! return the parent Xmap inline const Xmap_base& base_xmap() const { return *map_; } //! Get the index into the map data array inline const int& index() const { return index_; } //! Check for end of map bool last() const { return ( index_ >= map_->map_grid.size() ); } protected: //! pointer to map for which this Map_reference_index is defined const Xmap_base* map_; //! integer index_ into map data array int index_; }; //! Map reference with index-like behaviour /*! This is a reference to a map coordinate. It behaves like a simple index into the map, but can be easily converted into a coordinate as and when required. It also implements methods for iterating through the unique portion of a map. It is very compact, but coord() involves some overhead and loses any information concerning symmetry equivelents. \note The following methods are inherited from Map_reference_base but are documented here for convenience: base_xmap(), index(), last(). */ class Map_reference_index : public Map_reference_base { public: //! Null constructor Map_reference_index() {} //! Constructor: takes parent map explicit Map_reference_index( const Xmap_base& map ) { map_ = ↦ index_=0; next(); } //! Constructor: takes parent map and coord Map_reference_index( const Xmap_base& map, const Coord_grid& pos ) { map_ = ↦ int sym; map_->find_sym( pos, index_, sym ); } //! Get current grid coordinate inline Coord_grid coord() const { return map_->map_grid.deindex(index_); } //! Get current value of orthogonal coordinate inline const Coord_orth coord_orth() const { return Coord_orth( map_->rt_grid_orth.rot() * coord().coord_map() ); } //! Set current value of coordinate - optimised for nearby coords inline Map_reference_index& set_coord( const Coord_grid& pos ) { int sym; map_->find_sym( pos, index_, sym ); return *this; } //! Simple increment inline Map_reference_index& next() { do { index_++; if ( last() ) break; } while ( map_->asu[index_] != 0 ); return *this; } //! Index of neighbouring point /* Use for e.g. peak search. Valid for -1 <= du/dv/dw <= 1 only. \param du/dv/dw Coordinate offset. \return Map index. */ inline int index_offset(const int& du,const int& dv,const int& dw) const { int i = index_ + du*map_->du[0] + dv*map_->dv[0] + dw*map_->dw[0]; if ( map_->asu[i] != 0 ) { i = map_->map_grid.index( map_->to_map_unit( map_->map_grid.deindex(i).transform( map_->isymop[map_->asu[i]-1] ) ) ); } return i; } // inherited functions listed for documentation purposes //-- const Xmap_base& base_xmap() const; //-- const int& index() const; //-- bool last() const; }; //! Map reference with coordinate-like behaviour /*! This is a reference to a map coordinate. It behaves like a coordinate, but also stores the index of the corresponding point in the map, and the symmetry operator required to get there. It also implements methods for iterating through the a map. Since the current coordinate and symmetry are stored, coord() is fast. However, it requires 1 pointer and 5 words of storage. \note The following methods are inherited from Map_reference_base but are documented here for convenience: base_xmap(), index(), last(). */ class Map_reference_coord : public Map_reference_base { public: //! Null constructor Map_reference_coord() {} //! Constructor: takes parent map explicit Map_reference_coord( const Xmap_base& map ) { map_ = ↦ index_ = 0; next(); } //! Constructor: takes parent map and coord Map_reference_coord( const Xmap_base& map, const Coord_grid& pos ) { map_ = ↦ pos_ = pos; map_->find_sym( pos_, index_, sym_ ); } //! Get current value of coordinate inline const Coord_grid& coord() const { return pos_; } //! Get current value of orthogonal coordinate inline const Coord_orth coord_orth() const { return Coord_orth( map_->rt_grid_orth.rot() * coord().coord_map() ); } //! Get current symmetry operator inline const int& sym() const { return sym_; } //! Set current value of coordinate - optimised for nearby coords Map_reference_coord& set_coord( const Coord_grid& pos ); //! Simple increment /*! Use of this function resets the stored coordinate and sym */ inline Map_reference_coord& next() { sym_ = 0; do { index_++; if ( last() ) break; } while ( map_->asu[index_] != 0 ); pos_ = map_->map_grid.deindex(index_); return *this; } // Increment u,v,w inline Map_reference_coord& next_u() { pos_.u()++; index_ += map_->du[sym_]; if (map_->asu[index_] != 0) edge(); return *this; } //!< increment u inline Map_reference_coord& next_v() { pos_.v()++; index_ += map_->dv[sym_]; if (map_->asu[index_] != 0) edge(); return *this; } //!< increment v inline Map_reference_coord& next_w() { pos_.w()++; index_ += map_->dw[sym_]; if (map_->asu[index_] != 0) edge(); return *this; } //!< increment w inline Map_reference_coord& prev_u() { pos_.u()--; index_ -= map_->du[sym_]; if (map_->asu[index_] != 0) edge(); return *this; } //!< increment u inline Map_reference_coord& prev_v() { pos_.v()--; index_ -= map_->dv[sym_]; if (map_->asu[index_] != 0) edge(); return *this; } //!< decrement v inline Map_reference_coord& prev_w() { pos_.w()--; index_ -= map_->dw[sym_]; if (map_->asu[index_] != 0) edge(); return *this; } //!< decrement w //! Assignment operator from a coord inline Map_reference_coord& operator =( const Coord_grid& pos ) { return set_coord( pos ); } // inherited functions listed for documentation purposes //-- const Xmap_base& base_xmap() const; //-- const int& index() const; //-- bool last() const; protected: //! Current symop int sym_; //! Current coord Coord_grid pos_; //! Reset index for a different symop when we hit the map border void edge(); }; //! return a Map_reference_index for this map Map_reference_index first() const { return Map_reference_index( *this ); } //! return a Map_reference_coord for this map Map_reference_coord first_coord() const { return Map_reference_coord( *this ); } //! set/get default backend type static FFTtype& default_type() { return default_type_; } protected: ObjectCache::Reference cacheref; //!< object cache reference const unsigned char* asu; //!< fast access ptr const Isymop* isymop; //!< fast access ptr const int* du; //!< fast access ptr const int* dv; //!< fast access ptr const int* dw; //!< fast access ptr Grid_range asu_grid; //!< fast access copy Grid_range map_grid; //!< fast access copy int nsym; //!< fast access copy Cell cell_; //!< unit cell Spacegroup spacegroup_; //!< spacegroup Grid_sampling grid_sam_; //!< grid for the whole cell RTop<> rt_orth_grid; //!< orth->grid operator RTop<> rt_grid_orth; //!< grid->orth operator //! Null constructor, for later initialisation Xmap_base(); //! initialiser void init( const Spacegroup& spacegroup, const Cell& cell, const Grid_sampling& grid_sam ); inline void find_sym( const Coord_grid& base, int& index, int& sym ) const; void asu_error( const Coord_grid& pos ) const; static FFTtype default_type_; //!< default backend type friend class Xmap_base::Map_reference_base; friend class Xmap_base::Map_reference_index; friend class Xmap_base::Map_reference_coord; }; //! Xmap: actual crystallographic map class /*! The crystallographic map class stores a map of arbitrary data type. Its main difference from a 3-d array is that the data extent appears to be infinite, and yet internally only a unique ASU is stored. Iterators provide efficient access to data. This is derived from Xmap_base, and adds the templatised data itself and the methods which deal with it. \note The following methods are inherited from Xmap_base but are documented here for convenience: cell(), spacegroup(), grid_sampling(), grid_asu(), in_asu(), multiplicity(), to_map_unit(), first(), first_coord(). */ template class Xmap : public Xmap_base { public: //! Null constructor, for later initialisation Xmap() {} //! constructor: from spacegroup, cell, and grid Xmap( const Spacegroup& spacegroup, const Cell& cell, const Grid_sampling& grid_sam ) { init( spacegroup, cell, grid_sam ); } //! initialiser: from spacegroup, cell, and grid void init( const Spacegroup& spacegroup, const Cell& cell, const Grid_sampling& grid_sam ) { Xmap_base::init( spacegroup, cell, grid_sam ); list.resize( cacheref.data().asu.size() ); } //! get data by Map_reference_index inline const T& operator[] (const Xmap_base::Map_reference_index& ix) const { return list[ix.index()]; } //! set data by Map_reference_index inline T& operator[] (const Xmap_base::Map_reference_index& ix) { return list[ix.index()]; } //! get data by Map_reference_coord inline const T& operator[] (const Xmap_base::Map_reference_coord& ix) const { return list[ix.index()]; } //! set data by Map_reference_coord inline T& operator[] (const Xmap_base::Map_reference_coord& ix) { return list[ix.index()]; } //! get a density value for an arbitrary position const T& get_data( const Coord_grid& pos ) const; //! set a density value for an arbitrary position void set_data( const Coord_grid& pos, const T& val ); //! get data by index (not recommended) inline const T& get_data( const int& index ) const; //! set data by index (not recommended) bool set_data( const int& index, const T& val ); //! get map value for fractional coord using supplied interpolator template T interp( const Coord_frac& pos ) const; //! get map value and grad for fractional coord using supplied interpolator template void interp_grad( const Coord_frac& pos, T& val, Grad_frac& grad ) const; //! get map value and curv for fractional coord using supplied interpolator template void interp_curv( const Coord_frac& pos, T& val, Grad_frac& grad, Curv_frac& curv ) const; //! get map value for map coord using supplied interpolator template T interp( const Coord_map& pos ) const; //! get map value and grad for map coord using supplied interpolator template void interp_grad( const Coord_map& pos, T& val, Grad_map& grad ) const; //! get map value and curv for map coord using supplied interpolator template void interp_curv( const Coord_map& pos, T& val, Grad_map& grad, Curv_map& curv ) const; //! FFT from reflection list to map template void fft_from( const H& fphidata, const FFTtype type = Default ); //! FFT from map to reflection list template void fft_to ( H& fphidata, const FFTtype type = Default ) const; // inherited functions listed for documentation purposes //-- const Cell& cell() const; //-- const Spacegroup& spacegroup() const; //-- const Grid_sampling& grid_sampling() const; //-- const Grid_range& grid_asu() const; //-- inline Coord_grid coord_of( const int& index ) const; //-- inline int index_of( const Coord_grid& coord ) const; //-- const int multiplicity( const Coord_grid& pos ) const; //-- const Coord_grid to_map_unit( const Coord_grid& pos ) const; //-- const Map_reference_index first() const; //-- const Map_reference_coord first_coord() const; //! assignment operator: assigns a single value to the whole map const T& operator =( const T& value ); //! add another map to this one const Xmap& operator +=( const Xmap& other ); //! subtract another map from this one const Xmap& operator -=( const Xmap& other ); private: std::vector list; }; // implementations void Xmap_base::find_sym( const Coord_grid& base, int& index, int& sym ) const { // first deal with first symop, and cache for highest performance Coord_grid rot = to_map_unit( base ); if ( asu_grid.in_grid( rot ) ) { index = map_grid.index( rot ); if ( asu[ index ] == 0 ) { sym = 0; } else { sym = asu[ index ] - 1; index = map_grid.index( to_map_unit( base.transform(isymop[sym]) ) ); } } else { // now deal with other symops for ( sym = 1; sym < nsym; sym++ ) { rot = to_map_unit( base.transform( isymop[sym] ) ); if ( asu_grid.in_grid( rot ) ) { index = map_grid.index( rot ); if ( asu[ index ] == 0 ) return; } } index = 0; // redundent, to avoid compiler warnings asu_error( base ); } return; } /*! Accessing the data by coordinate, rather than by Map_reference_index or Map_reference_coord, involves a symmetry lookup and is therefore slow. Avoid using these methods when you can. */ template const T& Xmap::get_data( const Coord_grid& pos ) const { int index, sym; find_sym( pos, index, sym ); return list[ index ]; } /*! Accessing the data by coordinate, rather than by Map_reference_index or Map_reference_coord, involves a symmetry lookup and is therefore slow. Avoid using these methods when you can. */ template void Xmap::set_data( const Coord_grid& pos, const T& val ) { int index, sym; find_sym( pos, index, sym ); list[ index ] = val; } /*! Accessing the data by index, rather than by Map_reference_index or Map_reference_coord, is generally to be avoided since the indices do not start at zero and do not increase contiguously. These methods are only useful when a large number of references into a map must be stored, e.g. for sorting into density order. */ template const T& Xmap::get_data( const int& index ) const { return list[index]; } /*! Accessing the data by index, rather than by Map_reference_index or Map_reference_coord, is generally to be avoided since the indices do not start at zero and do not increase contiguously. These methods are only useful when a large number of references into a map must be stored, e.g. for sorting into density order. \return true if data was set, i.e. index is valid. */ template bool Xmap::set_data( const int& index, const T& val ) { if ( index >= 0 && index < list.size() ) if ( asu[index] == 0 ) { list[index] = val; return true; } return false; } /*! The value of the map at the desired non-grid fractional coordinate are calculated using the supplied interpolator template. \code Coord_frac f( u, v, w ); y = xmap.interp( f ); \endcode \param pos The fractional coord at which the density is to be calcuated. \return The value of the density at that point. */ template template T Xmap::interp( const Coord_frac& pos ) const { T val; I::interp( *this, pos.coord_map( grid_sam_ ), val ); return val; } /*! The value of the map at the desired non-grid fractional coordinate and its gradient are calculated using the supplied interpolator template. \param pos The fractional coord at which the density is to be calcuated. \param val The value of the density at that point. \param grad The interpolated gradient vector with respect to the fractional coordinates (see Cell::coord_orth). */ template template void Xmap::interp_grad( const Coord_frac& pos, T& val, Grad_frac& grad ) const { Grad_map g; I::interp_grad( *this, pos.coord_map( grid_sam_ ), val, g ); grad = g.grad_frac( grid_sam_ ); } /*! The value of the map at the desired non-grid fractional coordinate and its gradient and curvature are calculated using the supplied interpolator template. e.g. \param pos The fractional coord at which the density is to be calcuated. \param val The value of the density at that point. \param grad The interpolated gradient vector with respect to the fractional coordinates (see Cell::coord_orth). \param curv The interpolated curvature matrix with respect to the fractional coordinates (see Cell::coord_orth). */ template template void Xmap::interp_curv( const Coord_frac& pos, T& val, Grad_frac& grad, Curv_frac& curv ) const { Grad_map g; Curv_map c; I::interp_curv( *this, pos.coord_map( grid_sam_ ), val, g, c ); grad = g.grad_frac( grid_sam_ ); curv = c.curv_frac( grid_sam_ ); } /*! The value of the map at the desired non-grid map coordinate are calculated using the supplied interpolator template. \code Coord_map m( u, v, w ); y = xmap.interp( m ); \endcode \param pos The map coord at which the density is to be calcuated. \return The value of the density at that point. */ template template T Xmap::interp( const Coord_map& pos ) const { T val; I::interp( *this, pos, val ); return val; } /*! The value of the map at the desired non-grid map coordinate and its gradient are calculated using the supplied interpolator template. \param pos The map coord at which the density is to be calcuated. \param val The value of the density at that point. \param grad The interpolated gradient vector with respect to the map coordinates (see Cell::coord_orth). */ template template void Xmap::interp_grad( const Coord_map& pos, T& val, Grad_map& grad ) const { I::interp_grad( *this, pos, val, grad ); } /*! The value of the map at the desired non-grid map coordinate and its gradient and curvature are calculated using the supplied interpolator template. e.g. \param pos The map coord at which the density is to be calcuated. \param val The value of the density at that point. \param grad The interpolated gradient vector with respect to the map coordinates (see Cell::coord_orth). \param curv The interpolated curvature matrix with respect to the map coordinates (see Cell::coord_orth). */ template template void Xmap::interp_curv( const Coord_map& pos, T& val, Grad_map& grad, Curv_map& curv ) const { I::interp_curv( *this, pos, val, grad, curv ); } /*! An FFT is calculated using the provided reflection list of F_phi, and used to fill this map. The reflection list is unchanged. \param fphidata The reflection data list to use */ template template void Xmap::fft_from( const H& fphidata, const FFTtype type ) { if ( type == Sparse || ( type == Default && default_type() == Sparse ) ) { // make a sparse fftmap FFTmap_sparse_p1_hx fftmap( grid_sampling() ); // copy from reflection data typename H::HKL_reference_index ih; ffttype f, phi0, phi1; int sym; for ( ih = fphidata.first_data(); !ih.last(); fphidata.next_data( ih ) ) { f = fphidata[ih].f(); if ( f != 0.0 ) { phi0 = fphidata[ih].phi(); const HKL& hkl = ih.hkl(); fftmap.set_hkl( hkl, std::complex( f*cos(phi0), f*sin(phi0) ) ); for ( sym = 1; sym < spacegroup_.num_primops(); sym++ ) { phi1 = phi0 + hkl.sym_phase_shift( spacegroup_.symop(sym) ); fftmap.set_hkl( hkl.transform( isymop[sym] ), std::complex( f*cos(phi1), f*sin(phi1) ) ); } } } // require output ASU coords for ( Map_reference_index ix = first(); !ix.last(); ix.next() ) fftmap.require_real_data( ix.coord() ); // do fft fftmap.fft_h_to_x(1.0/cell().volume()); // fill map ASU for ( Map_reference_index ix = first(); !ix.last(); ix.next() ) (*this)[ix] = fftmap.real_data( ix.coord() ); } else { // make a normal fftmap FFTmap_p1 fftmap( grid_sampling() ); // copy from reflection data typename H::HKL_reference_index ih; ffttype f, phi0, phi1; int sym; for ( ih = fphidata.first_data(); !ih.last(); fphidata.next_data( ih ) ) { f = fphidata[ih].f(); if ( f != 0.0 ) { phi0 = fphidata[ih].phi(); const HKL& hkl = ih.hkl(); fftmap.set_hkl( hkl, std::complex( f*cos(phi0), f*sin(phi0) ) ); for ( sym = 1; sym < spacegroup_.num_primops(); sym++ ) { phi1 = phi0 + hkl.sym_phase_shift( spacegroup_.symop(sym) ); fftmap.set_hkl( hkl.transform( isymop[sym] ), std::complex( f*cos(phi1), f*sin(phi1) ) ); } } } // do fft fftmap.fft_h_to_x(1.0/cell().volume()); // fill map ASU for ( Map_reference_index ix = first(); !ix.last(); ix.next() ) (*this)[ix] = fftmap.real_data( ix.coord() ); } } /*! The Fourier transform of this map is calculated and used to fill a reflection list of F_phi. The map is unchanged. Arguably this should be part of hkl_data>. But that requires writing a specialisation of hkl_data for F_phi. This is simpler and imposes less demands on the compiler. \param fphidata The reflection data list to set. */ template template void Xmap::fft_to ( H& fphidata, const FFTtype type ) const { if ( type == Sparse || ( type == Default && default_type() == Sparse ) ) { // make a sparse fftmap FFTmap_sparse_p1_xh fftmap( grid_sampling() ); // copy from map data ffttype f; int sym; for ( Map_reference_index ix = first(); !ix.last(); ix.next() ) { f = (*this)[ix]; if ( f != 0.0 ) { fftmap.real_data( ix.coord() ) = f; for ( sym = 1; sym < cacheref.data().nsym; sym++ ) fftmap.real_data( ix.coord().transform( isymop[sym] ).unit( grid_sam_ ) ) = f; } } // require output ASU coords typename H::HKL_reference_index ih; for ( ih = fphidata.first(); !ih.last(); ih.next() ) fftmap.require_hkl( ih.hkl() ); // do fft fftmap.fft_x_to_h(cell().volume()); // fill data ASU for ( ih = fphidata.first(); !ih.last(); ih.next() ) { std::complex c = fftmap.get_hkl( ih.hkl() ); fphidata[ih].f() = std::abs(c); fphidata[ih].phi() = std::arg(c); } } else { // make a normal fftmap FFTmap_p1 fftmap( grid_sampling() ); // copy from map data ffttype f; int sym; for ( Map_reference_index ix = first(); !ix.last(); ix.next() ) { f = (*this)[ix]; if ( f != 0.0 ) { fftmap.real_data( ix.coord() ) = f; for ( sym = 1; sym < cacheref.data().nsym; sym++ ) fftmap.real_data( ix.coord().transform( isymop[sym] ).unit( grid_sam_ ) ) = f; } } // do fft fftmap.fft_x_to_h(cell().volume()); // fill data ASU typename H::HKL_reference_index ih; for ( ih = fphidata.first(); !ih.last(); ih.next() ) { std::complex c = fftmap.get_hkl( ih.hkl() ); fphidata[ih].f() = std::abs(c); fphidata[ih].phi() = std::arg(c); } } } /*! All values, including missing values, are overwritten by the value. \param value The value to which the map is to be set. */ template const T& Xmap::operator =( const T& value ) { // copy value into map for ( Map_reference_index im = first(); !im.last(); im.next() ) list[im.index()] = value; return value; } /*! The map grids and spacegroups must match. */ template const Xmap& Xmap::operator +=( const Xmap& other ) { if ( spacegroup().hash() != other.spacegroup().hash() || grid_sampling() != other.grid_sampling() ) Message::message( Message_fatal( "Xmap: map mismatch in +=" ) ); for ( Map_reference_index im = first(); !im.last(); im.next() ) list[im.index()] += other[im]; return (*this); } /*! The map grids and spacegroups must match. */ template const Xmap& Xmap::operator -=( const Xmap& other ) { if ( spacegroup().hash() != other.spacegroup().hash() || grid_sampling() != other.grid_sampling() ) Message::message( Message_fatal( "Xmap: map mismatch in -=" ) ); for ( Map_reference_index im = first(); !im.last(); im.next() ) list[im.index()] -= other[im]; return (*this); } } // namespace clipper #endif clipper-2.1/clipper/core/clipper_sysdep.h0000644000374100011300000001235711347710616015527 00000000000000/*! \file lib/clipper_sysdep.h Header file for clipper system dependencies */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_SYSDEP #define CLIPPER_SYSDEP /* cmath is so variable, that we ignore it and use the C version: - include the math library - mirror into the 'std' namespace as below: */ #if defined(sun) || defined(sgi) || defined(__osf__) || defined(_MSC_VER) #include #include #include #include #ifndef M_PI #define M_PI 3.14159265358979 #endif #define rint(x) (floor((x)+0.5)) namespace std { using ::floor; using ::ceil; using ::fabs; using ::fmod; using ::sqrt; using ::sin; using ::cos; using ::tan; using ::asin; using ::acos; using ::atan; using ::sinh; using ::cosh; using ::tanh; using ::atan2; using ::exp; using ::log; using ::pow; } #else #include #endif /* fixes for unexpected macros */ #if defined(isnan) #undef isnan #endif #ifdef __WIN32__ #undef min #undef max #endif /* numeric types, for where they are critical */ namespace clipper { typedef float ftype32; typedef double ftype64; typedef int itype32; typedef unsigned int uitype32; # define CLIPPER_NAN_MASK_A_32 0x7f800000U # define CLIPPER_NAN_MASK_B_32 0x007fffffU # define CLIPPER_NULL_MASK_32 0x7fc00000U #if defined(__osf__) || defined(__amd64__) typedef long itype64; typedef unsigned long uitype64; # define CLIPPER_NAN_MASK_A_64 0x7ff0000000000000UL # define CLIPPER_NAN_MASK_B_64 0x000fffffffffffffUL # define CLIPPER_NULL_MASK_64 0x7ff8000000000000UL #else typedef long long itype64; typedef unsigned long long uitype64; # define CLIPPER_NAN_MASK_A_64 0x7ff0000000000000ULL # define CLIPPER_NAN_MASK_B_64 0x000fffffffffffffULL # define CLIPPER_NULL_MASK_64 0x7ff8000000000000ULL #endif } /* threading libraries and definitions */ #ifndef CLIPPER_DISABLE_THREADS #ifdef __WIN32__ #include #undef AddAtom #define CLIPPER_MUTEX_INIT(MUTEX) InitializeCriticalSection(MUTEX) #define CLIPPER_MUTEX_FREE(MUTEX) DeleteCriticalSection(MUTEX) #define CLIPPER_MUTEX_LOCK(MUTEX) EnterCriticalSection(MUTEX) #define CLIPPER_MUTEX_UNLK(MUTEX) LeaveCriticalSection(MUTEX) #define CLIPPER_MUTEX_TYPE CRITICAL_SECTION #define CLIPPER_THREAD_EXEC(THREAD,ENTRY,ARG) (THREAD=CreateThread(0,0,(LPTHREAD_START_ROUTINE)ENTRY,(void*)ARG,0,NULL),THREAD!=NULL) #define CLIPPER_THREAD_JOIN(THREAD) (WaitForSingleObject(THREAD,INFINITE)>=0) #define CLIPPER_THREAD_TYPE HANDLE #define CLIPPER_THREAD_ARGTYPE LPVOID #define CLIPPER_THREAD_RETTYPE DWORD #else #include #define CLIPPER_MUTEX_INIT(MUTEX) pthread_mutex_init(MUTEX,NULL) #define CLIPPER_MUTEX_FREE(MUTEX) pthread_mutex_destroy(MUTEX) #define CLIPPER_MUTEX_LOCK(MUTEX) pthread_mutex_lock(MUTEX) #define CLIPPER_MUTEX_UNLK(MUTEX) pthread_mutex_unlock(MUTEX) #define CLIPPER_MUTEX_TYPE pthread_mutex_t #define CLIPPER_THREAD_EXEC(THREAD,ENTRY,ARG) (pthread_create(&THREAD,NULL,ENTRY,(void*)ARG)==0) #define CLIPPER_THREAD_JOIN(THREAD) (pthread_join(THREAD,NULL)==0) #define CLIPPER_THREAD_TYPE pthread_t #define CLIPPER_THREAD_ARGTYPE void* #define CLIPPER_THREAD_RETTYPE void* #endif #endif #endif clipper-2.1/clipper/core/fftmap_sparse.cpp0000644000374100011300000003250510736415744015671 00000000000000/* fftmap_sparse.cpp: implementation file for P1 fft map */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "fftmap_sparse.h" #include "hkl_datatypes.h" #include #include namespace clipper { FFTmap_base::FFTtype FFTmap_sparse_p1_base::default_type_ = FFTmap_base::Estimate; /*! Initialise an FFTmap_sparse_p1_base for a grid. \param grid_sam The grid sampling of the unit cell. \param type Can be FFTmap_sparse_base::Measure, ::Estimate. Measure performs slow precalculation (first time only) to get faster FFT. */ void FFTmap_sparse_p1_base::init( const Grid_sampling& grid_sam, const FFTtype type ) { type_ = type; if ( type_ == Default ) type_ = default_type(); // allocate data grid_real_ = grid_sam; grid_reci_ = Grid( grid_real_.nu(), grid_real_.nv(), grid_real_.nw()/2+1 ); // make section maps std::complex* fillptr = NULL; row_kl.resize( grid_reci_.nv(), grid_reci_.nw(), fillptr ); ffttype* rfillptr = NULL; row_uv.resize( grid_real_.nu(), grid_real_.nv(), rfillptr ); } FFTmap_sparse_p1_base::~FFTmap_sparse_p1_base() { int u, v, w; for ( w = 0; w < grid_reci_.nw(); w++ ) for ( v = 0; v < grid_reci_.nv(); v++ ) if ( row_kl( v, w ) != NULL ) delete[] row_kl( v, w ); for ( v = 0; v < grid_real_.nv(); v++ ) for ( u = 0; u < grid_real_.nu(); u++ ) if ( row_uv( u, v ) != NULL ) delete[] row_uv( u, v ); } ffttype* FFTmap_sparse_p1_base::map_uv( const int& u, const int& v ) { ffttype* ptr = row_uv( u, v ); if ( ptr == NULL ) { ptr = new ffttype[ grid_real_.nw() ]; const ffttype zero( 0.0 ); for ( int w = 0; w < grid_real_.nw(); w++ ) ptr[w] = zero; row_uv( u, v ) = ptr; } return ptr; } std::complex* FFTmap_sparse_p1_base::map_kl( const int& k, const int& l ) { std::complex* ptr = row_kl( k, l ); if ( ptr == NULL ) { ptr = new std::complex[ grid_reci_.nu() ]; const std::complex zero( 0.0, 0.0 ); for ( int u = 0; u < grid_reci_.nu(); u++ ) ptr[u] = zero; row_kl( k, l ) = ptr; } return ptr; } /*! For later initialisation: see init() */ FFTmap_sparse_p1_hx::FFTmap_sparse_p1_hx() {} /*! Construct an FFTmap_sparse_p1_hx for a given grid. \param grid_sam The grid sampling of the unit cell. \param type Can be FFTmap_sparse_base::Measure, ::Estimate. Measure performs slow precalculation (first time only) to get faster FFT. */ FFTmap_sparse_p1_hx::FFTmap_sparse_p1_hx( const Grid_sampling& grid_sam, const FFTtype type ) { init( grid_sam, type ); } /*! \fn void FFTmap_sparse_p1_hx::require_real_data( const Coord_grid& uvw ) The given Coord_grid will be required in the final map. ( uvw must be in grid_sampling() ) \param uvw The coordinate to require. */ /*! \fn const ffttype& FFTmap_sparse_p1_hx::real_data( const Coord_grid& uvw ) const ( uvw must be in grid_sampling(), and have been requested ) \param uvw The coordinate to get. \return The real value at that coordinate. */ /*! Friedel opposites are handled correctly \param hkl The HKL to set. \param f The complex value to set. */ void FFTmap_sparse_p1_hx::set_hkl( const HKL& hkl, const std::complex& f ) { Coord_grid c; c = Coord_grid(hkl).unit( grid_real_ ); if ( c.w() < grid_reci_.nw() ) cplx_data(c) = f; c = Coord_grid(-hkl).unit( grid_real_ ); if ( c.w() < grid_reci_.nw() ) cplx_data(c) = std::conj(f); } /*! The 'require' functions must have been called first to mark the required data in the target space. (Source space requirements are inferred automatically). */ void FFTmap_sparse_p1_hx::fft_h_to_x( const ftype& scale ) { // prep fftw std::vector > in, out; ffttype zero_real = 0.0; std::complex zero( zero_real, zero_real ); fftw_plan planu, planv; rfftw_plan planw; std::complex* ptr; ffttype* rptr; int u, v, w; int hw = grid_real_.nw()/2; ffttype s = ffttype( scale ); int flags = ( type_ == Measure ) ? ( FFTW_USE_WISDOM | FFTW_MEASURE ) : ( FFTW_USE_WISDOM | FFTW_ESTIMATE ); // make ul map std::vector map_l( grid_reci_.nw(), false ); std::vector row_u( grid_real_.nu(), false ); for ( w = 0; w < grid_reci_.nw(); w++ ) for ( v = 0; v < grid_reci_.nv(); v++ ) if ( row_kl( v, w ) != NULL ) map_l[w] = true; for ( v = 0; v < grid_real_.nv(); v++ ) for ( u = 0; u < grid_real_.nu(); u++ ) if ( row_uv( u, v ) != NULL ) row_u[u] = true; mutex.lock(); planu = fftw_create_plan_specific( grid_real_.nu(), FFTW_FORWARD, flags | FFTW_IN_PLACE, (fftw_complex*)&in[0], 1, (fftw_complex*)&out[0], 1 ); planv = fftw_create_plan_specific( grid_real_.nv(), FFTW_FORWARD, flags | FFTW_OUT_OF_PLACE, (fftw_complex*)&in[0], 1, (fftw_complex*)&out[0], 1 ); planw = rfftw_create_plan_specific( grid_real_.nw(), FFTW_COMPLEX_TO_REAL, flags | FFTW_IN_PLACE, (fftw_real*)&in[0], 1, (fftw_real*)&out[0], 1 ); mutex.unlock(); // transform along h->u in.resize( grid_reci_.nu() ); out.resize( grid_real_.nu() ); for ( w = 0; w < grid_reci_.nw(); w++ ) for ( v = 0; v < grid_reci_.nv(); v++ ) { ptr = row_kl( v, w ); if ( ptr != NULL ) fftw_one( planu, (fftw_complex*)ptr, (fftw_complex*)&out[0] ); } // copy, transform along k->v, and copy in.resize( grid_reci_.nv() ); out.resize( grid_real_.nv() ); for ( w = 0; w < grid_reci_.nw(); w++ ) if ( map_l[w] ) for ( u = 0; u < grid_real_.nu(); u++ ) if ( row_u[u] ) { for ( v = 0; v < grid_real_.nv(); v++ ) { ptr = row_kl( v, w ); if ( ptr != NULL ) in[v] = s * ptr[u]; else in[v] = zero; } fftw_one( planv, (fftw_complex*)&in[0], (fftw_complex*)&out[0] ); for ( v = 0; v < grid_real_.nv(); v++ ) { rptr = row_uv( u, v ); if ( rptr != NULL ) { rptr[w] = out[v].real(); if ( w != 0 && w != hw ) rptr[grid_real_.nw()-w] = -out[v].imag(); } } } // transform along l->w in.resize( grid_real_.nw() ); out.resize( grid_real_.nw() ); for ( v = 0; v < grid_real_.nv(); v++ ) for ( u = 0; u < grid_real_.nu(); u++ ) { rptr = row_uv( u, v ); if ( rptr != NULL ) rfftw_one( planw, (fftw_real*)rptr, (fftw_real*)&out[0] ); } mutex.lock(); fftw_destroy_plan( planu ); fftw_destroy_plan( planv ); rfftw_destroy_plan( planw ); mutex.unlock(); } /*! For later initialisation: see init() */ FFTmap_sparse_p1_xh::FFTmap_sparse_p1_xh() {} /*! Construct an FFTmap_sparse_p1_xh for a given grid. \param grid_sam The grid sampling of the unit cell. \param type Can be FFTmap_sparse_base::Measure, ::Estimate. Measure performs slow precalculation (first time only) to get faster FFT. */ FFTmap_sparse_p1_xh::FFTmap_sparse_p1_xh( const Grid_sampling& grid_sam, const FFTtype type ) { init( grid_sam, type ); } /*! Friedel opposites are handled correctly \param hkl The HKL required. */ void FFTmap_sparse_p1_xh::require_hkl( const HKL& hkl ) { Coord_grid c = Coord_grid(hkl).unit( grid_real_ ); if ( c.w() < grid_reci_.nw() ) map_kl( c.v(), c.w() ); else map_kl( ( grid_real_.nv() - c.v() ) % grid_real_.nv(), ( grid_real_.nw() - c.w() ) % grid_real_.nw() ); } /*! Friedel opposites are handled correctly \param hkl The required. */ const std::complex FFTmap_sparse_p1_xh::get_hkl( const HKL& hkl ) const { Coord_grid c = Coord_grid(hkl).unit( grid_real_ ); if ( c.w() < grid_reci_.nw() ) return row_kl( c.v(), c.w() )[ c.u() ]; else return std::conj( row_kl( ( grid_real_.nv() - c.v() ) % grid_real_.nv(), ( grid_real_.nw() - c.w() ) % grid_real_.nw() ) [ ( grid_real_.nu() - c.u() ) % grid_real_.nu() ] ); } /*! \fn void FFTmap_sparse_p1_xh::require_cplx_data( const Coord_grid& hkl ) The given Coord_grid will be required in the final reflections. ( uvw must be in grid_reci() ) \param uvw The coordinate to require. */ /*! \fn const std::complex& FFTmap_sparse_p1_xh::cplx_data( const Coord_grid& hkl ) const ( hkl must be in grid_reci(), and have been requested ) \param uvw The coordinate to get. \return The complex value at that coordinate. */ /*! \fn ffttype& FFTmap_sparse_p1_xh::real_data( const Coord_grid& uvw ) ( uvw must be in grid_real() ) */ /*! The 'require' functions must have been called first to mark the required data in the target space. (Source space requirements are inferred automatically). */ void FFTmap_sparse_p1_xh::fft_x_to_h( const ftype& scale ) { // prep fftw std::vector > in, out; ffttype zero_real = 0.0; std::complex zero( zero_real, zero_real ); fftw_plan planu, planv; rfftw_plan planw; std::complex* ptr; ffttype* rptr; int u, v, w; int hw = grid_real_.nw()/2; ffttype s = ffttype( scale ) / grid_real_.size(); int flags = ( type_ == Measure ) ? ( FFTW_USE_WISDOM | FFTW_MEASURE ) : ( FFTW_USE_WISDOM | FFTW_ESTIMATE ); // make ul map std::vector map_l( grid_reci_.nw(), false ); std::vector row_u( grid_real_.nu(), false ); for ( w = 0; w < grid_reci_.nw(); w++ ) for ( v = 0; v < grid_reci_.nv(); v++ ) if ( row_kl( v, w ) != NULL ) map_l[w] = true; for ( v = 0; v < grid_real_.nv(); v++ ) for ( u = 0; u < grid_real_.nu(); u++ ) if ( row_uv( u, v ) != NULL ) row_u[u] = true; mutex.lock(); planu = fftw_create_plan_specific( grid_real_.nu(), FFTW_BACKWARD, flags | FFTW_IN_PLACE, (fftw_complex*)&in[0], 1, (fftw_complex*)&out[0], 1 ); planv = fftw_create_plan_specific( grid_real_.nv(), FFTW_BACKWARD, flags | FFTW_OUT_OF_PLACE, (fftw_complex*)&in[0], 1, (fftw_complex*)&out[0], 1 ); planw = rfftw_create_plan_specific( grid_real_.nw(), FFTW_REAL_TO_COMPLEX, flags | FFTW_IN_PLACE, (fftw_real*)&in[0], 1, (fftw_real*)&out[0], 1 ); mutex.unlock(); // transform along l->w in.resize( grid_real_.nw() ); out.resize( grid_real_.nw() ); for ( v = 0; v < grid_real_.nv(); v++ ) for ( u = 0; u < grid_real_.nu(); u++ ) { rptr = row_uv( u, v ); if ( rptr != NULL ) rfftw_one( planw, (fftw_real*)rptr, (fftw_real*)&out[0] ); } // copy, transform along k->v, and copy in.resize( grid_reci_.nv() ); out.resize( grid_real_.nv() ); for ( w = 0; w < grid_reci_.nw(); w++ ) if ( map_l[w] ) for ( u = 0; u < grid_real_.nu(); u++ ) if ( row_u[u] ) { for ( v = 0; v < grid_real_.nv(); v++ ) { rptr = row_uv( u, v ); if ( rptr != NULL ) { if ( w != 0 && w != hw ) in[v] = std::complex( rptr[w], -rptr[grid_real_.nw()-w] ); else in[v] = std::complex( rptr[w], zero_real ); } else { in[v] = zero; } } fftw_one( planv, (fftw_complex*)&in[0], (fftw_complex*)&out[0] ); for ( v = 0; v < grid_real_.nv(); v++ ) { ptr = row_kl( v, w ); if ( ptr != NULL ) ptr[u] = s * out[v]; } } // transform along h->u in.resize( grid_reci_.nu() ); out.resize( grid_real_.nu() ); for ( w = 0; w < grid_reci_.nw(); w++ ) for ( v = 0; v < grid_reci_.nv(); v++ ) { ptr = row_kl( v, w ); if ( ptr != NULL ) fftw_one( planu, (fftw_complex*)ptr, (fftw_complex*)&out[0] ); } mutex.lock(); fftw_destroy_plan( planu ); fftw_destroy_plan( planv ); fftw_destroy_plan( planw ); mutex.unlock(); } } // namespace clipper clipper-2.1/clipper/core/test_data.h0000644000374100011300000000601610363703537014446 00000000000000/*! \file lib/test_data.h Header file for clipper test data functions */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_TEST_DATA #define CLIPPER_TEST_DATA #include "hkl_datatypes.h" namespace clipper { // data namespace namespace data { //! Class to return test data class Test_data { public: //! Null constructor: fills the arrays Test_data(); //! Return HKL_data class const HKL_data >& hkl_data_f_sigf() const { return fsig; } //! Return HKL_data class const HKL_data >& hkl_data_abcd() const { return abcd; } //! Return atom list const Atom_list& atom_list() const { return atoms; } private: HKL_info hklinfo; HKL_data > fsig; HKL_data > abcd; Atom_list atoms; }; } // namespace data } // namespace clipper #endif clipper-2.1/clipper/core/clipper_memory.cpp0000644000374100011300000001224511052517541016052 00000000000000/* clipper_memory.cpp: implementation file for clipper helper functions */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "clipper_memory.h" namespace clipper { //Mutex PropertyManager::mutex = Mutex(); /*! Makes copies of all property objects. */ PropertyManager::PropertyManager( const PropertyManager& mgr ) { copy( mgr ); } /*! Clears manager then makes copies of all property objects. */ PropertyManager& PropertyManager::operator =( const PropertyManager& mgr ) { return copy( mgr ); } /*! Deletes all stored properties. */ PropertyManager::~PropertyManager() { //mutex.lock(); for ( int i = 0; i < property_.size(); i++ ) delete property_[i].second; property_.clear(); //mutex.unlock(); } /*! This function is used by the copy constructor and assignement operator and is also useful for derived classes. */ PropertyManager& PropertyManager::copy( const PropertyManager& mgr ) { //mutex.lock(); for ( int i = 0; i < property_.size(); i++ ) delete property_[i].second; property_.clear(); for ( int i = 0; i < mgr.property_.size(); i++ ) property_.push_back( std::pair( mgr.property_[i].first, mgr.property_[i].second->clone() ) ); //mutex.unlock(); return *this; } /* \param label The label of the property to be returned. \param property The property object. \return true on success. */ bool PropertyManager::set_property( const std::string& label, const Property_base& property ) { //mutex.lock(); property_.push_back( std::pair( label, property.clone() ) ); //mutex.unlock(); return true; } /*! \param label The label of the property to be returned. \return the property object. */ const Property_base& PropertyManager::get_property( const std::string& label ) const { //mutex.lock(); const Property_base* result = NULL; for ( int i = 0; i < property_.size(); i++ ) if ( label == property_[i].first ) { result = property_[i].second; break; } //mutex.unlock(); if ( result == NULL ) Message::message( Message_fatal( "PropertyManager: label not found.\n" ) ); return *result; } /*! \param label The label of the property to be tested. \return true on success. */ bool PropertyManager::exists_property( const std::string& label ) const { //mutex.lock(); bool result = false; for ( int i = 0; i < property_.size(); i++ ) if ( label == property_[i].first ) { result = true; break; } //mutex.unlock(); return result; } /* \param label The label of the property to be deleted. \return true on success. */ bool PropertyManager::delete_property( const std::string& label ) { //mutex.lock(); bool result = false; for ( int i = 0; i < property_.size(); i++ ) if ( label == property_[i].first ) { delete property_[i].second; property_.erase( property_.begin() + i ); result = true; break; } //mutex.unlock(); return result; } // template compilations template class Property; template class Property; template class Property; template class Property; } // namespace clipper clipper-2.1/clipper/core/derivs.h0000644000374100011300000002312410363703537013771 00000000000000/*! \file lib/derivs.h Fundamental types for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_DERIVS #define CLIPPER_DERIVS #include "coords.h" namespace clipper { template class Grad_orth; template class Grad_frac; template class Grad_map; template class Curv_orth; template class Curv_frac; template class Curv_map; //! orthogonal (Angstom) gradient, with respect to orthogonal x,y,z template class Grad_orth : public Vec3 { public: Grad_orth() {} //!< null constructor explicit Grad_orth( const Vec3& v ) : Vec3( v ) {} //!< constructor: copy/convert Grad_orth( const T& dx, const T& dy, const T& dz ) : Vec3( dx, dy, dz ) {} //!< constructor: from d/dx,d/dy,d/dz const T& dx() const { return (*this)[0]; } //!< get d/dx const T& dy() const { return (*this)[1]; } //!< get d/dy const T& dz() const { return (*this)[2]; } //!< get d/dz //! orthogonal-fractional derivative conversion Grad_frac grad_frac( const Cell& cell ) const; String format() const; //!< return formatted String representation }; //! fractional (cell) gradient, with respect to fractional u,v,w template class Grad_frac : public Vec3 { public: Grad_frac() {} //!< null constructor explicit Grad_frac( const Vec3& v ) : Vec3( v ) {} //!< constructor: copy/convert Grad_frac( const T& du, const T& dv, const T& dw ) : Vec3( du, dv, dw ) {} //!< constructor: from d/du,d/dv,d/dw const T& du() const { return (*this)[0]; } //!< get d/du const T& dv() const { return (*this)[1]; } //!< get d/dv const T& dw() const { return (*this)[2]; } //!< get d/dw //! fractional-orthogonal derivative conversion Grad_orth grad_orth( const Cell& cell ) const; //! fractional-grid derivative conversion Grad_map grad_map( const Grid& g ) const; String format() const; //!< return formatted String representation }; //! map coordinate gradient, with respect to grid u,v,w template class Grad_map : public Vec3 { public: Grad_map() {} //!< null constructor explicit Grad_map( const Vec3& v ) : Vec3( v ) {} //!< constructor: copy/convert Grad_map( const T& du, const T& dv, const T& dw ) : Vec3( du, dv, dw ) {} //!< constructor: from d/du,d/dv,d/dw const T& du() const { return (*this)[0]; } //!< get d/du const T& dv() const { return (*this)[1]; } //!< get d/dv const T& dw() const { return (*this)[2]; } //!< get d/dw //! grid-fractional derivative conversion Grad_frac grad_frac( const Grid& g ) const; String format() const; //!< return formatted String representation }; //! orthogonal (Angstom) curvatures, with respect to orthogonal x,y,z template class Curv_orth : public Mat33 { public: Curv_orth() {} //!< null constructor explicit Curv_orth( const Mat33& m ) : Mat33( m ) {} //!< constructor: copy/convert //! orthogonal-fractional derivative conversion Curv_frac curv_frac( const Cell& cell ) const; }; //! fractional (cell) curvatures, with respect to fractional u,v,w template class Curv_frac : public Mat33 { public: Curv_frac() {} //!< null constructor explicit Curv_frac( const Mat33& m ) : Mat33( m ) {} //!< constructor: copy/convert //! fractional-orthogonal derivative conversion Curv_orth curv_orth( const Cell& cell ) const; //! fractional-grid derivative conversion Curv_map curv_map( const Grid& g ) const; }; //! map coordinate curvatures, with respect to grid u,v,w template class Curv_map : public Mat33 { public: Curv_map() {} //!< null constructor explicit Curv_map( const Mat33& m ) : Mat33( m ) {} //!< constructor: copy/convert //! grid-fractional derivative conversion Curv_frac curv_frac( const Grid& g ) const; }; // template implementations /*! The result is an RT operator. This is a redudent representation, but is handy for assembling compound operators. \return The operator */ /*! \return The formatted text string */ template String Grad_orth::format() const { return "d/dx,d/dy,d/dz = ("+String(dx())+","+String(dy())+","+String(dz())+")"; } /*! \param cell The cell concerned \return The transformed derivative. */ template inline Grad_frac Grad_orth::grad_frac( const Cell& cell ) const { return Grad_frac( (*this) * Mat33( cell.matrix_orth() ) ); } /*! \return The formatted text string */ template String Grad_frac::format() const { return "d/du,d/dv,d/dw = ("+String(du())+","+String(dv())+","+String(dw())+")"; } /*! \param cell The cell concerned \return The transformed derivative. */ template inline Grad_orth Grad_frac::grad_orth( const Cell& cell ) const { return Grad_orth( (*this) * Mat33( cell.matrix_frac() ) ); } /*! \param g The grid concerned \return The transformed derivative. */ template inline Grad_map Grad_frac::grad_map( const Grid& g ) const { return Grad_map( du()/g.nu(), dv()/g.nv(), dw()/g.nw() ); } /*! \return The formatted text string */ template String Grad_map::format() const { return "d/du,d/dv,d/dw = ("+String(du())+","+String(dv())+","+String(dw())+")"; } /*! \param g The grid concerned \return The transformed derivative. */ template inline Grad_frac Grad_map::grad_frac( const Grid& g ) const { return Grad_frac( du()*g.nu(), dv()*g.nv(), dw()*g.nw() ); } /*! \param cell The cell concerned \return The transformed derivative. */ template Curv_frac Curv_orth::curv_frac( const Cell& cell ) const { Mat33 m( cell.matrix_orth() ); return Curv_frac( m.transpose() * (*this) * m ); } /*! \param cell The cell concerned \return The transformed derivative. */ template Curv_orth Curv_frac::curv_orth( const Cell& cell ) const { Mat33 m( cell.matrix_frac() ); return Curv_orth( m.transpose() * (*this) * m ); } /*! \param g The grid concerned \return The transformed derivative. */ template Curv_map Curv_frac::curv_map( const Grid& g ) const { Curv_map c; c(0,0) = (*this)(0,0) / T(g.nu()*g.nu()); c(0,1) = (*this)(0,1) / T(g.nu()*g.nv()); c(0,2) = (*this)(0,2) / T(g.nu()*g.nw()); c(1,0) = (*this)(1,0) / T(g.nv()*g.nu()); c(1,1) = (*this)(1,1) / T(g.nv()*g.nv()); c(1,2) = (*this)(1,2) / T(g.nv()*g.nw()); c(2,0) = (*this)(2,0) / T(g.nw()*g.nu()); c(2,1) = (*this)(2,1) / T(g.nw()*g.nv()); c(2,2) = (*this)(2,2) / T(g.nw()*g.nw()); return c; } /*! \param g The grid concerned \return The transformed derivative. */ template Curv_frac Curv_map::curv_frac( const Grid& g ) const { Curv_frac c; c(0,0) = (*this)(0,0) * T(g.nu()*g.nu()); c(0,1) = (*this)(0,1) * T(g.nu()*g.nv()); c(0,2) = (*this)(0,2) * T(g.nu()*g.nw()); c(1,0) = (*this)(1,0) * T(g.nv()*g.nu()); c(1,1) = (*this)(1,1) * T(g.nv()*g.nv()); c(1,2) = (*this)(1,2) * T(g.nv()*g.nw()); c(2,0) = (*this)(2,0) * T(g.nw()*g.nu()); c(2,1) = (*this)(2,1) * T(g.nw()*g.nv()); c(2,2) = (*this)(2,2) * T(g.nw()*g.nw()); return c; } } // namespace clipper #endif clipper-2.1/clipper/core/symop.cpp0000644000374100011300000002110211223146616014164 00000000000000/* symop.cpp: fundamental data types for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "symop.h" #include "coords.h" namespace clipper { /*! Construct an RT operator from a string description, e.g. 1/2x,z-y+2/3,x '*' is optional for multiplication, commas are compulsory. */ RTop_frac::RTop_frac( const String& strop ) { std::vector rows = strop.split(","); if ( rows.size() != 3 ) Message::message(Message_fatal("RTop_frac: invalid string:"+strop)); rot() = Mat33<>(0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0); trn() = Vec3<> (0.0,0.0,0.0); std::vector cols; String num; ftype val; int nrow, ncol, nchr, npart; for ( nrow = 0; nrow < 3; nrow++ ) { const String& row = rows[nrow]; cols.clear(); cols.push_back(""); for ( nchr = 0; nchr < row.length(); nchr++ ) { const char& c = row[nchr]; if ( c == '+' || c == '-' ) cols.push_back( "" ); cols.back() += c; } for ( npart = 0; npart < cols.size(); npart++ ) { const String& col = cols[npart]; ncol = 3; num = ""; for ( nchr = 0; nchr < col.length(); nchr++ ) { const char& c = col[nchr]; if ( c == 'x' || c == 'X' ) ncol = 0; else if ( c == 'y' || c == 'Y' ) ncol = 1; else if ( c == 'z' || c == 'Z' ) ncol = 2; else if ( c == '-' || c == '/' || isdigit(c) ) num += c; } if ( ncol < 3 ) { if ( num == "" || num == "+" || num == "-" ) num += "1"; val = num.rational(); rot()( nrow, ncol ) = val; } else { if ( num == "" || num == "+" || num == "-" ) num += "0"; val = num.rational(); trn()[ nrow ] = val; } } } } /*! \param cell The cell concerned \return The transformed coordinate. */ RTop_orth RTop_frac::rtop_orth( const Cell& cell ) const { return RTop_orth( RTop<>(cell.matrix_orth()) * (*this) * RTop<>(cell.matrix_frac()) ); } /*! \return The inverse of the operator. */ RTop_frac RTop_frac::inverse() const { return RTop_frac( RTop<>::inverse() ); } /*! \return The identity operator. */ RTop_frac RTop_frac::identity() { return RTop_frac( RTop<>::identity() ); } /*! \return The null (uninitialised) operator. */ RTop_frac RTop_frac::null() { return RTop_frac( RTop<>::null() ); } /*! Construct a symmetry operator and initialise it to the supplied RTop. Translations are rounded to a basis of 48, and put on the range 0..1 \param mat The RTop to use. */ Symop::Symop( const RTop<>& rt ) { // initialise to the supplied matrix int i, j; for ( i=0; i<3; i++) for ( j=0; j<3; j++) rot()(i,j) = rint( rt.rot()(i,j) ); for ( i=0; i<3; i++) trn()[i] = ftype( Util::mod( Util::intr(48.*rt.trn()[i]), 48 ) ) / 48.; } /*! Construct a symmetry operator and initialise it to the supplied matrix. Translations are rounded to a basis of 48, and put on the range 0..1 \param mat The 4x4 matrix to use. The [i][3] elements contain the translation. */ Symop::Symop( const ftype mat[4][4] ) { // initialise to the supplied matrix int i, j; for ( i=0; i<3; i++) for ( j=0; j<3; j++) rot()(i,j) = mat[i][j]; for ( i=0; i<3; i++) trn()[i] = ftype( Util::mod( Util::intr(48.*mat[i][3]), 48 ) ) / 48.; } /*! Return formatted representation of the symmetry operator. \return The formatted text string, e.g. -x, -y+1/2, z. */ String Symop::format() const { String s, t, xyz="xyz"; for ( int i = 0; i < 3; i++ ) { t = ""; for ( int j = 0; j < 3; j++ ) if ( rot()(i,j) != 0.0 ) { t += ( rot()(i,j) > 0.0 ) ? "+" : "-"; if ( Util::intr( fabs( rot()(i,j) ) ) != 1 ) t += String::rational( fabs( rot()(i,j) ), 24 ); t += xyz[j]; } if ( trn()[i] != 0.0 ) t += String::rational( trn()[i], 24, true ); s += t.substr( ( t[0] == '+' ) ? 1 : 0 ); if ( i < 2 ) s+= ", "; } return s; } /*! Integerised symops are more efficient when handling integer coordinate types, e.g. HKL, Coord_grid. The rotation parts of the integerised symop are general and can be used for any recirpocal space data. The translation part is specific to an individual grid. \param symop The conventional symop. \param grid The specific grid. */ Isymop::Isymop( const Symop& symop, const Grid& grid ) { for ( int i = 0; i < 3; i++ ) for ( int j = 0; j < 3; j++ ) rot()(i,j) = Util::intr( symop.rot()(i,j) ); trn()[0] = Util::intr( grid.nu() * symop.trn()[0] ); trn()[1] = Util::intr( grid.nv() * symop.trn()[1] ); trn()[2] = Util::intr( grid.nw() * symop.trn()[2] ); } /* Construct the encoded form of the symop. */ Symop_code::Symop_code( const Symop& op ) { init( Isymop( op, Grid(24,24,24) ) ); } /* Construct the encoded form of the symop from integerised symop with a grid (base) of (24,24,24).*/ Symop_code::Symop_code( const Isymop& op ) { init( op ); } /* Initialise the encoded form of the symop from integerised symop with a grid (base) of (24,24,24).*/ void Symop_code::init( const Isymop& op ) { // initialise to the supplied code int i, j, fac, code_r, code_t; code_r = code_t = 0; fac = 1; for ( i = 0; i < 3; i++ ) { code_t += ( Util::mod( op.trn()[i], 24 ) ) * fac; fac *= 24; } fac = 1; for ( i = 0; i < 3; i++ ) for ( j = 0; j < 3; j++ ) { code_r += ( Util::mod( op.rot()(i,j) + 1, 3 ) ) * fac; fac *= 3; } // xor to make identity zero code_ = ( ( code_r ^ 0x4064 ) << 16 ) + code_t; } /*! Construct a symmetry operator and initialise it to the matrix encoded in the given int. \param code The integer code. */ Symop Symop_code::symop() const { Isymop iop = isymop(); Symop op; for ( int i = 0; i < 3; i++ ) { op.rot()(i,0) = ftype( iop.rot()(i,0) ); op.rot()(i,1) = ftype( iop.rot()(i,1) ); op.rot()(i,2) = ftype( iop.rot()(i,2) ); op.trn()[i] = ftype( iop.trn()[i] ) / 24.0; } return op; } /*! Construct an integerised symmetry operator and initialise it to the matrix encoded in the given int, with a grid (base) of (24,24,24). \param code The integer code. */ Isymop Symop_code::isymop() const { Isymop op; // initialise rotation and translation int i, j, fac, code_r, code_t; code_t = code_trn(); fac = 1; for ( i = 0; i < 3; i++ ) { op.trn()[i] = Util::mod( code_t/fac, 24 ); fac *= 24; } code_r = ( code_rot() >> 16 ) ^ 0x4064; fac = 1; for ( i = 0; i < 3; i++ ) for ( j = 0; j < 3; j++ ) { op.rot()(i,j) = Util::mod( code_r/fac, 3 ) - 1; fac *= 3; } return op; } Symop_code Symop_code::code_rot() const { return Symop_code( code_ & 0xffff0000 ); } Symop_code Symop_code::code_trn() const { return Symop_code( code_ & 0x0000ffff ); } } // namespace clipper clipper-2.1/clipper/core/clipper_thread.h0000644000374100011300000001160110776416673015471 00000000000000/*! \file lib/clipper_thread.h Header file for clipper threading handlers */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_THREAD #define CLIPPER_THREAD #include "clipper_message.h" #include "clipper_sysdep.h" namespace clipper { #ifndef CLIPPER_DISABLE_THREADS //! Mutex class: used for locking and unlocking shared resources. /*! Create a mutex for any sharted resource, i.e. non-stack object used by a multi-threaded program. The lock and unlock methods lock that resource. Recursive locks are not allowed. */ class Mutex { public: //! constructor: create the mutex Mutex() { CLIPPER_MUTEX_INIT( &mutex ); } //! destructor: destroy the mutex ~Mutex() { CLIPPER_MUTEX_FREE( &mutex ); } //! lock the mutex inline void lock() { CLIPPER_MUTEX_LOCK( &mutex ); } //! unlock the mutex inline void unlock() { CLIPPER_MUTEX_UNLK( &mutex ); } protected: CLIPPER_MUTEX_TYPE mutex; }; //! Thread base class: Override this to create new threads /*! To create a thread, override this class. Store data as members with accessors to set input and read output. Override the Run() method to do the actual work. e.g. the following class implements a thread which can sum a list of numbers. \code class Thread_test : public Thread_base { public: class Data : public std::vector { public: Data() {} Data( std::vector v ) : std::vector(v) {} }; void Run() { sum = 0; while ( 1 ) { lock(); int c = current++; unlock(); if ( c >= data_.size() ) break; sum += data_[c]; } } static void set_data( Data d ) { data_ = d; } static Data data_; static int current; int sum; }; \endcode */ class Thread_base { public: Thread_base(); virtual ~Thread_base() {} bool run(); bool join(); static void lock() { mutex_global.lock(); } static void unlock() { mutex_global.unlock(); } int id() const { return id_; } protected: virtual void Run() = 0; private: static CLIPPER_THREAD_RETTYPE Entry( CLIPPER_THREAD_ARGTYPE thisptr ); static Mutex mutex_global; static int next_id; CLIPPER_THREAD_TYPE thread; int id_; }; #else class Mutex { public: Mutex() {} ~Mutex() {} inline void lock() {} inline void unlock() {} }; class Thread_base { public: Thread_base() {} virtual ~Thread_base() {} bool run() { Run(); return true; } bool join() { return true; } static void lock() {} static void unlock() {} int id() const { return -1; } protected: virtual void Run() { clipper::Message::message( clipper::Message_fatal( "No Run method defined" ) ); } }; #endif } // namespace clipper #endif clipper-2.1/clipper/core/clipper_util.cpp0000644000374100011300000001644310363703537015531 00000000000000/* clipper_util.cpp: implementation file for clipper helper functions */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "clipper_util.h" namespace clipper { float Util::nanf_; //!< declare static double Util::nand_; //!< declare static ftype Util::nan_ ; //!< declare static ftype Util::onepi_ = M_PI; //!< one*pi ftype Util::twopi_ = 2.0*M_PI; //!< two*pi ftype Util::twopi2_ = 2.0*M_PI*M_PI; //!< two*pi*pi ftype Util::eightpi2_ = 8.0*M_PI*M_PI; //!< two*pi*pi ftype Util::d2rad_ = M_PI/180.0; //!< degree-radian conversion ftype Util::sim_a = 1.639294; //!< sim fn param ftype Util::sim_b = 3.553967; //!< sim fn param ftype Util::sim_c = 2.228716; //!< sim fn param ftype Util::sim_d = 3.524142; //!< sim fn param ftype Util::sim_e = 7.107935; //!< sim fn param ftype Util::sim_A = -1.28173889903; //!< invsim fn param ftype Util::sim_B = 0.69231689903; //!< invsim fn param ftype Util::sim_C = -1.33099462667; //!< invsim fn param ftype Util::sim_g = 2.13643992379; //!< invsim fn param ftype Util::sim_p = 0.04613803811; //!< invsim fn param ftype Util::sim_q = 1.82167089029; //!< invsim fn param ftype Util::sim_r = -0.74817947490; //!< invsim fn param Util::Util() { *((uitype32*)&nanf_) = CLIPPER_NULL_MASK_32; *((uitype64*)&nand_) = CLIPPER_NULL_MASK_64; if ( sizeof(ftype) == 4 ) *((uitype32*)&nan_) = CLIPPER_NULL_MASK_32; else if ( sizeof(ftype) == 8 ) *((uitype64*)&nan_) = CLIPPER_NULL_MASK_64; else /* fail on build */; } /*! \param x The argument \return I1(x)/I0(x) */ ftype Util::sim( const ftype& x ) { if (x >= 0.0) return (((x + sim_a)*x + sim_b)*x) / (((x + sim_c)*x + sim_d)*x + sim_e); else return -(-(-(-x + sim_a)*x + sim_b)*x) / (-(-(-x + sim_c)*x + sim_d)*x + sim_e); } /*! \param x I1(y)/I0(y) \return y */ ftype Util::invsim( const ftype& x ) { ftype x0 = fabs(x); ftype a0 = -7.107935*x0; ftype a1 = 3.553967-3.524142*x0; ftype a2 = 1.639294-2.228716*x0; ftype a3 = 1.0-x0; ftype w = a2/(3.0*a3); ftype p = a1/(3.0*a3)-w*w; ftype q = -w*w*w+0.5*(a1*w-a0)/a3; ftype d = sqrt(q*q+p*p*p); ftype q1 = q + d; ftype q2 = q - d; ftype r1 = pow(fabs(q1), 1.0/3.0); ftype r2 = pow(fabs(q2), 1.0/3.0); if (x >= 0.0) return (((q1>0.0)? r1 : -r1) + ((q2>0.0)? r2 : -r2) - w); else return -(((q1>0.0)? r1 : -r1) + ((q2>0.0)? r2 : -r2) - w); } ftype Util::sim_integ( const ftype& x0 ) { const ftype x = fabs(x0); const ftype z = (x+sim_p)/sim_q; return sim_A*log(x+sim_g) + 0.5*sim_B*log(z*z+1.0) + sim_r*atan(z) + x + 1.0; } ftype Util::sim_deriv( const ftype& x ) { if (x >= 0.0) return (((((sim_c-sim_a)*x+(2.0*sim_d-2.0*sim_b))*x+(3.0*sim_e+sim_a*sim_d-sim_b*sim_c))*x+(2.0*sim_a*sim_e))*x+(sim_b*sim_e)) / pow( (((x + sim_c)*x + sim_d)*x + sim_e), 2.0 ); else return (-(-(-(-(sim_c-sim_a)*x+(2.0*sim_d-2.0*sim_b))*x+(3.0*sim_e+sim_a*sim_d-sim_b*sim_c))*x+(2.0*sim_a*sim_e))*x+(sim_b*sim_e)) / pow( (-(-(-x + sim_c)*x + sim_d)*x + sim_e), 2.0 ); } ftype Util::sim_deriv_recur( const ftype& x0 ) { const ftype x = fabs(x0); const ftype m = sim(x); if ( x > 1.0e-4 ) return ( -m/x + ( 1.0 - m*m ) ); else return ( 0.5 - m*m ); } ftype Util::bessel_i0( const ftype& x0 ) { ftype i0 = 0.0, t, x; x = fabs(x0); t=x/3.75; if (t < 1.0) { t=t*t; i0= ((((((t*0.0045813+0.0360768)*t+0.2659732)*t+ 1.2067492)*t+3.0899424)*t+3.5156229)*t+1.0); } else { i0= (1.0/sqrt(x))*((((((((t*0.00392377-0.01647633)*t+ 0.02635537)*t-0.02057706)*t+0.00916281)*t- 0.00157565)*t+0.00225319)*t+0.01328592)*t+0.39894228)*exp(x); } return i0; } /*! \param x Angle in degrees \return Angle in radians */ ftype Util::d2rad( const ftype& x ) { return x*d2rad_; } /*! \param x Angle in radians \return Angle in degrees */ ftype Util::rad2d( const ftype& x ) { return x/d2rad_; } // template instantiations template ftype32 Util::max( const ftype32& a, const ftype32& b ); template ftype32 Util::min( const ftype32& a, const ftype32& b ); template ftype32 Util::bound( const ftype32& a, const ftype32& b, const ftype32& c ); template void Util::swap( ftype32& a, ftype32& b ); template void Util::swap( ftype32& a, ftype32& b, ftype32& c ); template ftype32 Util::sqr( const ftype32& a ); template ftype32 Util::isqrt( const ftype32& a ); template ftype64 Util::max( const ftype64& a, const ftype64& b ); template ftype64 Util::min( const ftype64& a, const ftype64& b ); template ftype64 Util::bound( const ftype64& a, const ftype64& b, const ftype64& c ); template void Util::swap( ftype64& a, ftype64& b ); template void Util::swap( ftype64& a, ftype64& b, ftype64& c ); template ftype64 Util::sqr( const ftype64& a ); template ftype64 Util::isqrt( const ftype64& a ); template int Util::max( const int& a, const int& b ); template int Util::min( const int& a, const int& b ); template int Util::bound( const int& a, const int& b, const int& c ); template void Util::swap( int& a, int& b ); template void Util::swap( int& a, int& b, int& c ); template int Util::sqr( const int& a ); template int Util::isqrt( const int& a ); } // namespace clipper clipper-2.1/clipper/core/Makefile.in0000644000374100011300000005662011372264333014375 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am, passed: clipper/core, extracted subdir: core # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper/core VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = clipper/core DIST_COMMON = $(library_include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ccp4.m4 \ $(top_srcdir)/config/clipper.m4 $(top_srcdir)/config/fftw.m4 \ $(top_srcdir)/config/gpp4.m4 $(top_srcdir)/config/mmdb.m4 \ $(top_srcdir)/config/utimbuf.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(library_includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libclipper_core_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libclipper_core_la_OBJECTS = atomsf.lo cell.lo clipper_instance.lo \ clipper_memory.lo clipper_message.lo clipper_stats.lo \ clipper_test.lo clipper_thread.lo clipper_types.lo \ clipper_util.lo container.lo container_hkl.lo container_map.lo \ container_types.lo coords.lo derivs.lo fftmap.lo \ fftmap_sparse.lo hkl_compute.lo hkl_data.lo hkl_datatypes.lo \ hkl_info.lo hkl_lookup.lo hkl_operators.lo map_interp.lo \ map_utils.lo nxmap.lo nxmap_operator.lo ramachandran.lo \ resol_basisfn.lo resol_fn.lo resol_targetfn.lo rotation.lo \ spacegroup.lo spacegroup_data.lo symop.lo test_core.lo \ test_data.lo xmap.lo libclipper_core_la_OBJECTS = $(am_libclipper_core_la_OBJECTS) libclipper_core_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libclipper_core_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libclipper_core_la_SOURCES) DIST_SOURCES = $(libclipper_core_la_SOURCES) HEADERS = $(library_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AR = @AR@ AR_FLAGS = @AR_FLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCP4_CXXFLAGS = @CCP4_CXXFLAGS@ CCP4_LIBS = @CCP4_LIBS@ CFLAGS = @CFLAGS@ CLIPPER_CCP4_DIR = @CLIPPER_CCP4_DIR@ CLIPPER_CIF_DIR = @CLIPPER_CIF_DIR@ CLIPPER_CNS_DIR = @CLIPPER_CNS_DIR@ CLIPPER_CONTRIB_DIR = @CLIPPER_CONTRIB_DIR@ CLIPPER_LT_VERSION = @CLIPPER_LT_VERSION@ CLIPPER_MINIMOL_DIR = @CLIPPER_MINIMOL_DIR@ CLIPPER_MMDB_DIR = @CLIPPER_MMDB_DIR@ CLIPPER_PHS_DIR = @CLIPPER_PHS_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_CXXFLAGS = @FFTW_CXXFLAGS@ FFTW_LIBS = @FFTW_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMDB_CXXFLAGS = @MMDB_CXXFLAGS@ MMDB_LIBS = @MMDB_LIBS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = ${FFTW_CXXFLAGS} library_include_HEADERS = \ atomsf.h \ cell.h \ clipper_instance.h \ clipper_memory.h \ clipper_message.h \ clipper_precision.h \ clipper_stats.h \ clipper_sysdep.h \ clipper_test.h \ clipper_thread.h \ clipper_types.h \ clipper_util.h \ container.h \ container_hkl.h \ container_map.h \ container_types.h \ coords.h \ derivs.h \ fftmap.h \ fftmap_sparse.h \ hkl_compute.h \ hkl_data.h \ hkl_datatypes.h \ hkl_info.h \ hkl_lookup.h \ hkl_operators.h \ map_interp.h \ map_utils.h \ nxmap.h \ nxmap_operator.h \ ramachandran.h \ resol_basisfn.h \ resol_fn.h \ resol_targetfn.h \ rotation.h \ spacegroup_data.h \ spacegroup.h \ symop.h \ test_core.h \ test_data.h \ xmap.h lib_LTLIBRARIES = libclipper-core.la libclipper_core_la_SOURCES = \ atomsf.cpp \ cell.cpp \ clipper_instance.cpp \ clipper_memory.cpp \ clipper_message.cpp \ clipper_stats.cpp \ clipper_test.cpp \ clipper_thread.cpp \ clipper_types.cpp \ clipper_util.cpp \ container.cpp \ container_hkl.cpp \ container_map.cpp \ container_types.cpp \ coords.cpp \ derivs.cpp \ fftmap.cpp \ fftmap_sparse.cpp \ hkl_compute.cpp \ hkl_data.cpp \ hkl_datatypes.cpp \ hkl_info.cpp \ hkl_lookup.cpp \ hkl_operators.cpp \ map_interp.cpp \ map_utils.cpp \ nxmap.cpp \ nxmap_operator.cpp \ ramachandran.cpp \ resol_basisfn.cpp \ resol_fn.cpp \ resol_targetfn.cpp \ rotation.cpp \ spacegroup.cpp \ spacegroup_data.cpp \ symop.cpp \ test_core.cpp \ test_data.cpp \ xmap.cpp library_includedir = $(pkgincludedir)/core libclipper_core_la_LDFLAGS = -version-info @CLIPPER_LT_VERSION@ libclipper_core_la_LIBADD = \ $(FFTW_LIBS) \ -lpthread all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu clipper/core/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu clipper/core/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): 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 \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ 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)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libclipper-core.la: $(libclipper_core_la_OBJECTS) $(libclipper_core_la_DEPENDENCIES) $(libclipper_core_la_LINK) -rpath $(libdir) $(libclipper_core_la_OBJECTS) $(libclipper_core_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomsf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cell.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clipper_instance.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clipper_memory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clipper_message.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clipper_stats.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clipper_test.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clipper_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clipper_types.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clipper_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/container.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/container_hkl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/container_map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/container_types.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coords.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/derivs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftmap_sparse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hkl_compute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hkl_data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hkl_datatypes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hkl_info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hkl_lookup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hkl_operators.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/map_interp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/map_utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nxmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nxmap_operator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ramachandran.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resol_basisfn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resol_fn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resol_targetfn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rotation.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spacegroup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spacegroup_data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmap.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-library_includeHEADERS: $(library_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(library_includedir)" || $(MKDIR_P) "$(DESTDIR)$(library_includedir)" @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(library_includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \ done uninstall-library_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(library_includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(library_includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(library_includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-library_includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-library_includeHEADERS \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: clipper-2.1/clipper/core/clipper_types.h0000644000374100011300000006737311350422641015364 00000000000000/*! \file lib/clipper_types.h Header file for clipper basic types */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_TYPES #define CLIPPER_TYPES #include "clipper_util.h" #include "clipper_memory.h" namespace clipper { // forward definitions template class Mat33sym; //! String extension with simple parsing methods /*! String extension with primitive 'split' operation for parsing and pathname processing operations. */ class String : public std::string { public: inline String() : std::string() {} //!< null constructor inline String( const std::string str ) : std::string( str ) {} //!< constructor: from string inline String( const char* str ) : std::string( str ) {} //!< constructor: from char* String( const char* str, const int l ); //!< constructor: from char* String( const int i, const int w = 4 ); //!< constructor: from int String( const long i, const int w = 4 ); //!< constructor: from long //! constructor: from float String( const float f, const int w = 6, const int p = 6 ); //! constructor: from double String( const double f, const int w = 6, const int p = 6 ); //! String splitter - a very simple parser component std::vector split(const String sep) const; //! Return copy of string without leading and trailing blanks String trim() const; //! get trailing path element String tail() const; //! remove trailing path element String head() const; //! get leading path element String nohead() const; //! remove leading path element String notail() const; //! construct string from rational f using base b static String rational( const double f, const int b, const bool sign=false ); int i() const; //!< convert to int long l() const; //!< convert to long ftype32 f32() const; //!< convert to float ftype64 f64() const; //!< convert to double ftype f() const; //!< convert to ftype ftype rational() const; //!< convert from rational to ftype }; //! 3-vector class template class Vec3 { public: //! null constructor inline Vec3() {} //! constructor: from individual values inline Vec3( const T& v0, const T& v1, const T& v2 ) { vec[0] = v0; vec[1] = v1; vec[2] = v2; } //! constructor: copy/convert template explicit Vec3( const Vec3& v ) { vec[0] = TT(v[0]); vec[1] = TT(v[1]); vec[2] = TT(v[2]); } //! test equality bool equals( const Vec3& v, const T& tol ) const; //! get element inline const T& operator []( const int& i ) const { return vec[i]; } //! set element inline T& operator []( const int& i ) { return vec[i]; } //! return unit vector with same direction as this vector inline Vec3 unit() const { return (*this)*T(1.0/sqrt(ftype(vec[0]*vec[0]+vec[1]*vec[1]+vec[2]*vec[2]))); } //! return zero vector inline static Vec3 zero() { return Vec3( 0, 0, 0 ); } //! return null vector (only valid for floating point types) inline static Vec3 null() { return Vec3( T(Util::nan()), 0, 0 ); } //! test for null vector inline bool is_null() const { return Util::is_nan( vec[0] ); } //! Vector dot product (equivalent to *) inline static T dot( const Vec3& v1, const Vec3& v2 ) { return (v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2]); } //! Vector cross product inline static Vec3 cross( const Vec3& v1, const Vec3& v2 ) { return Vec3(v1[1]*v2[2]-v2[1]*v1[2], v1[2]*v2[0]-v2[2]*v1[0], v1[0]*v2[1]-v2[0]*v1[1]); } //! return formatted String representation String format() const { return "("+String(vec[0],10,4)+","+String(vec[1],10,4)+","+String(vec[2],10,4)+")"; } //! add another vector to this one inline const Vec3& operator += ( const Vec3& v ) { vec[0] += v[0]; vec[1] += v[1]; vec[2] += v[2]; return (*this); } //! subtract another vector from this one inline const Vec3& operator -= ( const Vec3& v ) { vec[0] -= v[0]; vec[1] -= v[1]; vec[2] -= v[2]; return (*this); } //! Vector equality (for floating point types see equals()) //-- friend int operator == ( const Vec3& v1, const Vec3& v2 ); //! Vector inequality (for floating point types see equals()) //-- friend int operator != ( const Vec3& v1, const Vec3& v2 ); //! Vector negation operator //-- friend Vec3 operator -( const Vec3& v ); //! Vector addition operator //-- friend Vec3 operator +( const Vec3& v1, const Vec3 &v2 ); //! Vector subtraction operator //-- friend Vec3 operator -( const Vec3& v1, const Vec3& v2 ); //! Vector scaling operator //-- friend Vec3 operator *( const T& s, const Vec3& v1 ); //! Vector scaling operator //-- friend Vec3 operator *( const Vec3& v1, const T& s ); //! Vector dot product //-- friend T operator *( const Vec3& v1, const Vec3& v2 ); private: T vec[3]; }; template inline int operator == ( const Vec3& v1, const Vec3& v2 ) { return (v1[0]==v2[0] && v1[1]==v2[1] && v1[2]==v2[2]); } template inline int operator != ( const Vec3& v1, const Vec3& v2 ) { return (v1[0]!=v2[0] || v1[1]!=v2[1] || v1[2]!=v2[2]); } template inline Vec3 operator -( const Vec3& v ) { return Vec3( -v[0], -v[1], -v[2] ); } template inline Vec3 operator +( const Vec3& v1, const Vec3 &v2 ) { return Vec3( v1[0]+v2[0], v1[1]+v2[1], v1[2]+v2[2]); } template inline Vec3 operator -( const Vec3& v1, const Vec3& v2 ) { return Vec3( v1[0]-v2[0], v1[1]-v2[1], v1[2]-v2[2]); } template inline Vec3 operator *( const T& s, const Vec3& v1 ) { return Vec3( s*v1[0], s*v1[1], s*v1[2]); } template inline Vec3 operator *( const Vec3& v1, const T& s ) { return Vec3( s*v1[0], s*v1[1], s*v1[2]); } template inline T operator *( const Vec3& v1, const Vec3& v2 ) { return Vec3::dot(v1,v2); } //! 3x3-matrix class template class Mat33 { public: //! null constructor inline Mat33() {} //! constructor inline Mat33( const T& m00, const T& m01, const T& m02, const T& m10, const T& m11, const T& m12, const T& m20, const T& m21, const T& m22 ) { mat[0][0] = m00; mat[0][1] = m01; mat[0][2] = m02; mat[1][0] = m10; mat[1][1] = m11; mat[1][2] = m12; mat[2][0] = m20; mat[2][1] = m21; mat[2][2] = m22; } //! constructor: copy/convert template explicit Mat33( const Mat33& m ); //! constructor: copy/convert from symmetric matrix template explicit Mat33( const Mat33sym& m ); T det() const; //!< determinant Mat33 inverse() const; //!< inverse Mat33 transpose() const; //!< transpose bool equals( const Mat33& m, const T& tol ) const; //!< test equality inline const T& operator ()( const int& i, const int& j ) const { return mat[i][j]; } //!< get element inline T& operator ()( const int& i, const int& j ) { return mat[i][j]; } //!< set element //! return formatted String representation String format() const { return "|"+String(mat[0][0],10,4)+","+String(mat[0][1],10,4)+","+String(mat[0][2],10,4)+"|\n|"+String(mat[1][0],10,4)+","+String(mat[1][1],10,4)+","+String(mat[1][2],10,4)+"|\n|"+String(mat[2][0],10,4)+","+String(mat[2][1],10,4)+","+String(mat[2][2],10,4)+"|"; } //! return identity matrix inline static Mat33 identity() { Mat33 m; m.mat[0][0] = m.mat[1][1] = m.mat[2][2] = 1; m.mat[0][1] = m.mat[0][2] = m.mat[1][0] = m.mat[1][2] = m.mat[2][0] = m.mat[2][1] = 0; return m; } //! return null matrix (only valid for floating point types) inline static Mat33 null() { Mat33 m; m.mat[0][0] = Util::nan(); return m; } //! test for null matrix (only valid for floating point types) bool inline is_null() const { return Util::is_nan( mat[0][0] ); } //! Matrix-vector product /*! Assumes a column vector */ //-- friend Vec3 operator *( const Mat33& m, const Vec3& v ); //! Vector-matrix product /*! Assumes a row vector, i.e. equivalent to the matrix-vector product with the matrix trasposed */ //-- friend Vec3 operator *( const Vec3& v, const Mat33& m ); //! Matrix-matrix product //-- friend Mat33 operator *(const Mat33& m1, const Mat33& m2); //! Matrix sum //-- friend Mat33 operator +(const Mat33& m1, const Mat33& m2); //! Unary minus //-- friend Mat33 operator -(const Mat33& m); private: T mat[3][3]; }; template inline Vec3 operator *( const Mat33& m, const Vec3& v ) { return Vec3( m(0,0)*v[0]+m(0,1)*v[1]+m(0,2)*v[2], m(1,0)*v[0]+m(1,1)*v[1]+m(1,2)*v[2], m(2,0)*v[0]+m(2,1)*v[1]+m(2,2)*v[2] ); } template inline Vec3 operator *( const Vec3& v, const Mat33& m ) { return Vec3( v[0]*m(0,0)+v[1]*m(1,0)+v[2]*m(2,0), v[0]*m(0,1)+v[1]*m(1,1)+v[2]*m(2,1), v[0]*m(0,2)+v[1]*m(1,2)+v[2]*m(2,2) ); } template inline Mat33 operator *( const Mat33& m1, const Mat33& m2 ) { return Mat33 ( m1(0,0)*m2(0,0) + m1(0,1)*m2(1,0) + m1(0,2)*m2(2,0), m1(0,0)*m2(0,1) + m1(0,1)*m2(1,1) + m1(0,2)*m2(2,1), m1(0,0)*m2(0,2) + m1(0,1)*m2(1,2) + m1(0,2)*m2(2,2), m1(1,0)*m2(0,0) + m1(1,1)*m2(1,0) + m1(1,2)*m2(2,0), m1(1,0)*m2(0,1) + m1(1,1)*m2(1,1) + m1(1,2)*m2(2,1), m1(1,0)*m2(0,2) + m1(1,1)*m2(1,2) + m1(1,2)*m2(2,2), m1(2,0)*m2(0,0) + m1(2,1)*m2(1,0) + m1(2,2)*m2(2,0), m1(2,0)*m2(0,1) + m1(2,1)*m2(1,1) + m1(2,2)*m2(2,1), m1(2,0)*m2(0,2) + m1(2,1)*m2(1,2) + m1(2,2)*m2(2,2) ); } template inline Mat33 operator +( const Mat33& m1, const Mat33& m2 ) { return Mat33( m1(0,0)+m2(0,0), m1(0,1)+m2(0,1), m1(0,2)+m2(0,2), m1(1,0)+m2(1,0), m1(1,1)+m2(1,1), m1(1,2)+m2(1,2), m1(2,0)+m2(2,0), m1(2,1)+m2(2,1), m1(2,2)+m2(2,2) ); } template inline Mat33 operator -( const Mat33& m ) { return Mat33( -m(0,0), -m(0,1), -m(0,2), -m(1,0), -m(1,1), -m(1,2), -m(2,0), -m(2,1), -m(2,2) ); } //! Compressed form for 3x3 symmetric matrix class template class Mat33sym { public: //! null constructor inline Mat33sym() {} //! constructor: from Mat33 (does not check for symmetry) template explicit Mat33sym( const Mat33& m ) : m00(m(0,0)), m11(m(1,1)), m22(m(2,2)), m01(m(0,1)), m02(m(0,2)), m12(m(1,2)) {} //! constructor: from Mat33sym template explicit Mat33sym( const Mat33sym& m ) : m00(m.mat00()), m11(m.mat11()), m22(m.mat22()), m01(m.mat01()), m02(m.mat02()), m12(m.mat12()) {} //! constructor: from coefficients inline Mat33sym( const T& c00, const T& c11, const T& c22, const T& c01, const T& c02, const T& c12 ) : m00(c00), m11(c11), m22(c22), m01(c01), m02(c02), m12(c12) {} //! return formatted String representation String format() const { return "|"+String(m00,10,4)+","+String(m01,10,4)+","+String(m02,10,4)+"|\n|"+String(m01,10,4)+","+String(m11,10,4)+","+String(m12,10,4)+"|\n|"+String(m02,10,4)+","+String(m12,10,4)+","+String(m22,10,4)+"|"; } //! return identity matrix inline static Mat33sym identity() { return Mat33sym( 1, 1, 1, 0, 0, 0 ); } //! return null matrix (only valid for floating point types) inline static Mat33sym null() { return Mat33sym(Util::nan(),0,0,0,0,0); } //! test for null matrix (only valid for floating point types) inline bool is_null() const { return Util::is_nan( m00 ); } //! return quadratic form with vector T quad_form( const Vec3& v ) const; T det() const; //!< determinant Mat33 sqrt() const; //!< square root Mat33sym inverse() const; //!< inverse inline const T& mat00() const { return m00; } //!< element (0,0) inline const T& mat11() const { return m11; } //!< element (1,1) inline const T& mat22() const { return m22; } //!< element (2,2) inline const T& mat01() const { return m01; } //!< element (0,1) inline const T& mat02() const { return m02; } //!< element (0,2) inline const T& mat12() const { return m12; } //!< element (1,2) //! access elements as 3x3 matrix (inefficient) const T& operator ()( const int& i, const int& j ) const; //! Matrix-vector product //-- friend Vec3 operator *( const Mat33sym& m, const Vec3& v ); //! Matrix sum //-- friend Mat33sym operator +( const Mat33sym& m1, const Mat33sym& m2 ); //! Unary minus //-- friend Mat33sym operator -( const Mat33sym& m ); private: T m00, m11, m22, m01, m02, m12; }; template inline Vec3 operator *( const Mat33sym& m, const Vec3& v ) { return Vec3( m.mat00()*v[0]+m.mat01()*v[1]+m.mat02()*v[2], m.mat01()*v[0]+m.mat11()*v[1]+m.mat12()*v[2], m.mat02()*v[0]+m.mat12()*v[1]+m.mat22()*v[2] ); } template inline Mat33sym operator +( const Mat33sym& m1, const Mat33sym& m2 ) { return Mat33sym( m1.mat00()+m2.mat00(), m1.mat11()+m2.mat11(), m1.mat22()+m2.mat22(), m1.mat01()+m2.mat01(), m1.mat02()+m2.mat02(), m1.mat12()+m2.mat12() ); } template inline Mat33sym operator -( const Mat33sym& m ) { return Mat33sym( -m.mat00(), -m.mat11(), -m.mat22(), -m.mat01(), -m.mat02(), -m.mat12() ); } //! Rotation-translation operator template class RTop { public: //! null constructor inline RTop() {} //! constructor: from rotation inline explicit RTop( const Mat33& r ) : rot_( r ), trn_( Vec3::zero() ) {} //! constructor: from rotation and translation inline RTop( const Mat33& r, const Vec3& t ) : rot_( r ), trn_( t ) {} //! inverse RTop inverse() const { Mat33 minv = rot().inverse(); return RTop(minv, -(minv*trn())); } //! test equality with some tolerance inline bool equals( const RTop& m, const T& tol ) const { return ( rot().equals(m.rot(),tol) && trn().equals(m.trn(),tol) ); } inline const Mat33& rot() const { return rot_; } //!< get rotation inline const Vec3& trn() const { return trn_; } //!< get translation inline Mat33& rot() { return rot_; } //!< set rotation inline Vec3& trn() { return trn_; } //!< set translation //! return identity operator inline static RTop identity() { return RTop( Mat33::identity(), Vec3::zero() ); } //! return identity operator inline static RTop null() { return RTop( Mat33::null(), Vec3::null() ); } //! test for null operator inline bool is_null() const { return rot_.is_null() || trn_.is_null(); } //! return formatted String representation String format() const { return rot_.format() + "\n" + trn_.format(); } //! apply RTop to vector //-- friend Vec3 operator *( const RTop& r, const Vec3& v ); //! RTop product //-- friend RTop operator *( const RTop& r1, const RTop& r2 ); private: Mat33 rot_; Vec3 trn_; }; template inline Vec3 operator *( const RTop& r, const Vec3& v ) { return r.rot()*v + r.trn(); } template inline RTop operator *( const RTop& r1, const RTop& r2 ) { return RTop( r1.rot()*r2.rot(), r1.rot()*r2.trn()+r1.trn() ); } //! Simple 2-d array class template class Array2d { public: //! null constructor inline Array2d() { d1_ = d2_ = 0; } //! constructor inline Array2d( const int& d1, const int& d2 ) { resize( d1, d2 ); } //! constructor inline Array2d( const int& d1, const int& d2, T val ) { resize( d1, d2, val ); } //! resize void inline resize( const int& d1, const int& d2 ) { d1_ = d1; d2_ = d2; data.resize( size() ); } //! resize void inline resize( const int& d1, const int& d2, const T& val ) { d1_ = d1; d2_ = d2; data.resize( size(), val ); } inline int size() const { return d1_ * d2_; } //!< size inline const int& rows() const { return d1_; } //!< number of rows inline const int& cols() const { return d2_; } //!< number of cols //! read accessor inline const T& operator () ( const int& i1, const int& i2 ) const { return data[ i1*d2_ + i2 ]; } //! write accessor inline T& operator () ( const int& i1, const int& i2 ) { return data[ i1*d2_ + i2 ]; } protected: std::vector data; int d1_, d2_; }; //! General matrix class: like Array2d but with numerical methods template class Matrix : public Array2d { public: //! null constructor inline Matrix() {} //! constructor inline Matrix( const int& d1, const int& d2 ) { Array2d::resize( d1, d2 ); } //! constructor inline Matrix( const int& d1, const int& d2, T val ) { Array2d::resize( d1, d2, val ); } //! equation solver (square matrices only) std::vector solve( const std::vector& b ) const; //! eigenvalue calculation (square symmetric matrices only) std::vector eigen( const bool sort = true ); //! Matrix-vector product /*! Assumes a column vector */ //-- friend std::vector operator *( const Matrix& m, const std::vector& v ); }; template std::vector operator *( const Matrix& m, const std::vector& v ) { if ( m.cols() != v.size() ) Message::message( Message_fatal( "Matrix*vector dimension mismatch" ) ); std::vector r( m.rows() ); int i, j; T s; for ( i = 0; i < m.rows(); i++ ) { s = T(0); for ( j = 0; j < m.cols(); j++ ) s += m(i,j) * v[j]; r[i] = s; } return r; } // template implementations template bool Vec3::equals( const Vec3& v, const T& tol ) const { return ( pow(vec[0]-v[0],T(2)) + pow(vec[1]-v[1],T(2)) + pow(vec[2]-v[2],T(2)) <= pow(tol,T(2)) ); } template template Mat33::Mat33( const Mat33& m ) { mat[0][0]=T(m(0,0)); mat[0][1]=T(m(0,1)); mat[0][2]=T(m(0,2)); mat[1][0]=T(m(1,0)); mat[1][1]=T(m(1,1)); mat[1][2]=T(m(1,2)); mat[2][0]=T(m(2,0)); mat[2][1]=T(m(2,1)); mat[2][2]=T(m(2,2)); } template template Mat33::Mat33( const Mat33sym& m ) { mat[0][0]=T(m.mat00()); mat[1][1]=T(m.mat11()); mat[2][2]=T(m.mat22()); mat[0][1]=mat[1][0]=T(m.mat01()); mat[0][2]=mat[2][0]=T(m.mat02()); mat[1][2]=mat[2][1]=T(m.mat12()); } template bool Mat33::equals( const Mat33& m, const T& tol ) const { return ( pow(mat[0][0]-m(0,0),T(2)) + pow(mat[0][1]-m(0,1),T(2)) + pow(mat[0][2]-m(0,2),T(2)) + pow(mat[1][0]-m(1,0),T(2)) + pow(mat[1][1]-m(1,1),T(2)) + pow(mat[1][2]-m(1,2),T(2)) + pow(mat[2][0]-m(2,0),T(2)) + pow(mat[2][1]-m(2,1),T(2)) + pow(mat[2][2]-m(2,2),T(2)) <= pow(tol,T(2)) ); } template T Mat33::det() const { return ( mat[0][0]*(mat[1][1]*mat[2][2] - mat[1][2]*mat[2][1]) + mat[0][1]*(mat[1][2]*mat[2][0] - mat[1][0]*mat[2][2]) + mat[0][2]*(mat[1][0]*mat[2][1] - mat[1][1]*mat[2][0]) ); } template Mat33 Mat33::inverse() const { T d = det(); Mat33 inv; inv(0,0) = ( mat[1][1]*mat[2][2] - mat[1][2]*mat[2][1] ) / d; inv(1,0) = ( mat[1][2]*mat[2][0] - mat[1][0]*mat[2][2] ) / d; inv(2,0) = ( mat[1][0]*mat[2][1] - mat[1][1]*mat[2][0] ) / d; inv(0,1) = ( mat[2][1]*mat[0][2] - mat[2][2]*mat[0][1] ) / d; inv(1,1) = ( mat[2][2]*mat[0][0] - mat[2][0]*mat[0][2] ) / d; inv(2,1) = ( mat[2][0]*mat[0][1] - mat[2][1]*mat[0][0] ) / d; inv(0,2) = ( mat[0][1]*mat[1][2] - mat[0][2]*mat[1][1] ) / d; inv(1,2) = ( mat[0][2]*mat[1][0] - mat[0][0]*mat[1][2] ) / d; inv(2,2) = ( mat[0][0]*mat[1][1] - mat[0][1]*mat[1][0] ) / d; return inv; } template Mat33 Mat33::transpose() const { Mat33 t; t(0,0) = mat[0][0]; t(0,1) = mat[1][0]; t(0,2) = mat[2][0]; t(1,0) = mat[0][1]; t(1,1) = mat[1][1]; t(1,2) = mat[2][1]; t(2,0) = mat[0][2]; t(2,1) = mat[1][2]; t(2,2) = mat[2][2]; return t; } template T Mat33sym::det() const { return ( m00*(m11*m22 - m12*m12) + m01*(m12*m02 - m01*m22) + m02*(m01*m12 - m11*m02) ); } template Mat33 Mat33sym::sqrt() const { Mat33 half( Mat33sym( 0.5, 0.5, 0.5, 0.0, 0.0, 0.0 ) ); Mat33 target( *this ); Mat33 result( target ); result(1,0) = result(2,0) = result(2,1) = 0.0; for ( int i = 0; i < 10; i++ ) result = half * ( result.inverse() * target + result ); return result; } template Mat33sym Mat33sym::inverse() const { T d = det(); return Mat33sym ( ( m11*m22 - m12*m12 ) / d, ( m22*m00 - m02*m02 ) / d, ( m00*m11 - m01*m01 ) / d, ( m12*m02 - m22*m01 ) / d, ( m01*m12 - m02*m11 ) / d, ( m02*m01 - m00*m12 ) / d ); } template T Mat33sym::quad_form( const Vec3& v ) const { return ( v[0]*( v[0]*m00 + 2*(v[1]*m01+v[2]*m02) ) + v[1]*( v[1]*m11 + 2*(v[2]*m12) ) + v[2]*v[2]*m22 ); } template const T& Mat33sym::operator ()( const int& i, const int& j ) const { switch (i) { case 0: switch (j) { case 0: return m00; case 1: return m01; default: return m02; } case 1: switch (j) { case 0: return m01; case 1: return m11; default: return m12; } default: switch (j) { case 0: return m02; case 1: return m12; default: return m22; } } } // complex matrix methods /*! Solve the system of linear equations Ax=b for x Uses elimination. Only suitable for small systems. */ template std::vector Matrix::solve( const std::vector& b ) const { if ( Array2d::rows() != Array2d::cols() ) Message::message( Message_fatal("Matrix.solve() matrix not square") ); if ( Array2d::rows() != b.size() ) Message::message( Message_fatal("Matrix.solve() matrix/vector mismatch") ); const int n = Array2d::rows(); // solve for X by Gaussian elimination T s, pivot; int i, j, k; Matrix a = *this; std::vector x = b; for ( i = 0; i < n; i++ ) { // pick largest pivot j = i; for ( k = i+1; k < n; k++ ) if ( fabs(a(k,i)) > fabs(a(j,i)) ) j = k; // swap rows for ( k = 0; k < n; k++ ) Util::swap( a(i,k), a(j,k) ); Util::swap( x[i], x[j] ); // perform elimination pivot = a(i,i); for ( j = 0; j < n; j++ ) { if ( j != i ) { s = a(j,i) / pivot; for ( k = i+1; k < n; k++ ) a(j,k) = a(j,k) - s*a(i,k); x[j] = x[j] - s*x[i]; } } } for ( i = 0; i < n; i++ ) x[i] /= a(i,i); return x; } /*! Find the Eigenvalues and Eigenvectors of the matrix. Uses the Jacobi method. Only suitable for small systems (dimension<20). The matrix is replaced by the matrix of eigenvectors (as columns). \param sort Sort the eigenvalues and vectors, smallest first. (default=true) \return Vector of eigenvalues. */ template std::vector Matrix::eigen( const bool sort ) { if ( Array2d::rows() != Array2d::cols() ) Message::message( Message_fatal( "Matrix.eigen() matrix not square" ) ); const int n = Array2d::rows(); int cyc, j, q, p; T spp, spq, t, s, c, theta, tau, h, ap, aq, a_pq; Matrix& mat = *this; Matrix evec( n, n, 0.0 ); std::vector eval( n ); std::vector b( n ); std::vector z( n ); // Set evec to identity, eval & b to diagonal, z to 0. for( p = 0; p < n; p++ ) { evec(p,p) = 1.0; eval[p] = b[p] = mat(p,p); } for ( cyc = 1; cyc <= 50; cyc++ ) { // calc sum of diagonal, off-diagonal spp = spq = 0.0; for ( p=0; p 1.0e-12*fabs(h) ) { theta = 0.5*h/a_pq; t = 1.0/(fabs(theta) + sqrt(1.0 + theta*theta)); if ( theta < 0.0 ) t = -t; } else { t = a_pq/h; } // calc trig properties c = 1.0/sqrt(1.0+t*t); s = t*c; tau = s/(1.0+c); h = t * a_pq; // update eigenvalues z[p] -= h; z[q] += h; eval[p] -= h; eval[q] += h; // rotate the upper diagonal of the matrix mat( p, q ) = 0.0; for ( j = 0; j < p; j++ ) { ap = mat( j, p ); aq = mat( j, q ); mat( j, p ) = ap - s * ( aq + ap * tau ); mat( j, q ) = aq + s * ( ap - aq * tau ); } for ( j = p+1; j < q; j++ ) { ap = mat( p, j ); aq = mat( j, q ); mat( p, j ) = ap - s * ( aq + ap * tau ); mat( j, q ) = aq + s * ( ap - aq * tau ); } for ( j = q+1; j < n; j++ ) { ap = mat( p, j ); aq = mat( q, j ); mat( p, j ) = ap - s * ( aq + ap * tau ); mat( q, j ) = aq + s * ( ap - aq * tau ); } // apply corresponding rotation to result for ( j = 0; j < n; j++ ) { ap = evec( j, p ); aq = evec( j, q ); evec( j, p ) = ap - s * ( aq + ap * tau ); evec( j, q ) = aq + s * ( ap - aq * tau ); } } } for ( p = 0; p < n; p++ ) { b[p] += z[p]; eval[p] = b[p]; } } // sort the eigenvalues if ( sort ) { for ( p = 0; p < n; p++ ) { j = p; // set j to index of largest remaining eval for ( q = p+1; q < n; q++ ) if ( eval[q] < eval[j] ) j = q; Util::swap( eval[p], eval[j] ); // now swap evals, evecs for ( q = 0; q < n; q++ ) Util::swap( evec( q, p ), evec( q, j ) ); } } // return eigenvalues mat = evec; return eval; } } // namespace clipper #endif clipper-2.1/clipper/core/clipper_instance.h0000644000374100011300000000627111205016247016012 00000000000000/*! \file lib/clipper_instance.h Header file for clipper helper functions */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_INSTANCE #define CLIPPER_INSTANCE #include "hkl_data.h" #include "xmap.h" namespace clipper { // \internal Class used to instantiate cache objects class ClipperInstance { public: ClipperInstance(); ~ClipperInstance(); const Util& util() const { return util_; } ObjectCache& spacegroup_cache() { return sgcache_; } ObjectCache& xmap_cache() { return xmcache_; } ObjectCache& hkl_data_cache() { return hdcache_; } void destroy(); //!< VERY DANGEROUS, DO NOT USE private: Util util_; ObjectCache sgcache_; ObjectCache xmcache_; ObjectCache hdcache_; }; // \internal Class used to instantiate cache objects class ClipperInstantiator { public: ClipperInstantiator() {} ~ClipperInstantiator() {} static ClipperInstance& instance() { return inst; } private: static ClipperInstance inst; }; } // namespace clipper #endif clipper-2.1/clipper/core/fftmap_sparse.h0000644000374100011300000001437010736415747015341 00000000000000/*! \file lib/fftmap_sparse.h Header file for P1 fft map */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_FFTMAP_SPARSE #define CLIPPER_FFTMAP_SPARSE #include "fftmap.h" namespace clipper { //! base type for sparse P1 fft maps class FFTmap_sparse_p1_base : public FFTmap_base { public: //! initialiser: takes grid void init( const Grid_sampling& grid_sam, const FFTtype type = Default ); //! Destructor ~FFTmap_sparse_p1_base(); //! get real grid sampling const Grid_sampling& grid_real() const { return grid_real_; } //! get reciprocal grid const Grid& grid_reci() const { return grid_reci_; } //! set/get default optimisation type static FFTtype& default_type() { return default_type_; } protected: //! return/create row ffttype* map_uv( const int& u, const int& v ); //! return/create row std::complex* map_kl( const int& k, const int& l ); Grid_sampling grid_real_; //!< real space grid Grid grid_reci_; //!< reciprocal space grid FFTtype type_; //!< optimisation options Array2d*> row_kl; //!< section map Array2d row_uv; //!< section map static FFTtype default_type_; //!< default optimisation options }; //! FFTmap_sparse_p1_hx: low level sparse P1 map used for calculating FFTs /*! This version computes sparse Hermititan...real FFTs. By specifying what parts of the map are needed in advance, it is possible to perform highly optimised FFTs, including some of the benefits of symmetry. */ class FFTmap_sparse_p1_hx : public FFTmap_sparse_p1_base { public: //! Null constuctor FFTmap_sparse_p1_hx(); //! Constructor: takes grid FFTmap_sparse_p1_hx( const Grid_sampling& grid_sam, const FFTtype type = Default ); //-- void init( const Grid_sampling& grid_sam, const FFTtype type = Default ); //-- const Grid_sampling& grid_real() const; //-- const Grid& grid_reci() const; //! set reciprocal space data by hkl void set_hkl( const HKL& hkl, const std::complex& f ); //! set reciprocal space data (internal use) std::complex& cplx_data( const Coord_grid& uvw ) { return map_kl( uvw.v(), uvw.w() )[ uvw.u() ]; } //! express need for real space data void require_real_data( const Coord_grid& uvw ) { map_uv( uvw.u(), uvw.v() ); } //! get real space data ( uvw must be in grid_real() ) const ffttype& real_data( const Coord_grid& uvw ) const { return row_uv( uvw.u(), uvw.v() )[ uvw.w() ]; } //! Transform to real space void fft_h_to_x( const ftype& scale ); }; //! FFTmap_sparse_p1_xh: low level sparse P1 map used for calculating FFTs /*! This version computes sparse real...Hermititan FFTs. By specifying what parts of the map are needed in advance, it is possible to perform highly optimised FFTs, including some of the benefits of symmetry. */ class FFTmap_sparse_p1_xh : public FFTmap_sparse_p1_base { public: //! Null constuctor FFTmap_sparse_p1_xh(); //! Constructor: takes grid FFTmap_sparse_p1_xh( const Grid_sampling& grid_sam, const FFTtype type = Default ); //-- void init( const Grid_sampling& grid_sam, const FFTtype type = Default ); //-- const Grid_sampling& grid_real() const; //-- const Grid& grid_reci() const; //! set real space data ( uvw must be in grid_real() ) ffttype& real_data( const Coord_grid& uvw ) { return map_uv( uvw.u(), uvw.v() )[ uvw.w() ]; } //! express need for reciprocal space data by hkl void require_hkl( const HKL& hkl ); //! get reciprocal space data by hkl const std::complex get_hkl( const HKL& hkl ) const; //! express need for reciprocal space data (internal use) void require_cplx_data( const Coord_grid& hkl ) { map_kl( hkl.v(), hkl.w() ); } //! get reciprocal space data (internal use) const std::complex& cplx_data( const Coord_grid& hkl ) const { return row_kl( hkl.v(), hkl.w() )[ hkl.u() ]; } //! Transform to real space void fft_x_to_h( const ftype& scale ); }; } // namespace clipper #endif clipper-2.1/clipper/core/resol_basisfn.h0000644000374100011300000003463411271550377015337 00000000000000/*! \file lib/resol_basisfn.h Header file for resolution basis function */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_RESOL_BASISFN #define CLIPPER_RESOL_BASISFN #include "resol_fn.h" namespace clipper { //! Resolution ordinal gernerator /*! This class is a helper class for functions which need to divide reflections up by resolution whilst guaranteeing a certain distribution of number of reflections per range. It takes a list of reflections, one at a time, and calculates a function to get the approximate ordinal number of a reflection in a list sorted by resolution. */ class Resolution_ordinal : public Generic_ordinal { public: //! initialiser: takes an HKL_info and uses all reflections. void init( const HKL_info& hklinfo, const ftype& power ); //! initialiser: takes an HKL_data & uses non-missing reflections. void init( const HKL_data_base& hkldata, const ftype& power ); //! initialiser: takes an HKL_data + Cell & uses non-missing reflections. void init( const HKL_data_base& hkldata, const Cell& cell, const ftype& power ); }; //! simple binning basis function /*! This class bins reflections on the basis of resolution, i.e. it generates a resolution function from spherical shells. */ class BasisFn_binner : public BasisFn_base { public: //! constructor: include whole reflection list in histogram BasisFn_binner( const HKL_info& hklinfo, const int& nbins_, const ftype power = 1.0 ) : BasisFn_base( nbins_ ) { s_ord.init( hklinfo, power ); } //! constructor: include only non-missing reflections in histogram BasisFn_binner( const HKL_data_base& hkldata, const int& nbins_, const ftype power = 1.0 ) : BasisFn_base( nbins_ ) { s_ord.init( hkldata, hkldata.base_cell(), power ); } //! the value of the resolution function (override for speed) ftype f_s( const ftype& s, const std::vector& params ) const; //! the derivative of the resolution function w.r.t. the parameters const BasisFn_base::Fderiv& fderiv_s( const ftype& s, const std::vector& params ) const; //! the type of the function: optionally used to improve convergence FNtype type() const { return LINEAR; } //! number of non-zero diagonals in the upper triangle of the curvatures int num_diagonals() const { return 1; } //! the value of the resolution function (override for speed) ftype f( const HKL& hkl, const Cell& cell, const std::vector& params ) const { return f_s( hkl.invresolsq( cell ), params ); } //! the derivatives of the resolution function w.r.t. the parameters const BasisFn_base::Fderiv& fderiv( const HKL& hkl, const Cell& cell, const std::vector& params ) const { return fderiv_s( hkl.invresolsq( cell ), params ); } private: Resolution_ordinal s_ord; //& params ) const; //! the derivative of the resolution function w.r.t. the parameters const BasisFn_base::Fderiv& fderiv_s( const ftype& s, const std::vector& params ) const; //! the type of the function: optionally used to improve convergence FNtype type() const { return LINEAR; } //! number of non-zero diagonals in the upper triangle of the curvatures int num_diagonals() const { return 2; } //! the value of the resolution function (override for speed) ftype f( const HKL& hkl, const Cell& cell, const std::vector& params ) const { return f_s( hkl.invresolsq( cell ), params ); } //! the derivatives of the resolution function w.r.t. the parameters const BasisFn_base::Fderiv& fderiv( const HKL& hkl, const Cell& cell, const std::vector& params ) const { return fderiv_s( hkl.invresolsq( cell ), params ); } private: Resolution_ordinal s_ord; //& params ) const; //! the derivative of the resolution function w.r.t. the parameters const BasisFn_base::Fderiv& fderiv_s( const ftype& s, const std::vector& params ) const; //! the type of the function: optionally used to improve convergence FNtype type() const { return LINEAR; } //! number of non-zero diagonals in the upper triangle of the curvatures int num_diagonals() const { return 3; } //! the value of the resolution function (override for speed) ftype f( const HKL& hkl, const Cell& cell, const std::vector& params ) const { return f_s( hkl.invresolsq( cell ), params ); } //! the derivatives of the resolution function w.r.t. the parameters const BasisFn_base::Fderiv& fderiv( const HKL& hkl, const Cell& cell, const std::vector& params ) const { return fderiv_s( hkl.invresolsq( cell ), params ); } private: Resolution_ordinal s_ord; //& params ) const; //! the derivatives of the resolution function w.r.t. the parameters const BasisFn_base::Fderiv& fderiv_s( const ftype& s, const std::vector& params ) const; //! the value of the resolution function (override for speed) //ftype f( const HKL& hkl, const Cell& cell, const std::vector& params ) const { return f_s( hkl.invresolsq( cell ), params ); } //! the derivatives of the resolution function w.r.t. the parameters const BasisFn_base::Fderiv& fderiv( const HKL& hkl, const Cell& cell, const std::vector& params ) const { return fderiv_s( hkl.invresolsq( cell ), params ); } //! return the scale factor corresponding to the Gaussian parameters ftype scale( const std::vector& params ) const; //! return the isotropic U corresponding to the Gaussian parameters ftype u_iso( const std::vector& params ) const; }; //! simple anisotropic Gaussian basis function /*! This class provides a anisotropic Gaussian basis function. */ class BasisFn_aniso_gaussian : public BasisFn_base { public: //! constructor: BasisFn_aniso_gaussian() : BasisFn_base( 7 ) {} //! the derivatives of the resolution function w.r.t. the parameters const BasisFn_base::Fderiv& fderiv_coord( const Coord_reci_orth& xs, const std::vector& params ) const; //! the value of the resolution function (override for speed) //ftype f( const HKL& hkl, const Cell& cell, const std::vector& params ) const { return f_coord( hkl.coord_reci_orth( cell ), params ); } //! the derivatives of the resolution function w.r.t. the parameters const BasisFn_base::Fderiv& fderiv( const HKL& hkl, const Cell& cell, const std::vector& params ) const { return fderiv_coord( hkl.coord_reci_orth( cell ), params ); } //! return the scale factor corresponding to the Gaussian parameters ftype scale( const std::vector& params ) const; //! return the anisotropic U corresponding to the Gaussian parameters U_aniso_orth u_aniso_orth( const std::vector& params ) const; }; //! simple log Gaussian basis function /*! This class provides a Log Gaussian basis function. i.e. a quadratic function of resolution. Use this in conjunction with a Log-target function to get a fast estimate to a Gaussian fit. */ class BasisFn_log_gaussian : public BasisFn_base { public: //! constructor: BasisFn_log_gaussian() : BasisFn_base( 2 ) {} //! the value of the resolution function //ftype f_s( const ftype& s, const std::vector& params ) const; //! the derivatives of the resolution function w.r.t. the parameters const BasisFn_base::Fderiv& fderiv_s( const ftype& s, const std::vector& params ) const; //! the value of the resolution function (override for speed) //ftype f( const HKL& hkl, const Cell& cell, const std::vector& params ) const { return f_s( hkl.invresolsq( cell ), params ); } //! the derivatives of the resolution function w.r.t. the parameters const BasisFn_base::Fderiv& fderiv( const HKL& hkl, const Cell& cell, const std::vector& params ) const { return fderiv_s( hkl.invresolsq( cell ), params ); } //! the type of the function: optionally used to improve convergence FNtype type() const { return LINEAR; } //! return the scale factor corresponding to the Gaussian parameters ftype scale( const std::vector& params ) const; //! return the isotropic U corresponding to the Gaussian parameters ftype u_iso( const std::vector& params ) const; }; //! simple anisotropic Gaussian basis function /*! This class provides a anisotropic Gaussian basis function. i.e. a general quadratic function of resolution. Use this in conjunction with a Log-target function to get a fast estimate to a Gaussian fit. */ class BasisFn_log_aniso_gaussian : public BasisFn_base { public: //! constructor: BasisFn_log_aniso_gaussian() : BasisFn_base( 7 ) {} //! the derivatives of the resolution function w.r.t. the parameters const BasisFn_base::Fderiv& fderiv_coord( const Coord_reci_orth& xs, const std::vector& params ) const; //! the value of the resolution function (override for speed) //ftype f( const HKL& hkl, const Cell& cell, const std::vector& params ) const { return f_coord( hkl.coord_reci_orth( cell ), params ); } //! the derivatives of the resolution function w.r.t. the parameters const BasisFn_base::Fderiv& fderiv( const HKL& hkl, const Cell& cell, const std::vector& params ) const { return fderiv_coord( hkl.coord_reci_orth( cell ), params ); } //! the type of the function: optionally used to improve convergence FNtype type() const { return LINEAR; } //! return the scale factor corresponding to the Gaussian parameters ftype scale( const std::vector& params ) const; //! return the anisotropic U corresponding to the Gaussian parameters U_aniso_orth u_aniso_orth( const std::vector& params ) const; }; //! simple Expcubic basis function /*! This class provides a Expcubic basis function. */ class BasisFn_expcubic : public BasisFn_base { public: //! constructor BasisFn_expcubic() : BasisFn_base( 4 ) {} //! the derivatives of the resolution function w.r.t. the parameters const BasisFn_base::Fderiv& fderiv_s( const ftype& s, const std::vector& params ) const; //! the value of the resolution function (override for speed) //ftype f( const HKL& hkl, const Cell& cell, const std::vector& params ) const { return f_s( hkl.invresolsq( cell ), params ); } //! the derivatives of the resolution function w.r.t. the parameters const BasisFn_base::Fderiv& fderiv( const HKL& hkl, const Cell& cell, const std::vector& params ) const { return fderiv_s( hkl.invresolsq( cell ), params ); } }; } // namespace clipper #endif clipper-2.1/clipper/core/hkl_datatypes.cpp0000644000374100011300000000556310363703537015673 00000000000000/* hkl_datatypes.cpp: fundamental data types for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "hkl_datatypes.h" namespace clipper { namespace datatypes { // compile template types template class I_sigI; template class I_sigI_ano; template class F_sigF; template class F_sigF_ano; template class E_sigE; template class F_phi; template class Phi_fom; template class ABCD; template class I_sigI; template class I_sigI_ano; template class F_sigF; template class F_sigF_ano; template class E_sigE; template class F_phi; template class Phi_fom; template class ABCD; } // namespace datatypes } // namespace clipper clipper-2.1/clipper/core/spacegroup_data.cpp0000644000374100011300000011655210365657772016214 00000000000000/* spacegroup_data.cpp: spacegroup data tables */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA /* Some code coverted from the paper of Hall & Grosse-Kunstleve */ #include "spacegroup_data.h" namespace clipper { namespace data { // ASU fns bool ASU_111( const int& h, const int& k, const int& l ) { return (l>0 || (l==0 && (h>0 || (h==0 && k>=0)))); } bool ASU_112( const int& h, const int& k, const int& l ) { return (l>=0 && (h>0 || (h==0 && k>=0))); } bool ASU_121( const int& h, const int& k, const int& l ) { return (k>=0 && (l>0 || (l==0 && h>=0))); } bool ASU_211( const int& h, const int& k, const int& l ) { return (h>=0 && (k>0 || (k==0 && l>=0))); } bool ASU_21U( const int& h, const int& k, const int& l ) { return (h+k>=0 && (l>0 || (l==0 && h-k>=0))); } bool ASU_21V( const int& h, const int& k, const int& l ) { return (l+h>=0 && (k>0 || (k==0 && l-h>=0))); } bool ASU_21W( const int& h, const int& k, const int& l ) { return (k+l>=0 && (h>0 || (h==0 && k-l>=0))); } bool ASU_21X( const int& h, const int& k, const int& l ) { return (h-k>=0 && (l>0 || (l==0 && h+k>=0))); } bool ASU_21Y( const int& h, const int& k, const int& l ) { return (l-h>=0 && (k>0 || (k==0 && l+h>=0))); } bool ASU_21Z( const int& h, const int& k, const int& l ) { return (k-l>=0 && (h>0 || (h==0 && k+l>=0))); } bool ASU_222( const int& h, const int& k, const int& l ) { return (h>=0 && k>=0 && l>=0); } bool ASU_22U( const int& h, const int& k, const int& l ) { return (h<=k && h>=-k && l>=0); } bool ASU_22V( const int& h, const int& k, const int& l ) { return (l<=h && l>=-h && k>=0); } bool ASU_22W( const int& h, const int& k, const int& l ) { return (k<=l && k>=-l && h>=0); } bool ASU_114( const int& h, const int& k, const int& l ) { return (l>=0 && ((h>=0 && k>0) || (h==0 && k==0))); } bool ASU_141( const int& h, const int& k, const int& l ) { return (k>=0 && ((l>=0 && h>0) || (l==0 && h==0))); } bool ASU_411( const int& h, const int& k, const int& l ) { return (h>=0 && ((k>=0 && l>0) || (k==0 && l==0))); } bool ASU_224( const int& h, const int& k, const int& l ) { return (h>=k && k>=0 && l>=0); } bool ASU_242( const int& h, const int& k, const int& l ) { return (l>=h && h>=0 && k>=0); } bool ASU_422( const int& h, const int& k, const int& l ) { return (k>=l && l>=0 && h>=0); } bool ASU_113( const int& h, const int& k, const int& l ) { return (h>=0 && k>0) || (h==0 && k==0 && l >= 0); } bool ASU_131( const int& h, const int& k, const int& l ) { return (l>=0 && h>0) || (l==0 && h==0 && k >= 0); } bool ASU_311( const int& h, const int& k, const int& l ) { return (k>=0 && l>0) || (k==0 && l==0 && h >= 0); } bool ASU_11T( const int& h, const int& k, const int& l ) { return (h<=0 && k>0) || (h==0 && k==0 && l >= 0); } bool ASU_1T1( const int& h, const int& k, const int& l ) { return (l<=0 && h>0) || (l==0 && h==0 && k >= 0); } bool ASU_T11( const int& h, const int& k, const int& l ) { return (k<=0 && l>0) || (k==0 && l==0 && h >= 0); } bool ASU_31A( const int& h, const int& k, const int& l ) { return (k-l>=0 && l-h>0) || (h==l && k==l && h+k+l>=0); } bool ASU_31B( const int& h, const int& k, const int& l ) { return (k-l>=0 && l+h>0) || (-h==l && k==l && -h+k+l>=0); } bool ASU_31C( const int& h, const int& k, const int& l ) { return (-k-l>=0 && l-h>0) || (h==l && -k==l && h-k+l>=0); } bool ASU_31D( const int& h, const int& k, const int& l ) { return (k+l>=0 && -l-h>0) || (h==-l && k==-l && h+k-l>=0); } bool ASU_223( const int& h, const int& k, const int& l ) { return (h>=k && k>=0 && (k>0 || l>=0)); } bool ASU_232( const int& h, const int& k, const int& l ) { return (l>=h && h>=0 && (h>0 || k>=0)); } bool ASU_322( const int& h, const int& k, const int& l ) { return (k>=l && l>=0 && (l>0 || h>=0)); } bool ASU_32A( const int& h, const int& k, const int& l ) { return (h>=k && k+l>=h+h && (k+l>h+h || h+k+l>=0)); } bool ASU_32B( const int& h, const int& k, const int& l ) { return (-h>=k && k+l>=-h-h && (k+l>-h-h || -h+k+l>=0)); } bool ASU_32C( const int& h, const int& k, const int& l ) { return (h>=-k && -k+l>=h+h && (-k+l>h+h || h-k+l>=0)); } bool ASU_32D( const int& h, const int& k, const int& l ) { return (h>=k && k-l>=h+h && (k-l>h+h || h+k-l>=0)); } bool ASU_32U( const int& h, const int& k, const int& l ) { return (h>=k && k>=0 && (h>k || l>=0)); } bool ASU_32V( const int& h, const int& k, const int& l ) { return (k>=l && l>=0 && (k>l || h>=0)); } bool ASU_32W( const int& h, const int& k, const int& l ) { return (l>=h && h>=0 && (l>h || k>=0)); } bool ASU_32X( const int& h, const int& k, const int& l ) { return (-h>=k && k>=0 && (-h>k || l>=0)); } bool ASU_32Y( const int& h, const int& k, const int& l ) { return (-k>=l && l>=0 && (-k>l || h>=0)); } bool ASU_32Z( const int& h, const int& k, const int& l ) { return (-l>=h && h>=0 && (-l>h || k>=0)); } bool ASU_M3B( const int& h, const int& k, const int& l ) { return (h>=0 && ((l>=h && k>h) || (l==h && k==h))); } bool ASU_M3M( const int& h, const int& k, const int& l ) { return (k>=l && l>=h && h>=0); } // ABCD are 4 dirns for body diagonal, UVWXYZ are 6 dirns for face diagonal LGdata lgdata[] = { { 0x2df60a45, &ASU_111, "-1" }, // -P 1 { 0x9b92779f, &ASU_112, "2/m" }, // -P 2 { 0x068dfeb3, &ASU_121, "2/m" }, // -P 2y { 0xb08d46cf, &ASU_211, "2/m" }, // -P 2x { 0x12339040, &ASU_21U, "2/m" }, // -P 2" { 0x44aa9a14, &ASU_21V, "2/m" }, // -P 2y" { 0x53e4b366, &ASU_21W, "2/m" }, // -P 2x" { 0x4321a07d, &ASU_21X, "2/m" }, // -P 2' { 0x1c1b5411, &ASU_21Y, "2/m" }, // -P 2y' { 0xe34a99ed, &ASU_21Z, "2/m" }, // -P 2x' { 0xe7243bbc, &ASU_222, "mmm" }, // -P 2 2 { 0x885920bf, &ASU_22U, "mmm" }, // -P 2 2" { 0xe980f874, &ASU_22V, "mmm" }, // -P 2 2" (y,z,x) { 0x05c7f86e, &ASU_22W, "mmm" }, // -P 2 2" (z,x,y) { 0xfdd759b5, &ASU_113, "-3" }, // -P 3 { 0xf2769c28, &ASU_131, "-3" }, // -P 3 (y,z,x) { 0xcd4b8428, &ASU_311, "-3" }, // -P 3 (z,x,y) { 0x07fa5ca1, &ASU_11T, "-3" }, // -P 3 (-x,y,z) { 0x0f070468, &ASU_1T1, "-3" }, // -P 3 (y,z,-x) { 0x9bd3dcf4, &ASU_T11, "-3" }, // -P 3 (z,-x,y) { 0xd9a29bac, &ASU_31A, "-3" }, // -P 3* { 0x627a2f8c, &ASU_31B, "-3" }, // -P 3* (-x,y,z) { 0xcfb71d71, &ASU_31C, "-3" }, // -P 3* (x,-y,z) { 0x8a86426e, &ASU_31D, "-3" }, // -P 3* (x,y,-z) { 0xf74c7f83, &ASU_223, "-3m" }, // -P 3 2 { 0x573b981c, &ASU_232, "-3m" }, // -P 3 2 (y,z,x) { 0x1799544d, &ASU_322, "-3m" }, // -P 3 2 (z,x,y) { 0x1c80e47a, &ASU_32A, "-3m" }, // -P 3* 2 { 0xea7284da, &ASU_32B, "-3m" }, // -P 3* 2 (-x,y,z) { 0xb193db73, &ASU_32C, "-3m" }, // -P 3* 2 (x,-y,z) { 0x04fecdf9, &ASU_32D, "-3m" }, // -P 3* 2 (-x,-y,z) { 0xfc3edafb, &ASU_32U, "-3m" }, // -P 3 2" { 0xd60d11a0, &ASU_32V, "-3m" }, // -P 3 2" (z,x,y) { 0xf7d5112f, &ASU_32W, "-3m" }, // -P 3 2" (y,z,x) { 0xfbb8f18b, &ASU_32X, "-3m" }, // -P 3 2" (-x,y,z) { 0x530fcba9, &ASU_32Y, "-3m" }, // -P 3 2" (z,-x,y) { 0xa3d49592, &ASU_32Z, "-3m" }, // -P 3 2" (y,z,-x) { 0x7f473453, &ASU_114, "4/m" }, // -P 4 { 0x081d78e5, &ASU_141, "4/m" }, // -P 4 (y,z,x) { 0x6a9fa6e5, &ASU_411, "4/m" }, // -P 4 (z,x,y) { 0xb8f2113e, &ASU_224, "4/mmm" }, // -P 4 2 { 0xb9ce4369, &ASU_242, "4/mmm" }, // -P 4 2 (y,z,x) { 0xc39787b7, &ASU_422, "4/mmm" }, // -P 4 2 (z,x,y) { 0x32dacfb6, &ASU_114, "6/m" }, // -P 6 { 0xe7987b0c, &ASU_141, "6/m" }, // -P 6 (y,z,x) { 0xb5b69658, &ASU_411, "6/m" }, // -P 6 (z,x,y) { 0xf1fc7952, &ASU_224, "6/mmm" }, // -P 6 2 { 0x386f0ab4, &ASU_242, "6/mmm" }, // -P 6 2 (y,z,x) { 0xcd531b66, &ASU_422, "6/mmm" }, // -P 6 2 (z,x,y) { 0x72e55913, &ASU_M3B, "m-3" }, // -P 2 2 3 { 0x74c407d3, &ASU_M3M, "m-3m" } // -P 4 2 3 }; int lgdata_size = sizeof( lgdata ) / sizeof( lgdata[0] ); // From Hall & Grosse-Kunstleve, 'Concise Space group symbols' SGdata sgdata[] = { {0xc704dd7b,"P 1" ,"P 1" ,' ', 1}, {0x2df60a45,"-P 1" ,"P -1" ,' ', 2}, {0x902cf668,"P 2y" ,"P 1 2 1" ,' ', 3}, {0x90a34743,"P 2" ,"P 1 1 2" ,' ', 3}, {0x9b02bfbf,"P 2x" ,"P 2 1 1" ,' ', 3}, {0xda168154,"P 2yb" ,"P 1 21 1" ,' ', 4}, {0x7851c0d1,"P 2c" ,"P 1 1 21" ,' ', 4}, {0xae0e24db,"P 2xa" ,"P 21 1 1" ,' ', 4}, {0xdeb5173b,"C 2y" ,"C 1 2 1" ,' ', 5}, {0x1e4dbca6,"A 2y" ,"A 1 2 1" ,' ', 5}, {0x6042abb6,"I 2y" ,"I 1 2 1" ,' ', 5}, {0x2a55a450,"A 2" ,"A 1 1 2" ,' ', 5}, {0x458c0b8c,"B 2" ,"B 1 1 2" ,' ', 5}, {0x545ab340,"I 2" ,"I 1 1 2" ,' ', 5}, {0xc4ef9a2d,"B 2x" ,"B 2 1 1" ,' ', 5}, {0x6bce9e6c,"C 2x" ,"C 2 1 1" ,' ', 5}, {0xd53922e1,"I 2x" ,"I 2 1 1" ,' ', 5}, {0x93121e4d,"P -2y" ,"P 1 m 1" ,' ', 6}, {0x939daf66,"P -2" ,"P 1 1 m" ,' ', 6}, {0x6dd7504b,"P -2x" ,"P m 1 1" ,' ', 6}, {0x7be099df,"P -2yc" ,"P 1 c 1" ,' ', 7}, {0x4eec02bb,"P -2yac" ,"P 1 n 1" ,' ', 7}, {0xa61e8529,"P -2ya" ,"P 1 a 1" ,' ', 7}, {0xa6913402,"P -2a" ,"P 1 1 a" ,' ', 7}, {0xecab433e,"P -2ab" ,"P 1 1 n" ,' ', 7}, {0xd9a7d85a,"P -2b" ,"P 1 1 b" ,' ', 7}, {0x27ed2777,"P -2xb" ,"P b 1 1" ,' ', 7}, {0x2ac91f43,"P -2xbc" ,"P n 1 1" ,' ', 7}, {0x8525d7d9,"P -2xc" ,"P c 1 1" ,' ', 7}, {0x77b286e1,"C -2y" ,"C 1 m 1" ,' ', 8}, {0xb74a2d7c,"A -2y" ,"A 1 m 1" ,' ', 8}, {0xc9453a6c,"I -2y" ,"I 1 m 1" ,' ', 8}, {0x8352358a,"A -2" ,"A 1 1 m" ,' ', 8}, {0xec8b9a56,"B -2" ,"B 1 1 m" ,' ', 8}, {0xfd5d229a,"I -2" ,"I 1 1 m" ,' ', 8}, {0xddc257bb,"B -2x" ,"B m 1 1" ,' ', 8}, {0x72e353fa,"C -2x" ,"C m 1 1" ,' ', 8}, {0xcc14ef77,"I -2x" ,"I m 1 1" ,' ', 8}, {0x38ef08aa,"C -2yc" ,"C 1 c 1" ,' ', 9}, {0x54faf6d0,"A -2yac" ,"A 1 n 1" ,' ', 9}, {0x9d54258d,"I -2ya" ,"I 1 a 1" ,' ', 9}, {0xe35b329d,"A -2ya" ,"A 1 a 1" ,' ', 9}, {0x6cfe174b,"C -2ybc" ,"C 1 n 1" ,' ', 9}, {0x2af5e1c0,"I -2yc" ,"I 1 c 1" ,' ', 9}, {0xd7432a6b,"A -2a" ,"A 1 1 a" ,' ', 9}, {0x0f3b41fa,"B -2bc" ,"B 1 1 n" ,' ', 9}, {0x4afce6d7,"I -2b" ,"I 1 1 b" ,' ', 9}, {0x5b2a5e1b,"B -2b" ,"B 1 1 b" ,' ', 9}, {0x60e2ee26,"A -2ac" ,"A 1 1 n" ,' ', 9}, {0xa94c3d7b,"I -2a" ,"I 1 1 a" ,' ', 9}, {0x6a6393f6,"B -2xb" ,"B b 1 1" ,' ', 9}, {0x69afc250,"C -2xbc" ,"C n 1 1" ,' ', 9}, {0x2fa434db,"I -2xc" ,"I c 1 1" ,' ', 9}, {0x3dbeddb1,"C -2xc" ,"C c 1 1" ,' ', 9}, {0x3e728c17,"B -2xbc" ,"B n 1 1" ,' ', 9}, {0x7bb52b3a,"I -2xb" ,"I b 1 1" ,' ', 9}, {0x068dfeb3,"-P 2y" ,"P 1 2/m 1" ,' ', 10}, {0x9b92779f,"-P 2" ,"P 1 1 2/m" ,' ', 10}, {0xb08d46cf,"-P 2x" ,"P 2/m 1 1" ,' ', 10}, {0x54fa8558,"-P 2yb" ,"P 1 21/m 1",' ', 11}, {0x31194672,"-P 2c" ,"P 1 1 21/m",' ', 11}, {0xce8251df,"-P 2xa" ,"P 21/m 1 1",' ', 11}, {0x09efdd05,"-C 2y" ,"C 1 2/m 1" ,' ', 12}, {0x8e118804,"-A 2y" ,"A 1 2/m 1" ,' ', 12}, {0x5c5d4c9f,"-I 2y" ,"I 1 2/m 1" ,' ', 12}, {0x5a48cc10,"-A 2" ,"A 1 1 2/m" ,' ', 12}, {0x97e84b5c,"-B 2" ,"B 1 1 2/m" ,' ', 12}, {0x8804088b,"-I 2" ,"I 1 1 2/m" ,' ', 12}, {0x05a3ecad,"-B 2x" ,"B 2/m 1 1" ,' ', 12}, {0x4ffd3ee0,"-C 2x" ,"C 2/m 1 1" ,' ', 12}, {0x1a4faf7a,"-I 2x" ,"I 2/m 1 1" ,' ', 12}, {0xac06cf5e,"-P 2yc" ,"P 1 2/c 1" ,' ', 13}, {0xf817d0bf,"-P 2yac" ,"P 1 2/n 1" ,' ', 13}, {0x529ce152,"-P 2ya" ,"P 1 2/a 1" ,' ', 13}, {0xcf83687e,"-P 2a" ,"P 1 1 2/a" ,' ', 13}, {0x9df41395,"-P 2ab" ,"P 1 1 2/n" ,' ', 13}, {0xc9e50c74,"-P 2b" ,"P 1 1 2/b" ,' ', 13}, {0x4aada62e,"-P 2xb" ,"P 2/b 1 1" ,' ', 13}, {0xf45a1aa3,"-P 2xbc" ,"P 2/n 1 1" ,' ', 13}, {0xe58ca26f,"-P 2xc" ,"P 2/c 1 1" ,' ', 13}, {0x41572403,"-P 2ybc" ,"P 1 21/c 1",' ', 14}, {0x15463be2,"-P 2yn" ,"P 1 21/n 1",' ', 14}, {0x00eb9ab9,"-P 2yab" ,"P 1 21/a 1",' ', 14}, {0x65085993,"-P 2ac" ,"P 1 1 21/a",' ', 14}, {0x8859b2ce,"-P 2n" ,"P 1 1 21/n",' ', 14}, {0xdc48ad2f,"-P 2bc" ,"P 1 1 21/b",' ', 14}, {0x34a2b13e,"-P 2xab" ,"P 21/b 1 1",' ', 14}, {0x8a550db3,"-P 2xn" ,"P 21/n 1 1",' ', 14}, {0x9b83b57f,"-P 2xac" ,"P 21/c 1 1",' ', 14}, {0x673d531e,"-C 2yc" ,"C 1 2/c 1" ,' ', 15}, {0x428e62a8,"-A 2yac" ,"A 1 2/n 1" ,' ', 15}, {0xb7f841ea,"-I 2ya" ,"I 1 2/a 1" ,' ', 15}, {0x65b48571,"-A 2ya" ,"A 1 2/a 1" ,' ', 15}, {0x8c985e6b,"-C 2ybc" ,"C 1 2/n 1" ,' ', 15}, {0x90c2a633,"-I 2yc" ,"I 1 2/c 1" ,' ', 15}, {0xb1edc165,"-A 2a" ,"A 1 1 2/a" ,' ', 15}, {0x5b77a1f0,"-B 2bc" ,"B 1 1 2/n" ,' ', 15}, {0xaf3eef52,"-I 2b" ,"I 1 1 2/b" ,' ', 15}, {0xb0d2ac85,"-B 2b" ,"B 1 1 2/b" ,' ', 15}, {0x96d726bc,"-A 2ac" ,"A 1 1 2/n" ,' ', 15}, {0x63a105fe,"-I 2a" ,"I 1 1 2/a" ,' ', 15}, {0xe4301506,"-B 2xb" ,"B 2/b 1 1" ,' ', 15}, {0xaecdc717,"-C 2xbc" ,"C 2/n 1 1" ,' ', 15}, {0x62f43297,"-I 2xc" ,"I 2/c 1 1" ,' ', 15}, {0x37e5a351,"-C 2xc" ,"C 2/c 1 1" ,' ', 15}, {0x7d187140,"-B 2xbc" ,"B 2/n 1 1" ,' ', 15}, {0xfbdc56d1,"-I 2xb" ,"I 2/b 1 1" ,' ', 15}, {0xa959fc0b,"P 2 2" ,"P 2 2 2" ,' ', 16}, {0x03d2cde6,"P 2c 2" ,"P 2 2 21" ,' ', 17}, {0xd756eb1b,"P 2a 2a" ,"P 21 2 2" ,' ', 17}, {0x010e6701,"P 2 2b" ,"P 2 21 2" ,' ', 17}, {0x2b106ff0,"P 2 2ab" ,"P 21 21 2" ,' ', 18}, {0xee8326bb,"P 2bc 2" ,"P 2 21 21" ,' ', 18}, {0x82570fbb,"P 2ac 2ac" ,"P 21 2 21" ,' ', 18}, {0x8f7a6eec,"P 2ac 2ab" ,"P 21 21 21",' ', 19}, {0xd3dceae0,"C 2c 2" ,"C 2 2 21" ,' ', 20}, {0xa3d855bc,"A 2a 2a" ,"A 21 2 2" ,' ', 20}, {0x31f9a8c4,"B 2 2b" ,"B 2 21 2" ,' ', 20}, {0xbd0e64fb,"C 2 2" ,"C 2 2 2" ,' ', 21}, {0x3af031fa,"A 2 2" ,"A 2 2 2" ,' ', 21}, {0xf750b6b6,"B 2 2" ,"B 2 2 2" ,' ', 21}, {0x8a25cd68,"F 2 2" ,"F 2 2 2" ,' ', 22}, {0xe8bcf561,"I 2 2" ,"I 2 2 2" ,' ', 23}, {0x7ba265f9,"I 2b 2c" ,"I 21 21 21",' ', 24}, {0x715a8a38,"P 2 -2" ,"P m m 2" ,' ', 25}, {0x34467527,"P -2 2" ,"P 2 m m" ,' ', 25}, {0x454292ce,"P -2 -2" ,"P m 2 m" ,' ', 25}, {0xdbd1bbd5,"P 2c -2" ,"P m c 21" ,' ', 26}, {0x8ed05f75,"P 2c -2c" ,"P c m 21" ,' ', 26}, {0x1e587dd6,"P -2a 2a" ,"P 21 m a" ,' ', 26}, {0x4a496237,"P -2 2a" ,"P 21 a m" ,' ', 26}, {0xed1509c4,"P -2 -2b" ,"P b 21 m" ,' ', 26}, {0x1735e925,"P -2b -2" ,"P m 21 b" ,' ', 26}, {0x245b6e98,"P 2 -2c" ,"P c c 2" ,' ', 27}, {0x60576ac6,"P -2a 2" ,"P 2 a a" ,' ', 27}, {0xbf62722f,"P -2b -2b" ,"P b 2 b" ,' ', 27}, {0x0f559d28,"P 2 -2a" ,"P m a 2" ,' ', 28}, {0x8b7a6ad9,"P 2 -2b" ,"P b m 2" ,' ', 28}, {0x66310ecc,"P -2b 2" ,"P 2 m b" ,' ', 28}, {0x9ecd44ca,"P -2c 2" ,"P 2 c m" ,' ', 28}, {0x1043766e,"P -2c -2c" ,"P c 2 m" ,' ', 28}, {0x3b4d85de,"P -2a -2a" ,"P m 2 a" ,' ', 28}, {0xf0df4865,"P 2c -2ac" ,"P c a 21" ,' ', 29}, {0xc427e492,"P 2c -2b" ,"P b c 21" ,' ', 29}, {0x183e19dc,"P -2b 2a" ,"P 21 a b" ,' ', 29}, {0xb4d34c3b,"P -2ac 2a" ,"P 21 c a" ,' ', 29}, {0xa7e2b223,"P -2bc -2c" ,"P c 21 b" ,' ', 29}, {0x931a1ed4,"P -2a -2ab" ,"P b 21 a" ,' ', 29}, {0x358dd654,"P 2 -2bc" ,"P n c 2" ,' ', 30}, {0x5a547988,"P 2 -2ac" ,"P c n 2" ,' ', 30}, {0xcadc5b2b,"P -2ac 2" ,"P 2 n a" ,' ', 30}, {0x3220112d,"P -2ab 2" ,"P 2 a n" ,' ', 30}, {0xc16d653f,"P -2ab -2ab" ,"P b 2 n" ,' ', 30}, {0x0195cea2,"P -2bc -2bc" ,"P n 2 b" ,' ', 30}, {0x8fc0a434,"P 2ac -2" ,"P m n 21" ,' ', 31}, {0x72570ce4,"P 2bc -2bc" ,"P n m 21" ,' ', 31}, {0xb60fe6dc,"P -2ab 2ab" ,"P 21 m n" ,' ', 31}, {0x1f488697,"P -2 2ac" ,"P 21 n m" ,' ', 31}, {0x464f1412,"P -2 -2bc" ,"P n 21 m" ,' ', 31}, {0x4324f6c4,"P -2ab -2" ,"P m 21 n" ,' ', 31}, {0xf5757dc9,"P 2 -2ab" ,"P b a 2" ,' ', 32}, {0x739caf97,"P -2bc 2" ,"P 2 c b" ,' ', 32}, {0x6e4c617e,"P -2ac -2ac" ,"P c 2 a" ,' ', 32}, {0x04df4f0f,"P 2c -2n" ,"P n a 21" ,' ', 33}, {0xba28f382,"P 2c -2ab" ,"P b n 21" ,' ', 33}, {0x0d93b887,"P -2bc 2a" ,"P 21 n b" ,' ', 33}, {0x5982a766,"P -2n 2a" ,"P 21 c n" ,' ', 33}, {0xd9eda533,"P -2n -2ac" ,"P c 21 n" ,' ', 33}, {0xc83b1dff,"P -2ac -2n" ,"P n 21 a" ,' ', 33}, {0x4b82c144,"P 2 -2n" ,"P n n 2" ,' ', 34}, {0x278db076,"P -2n 2" ,"P 2 n n" ,' ', 34}, {0x7f9ad9b2,"P -2n -2n" ,"P n 2 n" ,' ', 34}, {0x93d6f19f,"C 2 -2" ,"C m m 2" ,' ', 35}, {0xeea975ee,"A -2 2" ,"A 2 m m" ,' ', 35}, {0xb633cb54,"B -2 -2" ,"B m 2 m" ,' ', 35}, {0xfd047f84,"C 2c -2" ,"C m c 21" ,' ', 36}, {0x851ce235,"C 2c -2c" ,"C c m 21" ,' ', 36}, {0x9c241cdd,"A -2a 2a" ,"A 21 m a" ,' ', 36}, {0x778111a8,"A -2 2a" ,"A 21 a m" ,' ', 36}, {0x709ad526,"B -2 -2b" ,"B b 21 m" ,' ', 36}, {0x91092c8d,"B -2b -2" ,"B m 21 b" ,' ', 36}, {0xebce6c2e,"C 2 -2c" ,"C c c 2" ,' ', 37}, {0x050c789b,"A -2a 2" ,"A 2 a a" ,' ', 37}, {0x57a032ff,"B -2b -2b" ,"B b 2 b" ,' ', 37}, {0x1428a49e,"A 2 -2" ,"A m m 2" ,' ', 38}, {0xd98823d2,"B 2 -2" ,"B m m 2" ,' ', 38}, {0x2309f2a2,"B -2 2" ,"B 2 m m" ,' ', 38}, {0x695720ef,"C -2 2" ,"C 2 m m" ,' ', 38}, {0xfc6d1919,"C -2 -2" ,"C m 2 m" ,' ', 38}, {0x7b934c18,"A -2 -2" ,"A m 2 m" ,' ', 38}, {0xf5bb5d35,"A 2 -2c" ,"A b m 2" ,' ', 39}, {0x40a04794,"B 2 -2c" ,"B m a 2" ,' ', 39}, {0xc8acffd7,"B -2c 2" ,"B 2 c m" ,' ', 39}, {0x82f22d9a,"C -2b 2" ,"C 2 m b" ,' ', 39}, {0x65457d5f,"C -2b -2b" ,"C m 2 a" ,' ', 39}, {0x9a00b5b3,"A -2c -2c" ,"A c 2 m" ,' ', 39}, {0x8d00c0d8,"A 2 -2a" ,"A m a 2" ,' ', 40}, {0x381bda79,"B 2 -2b" ,"B b m 2" ,' ', 40}, {0x0433157b,"B -2b 2" ,"B 2 m b" ,' ', 40}, {0x0785aef4,"C -2c 2" ,"C 2 c m" ,' ', 40}, {0x847584a8,"C -2c -2c" ,"C c 2 m" ,' ', 40}, {0xe2bb285e,"A -2a -2a" ,"A m 2 a" ,' ', 40}, {0x6c933973,"A 2 -2ac" ,"A b a 2" ,' ', 41}, {0xa133be3f,"B 2 -2bc" ,"B b a 2" ,' ', 41}, {0xef96180e,"B -2bc 2" ,"B 2 c b" ,' ', 41}, {0xec20a381,"C -2bc 2" ,"C 2 c b" ,' ', 41}, {0x1d5de0ee,"C -2bc -2bc" ,"C c 2 a" ,' ', 41}, {0x0328d1f5,"A -2ac -2ac" ,"A c 2 a" ,' ', 41}, {0x18172b53,"F 2 -2" ,"F m m 2" ,' ', 42}, {0xad1a17db,"F -2 2" ,"F 2 m m" ,' ', 42}, {0xa88fc3e9,"F -2 -2" ,"F m 2 m" ,' ', 42}, {0x921865a5,"F 2 -2d" ,"F d d 2" ,' ', 43}, {0x1b59dbd3,"F -2d 2" ,"F 2 d d" ,' ', 43}, {0x22808d1f,"F -2d -2d" ,"F d 2 d" ,' ', 43}, {0xc6646005,"I 2 -2" ,"I m m 2" ,' ', 44}, {0x3ce5b175,"I -2 2" ,"I 2 m m" ,' ', 44}, {0xa9df8883,"I -2 -2" ,"I m 2 m" ,' ', 44}, {0xbedffde8,"I 2 -2c" ,"I b a 2" ,' ', 45}, {0xd740bc00,"I -2a 2" ,"I 2 c b" ,' ', 45}, {0x484c7128,"I -2b -2b" ,"I c 2 a" ,' ', 45}, {0x5f4c0443,"I 2 -2a" ,"I m a 2" ,' ', 46}, {0x27f799ae,"I 2 -2b" ,"I b m 2" ,' ', 46}, {0x1bdf56ac,"I -2b 2" ,"I 2 m b" ,' ', 46}, {0xf07a5bd9,"I -2c 2" ,"I 2 c m" ,' ', 46}, {0xd164156e,"I -2c -2c" ,"I c 2 m" ,' ', 46}, {0x30f7ecc5,"I -2a -2a" ,"I m 2 a" ,' ', 46}, {0xe7243bbc,"-P 2 2" ,"P m m m" ,' ', 47}, {0x51e85b6c,"P 2 2 -1n" ,"P n n n" ,'1', 48}, {0x78ff5b81,"-P 2ab 2bc" ,"P n n n" ,'2', 48}, {0x353736e5,"-P 2 2c" ,"P c c m" ,' ', 49}, {0x0c8136c9,"-P 2a 2" ,"P m a a" ,' ', 49}, {0x02b17898,"-P 2b 2b" ,"P b m b" ,' ', 49}, {0x1392524e,"P 2 2 -1ab" ,"P b a n" ,'1', 50}, {0xe91475ed,"-P 2ab 2b" ,"P b a n" ,'2', 50}, {0x4e9de450,"P 2 2 -1bc" ,"P n c b" ,'1', 50}, {0x935a56f4,"-P 2b 2bc" ,"P n c b" ,'2', 50}, {0x38bbae1f,"P 2 2 -1ac" ,"P c n a" ,'1', 50}, {0xde923b90,"-P 2a 2c" ,"P c n a" ,'2', 50}, {0x6179e0c6,"-P 2a 2a" ,"P m m a" ,' ', 51}, {0x2be88448,"-P 2b 2" ,"P m m b" ,' ', 51}, {0xce7dc76c,"-P 2 2b" ,"P b m m" ,' ', 51}, {0xb013e0d3,"-P 2c 2c" ,"P c m m" ,' ', 51}, {0x6200ed8a,"-P 2c 2" ,"P m c m" ,' ', 51}, {0x8adcedb3,"-P 2 2a" ,"P m a m" ,' ', 51}, {0xc514e0e2,"-P 2a 2bc" ,"P n n a" ,' ', 52}, {0xfea280fb,"-P 2b 2n" ,"P n n b" ,' ', 52}, {0x38e06b40,"-P 2n 2b" ,"P b n n" ,' ', 52}, {0x637980f3,"-P 2ab 2c" ,"P c n n" ,' ', 52}, {0x15078d8e,"-P 2ab 2n" ,"P n c n" ,' ', 52}, {0xa90b452c,"-P 2n 2bc" ,"P n a n" ,' ', 52}, {0x89a5e0ff,"-P 2ac 2" ,"P m n a" ,' ', 53}, {0x42ae4859,"-P 2bc 2bc" ,"P n m b" ,' ', 53}, {0x84eca3e2,"-P 2ab 2ab" ,"P b m n" ,' ', 53}, {0x58cfe0ea,"-P 2 2ac" ,"P c n m" ,' ', 53}, {0x2eb1ed97,"-P 2 2bc" ,"P n c m" ,' ', 53}, {0xc04d893d,"-P 2ab 2" ,"P m a n" ,' ', 53}, {0xb36aed9f,"-P 2a 2ac" ,"P c c a" ,' ', 54}, {0x88dc8d86,"-P 2b 2c" ,"P c c b" ,' ', 54}, {0x25d8ca19,"-P 2a 2b" ,"P b a a" ,' ', 54}, {0x5bb6eda6,"-P 2ac 2c" ,"P c a a" ,' ', 54}, {0xd3456635,"-P 2bc 2b" ,"P b c b" ,' ', 54}, {0x6f49ae97,"-P 2b 2ab" ,"P b a b" ,' ', 54}, {0xa3851163,"-P 2 2ab" ,"P b a m" ,' ', 55}, {0x8b3b9e72,"-P 2bc 2" ,"P m c b" ,' ', 55}, {0x364e3ba9,"-P 2ac 2ac" ,"P c m a" ,' ', 55}, {0x0e8156fc,"-P 2ab 2ac" ,"P c c n" ,' ', 56}, {0x31173243,"-P 2ac 2bc" ,"P n a a" ,' ', 56}, {0xbebdb03a,"-P 2bc 2ab" ,"P b n b" ,' ', 56}, {0x3a7e15cd,"-P 2c 2b" ,"P b c m" ,' ', 57}, {0xddeb36dc,"-P 2c 2ac" ,"P c a m" ,' ', 57}, {0xe45d36f0,"-P 2ac 2a" ,"P m c a" ,' ', 57}, {0x46105247,"-P 2b 2a" ,"P m a b" ,' ', 57}, {0x48201c16,"-P 2a 2ab" ,"P b m a" ,' ', 57}, {0x280f97bc,"-P 2bc 2c" ,"P c m b" ,' ', 57}, {0x43493b98,"-P 2 2n" ,"P n n m" ,' ', 58}, {0x609e9307,"-P 2n 2" ,"P m n n" ,' ', 58}, {0xc4f39323,"-P 2n 2n" ,"P n m n" ,' ', 58}, {0x57337891,"P 2 2ab -1ab" ,"P m m n" ,'1', 59}, {0xadb55f32,"-P 2ab 2a" ,"P m m n" ,'2', 59}, {0x2282419e,"P 2bc 2 -1bc" ,"P n m m" ,'1', 59}, {0xdab23f36,"-P 2c 2bc" ,"P n m m" ,'2', 59}, {0xe9d1ae0a,"P 2ac 2ac -1ac" ,"P m n m" ,'1', 59}, {0x0ff83b85,"-P 2c 2a" ,"P m n m" ,'2', 59}, {0x5518bd4f,"-P 2n 2ab" ,"P b c n" ,' ', 60}, {0xc3aa9ac9,"-P 2n 2c" ,"P c a n" ,' ', 60}, {0xa8ec36ed,"-P 2a 2n" ,"P n c a" ,' ', 60}, {0x2f569e56,"-P 2bc 2n" ,"P n a b" ,' ', 60}, {0xd1db18b8,"-P 2ac 2b" ,"P b n a" ,' ', 60}, {0xe5245b89,"-P 2b 2ac" ,"P c n b" ,' ', 60}, {0xbc23ceb7,"-P 2ac 2ab" ,"P b c a" ,' ', 61}, {0x45f741b3,"-P 2bc 2ac" ,"P c a b" ,' ', 61}, {0x5cefe44c,"-P 2ac 2n" ,"P n m a" ,' ', 62}, {0xe6c3487d,"-P 2bc 2a" ,"P m n b" ,' ', 62}, {0x5786c3c2,"-P 2c 2ab" ,"P b n m" ,' ', 62}, {0xae524cc6,"-P 2n 2ac" ,"P c m n" ,' ', 62}, {0x0d664508,"-P 2n 2a" ,"P m c n" ,' ', 62}, {0xb74ae939,"-P 2c 2n" ,"P n a m" ,' ', 62}, {0xc0dd6737,"-C 2c 2" ,"C m c m" ,' ', 63}, {0xa4e78801,"-C 2c 2c" ,"C c m m" ,' ', 63}, {0x637ac153,"-A 2a 2a" ,"A m m a" ,' ', 63}, {0x7af93f9c,"-A 2 2a" ,"A m a m" ,' ', 63}, {0x5ea5920d,"-B 2 2b" ,"B b m m" ,' ', 63}, {0xdf056b84,"-B 2b 2" ,"B m m b" ,' ', 63}, {0xd95e99f8,"-C 2bc 2" ,"C m c a" ,' ', 64}, {0x014f7f4e,"-C 2bc 2bc" ,"C c m b" ,' ', 64}, {0xe2da38da,"-A 2ac 2ac" ,"A b m a" ,' ', 64}, {0x3e8a450b,"-A 2 2ac" ,"A c a m" ,' ', 64}, {0xe28e9b8d,"-B 2 2bc" ,"B b c m" ,' ', 64}, {0xc686954b,"-B 2bc 2" ,"B m a b" ,' ', 64}, {0xcc263714,"-C 2 2" ,"C m m m" ,' ', 65}, {0xc6d2361c,"-A 2 2" ,"A m m m" ,' ', 65}, {0x1ad6e89a,"-B 2 2" ,"B m m m" ,' ', 65}, {0xa81cd822,"-C 2 2c" ,"C c c m" ,' ', 66}, {0xdf51c8d3,"-A 2a 2" ,"A m a a" ,' ', 66}, {0x9b761113,"-B 2b 2b" ,"B b m b" ,' ', 66}, {0xd5a5c9db,"-C 2b 2" ,"C m m a" ,' ', 67}, {0x698ec05b,"-C 2b 2b" ,"C m m b" ,' ', 67}, {0x4772cf95,"-A 2c 2c" ,"A b m m" ,' ', 67}, {0x82a14c8b,"-A 2 2c" ,"A c m m" ,' ', 67}, {0xa6fde11a,"-B 2 2c" ,"B m c m" ,' ', 67}, {0x03551655,"-B 2c 2" ,"B m a m" ,' ', 67}, {0xd12ab103,"C 2 2 -1bc" ,"C c c a" ,'1', 68}, {0x0db42f6d,"-C 2b 2bc" ,"C c c a" ,'2', 68}, {0xd12ab103,"C 2 2 -1bc" ,"C c c b" ,'1', 68}, {0xb19f26ed,"-C 2b 2c" ,"C c c b" ,'2', 68}, {0x6a64cf1d,"A 2 2 -1ac" ,"A b a a" ,'1', 68}, {0x9b22b244,"-A 2a 2c" ,"A b a a" ,'2', 68}, {0x6a64cf1d,"A 2 2 -1ac" ,"A c a a" ,'1', 68}, {0x5ef1315a,"-A 2ac 2c" ,"A c a a" ,'2', 68}, {0xb660119b,"B 2 2 -1bc" ,"B b c b" ,'1', 68}, {0x82f5efdc,"-B 2bc 2b" ,"B b c b" ,'2', 68}, {0xb660119b,"B 2 2 -1bc" ,"B b a b" ,'1', 68}, {0x275d1893,"-B 2b 2bc" ,"B b a b" ,'2', 68}, {0xcd91580e,"-F 2 2" ,"F m m m" ,' ', 69}, {0xd31c4512,"F 2 2 -1d" ,"F d d d" ,'1', 70}, {0xc3fdc94f,"-F 2uv 2vw" ,"F d d d" ,'2', 70}, {0x4a8ca5fc,"-I 2 2" ,"I m m m" ,' ', 71}, {0xb2d4d6eb,"-I 2 2c" ,"I b a m" ,' ', 72}, {0x530f5b33,"-I 2a 2" ,"I m c b" ,' ', 72}, {0xcb2c5c75,"-I 2b 2b" ,"I c m a" ,' ', 72}, {0x770755f5,"-I 2b 2c" ,"I b c a" ,' ', 73}, {0x177c21a4,"-I 2a 2b" ,"I c a b" ,' ', 73}, {0x8f5f26e2,"-I 2b 2" ,"I m m a" ,' ', 74}, {0xef2452b3,"-I 2a 2a" ,"I m m b" ,' ', 74}, {0x6e84ab3a,"-I 2c 2c" ,"I b m m" ,' ', 74}, {0x0effdf6b,"-I 2 2b" ,"I c m m" ,' ', 74}, {0xf6a7ac7c,"-I 2 2a" ,"I m c m" ,' ', 74}, {0x96dcd82d,"-I 2c 2" ,"I m a m" ,' ', 74}, {0xe194247e,"P 4" ,"P 4" ,' ', 75}, {0xeb09f6d0,"P 4w" ,"P 41" ,' ', 76}, {0x1e1ef133,"P 4c" ,"P 42" ,' ', 77}, {0x21968a94,"P 4cw" ,"P 43" ,' ', 78}, {0x8d2db265,"I 4" ,"I 4" ,' ', 79}, {0x04c2f7b9,"I 4bw" ,"I 41" ,' ', 80}, {0x5b1380ec,"P -4" ,"P -4" ,' ', 81}, {0x429018fc,"I -4" ,"I -4" ,' ', 82}, {0x7f473453,"-P 4" ,"P 4/m" ,' ', 83}, {0x07df08e7,"-P 4c" ,"P 42/m" ,' ', 84}, {0x8d9739ab,"P 4ab -1ab" ,"P 4/n" ,'1', 85}, {0x28870b39,"-P 4a" ,"P 4/n" ,'2', 85}, {0xda4091d2,"P 4n -1n" ,"P 42/n" ,'1', 86}, {0xcfc232bb,"-P 4bc" ,"P 42/n" ,'2', 86}, {0xe426791e,"-I 4" ,"I 4/m" ,' ', 87}, {0xdd05fe66,"I 4bw -1bw" ,"I 41/a" ,'1', 88}, {0xf5a09fa3,"-I 4ad" ,"I 41/a" ,'2', 88}, {0x781566a5,"P 4 2" ,"P 4 2 2" ,' ', 89}, {0x529dbafe,"P 4ab 2ab" ,"P 4 21 2" ,' ', 90}, {0x1129373c,"P 4w 2c" ,"P 41 2 2" ,' ', 91}, {0x7abbc4b0,"P 4abw 2nw" ,"P 41 21 2" ,' ', 92}, {0x00a13651,"P 4c 2" ,"P 42 2 2" ,' ', 93}, {0xb11a4eb4,"P 4n 2n" ,"P 42 21 2" ,' ', 94}, {0xc507cd54,"P 4cw 2c" ,"P 43 2 2" ,' ', 95}, {0x5af2c5d9,"P 4nw 2abw" ,"P 43 21 2" ,' ', 96}, {0xcc0e6dad,"I 4 2" ,"I 4 2 2" ,' ', 97}, {0xac45c901,"I 4bw 2bw" ,"I 41 2 2" ,' ', 98}, {0x93373957,"P 4 -2" ,"P 4 m m" ,' ', 99}, {0xd7961388,"P 4 -2ab" ,"P 4 b m" ,' ',100}, {0x53dd13c8,"P 4c -2c" ,"P 42 c m" ,' ',101}, {0x25fb5987,"P 4n -2n" ,"P 42 n m" ,' ',102}, {0x4124340e,"P 4 -2c" ,"P 4 c c" ,' ',103}, {0x375a3973,"P 4 -2n" ,"P 4 n c" ,' ',104}, {0x81ce1e91,"P 4c -2" ,"P 42 m c" ,' ',105}, {0x5b8d5c98,"P 4c -2ab" ,"P 42 b c" ,' ',106}, {0xd27b6f7f,"I 4 -2" ,"I 4 m m" ,' ',107}, {0x2a231c68,"I 4 -2c" ,"I 4 c m" ,' ',108}, {0x6ee4a2b9,"I 4bw -2" ,"I 41 m d" ,' ',109}, {0xf0719502,"I 4bw -2c" ,"I 41 c d" ,' ',110}, {0xae367c74,"P -4 2" ,"P -4 2 m" ,' ',111}, {0xc47b0b46,"P -4 2c" ,"P -4 2 c" ,' ',112}, {0x84bea02f,"P -4 2ab" ,"P -4 21 m" ,' ',113}, {0x67395465,"P -4 2n" ,"P -4 21 c" ,' ',114}, {0xd50d13d5,"P -4 -2" ,"P -4 m 2" ,' ',115}, {0x3a48de91,"P -4 -2c" ,"P -4 c 2" ,' ',116}, {0x00b4acac,"P -4 -2ab" ,"P -4 b 2" ,' ',117}, {0xf7b01eef,"P -4 -2n" ,"P -4 n 2" ,' ',118}, {0x7a127a20,"I -4 -2" ,"I -4 m 2" ,' ',119}, {0xc66b145c,"I -4 -2c" ,"I -4 c 2" ,' ',120}, {0x93e9bb9a,"I -4 2" ,"I -4 2 m" ,' ',121}, {0xf3a21f36,"I -4 2bw" ,"I -4 2 d" ,' ',122}, {0xb8f2113e,"-P 4 2" ,"P 4/m m m" ,' ',123}, {0x2de869d5,"-P 4 2c" ,"P 4/m c c" ,' ',124}, {0xb7fa689e,"P 4 2 -1ab" ,"P 4/n b m" ,'1',125}, {0x026e1f11,"-P 4a 2b" ,"P 4/n b m" ,'2',125}, {0x08a4eb7f,"P 4 2 -1n" ,"P 4/n n c" ,'1',126}, {0x51368ca3,"-P 4a 2bc" ,"P 4/n n c" ,'2',126}, {0xd5a84150,"-P 4 2ab" ,"P 4/m b m" ,' ',127}, {0xf1b4f061,"-P 4 2n" ,"P 4/m n c" ,' ',128}, {0x81d6f60a,"P 4ab 2ab -1ab" ,"P 4/n m m" ,'1',129}, {0x6f344f7f,"-P 4a 2a" ,"P 4/n m m" ,'2',129}, {0x9aee9967,"P 4ab 2n -1ab" ,"P 4/n c c" ,'1',130}, {0x8d6a1517,"-P 4a 2ac" ,"P 4/n c c" ,'2',130}, {0x5a9858b3,"-P 4c 2" ,"P 42/m m c",' ',131}, {0xcf822058,"-P 4c 2c" ,"P 42/m c m",' ',132}, {0x00e9903a,"P 4n 2c -1n" ,"P 42/n b c",'1',133}, {0xf9df795b,"-P 4ac 2b" ,"P 42/n b c",'2',133}, {0xaad7368d,"P 4n 2 -1n" ,"P 42/n n m",'1',134}, {0xaa87eae9,"-P 4ac 2bc" ,"P 42/n n m",'2',134}, {0xa5c2e426,"-P 4c 2ab" ,"P 42/m b c",' ',135}, {0x53c72d93,"-P 4n 2n" ,"P 42/m n m",' ',136}, {0xe391d7d2,"P 4n 2n -1n" ,"P 42/n m c",'1',137}, {0x0685c5ce,"-P 4ac 2a" ,"P 42/n m c",'2',137}, {0xf8a9b8bf,"P 4n 2ab -1n" ,"P 42/n c m",'1',138}, {0xe4db9fa6,"-P 4ac 2ac" ,"P 42/n c m",'2',138}, {0x7a639eef,"-I 4 2" ,"I 4/m m m" ,' ',139}, {0xd7e16f02,"-I 4 2c" ,"I 4/m c m" ,' ',140}, {0xe12277ea,"I 4bw 2bw -1bw" ,"I 41/a m d",'1',141}, {0xb96409e0,"-I 4bd 2" ,"I 41/a m d",'2',141}, {0x8bdd8359,"I 4bw 2aw -1bw" ,"I 41/a c d",'1',142}, {0x08d64e97,"-I 4bd 2c" ,"I 41/a c d",'2',142}, {0x329c980e,"P 3" ,"P 3" ,' ',143}, {0x86dd212b,"P 31" ,"P 31" ,' ',144}, {0xd70a5f46,"P 32" ,"P 32" ,' ',145}, {0x8e4e25f8,"R 3" ,"R 3" ,'H',146}, {0xd5a0aa2d,"P 3*" ,"R 3" ,'R',146}, {0xfdd759b5,"-P 3" ,"P -3" ,' ',147}, {0xbe8d0d7f,"-R 3" ,"R -3" ,'H',148}, {0xd9a29bac,"-P 3*" ,"R -3" ,'R',148}, {0x65b7a72b,"P 3 2" ,"P 3 1 2" ,' ',149}, {0xc1840a7a,"P 3 2\"" ,"P 3 2 1" ,' ',150}, {0x97e2dfd5,"P 31 2c (0 0 1)" ,"P 31 1 2" ,' ',151}, {0x33d17284,"P 31 2\"" ,"P 31 2 1" ,' ',152}, {0xe39f36b4,"P 32 2c (0 0 -1)","P 32 1 2" ,' ',153}, {0x47ac9be5,"P 32 2\"" ,"P 32 2 1" ,' ',154}, {0x46ebee09,"R 3 2\"" ,"R 3 2" ,'H',155}, {0xa20b8591,"P 3* 2" ,"R 3 2" ,'R',155}, {0x9f4cffaa,"P 3 -2\"" ,"P 3 m 1" ,' ',156}, {0x39859b12,"P 3 -2" ,"P 3 1 m" ,' ',157}, {0xe04fe588,"P 3 -2\"c" ,"P 3 c 1" ,' ',158}, {0xec0db0dd,"P 3 -2c" ,"P 3 1 c" ,' ',159}, {0x6e32558c,"R 3 -2\"" ,"R 3 m" ,'H',160}, {0xb951b4f7,"P 3* -2" ,"R 3 m" ,'R',160}, {0xf7d1a830,"R 3 -2\"c" ,"R 3 c" ,'H',161}, {0x219be015,"P 3* -2n" ,"R 3 c" ,'R',161}, {0xf74c7f83,"-P 3 2" ,"P -3 1 m" ,' ',162}, {0x69dc2f41,"-P 3 2c" ,"P -3 1 c" ,' ',163}, {0xfc3edafb,"-P 3 2\"" ,"P -3 m 1" ,' ',164}, {0xe9d82a99,"-P 3 2\"c" ,"P -3 c 1" ,' ',165}, {0x6df507a9,"-R 3 2\"" ,"R -3 m" ,'H',166}, {0x1c80e47a,"-P 3* 2" ,"R -3 m" ,'R',166}, {0x9a7d09d3,"-R 3 2\"c" ,"R -3 c" ,'H',167}, {0xbb691c91,"-P 3* 2n" ,"R -3 c" ,'R',167}, {0xa2ddaf47,"P 6" ,"P 6" ,' ',168}, {0x81a2968a,"P 61" ,"P 61" ,' ',169}, {0x84b83b8b,"P 65" ,"P 65" ,' ',170}, {0x62d97e5d,"P 62" ,"P 62" ,' ',171}, {0xb22fefa7,"P 64" ,"P 64" ,' ',172}, {0xdddeb565,"P 6c" ,"P 63" ,' ',173}, {0x35eb6ccb,"P -6" ,"P -6" ,' ',174}, {0x32dacfb6,"-P 6" ,"P 6/m" ,' ',175}, {0x06c1ae99,"-P 6c" ,"P 63/m" ,' ',176}, {0x90230e5f,"P 6 2" ,"P 6 2 2" ,' ',177}, {0xeed642a2,"P 61 2 (0 0 -1)" ,"P 61 2 2" ,' ',178}, {0x891aeb21,"P 65 2 (0 0 1)" ,"P 65 2 2" ,' ',179}, {0x6f55448f,"P 62 2c (0 0 1)" ,"P 62 2 2" ,' ',180}, {0x655e4cd9,"P 64 2c (0 0 -1)","P 64 2 2" ,' ',181}, {0xa4386f70,"P 6c 2c" ,"P 63 2 2" ,' ',182}, {0x3b0a2d17,"P 6 -2" ,"P 6 m m" ,' ',183}, {0xb74f3653,"P 6 -2c" ,"P 6 c c" ,' ',184}, {0xf4d8e94d,"P 6c -2" ,"P 63 c m" ,' ',185}, {0x789df209,"P 6c -2c" ,"P 63 m c" ,' ',186}, {0xeeacb736,"P -6 2" ,"P -6 m 2" ,' ',187}, {0xfb4a4754,"P -6c 2" ,"P -6 c 2" ,' ',188}, {0x55b5be6a,"P -6 -2" ,"P -6 2 m" ,' ',189}, {0xcb25eea8,"P -6c -2c" ,"P -6 2 c" ,' ',190}, {0xf1fc7952,"-P 6 2" ,"P 6/m m m" ,' ',191}, {0x87f9e8ca,"-P 6 2c" ,"P 6/m c c" ,' ',192}, {0x1eb41bd9,"-P 6c 2" ,"P 63/m c m",' ',193}, {0x68b18a41,"-P 6c 2c" ,"P 63/m m c",' ',194}, {0x5843870d,"P 2 2 3" ,"P 2 3" ,' ',195}, {0x93e38c71,"F 2 2 3" ,"F 2 3" ,' ',196}, {0xdc4003c1,"I 2 2 3" ,"I 2 3" ,' ',197}, {0xf9e6a645,"P 2ac 2ab 3" ,"P 21 3" ,' ',198}, {0x7ec4457b,"I 2b 2c 3" ,"I 21 3" ,' ',199}, {0x72e55913,"-P 2 2 3" ,"P m -3" ,' ',200}, {0x265ce726,"P 2 2 3 -1n" ,"P n -3" ,'1',201}, {0xd419d8a3,"-P 2ab 2bc 3" ,"P n -3" ,'2',201}, {0x58320b8d,"-F 2 2 3" ,"F m -3" ,' ',202}, {0x7de7c89b,"F 2 2 3 -1d" ,"F d -3" ,'1',203}, {0x159ca8d3,"-F 2uv 2vw 3" ,"F d -3" ,'2',203}, {0xe23893df,"-I 2 2 3" ,"I m -3" ,' ',204}, {0x1d5f4d3f,"-P 2ac 2ab 3" ,"P a -3" ,' ',205}, {0x7ce42b66,"-I 2b 2c 3" ,"I a -3" ,' ',206}, {0x93a6edeb,"P 4 2 3" ,"P 4 3 2" ,' ',207}, {0xc55ae72a,"P 4n 2 3" ,"P 42 3 2" ,' ',208}, {0x25d65cf1,"F 4 2 3" ,"F 4 3 2" ,' ',209}, {0xddc15ef3,"F 4d 2 3" ,"F 41 3 2" ,' ',210}, {0x014b7ed2,"I 4 2 3" ,"I 4 3 2" ,' ',211}, {0x4bca2b34,"P 4acd 2ab 3" ,"P 43 3 2" ,' ',212}, {0x0e761d2d,"P 4bd 2ab 3" ,"P 41 3 2" ,' ',213}, {0xbb92b652,"I 4bd 2c 3" ,"I 41 3 2" ,' ',214}, {0x6fc31c7b,"P -4 2 3" ,"P -4 3 m" ,' ',215}, {0x09abdebe,"F -4 2 3" ,"F -4 3 m" ,' ',216}, {0x75d77c69,"I -4 2 3" ,"I -4 3 m" ,' ',217}, {0x393f16ba,"P -4n 2 3" ,"P -4 3 n" ,' ',218}, {0x0968710f,"F -4c 2 3" ,"F -4 3 c" ,' ',219}, {0xe2ed982e,"I -4bd 2c 3" ,"I -4 3 d" ,' ',220}, {0x74c407d3,"-P 4 2 3" ,"P m -3 m" ,' ',221}, {0xc5e3dd9f,"P 4 2 3 -1n" ,"P n -3 n" ,'1',222}, {0xc7e69ab6,"-P 4a 2bc 3" ,"P n -3 n" ,'2',222}, {0xbabd71c4,"-P 4n 2 3" ,"P m -3 n" ,' ',223}, {0x0b9aab88,"P 4n 2 3 -1n" ,"P n -3 m" ,'1',224}, {0xdbdb6bfc,"-P 4bc 2bc 3" ,"P n -3 m" ,'2',224}, {0x5225b614,"-F 4 2 3" ,"F m -3 m" ,' ',225}, {0x481e9f10,"-F 4c 2 3" ,"F m -3 c" ,' ',226}, {0x023a8184,"F 4d 2 3 -1d" ,"F d -3 m" ,'1',227}, {0x38f5e458,"-F 4vw 2vw 3" ,"F d -3 m" ,'2',227}, {0x82b6e512,"F 4d 2 3 -1cd" ,"F d -3 c" ,'1',228}, {0x4d325ad3,"-F 4cvw 2vw 3" ,"F d -3 c" ,'2',228}, {0x52045e84,"-I 4 2 3" ,"I m -3 m" ,' ',229}, {0x407de7c1,"-I 4bd 2c 3" ,"I a -3 d" ,' ',230} }; int sgdata_size = sizeof( sgdata ) / sizeof( sgdata[0] ); } // namespace data } // namespace clipper clipper-2.1/clipper/core/container_hkl.h0000644000374100011300000001515110363703537015316 00000000000000/*! \file lib/container_hkl.h Header file for Container versions of various objects */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_CONTAINER_HKL #define CLIPPER_CONTAINER_HKL #include "container_types.h" #include "hkl_data.h" namespace clipper { extern const HKL_info NullHKL_info; // class CHKL_data : public Container, public HKL_data { public: //! null constructor CHKL_data() {} //! constructor: inherit datalist and cell CHKL_data( Container& parent, const String name = "" ); //! initialiser: supply or inherit hkl list, and cell void init( const HKL_info& hkl_info, const Cell& cell ); //! initialiser: from spacegroup, cell, and HKL_sampling void init( const Spacegroup& spacegroup, const Cell& cell, const HKL_sampling& hkl_sampling ) { clipper::Message::message( clipper::Message_fatal("CHKL_data deprecated") ); } //! hierarchical update void update(); //! assignment operator: copies the data from another list HKL_data& operator =( const HKL_data& other ) { return ( dynamic_cast&>(*this) = other ); } //! assignment operator: assigns a single value to the whole list HKL_data& operator =( const T& value ) { return ( dynamic_cast&>(*this) = value ); } }; // template implementations /*! The object is constructed at the given location in the hierarchy. An attempt is made to initialise the object using information from its parents in the hierarchy. \param parent An object in the hierarchy (usually the parent of the new object). \param name The path from \c parent to the new object (usually just the name of the new object). */ template CHKL_data::CHKL_data( Container& parent, const String name ) : Container( parent, name ) { init( NullHKL_info, NullCell ); } /*! An attempt is made to initialise the object using information from the supplied parameters, or if they are Null, from its parents in the hierarchy. \param hkl_info The reflection list object for this datalist. \param cell The cell object for this datalist. */ template void CHKL_data::init( const HKL_info& hkl_info, const Cell& cell ) { // use supplied values by default const HKL_info* hp = &hkl_info; const Cell* cp = &cell; // otherwise get them from the tree if ( hp->is_null() ) hp = parent_of_type_ptr(); if ( cp->is_null() ) cp = parent_of_type_ptr(); // if we have an hkl_info, try and init if ( hp != NULL ) { // if no cell then inherit if ( cp == NULL ) cp = &(hp->cell()); // now initialise if ( !hp->is_null() && !cp->is_null() ) HKL_data::init( *hp, *cp ); } Container::update(); } /*! Hierarchical update. If this object is uninitialised, an attempt is made to initialise the object using information from its parents in the hierarchy. The childen of the object are then updated. The data list is also synchronized with the parent reflection list. */ template void CHKL_data::update() { if ( HKL_data_base::is_null() ) init( NullHKL_info, NullCell ); else Container::update(); HKL_data::update(); } } // namespace clipper #endif clipper-2.1/clipper/core/container_types.h0000644000374100011300000001316310363703537015705 00000000000000/*! \file lib/container_types.h Header file for Container versions of various objects */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_CONTAINER_TYPES #define CLIPPER_CONTAINER_TYPES #include "container.h" namespace clipper { extern const Resolution NullResolution; //. */ class NXmap_base { public: //! test if object has been initialised bool is_null() const; //! return the grid dimensions for this map const Grid& grid() const { return grid_; } //! return the orthogonal-to-grid coordinate operator const RTop<>& operator_orth_grid() const { return rt_orth_grid; } //! return the grid-to-orthogonal coordinate operator const RTop<>& operator_grid_orth() const { return rt_grid_orth; } //! convert map coordinate to orthogonal /*! \param cm The grid coordinate to be converted. \return The equivalent orthogonal coordinate. */ inline Coord_orth coord_orth( const Coord_map& cm ) const { return Coord_orth( rt_grid_orth*cm ); } //! convert orthogonal coordinate to map /*! \param co The orthogonal coordinate to be converted. \return The equivalent grid coordinate. */ inline Coord_map coord_map( const Coord_orth& co ) const { return Coord_map ( rt_orth_grid*co ); } //! is the given coord available in the map? bool in_map( const Coord_grid& pos ) const { return grid_.in_grid( pos ); } //! is the given coord available in the map using the given interpolant? template bool in_map( const Coord_map& cm ) const; //! get multiplicity of a map grid point (always 1 for NXmap) int multiplicity( const Coord_grid& pos ) const { return 1; } //! Map reference base class /*! This is a reference to an Map. It forms a base class for index-like and coordinate-like Map references. If you write a method which will work with either, then specify this instead of either of the derived classed. \internal */ class Map_reference_base { public: //! return the parent NXmap inline const NXmap_base& base_nxmap() const { return *map_; } //! Get the index into the map data array inline const int& index() const { return index_; } //! Check for end of map inline bool last() const { return ( index_ >= map_->grid_.size() ); } protected: //! pointer to map for which this Map_reference_index is defined const NXmap_base* map_; //! integer index into map data array int index_; }; //! Map reference with index-like behaviour /*! This is a reference to a map coordinate. It behaves like a simple index into the map, but can be easily converted into a coordinate as and when required. It also implements methods for iterating through the map. It is very compact, but coord() involves some overhead. \note The following methods are inherited from Map_reference_base but are documented here for convenience: base_nxmap(), index(), last(). */ class Map_reference_index : public Map_reference_base { public: //! Null constructor Map_reference_index() {} //! Constructor: need parent map explicit Map_reference_index( const NXmap_base& map ) { map_ = ↦ index_ = 0; } //! Constructor: need parent map and coord Map_reference_index( const NXmap_base& map, const Coord_grid& pos ) { map_ = ↦ index_ = map_->grid_.index( pos ); } //! Get current grid coordinate inline Coord_grid coord() const { return map_->grid_.deindex(index_); } //! Get current value of orthogonal coordinate inline const Coord_orth coord_orth() const { return map_->coord_orth( coord().coord_map() ); } //! Set current value of coordinate - optimised for nearby coords inline Map_reference_index& set_coord( const Coord_grid& pos ) { index_ = map_->grid_.index( pos ); return *this; } //! Simple increment inline Map_reference_index& next() { index_++; return *this; } //! Index of neighbouring point /* Use for e.g. peak search. Valid for -1 <= du/dv/dw <= 1 only. \param du/dv/dw Coordinate offset. \return Map index. */ inline int index_offset(const int& du,const int& dv,const int& dw) const { return index_ + du*map_->du + dv*map_->dv + dw*map_->dw; } // inherited functions listed for documentation purposes //-- const NXmap_base& base_nxmap() const; //-- const int& index() const; //-- bool last() const; }; //! Map reference with coordinate-like behaviour /*! This is a reference to a map coordinate. It behaves like a coordinate, but also stores the index of the corresponding point in the map. It also implements methods for iterating through the a map. Since the current coordinate is stored, coord() is fast. However it required 5 words of storage. \note The following methods are inherited from Map_reference_base but are documented here for convenience: base_nxmap(), index(), last(). */ class Map_reference_coord : public NXmap_base::Map_reference_base { public: //! Null constructor Map_reference_coord() {} //! Constructor: need parent map explicit Map_reference_coord( const NXmap_base& map ) { map_ = ↦ } //! Constructor: need parent map and coord Map_reference_coord( const NXmap_base& map, const Coord_grid& pos ) { map_ = ↦ set_coord( pos ); } //! Get current value of coordinate inline Coord_grid coord() const { return pos_; } //! Get current value of orthogonal coordinate inline const Coord_orth coord_orth() const { return map_->coord_orth( coord().coord_map() ); } //! Set current value of coordinate - optimised for nearby coords inline Map_reference_coord& set_coord( const Coord_grid& pos ) { pos_ = pos; index_ = map_->grid_.index( pos_ ); return *this; } //! Simple increment /*! Use of this function resets the stored coordinate and sym */ inline Map_reference_coord& next() { index_++; pos_ = map_->grid_.deindex(index_); return *this; } // Increment u,v,w inline Map_reference_coord& next_u() { pos_.u()++; index_ += map_->du; return *this; } //!< increment u inline Map_reference_coord& next_v() { pos_.v()++; index_ += map_->dv; return *this; } //!< increment v inline Map_reference_coord& next_w() { pos_.w()++; index_ += map_->dw; return *this; } //!< increment w inline Map_reference_coord& prev_u() { pos_.u()--; index_ -= map_->du; return *this; } //!< decrement u inline Map_reference_coord& prev_v() { pos_.v()--; index_ -= map_->dv; return *this; } //!< decrement v inline Map_reference_coord& prev_w() { pos_.w()--; index_ -= map_->dw; return *this; } //!< decrement w //! Assignment operator from a coord inline Map_reference_coord& operator =( const Coord_grid& pos ) { return set_coord( pos ); } // inherited functions listed for documentation purposes //-- const NXmap_base& base_nxmap() const; //-- const int& index() const; //-- bool last() const; protected: //! Current coord Coord_grid pos_; }; //! return a basic Map_reference_index for this map Map_reference_index first() const { return Map_reference_index( *this ); } //! return a coord Map_reference_index for this map Map_reference_coord first_coord() const { return Map_reference_coord( *this ); } protected: Grid grid_; //!< grid for the map RTop<> rt_orth_grid; //!< orth->grid operator RTop<> rt_grid_orth; //!< grid->orth operator int du, dv, dw; //!< steps for shifts along u,v,w //! Null constructor, for later initialisation NXmap_base(); //! initialiser: takes grid and orthogonal->grid coordinate operator void init( const Grid& grid, const RTop<>& rt ); //! initialiser: takes grid, cell, and fraction limits void init( const Cell& cell, const Grid_sampling& grid, const Grid_range& grid_extent ); friend class NXmap_base::Map_reference_base; friend class NXmap_base::Map_reference_index; friend class NXmap_base::Map_reference_coord; }; //! NXmap: actual non-crystallographic map class /*! The non-crystallographic map class stores a map of arbitrary data type. Unlike an Xmap it is finite in extent and has no symmetry. An RT operator provides mapping onto an arbitrary orthogonal coordinate frame. Iterators provide efficient access to data. This is derived from NXmap_base, and adds the templatised data itself and the methods which deal with it. \note The following methods are inherited from NXmap_base but are documented here for convenience: grid(), coord_orth(), coord_grid(), first(), first_coord(). */ template class NXmap : public NXmap_base { public: //! Null constructor, for later initialisation NXmap() {} //! Constructor: takes grid and orthogonal->grid coordinate operator NXmap( const Grid& grid, const RTop<>& rt ); //! Constructor: takes grid, cell, and extent NXmap( const Cell& cell, const Grid_sampling& grid, const Grid_range& grid_extent ); //! initialiser: takes grid and orthogonal->grid coordinate operator void init( const Grid& grid, const RTop<>& rt ); //! initialiser: takes grid, cell, and fraction limits void init( const Cell& cell, const Grid_sampling& grid, const Grid_range& grid_extent ); //! get data by Map_reference_index inline const T& operator[] (const NXmap_base::Map_reference_index i) const { return list[i.index()]; } //! set data by Map_reference_index inline T& operator[] (const NXmap_base::Map_reference_index i) { return list[i.index()]; } //! get data by Map_reference_coord inline const T& operator[] (const NXmap_base::Map_reference_coord i) const { return list[i.index()]; } //! set data by Map_reference_coord inline T& operator[] (const NXmap_base::Map_reference_coord i) { return list[i.index()]; } //! get a density value for an arbitrary position inline const T& get_data( const Coord_grid& pos ) const { return list[ grid_.index( pos ) ]; } //! set a density value for an arbitrary position inline void set_data( const Coord_grid& pos, const T& val ) { list[ grid_.index( pos ) ] = val; } //! get map value for map coord using supplied interpolator template T interp( const Coord_map& pos ) const; //! get map value and grad for map coord using supplied interpolator template void interp_grad( const Coord_map& pos, T& val, Grad_map& grad ) const; //! get map value and curv for map coord using supplied interpolator template void interp_curv( const Coord_map& pos, T& val, Grad_map& grad, Curv_map& curv ) const; // inherited functions listed for documentation purposes //-- const Grid& grid() const; //-- const RTop<> operator_orth_grid() const; //-- const RTop<> operator_grid_orth() const; //-- const Coord_orth coord_orth( const Coord_map& cg ) const; //-- const Coord_map coord_map ( const Coord_orth& co ) const; //-- const Map_reference_index first(); //-- const Map_reference_coord first_coord(); //! assignment operator: assigns a single value to the whole map const T& operator =( const T& value ); //! add another map to this one const NXmap& operator +=( const NXmap& other ); //! subtract another map from this one const NXmap& operator -=( const NXmap& other ); private: std::vector list; }; // template fucntion definitions /*! Note that the higher the order of the interpolant, the more of the boundary of the map becomes inaccessible. \param cm The coord_map to test. \return true if interpolation can be performed at that coordinate. */ template bool NXmap_base::in_map( const Coord_map& cm ) const { return I::can_interp( *this, cm ); } /*! Initialise an NXmap to some rhomboid chosen from within a crystal coordinate space, specified by the grid and a transformation from orthogonal to grid coordinates. \param grid The grid dimensions of the desired map. \param rt The rotation/transln op from orthogonal to grid coordinates. */ template NXmap::NXmap( const Grid& grid, const RTop<>& rt ) { init( grid, rt ); } /*! Initialise an NXmap to some rhomboid chosen from within a crystal grid coordinate space, specified by a cell, sampling and box within that grid. This is useful for creating an NXmap which exactly matches some subregion of a crystallographic map. \param cell Unit cell defining the crystal space. \param grid The grid sampling of the given unit cell. \param grid_extent The map extent within that cell. */ template NXmap::NXmap( const Cell& cell, const Grid_sampling& grid, const Grid_range& grid_extent ) { init( cell, grid, grid_extent ); } /*! Initialise an NXmap to some rhomboid chosen from within a crystal coordinate space, specified by the grid and a transformation from orthogonal to grid coordinates. \param grid The grid dimensions of the desired map. \param rt The rotation/transln op from orthogonal to grid coordinates. */ template void NXmap::init( const Grid& grid, const RTop<>& rt ) { NXmap_base::init( grid, rt ); list.resize( grid.size() ); } /*! Initialise an NXmap to some rhomboid chosen from within a crystal grid coordinate space, specified by a cell, sampling and box within that grid. This is useful for creating an NXmap which exactly matches some subregion of a crystallographic map. \param cell Unit cell defining the crystal space. \param grid The grid sampling of the given unit cell. \param grid_extent The map extent within that cell. */ template void NXmap::init( const Cell& cell, const Grid_sampling& grid, const Grid_range& grid_extent ) { NXmap_base::init( cell, grid, grid_extent ); list.resize( grid_extent.size() ); } /*! The value of the map at the desired non-grid map coordinate are calculated using the supplied interpolator template. \param pos The map coord at which the density is to be calcuated. \return The value of the density at that point. map coordinates (see Cell::coord_orth). */ template template T NXmap::interp( const Coord_map& pos ) const { T val; I::interp( *this, pos, val ); return val; } /*! The value of the map at the desired non-grid map coordinate and its gradient are calculated using the supplied interpolator template. \param pos The map coord at which the density is to be calcuated. \param val The value of the density at that point. \param grad The interpolated gradient vector with respect to the map coordinates (see Cell::coord_orth). \param curv The interpolated curvature matrix with respect to the map coordinates (see Cell::coord_orth). */ template template void NXmap::interp_grad( const Coord_map& pos, T& val, Grad_map& grad ) const { I::interp_grad( *this, pos, val, grad ); } /*! The value of the map at the desired non-grid map coordinate and its gradient and curvature are calculated using the supplied interpolator template. \param pos The map coord at which the density is to be calcuated. \param val The value of the density at that point. \param grad The interpolated gradient vector with respect to the map coordinates (see Cell::coord_orth). \param curv The interpolated curvature matrix with respect to the map coordinates (see Cell::coord_orth). */ template template void NXmap::interp_curv( const Coord_map& pos, T& val, Grad_map& grad, Curv_map& curv ) const { I::interp_curv( *this, pos, val, grad, curv ); } /*! All values, including missing values, are overwritten by the value. \param value The value to which the map is to be set. */ template const T& NXmap::operator =( const T& value ) { // copy value into map Map_reference_index im; for ( im = first(); !im.last(); im.next() ) list[im.index()] = value; return value; } /*! The map grids must match. */ template const NXmap& NXmap::operator +=( const NXmap& other ) { if ( grid() != other.grid() ) Message::message( Message_fatal( "NXmap: map mismatch in +=" ) ); Map_reference_index im; for ( im = first(); !im.last(); im.next() ) list[im.index()] += other[im]; return (*this); } /*! The map grids must match. */ template const NXmap& NXmap::operator -=( const NXmap& other ) { if ( grid() != other.grid() ) Message::message( Message_fatal( "NXmap: map mismatch in -=" ) ); Map_reference_index im; for ( im = first(); !im.last(); im.next() ) list[im.index()] -= other[im]; return (*this); } } // namespace clipper #endif clipper-2.1/clipper/core/hkl_compute.h0000644000374100011300000002722511070156710015004 00000000000000/*! \file lib/hkl_compute.h Data conversion operators for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_HKL_COMPUTE #define CLIPPER_HKL_COMPUTE #include "hkl_datatypes.h" namespace clipper { namespace datatypes { // Define conversion operators //! Compute from ABCD to Phi_fom by phase integration (loses bimodality) template class Compute_phifom_from_abcd { public: // constructor: sets up integration tables Compute_phifom_from_abcd(); const Phi_fom operator()( const HKL_info::HKL_reference_index& ih, const ABCD& abcd ) const; //! class Compute_abcd_from_phifom { public: const ABCD operator()( const HKL_info::HKL_reference_index& ih, const Phi_fom& phifom ) const; //! class Compute_fphi_from_fsigf_phifom { public: const F_phi operator()( const HKL_info::HKL_reference_index& ih, const F_sigF& fsigf, const Phi_fom& phifom ) const; //! class Compute_EsigE_from_FsigF { public: const E_sigE operator()( const HKL_info::HKL_reference_index& ih, const F_sigF& fsigf ) const; //! class Compute_mean_fsigf_from_fsigfano { public: const F_sigF operator()( const HKL_info::HKL_reference_index& ih, const F_sigF_ano& fsigfano ) const; //! class Compute_diff_fsigf_from_fsigfano { public: const F_sigF operator()( const HKL_info::HKL_reference_index& ih, const F_sigF_ano& fsigfano ) const; //! class Compute_neg_fphi { public: const F_phi operator()( const HKL_info::HKL_reference_index& ih, const F_phi& fphi1 ) const; //! class Compute_add_fphi { public: const F_phi operator()( const HKL_info::HKL_reference_index& ih, const F_phi& fphi1, const F_phi& fphi2 ) const; //! class Compute_sub_fphi { public: const F_phi operator()( const HKL_info::HKL_reference_index& ih, const F_phi& fphi1, const F_phi& fphi2 ) const; //! class Compute_add_abcd { public: const ABCD operator()( const HKL_info::HKL_reference_index& ih, const ABCD& abcd1, const ABCD& abcd2 ) const; //! class Compute_scale_u { public: //! constructor: takes scale, U value Compute_scale_u( const ftype& s, const ftype& u ); const T operator()( const HKL_info::HKL_reference_index& ih, T data ) const; //! class Compute_scale_u_iso { public: //! constructor: takes scale, U value Compute_scale_u_iso( const ftype& s, const ftype& u ); const T operator()( const HKL_info::HKL_reference_index& ih, T data ) const; //! class Compute_scale_u_aniso { public: //! constructor: takes scale, U value Compute_scale_u_aniso( const ftype& s, const U_aniso_orth& u ); const T operator()( const HKL_info::HKL_reference_index& ih, T data ) const; //! class Compute_FsigF { public: const F_sigF operator()( const HKL_info::HKL_reference_index& ih, const T& fsigf ) const; //! Compute_phifom_from_abcd; //!< operator typedef datatypes::Compute_abcd_from_phifom Compute_abcd_from_phifom; //!< operator typedef datatypes::Compute_fphi_from_fsigf_phifom Compute_fphi_from_fsigf_phifom; //!< operator typedef datatypes::Compute_EsigE_from_FsigF Compute_EsigE_from_FsigF; //!< operator typedef datatypes::Compute_mean_fsigf_from_fsigfano Compute_mean_fsigf_from_fsigfano; //!< operator typedef datatypes::Compute_diff_fsigf_from_fsigfano Compute_diff_fsigf_from_fsigfano; //!< operator typedef datatypes::Compute_neg_fphi Compute_neg_fphi; //!< operator typedef datatypes::Compute_add_fphi Compute_add_fphi; //!< operator typedef datatypes::Compute_sub_fphi Compute_sub_fphi; //!< operator typedef datatypes::Compute_add_abcd Compute_add_abcd; //!< operator typedef datatypes::Compute_scale_u_iso > Compute_scale_u_iso_isigi; //!< operator typedef datatypes::Compute_scale_u_iso > Compute_scale_u_iso_fsigf; //!< operator typedef datatypes::Compute_scale_u_iso > Compute_scale_u_iso_fsigfano; //!< operator typedef datatypes::Compute_scale_u_iso > Compute_scale_u_iso_fphi; //!< operator typedef datatypes::Compute_scale_u_aniso > Compute_scale_u_aniso_isigi; //!< operator typedef datatypes::Compute_scale_u_aniso > Compute_scale_u_aniso_fsigf; //!< operator typedef datatypes::Compute_scale_u_aniso > Compute_scale_u_aniso_fsigfano; //!< operator typedef datatypes::Compute_scale_u_aniso > Compute_scale_u_aniso_fphi; //!< operator typedef datatypes::Compute_FsigF > Compute_FsigF; //!< operator typedef datatypes::Compute_FsigF > Compute_FsigF_from_ano; //!< operator typedef datatypes::Compute_scale_u > Compute_scale_u_isigi; // DEPRECATED typedef datatypes::Compute_scale_u > Compute_scale_u_fsigf; // DEPRECATED typedef datatypes::Compute_scale_u > Compute_scale_u_fsigfano; // DEPRECATED typedef datatypes::Compute_scale_u > Compute_scale_u_fphi; // DEPRECATED } namespace data64 { typedef datatypes::Compute_phifom_from_abcd Compute_phifom_from_abcd; //!< operator typedef datatypes::Compute_abcd_from_phifom Compute_abcd_from_phifom; //!< operator typedef datatypes::Compute_fphi_from_fsigf_phifom Compute_fphi_from_fsigf_phifom; //!< operator typedef datatypes::Compute_EsigE_from_FsigF Compute_EsigE_from_FsigF; //!< operator typedef datatypes::Compute_mean_fsigf_from_fsigfano Compute_mean_fsigf_from_fsigfano; //!< operator typedef datatypes::Compute_diff_fsigf_from_fsigfano Compute_diff_fsigf_from_fsigfano; //!< operator typedef datatypes::Compute_neg_fphi Compute_neg_fphi; //!< operator typedef datatypes::Compute_add_fphi Compute_add_fphi; //!< operator typedef datatypes::Compute_sub_fphi Compute_sub_fphi; //!< operator typedef datatypes::Compute_add_abcd Compute_add_abcd; //!< operator typedef datatypes::Compute_scale_u_iso > Compute_scale_u_iso_isigi; //!< operator typedef datatypes::Compute_scale_u_iso > Compute_scale_u_iso_fsigf; //!< operator typedef datatypes::Compute_scale_u_iso > Compute_scale_u_iso_fsigfano; //!< operator typedef datatypes::Compute_scale_u_iso > Compute_scale_u_iso_fphi; //!< operator typedef datatypes::Compute_scale_u_aniso > Compute_scale_u_aniso_isigi; //!< operator typedef datatypes::Compute_scale_u_aniso > Compute_scale_u_aniso_fsigf; //!< operator typedef datatypes::Compute_scale_u_aniso > Compute_scale_u_aniso_fsigfano; //!< operator typedef datatypes::Compute_scale_u_aniso > Compute_scale_u_aniso_fphi; //!< operator typedef datatypes::Compute_FsigF > Compute_FsigF; //!< operator typedef datatypes::Compute_FsigF > Compute_FsigF_from_ano; //!< operator typedef datatypes::Compute_scale_u > Compute_scale_u_isigi; // DEPRECATED typedef datatypes::Compute_scale_u > Compute_scale_u_fsigf; // DEPRECATED typedef datatypes::Compute_scale_u > Compute_scale_u_fsigfano; // DEPRECATED typedef datatypes::Compute_scale_u > Compute_scale_u_fphi; // DEPRECATED } } // namespace clipper #endif clipper-2.1/clipper/core/clipper_instance.cpp0000644000374100011300000001270411205016260016336 00000000000000/* clipper_instance.cpp: implementation file for clipper helper functions */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "clipper_instance.h" namespace clipper { // template function definitions for object cache template ObjectCache::Reference::Reference( const Reference& other ) { T::mutex.lock(); obj_ = other.obj_; if ( !is_null() ) obj_->first++; T::mutex.unlock(); } template ObjectCache::Reference::~Reference() { T::mutex.lock(); if ( !is_null() ) obj_->first--; T::mutex.unlock(); } template void ObjectCache::Reference::operator =( const Reference& other ) { T::mutex.lock(); if ( !is_null() ) obj_->first--; obj_ = other.obj_; if ( !is_null() ) obj_->first++; T::mutex.unlock(); } template ObjectCache::ObjectCache() { mode_ = NORMAL; } template ObjectCache::~ObjectCache() { for ( int i = 0; i < cache_.size(); i++ ) { if ( cache_[i]->first != 0 ) { std::string num( "0000" ); num[3] += cache_[i]->first % 10; num[2] += cache_[i]->first / 10 % 10; num[1] += cache_[i]->first / 100 % 10; num[0] += cache_[i]->first / 1000; Message::message( Message_warn( "ObjectCache: Leaked "+num+" refs to <"+cache_[i]->second.format()+">" ) ); } } } template typename ObjectCache::Reference ObjectCache::cache( const typename T::Key& key ) { T::mutex.lock(); std::pair* ptr = NULL; // find existing data for ( int i = 0; i < cache_.size(); i++ ) if ( cache_[i]->second.matches(key) ) ptr = cache_[i]; // none found, make new data if ( ptr == NULL ) { // pick an appropriate place if ( mode_ == MINMEM ) // MINMEM: remove unreferenced purge(); if ( mode_ == NORMAL ) // NORMAL: replace unreferenced for ( int i = 0; i < cache_.size(); i++ ) if ( cache_[i]->first == 0 ) { ptr = cache_[i]; ptr->second = T(key); break; } // otherwise add new if ( ptr == NULL ) { ptr = new std::pair( 0, T(key) ); cache_.push_back( ptr ); } } Reference result( ptr ); T::mutex.unlock(); return result; // we have a ref to the new obj, so it is thread safe } template void ObjectCache::set_mode( const MODE& mode ) { mode_ = mode; } template void ObjectCache::purge() { for ( int i = cache_.size() - 1; i >= 0; i-- ) if ( cache_[i]->first == 0 ) { delete cache_[i]; cache_.erase( cache_.begin() + i ); } } template void ObjectCache::destroy() { cache_.clear(); } template void ObjectCache::debug() const { for ( int i = 0; i < cache_.size(); i++ ) std::cout << "Cache pos: " << i << "\t Refs: " << cache_[i]->first << "\t" << cache_[i]->second.format() << "\n"; } template class ObjectCache; template class ObjectCache; template class ObjectCache; // clipper instance ClipperInstance ClipperInstantiator::inst; ClipperInstance::ClipperInstance() { } ClipperInstance::~ClipperInstance() { xmcache_.purge(); hdcache_.purge(); sgcache_.purge(); } void ClipperInstance::destroy() { xmcache_.destroy(); hdcache_.destroy(); sgcache_.destroy(); } } // namespace clipper clipper-2.1/clipper/core/ramachandran.h0000644000374100011300000001156710363703537015124 00000000000000/*! \file ramachandran.h Ramachandran Plot class */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_RAMACHANDRAN #define CLIPPER_RAMACHANDRAN #include "clipper_types.h" namespace clipper { //! 2-d angular probability distibution class /*! Base for Ramachandran class (and other similar classes, such as a pseudo-ramachandran plot or the JPD of two phases ). */ class Prob_phi_2d { public: //! initialise: with sampling void init( const int& size ); //! accumulate new table of samples to probability void accumulate( const ftype32 table[] ); //! accumulate new sample to probability void accumulate( const ftype& phi1, const ftype& phi2, ftype wgt = 1.0 ); //! normalise to integrate to 1/(2pi)^2 void normalise(); //! get probability for a particular pair of angles ftype probability( const ftype& phi1, const ftype& phi2 ) const; //! formatted string representation (as C++ code) String format() const; //! 2d read access const ftype& data( const int& i, const int& j ) const { return data_[n*i+j]; } //! 2d write access ftype& data( const int& i, const int& j ) { return data_[n*i+j]; } private: int n; //!< sampling std::vector data_; }; //! Ramachandran plot class /*! This class provides a reference Ramachandran plot for Gly, Pro, other, and combinations of those types of residues. The source data comes from the best residues from the 'top500' best-determined structures list of D. C. and J. S. Richardson, http://kinemage.biochem.duke.edu/index.html The Ramachandran plot is normalised in inverse radians squared, so the mean value of a probability is 1/(2 pi)2. */ class Ramachandran : private Prob_phi_2d { public: //! enumeration of built-in Ramachandran tables enum TYPE { Gly, Pro, NonGlyPro, NonGly, All }; //! null constructor Ramachandran() {} //! constructor: from standard plot Ramachandran( TYPE type ); //! initialise: from standard plot void init( TYPE type ); //! change threshholds to different values void set_thresholds( ftype prob_favored = 0.01, ftype prob_allowed = 0.0005 ); //! get probability for a particular pair of angles ftype probability( const ftype& phi, const ftype& psi ) const { return Prob_phi_2d::probability( phi, psi ); } //! test if a pair of angles are in the favored region bool favored( const ftype& phi, const ftype& psi ) const { return ( probability( phi, psi ) > p_favored ); } //! test if a pair of angles are in the allowed region bool allowed( const ftype& phi, const ftype& psi ) const { return ( probability( phi, psi ) > p_allowed ); } private: ftype p_favored, p_allowed; }; } // namespace clipper #endif clipper-2.1/clipper/core/hkl_info.h0000644000374100011300000002646210363703537014276 00000000000000/*! \file lib/hkl_info.h Header file for hkl list class */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_HKL_INFO #define CLIPPER_HKL_INFO #include "hkl_lookup.h" namespace clipper { class HKL_data_base; //! HKL list container and tree root /*! This object contains contains a reflection list, and all the properties on which such a list depends, i.e. spacegroup, cell, resolution. It also keeps a fast reflection lookup list and lookup lists for resolutions and reflection classes. */ class HKL_info { public: //! null constructor HKL_info(); //! constructor: Takes spacegroup, cell, and resolution HKL_info( const Spacegroup& spacegroup, const Cell& cell, const Resolution& resolution, const bool& generate = false ); //! initialiser: Takes spacegroup, cell, and resolution void init( const Spacegroup& spacegroup, const Cell& cell, const Resolution& resolution, const bool& generate = false ); //! initialiser: Takes spacegroup, cell, and HKL_sampling void init( const Spacegroup& spacegroup, const Cell& cell, const HKL_sampling& hkl_sampling, const bool& generate = true ); //! test if object has been initialised bool is_null() const; //! get the cell const Cell& cell() const { return cell_; } //! get the spacegroup const Spacegroup& spacegroup() const { return spacegroup_; } //! [CLIPPER2] get HKL_sampling const HKL_sampling& hkl_sampling() const { return hkl_sampling_; } //! get the resolution const Resolution& resolution() const { return resolution_; } //! synthesize hkl list void generate_hkl_list(); //! add new reflections to the list void add_hkl_list( const std::vector& add ); //! get number of reflections in the object inline int num_reflections() const { return hkl.size(); } //! reflection hkl from index /*! \param index The index. \return The corresponding HKL. */ inline const HKL& hkl_of( const int& index ) const { return hkl[index]; } //! reflection index from hkl /*! This does not check symmetry equivalents (see find_sym). \param rfl The HKL. \return The index, or -1 if it does not exist. */ inline int index_of( const HKL& rfl ) const { return lookup.index_of( rfl ); } //! get reflection resolution using lookup inline const ftype32& invresolsq( const int& index ) const { return invresolsq_lookup[index]; } //! get resolution limits of the list inline const Range& invresolsq_range() const { return invresolsq_range_; } //! get reflection class using lookup const HKL_class& hkl_class( const int& index ) const { return hkl_class_lookup[index]; } //! find symop no and friedel to bring an HKL into ASU HKL find_sym( const HKL& rfl, int& sym, bool& friedel ) const; //! HKL reference base class /*! This is a reference to an HKL. It forms a base class for index-like and coordinate-like HKL references. If you write a method which will work with either, then specify this instead of either of the derived classed. \internal */ class HKL_reference_base { public: //! return the parent HKL_info inline const HKL_info& base_hkl_info() const { return *hklinfo; } //! return the current index (-1 if invalid) inline const int& index() const { return index_; } //! return the inv resol sq for the reflection (assumes index valid) inline ftype invresolsq( const HKL_data_base& hkldata ) const; //! return the inv resol sq for the reflection (assumes index valid) inline ftype invresolsq() const { return hklinfo->invresolsq( index_ ); } //! test if index has gone past last reflection inline bool last() const { return ( index_ >= hklinfo->num_reflections() ); } protected: const HKL_info* hklinfo; int index_; }; //! HKL reference with index-like behaviour /*! This is a reference to an HKL. It behaves like a simple index into the reflection list, but can be easily converted into an HKL as and when required. It also implements methods for iterating through a reflection list. \note The following methods are inherited from HKL_reference_base but are documented here for convenience: base_hkl_info(), index(), invresolsq(), last(). */ class HKL_reference_index : public HKL_reference_base { public: //! Null constructor HKL_reference_index() {} //! Constructor: takes parent HKL_info and initial index HKL_reference_index( const HKL_info& hklinfo_, const int& index ) { hklinfo = &hklinfo_; index_ = index; } //! return the current HKL inline const HKL& hkl() const { return hklinfo->hkl_of( index_ ); } //! return the reflection class for the reflection inline const HKL_class& hkl_class() const { return hklinfo->hkl_class( index_ ); } //! increment to next reflection inline HKL_reference_index& next() { index_++; return *this; } // inherited functions listed for documentation purposes //-- const HKL_info& base_hkl_info() const; //-- const int& index() const; //-- const ftype invresolsq() const; //-- bool last() const; }; //! HKL reference with coord-like behaviour /*! This is a reference to an HKL. It behaves like an HKL, but also stores the index of the corresponding reflection in the reflection list, if it exists, and the symmetry and friedel operators required to get there. \note The following methods are inherited from HKL_reference_base but are documented here for convenience: base_hkl_info(), index(), invresolsq(), last(). */ class HKL_reference_coord : public HKL_reference_base { public: //! Null constructor HKL_reference_coord() {} //! Constructor: takes parent HKL_info and initial HKL HKL_reference_coord( const HKL_info& hklinfo_, const HKL& hkl ) { hklinfo = &hklinfo_; hkl_ = hkl; index_ = hklinfo->index_of( hklinfo->find_sym( hkl_, sym_, friedel_ ) ); if ( index_ < 0 ) Message::message( Message_fatal( "HKL_reference_coord: hkl not found" ) ); } //! return the current HKL inline const HKL& hkl() const { return hkl_; } //! get current symop number inline const int& sym() const { return sym_; } //! get current friedel flag inline const bool& friedel() const { return friedel_; } //! assign from HKL /*! The new HKL must exist in the reflection list. The calculation is optimised for the case when the new HKL is near the old one. */ inline HKL_reference_coord& set_hkl( const HKL& hkl__ ) { hkl_ = hkl__; HKL equiv = hkl__.transform(hklinfo->isymop[sym_]); if ( friedel_ ) equiv = -equiv; index_ = hklinfo->index_of( equiv ); if ( index_ < 0 ) index_ = hklinfo->index_of( hklinfo->find_sym( hkl_, sym_, friedel_ ) ); return *this; } //! increment to next reflection inline HKL_reference_coord& next() { sym_ = 0; friedel_ = false; index_++; if ( !last() ) hkl_ = hklinfo->hkl_of( index_ ); return *this; } // increment h,k,l inline HKL_reference_coord& next_h() { hkl_.h()++; set_hkl( hkl_ ); return *this; } //!< increment h inline HKL_reference_coord& next_k() { hkl_.k()++; set_hkl( hkl_ ); return *this; } //!< increment k inline HKL_reference_coord& next_l() { hkl_.l()++; set_hkl( hkl_ ); return *this; } //!< increment l inline HKL_reference_coord& prev_h() { hkl_.h()--; set_hkl( hkl_ ); return *this; } //!< decrement h inline HKL_reference_coord& prev_k() { hkl_.k()--; set_hkl( hkl_ ); return *this; } //!< decrement k inline HKL_reference_coord& prev_l() { hkl_.l()--; set_hkl( hkl_ ); return *this; } //!< decrement l //! operator assign from HKL inline HKL_reference_coord& operator =( const HKL& hkl__ ) { return set_hkl( hkl__ ); } // inherited functions listed for documentation purposes //-- const HKL_info& base_hkl_info() const; //-- const int& index() const; //-- const ftype invresolsq() const; //-- bool last() const; protected: HKL hkl_; int sym_; bool friedel_; }; //! return HKL_reference_index pointing to first reflection HKL_reference_index first() const { return HKL_reference_index( *this, 0 ); } void debug() const; protected: Spacegroup spacegroup_; //!< spacegroup Cell cell_; //!< unit cell HKL_sampling hkl_sampling_; //!< hkl sampling Resolution resolution_; //!< resolution limit std::vector isymop; //!< integer symops //! the reflection list std::vector hkl; //! fast epsilon/centricity lookup table std::vector hkl_class_lookup; //! fast resolution lookup table std::vector invresolsq_lookup; //! fast reflection lookup table HKL_lookup lookup; //! resolution limit of the current reflection list Range invresolsq_range_; // internal methods: //! finalise reflection list \internal void update_hkl_list(); friend class HKL_info::HKL_reference_base; friend class HKL_info::HKL_reference_index; friend class HKL_info::HKL_reference_coord; }; } // namespace clipper #endif clipper-2.1/clipper/core/hkl_operators.cpp0000644000374100011300000003630610363703537015712 00000000000000/* hkl_operators.cpp: HKL_data operators for the clipper libraries */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "hkl_operators.h" namespace clipper { namespace datatypes { HKL_data operator &( const HKL_data_base& d1, const HKL_data_base& d2 ) { HKL_data result( d1.base_hkl_info(), d1.base_cell() ); for ( int i = 0; i < d1.base_hkl_info().num_reflections(); i++ ) result[i].flag() = ( !d1.missing(i) ) && ( !d2.missing(i) ); return result; } HKL_data operator |( const HKL_data_base& d1, const HKL_data_base& d2 ) { HKL_data result( d1.base_hkl_info(), d1.base_cell() ); for ( int i = 0; i < d1.base_hkl_info().num_reflections(); i++ ) result[i].flag() = ( !d1.missing(i) ) || ( !d2.missing(i) ); return result; } HKL_data operator ^( const HKL_data_base& d1, const HKL_data_base& d2 ) { HKL_data result( d1.base_hkl_info(), d1.base_cell() ); for ( int i = 0; i < d1.base_hkl_info().num_reflections(); i++ ) result[i].flag() = ( !d1.missing(i) ) ^ ( !d2.missing(i) ); return result; } HKL_data operator !( const HKL_data_base& d1 ) { HKL_data result( d1.base_hkl_info(), d1.base_cell() ); for ( int i = 0; i < d1.base_hkl_info().num_reflections(); i++ ) result[i].flag() = d1.missing(i); return result; } HKL_data operator ==( const HKL_data& d1, const int& n ) { HKL_data result( d1.base_hkl_info(), d1.base_cell() ); for ( int i = 0; i < d1.base_hkl_info().num_reflections(); i++ ) result[i].flag() = ( d1[i].flag() == n ); return result; } HKL_data operator !=( const HKL_data& d1, const int& n ) { HKL_data result( d1.base_hkl_info(), d1.base_cell() ); for ( int i = 0; i < d1.base_hkl_info().num_reflections(); i++ ) result[i].flag() = ( d1[i].flag() != n ); return result; } HKL_data operator >=( const HKL_data& d1, const int& n ) { HKL_data result( d1.base_hkl_info(), d1.base_cell() ); for ( int i = 0; i < d1.base_hkl_info().num_reflections(); i++ ) result[i].flag() = ( d1[i].flag() >= n ); return result; } HKL_data operator <=( const HKL_data& d1, const int& n ) { HKL_data result( d1.base_hkl_info(), d1.base_cell() ); for ( int i = 0; i < d1.base_hkl_info().num_reflections(); i++ ) result[i].flag() = ( d1[i].flag() <= n ); return result; } HKL_data operator >( const HKL_data& d1, const int& n ) { HKL_data result( d1.base_hkl_info(), d1.base_cell() ); for ( int i = 0; i < d1.base_hkl_info().num_reflections(); i++ ) result[i].flag() = ( d1[i].flag() > n ); return result; } HKL_data operator <( const HKL_data& d1, const int& n ) { HKL_data result( d1.base_hkl_info(), d1.base_cell() ); for ( int i = 0; i < d1.base_hkl_info().num_reflections(); i++ ) result[i].flag() = ( d1[i].flag() < n ); return result; } template F_phi operator +( const F_phi& d1, const F_phi& d2 ) { return clipper::datatypes::F_phi( std::complex(d1) + std::complex(d2) ); } template F_phi operator -( const F_phi& d1, const F_phi& d2 ) { return clipper::datatypes::F_phi( std::complex(d1) - std::complex(d2) ); } template F_phi operator -( const F_phi& d1 ) { return clipper::datatypes::F_phi( -std::complex(d1) ); } template ABCD operator +( const ABCD& d1, const ABCD& d2 ) { ABCD result; result.a() = d1.a() + d2.a(); result.b() = d1.b() + d2.b(); result.c() = d1.c() + d2.c(); result.d() = d1.d() + d2.d(); return result; } template HKL_data > operator +( const HKL_data >& d1, const HKL_data >& d2 ) { HKL_data > result( d1.base_hkl_info(), d1.base_cell() ); for ( int i = 0; i < d1.base_hkl_info().num_reflections(); i++ ) if ( !d1.missing(i) && !d2.missing(i) ) result[i] = clipper::datatypes::F_phi( std::complex(d1[i]) + std::complex(d2[i]) ); return result; } template HKL_data > operator -( const HKL_data >& d1, const HKL_data >& d2 ) { HKL_data > result( d1.base_hkl_info(), d1.base_cell() ); for ( int i = 0; i < d1.base_hkl_info().num_reflections(); i++ ) if ( !d1.missing(i) && !d2.missing(i) ) result[i] = clipper::datatypes::F_phi( std::complex(d1[i]) - std::complex(d2[i]) ); return result; } template HKL_data > operator *( const HKL_data >& d1, const ftype& s ) { HKL_data > result( d1.base_hkl_info(), d1.base_cell() ); for ( int i = 0; i < d1.base_hkl_info().num_reflections(); i++ ) if ( !d1.missing(i) ) { result[i] = d1[i]; result[i].scale(s); } return result; } template HKL_data > operator -( const HKL_data >& d1 ) { HKL_data > result( d1.base_hkl_info(), d1.base_cell() ); for ( int i = 0; i < d1.base_hkl_info().num_reflections(); i++ ) if ( !d1.missing(i) ) result[i] = clipper::datatypes::F_phi( -std::complex(d1[i]) ); return result; } template HKL_data > operator +( const HKL_data >& d1, const HKL_data >& d2 ) { HKL_data > result( d1.base_hkl_info(), d1.base_cell() ); for ( int i = 0; i < d1.base_hkl_info().num_reflections(); i++ ) if ( !d1.missing(i) && !d2.missing(i) ) { result[i].a() = d1[i].a() + d2[i].a(); result[i].b() = d1[i].b() + d2[i].b(); result[i].c() = d1[i].c() + d2[i].c(); result[i].d() = d1[i].d() + d2[i].d(); } return result; } // compile template types template F_phi operator +( const F_phi& d1, const F_phi& d2 ); template F_phi operator -( const F_phi& d1, const F_phi& d2 ); template F_phi operator -( const F_phi& d1 ); template ABCD operator +( const ABCD& d1, const ABCD& d2 ); template F_phi operator +( const F_phi& d1, const F_phi& d2 ); template F_phi operator -( const F_phi& d1, const F_phi& d2 ); template F_phi operator -( const F_phi& d1 ); template ABCD operator +( const ABCD& d1, const ABCD& d2 ); template HKL_data > operator +( const HKL_data >& d1, const HKL_data >& d2 ); template HKL_data > operator -( const HKL_data >& d1, const HKL_data >& d2 ); template HKL_data > operator *( const HKL_data >& d1, const ftype& s ); template HKL_data > operator *( const ftype& s, const HKL_data >& d1 ); template HKL_data > operator -( const HKL_data >& d1 ); template HKL_data > operator +( const HKL_data >& d1, const HKL_data >& d2 ); template HKL_data > operator +( const HKL_data >& d1, const HKL_data >& d2 ); template HKL_data > operator -( const HKL_data >& d1, const HKL_data >& d2 ); template HKL_data > operator *( const HKL_data >& d1, const ftype& s ); template HKL_data > operator *( const ftype& s, const HKL_data >& d1 ); template HKL_data > operator -( const HKL_data >& d1 ); template HKL_data > operator +( const HKL_data >& d1, const HKL_data >& d2 ); } // namespace datatypes template LogPhaseProb::LogPhaseProb( const HKL_class& hkl_class ) { if ( hkl_class.centric() ) { pmin = Util::mod( Util::intr( N*hkl_class.allowed()/Util::twopi() ), N/2 ); pinc = N/2; q.resize( 2, 0.0 ); } else { pmin = 0; pinc = 1; q.resize( N, 0.0 ); } } template template void LogPhaseProb::set_abcd( const datatypes::ABCD& abcd ) { if ( !abcd.missing() ) { ftype c, s; for ( int p = 0; p < q.size(); p++ ) { c = cos( phase(p) ); s = sin( phase(p) ); q[p] = abcd.a()*c + abcd.b()*s + abcd.c()*(c*c-s*s) + abcd.d()*(2.0*c*s); } } else { for ( int p = 0; p < q.size(); p++ ) q[p] = 0.0; } } template template void LogPhaseProb::get_abcd( datatypes::ABCD& abcd ) const { ftype q0, q1, c, s; q0 = 0.0; for ( int p = 0; p < q.size(); p++ ) q0 += q[p]; q0 /= double( q.size() ); abcd.a() = abcd.b() = abcd.c() = abcd.d() = 0.0; for ( int p = 0; p < q.size(); p++ ) { q1 = ( q[p] - q0 ) / double( (pinc==1) ? (N/2) : 2 ); c = cos( phase(p) ); s = sin( phase(p) ); abcd.a() += q1 * c; abcd.b() += q1 * s; abcd.c() += q1 * (c*c-s*s); abcd.d() += q1 * (2.0*c*s); } } template template void LogPhaseProb::set_phi_fom( const datatypes::Phi_fom& phifom ) { if ( !phifom.missing() ) { dtype x = Util::min( phifom.fom(), dtype(0.999999) ); if ( pinc != 1 ) x = Util::atanh( x ); else x = Util::invsim( x ); for ( int p = 0; p < q.size(); p++ ) q[p] = x*cos( phase(p) - phifom.phi() ); } else { for ( int p = 0; p < q.size(); p++ ) q[p] = 0.0; } } template template void LogPhaseProb::get_phi_fom( datatypes::Phi_fom& phifom ) const { Range qrange( -700.0, 700.0 ); ftype s, a, b, q0, pq; s = a = b = q0 = 0.0; for ( int p = 0; p < q.size(); p++ ) q0 += q[p]; q0 /= double( q.size() ); for ( int p = 0; p < q.size(); p++ ) { pq = exp( qrange.truncate(q[p] - q0) ); s += pq; a += pq * cos( phase(p) ); b += pq * sin( phase(p) ); } std::complex pw( a/s, b/s ); phifom.phi() = std::arg( pw ); phifom.fom() = std::abs( pw ); } template class LogPhaseProb<24>; template void LogPhaseProb<24>::set_abcd(const datatypes::ABCD& abcd); template void LogPhaseProb<24>::get_abcd(datatypes::ABCD& abcd) const; template void LogPhaseProb<24>::set_phi_fom( const datatypes::Phi_fom& phifom ); template void LogPhaseProb<24>::get_phi_fom( datatypes::Phi_fom& phifom ) const; template void LogPhaseProb<24>::set_abcd(const datatypes::ABCD& abcd); template void LogPhaseProb<24>::get_abcd(datatypes::ABCD& abcd) const; template void LogPhaseProb<24>::set_phi_fom( const datatypes::Phi_fom& phifom ); template void LogPhaseProb<24>::get_phi_fom( datatypes::Phi_fom& phifom ) const; template class LogPhaseProb<72>; template void LogPhaseProb<72>::set_abcd(const datatypes::ABCD& abcd); template void LogPhaseProb<72>::get_abcd(datatypes::ABCD& abcd) const; template void LogPhaseProb<72>::set_phi_fom( const datatypes::Phi_fom& phifom ); template void LogPhaseProb<72>::get_phi_fom( datatypes::Phi_fom& phifom ) const; template void LogPhaseProb<72>::set_abcd(const datatypes::ABCD& abcd); template void LogPhaseProb<72>::get_abcd(datatypes::ABCD& abcd) const; template void LogPhaseProb<72>::set_phi_fom( const datatypes::Phi_fom& phifom ); template void LogPhaseProb<72>::get_phi_fom( datatypes::Phi_fom& phifom ) const; template class LogPhaseProb<180>; template void LogPhaseProb<180>::set_abcd(const datatypes::ABCD& abcd); template void LogPhaseProb<180>::get_abcd(datatypes::ABCD& abcd) const; template void LogPhaseProb<180>::set_phi_fom( const datatypes::Phi_fom& phifom ); template void LogPhaseProb<180>::get_phi_fom( datatypes::Phi_fom& phifom ) const; template void LogPhaseProb<180>::set_abcd(const datatypes::ABCD& abcd); template void LogPhaseProb<180>::get_abcd(datatypes::ABCD& abcd) const; template void LogPhaseProb<180>::set_phi_fom( const datatypes::Phi_fom& phifom ); template void LogPhaseProb<180>::get_phi_fom( datatypes::Phi_fom& phifom ) const; template class LogPhaseProb<360>; template void LogPhaseProb<360>::set_abcd(const datatypes::ABCD& abcd); template void LogPhaseProb<360>::get_abcd(datatypes::ABCD& abcd) const; template void LogPhaseProb<360>::set_phi_fom( const datatypes::Phi_fom& phifom ); template void LogPhaseProb<360>::get_phi_fom( datatypes::Phi_fom& phifom ) const; template void LogPhaseProb<360>::set_abcd(const datatypes::ABCD& abcd); template void LogPhaseProb<360>::get_abcd(datatypes::ABCD& abcd) const; template void LogPhaseProb<360>::set_phi_fom( const datatypes::Phi_fom& phifom ); template void LogPhaseProb<360>::get_phi_fom( datatypes::Phi_fom& phifom ) const; } // namespace clipper clipper-2.1/clipper/contrib/0000777000374100011300000000000011372264353013115 500000000000000clipper-2.1/clipper/contrib/originmatch.cpp0000644000374100011300000001103311144026530016025 00000000000000/* originmatch.cpp: Origin matching implementation */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "originmatch.h" namespace clipper { template bool OriginMatch::operator() ( bool& invert, clipper::Coord_frac& shift, const HKL_data >& fphi1, const HKL_data >& fphi2 ) const { const Spacegroup& oldspgr = fphi1.base_hkl_info().spacegroup(); const Cell& oldcell = fphi1.base_hkl_info().cell(); const Resolution& oldreso = fphi1.base_hkl_info().resolution(); // calc point group const Spgr_descr spgrdscr( oldspgr.generator_ops().pgrp_ops() ); const Spacegroup newspgr( spgrdscr ); // new cell and resolution const Cell newcell( oldcell ); const Resolution newreso( Util::max( limit, oldreso.limit() ) ); // new reflection list HKL_info hkls( newspgr, newcell, newreso, true ); HKL_data > fphi(hkls), fphiinv(hkls); HKL_info::HKL_reference_index ih; HKL hkl; datatypes::F_phi fp1, fp2; for ( ih = hkls.first(); !ih.last(); ih.next() ) { hkl = ih.hkl(); fp1 = fphi1[hkl]; fp2 = fphi2[hkl]; if ( !fp1.missing() && !fp2.missing() ) { fphi[ih].f() = fphiinv[ih].f() = fp1.f() * fp2.f(); fphi[ih].phi() = fp1.phi() - fp2.phi(); fphiinv[ih].phi() = fp1.phi() + fp2.phi(); } else { fphi[ih].f() = fphiinv[ih].f() = fphi[ih].phi() = fphiinv[ih].phi() = 0.0; } } // new map Grid_sampling oldgrid( newspgr, newcell, newreso ); Grid_sampling newgrid( ((oldgrid.nu()+11)/12)*12, ((oldgrid.nv()+11)/12)*12, ((oldgrid.nw()+11)/12)*12 ); Xmap xmap( newspgr, newcell, newgrid ); Xmap::Map_reference_index ix; // search for highest peak T mapmax = 0.0; invert = false; shift = Coord_frac( 0.0, 0.0, 0.0 ); { xmap.fft_from( fphi ); for ( ix = xmap.first(); !ix.last(); ix.next() ) if ( xmap[ix] > mapmax ) { mapmax = xmap[ix]; shift = ix.coord().coord_frac( newgrid ); invert = false; } } if ( oldspgr.invariant_under_change_of_hand() ) { xmap.fft_from( fphiinv ); for ( ix = xmap.first(); !ix.last(); ix.next() ) if ( xmap[ix] > mapmax ) { mapmax = xmap[ix]; shift = ix.coord().coord_frac( newgrid ); invert = true; } } // check against symmetry restrictions // return the shift return true; } // compile templates template class OriginMatch; template class OriginMatch; } // namespace clipper clipper-2.1/clipper/contrib/mapfilter.h0000644000374100011300000001523210736662165015176 00000000000000/*! \file mapfilter.h Header file for sample map filtering impelementation \ingroup g_mapf */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_MAPFILTER #define CLIPPER_MAPFILTER #include "function_object_bases.h" namespace clipper { //! Base class for radial map filters class MapFilterFn_base { public: virtual ~MapFilterFn_base() {}; virtual ftype operator() ( const ftype& radius ) const = 0; }; //! Simple slow convolution-based radial mapfiltering implementation /*! This version is of course very slow, and is mainly provided so you can test the repcision of the fft version. \ingroup g_mapf */ template class MapFilter_slow : public MapFilter_base { public: //! Scaling modes enum TYPE { NONE, Absolute, Relative }; //! constructor MapFilter_slow( const MapFilterFn_base& fltr, const ftype scale = 1.0, const TYPE type = NONE ); //! constructor: shorthand for constructor+operator MapFilter_slow( clipper::Xmap& result, const clipper::Xmap& xmap, MapFilterFn_base& fltr, const ftype scale = 1.0, const TYPE type = NONE ); bool operator() ( clipper::Xmap& result, const clipper::Xmap& xmap ) const; private: const MapFilterFn_base* fltr_; ftype scale_; TYPE type_; }; //! Simple fft-based radial mapfiltering implementation /*! The FFT method is fast, and also gives good precision. The following example demonstrates how to use the MapFilter to calculate the local mean and local deviation of an electron density map, in 'xmap': \code // make squared map clipper::Xmap xmap2( xmap ); clipper::Xmap::Map_reference_index ix; for ( ix = xmap2.first(); !ix.last(); ix.next() ) xmap2[ix] = pow( xmap2[ix], 2.0 ); // now calculate local mean, local mean squared clipper::MapFilterFn_step fn( filter_radius ); clipper::MapFilter_fft fltr( fn, 1.0, clipper::MapFilter_fft::Relative ); clipper::Xmap lmean, lsigm; fltr( lmean, xmap ); fltr( lsigm, xmap2 ); // calculate std deviation for ( ix = lmean.first(); !ix.last(); ix.next() ) lsigm[ix] = sqrt( lsigm[ix] - pow( lmean[ix], 2.0 ) ); \endcode This would be a useful step in solvent mask determination, for example. \ingroup g_mapf */ template class MapFilter_fft : public MapFilter_base { public: //! Scaling modes enum TYPE { NONE, Absolute, Relative }; //! constructor MapFilter_fft( const MapFilterFn_base& fltr, const ftype scale = 1.0, const TYPE type = NONE ); //! constructor: shorthand for constructor+operator MapFilter_fft( clipper::Xmap& result, const clipper::Xmap& xmap, MapFilterFn_base& fltr, const ftype scale = 1.0, const TYPE type = NONE ); bool operator() ( clipper::Xmap& result, const clipper::Xmap& xmap ) const; bool operator() ( clipper::NXmap& result, const clipper::NXmap& nxmap ) const; private: const MapFilterFn_base* fltr_; ftype scale_; TYPE type_; }; //! Step-function radial map filter /*! \ingroup g_mapf */ class MapFilterFn_step : public MapFilterFn_base { public: //! constructor: takes radius for step function cutoff MapFilterFn_step( const ftype& radius ) : radius_( radius ) {} //! destructor MapFilterFn_step() {} //! evaluate radial step function: 1.0 if inside or 0.0 outside ftype operator() ( const ftype& radius ) const { return (radius bool SFscale_aniso::operator() ( HKL_data >& fo, const HKL_data >& fc ) { typedef HKL_info::HKL_reference_index HRI; // expand to P1 in order to preserve symmetry const HKL_info& hkls = fo.hkl_info(); Spacegroup spgrp1( Spacegroup::P1 ); HKL_info hkl1( spgrp1, hkls.cell(), hkls.resolution(), true ); HKL_data > fo1( hkl1 ); HKL_data > fc1( hkl1 ); for ( HRI ih = hkl1.first(); !ih.last(); ih.next() ) { datatypes::F_sigF f = fo[ih.hkl()]; if ( f.f() >= nsig_ * f.sigf() ) { fo1[ih] = f; fc1[ih] = fc[ih.hkl()]; } } // do the aniso scaling std::vector param( 7, 0.0 ); BasisFn_log_aniso_gaussian bfn; TargetFn_scaleLogF1F2,datatypes::F_phi > tfn( fo1, fc1 ); ResolutionFn rfn( hkl1, bfn, tfn, param ); for ( HRI ih = hkls.first(); !ih.last(); ih.next() ) if ( !fo[ih].missing() ) fo[ih].scale( exp( 0.5*bfn.f(ih.hkl(),hkls.cell(),rfn.params()) ) ); u_i = bfn.u_aniso_orth( rfn.params() ); u_f = 0.5 * u_i; return true; } template bool SFscale_aniso::operator() ( HKL_data >& fc, const HKL_data >& fo ) { typedef HKL_info::HKL_reference_index HRI; // expand to P1 in order to preserve symmetry const HKL_info& hkls = fo.hkl_info(); Spacegroup spgrp1( Spacegroup::P1 ); HKL_info hkl1( spgrp1, hkls.cell(), hkls.resolution(), true ); HKL_data > fo1( hkl1 ); HKL_data > fc1( hkl1 ); for ( HRI ih = hkl1.first(); !ih.last(); ih.next() ) { datatypes::F_sigF f = fo[ih.hkl()]; if ( f.f() >= nsig_ * f.sigf() ) { fo1[ih] = f; fc1[ih] = fc[ih.hkl()]; } } // do the aniso scaling std::vector param( 7, 0.0 ); BasisFn_log_aniso_gaussian bfn; TargetFn_scaleLogF1F2,datatypes::F_sigF > tfn( fc1, fo1 ); ResolutionFn rfn( hkl1, bfn, tfn, param ); for ( HRI ih = hkls.first(); !ih.last(); ih.next() ) if ( !fc[ih].missing() ) fc[ih].scale( exp( 0.5*bfn.f(ih.hkl(),hkls.cell(),rfn.params()) ) ); u_i = bfn.u_aniso_orth( rfn.params() ); u_f = 0.5 * u_i; return true; } template bool SFscale_aniso::operator() ( HKL_data >& fo ) { typedef datatypes::F_sigF DATA; typedef TargetFn_scaleF1F2 TGT1; typedef TargetFn_scaleLogF1F2 TGT2; typedef BasisFn_spline SCALETYPE; return scale( fo, -1.0, 12 ); } template bool SFscale_aniso::operator() ( HKL_data >& fo, ftype resfilter, const int npar_scl ) { typedef datatypes::F_sigF DATA; typedef TargetFn_scaleF1F2 TGT1; typedef TargetFn_scaleLogF1F2 TGT2; typedef BasisFn_spline SCALETYPE; return scale( fo, resfilter, npar_scl ); } template bool SFscale_aniso::operator() ( HKL_data >& Io, ftype resfilter, const int npar_scl ) { typedef datatypes::I_sigI DATA; typedef TargetFn_scaleI1I2 TGT1; typedef TargetFn_scaleLogI1I2 TGT2; typedef BasisFn_spline SCALETYPE; return scale( Io, resfilter, npar_scl ); } template template bool SFscale_aniso::scale( HKL_data& fo, const ftype resfilter, const int npar_scl ) { typedef HKL_info::HKL_reference_index HRI; // expand to P1 in order to preserve symmetry const HKL_info& hkls = fo.hkl_info(); Spacegroup spgrp1( Spacegroup::P1 ); HKL_info hkl1( spgrp1, hkls.cell(), hkls.resolution(), true ); HKL_data fo1( hkl1 ), fs1( hkl1 ), fc1( hkl1 ); for ( HRI ih = hkl1.first(); !ih.last(); ih.next() ) { D f = fo[ih.hkl()]; if ( obs(f) >= nsig_ * sigobs(f) ) fo1[ih] = f; } // calc target values fc1 = D( 1.0, 1.0 ); for ( HRI ih = fc1.first(); !ih.last(); ih.next() ) fc1[ih].scale( sqrt( ih.hkl_class().epsilon() ) ); // do correction u_i = u_f = U_aniso_orth( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ); std::vector param( 7, 0.0 ); BasisFn_log_aniso_gaussian bfn; ftype dp; for ( int c = 0; c < 2; c++ ) { // remove current anistropy estimate datatypes::Compute_scale_u_aniso compute_s(1.0,-u_f); fs1.compute( fo1, compute_s ); /*{ T2 tfn( fs1, fc1 ); param = std::vector( 7, 0.0 ); ResolutionFn rfn( hkl1, bfn, tfn, param ); param = rfn.params(); dp = (param[1]+param[2]+param[3])/3.0; param[1] -= dp; param[2] -= dp; param[3] -= dp; std::cout << "#" << param[1] << " " << param[2] << " " << param[3] << " " << param[4] << " " << param[5] << " " << param[6] << "\n"; std::cout << "\n"; }*/ // and calc E scale S basissc( fs1, npar_scl, 1.0 ); std::vector param_fo( basissc.num_params(), 1.0 ); T1 tfn_fo( fs1, fc1 ); ResolutionFn rfn_fo( hkl1, basissc, tfn_fo, param_fo ); param_fo = rfn_fo.params(); // prescale F to E-like scale for ( HRI ih = fs1.first(); !ih.last(); ih.next() ) { fs1[ih] = fo1[ih]; fs1[ih].scale( sqrt( basissc.f_s( ih.invresolsq(), param_fo ) ) ); } /*for ( int i = 0; i < param_fo.size(); i++ ) std::cout << param_fo[i] << " "; std::cout << std::endl; { S basissc( fs1, npar_scl, 1.0 ); std::vector param_fo( basissc.num_params(), 1.0 ); T1 tfn_fo( fs1, fc1 ); ResolutionFn rfn_fo( hkl1, basissc, tfn_fo, param_fo ); param_fo = rfn_fo.params(); for ( int i = 0; i < param_fo.size(); i++ ) std::cout << param_fo[i] << " "; std::cout << std::endl; }*/ // if required, weight low res terms towards isotropic if ( resfilter > 0.0 ) { ftype ssq = clipper::Resolution( resfilter ).invresolsq_limit(); for ( HRI ih = fs1.first(); !ih.last(); ih.next() ) if ( !fs1[ih].missing() ) { ftype w = exp( -0.5 * ih.invresolsq() / ssq ); fs1[ih] = D( exp( (1.0-w)*log(obs(fs1[ih]))+(w)*log(obs(fc1[ih])) ), sigobs(fs1[ih]) ); } } // do the aniso scaling T2 tfn( fs1, fc1 ); param = std::vector( 7, 0.0 ); ResolutionFn rfn( hkl1, bfn, tfn, param ); param = rfn.params(); // set trace to zero (i.e. no isotropic correction) dp = (param[1]+param[2]+param[3])/3.0; param[1] -= dp; param[2] -= dp; param[3] -= dp; u_i = bfn.u_aniso_orth( param ); u_f = 0.5 * u_i; //std::cout << c << " | " << param[1] << " " << param[2] << " " << param[3] << " " << param[4] << " " << param[5] << " " << param[6] << "\n"; std::cout << " DP " << dp << "\n"; } // sharpen or smooth as required Matrix m(3,3); m(0,0)= param[1]; m(1,1)= param[2]; m(2,2)= param[3]; m(0,1)=m(1,0)=param[4]; m(0,2)=m(2,0)=param[5]; m(1,2)=m(2,1)=param[6]; std::vector ev = m.eigen(); //std::cout << "EIGEN " << param[1] << " " << param[2] << " " << param[3] << " " << ev[0] << " " << ev[1] << " " << ev[2] << std::endl; dp = 0.0; if ( mode_ == SHARPEN ) dp = ev[2]; if ( mode_ == UNSHARPEN ) dp = ev[0]; param[1] -= dp; param[2] -= dp; param[3] -= dp; u_i = bfn.u_aniso_orth( param ); u_f = 0.5 * u_i; // store the results datatypes::Compute_scale_u_aniso compute_s(1.0,-u_f); fo.compute( fo, compute_s ); return true; } template const U_aniso_orth& SFscale_aniso::u_aniso_orth( TYPE t ) const { if ( t == I ) return u_i; else return u_f; } // compile templates template class SFscale_aniso; template bool SFscale_aniso::scale,TargetFn_scaleF1F2,datatypes::F_sigF >,TargetFn_scaleLogF1F2,datatypes::F_sigF >,BasisFn_binner>( HKL_data >& fo, const ftype resfilter, const int npar_scl ); template bool SFscale_aniso::scale,TargetFn_scaleF1F2,datatypes::F_sigF >,TargetFn_scaleLogF1F2,datatypes::F_sigF >,BasisFn_linear>( HKL_data >& fo, const ftype resfilter, const int npar_scl ); template bool SFscale_aniso::scale,TargetFn_scaleF1F2,datatypes::F_sigF >,TargetFn_scaleLogF1F2,datatypes::F_sigF >,BasisFn_spline>( HKL_data >& fo, const ftype resfilter, const int npar_scl ); template bool SFscale_aniso::scale,TargetFn_scaleI1I2,datatypes::I_sigI >,TargetFn_scaleLogI1I2,datatypes::I_sigI >,BasisFn_binner>( HKL_data >& fo, const ftype resfilter, const int npar_scl ); template bool SFscale_aniso::scale,TargetFn_scaleI1I2,datatypes::I_sigI >,TargetFn_scaleLogI1I2,datatypes::I_sigI >,BasisFn_linear>( HKL_data >& fo, const ftype resfilter, const int npar_scl ); template bool SFscale_aniso::scale,TargetFn_scaleI1I2,datatypes::I_sigI >,TargetFn_scaleLogI1I2,datatypes::I_sigI >,BasisFn_spline>( HKL_data >& fo, const ftype resfilter, const int npar_scl ); template class SFscale_aniso; template bool SFscale_aniso::scale,TargetFn_scaleF1F2,datatypes::F_sigF >,TargetFn_scaleLogF1F2,datatypes::F_sigF >,BasisFn_binner>( HKL_data >& fo, const ftype resfilter, const int npar_scl ); template bool SFscale_aniso::scale,TargetFn_scaleF1F2,datatypes::F_sigF >,TargetFn_scaleLogF1F2,datatypes::F_sigF >,BasisFn_linear>( HKL_data >& fo, const ftype resfilter, const int npar_scl ); template bool SFscale_aniso::scale,TargetFn_scaleF1F2,datatypes::F_sigF >,TargetFn_scaleLogF1F2,datatypes::F_sigF >,BasisFn_spline>( HKL_data >& fo, const ftype resfilter, const int npar_scl ); template bool SFscale_aniso::scale,TargetFn_scaleI1I2,datatypes::I_sigI >,TargetFn_scaleLogI1I2,datatypes::I_sigI >,BasisFn_binner>( HKL_data >& fo, const ftype resfilter, const int npar_scl ); template bool SFscale_aniso::scale,TargetFn_scaleI1I2,datatypes::I_sigI >,TargetFn_scaleLogI1I2,datatypes::I_sigI >,BasisFn_linear>( HKL_data >& fo, const ftype resfilter, const int npar_scl ); template bool SFscale_aniso::scale,TargetFn_scaleI1I2,datatypes::I_sigI >,TargetFn_scaleLogI1I2,datatypes::I_sigI >,BasisFn_spline>( HKL_data >& fo, const ftype resfilter, const int npar_scl ); } // namespace clipper clipper-2.1/clipper/contrib/sfcalc.cpp0000644000374100011300000001734210736662165015005 00000000000000/* sfcalc.cpp: Structure factor calculation implementation */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "sfcalc.h" #include "../core/atomsf.h" namespace clipper { template bool SFcalc_iso_sum::operator() ( HKL_data >& fphidata, const Atom_list& atoms ) const { const HKL_info& hkls = fphidata.base_hkl_info(); const Cell& cell = fphidata.base_cell(); const Spacegroup& spgr = hkls.spacegroup(); fphidata = datatypes::F_phi( std::complex( 0.0, 0.0 ) ); HKL_info::HKL_reference_index ih; for ( int i = 0; i < atoms.size(); i++ ) if ( !atoms[i].is_null() ) { AtomShapeFn sf( atoms[i].coord_orth(), atoms[i].element(), atoms[i].u_iso(), atoms[i].occupancy() ); for ( int j = 0; j < spgr.num_symops(); j++ ) { Coord_frac uvw = atoms[i].coord_orth().coord_frac( cell ).transform( spgr.symop(j) ); for ( ih = hkls.first(); !ih.last(); ih.next() ) { T phi = Util::twopi() * (ih.hkl().coord_reci_frac()*uvw); fphidata[ih] = std::complex(fphidata[ih]) + T( sf.f(ih.invresolsq()) ) * std::complex( cos(phi), sin(phi) ); } } } return true; } template bool SFcalc_aniso_sum::operator() ( HKL_data >& fphidata, const Atom_list& atoms ) const { const HKL_info& hkls = fphidata.base_hkl_info(); const Cell& cell = fphidata.base_cell(); const Spacegroup& spgr = hkls.spacegroup(); fphidata = datatypes::F_phi( std::complex( 0.0, 0.0 ) ); HKL_info::HKL_reference_index ih; for ( int i = 0; i < atoms.size(); i++ ) if ( !atoms[i].is_null() ) { for ( int j = 0; j < spgr.num_symops(); j++ ) { Atom atom( atoms[i] ); atom.transform( spgr.symop(j).rtop_orth( cell ) ); AtomShapeFn sf( atom ); Coord_frac uvw = atom.coord_orth().coord_frac( cell ); for ( ih = hkls.first(); !ih.last(); ih.next() ) { T phi = Util::twopi() * (ih.hkl().coord_reci_frac()*uvw); fphidata[ih] = std::complex(fphidata[ih]) + T(sf.f(ih.hkl().coord_reci_orth(cell))) * std::complex( cos(phi), sin(phi) ); } } } return true; } template bool SFcalc_iso_fft::operator() ( HKL_data >& fphidata, const Atom_list& atoms ) const { const HKL_info& hkls = fphidata.base_hkl_info(); const Cell& cell = fphidata.base_cell(); const Spacegroup& spgr = hkls.spacegroup(); const Grid_sampling grid( spgr, cell, hkls.resolution(), rate_ ); Xmap xmap( spgr, cell, grid ); Coord_frac uvw, duvw; Coord_grid g0, g1; Grid_range gd( cell, grid, radius_ ); Xmap::Map_reference_coord i0, iu, iv, iw; for ( int i = 0; i < atoms.size(); i++ ) if ( !atoms[i].is_null() ) { AtomShapeFn sf( atoms[i].coord_orth(), atoms[i].element(), atoms[i].u_iso() + uadd_, atoms[i].occupancy() ); uvw = atoms[i].coord_orth().coord_frac( cell ); g0 = uvw.coord_grid( grid ) + gd.min(); g1 = uvw.coord_grid( grid ) + gd.max(); i0 = Xmap::Map_reference_coord( xmap, g0 ); for ( iu = i0; iu.coord().u() <= g1.u(); iu.next_u() ) for ( iv = iu; iv.coord().v() <= g1.v(); iv.next_v() ) for ( iw = iv; iw.coord().w() <= g1.w(); iw.next_w() ) xmap[iw] += sf.rho( iw.coord_orth() ); } for ( Xmap::Map_reference_index ix = xmap.first(); !ix.last(); ix.next() ) xmap[ix] *= xmap.multiplicity( ix.coord() ); xmap.fft_to( fphidata ); if ( uadd_ != 0.0 ) { ftype u = Util::twopi2()*uadd_; for ( HKL_info::HKL_reference_index ih = fphidata.first_data(); !ih.last(); fphidata.next_data( ih ) ) fphidata[ih].scale( exp( u * ih.invresolsq() ) ); } return true; } template bool SFcalc_aniso_fft::operator() ( HKL_data >& fphidata, const Atom_list& atoms ) const { const HKL_info& hkls = fphidata.base_hkl_info(); const Cell& cell = fphidata.base_cell(); const Spacegroup& spgr = hkls.spacegroup(); const Grid_sampling grid( spgr, cell, hkls.resolution(), rate_ ); Xmap xmap( spgr, cell, grid ); U_aniso_orth uadd( uadd_ ); Coord_frac uvw, duvw; Coord_grid g0, g1; Grid_range gd( cell, grid, radius_ ); Xmap::Map_reference_coord i0, iu, iv, iw; for ( int i = 0; i < atoms.size(); i++ ) if ( !atoms[i].is_null() ) { U_aniso_orth u( atoms[i].u_aniso_orth() ); if ( u.is_null() ) u = U_aniso_orth( atoms[i].u_iso() ); AtomShapeFn sf( atoms[i].coord_orth(), atoms[i].element(), u + uadd, atoms[i].occupancy() ); uvw = atoms[i].coord_orth().coord_frac( cell ); g0 = uvw.coord_grid( grid ) + gd.min(); g1 = uvw.coord_grid( grid ) + gd.max(); i0 = Xmap::Map_reference_coord( xmap, g0 ); for ( iu = i0; iu.coord().u() <= g1.u(); iu.next_u() ) for ( iv = iu; iv.coord().v() <= g1.v(); iv.next_v() ) for ( iw = iv; iw.coord().w() <= g1.w(); iw.next_w() ) xmap[iw] += sf.rho( iw.coord_orth() ); } for ( Xmap::Map_reference_index ix = xmap.first(); !ix.last(); ix.next() ) xmap[ix] *= xmap.multiplicity( ix.coord() ); xmap.fft_to( fphidata ); if ( uadd_ != 0.0 ) { ftype u = Util::twopi2()*uadd_; for ( HKL_info::HKL_reference_index ih = fphidata.first_data(); !ih.last(); fphidata.next_data( ih ) ) fphidata[ih].scale( exp( u * ih.invresolsq() ) ); } return true; } // compile templates template class SFcalc_iso_sum; template class SFcalc_aniso_sum; template class SFcalc_iso_fft; template class SFcalc_aniso_fft; template class SFcalc_iso_sum; template class SFcalc_aniso_sum; template class SFcalc_iso_fft; template class SFcalc_aniso_fft; } // namespace clipper clipper-2.1/clipper/contrib/edcalc.h0000644000374100011300000000717510736662165014435 00000000000000/*! \file edcalc.h Header file for sample Electron density calculation impelementation \ingroup g_edcalc */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_EDCALC #define CLIPPER_EDCALC #include "function_object_bases.h" namespace clipper { //! Atom mask calculation /*! \ingroup g_edcalc All points within the specified radius of an atom will be set to 1.0, all others will be set to 0.0. */ template class EDcalc_mask : public EDcalc_base { public: EDcalc_mask( const ftype radius = 2.5 ) : radius_(radius) {} bool operator() ( Xmap& xmap, const Atom_list& atoms ) const; bool operator() ( NXmap& nxmap, const Atom_list& atoms ) const; private: const ftype radius_; }; //! Isotropic electron density calculation /*! \ingroup g_edcalc */ template class EDcalc_iso : public EDcalc_base { public: EDcalc_iso( const ftype radius = 2.5 ) : radius_(radius) {} bool operator() ( Xmap& xmap, const Atom_list& atoms ) const; bool operator() ( NXmap& nxmap, const Atom_list& atoms ) const; private: const ftype radius_; }; //! Anisotropic electron density calculation /*! \ingroup g_edcalc */ template class EDcalc_aniso : public EDcalc_base { public: EDcalc_aniso( const ftype radius = 2.5 ) : radius_(radius) {} bool operator() ( Xmap& xmap, const Atom_list& atoms ) const; bool operator() ( NXmap& nxmap, const Atom_list& atoms ) const; private: const ftype radius_; }; } // namespace clipper #endif clipper-2.1/clipper/contrib/fffear.cpp0000644000374100011300000004663211021447637015000 00000000000000/* fffear.cpp: FFFear implementation */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "fffear.h" #include "../core/map_interp.h" namespace clipper { // deprecated forms bool FFFear_slow_basic::operator() ( Xmap& result, const NXmap& srchval, const NXmap& srchwgt ) const { const Xmap& xmap = *xmp; Xmap::Map_reference_index pos; Xmap::Map_reference_coord i0, iu, iv, iw; NXmap::Map_reference_index in( srchval ); Coord_grid g0, g1, off0, off1, nx; float s; off0 = Coord_grid( srchval.grid().nu()/2, srchval.grid().nv()/2, srchval.grid().nw()/2 ); off1 = Coord_grid( srchval.grid().nu() - off0.u() - 1, srchval.grid().nv() - off0.w() - 1, srchval.grid().nw() - off0.w() - 1 ); for ( pos = result.first(); !pos.last(); pos.next() ) { g0 = pos.coord() - off0; g1 = pos.coord() + off1; i0 = Xmap_base::Map_reference_coord( *xmp, g0 ); s = 0.0; for ( iu = i0; iu.coord().u() <= g1.u(); iu.next_u() ) for ( iv = iu; iv.coord().v() <= g1.v(); iv.next_v() ) for ( iw = iv; iw.coord().w() <= g1.w(); iw.next_w() ) { in.set_coord( iw.coord() - g0 ); s += srchwgt[in] * pow( xmap[iw] - srchval[in], 2 ); } result[pos] = s; } return true; } void FFFear_fft_basic::init( const Xmap& xmap ) { vol = xmap.cell().volume(); rho1.init( xmap.grid_sampling() ); rho2.init( xmap.grid_sampling() ); const Grid_sampling& g = xmap.grid_sampling(); float r; Xmap::Map_reference_coord i0( xmap, Coord_grid(0,0,0) ); Xmap::Map_reference_coord iu, iv, iw; for ( iu = i0; iu.coord().u() < g.nu(); iu.next_u() ) for ( iv = iu; iv.coord().v() < g.nv(); iv.next_v() ) for ( iw = iv; iw.coord().w() < g.nw(); iw.next_w() ) { r = xmap[iw]; rho1.real_data( iw.coord() ) = r; rho2.real_data( iw.coord() ) = r*r; } rho1.fft_x_to_h( vol ); rho2.fft_x_to_h( vol ); } bool FFFear_fft_basic::operator() ( Xmap& result, const NXmap& srchval, const NXmap& srchwgt ) const { const Grid_sampling& g = rho1.grid_real(); FFTmap_p1 map1( g ); FFTmap_p1 map2( g ); // copy mask into grid, with offset Coord_grid c0, c1, c; c0 = Coord_grid( srchval.grid().nu()/2, srchval.grid().nv()/2, srchval.grid().nw()/2 ); ftype f, w; ftype swff = 0.0; const Grid& gx = srchval.grid(); for ( c.u() = 0; c.u() < gx.nu(); c.u()++ ) for ( c.v() = 0; c.v() < gx.nv(); c.v()++ ) for ( c.w() = 0; c.w() < gx.nw(); c.w()++ ) { c1 = (c - c0).unit(g); f = srchval.get_data(c); w = srchwgt.get_data(c); map1.real_data( c1 ) = w; map2.real_data( c1 ) = w*f; swff += w*f*f; } // fft map1.fft_x_to_h( vol ); map2.fft_x_to_h( vol ); // calculate const Grid& gh = map1.grid_reci(); const ftype32 two = 2.0; std::complex ww, wf, r1, r2; for ( c.u() = 0; c.u() < gh.nu(); c.u()++ ) for ( c.v() = 0; c.v() < gh.nv(); c.v()++ ) for ( c.w() = 0; c.w() < gh.nw(); c.w()++ ) { r1 = rho1.cplx_data( c ); r2 = rho2.cplx_data( c ); ww = map1.cplx_data( c ); wf = map2.cplx_data( c ); map1.cplx_data( c ) = std::conj(ww)*r2 - two*std::conj(wf)*r1; } // invert map1.fft_h_to_x( 1.0 / vol ); // store ftype s = map1.grid_real().size() / vol; for ( Xmap::Map_reference_index ix = result.first(); !ix.last(); ix.next() ) result[ix] = swff + s * map1.real_data( ix.coord() ); return true; } // general forms // slow fffear template bool FFFear_slow::operator() ( Xmap& result, const NXmap& srchval, const NXmap& srchwgt ) const { NX_operator nxop( result, srchval, RTop_orth::identity() ); return (*this)( result, srchval, srchwgt, nxop ); } template bool FFFear_slow::operator() ( Xmap& result, const NXmap& srchval, const NXmap& srchwgt, const NX_operator& nxop ) const { const Grid_sampling& g = result.grid_sampling(); // calculate extent of mask function in Xmap space Coord_frac cf; Range urange, vrange, wrange; typename NXmap::Map_reference_index inx; for ( inx = srchwgt.first(); !inx.last(); inx.next() ) if ( srchwgt[inx] > 0.0 ) { cf = nxop.coord_frac( inx.coord().coord_map() ); urange.include( cf.u() ); vrange.include( cf.v() ); wrange.include( cf.w() ); } cf = Coord_frac( urange.min(), vrange.min(), wrange.min() ); Coord_grid g0 = cf.coord_map( g ).coord_grid() - Coord_grid(1,1,1); cf = Coord_frac( urange.max(), vrange.max(), wrange.max() ); Coord_grid g1 = cf.coord_map( g ).coord_grid() + Coord_grid(1,1,1); Grid_range gm( g0, g1 ); // copy provided NXmap in new NXmap shadowing the xtal grid NXmap target( result.cell(), g, gm ); NXmap weight( result.cell(), g, gm ); target = weight = 0.0; typename NXmap::Map_reference_index in; Coord_map cm; for ( in = target.first(); !in.last(); in.next() ) { cm = nxop.coord_map( in.coord_orth().coord_frac( result.cell() ) ); if ( Interp_linear::can_interp( srchval, cm ) && Interp_linear::can_interp( srchwgt, cm ) ) { Interp_linear::interp( srchval, cm, target[in] ); Interp_linear::interp( srchwgt, cm, weight[in] ); } } // now calculate the search function const Xmap& xmap = *xmp; typename Xmap::Map_reference_index pos; typename Xmap::Map_reference_coord i0, iu, iv, iw; T s; for ( pos = result.first(); !pos.last(); pos.next() ) { g0 = pos.coord() + gm.min(); g1 = pos.coord() + gm.max(); i0 = Xmap_base::Map_reference_coord( xmap, g0 ); s = 0.0; for ( iu = i0; iu.coord().u() <= g1.u(); iu.next_u() ) for ( iv = iu; iv.coord().v() <= g1.v(); iv.next_v() ) for ( iw = iv; iw.coord().w() <= g1.w(); iw.next_w() ) { in.set_coord( iw.coord() - g0 ); s += weight[in] * pow( xmap[iw] - target[in], 2 ); } result[pos] = s; } return true; } // fast fffear template void FFFear_fft::init( const Xmap& xmap ) { cell = xmap.cell(); rho1.init( xmap.grid_sampling() ); rho2.init( xmap.grid_sampling() ); const Grid_sampling& g = xmap.grid_sampling(); T r; typename Xmap::Map_reference_coord i0( xmap, Coord_grid(0,0,0) ); typename Xmap::Map_reference_coord iu, iv, iw; for ( iu = i0; iu.coord().u() < g.nu(); iu.next_u() ) for ( iv = iu; iv.coord().v() < g.nv(); iv.next_v() ) for ( iw = iv; iw.coord().w() < g.nw(); iw.next_w() ) { r = xmap[iw]; rho1.real_data( iw.coord() ) = r; rho2.real_data( iw.coord() ) = r*r; } rho1.fft_x_to_h( cell.volume() ); rho2.fft_x_to_h( cell.volume() ); ffttype = Default; } template void FFFear_fft::set_fft_type( FFTtype type ) { ffttype = type; } template void FFFear_fft::set_resolution( Resolution reso ) { const Grid_sampling& g = rho1.grid_real(); const Grid& gr = rho1.grid_reci(); const ftype slim = reso.invresolsq_limit(); std::complex zero( 0.0, 0.0 ); Coord_grid ch( g.nu()/2, g.nv()/2, g.nw()/2 ); Coord_grid c; HKL hkl; for ( c.u() = 0; c.u() < gr.nu(); c.u()++ ) for ( c.v() = 0; c.v() < gr.nv(); c.v()++ ) for ( c.w() = 0; c.w() < gr.nw(); c.w()++ ) { hkl = HKL( ( c + ch ).unit( g ) - ch ); if ( hkl.invresolsq( cell ) > slim ) { rho1.cplx_data(c) = zero; rho2.cplx_data(c) = zero; } } } template bool FFFear_fft::operator() ( Xmap& result, const NXmap& srchval, const NXmap& srchwgt ) const { NX_operator nxop( result, srchval, RTop_orth::identity() ); return (*this)( result, srchval, srchwgt, nxop ); } template bool FFFear_fft::operator() ( Xmap& result, const NXmap& srchval, const NXmap& srchwgt, const RTop_orth& rtop ) const { NX_operator nxop( result, srchval, rtop ); return (*this)( result, srchval, srchwgt, nxop ); } template bool FFFear_fft::operator() ( Xmap& result, const NXmap& srchval, const NXmap& srchwgt, const NX_operator& nxop ) const { if ( cell.is_null() ) Message::message( Message_fatal( "FFFear_fft uninitialised" ) ); const double vol = cell.volume(); // calculate extent of mask function in Xmap space const Grid_sampling& g = rho1.grid_real(); Coord_frac cf; Range urange, vrange, wrange; typename NXmap::Map_reference_index inx; for ( inx = srchwgt.first(); !inx.last(); inx.next() ) if ( srchwgt[inx] > 0.0 ) { cf = nxop.coord_frac( inx.coord().coord_map() ); urange.include( cf.u() ); vrange.include( cf.v() ); wrange.include( cf.w() ); } cf = Coord_frac( urange.min(), vrange.min(), wrange.min() ); Coord_grid g0 = cf.coord_map( g ).coord_grid() - Coord_grid(1,1,1); cf = Coord_frac( urange.max(), vrange.max(), wrange.max() ); Coord_grid g1 = cf.coord_map( g ).coord_grid() + Coord_grid(1,1,1); if ( ffttype == Normal || ffttype == Default ) { // NORMAL MAP CALCULATION FFTmap_p1 map1( g ), map2( g ); // copy mask into grid, with offset Coord_grid c, cu; Coord_map cm; T f, w; ftype64 swff = 0.0; for ( c.u() = g0.u(); c.u() <= g1.u(); c.u()++ ) for ( c.v() = g0.v(); c.v() <= g1.v(); c.v()++ ) for ( c.w() = g0.w(); c.w() <= g1.w(); c.w()++ ) { cm = nxop.coord_map( c.coord_frac( g ) ); if ( Interp_linear::can_interp( srchval, cm ) && Interp_linear::can_interp( srchwgt, cm ) ) { Interp_linear::interp( srchval, cm, f ); Interp_linear::interp( srchwgt, cm, w ); cu = c.unit(g); map1.real_data( cu ) = w; map2.real_data( cu ) = w*f; swff += w*f*f; } } // fft map1.fft_x_to_h( vol ); map2.fft_x_to_h( vol ); // calculate const Grid& gh = map1.grid_reci(); const ftype32 two = 2.0; std::complex ww, wf, r1, r2; for ( c.u() = 0; c.u() < gh.nu(); c.u()++ ) for ( c.v() = 0; c.v() < gh.nv(); c.v()++ ) for ( c.w() = 0; c.w() < gh.nw(); c.w()++ ) { r1 = rho1.cplx_data( c ); r2 = rho2.cplx_data( c ); ww = map1.cplx_data( c ); wf = map2.cplx_data( c ); map1.cplx_data( c ) = std::conj(ww)*r2 - two*std::conj(wf)*r1; } // invert map1.fft_h_to_x( map1.grid_real().size() / pow( vol, 2 ) ); // store for ( typename Xmap::Map_reference_index ix = result.first(); !ix.last(); ix.next() ) result[ix] = swff + map1.real_data( ix.coord() ); } else { // if ffttype // SPARSE MAP CALCULATION FFTmap_sparse_p1_xh smap1( g ), smap2( g ); FFTmap_p1 map1( g ); // copy mask into grid, with offset Coord_grid c, cu; Coord_map cm; T f, w; ftype64 swff = 0.0; for ( c.u() = g0.u(); c.u() <= g1.u(); c.u()++ ) for ( c.v() = g0.v(); c.v() <= g1.v(); c.v()++ ) for ( c.w() = g0.w(); c.w() <= g1.w(); c.w()++ ) { cm = nxop.coord_map( c.coord_frac( g ) ); if ( Interp_linear::can_interp( srchval, cm ) && Interp_linear::can_interp( srchwgt, cm ) ) { Interp_linear::interp( srchval, cm, f ); Interp_linear::interp( srchwgt, cm, w ); if ( w > 0.0 ) { cu = c.unit(g); smap1.real_data( cu ) = w; smap2.real_data( cu ) = w*f; swff += w*f*f; } } } // require hkls const Grid& gh = map1.grid_reci(); Coord_grid ch( g.nu()/2, g.nv()/2, g.nw()/2 ); HKL hkl; for ( c.u() = 0; c.u() < gh.nu(); c.u()++ ) for ( c.v() = 0; c.v() < gh.nv(); c.v()++ ) for ( c.w() = 0; c.w() < gh.nw(); c.w()++ ) { const std::complex& r1 = rho1.cplx_data(c); const std::complex& r2 = rho2.cplx_data(c); if ( r1.real() != 0.0 || r1.imag() != 0.0 || r2.real() != 0.0 || r2.imag() != 0.0 ) { hkl = HKL( ( c + ch ).unit( g ) - ch ); smap1.require_hkl( hkl ); smap2.require_hkl( hkl ); } } // fft smap1.fft_x_to_h( vol ); smap2.fft_x_to_h( vol ); // calculate const ftype32 two( 2.0 ); std::complex ww, wf; for ( c.u() = 0; c.u() < gh.nu(); c.u()++ ) for ( c.v() = 0; c.v() < gh.nv(); c.v()++ ) for ( c.w() = 0; c.w() < gh.nw(); c.w()++ ) { const std::complex& r1 = rho1.cplx_data(c); const std::complex& r2 = rho2.cplx_data(c); if ( r1.real() != 0.0 || r1.imag() != 0.0 || r2.real() != 0.0 || r2.imag() != 0.0 ) { ww = smap1.cplx_data( c ); wf = smap2.cplx_data( c ); map1.cplx_data( c ) = std::conj(ww)*r2 - two*std::conj(wf)*r1; } else { map1.cplx_data( c ) = std::complex(0.0,0.0); } } // invert map1.fft_h_to_x( map1.grid_real().size() / pow( vol, 2 ) ); // store for ( typename Xmap::Map_reference_index ix = result.first(); !ix.last(); ix.next() ) result[ix] = swff + map1.real_data( ix.coord() ); } // if ffttype return true; } // compile templates template class FFFear_slow; template class FFFear_slow; template class FFFear_fft; template class FFFear_fft; } // namespace clipper /* template void FFFear_fft::init( const Xmap& xmap, const NXmap& srchval, const NXmap& srchwgt ) { // initialise map init( xmap ); // initialise search function int n = 64; int n2 = n / 2; const Grid_sampling gfft(n,n,n); const Grid_sampling grcp(n+1,n+1,n+1); Coord_orth c0 = srchval.coord_orth( Coord_map(0.0,0.0,0.0) ); Coord_orth c1 = srchval.coord_orth( Coord_map(1.0,0.0,0.0) ); Coord_orth c2 = srchval.coord_orth( Coord_map(0.0,1.0,0.0) ); Coord_orth c3 = srchval.coord_orth( Coord_map(0.0,0.0,1.0) ); ftype d1 = c1.x() - c0.x(); ftype d2 = c2.y() - c0.y(); ftype d3 = c3.z() - c0.z(); ftype dr = ( fabs(c1.y()-c0.y())+fabs(c2.z()-c0.z())+fabs(c3.x()-c0.x()) + fabs(c1.z()-c0.z())+fabs(c2.x()-c0.x())+fabs(c3.y()-c0.y()) ); if ( d2 - d1 > 1.0e-6 || d3 - d1 > 1.0e-6 || dr > 1.0e-6 ) clipper::Message::message( clipper::Message_fatal( "FFFear_fft: NXmap noncubic" ) ); ftype d = ( d1 + d2 + d3 ) / 3.0; slim = 0.5 / d; sumwff = 0.0; ftype cx = ftype( n2 ); ftype sx = cx / slim; double volfft = gfft.size() * d * d * d; RTop<> rtnull = RTop<>::identity(); recip1.init( grcp, rtnull ); recip2.init( grcp, rtnull ); FFTmap_p1 wrk1( gfft ), wrk2( gfft ); int ni = srchval.grid().nu(); int ni2 = (ni-1)/2; for ( int u = 0; u < ni; u++ ) for ( int v = 0; v < ni; v++ ) for ( int w = 0; w < ni; w++ ) { Coord_grid ci( u, v, w ); Coord_grid cf( u-ni2, v-ni2, w-ni2 ); cf = cf.unit( gfft ); double f = srchval.get_data( ci ); double w = srchwgt.get_data( ci ); wrk1.real_data( cf ) = w; wrk2.real_data( cf ) = w*f; } wrk1.fft_x_to_h( volfft ); wrk2.fft_x_to_h( volfft ); for ( int h = -n2; h <= n2; h++ ) for ( int k = -n2; k <= n2; k++ ) for ( int l = -n2; l <= n2; l++ ) { HKL hkl( h, k, l ); Coord_grid cg( h+n2, k+n2, l+n2 ); recip1.set_data( cg, wrk1.get_hkl( hkl ) ); recip2.set_data( cg, wrk2.get_hkl( hkl ) ); } } template bool FFFear_fft::operator() ( Xmap& result, const RTop_orth& rtop ) const { if ( cell.is_null() ) Message::message( Message_fatal( "FFFear_fft uninitialised" ) ); const double vol = cell.volume(); const Grid_sampling& g = rho1.grid_real(); FFTmap_p1 map1( g ); // calculate int n = recip1.grid().nu()-1; int n2 = n / 2; ftype cx = ftype( n2 ); ftype sx = cx / slim; int gu0, gv0, gw0, gu1, gv1, gw1; T wu0, wv0, ww0, wu1, wv1, ww1; const Grid& gh = map1.grid_reci(); const Grid& gx = map1.grid_real(); const ftype32 two = 2.0; std::complex ww, wf, r1, r2; Coord_reci_orth cro; Coord_grid c; Coord_map cm; HKL hkl; ftype slim2 = slim*slim; for ( c.u() = 0; c.u() < gh.nu(); c.u()++ ) for ( c.v() = 0; c.v() < gh.nv(); c.v()++ ) for ( c.w() = 0; c.w() < gh.nw(); c.w()++ ) { hkl.h() = Util::mod( c.u() + gx.nu()/2, gx.nu() ) - gx.nu()/2; hkl.k() = Util::mod( c.v() + gx.nv()/2, gx.nv() ) - gx.nv()/2; hkl.l() = Util::mod( c.w() + gx.nw()/2, gx.nw() ) - gx.nw()/2; cro = hkl.coord_reci_orth( cell ); if ( Vec3<>::dot( cro, cro ) < slim2 ) { cm = ( Coord_map( sx * ( rtop.rot() * cro ) ) + Coord_map( cx, cx, cx ) ); gu0 = Util::intf( cm.u() ); gv0 = Util::intf( cm.v() ); gw0 = Util::intf( cm.w() ); gu1 = gu0 + 1; gv1 = gv0 + 1; gw1 = gw0 + 1; wu1 = cm.u() - floor( cm.u() ); wv1 = cm.v() - floor( cm.v() ); ww1 = cm.w() - floor( cm.w() ); wu0 = 1.0 - wu1; wv0 = 1.0 - wv1; ww0 = 1.0 - ww1; ww = (wu0*(wv0*(ww0*recip1.get_data(Coord_grid(gu0,gv0,gw0))+ ww1*recip1.get_data(Coord_grid(gu0,gv0,gw1)))+ wv1*(ww0*recip1.get_data(Coord_grid(gu0,gv1,gw0))+ ww1*recip1.get_data(Coord_grid(gu0,gv1,gw1))))+ wu1*(wv0*(ww0*recip1.get_data(Coord_grid(gu1,gv0,gw0))+ ww1*recip1.get_data(Coord_grid(gu1,gv0,gw1)))+ wv1*(ww0*recip1.get_data(Coord_grid(gu1,gv1,gw0))+ ww1*recip1.get_data(Coord_grid(gu1,gv1,gw1))))); wf = (wu0*(wv0*(ww0*recip2.get_data(Coord_grid(gu0,gv0,gw0))+ ww1*recip2.get_data(Coord_grid(gu0,gv0,gw1)))+ wv1*(ww0*recip2.get_data(Coord_grid(gu0,gv1,gw0))+ ww1*recip2.get_data(Coord_grid(gu0,gv1,gw1))))+ wu1*(wv0*(ww0*recip2.get_data(Coord_grid(gu1,gv0,gw0))+ ww1*recip2.get_data(Coord_grid(gu1,gv0,gw1)))+ wv1*(ww0*recip2.get_data(Coord_grid(gu1,gv1,gw0))+ ww1*recip2.get_data(Coord_grid(gu1,gv1,gw1))))); r1 = rho1.cplx_data( c ); r2 = rho2.cplx_data( c ); map1.cplx_data( c ) = std::conj(ww)*r2 - two*std::conj(wf)*r1; } } // invert map1.fft_h_to_x( map1.grid_real().size() / pow( vol, 2 ) ); // store for ( typename Xmap::Map_reference_index ix = result.first(); !ix.last(); ix.next() ) result[ix] = sumwff + map1.real_data( ix.coord() ); return true; } */ clipper-2.1/clipper/contrib/skeleton.cpp0000644000374100011300000003175510736662166015403 00000000000000/* skeleton.cpp: Skeletonisation implementation */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "skeleton.h" #include "../core/map_utils.h" namespace clipper { // Skeleton_basic Skeleton_basic::Neighbours::Neighbours( const clipper::Xmap_base &map, const float min_distsq, const float max_distsq ) { /* note that thisd2 is a mesure of distance in real space So here we look around an arbitary current point and take note if the distance between the centre point and points one unit away from it (all directions) is less than a certain cuttoff distance. We are left with a list of ndn neighbouring cells that are sufficicently close to be considered neighbours. Typically, ndn will be 18-20 at then end of this block. Note that body diagonals have length sqrt(3) ~= 1.73, but we passed squared limits. */ clipper::Cell_descr rcd( map.cell().descr() ); clipper::Cell_descr vcd( 1.0,1.0,1.0, rcd.alpha(), rcd.beta(), rcd.gamma() ); clipper::Cell vcell( vcd ); clipper::Coord_grid g0(-1,-1,-1); clipper::Coord_grid g1( 1, 1, 1); clipper::Grid_sampling vgrid( 1, 1, 1 ); clipper::Coord_grid iu, iv, iw; float thisd2; for ( iu = g0; iu.u() <= g1.u(); iu.u()++ ) { for ( iv = iu; iv.v() <= g1.v(); iv.v()++ ) { for ( iw = iv; iw.w() <= g1.w(); iw.w()++ ) { thisd2 = iw.coord_frac( vgrid ).lengthsq( vcell ); if (thisd2 > min_distsq && thisd2 < max_distsq) nlist.push_back( iw ); } } } } Skeleton_basic::NCube::NCube( const int& n ) { m = clipper::Grid_range( clipper::Coord_grid( -n, -n, -n ), clipper::Coord_grid( n, n, n ) ); data.resize( m.size() ); } bool Skeleton_basic::operator() ( clipper::Xmap& xskl, const clipper::Xmap& xmap ) const { std::vector index; clipper::Xmap::Map_reference_index ix; /* now get the map in sorted order. We only sort those points which are to be considered, i.e. non-zero */ for ( ix = xmap.first(); !ix.last(); ix.next() ) if ( xskl[ix] > 0 ) index.push_back( ix.index() ); Map_index_sort::sort_increasing( xmap, index ); /* make neighbours The neighbours of a point are the other grid points which are 'near' it. The exact choice depends on the grid geometry. The cutoff is chosen to give 18-20 neighbours. For a cubic grid, these are a 3x3x3 cube without the vertices, for a hex grid they are a hexagonal cylinder. */ Skeleton_basic::Neighbours neigh( xmap ); /* make the skeleton map. This will contain: 0 for non-skeleton grids (inter ridge spaces) 1 for untested grids 1 for skeleton grids (ridges) (The untested and skeleton grids can have the same value, because the untested ones are still in the index). We loop through point in order, starting with the lowest and decide whether each one is part of the skeleton. */ for ( int i = 0; i < index.size(); i++ ) if ( !isInSkel( xskl, xskl.coord_of(index[i]), neigh, box_ ) ) xskl.set_data( index[ i ], 0 ); return true; } bool Skeleton_basic::isInSkel( const clipper::Xmap& xskl, const clipper::Coord_grid& c, const Skeleton_basic::Neighbours& neigh, const int& box ) { Skeleton_basic::NCube cube( box ); // 1 or 2? Look at the results to decide. /* Fill the cube with flags Each non-rejected grid point is given its own number. We will the reduce these to 'region numbers', so that each connected region takes the value of one of its neighbours. (A performace benefit is gaine from allocating these in decreasing order). */ clipper::Coord_grid g0 = c + cube.grid().min(); clipper::Coord_grid g1 = c + cube.grid().max(); clipper::Xmap_base::Map_reference_coord i0, iu, iv, iw; i0 = clipper::Xmap::Map_reference_coord( xskl, g0 ); int i = cube.grid().size(); for ( iu = i0; iu.coord().u() <= g1.u(); iu.next_u() ) for ( iv = iu; iv.coord().v() <= g1.v(); iv.next_v() ) for ( iw = iv; iw.coord().w() <= g1.w(); iw.next_w() ) cube[ iw.coord() - c ] = ( xskl[iw] > 0 ) ? i-- : 0; // the centre cannot be a link - set to zero cube[ clipper::Coord_grid(0,0,0) ] = 0; /* The following is a simple optimisation which could be omitted. We count the number of neightbours or the centre point which are not yet eliminated from the skeleton. If this is more than 14 or less than 1, then this pint cannot be part of the skeleton. */ int nneigh = 0; for ( i = 0; i < neigh.size(); i++ ) if ( cube[neigh[i]] > 0 ) nneigh++; if ( nneigh > 14 ) return false; if ( nneigh < 1 ) return false; /* Now reduce the flags to connected regions. We consider each point in turn, and replace it with the highest value of any of its neighbours. This is repeated until no points change. When this occurs, each connected region will be set to the largest value of any of its initial members. */ int val, nchg; do { nchg = 0; clipper::Coord_grid u, v, w, x; for ( u = cube.grid().min(); u.u() <= cube.grid().max().u(); u.u()++ ) for ( v = u; v.v() <= cube.grid().max().v(); v.v()++ ) for ( w = v; w.w() <= cube.grid().max().w(); w.w()++ ) { val = cube[w]; if ( val != 0 ) { for ( i = 0; i < neigh.size(); i++ ) { x = w + neigh[i]; if ( cube.grid().in_grid( x ) ) if ( cube[x] > val ) val = cube[x]; } if ( val > cube[w] ) { cube[w] = val; nchg++; } } } } while ( nchg > 0 ); /* The following code uses an STL set to count the number of different, non-zero numbers in the region bordering the centre of the cube */ std::set uniqnbrs; for ( i = 0; i < neigh.size(); i++ ) { const int& val = cube[neigh[i]]; if ( val > 0 ) uniqnbrs.insert( val ); } return (uniqnbrs.size() > 1); } // Skeleton_fast template Skeleton_fast::Neighbours::Neighbours( const clipper::Xmap_base &map, const float min_distsq, const float max_distsq ) { /* note that thisd2 is a mesure of distance in real space So here we look around an arbitary current point and take note if the distance between the centre point and points one unit away from it (all directions) is less than a certain cuttoff distance. We are left with a list of ndn neighbouring cells that are sufficicently close to be considered neighbours. Typically, ndn will be 18-20 at then end of this block. Note that body diagonals have length sqrt(3) ~= 1.73, but we passed squared limits. */ clipper::Cell_descr rcd( map.cell().descr() ); clipper::Cell_descr vcd( 1.0,1.0,1.0, rcd.alpha(), rcd.beta(), rcd.gamma() ); clipper::Cell vcell( vcd ); clipper::Coord_grid g0(-1,-1,-1); clipper::Coord_grid g1( 1, 1, 1); clipper::Grid_sampling vgrid( 1, 1, 1 ); clipper::Coord_grid iu, iv, iw; float thisd2; for ( iu = g0; iu.u() <= g1.u(); iu.u()++ ) { for ( iv = iu; iv.v() <= g1.v(); iv.v()++ ) { for ( iw = iv; iw.w() <= g1.w(); iw.w()++ ) { thisd2 = iw.coord_frac( vgrid ).lengthsq( vcell ); if (thisd2 > min_distsq && thisd2 < max_distsq) nlist.push_back( iw ); } } } } template bool Skeleton_fast::operator() ( clipper::Xmap& xskl, const clipper::Xmap& xmap ) const { std::vector index; Xmap_base::Map_reference_index ix; /* now get the map in sorted order. We only sort those points which are to be considered, i.e. non-zero */ for ( ix = xmap.first(); !ix.last(); ix.next() ) if ( xskl[ix] > 0 ) index.push_back( ix.index() ); Map_index_sort::sort_increasing( xmap, index ); /* make neighbours The neighbours of a point are the other grid points which are 'near' it. The exact choice depends on the grid geometry. The cutoff is chosen to give 18-20 neighbours. For a cubic grid, these are a 3x3x3 cube without the vertices, for a hex grid they are a hexagonal cylinder. */ neigh = Neighbours( xmap ); /* make the skeleton map. This will contain: 0 for non-skeleton grids (inter ridge spaces) 1 for untested grids 1 for skeleton grids (ridges) (The untested and skeleton grids can have the same value, because the untested ones are still in the index). We loop through point in order, starting with the lowest and decide whether each one is part of the skeleton. */ for ( int i = 0; i < index.size(); i++ ) if ( !isInSkel( xskl, xskl.coord_of(index[i]) ) ) xskl.set_data( index[ i ], 0 ); return true; } template bool Skeleton_fast::isInSkel( const clipper::Xmap& xskl, const clipper::Coord_grid& c ) const { int dx, dy, dz; /* Fill the cube with flags Each non-rejected grid point is given its own number. We will the reduce these to 'region numbers', so that each connected region takes the value of one of its neighbours. (A performace benefit is gaine from allocating these in decreasing order). */ clipper::Xmap_base::Map_reference_index ix( xskl, c ); for ( dz = 0; dz < 3; dz++ ) for ( dy = 0; dy < 3; dy++ ) for ( dx = 0; dx < 3; dx++ ) cube[dx][dy][dz] = xskl.get_data( ix.index_offset( dx-1, dy-1, dz-1 ) ); // the centre cannot be a link - set to zero cube[1][1][1] = 0; /* The following is a simple optimisation which could be omitted. We count the number of neightbours or the centre point which are not yet eliminated from the skeleton. If this is more than 14 or less than 1, then this pint cannot be part of the skeleton. */ int nneigh = 0; for ( int i = 0; i < neigh.size(); i++ ) { dx = neigh[i].u()+1; dy = neigh[i].v()+1; dz = neigh[i].w()+1; if ( cube[dx][dy][dz] > 0 ) nneigh++; } if ( nneigh > 14 ) return false; if ( nneigh < 1 ) return false; /* Now alter flags for one connected region. If all flags are altered, then this point is not part of the skeleton. */ for ( int i = 0; i < neigh.size(); i++ ) { dx = neigh[i].u()+1; dy = neigh[i].v()+1; dz = neigh[i].w()+1; if ( cube[dx][dy][dz] > 0 ) break; } flood_cube( dx, dy, dz ); for ( int i = 0; i < neigh.size(); i++ ) { dx = neigh[i].u()+1; dy = neigh[i].v()+1; dz = neigh[i].w()+1; if ( cube[dx][dy][dz] > 0 ) return true; } return false; } template void Skeleton_fast::flood_cube( const int x, const int y, const int z ) const { cube[x][y][z] = -1; for ( int i = 0; i < neigh.size(); i++ ) { int dx = x + neigh[i].u(); if ( dx >= 0 && dx < 3 ) { int dy = y + neigh[i].v(); if ( dy >= 0 && dy < 3 ) { int dz = z + neigh[i].w(); if ( dz >= 0 && dz < 3 ) if ( cube[dx][dy][dz] > 0 ) flood_cube( dx, dy, dz ); } } } } // template instantiations template class Skeleton_fast; template class Skeleton_fast; template class Skeleton_fast; template class Skeleton_fast; template class Skeleton_fast; template class Skeleton_fast; } // namespace clipper clipper-2.1/clipper/contrib/sfweight.h0000644000374100011300000001503611005574251015021 00000000000000/*! \file sfweight.h Header file for structure factor weighting object */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_SFWEIGHT #define CLIPPER_SFWEIGHT #include "function_object_bases.h" #include "../core/resol_basisfn.h" namespace clipper { //! Structure factor weighting by sigmaa-related spline method. /*! Perform structure factor weighting to obtain likelihood weights for structure factors. This implementation uses a single list of reflections for both scaling and sigmaa, thus the only relevent usage flags are NONE/BOTH. The number of spline parameters or the number of reflections per parameter may be specified. If either is zero, the other takes priority. If both are non-zero, a compromise value is used. \ingroup g_funcobj */ template class SFweight_spline : public SFweight_base { public: //! constructor SFweight_spline( const int n_reflns = 1000, const int n_params = 20, const int n_phases = 24 ) { init( n_reflns, n_params, n_phases ); } //! constructor: shorthand for constructor+operator SFweight_spline( HKL_data >& fb, HKL_data >& fd, HKL_data >& phiw, const HKL_data >& fo, const HKL_data >& fc, const HKL_data& usage, const int n_reflns = 1000, const int n_params = 20 ); //! initialise: from parameters void init( const int n_reflns = 1000, const int n_params = 20, const int n_phases = 24 ); bool operator() ( HKL_data >& fb, HKL_data >& fd, HKL_data >& phiw, const HKL_data >& fo0, const HKL_data >& fc0, const HKL_data& usage ); bool operator() ( HKL_data >& fb, HKL_data >& fd, HKL_data >& phiw, HKL_data >& hl, const HKL_data >& fo0, const HKL_data >& hl0, const HKL_data >& fc0, const HKL_data& usage ); template bool evaluate( HKL_data >& fb, HKL_data >& fd, HKL_data >& phiw, HKL_data >& hl, const HKL_data >& fo0, const HKL_data >& hl0, const HKL_data >& fc0, const HKL_data& usage, F tgt ); template bool reevaluate( HKL_data >& fb, HKL_data >& fd, HKL_data >& phiw, HKL_data >& hl, const HKL_data >& fo0, const HKL_data >& hl0, const HKL_data >& fc0, const HKL_data& usage, F tgt ); const std::vector& params_scale() { return param_s; } const std::vector& params_error() { return param_w; } const double& log_likelihood_work() { return llw; } const double& log_likelihood_free() { return llf; } void debug() const; struct TargetResult { ftype r, ds, dw, dss, dww, dsw; }; TargetResult targetfn( const HKL_class cls, const datatypes::F_sigF& fo0, const datatypes::F_phi& fc0, const ftype& s, const ftype& w ) const; TargetResult targethl( const HKL_class cls, const datatypes::F_sigF& fo0, const datatypes::ABCD& hl0, const datatypes::F_phi& fc0, const ftype& s, const ftype& w ) const; private: struct HLterms { ftype cosa, sina, cos2a, sin2a; }; class TargetFo { public: TargetResult operator() ( const HKL_class cls, const datatypes::F_sigF& fo0, const datatypes::ABCD& hl0, const datatypes::F_phi& fc0, const ftype& s, const ftype& w, const std::vector& hlterms ); datatypes::ABCD abcd; datatypes::Phi_fom phiw; }; class TargetHL { public: TargetResult operator() ( const HKL_class cls, const datatypes::F_sigF& fo0, const datatypes::ABCD& hl0, const datatypes::F_phi& fc0, const ftype& s, const ftype& w, const std::vector& hlterms ); datatypes::ABCD abcd; datatypes::Phi_fom phiw; }; int num_params( const HKL_data& flag ) const; int nparams, nreflns; std::vector param_s, param_w; std::vector scale_fo, scale_fc, value_s, value_w; std::vector hlterms; double llw, llf; }; } // namespace clipper #endif clipper-2.1/clipper/contrib/sfcalc_obs.cpp0000644000374100011300000001336311070157657015644 00000000000000/* sfweight.cpp: structure factor calculation vs observed implementation */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "sfcalc_obs.h" #include "edcalc.h" #include "../core/hkl_compute.h" #include "../core/resol_targetfn.h" namespace clipper { template bool SFcalc_obs_bulk::operator() ( HKL_data >& fphi, const HKL_data >& fsig, const Atom_list& atoms ) { // set U value constants double u_atom = Util::b2u( 20.0 ); double u_mask = Util::b2u( 50.0 ); // increase the U values Atom_list atomu = atoms; U_aniso_orth uadd( u_atom ), u; for ( int i = 0; i < atomu.size(); i++ ) if ( !atomu[i].is_null() ) { u = atomu[i].u_aniso_orth(); if ( u.is_null() ) u = U_aniso_orth( atomu[i].u_iso() ); atomu[i].set_u_aniso_orth( u + uadd ); } // now make the map for ed calcs const HKL_info& hkls = fsig.base_hkl_info(); const Spacegroup& spgr = hkls.spacegroup(); const Cell& cell = fsig.base_cell(); HKL_data > fphi_atom( hkls, cell ), fphi_mask( hkls, cell ); const Grid_sampling grid( spgr, cell, hkls.resolution() ); Xmap xmap( spgr, cell, grid ); // do ed calc from atomu EDcalc_aniso edcalc; edcalc( xmap, atomu ); xmap.fft_to( fphi_atom ); fphi_atom.compute( fphi_atom, datatypes::Compute_scale_u_iso >( 1.0, u_atom ) ); // do density calc from mask EDcalc_mask emcalc; emcalc( xmap, atomu ); for ( Xmap::Map_reference_index ix = xmap.first(); !ix.last(); ix.next() ) xmap[ix] = 1.0 - xmap[ix]; xmap.fft_to( fphi_mask ); fphi_mask.compute( fphi_mask, datatypes::Compute_scale_u_iso >( 1.0, -u_mask ) ); // try some different scale factors std::vector params( nparams, 1.0 ); BasisFn_spline basisfn( hkls, nparams, 1.0 ); TargetFn_scaleF1F2,datatypes::F_sigF > targetfn( fphi, fsig ); T x1 = 0.35, dx = 0.35, x; ftype y[3] = { 0.0, 0.0, 0.0 }; for ( int i = 0; i < 8; i++ ) { // take 3 samples of function for ( int d = -1; d <= 1; d++ ) if ( y[d+1] == 0.0 ) { HKL_data::HKL_reference_index ih; x = x1 + T(d)*dx; for ( ih = fphi.first(); !ih.last(); ih.next() ) fphi[ih] = std::complex(fphi_atom[ih]) + x * std::complex(fphi_mask[ih]); ResolutionFn rfn( hkls, basisfn, targetfn, params ); double r = 0.0; for ( ih = fsig.first(); !ih.last(); ih.next() ) if ( !fsig[ih].missing() ) { double eps = ih.hkl_class().epsilon(); r += (2.0/eps) * fabs( sqrt(rfn.f(ih))*fphi[ih].f() - fsig[ih].f() ); // r += ( 2.0/eps ) * pow( rfn.f(ih) * pow(fphi[ih].f(),2)/eps - pow(fsig[ih].f(),2)/eps, 2 ); } y[d+1] = r; //std::cout << d << "\t" << x << "\t" << r << "\n"; } // find minimum of current 3 samples if ( y[0] < y[1] && y[0] < y[2] ) { y[1] = y[0]; x1 -= dx; } else if ( y[2] < y[1] && y[2] < y[0] ) { y[1] = y[2]; x1 += dx; } // reduce step and search again y[0] = y[2] = 0.0; dx /= 2.0; } // adopt final scale for ( HKL_data::HKL_reference_index ih = fphi.first(); !ih.last(); ih.next() ) fphi[ih] = std::complex(fphi_atom[ih]) + x1 * std::complex(fphi_mask[ih]); // store stats ftype64 w, s0 = 0.0, s1 = 0.0; for ( Xmap::Map_reference_index ix = xmap.first(); !ix.last(); ix.next() ) { w = 1.0/ftype64( xmap.multiplicity( ix.coord() ) ); s0 += w; s1 += w*xmap[ix]; } bulkfrc = s1/s0; bulkscl = x1; return true; } // compile templates template class SFcalc_obs_bulk; template class SFcalc_obs_bulk; } // namespace clipper clipper-2.1/clipper/contrib/Makefile.am0000644000374100011300000000206311372264321015061 00000000000000# Makefile.am, passed: clipper/contrib, extracted subdir: contrib # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper/contrib ## -*- mode: Makefile; mode: font-lock -*- INCLUDES=${FFTW_CXXFLAGS} ${MMDB_CXXFLAGS} library_include_HEADERS = \ convolution_search.h \ edcalc.h \ fffear.h \ function_object_bases.h \ mapfilter.h \ originmatch.h \ sfcalc.h \ sfcalc_obs.h \ sfscale.h \ sfweight.h \ skeleton.h \ test_contrib.h lib_LTLIBRARIES = libclipper-contrib.la libclipper_contrib_la_SOURCES = \ convolution_search.cpp \ edcalc.cpp \ fffear.cpp \ function_object_bases.cpp \ mapfilter.cpp \ originmatch.cpp \ sfcalc.cpp \ sfcalc_obs.cpp \ sfscale.cpp \ sfweight.cpp \ skeleton.cpp \ test_contrib.cpp library_includedir = $(pkgincludedir)/contrib libclipper_contrib_la_LDFLAGS = -version-info @CLIPPER_LT_VERSION@ libclipper_contrib_la_LIBADD = \ $(top_builddir)/clipper/core/libclipper-core.la clipper-2.1/clipper/contrib/convolution_search.cpp0000644000374100011300000001666510736662166017466 00000000000000/* convolution_search.cpp: convolution search implementation */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "convolution_search.h" #include "../core/map_interp.h" namespace clipper { // general forms // slow Convolution_search template bool Convolution_search_slow::operator() ( Xmap& result, const NXmap& srchval ) const { NX_operator nxop( result, srchval, RTop_orth::identity() ); return (*this)( result, srchval, nxop ); } template bool Convolution_search_slow::operator() ( Xmap& result, const NXmap& srchval, const NX_operator& nxop ) const { const Grid_sampling& g = result.grid_sampling(); // calculate extent of mask function in Xmap space Coord_frac cf; Range urange, vrange, wrange; typename NXmap::Map_reference_index inx; for ( inx = srchval.first(); !inx.last(); inx.next() ) if ( srchval[inx] != 0.0 ) { cf = nxop.coord_frac( inx.coord().coord_map() ); urange.include( cf.u() ); vrange.include( cf.v() ); wrange.include( cf.w() ); } cf = Coord_frac( urange.min(), vrange.min(), wrange.min() ); Coord_grid g0 = cf.coord_map( g ).coord_grid() - Coord_grid(1,1,1); cf = Coord_frac( urange.max(), vrange.max(), wrange.max() ); Coord_grid g1 = cf.coord_map( g ).coord_grid() + Coord_grid(1,1,1); Grid_range gm( g0, g1 ); // copy provided NXmap in new NXmap shadowing the xtal grid NXmap target( result.cell(), g, gm ); target = 0.0; typename NXmap::Map_reference_index in; Coord_map cm; for ( in = target.first(); !in.last(); in.next() ) { cm = nxop.coord_map( in.coord_orth().coord_frac( result.cell() ) ); if ( Interp_linear::can_interp( srchval, cm ) ) { Interp_linear::interp( srchval, cm, target[in] ); } } // now calculate the search function const Xmap& xmap = *xmp; typename Xmap::Map_reference_index pos; typename Xmap::Map_reference_coord i0, iu, iv, iw; T s; for ( pos = result.first(); !pos.last(); pos.next() ) { g0 = pos.coord() + gm.min(); g1 = pos.coord() + gm.max(); i0 = Xmap_base::Map_reference_coord( xmap, g0 ); s = 0.0; for ( iu = i0; iu.coord().u() <= g1.u(); iu.next_u() ) for ( iv = iu; iv.coord().v() <= g1.v(); iv.next_v() ) for ( iw = iv; iw.coord().w() <= g1.w(); iw.next_w() ) { in.set_coord( iw.coord() - g0 ); s += xmap[iw] * target[in]; } result[pos] = s; } return true; } // fast Convolution_search template void Convolution_search_fft::init( const Xmap& xmap ) { vol = xmap.cell().volume(); rho1.init( xmap.grid_sampling() ); const Grid_sampling& g = xmap.grid_sampling(); T r; typename Xmap::Map_reference_coord i0( xmap, Coord_grid(0,0,0) ); typename Xmap::Map_reference_coord iu, iv, iw; for ( iu = i0; iu.coord().u() < g.nu(); iu.next_u() ) for ( iv = iu; iv.coord().v() < g.nv(); iv.next_v() ) for ( iw = iv; iw.coord().w() < g.nw(); iw.next_w() ) { r = xmap[iw]; rho1.real_data( iw.coord() ) = r; } rho1.fft_x_to_h( vol ); } template bool Convolution_search_fft::operator() ( Xmap& result, const NXmap& srchval ) const { NX_operator nxop( result, srchval, RTop_orth::identity() ); return (*this)( result, srchval, nxop ); } template bool Convolution_search_fft::operator() ( Xmap& result, const NXmap& srchval, const NX_operator& nxop ) const { const Grid_sampling& g = rho1.grid_real(); FFTmap_p1 map1( g ); // calculate extent of mask function in Xmap space Coord_frac cf; Range urange, vrange, wrange; typename NXmap::Map_reference_index inx; for ( inx = srchval.first(); !inx.last(); inx.next() ) if ( srchval[inx] != 0.0 ) { cf = nxop.coord_frac( inx.coord().coord_map() ); urange.include( cf.u() ); vrange.include( cf.v() ); wrange.include( cf.w() ); } cf = Coord_frac( urange.min(), vrange.min(), wrange.min() ); Coord_grid g0 = cf.coord_map( g ).coord_grid() - Coord_grid(1,1,1); cf = Coord_frac( urange.max(), vrange.max(), wrange.max() ); Coord_grid g1 = cf.coord_map( g ).coord_grid() + Coord_grid(1,1,1); // copy mask into grid, with offset Coord_grid c, cu; Coord_map cm; T f; for ( c.u() = g0.u(); c.u() <= g1.u(); c.u()++ ) for ( c.v() = g0.v(); c.v() <= g1.v(); c.v()++ ) for ( c.w() = g0.w(); c.w() <= g1.w(); c.w()++ ) { cm = nxop.coord_map( c.coord_frac( g ) ); if ( Interp_linear::can_interp( srchval, cm ) ) { Interp_linear::interp( srchval, cm, f ); cu = c.unit(g); map1.real_data( cu ) = f; } } // fft map1.fft_x_to_h( vol ); // calculate const Grid& gh = map1.grid_reci(); std::complex r1, f1; for ( c.u() = 0; c.u() < gh.nu(); c.u()++ ) for ( c.v() = 0; c.v() < gh.nv(); c.v()++ ) for ( c.w() = 0; c.w() < gh.nw(); c.w()++ ) { r1 = rho1.cplx_data( c ); f1 = map1.cplx_data( c ); map1.cplx_data( c ) = std::conj(f1)*r1; } // invert map1.fft_h_to_x( map1.grid_real().size() / pow( vol, 2 ) ); // store for ( typename Xmap::Map_reference_index ix = result.first(); !ix.last(); ix.next() ) result[ix] = map1.real_data( ix.coord() ); return true; } // compile templates template class Convolution_search_slow; template class Convolution_search_slow; template class Convolution_search_fft; template class Convolution_search_fft; } // namespace clipper clipper-2.1/clipper/contrib/test_contrib.h0000644000374100011300000000473610736662166015722 00000000000000/*! \file lib/test_contrib.h Header file for clipper contrib self-test functions */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_TEST_CONTRIB #define CLIPPER_TEST_CONTRIB #include "../core/clipper_test.h" namespace clipper { class Test_contrib : public Test_base { public: //! do the self-tests bool operator() (); }; } // namespace clipper #endif clipper-2.1/clipper/contrib/fffear.h0000644000374100011300000001475011021232614014424 00000000000000/*! \file fffear.h Header file for sample fffear impelementation \ingroup g_fffear */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_FFFEAR #define CLIPPER_FFFEAR #include "function_object_bases.h" namespace clipper { //! Simple fffear implementation /*! \deprecated This is for testing purposes only, as it is very slow. The search target and weights are not handled generally in this implementation: The NXmaps are assumed to have a grid matching the map grid with the origin at the centre. */ class FFFear_slow_basic { public: //! constructor FFFear_slow_basic( const Xmap& xmap ) : xmp( &xmap ) {} //! constructor: shorthand for constructor+operator FFFear_slow_basic( Xmap& result, const NXmap& srchval, const NXmap& srchwgt, const Xmap& xmap ) : xmp( &xmap ) { (*this)( result, srchval, srchwgt ); } bool operator() ( Xmap& result, const NXmap& srchval, const NXmap& srchwgt ) const; private: const Xmap* xmp; }; //! FFT-based fffear implementation /*! \deprecated This implementation is currently unoptimised, but much faster then the simple implementation. The search target and weights are not handled generally in this implementation: The NXmaps are assumed to have a grid matching the map grid with the origin at the centre. */ class FFFear_fft_basic { public: //! constructor FFFear_fft_basic( const Xmap& xmap ) { init( xmap ); } //! constructor: shorthand for constructor+operator FFFear_fft_basic( Xmap& result, const NXmap& srchval, const NXmap& srchwgt, const Xmap& xmap ) { init( xmap ); (*this)( result, srchval, srchwgt ); } //! initialiser: initialise with the given target Xmap void init( const Xmap& xmap ); bool operator() ( Xmap& result, const NXmap& srchval, const NXmap& srchwgt ) const; private: ftype vol; FFTmap_p1 rho1; FFTmap_p1 rho2; }; //! FFT-based fffear implementation /*! \ingroup g_fffear This implementation is currently unoptimised, but much faster then the simple implementation. */ template class FFFear_slow : public FFFear_base { public: //! constructor FFFear_slow() {} //! constructor FFFear_slow( const Xmap& xmap ) { init( xmap ); } //! constructor: shorthand for constructor+operator FFFear_slow( Xmap& result, const NXmap& srchval, const NXmap& srchwgt, const Xmap& xmap, const NX_operator& nxop ) { init( xmap ); (*this)( result, srchval, srchwgt, nxop ); } //! initialiser: initialise with the given target Xmap void init( const Xmap& xmap ) { xmp = ⟼ } bool operator() ( Xmap& result, const NXmap& srchval, const NXmap& srchwgt, const NX_operator& nxop ) const; bool operator() ( Xmap& result, const NXmap& srchval, const NXmap& srchwgt ) const; //!< \deprecated private: const Xmap* xmp; }; //! FFT-based fffear implementation /*! \ingroup g_fffear This implementation is currently unoptimised, but much faster then the simple implementation. */ template class FFFear_fft : public FFFear_base { public: enum FFTtype { Default, Normal, Sparse }; //!< FFT backend selection //! constructor FFFear_fft() {} //! constructor FFFear_fft( const Xmap& xmap ) { init( xmap ); } //! constructor: shorthand for constructor+operator FFFear_fft( Xmap& result, const NXmap& srchval, const NXmap& srchwgt, const Xmap& xmap, const NX_operator& nxop ) { init( xmap ); (*this)( result, srchval, srchwgt, nxop ); } //! initialiser: initialise with the given target Xmap void init( const Xmap& xmap ); void set_fft_type( FFTtype type ); //! option: fft backend void set_resolution( Resolution reso ); //! option: resolution cutoff bool operator() ( Xmap& result, const NXmap& srchval, const NXmap& srchwgt, const NX_operator& nxop ) const; //!< search for given target bool operator() ( Xmap& result, const NXmap& srchval, const NXmap& srchwgt, const RTop_orth& rtop ) const; //!< search for given target bool operator() ( Xmap& result, const NXmap& srchval, const NXmap& srchwgt ) const; //!< \deprecated private: Cell cell; FFTmap_p1 rho1, rho2; FFTtype ffttype; }; } // namespace clipper #endif clipper-2.1/clipper/contrib/sfscale.h0000644000374100011300000001043511311732432014614 00000000000000/*! \file sfscale.h Header file for structure factor anisotropic scaling object */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_SFSCALE #define CLIPPER_SFSCALE #include "function_object_bases.h" #include "../core/resol_targetfn.h" namespace clipper { //! Structure factor anisotropic scaling /*! Perform structure factor anisotropic scaling, observed to calculated, calculated to observed, or observed against itself. \ingroup g_funcobj */ template class SFscale_aniso : public SFscale_base { public: enum TYPE { F, I }; //!< type for returning U_aniso_orth enum MODE { NORMAL, SHARPEN, UNSHARPEN }; //!< mode for scaling //! constructor: takes rejection criterion for F/sigF SFscale_aniso( ftype nsig = 0.0, MODE mode = NORMAL ) : nsig_(nsig), mode_(mode) {} //! Scale Fo to Fc bool operator() ( HKL_data >& fo, const HKL_data >& fc ); //! Scale Fc to Fo bool operator() ( HKL_data >& fc, const HKL_data >& fo ); //! Scale Fo to isotropic (approximate) bool operator() ( HKL_data >& fo ); //! Scale Fo to isotropic (approximate) bool operator() ( HKL_data >& fo, const ftype resfilter, const int npar_scl ); //! Scale Io to isotropic (approximate) bool operator() ( HKL_data >& Io, const ftype resfilter, const int npar_scl ); //! Primitive scaling functions for F and I template bool scale( HKL_data& fo, const ftype resfilter, const int npar_scl ); //! return aniso correction on F or I const U_aniso_orth& u_aniso_orth( TYPE t ) const; const U_aniso_orth& u_aniso_orth() const { return u_i; } //!< \deprecated private: const T& obs( const datatypes::F_sigF& f ) { return f.f(); } const T& obs( const datatypes::I_sigI& f ) { return f.I(); } const T& sigobs( const datatypes::F_sigF& f ) { return f.sigf(); } const T& sigobs( const datatypes::I_sigI& f ) { return f.sigI(); } U_aniso_orth u_i, u_f; ftype nsig_; MODE mode_; }; } // namespace clipper #endif clipper-2.1/clipper/contrib/sfcalc.h0000644000374100011300000001214110736737607014446 00000000000000/*! \file sfcalc.h Header file for sample structure factor calculation impelementation \ingroup g_sfcalc */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_SFCALC #define CLIPPER_SFCALC #include "function_object_bases.h" namespace clipper { //! Isotropic structure factor calculation by slow summation /*! \ingroup g_sfcalc */ template class SFcalc_iso_sum : public SFcalc_base { public: //! constructor SFcalc_iso_sum() {} //! constructor: shorthand for constructor+operator SFcalc_iso_sum( HKL_data >& fphidata, const Atom_list& atoms ) { (*this)( fphidata, atoms ); } bool operator() ( HKL_data >& fphidata, const Atom_list& atoms ) const; }; //! Anisotropic structure factor calculation by slow summation /*! \ingroup g_sfcalc */ template class SFcalc_aniso_sum : public SFcalc_base { public: //! constructor SFcalc_aniso_sum() {} //! constructor: shorthand for constructor+operator SFcalc_aniso_sum( HKL_data >& fphidata, const Atom_list& atoms ) { (*this)( fphidata, atoms ); } bool operator() ( HKL_data >& fphidata, const Atom_list& atoms ) const; }; //! Isotropic structure factor calculation by fast Fourier /*! \ingroup g_sfcalc */ template class SFcalc_iso_fft : public SFcalc_base { public: //! constructor /*! \param rate Shannon rate (oversampling) of the FFT grid. \param uadd Additional U for smoothing atoms. */ SFcalc_iso_fft( const ftype radius = 2.5, const ftype rate = 1.5, const ftype uadd = 0.0 ) : radius_(radius), rate_(rate), uadd_(uadd) {} //! constructor: shorthand for constructor+operator SFcalc_iso_fft( HKL_data >& fphidata, const Atom_list& atoms, const ftype radius = 2.5, const ftype rate = 1.5, const ftype uadd = 0.0 ) : radius_(radius), rate_(rate), uadd_(uadd) { (*this)( fphidata, atoms ); } bool operator() ( HKL_data >& fphidata, const Atom_list& atoms ) const; private: const ftype radius_, rate_, uadd_; }; //! Anisotropic structure factor calculation by fast Fourier /*! \ingroup g_sfcalc */ template class SFcalc_aniso_fft : public SFcalc_base { public: //! constructor /*! \param rate Shannon rate (oversampling) of the FFT grid. \param uadd Additional U for smoothing atoms. */ SFcalc_aniso_fft( const ftype radius = 2.5, const ftype rate = 1.5, const ftype uadd = 0.0 ) : radius_(radius), rate_(rate), uadd_(uadd) {} //! constructor: shorthand for constructor+operator SFcalc_aniso_fft( HKL_data >& fphidata, const Atom_list& atoms, const ftype radius = 2.5, const ftype rate = 1.5, const ftype uadd = 0.0 ) : radius_(radius), rate_(rate), uadd_(uadd) { (*this)( fphidata, atoms ); } bool operator() ( HKL_data >& fphidata, const Atom_list& atoms ) const; private: const ftype radius_, rate_, uadd_; }; } // namespace clipper #endif clipper-2.1/clipper/contrib/mapfilter.cpp0000644000374100011300000003041510736662166015532 00000000000000/* mapfilter.cpp: Electron density calculation implementation */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "mapfilter.h" namespace clipper { /*! The filter function is constructed with the given filter. Scaling may also be optionally applied. This may be absolute, which just applies a scale factor to the result, or relative, which scales the filter relative to its own integral. Therefore, relative scaling with a scale factor of 1.0 gives an output map on the same scale as the input map. Note that the filter is not stored internally, and so must persist as long as the MapFilter is required. \param fltr The radial filter to apply. \param scale The scale factor to apply (default = 1.0). \param type The type of scaling to apply: NONE, Absolute, Relative. */ template MapFilter_slow::MapFilter_slow( const MapFilterFn_base& fltr, const ftype scale, const TYPE type ) : fltr_( &fltr ), scale_( scale ), type_( type ) {} template MapFilter_slow::MapFilter_slow( clipper::Xmap& result, const clipper::Xmap& xmap, MapFilterFn_base& fltr, const ftype scale, const TYPE type ) : fltr_( &fltr ), scale_( scale ), type_( type ) { (*this)( result, xmap ); } /*! Apply the filter to a given map. \param result The filtered map. \param xmap The map to be filtered. */ template bool MapFilter_slow::operator() ( clipper::Xmap& result, const clipper::Xmap& xmap ) const { const MapFilterFn_base& fltr = *fltr_; const Grid_sampling& g = xmap.grid_sampling(); result.init( xmap.spacegroup(), xmap.cell(), g ); // first determine the effective radius of the radial function const int nrad = 1000; const ftype drad = 0.25; int i; ftype r, sum[nrad]; for ( i = 0; i < nrad; i++ ) { r = drad * ( ftype(i) + 0.5 ); sum[i] = r*r*fabs(fltr(r)); } for ( i = 1; i < nrad; i++ ) sum[i] += sum[i-1]; for ( i = 0; i < nrad; i++ ) if ( sum[i] > 0.99*sum[nrad-1] ) break; ftype rad = drad * ( ftype(i) + 1.0 ); // now prepare a map from the filter Grid_range gm( xmap.cell(), g, rad ); NXmap flt( xmap.cell(), g, gm ); // calculate the filter typename NXmap::Map_reference_index in; ftype64 f000 = 0.0; for ( in = flt.first(); !in.last(); in.next() ) { r = fltr( sqrt( in.coord_orth().lengthsq() ) ); f000 += r; flt[in] = r; } // calc scale factor ftype scale = 1.0; if ( type_ == Absolute ) scale = scale_; if ( type_ == Relative ) scale = scale_ / f000; // now calculate the search function Coord_grid g0, g1; typename Xmap::Map_reference_index pos; typename Xmap::Map_reference_coord i0, iu, iv, iw; ftype s; for ( pos = result.first(); !pos.last(); pos.next() ) { g0 = pos.coord() + gm.min(); g1 = pos.coord() + gm.max(); i0 = Xmap_base::Map_reference_coord( xmap, g0 ); s = 0.0; for ( iu = i0; iu.coord().u() <= g1.u(); iu.next_u() ) for ( iv = iu; iv.coord().v() <= g1.v(); iv.next_v() ) for ( iw = iv; iw.coord().w() <= g1.w(); iw.next_w() ) { in.set_coord( iw.coord() - g0 ); s += flt[in] * xmap[iw]; } result[pos] = scale * s; } return true; } /*! The filter function is constructed with the given filter. Scaling may also be optionally applied. This may be absolute, which just applies a scale factor to the result, or relative, which scales the filter relative to its own integral. Therefore, relative scaling with a scale factor of 1.0 gives an output map on the same scale as the input map. Note that the filter is not stored internally, and so must persist as long as the MapFilter is required. \param fltr The radial filter to apply. \param scale The scale factor to apply (default = 1.0). \param type The type of scaling to apply: NONE, Absolute, Relative. */ template MapFilter_fft::MapFilter_fft( const MapFilterFn_base& fltr, const ftype scale, const TYPE type ) : fltr_( &fltr ), scale_( scale ), type_( type ) {} template MapFilter_fft::MapFilter_fft( clipper::Xmap& result, const clipper::Xmap& xmap, MapFilterFn_base& fltr, const ftype scale, const TYPE type ) : fltr_( &fltr ), scale_( scale ), type_( type ) { (*this)( result, xmap ); } /*! Apply the filter to a given map. \param result The filtered map. \param xmap The map to be filtered. */ template bool MapFilter_fft::operator() ( clipper::Xmap& result, const clipper::Xmap& xmap ) const { const MapFilterFn_base& fltr = *fltr_; const Grid_sampling& g = xmap.grid_sampling(); // first determine the effective radius of the radial function const int nrad = 1000; const ftype drad = 0.25; int i; ftype r, sum[nrad]; for ( i = 0; i < nrad; i++ ) { r = drad * ( ftype(i) + 0.5 ); sum[i] = r*r*fabs(fltr(r)); } for ( i = 1; i < nrad; i++ ) sum[i] += sum[i-1]; for ( i = 0; i < nrad; i++ ) if ( sum[i] > 0.99*sum[nrad-1] ) break; ftype rad = drad * ( ftype(i) + 1.0 ); // make the fft maps FFTmap_p1 map( g ); FFTmap_p1 flt( g ); // fill the fft maps Coord_grid c, half( g.nu()/2, g.nv()/2, g.nw()/2 ); typename Xmap::Map_reference_coord i0( xmap, Coord_grid(0,0,0) ); typename Xmap::Map_reference_coord iu, iv, iw; ftype64 f000 = 0.0; for ( iu = i0; iu.coord().u() < g.nu(); iu.next_u() ) for ( iv = iu; iv.coord().v() < g.nv(); iv.next_v() ) for ( iw = iv; iw.coord().w() < g.nw(); iw.next_w() ) { c = (iw.coord() + half).unit(g) - half; r = sqrt( c.coord_frac(g).lengthsq(xmap.cell()) ); map.real_data( iw.coord() ) = xmap[iw]; if ( r < rad ) { r = fltr(r); f000 += r; flt.real_data( iw.coord() ) = r; } } // calc scale factor ftype32 scale = 1.0; if ( type_ == Absolute ) scale = scale_; if ( type_ == Relative ) scale = scale_ / f000; // fft flt.fft_x_to_h( xmap.cell().volume() ); map.fft_x_to_h( xmap.cell().volume() ); // do filter const Grid& gh = map.grid_reci(); for ( c.u() = 0; c.u() < gh.nu(); c.u()++ ) for ( c.v() = 0; c.v() < gh.nv(); c.v()++ ) for ( c.w() = 0; c.w() < gh.nw(); c.w()++ ) map.cplx_data( c ) = scale * map.cplx_data(c) * flt.cplx_data(c); // invert map.fft_h_to_x( map.grid_real().size() / pow( xmap.cell().volume(), 2 ) ); // store result.init( xmap.spacegroup(), xmap.cell(), g ); for ( typename Xmap::Map_reference_index ix = result.first(); !ix.last(); ix.next() ) result[ix] = map.real_data( ix.coord() ); return true; } /*! Apply the filter to a given map. \param result The filtered map. \param nxmap The map to be filtered. */ template bool MapFilter_fft::operator() ( clipper::NXmap& result, const clipper::NXmap& nxmap ) const { const MapFilterFn_base& fltr = *fltr_; const Grid& gnx = nxmap.grid(); // Now make fft grid compatible with this NXmap grid Grid_sampling nuvw( gnx.nu()+2, gnx.nv()+2, gnx.nw()+2 ); for ( int i = 0; i < 3; i++ ) { // find most efficient sampling int j, l, m, n, nbest = 0; ftype t, tbest = 1.0e12; for ( n = nuvw[i]; n < 2*nuvw[i]; n++ ) { if ( n % 2 == 0 ) { l = 0; // sum of factors (approx. log n) m = n; // what is left in factorisation for ( j = 2; j <= n; j++ ) while ( m%j == 0 ) { m /= j; l += j; } // FFT time O( n * l ) - introduce an extra n^2 for 3D. t = pow( ftype(n), 3 ) * ftype(l); if ( t < tbest ) { nbest = n; tbest = t; } } } nuvw[i] = nbest; } const Grid_sampling& g = nuvw; // Get grid skew matrix nxmap.operator_grid_orth().rot(); Coord_orth::zero(); RTop<> rtop( nxmap.operator_grid_orth().rot(), Coord_orth::zero() ); // make the fft maps FFTmap_p1 map( g ); FFTmap_p1 flt( g ); // fill fft map from nx map Coord_grid l( (g.nu()-gnx.nu())/2,(g.nv()-gnx.nv())/2,(g.nw()-gnx.nw())/2 ); Coord_grid h( l + gnx - Coord_grid(1,1,1) ); typedef NXmap::Map_reference_index MRI; for ( MRI ix = nxmap.first(); !ix.last(); ix.next() ) map.real_data( ix.coord()+l ) = nxmap[ix]; // mirror the remaining points Coord_grid iw, im; for ( iw.u() = 0; iw.u() < g.nu(); iw.u()++ ) for ( iw.v() = 0; iw.v() < g.nv(); iw.v()++ ) for ( iw.w() = 0; iw.w() < g.nw(); iw.w()++ ) { im = iw; if ( im.u() < l.u() ) im.u() = l.u() + ( l.u() - im.u() ); if ( im.v() < l.v() ) im.v() = l.v() + ( l.v() - im.v() ); if ( im.w() < l.w() ) im.w() = l.w() + ( l.w() - im.w() ); if ( im.u() > h.u() ) im.u() = h.u() + ( h.u() - im.u() ); if ( im.v() > h.v() ) im.v() = h.v() + ( h.v() - im.v() ); if ( im.w() > h.w() ) im.w() = h.w() + ( h.w() - im.w() ); map.real_data( iw ) = map.real_data( im ); } // first determine the effective radius of the radial function const int nrad = 1000; const ftype drad = 0.25; int i; ftype r, sum[nrad]; for ( i = 0; i < nrad; i++ ) { r = drad * ( ftype(i) + 0.5 ); sum[i] = r*r*fabs(fltr(r)); } for ( i = 1; i < nrad; i++ ) sum[i] += sum[i-1]; for ( i = 0; i < nrad; i++ ) if ( sum[i] > 0.99*sum[nrad-1] ) break; ftype rad = drad * ( ftype(i) + 1.0 ); // fill the radial function map Coord_grid c, half( g.nu()/2, g.nv()/2, g.nw()/2 ); ftype64 f000 = 0.0; for ( iw.u() = 0; iw.u() < g.nu(); iw.u()++ ) for ( iw.v() = 0; iw.v() < g.nv(); iw.v()++ ) for ( iw.w() = 0; iw.w() < g.nw(); iw.w()++ ) { c = (iw + half).unit(g) - half; r = sqrt( Coord_orth(rtop*c.coord_map()).lengthsq() ); if ( r < rad ) { r = fltr(r); f000 += r; flt.real_data( iw ) = r; } } // calc scale factor ftype32 scale = 1.0; if ( type_ == Absolute ) scale = scale_; if ( type_ == Relative ) scale = scale_ / f000; // fft flt.fft_x_to_h( 1.0 ); map.fft_x_to_h( 1.0 ); // do filter const Grid& gh = map.grid_reci(); for ( c.u() = 0; c.u() < gh.nu(); c.u()++ ) for ( c.v() = 0; c.v() < gh.nv(); c.v()++ ) for ( c.w() = 0; c.w() < gh.nw(); c.w()++ ) map.cplx_data( c ) = scale * map.cplx_data(c) * flt.cplx_data(c); // invert map.fft_h_to_x( map.grid_real().size() ); // store result.init( gnx, nxmap.operator_orth_grid() ); for ( MRI ix = nxmap.first(); !ix.last(); ix.next() ) result[ix] = map.real_data( ix.coord()+l ); return true; } // compile templates template class MapFilter_slow; template class MapFilter_slow; template class MapFilter_fft; template class MapFilter_fft; } // namespace clipper clipper-2.1/clipper/contrib/test_contrib.cpp0000644000374100011300000004705711144270164016243 00000000000000/* test_contrib.cpp: implementation file for clipper contrib self-test */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "test_contrib.h" #include "mapfilter.h" #include "convolution_search.h" #include "fffear.h" #include "sfcalc.h" #include "sfcalc_obs.h" #include "sfweight.h" #include "sfscale.h" #include "../core/test_data.h" #include "../core/hkl_compute.h" namespace clipper { namespace data { float contrib_vals[] = {62085,0,-2.35103e-05,-537.853,2.04953e-05,271.468,313.756,-1.14655e-05,88.939,-1.97969e-06,-1.41777e-05,137.227,-1020.36,-230.467,258.784,19.4909,-21.0352,168.158,82.8908,82.9012,-3.63488e-05,-106.365,-4.12642,311.855,-182.047,291.716,-473.216,24.3527,58.3351,-90.6147,-72.7842,46.5314,123.021,-21.1225,-156.35,110.062,-277.139,-442.304,-142.18,89.8283,1.87174e-05,-73.6002,271.811,-64.1525,-270.657,-265.162,273.196,779.432,256.913,276.635,226.079,544.524,644.946,-244.673,8.01921e-06,-504.567,4.02743,-451.095,27.369,95.8539,-1049.43,0,332.786,-326.619,-120.613,-233.546,374.933,-125.7,-1.43747e-05,328.855,67.4085,-117.594,-579.966,-250.85,-286.214,421.978,-407.023,-3.5e-12,379.259,20.3695,-546.954,33.0029,638.675,-649.005,70.5812,-146.142,224.169,43.466,302.437,49.827,390.892,-184.531,215.482,-101.874,545.265,474.695,-3.76247e-05,364.171,-5.44969e-05,-1246.74,-2.18374e-05,-499.581,0.99955,5.34325e-06,70.7734,-3.57623e-06,-81.8145,0.965747,629.401,-2.29999e-05,196.403,-7.17707e-06,0.999995,56.9272,-1.26714e-06,-5.00108,5.96175e-07,0.47382,-1.68563e-05,163.153,-2.71878e-06,26.3152,0.803509,-636.356,-143.732,169.765,38.3443,0.981854,110.28,8.30599,-57.1612,-4.30521,0.880984,6.49867,-51.951,11.3566,-90.7857,0.504998,187.239,187.262,61.0691,61.0767,0.844098,-3.9956e-05,-116.921,-1.60269e-05,-46.8987,0.19955,-6.80942,514.623,-1.80122,136.128,0.937416,-158.815,254.487,-13.0074,20.8433,0.826057,-459.028,23.6226,-46.6823,2.40237,0.964024,64.2033,-99.7301,9.28487,-14.4226,0.621669,-25.9256,4.45139,-35.6622,6.12313,0.102692,34.3516,-24.1816,77.2152,-54.3552,0.601134,-203.365,-324.564,11.8764,18.9543,0.961987,-104.664,66.1263,3.25264,-2.055,0.706816,9.51035e-05,-373.964,3.97517e-05,-156.311,0.736061,186.115,-43.9266,-23.964,5.65595,0.917733,-149.75,-146.71,34.3991,33.7007,0.918732,216.55,617.822,-2.34832,-6.6998,0.983464,103.747,111.711,-47.8103,-51.4805,0.933024,138.133,332.702,-27.9613,-67.3465,0.978446,600.51,-227.816,37.9841,-14.4101,0.978923,5.68373e-06,-357.619,-7.21378e-07,16.5032,0.999258,3.50463,-392.538,0.0360139,-4.03376,0.967671,12.9659,45.4102,-3.82199,-13.3857,0.486054,-687.716,5e-12,71.8843,4.5e-12,1,231.469,-227.18,-9.31488,9.14227,0.965045,-76.4861,-148.101,8.49971,16.4581,0.864654,333.513,-111.814,11.3842,-3.81669,0.96192,-3.95762e-06,90.5398,6.19183e-06,-82.0133,0.961299,-29.0476,50.6733,-40.9055,71.3594,0.333013,-455.874,-197.177,-2.65068,-1.14648,0.974159,-180.118,265.555,21.9202,-32.3179,0.979928,-5.86636,-3.24e-12,152.988,1.5e-12,0.987289,81.058,4.35351,-100.564,-5.40116,0.932738,-457.759,27.6209,5.42575,-0.327387,0.976693,586.908,-596.401,17.798,-18.0858,0.990935,199.589,-413.259,72.816,-150.769,0.873015,530.378,102.839,175.409,34.0114,0.946546,235.809,38.8499,-10.2464,-1.68811,0.939609,323.264,-152.605,12.3157,-5.81392,0.957015,165.082,-78.0461,-6.46434,3.05617,0.898444,298.646,259.994,-75.8603,-66.0422,0.98677,-3.71094e-06,35.9183,9.71826e-06,-128.722,0.997217}; float contrib_tols[] = {3.1,1e-09,0.00038,0.027,9.7e-05,0.014,0.016,6.1e-05,0.0045,8.5e-05,0.00012,0.007,0.051,0.012,0.013,0.001,0.0011,0.0085,0.0042,0.0042,0.00025,0.0058,0.00032,0.016,0.0093,0.015,0.024,0.0016,0.0031,0.0046,0.0038,0.0024,0.0063,0.0012,0.008,0.0056,0.014,0.022,0.0073,0.0047,0.00012,0.0038,0.014,0.0033,0.014,0.013,0.014,0.039,0.013,0.014,0.012,0.027,0.032,0.012,9e-05,0.025,0.00036,0.023,0.0014,0.0049,0.053,0.00048,0.017,0.016,0.0062,0.012,0.019,0.0064,0.00012,0.017,0.0035,0.006,0.029,0.013,0.014,0.021,0.021,0.00018,0.019,0.0012,0.028,0.002,0.032,0.033,0.0036,0.0074,0.011,0.0022,0.015,0.0026,0.02,0.0093,0.011,0.0052,0.027,0.024,0.0002,0.018,0.00089,0.063,0.00036,0.025,5e-05,2.5e-05,0.0036,2.9e-05,0.0042,4.8e-05,0.032,0.00012,0.0099,3.8e-05,5e-05,0.0029,5.4e-05,0.00027,4.1e-06,2.4e-05,0.00015,0.0082,2.4e-05,0.0014,4.1e-05,0.032,0.0076,0.0088,0.0021,4.9e-05,0.0056,0.00044,0.0029,0.00024,4.4e-05,0.00036,0.0027,0.00063,0.0046,2.6e-05,0.0095,0.0096,0.0031,0.0031,4.2e-05,0.00027,0.0063,0.00011,0.0025,1.1e-05,0.00052,0.026,0.00014,0.0069,4.7e-05,0.0082,0.013,0.0007,0.0011,4.1e-05,0.023,0.0015,0.0025,0.00015,4.8e-05,0.0033,0.0051,0.00048,0.00075,3.1e-05,0.0013,0.00026,0.0018,0.00036,5.2e-06,0.0018,0.0012,0.004,0.0028,3e-05,0.01,0.016,0.00073,0.0012,4.8e-05,0.0053,0.0035,0.00019,0.00013,3.6e-05,0.0006,0.019,0.00025,0.008,3.8e-05,0.0094,0.0023,0.0013,0.00031,4.6e-05,0.0077,0.0075,0.0018,0.0018,4.6e-05,0.011,0.031,0.00015,0.00038,4.9e-05,0.0053,0.0058,0.0026,0.0028,4.7e-05,0.007,0.017,0.0015,0.0036,4.9e-05,0.03,0.011,0.0022,0.00082,4.9e-05,6.4e-05,0.018,5.9e-06,0.001,5e-05,0.00032,0.02,4.5e-06,0.00035,4.8e-05,0.00067,0.0023,0.0002,0.00069,2.5e-05,0.035,0.00031,0.0038,3.3e-05,5e-05,0.012,0.012,0.00056,0.00053,4.8e-05,0.0039,0.0075,0.00048,0.00093,4.3e-05,0.017,0.0057,0.00067,0.00024,4.8e-05,3.2e-05,0.0045,2.9e-05,0.0041,4.8e-05,0.0015,0.0026,0.0021,0.0037,1.7e-05,0.023,0.01,0.00021,0.00012,4.9e-05,0.0093,0.013,0.0012,0.0017,4.9e-05,0.00042,2.7e-06,0.0078,6.9e-05,4.9e-05,0.0042,0.00025,0.0052,0.00032,4.7e-05,0.023,0.0017,0.00036,2.7e-05,4.9e-05,0.03,0.03,0.001,0.0011,5e-05,0.01,0.021,0.0037,0.0076,4.4e-05,0.027,0.0053,0.0089,0.0017,4.7e-05,0.012,0.002,0.00066,0.00011,4.7e-05,0.016,0.0077,0.00065,0.00031,4.8e-05,0.0084,0.004,0.00042,0.00019,4.5e-05,0.015,0.013,0.004,0.0034,4.9e-05,1.9e-05,0.0019,4.6e-05,0.0065,5e-05}; int contrib_size = sizeof(contrib_vals)/sizeof(contrib_vals[0]); } bool Test_contrib::operator() () { data_val = std::vector( data::contrib_vals, data::contrib_vals+data::contrib_size ); data_tol = std::vector( data::contrib_tols, data::contrib_tols+data::contrib_size ); typedef HKL_info::HKL_reference_index HRI; data::Test_data data; const HKL_data& fsig = data.hkl_data_f_sigf(); const HKL_data& abcd = data.hkl_data_abcd(); const clipper::Atom_list& xyzb = data.atom_list(); const Spacegroup spgr = fsig.hkl_info().spacegroup(); const Cell cell = fsig.hkl_info().cell(); const Resolution reso = fsig.hkl_info().resolution(); typedef HKL_info::HKL_reference_index HRI; typedef Xmap::Map_reference_index MRI; // test sfcalc objects { // select spacegroup std::vector hallsymbols; for ( int i = 0; i < data::sgdata_size; i += 10 ) hallsymbols.push_back( data::sgdata[i].hall ); // build model Atom_list atoms; Atom atom = Atom::null(); atom.set_occupancy( 1.0 ); atom.set_u_iso( 0.5 ); atom.set_element( "C" ); atom.set_coord_orth( Coord_orth( 12, 8, 5 ) ); atoms.push_back( atom ); atom.set_element( "N" ); atom.set_coord_orth( Coord_orth( 11, 6, 4 ) ); atoms.push_back( atom ); atom.set_element( "O" ); atom.set_coord_orth( Coord_orth( 13, 5, 4 ) ); atoms.push_back( atom ); // calc cell Cell cellc( Cell_descr( 37, 37, 37 ) ); Cell cellha( Cell_descr( 37, 37, 37, 120, 90, 90 ) ); Cell cellhb( Cell_descr( 37, 37, 37, 90, 120, 90 ) ); Cell cellhc( Cell_descr( 37, 37, 37, 90, 90, 120 ) ); Cell cg; String symbol; Spacegroup sg; for ( int s = 0; s < hallsymbols.size(); s++ ) { try { symbol = hallsymbols[s]; sg = Spacegroup( Spgr_descr( symbol, Spgr_descr::Hall ) ); // identify trigonal/hexagonal groups cg = cellc; for ( int sym = 1; sym < sg.num_symops(); sym++ ) { if ( ( sg.symop(sym).rot()(1,1) * sg.symop(sym).rot()(1,2) == -1 ) || ( sg.symop(sym).rot()(2,1) * sg.symop(sym).rot()(2,2) == -1 ) ) cg = cellha; if ( ( sg.symop(sym).rot()(0,0) * sg.symop(sym).rot()(0,2) == -1 ) || ( sg.symop(sym).rot()(2,0) * sg.symop(sym).rot()(2,2) == -1 ) ) cg = cellhb; if ( ( sg.symop(sym).rot()(0,0) * sg.symop(sym).rot()(0,1) == -1 ) || ( sg.symop(sym).rot()(1,0) * sg.symop(sym).rot()(1,1) == -1 ) ) cg = cellhc; } HKL_info hkl_info( sg, cg, Resolution( 5.0 ), true ); HKL_data fp1( hkl_info ); HKL_data fp2( hkl_info ); SFcalc_iso_sum( fp1, atoms ); SFcalc_iso_fft( fp2, atoms, 2.5, 2.5, 0.25 ); // begin extra fft tests Grid_sampling gg( sg, cg, hkl_info.resolution() ); Xmap xg( sg, cg, gg ); FFTmap fftmap( sg, cg, gg ); xg.fft_from( fp2, Xmap_base::Normal ); xg.fft_to( fp2, Xmap_base::Sparse ); fftmap.fft_rfl_to_map( fp2, xg ); xg.fft_to( fp2, Xmap_base::Normal ); xg.fft_from( fp2, Xmap_base::Sparse ); fftmap.fft_map_to_rfl( xg, fp2 ); // end extra fft tests float tol = 0.005 * fp1[ HKL( 0, 0, 0 ) ].f(); for ( HRI ih = fp1.first(); !ih.last(); ih.next() ) { std::complex ab1(0.0,0.0), ab2(0.0,0.0); if ( !fp1[ih].missing() ) ab1 = fp1[ih]; if ( !fp2[ih].missing() ) ab2 = fp2[ih]; test( "SF-A", ab1.real(), ab2.real(), tol ); test( "SF-B", ab1.imag(), ab2.imag(), tol ); } } catch ( Message_base ) { test( "SFSG "+symbol, sg.spacegroup_number(), -1 ); } } } // test sfcalc_obs and sfweight { // sfcalc_obs HKL_data fcal( fsig.hkl_info() ); SFcalc_obs_bulk sfcb; sfcb( fcal, fsig, xyzb ); // sfcalc_obs results for ( HRI ih = fcal.first(); !ih.last(); ih.next() ) if ( ih.index() % 20 == 0 ) { std::complex ab( fcal[ih] ); test( "SFO-A", ab.real() ); test( "SFO-B", ab.imag() ); } // sfweight //SFcalc_iso_fft sfc; //sfc( fcal, xyzb ); HKL_data fb1( fsig.hkl_info() ), fb2( fsig.hkl_info() ); HKL_data fd1( fsig.hkl_info() ), fd2( fsig.hkl_info() ); HKL_data phiw1(fsig.hkl_info()), phiw2(fsig.hkl_info()); HKL_data flag( fsig.hkl_info() ); HKL_data abcd( fsig.hkl_info() ), abcd2( fsig.hkl_info() ); abcd = data32::ABCD( 0.0, 0.0, 0.0, 0.0 ); for ( HRI ih = flag.first(); !ih.last(); ih.next() ) if ( !fsig[ih].missing() ) flag[ih].flag() = SFweight_spline::BOTH; else flag[ih].flag() = SFweight_spline::NONE; clipper::SFweight_spline sfw( 600, 12 ); bool fl = sfw( fb1, fd1, phiw1, fsig, fcal, flag ); if ( !fl ) test( "SFW-FAIL", 1, 0 ); // sfweight results for ( HRI ih = phiw1.first(); !ih.last(); ih.next() ) if ( !fsig[ih].missing() ) if ( ih.index() % 20 == 0 ) { std::complex ab_b( fb1[ih] ); std::complex ab_d( fd1[ih] ); test( "SFWB-A", ab_b.real() ); test( "SFWB-B", ab_b.imag() ); test( "SFWD-A", ab_d.real() ); test( "SFWD-B", ab_d.imag() ); test( "SFW-W", phiw1[ih].fom() ); } // sfweight-hl results HKL_data fsig0( fsig.hkl_info() ); for ( HRI ih = fsig.first(); !ih.last(); ih.next() ) if ( !fsig[ih].missing() ) fsig0[ih] = data32::F_sigF( fsig[ih].f(), 0.0 ); clipper::SFweight_spline sfw1( 600, 12 ), sfw2( 600, 12 ); bool fl1 = sfw1( fb1, fd1, phiw1, fsig0, fcal, flag ); if ( !fl1 ) test( "SFW-FAIL1", 1, 0 ); bool fl2 = sfw2( fb2, fd2, phiw2, abcd2, fsig0, abcd, fcal, flag ); if ( !fl2 ) test( "SFW-FAIL2", 1, 0 ); std::vector params_e1 = sfw1.params_error(); std::vector params_s1 = sfw1.params_scale(); std::vector params_e2 = sfw2.params_error(); std::vector params_s2 = sfw2.params_scale(); for ( int i = 0; i < params_e1.size(); i++ ) { test( "SFWHL-E", params_e1[i], params_e2[i], 0.025 ); test( "SFWHL-S", params_s1[i], params_s2[i], 0.025 ); } for ( HRI ih = fsig0.first(); !ih.last(); ih.next() ) if ( !fsig0[ih].missing() ) { clipper::SFweight_spline::TargetResult r00, r01, r10, r11, rhl; for ( double s = 0.20; s <= 1.01; s += 0.2 ) { for ( double p = 0.20; p <= 1.01; p += 0.2 ) { double w = p * fsig0[ih].f(); w = w * w; const double d = 0.000001; r00 = sfw1.targetfn( ih.hkl_class(), fsig0[ih], fcal[ih], s, w ); rhl = sfw1.targethl( ih.hkl_class(), fsig0[ih], abcd[ih], fcal[ih], s, w ); //std::cout << fsig0[ih].f() << " " << fcal[ih].f() << " " << s << " " << w << " " << r00.r << " " << rhl.r << std::endl; test( "SFW-TGT-CMP", r00.r, rhl.r, 1.0 ); r00 = sfw1.targetfn( ih.hkl_class(), fsig0[ih], fcal[ih], s, w ); r01 = sfw1.targetfn( ih.hkl_class(), fsig0[ih], fcal[ih], s, w+d ); r10 = sfw1.targetfn( ih.hkl_class(), fsig0[ih], fcal[ih], s+d, w ); r11 = sfw1.targetfn( ih.hkl_class(), fsig0[ih], fcal[ih], s+d, w+d ); test( "SFW-FN-DW ", (r01.r-r00.r)/d, r00.dw, 0.02 ); test( "SFW-FN-DS ", (r10.r-r00.r)/d, r00.ds, 0.02 ); test( "SFW-FN-DWW", (r01.dw-r00.dw)/d, r00.dww, 0.02 ); test( "SFW-FN-DSS", (r10.ds-r00.ds)/d, r00.dss, 0.02 ); r00 = sfw1.targethl( ih.hkl_class(), fsig0[ih], abcd[ih], fcal[ih], s, w ); r01 = sfw1.targethl( ih.hkl_class(), fsig0[ih], abcd[ih], fcal[ih], s, w+d ); r10 = sfw1.targethl( ih.hkl_class(), fsig0[ih], abcd[ih], fcal[ih], s+d, w ); r11 = sfw1.targethl( ih.hkl_class(), fsig0[ih], abcd[ih], fcal[ih], s+d, w+d ); test( "SFW-HL-DW ", (r01.r-r00.r)/d, r00.dw, 0.02 ); test( "SFW-HL-DS ", (r10.r-r00.r)/d, r00.ds, 0.02 ); test( "SFW-HL-DWW", (r01.dw-r00.dw)/d, r00.dww, 0.02 ); test( "SFW-HL-DSS", (r10.ds-r00.ds)/d, r00.dss, 0.02 ); } } } } // test map filter objects { HKL_data pw( fsig.hkl_info() ); HKL_data fp( fsig.hkl_info() ); pw.compute( abcd, data32::Compute_phifom_from_abcd() ); fp.compute( fsig, pw, data32::Compute_fphi_from_fsigf_phifom() ); Grid_sampling grid( spgr, cell, reso, 2.5 ); Xmap xmap( spgr, cell, grid ); xmap.fft_from( fp ); MapFilterFn_step step( 2.5 ); MapFilter_slow fltr1( step, 1.0, MapFilter_slow::Relative ); MapFilter_fft fltr2( step, 1.0, MapFilter_fft::Relative ); Xmap f1, f2; fltr1( f1, xmap ); fltr2( f2, xmap ); for ( MRI ix = xmap.first(); !ix.last(); ix.next() ) test( "MAPFILTER", f1[ix], f2[ix], 0.0001 ); } // test the convolution and fffear objects { HKL_data pw( fsig.hkl_info() ); HKL_data fp( fsig.hkl_info() ); pw.compute( abcd, data32::Compute_phifom_from_abcd() ); fp.compute( fsig, pw, data32::Compute_fphi_from_fsigf_phifom() ); Grid_sampling grid( spgr, cell, reso, 2.5 ); Xmap xmap( spgr, cell, grid ); xmap.fft_from( fp ); Xmap r1( Spacegroup::p1(), xmap.cell(), xmap.grid_sampling() ); Xmap r2( Spacegroup::p1(), xmap.cell(), xmap.grid_sampling() ); int irad = 3; clipper::Grid_range tg( clipper::Coord_grid(-irad,-irad,-irad), clipper::Coord_grid( irad, irad, irad) ); NXmap target( xmap.cell(), xmap.grid_sampling(), tg ); NXmap weight( xmap.cell(), xmap.grid_sampling(), tg ); target = weight = 0.0; for ( Coord_grid c = tg.min(); !c.last(tg); c.next(tg) ) { if ( c*c <= 5 ) { target.set_data(c-tg.min(),xmap.get_data(c)); weight.set_data(c-tg.min(),1.0); } } Convolution_search_slow conv1( xmap ); Convolution_search_fft conv2( xmap ); conv1( r1, target ); conv2( r2, target ); for ( MRI ix = r1.first(); !ix.last(); ix.next() ) test( "CONVOL", r1[ix], r2[ix], 0.0001 ); FFFear_slow srch1( xmap ); FFFear_fft srch2( xmap ); srch1( r1, target, weight ); srch2( r2, target, weight ); for ( MRI ix = r1.first(); !ix.last(); ix.next() ) test( "FFFEAR", r1[ix], r2[ix], 0.0001 ); } // test anisotropic scaling { // expand to P1 Spacegroup spgrp1( Spacegroup::P1 ); HKL_info hkl1( spgrp1, cell, fsig.hkl_info().resolution(), true ); HKL_data fs( hkl1 ); for ( HRI ih = hkl1.first(); !ih.last(); ih.next() ) fs[ih] = fsig[ih.hkl()]; // make data objects HKL_data fp( fs.hkl_info() ); HKL_data fs1 = fs; HKL_data fs2 = fs; U_aniso_orth u_ref( 0.10, 0.13, 0.17, -0.02, 0.03, -0.04 ); // simulate aniso data for ( HRI ih = fs.first(); !ih.last(); ih.next() ) if ( !fs[ih].missing() ) { Coord_reci_orth c = ih.hkl().coord_reci_orth(cell); double s = exp( Util::twopi2() * u_ref.quad_form( c ) ); fs1[ih].scale(s); fs2[ih].scale(1.0/s); fp[ih] = data32::F_phi( fs[ih].f(), 0.0 ); } // now attempt scaling SFscale_aniso::TYPE F = SFscale_aniso::F; SFscale_aniso sfscl; sfscl( fs1, fp ); U_aniso_orth u_wrk1 = sfscl.u_aniso_orth(F); sfscl( fp, fs2 ); U_aniso_orth u_wrk2 = sfscl.u_aniso_orth(F); test( "ANISO-O-00", u_ref.mat00(), u_wrk1.mat00(), 1.0e-6 ); test( "ANISO-O-11", u_ref.mat11(), u_wrk1.mat11(), 1.0e-6 ); test( "ANISO-O-22", u_ref.mat22(), u_wrk1.mat22(), 1.0e-6 ); test( "ANISO-O-01", u_ref.mat01(), u_wrk1.mat01(), 1.0e-6 ); test( "ANISO-O-02", u_ref.mat02(), u_wrk1.mat02(), 1.0e-6 ); test( "ANISO-O-12", u_ref.mat12(), u_wrk1.mat12(), 1.0e-6 ); test( "ANISO-C-00", u_ref.mat00(), u_wrk2.mat00(), 1.0e-6 ); test( "ANISO-C-11", u_ref.mat11(), u_wrk2.mat11(), 1.0e-6 ); test( "ANISO-C-22", u_ref.mat22(), u_wrk2.mat22(), 1.0e-6 ); test( "ANISO-C-01", u_ref.mat01(), u_wrk2.mat01(), 1.0e-6 ); test( "ANISO-C-02", u_ref.mat02(), u_wrk2.mat02(), 1.0e-6 ); test( "ANISO-C-12", u_ref.mat12(), u_wrk2.mat12(), 1.0e-6 ); } return ( error_count == 0 ); } } // namespace clipper clipper-2.1/clipper/contrib/sfcalc_obs.h0000644000374100011300000000654610736662166015322 00000000000000/*! \file sfcalc_obs.h Header file for structure factor calculation vs observed object */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_SFCALC_OBS #define CLIPPER_SFCALC_OBS #include "function_object_bases.h" namespace clipper { //! Structure factor calculation vs observed using bulk solvent. /*! Perform structure factor calculation, adding an additional bulk solvent/missing correction to give best fit to observed data. A scaling is used internally, but not output. \ingroup g_funcobj */ template class SFcalc_obs_bulk : public SFcalc_obs_base { public: //! constructor SFcalc_obs_bulk( const int n_params = 12 ) : nparams(n_params) {} //! constructor: shorthand for constructor+operator SFcalc_obs_bulk( HKL_data >& fphi, const HKL_data >& fsig, const Atom_list& atoms, const int n_params = 12 ) : nparams(n_params) { (*this)( fphi, fsig, atoms ); } bool operator() ( HKL_data >& fphi, const HKL_data >& fsig, const Atom_list& atoms ); const ftype& bulk_frac() { return bulkfrc; } const ftype& bulk_scale() { return bulkscl; } private: int nparams; double bulkfrc, bulkscl; }; } // namespace clipper #endif clipper-2.1/clipper/contrib/skeleton.h0000644000374100011300000001163610736662166015044 00000000000000/*! \file skeleton.h Header file for sample skeletonisation impelementation \ingroup g_skel */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_SKELETON #define CLIPPER_SKELETON #include #include #include "function_object_bases.h" namespace clipper { //! Simple skeletonisation implementation /*! \ingroup g_skel */ class Skeleton_basic : public Skeleton_base { public: // helper classes class Neighbours { public: Neighbours( const clipper::Xmap_base &map, const float min_dist = 0.5, const float max_dist = 2.5 ); clipper::Coord_grid operator[] (int i) const { return nlist[i]; } int size() const { return nlist.size(); } private: std::vector nlist; }; class NCube { public: NCube( const int& n ); const int& operator[] ( const clipper::Coord_grid& c ) const { return data[m.index(c)]; } int& operator[] ( const clipper::Coord_grid& c ) { return data[m.index(c)]; } const clipper::Grid_range& grid() const { return m; } private: clipper::Grid_range m; std::vector data; }; // methods //! constructor Skeleton_basic( const int box = 1 ) : box_(box) {} //! constructor: shorthand for constructor+operator Skeleton_basic( clipper::Xmap& xskl, const clipper::Xmap& xmap, const int box = 1 ) : box_(box) { (*this)( xskl, xmap ); } //! Skeletonise a map bool operator() ( clipper::Xmap& xskl, const clipper::Xmap& xmap ) const; private: static bool isInSkel( const clipper::Xmap& xskl, const clipper::Coord_grid& c, const Skeleton_basic::Neighbours& neigh, const int& box ); int box_; }; //! Fast template skeletonisation implementation /*! \ingroup g_skel */ template class Skeleton_fast : public Skeleton_base { public: // helper classes class Neighbours { public: Neighbours() {} Neighbours( const clipper::Xmap_base &map, const float min_dist = 0.5, const float max_dist = 2.5 ); clipper::Coord_grid operator[] (int i) const { return nlist[i]; } int size() const { return nlist.size(); } private: std::vector nlist; }; // methods //! constructor Skeleton_fast() {} //! constructor: shorthand for constructor+operator Skeleton_fast( clipper::Xmap& xskl, const clipper::Xmap& xmap ) { (*this)( xskl, xmap ); } //! Skeletonise a map bool operator() ( clipper::Xmap& xskl, const clipper::Xmap& xmap ) const; private: mutable int cube[3][3][3]; mutable Neighbours neigh; bool isInSkel( const clipper::Xmap& xskl, const clipper::Coord_grid& c ) const; void flood_cube( const int x, const int y, const int z ) const; }; } // namespace clipper #endif clipper-2.1/clipper/contrib/function_object_bases.h0000644000374100011300000002754410736662166017555 00000000000000/*! \file function_object_bases.h Header file for specifying interfaces to function objects \ingroup g_funcobj */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_FUNCTION_OBJECT_BASES #define CLIPPER_FUNCTION_OBJECT_BASES #include "../core/hkl_datatypes.h" #include "../core/xmap.h" #include "../core/nxmap_operator.h" namespace clipper { //! Base class for structure factor calculation methods /*! \ingroup g_funcobj */ template class SFcalc_base { public: //! Structure factor calculation function definition /*! In the implementations, this function will do the actual structure factor calculation. \param fphidata Fourier coefficients to be calculated. On output this holds the Fourier coefficients corresponding to the atomic model. \param atoms The atom selection from which the density is to be calculated. \return true on success. */ virtual bool operator() ( HKL_data >& fphidata, const Atom_list& atoms ) const = 0; virtual ~SFcalc_base() {} //!< destructor }; //! Base class for electron density calculation methods /*! \ingroup g_funcobj */ template class EDcalc_base { public: //! Electron density calculation function definition /*! In the implementations, this function will do the actual electron density calculation. \param xmap Electron density map to be calculated. On output this holds the electron density map corresponding to the atomic model. \param atoms The atom selection from which the density is to be calculated. \return true on success. */ virtual bool operator() ( Xmap& xmap, const Atom_list& atoms ) const = 0; virtual bool operator() ( NXmap& nxmap, const Atom_list& atoms ) const = 0; virtual ~EDcalc_base() {} //!< destructor }; //! Base class for structure factor calculation vs observed methods /*! \ingroup g_funcobj */ template class SFcalc_obs_base { public: //! Structure factor calculation function definition /*! In the implementations, this function will do the actual structure factor calculation. \param fphidata Fourier coefficients to be calculated. On output this holds the Fourier coefficients corresponding to the atomic model. \param fo Observed data against which to reference the Fcalc, e.g. to fit scale and/or bulk solvent. \param atoms The atom selection from which the density is to be calculated. \return true on success. */ virtual bool operator() ( HKL_data >& fphi, const HKL_data >& fsig, const Atom_list& atoms ) = 0; virtual ~SFcalc_obs_base() {} //!< destructor }; //! Base class for structure factor weighting (sigmaa) methods /*! \ingroup g_funcobj */ template class SFweight_base { public: //! Flag values for different reflection purposes enum TYPE { NONE, SIGMAA, SCALE, BOTH }; //! Structure factor weighting (sigmaa) definition /*! In the implementations, this function will do the actual structure factor weighting calculation \param fb Output best map coefficients. \param fd Output difference map coefficients. \param phiw Output phase and figure-of-merit. \param fo Input observed structure factors. \param fc Input calculated map coefficients. \param flag Input flag indicating what to use this reflection for. \return true on success. */ virtual bool operator() ( HKL_data >& fb, HKL_data >& fd, HKL_data >& phiw, const HKL_data >& fo, const HKL_data >& fc, const HKL_data& usage ) = 0; virtual ~SFweight_base() {} //!< destructor }; //! Base class for structure factor scaling methods /*! \ingroup g_funcobj */ template class SFscale_base { public: //! Structure factor scaling definition /*! In the implementations, this function will do the actual structure factor scaling calculation. \param fo Observed structure factors to be scaled. \param fc Calculated structure factors to scale against. \return true on success. */ virtual bool operator() ( HKL_data >& fo, const HKL_data >& fc ) = 0; //! Structure factor scaling definition /*! In the implementations, this function will do the actual structure factor scaling calculation. \param fc Calculated structure factors to be scaled. \param fo Observed structure factors to scale against. \return true on success. */ virtual bool operator() ( HKL_data >& fc, const HKL_data >& fo ) = 0; //! Structure factor scaling definition /*! In the implementations, this function will do the actual structure factor scaling calculation. \param fo Observed structure factors to be scaled. \return true on success. */ virtual bool operator() ( HKL_data >& fo ) = 0; virtual ~SFscale_base() {} //!< destructor }; //! Base class for map filtering calculation methods /*! \ingroup g_funcobj */ template class MapFilter_base { public: //! Map filtering function definition /*! In the implementations, this function will do the actual map filtering calculation. \param result On output this holds the filtered electron density. \param xmap Electron density map to be filtered. \return true on success. */ virtual bool operator() ( Xmap& result, const Xmap& xmap ) const = 0; virtual ~MapFilter_base() {} //!< destructor }; //! Base class for convolution search methods /*! \ingroup g_funcobj Note: that target map must be supplied in the constructor or initialiser. This allows precalculation of some of the coefficients required. The () operator performs an actual search in that map for a given target. */ template class Convolution_search_base { public: /*! In the implementations, this function will do the actual convolution search calculation. \param result The convolution search residual map, containing the value of the search function for each offset of the search model. The search function is a least squares residual, or may be a negative log likelihood, therefore it is positive and low values represent better fits. \param srchval Map of the target density for which to search. \param nxop Operator relating the coordinate frames of the search target and the crystallographic map, used to rotate the search target. \return true on success. */ virtual bool operator() ( Xmap& result, const NXmap& srchval, const NX_operator& nxop ) const = 0; virtual ~Convolution_search_base() {} //!< destructor }; //! Base class for Fast Fourier Feature recongition (FFFEAR) methods /*! \ingroup g_funcobj Note: that target map must be supplied in the constructor or initialiser. This allows precalculation of some of the coefficients required. The () operator performs an actual search in that map for a given target. */ template class FFFear_base { public: /*! In the implementations, this function will do the actual fffear calculation. \param result The fffear residual map, containing the value of the search function for each offset of the search model. The search function is a least squares residual, or may be a negative log likelihood, therefore it is positive and low values represent better fits. \param srchval Map of the target density for which to search. \param srchwgt Map of the target weights for each density point. \param nxop Operator relating the coordinate frames of the search target and the crystallographic map, used to rotate the search target. \return true on success. */ virtual bool operator() ( Xmap& result, const NXmap& srchval, const NXmap& srchwgt, const NX_operator& nxop ) const = 0; virtual ~FFFear_base() {} //!< destructor }; //! Base class for skeleton calculation methods /*! \ingroup g_funcobj */ template class Skeleton_base { public: //! Skeletonisation function definition /*! In the implementations, this function will do the actual skeletonisation. \param xskl int/short/char map. On input this may hold 1 for any grid point which is to be considered for skeletonisation, and 0 for any other point (e.g. low density, solvent) [This feaure may not be present in all implementations]. On output this map holds 1 for any grid point which is part of a skeleton ridge, and 0 for any point which is not. \param xmap float/double map. This map holds the actual electron density values for the map. \return true on success. */ virtual bool operator() ( Xmap& xskl, const Xmap& xmap ) const = 0; virtual ~Skeleton_base() {} //!< destructor }; //! Base class for origin matching calculation methods /*! \ingroup g_funcobj */ template class OriginMatch_base { public: //! Origin matching function definition /*! In the implementations, this function will do the actual origin matching. \param invert True if the phases must be inverted. \param shift The coordinate shift required to match the phases. \patam fphi1 The first set of map coefficients. \patam fphi2 The second set of map coefficients. \return true on success. */ virtual bool operator() ( bool& invert, Coord_frac& shift, const HKL_data >& fphi1, const HKL_data >& fphi2 ) const = 0; virtual ~OriginMatch_base() {} //!< destructor }; } // namespace clipper #endif clipper-2.1/clipper/contrib/Makefile.in0000644000374100011300000004747611372264333015116 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am, passed: clipper/contrib, extracted subdir: contrib # in dir /home/cowtan/clipper-autoconf/clipper-2.1/clipper/contrib VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = clipper/contrib DIST_COMMON = $(library_include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ccp4.m4 \ $(top_srcdir)/config/clipper.m4 $(top_srcdir)/config/fftw.m4 \ $(top_srcdir)/config/gpp4.m4 $(top_srcdir)/config/mmdb.m4 \ $(top_srcdir)/config/utimbuf.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(library_includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libclipper_contrib_la_DEPENDENCIES = \ $(top_builddir)/clipper/core/libclipper-core.la am_libclipper_contrib_la_OBJECTS = convolution_search.lo edcalc.lo \ fffear.lo function_object_bases.lo mapfilter.lo originmatch.lo \ sfcalc.lo sfcalc_obs.lo sfscale.lo sfweight.lo skeleton.lo \ test_contrib.lo libclipper_contrib_la_OBJECTS = $(am_libclipper_contrib_la_OBJECTS) libclipper_contrib_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libclipper_contrib_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libclipper_contrib_la_SOURCES) DIST_SOURCES = $(libclipper_contrib_la_SOURCES) HEADERS = $(library_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AR = @AR@ AR_FLAGS = @AR_FLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCP4_CXXFLAGS = @CCP4_CXXFLAGS@ CCP4_LIBS = @CCP4_LIBS@ CFLAGS = @CFLAGS@ CLIPPER_CCP4_DIR = @CLIPPER_CCP4_DIR@ CLIPPER_CIF_DIR = @CLIPPER_CIF_DIR@ CLIPPER_CNS_DIR = @CLIPPER_CNS_DIR@ CLIPPER_CONTRIB_DIR = @CLIPPER_CONTRIB_DIR@ CLIPPER_LT_VERSION = @CLIPPER_LT_VERSION@ CLIPPER_MINIMOL_DIR = @CLIPPER_MINIMOL_DIR@ CLIPPER_MMDB_DIR = @CLIPPER_MMDB_DIR@ CLIPPER_PHS_DIR = @CLIPPER_PHS_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_CXXFLAGS = @FFTW_CXXFLAGS@ FFTW_LIBS = @FFTW_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMDB_CXXFLAGS = @MMDB_CXXFLAGS@ MMDB_LIBS = @MMDB_LIBS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = ${FFTW_CXXFLAGS} ${MMDB_CXXFLAGS} library_include_HEADERS = \ convolution_search.h \ edcalc.h \ fffear.h \ function_object_bases.h \ mapfilter.h \ originmatch.h \ sfcalc.h \ sfcalc_obs.h \ sfscale.h \ sfweight.h \ skeleton.h \ test_contrib.h lib_LTLIBRARIES = libclipper-contrib.la libclipper_contrib_la_SOURCES = \ convolution_search.cpp \ edcalc.cpp \ fffear.cpp \ function_object_bases.cpp \ mapfilter.cpp \ originmatch.cpp \ sfcalc.cpp \ sfcalc_obs.cpp \ sfscale.cpp \ sfweight.cpp \ skeleton.cpp \ test_contrib.cpp library_includedir = $(pkgincludedir)/contrib libclipper_contrib_la_LDFLAGS = -version-info @CLIPPER_LT_VERSION@ libclipper_contrib_la_LIBADD = \ $(top_builddir)/clipper/core/libclipper-core.la all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu clipper/contrib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu clipper/contrib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): 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 \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ 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)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libclipper-contrib.la: $(libclipper_contrib_la_OBJECTS) $(libclipper_contrib_la_DEPENDENCIES) $(libclipper_contrib_la_LINK) -rpath $(libdir) $(libclipper_contrib_la_OBJECTS) $(libclipper_contrib_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convolution_search.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edcalc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fffear.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/function_object_bases.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mapfilter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/originmatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sfcalc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sfcalc_obs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sfscale.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sfweight.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skeleton.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_contrib.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-library_includeHEADERS: $(library_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(library_includedir)" || $(MKDIR_P) "$(DESTDIR)$(library_includedir)" @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(library_includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \ done uninstall-library_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(library_includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(library_includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(library_includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-library_includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-library_includeHEADERS \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: clipper-2.1/clipper/contrib/edcalc.cpp0000644000374100011300000002171410736662166014764 00000000000000/* edcalc.cpp: Electron density calculation implementation */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "edcalc.h" #include "../core/atomsf.h" namespace clipper { template bool EDcalc_mask::operator() ( Xmap& xmap, const Atom_list& atoms ) const { xmap = 0.0; const Cell& cell = xmap.cell(); const Grid_sampling& grid = xmap.grid_sampling(); Coord_orth xyz; Coord_grid g0, g1; Grid_range gd( cell, grid, radius_ ); typename Xmap::Map_reference_coord i0, iu, iv, iw; for ( int i = 0; i < atoms.size(); i++ ) if ( !atoms[i].is_null() ) { xyz = atoms[i].coord_orth(); g0 = xmap.coord_map( xyz ).coord_grid() + gd.min(); g1 = xmap.coord_map( xyz ).coord_grid() + gd.max(); i0 = typename Xmap::Map_reference_coord( xmap, g0 ); for ( iu = i0; iu.coord().u() <= g1.u(); iu.next_u() ) for ( iv = iu; iv.coord().v() <= g1.v(); iv.next_v() ) for ( iw = iv; iw.coord().w() <= g1.w(); iw.next_w() ) if ( ( xyz - iw.coord_orth() ).lengthsq() < radius_*radius_ ) xmap[iw] = 1.0; } return true; } template bool EDcalc_mask::operator() ( NXmap& nxmap, const Atom_list& atoms ) const { nxmap = 0.0; Coord_orth xyz; Coord_grid g0, g1; g0 = Coord_map( nxmap.operator_orth_grid().rot() * Vec3<>(radius_,radius_,radius_) ).coord_grid(); Grid_range gd( -g0, g0 ); Grid_range box( Coord_grid(0,0,0), Coord_grid(nxmap.grid())-Coord_grid(1,1,1) ); typename NXmap::Map_reference_coord i0, iu, iv, iw; for ( int i = 0; i < atoms.size(); i++ ) if ( !atoms[i].is_null() ) { xyz = atoms[i].coord_orth(); g0 = nxmap.coord_map( xyz ).coord_grid() + gd.min(); g1 = nxmap.coord_map( xyz ).coord_grid() + gd.max(); i0 = typename NXmap::Map_reference_coord( nxmap, g0 ); for ( iu = i0; iu.coord().u() <= g1.u(); iu.next_u() ) for ( iv = iu; iv.coord().v() <= g1.v(); iv.next_v() ) for ( iw = iv; iw.coord().w() <= g1.w(); iw.next_w() ) if ( box.in_grid( iw.coord() ) ) if ( ( xyz - iw.coord_orth() ).lengthsq() < radius_*radius_ ) nxmap[iw] = 1.0; } return true; } template bool EDcalc_iso::operator() ( Xmap& xmap, const Atom_list& atoms ) const { xmap = 0.0; const Cell& cell = xmap.cell(); const Grid_sampling& grid = xmap.grid_sampling(); Coord_orth xyz; Coord_grid g0, g1; Grid_range gd( cell, grid, radius_ ); typename Xmap::Map_reference_coord i0, iu, iv, iw; for ( int i = 0; i < atoms.size(); i++ ) if ( !atoms[i].is_null() ) { AtomShapeFn sf( atoms[i].coord_orth(), atoms[i].element(), atoms[i].u_iso(), atoms[i].occupancy() ); g0 = xmap.coord_map( atoms[i].coord_orth() ).coord_grid() + gd.min(); g1 = xmap.coord_map( atoms[i].coord_orth() ).coord_grid() + gd.max(); i0 = typename Xmap::Map_reference_coord( xmap, g0 ); for ( iu = i0; iu.coord().u() <= g1.u(); iu.next_u() ) for ( iv = iu; iv.coord().v() <= g1.v(); iv.next_v() ) for ( iw = iv; iw.coord().w() <= g1.w(); iw.next_w() ) xmap[iw] += sf.rho( iw.coord_orth() ); } for ( typename Xmap::Map_reference_index ix = xmap.first(); !ix.last(); ix.next() ) xmap[ix] *= xmap.multiplicity( ix.coord() ); return true; } template bool EDcalc_iso::operator() ( NXmap& nxmap, const Atom_list& atoms ) const { nxmap = 0.0; Coord_orth xyz; Coord_grid g0, g1; g0 = Coord_map( nxmap.operator_orth_grid().rot() * Vec3<>(radius_,radius_,radius_) ).coord_grid(); Grid_range gd( -g0, g0 ); Grid_range box( Coord_grid(0,0,0), Coord_grid(nxmap.grid())-Coord_grid(1,1,1) ); typename NXmap::Map_reference_coord i0, iu, iv, iw; for ( int i = 0; i < atoms.size(); i++ ) if ( !atoms[i].is_null() ) { AtomShapeFn sf( atoms[i].coord_orth(), atoms[i].element(), atoms[i].u_iso(), atoms[i].occupancy() ); g0 = nxmap.coord_map( atoms[i].coord_orth() ).coord_grid() + gd.min(); g1 = nxmap.coord_map( atoms[i].coord_orth() ).coord_grid() + gd.max(); i0 = typename NXmap::Map_reference_coord( nxmap, g0 ); for ( iu = i0; iu.coord().u() <= g1.u(); iu.next_u() ) for ( iv = iu; iv.coord().v() <= g1.v(); iv.next_v() ) for ( iw = iv; iw.coord().w() <= g1.w(); iw.next_w() ) if ( box.in_grid( iw.coord() ) ) nxmap[iw] += sf.rho( iw.coord_orth() ); } return true; } template bool EDcalc_aniso::operator() ( Xmap& xmap, const Atom_list& atoms ) const { xmap = 0.0; const Cell& cell = xmap.cell(); const Grid_sampling& grid = xmap.grid_sampling(); Coord_orth xyz; Coord_grid g0, g1; Grid_range gd( cell, grid, radius_ ); typename Xmap::Map_reference_coord i0, iu, iv, iw; for ( int i = 0; i < atoms.size(); i++ ) if ( !atoms[i].is_null() ) { U_aniso_orth u( atoms[i].u_aniso_orth() ); if ( u.is_null() ) u = U_aniso_orth( atoms[i].u_iso() ); AtomShapeFn sf( atoms[i].coord_orth(), atoms[i].element(), u, atoms[i].occupancy() ); g0 = xmap.coord_map( atoms[i].coord_orth() ).coord_grid() + gd.min(); g1 = xmap.coord_map( atoms[i].coord_orth() ).coord_grid() + gd.max(); i0 = typename Xmap::Map_reference_coord( xmap, g0 ); for ( iu = i0; iu.coord().u() <= g1.u(); iu.next_u() ) for ( iv = iu; iv.coord().v() <= g1.v(); iv.next_v() ) for ( iw = iv; iw.coord().w() <= g1.w(); iw.next_w() ) xmap[iw] += sf.rho( iw.coord_orth() ); } for ( typename Xmap::Map_reference_index ix = xmap.first(); !ix.last(); ix.next() ) xmap[ix] *= xmap.multiplicity( ix.coord() ); return true; } template bool EDcalc_aniso::operator() ( NXmap& nxmap, const Atom_list& atoms ) const { nxmap = 0.0; Coord_orth xyz; Coord_grid g0, g1; g0 = Coord_map( nxmap.operator_orth_grid().rot() * Vec3<>(radius_,radius_,radius_) ).coord_grid(); Grid_range gd( -g0, g0 ); Grid_range box( Coord_grid(0,0,0), Coord_grid(nxmap.grid())-Coord_grid(1,1,1) ); typename NXmap::Map_reference_coord i0, iu, iv, iw; for ( int i = 0; i < atoms.size(); i++ ) if ( !atoms[i].is_null() ) { U_aniso_orth u( atoms[i].u_aniso_orth() ); if ( u.is_null() ) u = U_aniso_orth( atoms[i].u_iso() ); AtomShapeFn sf( atoms[i].coord_orth(), atoms[i].element(), u, atoms[i].occupancy() ); g0 = nxmap.coord_map( atoms[i].coord_orth() ).coord_grid() + gd.min(); g1 = nxmap.coord_map( atoms[i].coord_orth() ).coord_grid() + gd.max(); i0 = typename NXmap::Map_reference_coord( nxmap, g0 ); for ( iu = i0; iu.coord().u() <= g1.u(); iu.next_u() ) for ( iv = iu; iv.coord().v() <= g1.v(); iv.next_v() ) for ( iw = iv; iw.coord().w() <= g1.w(); iw.next_w() ) if ( box.in_grid( iw.coord() ) ) nxmap[iw] += sf.rho( iw.coord_orth() ); } return true; } // compile templates template class EDcalc_mask; template class EDcalc_mask; template class EDcalc_iso; template class EDcalc_iso; template class EDcalc_aniso; template class EDcalc_aniso; } // namespace clipper clipper-2.1/clipper/contrib/convolution_search.h0000644000374100011300000001040310736662166017113 00000000000000/*! \file convolution_search.h Header file for sample Convolution_search impelementation \ingroup g_convolution_search */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_CONVOLUTION_SEARCH #define CLIPPER_CONVOLUTION_SEARCH #include "function_object_bases.h" namespace clipper { //! FFT-based Convolution_search implementation /*! \ingroup g_convolution_search This implementation is currently unoptimised, but much faster then the simple implementation. */ template class Convolution_search_slow : public Convolution_search_base { public: //! constructor Convolution_search_slow( const Xmap& xmap ) { init( xmap ); } //! constructor: shorthand for constructor+operator Convolution_search_slow( Xmap& result, const NXmap& srchval, const Xmap& xmap, const NX_operator& nxop ) { init( xmap ); (*this)( result, srchval, nxop ); } //! initialiser: initialise with the given target Xmap void init( const Xmap& xmap ) { xmp = ⟼ } bool operator() ( Xmap& result, const NXmap& srchval, const NX_operator& nxop ) const; bool operator() ( Xmap& result, const NXmap& srchval ) const; //!< \deprecated private: const Xmap* xmp; }; //! FFT-based Convolution_search implementation /*! \ingroup g_convolution_search This implementation is currently unoptimised, but much faster then the simple implementation. */ template class Convolution_search_fft : public Convolution_search_base { public: //! constructor Convolution_search_fft( const Xmap& xmap ) { init( xmap ); } //! constructor: shorthand for constructor+operator Convolution_search_fft( Xmap& result, const NXmap& srchval, const Xmap& xmap, const NX_operator& nxop ) { init( xmap ); (*this)( result, srchval, nxop ); } //! initialiser: initialise with the given target Xmap void init( const Xmap& xmap ); bool operator() ( Xmap& result, const NXmap& srchval, const NX_operator& nxop ) const; bool operator() ( Xmap& result, const NXmap& srchval ) const; //!< \deprecated private: ftype vol; FFTmap_p1 rho1; }; } // namespace clipper #endif clipper-2.1/clipper/contrib/function_object_bases.cpp0000644000374100011300000000440710736662166020101 00000000000000/* function_object_bases.cpp: implementation */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "function_object_bases.h" namespace clipper { } // namespace clipper clipper-2.1/clipper/contrib/sfweight.cpp0000644000374100011300000004657411144270113015361 00000000000000/* sfweight.cpp: structure factor weighting implementation */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #include "sfweight.h" #include "../core/hkl_operators.h" #include "../core/resol_targetfn.h" namespace clipper { template typename SFweight_spline::TargetResult SFweight_spline::TargetFo::operator() ( const HKL_class cls, const datatypes::F_sigF& fo0, const datatypes::ABCD& hl0, const datatypes::F_phi& fc0, const ftype& s, const ftype& w, const std::vector& hlterms ) { ftype fo(0.0), fc(0.0), phic(0.0), sfo(1.0); if ( !fo0.missing() ) { fo = fo0.f(); sfo = fo0.sigf(); } if ( !fc0.missing() ) { fc = fc0.f(); phic = fc0.phi(); } const ftype epc = cls.epsilonc(); const ftype s2 = s*s; const ftype fo2 = fo*fo; const ftype fc2 = fc*fc; const ftype d = 2.0*sfo*sfo + epc*w; const ftype d2 = d*d; const ftype d3 = d*d2; const ftype d4 = d*d3; const ftype x = 2.0*fo*fc*s/d; ftype i0, di0, ddi0, cf; TargetResult r; if ( cls.centric() ) { i0 = (fabs(x)<10.0) ? log(cosh(x)) : fabs(x)+log(0.5); di0 = tanh(x); ddi0 = 1.0-pow(tanh(x),2); cf = 0.5; } else { i0 = Util::sim_integ(x); di0 = Util::sim(x); ddi0 = Util::sim_deriv(x); cf = 1.0; } r.r = cf*log(d) + (fo2+s2*fc2)/d - i0; r.ds = 2.0*s*fc2/d - (2.0*fo*fc/d)*di0; r.dw = epc*( cf/d - (fo2+s2*fc2)/d2 + (2.0*fo*fc*s/d2)*di0 ); r.dss = 2.0*fc2/d - (4.0*fo2*fc2/d2)*ddi0; r.dww = epc*epc*( -cf/d2 + 2.0*(fo2+s2*fc2)/d3 - (4.0*fo*fc*s/d3)*di0 - (4.0*fo2*fc2*s2/d4)*ddi0 ); r.dsw = epc*( -2.0*s*fc2/d2 + (2.0*fo*fc/d2)*di0 + (4.0*fo2*fc2*s/d3)*ddi0 ); abcd = datatypes::ABCD( x*cos(phic), x*sin(phic), 0.0, 0.0 ); phiw = datatypes::Phi_fom( phic, di0 ); return r; } template typename SFweight_spline::TargetResult SFweight_spline::TargetHL::operator() ( const HKL_class cls, const datatypes::F_sigF& fo0, const datatypes::ABCD& hl0, const datatypes::F_phi& fc0, const ftype& s, const ftype& w, const std::vector& hlterms ) { ftype fo(0.0), fc(0.0), phic(0.0), sfo(1.0); ftype a0(0.0), b0(0.0), c0(0.0), d0(0.0); if ( !fo0.missing() ) { fo = fo0.f(); sfo = fo0.sigf(); } if ( !fc0.missing() ) { fc = fc0.f(); phic = fc0.phi(); } if ( !hl0.missing() ) { a0=hl0.a(); b0=hl0.b(); c0=hl0.c(); d0=hl0.d(); } const ftype epc = cls.epsilonc(); const ftype s2 = s*s; const ftype fo2 = fo*fo; const ftype fc2 = fc*fc; const ftype d = 2.0*sfo*sfo + epc*w; const ftype d2 = d*d; const ftype d3 = d*d2; //const ftype d4 = d*d3; const ftype epcd = epc/d; const ftype sf2 = fo2 + s2*fc2; const ftype xs = 2.0*fo*fc/d; const ftype cosc = cos(phic); const ftype sinc = sin(phic); const ftype hl_a = a0 + xs*s*cosc; const ftype hl_b = b0 + xs*s*sinc; const ftype hl_c = c0; const ftype hl_d = d0; ftype cf = 1.0; int a_zero = 0; int a_step = 1; if ( cls.centric() ) { a_step = hlterms.size()/2; a_zero = Util::intr( ftype(hlterms.size())*cls.allowed()/Util::twopi() ); a_zero = Util::mod( a_zero, a_step ); cf = 0.5; } ftype an, asum, asum_ds, asum_dss, asum_dw, asum_dww, asum_dsw, asum_a, asum_b; an = asum = asum_ds = asum_dss = asum_dw = asum_dww = asum_dsw = asum_a = asum_b = 0.0; ftype q, q1, q2, e; ftype qmax = sqrt( hl_a*hl_a + hl_b*hl_b ); for ( int a = a_zero; a < hlterms.size(); a += a_step ) { const HLterms& trig = hlterms[a]; q = hl_a*trig.cosa + hl_b*trig.sina + hl_c*trig.cos2a + hl_d*trig.sin2a; q1 = xs * ( cosc*trig.cosa + sinc*trig.sina ); q2 = s * q1; e = exp( q - qmax ); an += 1.0; asum += e; asum_ds += e * q1; asum_dss += e * q1*q1; asum_dw += e * ( -q2 )*epcd; asum_dww += e * ( 2.0 + q2 )*q2*epcd*epcd; asum_a += e * trig.cosa; asum_b += e * trig.sina; // asum_dsw += ?; } asum_a /= asum; asum_b /= asum; asum /= an; asum_ds /= an; asum_dss /= an; asum_dw /= an; asum_dww /= an; abcd = datatypes::ABCD( hl_a, hl_b, hl_c, hl_d ); phiw = datatypes::Phi_fom( atan2( asum_b, asum_a ), sqrt( asum_a*asum_a + asum_b*asum_b ) ); TargetResult r; r.r = cf*log(d) + sf2/d - log( asum ) - qmax; r.ds = (2.0*s*fc2)/d - asum_ds/asum; r.dw = epc*(cf/d-sf2/d2) - asum_dw/asum; r.dss = (2.0*fc2)/d - asum_dss/asum + Util::sqr(asum_ds/asum); r.dww = epc*epc*(-cf/d2+2.0*sf2/d3) - asum_dww/asum + Util::sqr(asum_dw/asum); r.dsw = Util::nan(); return r; } template SFweight_spline::SFweight_spline( HKL_data >& fb, HKL_data >& fd, HKL_data >& phiw, const HKL_data >& fo, const HKL_data >& fc, const HKL_data& usage, const int n_reflns, const int n_params ) { init( n_reflns, n_params ); (*this)( fb, fd, phiw, fo, fc, usage ); } template void SFweight_spline::init( const int n_reflns, const int n_params, const int n_phases ) { nreflns = n_reflns; nparams = n_params; hlterms.resize( n_phases ); for ( int a = 0; a < hlterms.size(); a++ ) { ftype phi = ( Util::twopi() * ftype(a)/ftype(hlterms.size()) ); hlterms[a].cosa = cos(phi); hlterms[a].sina = sin(phi); hlterms[a].cos2a = cos(2.0*phi); hlterms[a].sin2a = sin(2.0*phi); } } template bool SFweight_spline::operator() ( HKL_data >& fb, HKL_data >& fd, HKL_data >& phiw, const HKL_data >& fo0, const HKL_data >& fc0, const HKL_data& usage ) { TargetFo tgt; HKL_data > hl0( fo0.hkl_info() ), hl( fo0.hkl_info() ); return evaluate( fb, fd, phiw, hl, fo0, hl0, fc0, usage, tgt ); } template bool SFweight_spline::operator() ( HKL_data >& fb, HKL_data >& fd, HKL_data >& phiw, HKL_data >& hl, const HKL_data >& fo0, const HKL_data >& hl0, const HKL_data >& fc0, const HKL_data& usage ) { TargetHL tgt; return evaluate( fb, fd, phiw, hl, fo0, hl0, fc0, usage, tgt ); } template template bool SFweight_spline::evaluate( HKL_data >& fb, HKL_data >& fd, HKL_data >& phiw, HKL_data >& hl, const HKL_data >& fo0, const HKL_data >& hl0, const HKL_data >& fc0, const HKL_data& usage, F tgt ) { const HKL_info& hkls = fo0.base_hkl_info(); typedef clipper::HKL_info::HKL_reference_index HRI; bool status = false; // count reflections and determine number of params HKL_data flag(hkls); for ( HRI ih = flag.first(); !ih.last(); ih.next() ) flag[ih].flag() = (!fo0[ih].missing()) && (!fc0[ih].missing()) && (usage[ih].flag()!=SFweight_base::NONE); int npar_sig = num_params( flag ); int npar_scl = npar_sig; while ( npar_scl < 12 ) npar_scl *= 2; // prepare function BasisFn_spline basisfn( flag, npar_sig, 1.0 ); BasisFn_spline basissc( flag, npar_scl, 1.0 ); BasisFn_base::Fderiv dsdp, dwdp; TargetResult fn; scale_fo.resize( hkls.num_reflections() ); scale_fc.resize( hkls.num_reflections() ); value_s.resize( hkls.num_reflections() ); value_w.resize( hkls.num_reflections() ); // create E's for scaling HKL_data > eo( hkls ), ec( hkls ); for ( HRI ih = fo0.first(); !ih.last(); ih.next() ) { eo[ih].E() = fo0[ih].f() / sqrt( ih.hkl_class().epsilon() ); ec[ih].E() = fc0[ih].f() / sqrt( ih.hkl_class().epsilon() ); eo[ih].sigE() = ec[ih].sigE() = 1.0; } // calc scale std::vector param_fo( basissc.num_params(), 1.0 ); TargetFn_scaleEsq > tfn_fo( eo ); ResolutionFn rfn_fo( hkls, basissc, tfn_fo, param_fo ); param_fo = rfn_fo.params(); std::vector param_fc( basissc.num_params(), 1.0 ); TargetFn_scaleEsq > tfn_fc( ec ); ResolutionFn rfn_fc( hkls, basissc, tfn_fc, param_fc ); param_fc = rfn_fc.params(); // prescale Fo, Fc HKL_data > fo = fo0; HKL_data > fc = fc0; for ( HRI ih = fo0.first(); !ih.last(); ih.next() ) { scale_fo[ ih.index() ] = sqrt( basissc.f_s( ih.invresolsq(), param_fo ) ); scale_fc[ ih.index() ] = sqrt( basissc.f_s( ih.invresolsq(), param_fc ) ); fo[ih].scale( scale_fo[ ih.index() ] ); fc[ih].scale( scale_fc[ ih.index() ] ); } // make first estimate of s param_s = std::vector( npar_sig, 1.0 ); // make first estimate of w HKL_data > ftmp( hkls ); for ( HRI ih = flag.first(); !ih.last(); ih.next() ) if ( flag[ih].flag() ) ftmp[ih].f() = ftmp[ih].sigf() = pow( fo[ih].f() - sqrt(basisfn.f_s(ih.invresolsq(),param_s))*fc[ih].f(), 2.0 ) / ih.hkl_class().epsilonc(); TargetFn_meanFnth > target_w( ftmp, 1.0 ); ResolutionFn rfn2( hkls, basisfn, target_w, param_w ); param_w = rfn2.params(); //for ( int i = 0; i < npar_sig; i++ ) std::cout << i << " " << param_s[i] << " \t" << param_w[i] << "\n"; // smooth the error term for ( int i = 0; i < npar_sig-1; i++ ) param_w[i] = Util::max( param_w[i], 0.5*param_w[i+1] ); //for ( int i = 0; i < npar_sig; i++ ) std::cout << i << " " << param_s[i] << " \t" << param_w[i] << "\n"; ftype ll, ll_old = 1.0e30; // now 25 cycles to refine s and w int c = 0, clim = 25; for ( c = 0; c < clim; c++ ) { std::vector grad_s( npar_sig, 0.0 ), shft_s( npar_sig, 0.0 ); std::vector grad_w( npar_sig, 0.0 ), shft_w( npar_sig, 0.0 ); Matrix curv_s( npar_sig, npar_sig, 0.0 ); Matrix curv_w( npar_sig, npar_sig, 0.0 ); ll = 0.0; // build matrices for ( HRI ih = flag.first(); !ih.last(); ih.next() ) if ( flag[ih].flag() ) { dsdp = basisfn.fderiv_s( ih.invresolsq(), param_s ); dwdp = basisfn.fderiv_s( ih.invresolsq(), param_w ); fn = tgt( ih.hkl_class(), fo[ih], hl0[ih], fc[ih], dsdp.f, dwdp.f, hlterms ); //if ( Util::isnan(fn.r) ) std::cout << ih.hkl().format() << fo[ih].f() << " " << fo[ih].sigf() << " " << fc[ih].f() << " " << fc[ih].missing() << flag[ih].missing() << " " << hl0[ih].a() << " " << hl0[ih].b() << " " << hl0[ih].c() << " " << hl0[ih].d() << " " << dsdp.f << " " << dwdp.f << " \tFo,SIGo,Fc,missing\n"; ll += fn.r; for ( int i = 0; i < npar_sig; i++ ) { grad_s[i] += fn.ds * dsdp.df[i]; grad_w[i] += fn.dw * dwdp.df[i]; //for ( int j = 0; j < npar_sig; j++ ) { for ( int j = Util::max(i-1,0); j <= Util::min(i+1,npar_sig-1); j++ ) { curv_s(i,j) += dsdp.df2(i,j)*fn.ds + dsdp.df[i]*dsdp.df[j]*fn.dss; curv_w(i,j) += dwdp.df2(i,j)*fn.dw + dwdp.df[i]*dwdp.df[j]*fn.dww; } } } //std::cout << c << "\t" << ll << "\n"; if ( ll > ll_old ) break; // break on divergence shft_s = curv_s.solve( grad_s ); shft_w = curv_w.solve( grad_w ); for ( int i = 0; i < npar_sig; i++ ) { //std::cout << i << " \t" << param_s[i] << " \t" << param_w[i] << " \t" << shft_s[i] << " \t" << shft_w[i] << "\n"; // soft buffers to prevent negatives param_s[i] -= Util::min( shft_s[i], 0.25*param_s[i] ); param_w[i] -= Util::min( shft_w[i], 0.25*param_w[i] ); } if ( ll / ll_old > 0.999999 ) { status=true; break; } // break on convergence ll_old = ll; } // store s,w for ( HRI ih = fo0.first(); !ih.last(); ih.next() ) { value_s[ih.index()] = basisfn.f_s( ih.invresolsq(), param_s ); value_w[ih.index()] = basisfn.f_s( ih.invresolsq(), param_w ); } // calculate map coeffs and FOM reevaluate( fb, fd, phiw, hl, fo0, hl0, fc0, usage, tgt ); return status; } template template bool SFweight_spline::reevaluate( HKL_data >& fb, HKL_data >& fd, HKL_data >& phiw, HKL_data >& hl, const HKL_data >& fo0, const HKL_data >& hl0, const HKL_data >& fc0, const HKL_data& usage, F tgt ) { typedef clipper::HKL_info::HKL_reference_index HRI; // prepare function TargetResult fn; datatypes::F_sigF fo; datatypes::F_phi fc, twomfo, mfo, dfc, fzero(0.0,0.0); // calculate map coeffs and FOM llw = llf = 0.0; for ( HRI ih = fo0.first(); !ih.last(); ih.next() ) { // prescale Fo, Fc fo = fo0[ih]; fc = fc0[ih]; fo.scale( scale_fo[ih.index()] ); fc.scale( scale_fc[ih.index()] ); // get params an llk const ftype s = value_s[ih.index()]; const ftype w = value_w[ih.index()]; fn = tgt( ih.hkl_class(), fo, hl0[ih], fc, s, w, hlterms ); hl[ih] = tgt.abcd; phiw[ih] = tgt.phiw; mfo = datatypes::F_phi( tgt.phiw.fom() * fo.f(), tgt.phiw.phi() ); twomfo = datatypes::F_phi( 2.0 * mfo.f(), mfo.phi() ); dfc = datatypes::F_phi( s * fc.f(), fc.phi() ); if ( (!fo.missing()) && (!fc.missing()) ) { if ( usage[ih].flag()==SFweight_base::NONE ) llw += fn.r; else llf += fn.r; } // deal with all possibilities of missing and non-missing if ( !fc.missing() ) { if ( !fo.missing() ) { fb[ih] = twomfo - dfc; fd[ih] = mfo - dfc; } else { fb[ih] = dfc; fd[ih] = fzero; } } else { if ( !fo.missing() ) { fb[ih] = mfo; fd[ih] = fzero; } else { fb[ih] = fzero; fd[ih] = fzero; } } // undo scaling on fb, fd fb[ih].scale( 1.0/scale_fo[ih.index()] ); fd[ih].scale( 1.0/scale_fo[ih.index()] ); } return true; } template typename SFweight_spline::TargetResult SFweight_spline::targetfn( const HKL_class cls, const datatypes::F_sigF& fo0, const datatypes::F_phi& fc0, const ftype& s, const ftype& w ) const { const datatypes::ABCD hl0; TargetFo tgt; return tgt( cls, fo0, hl0, fc0, s, w, hlterms ); } template typename SFweight_spline::TargetResult SFweight_spline::targethl( const HKL_class cls, const datatypes::F_sigF& fo0, const datatypes::ABCD& hl0, const datatypes::F_phi& fc0, const ftype& s, const ftype& w ) const { TargetHL tgt; return tgt( cls, fo0, hl0, fc0, s, w, hlterms ); } template int SFweight_spline::num_params( const HKL_data& flag ) const { int npar; int n_use = flag.num_obs(); if ( nparams == 0 ) { npar = Util::max( n_use / nreflns, 2 ); } else if ( nreflns == 0 ) { npar = nparams; } else { ftype np1 = ftype(nparams+0.499); ftype np2 = ftype(n_use) / ftype(nreflns); ftype np = sqrt( np1*np1*np2*np2 / ( np1*np1+np2*np2 ) ); npar = Util::max( int(np), 2 ); } return npar; } template void SFweight_spline::debug() const { TargetResult r00, r01, r10, r11, rxx; Spacegroup p1( Spacegroup::P1 ); HKL_class cls; datatypes::F_sigF fo; datatypes::F_phi fc; fo.f() = 10.0; fo.sigf() = 2.0; fc.f() = 15.0; fc.phi() = 0.0; fo.sigf() = 0.0; //!!!!! ftype ds = 0.000001; ftype dw = 0.000001; datatypes::ABCD hl( 0.0, 0.0, 0.0, 0.0 ); for ( int h = 0; h < 2; h++ ) { cls = HKL_class( p1, HKL( h, 0, 0 ) ); std::cout << "\nCentric? " << cls.centric() << " epsc " << cls.epsilonc() << "\n"; for ( ftype w = 10.0; w < 1000.0; w *= 3.0 ) for ( ftype s = 0.4; s < 2.0; s *= 2.0 ) { rxx = targethl( cls, fo, hl, fc, s, w ); r00 = targetfn( cls, fo, fc, s, w ); r01 = targetfn( cls, fo, fc, s, w+dw ); r10 = targetfn( cls, fo, fc, s+ds, w ); r11 = targetfn( cls, fo, fc, s+ds, w+dw ); std::cout << w << " " << s << "\t" << r00.r << " " << r01.r << " " << r10.r << " " << r11.r << " " << rxx.r << "\n"; std::cout << (r10.r-r00.r)/ds << "\t" << r00.ds << "\n"; std::cout << (r01.r-r00.r)/dw << "\t" << r00.dw << "\n"; std::cout << (r10.ds-r00.ds)/ds << "\t" << r00.dss << "\n"; std::cout << (r01.dw-r00.dw)/dw << "\t" << r00.dww << "\n"; std::cout << (r01.ds-r00.ds)/dw << "\t" << r00.dsw << "\n"; std::cout << (r10.dw-r00.dw)/ds << "\t" << r00.dsw << "\n"; } } for ( int h = 0; h < 2; h++ ) { cls = HKL_class( p1, HKL( h, 0, 0 ) ); std::cout << "\nCentric? " << cls.centric() << " epsc " << cls.epsilonc() << "\n"; for ( ftype w = 10.0; w < 1000.0; w *= 3.0 ) for ( ftype s = 0.4; s < 2.0; s *= 2.0 ) { rxx = targetfn( cls, fo, fc, s, w ); r00 = targethl( cls, fo, hl, fc, s, w ); r01 = targethl( cls, fo, hl, fc, s, w+dw ); r10 = targethl( cls, fo, hl, fc, s+ds, w ); r11 = targethl( cls, fo, hl, fc, s+ds, w+dw ); std::cout << w << " " << s << "\t" << r00.r << " " << r01.r << " " << r10.r << " " << r11.r << " " << rxx.r << "\n"; std::cout << (r10.r-r00.r)/ds << "\t" << r00.ds << "\n"; std::cout << (r01.r-r00.r)/dw << "\t" << r00.dw << "\n"; std::cout << (r10.ds-r00.ds)/ds << "\t" << r00.dss << "\n"; std::cout << (r01.dw-r00.dw)/dw << "\t" << r00.dww << "\n"; std::cout << (r01.ds-r00.ds)/dw << "\t" << r00.dsw << "\n"; std::cout << (r10.dw-r00.dw)/ds << "\t" << r00.dsw << "\n"; } } } // compile templates template class SFweight_spline; template class SFweight_spline; } // namespace clipper clipper-2.1/clipper/contrib/originmatch.h0000644000374100011300000000627510736662166015527 00000000000000/*! \file originmatch.h Header file for origin matching function object */ //C Copyright (C) 2000-2006 Kevin Cowtan and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the following additional clause: //L //L `You may also combine or link a "work that uses the Library" to //L produce a work containing portions of the Library, and distribute //L that work under terms of your choice, provided that you give //L prominent notice with each copy of the work that the specified //L version of the Library is used in it, and that you include or //L provide public access to the complete corresponding //L machine-readable source code for the Library including whatever //L changes were used in the work. (i.e. If you make changes to the //L Library you must distribute those, but you do not need to //L distribute source or object code to those portions of the work //L not covered by this licence.)' //L //L Note that this clause grants an additional right and does not impose //L any additional restriction, and so does not affect compatibility //L with the GNU General Public Licence (GPL). If you wish to negotiate //L other terms, please contact the maintainer. //L //L You can redistribute it and/or modify the library under the terms of //L the GNU Lesser General Public License as published by the Free Software //L Foundation; either version 2.1 of the License, or (at your option) any //L later version. //L //L This library is distributed in the hope that it will be useful, but //L WITHOUT ANY WARRANTY; without even the implied warranty of //L MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //L Lesser General Public License for more details. //L //L You should have received a copy of the CCP4 licence and/or GNU //L Lesser General Public License along with this library; if not, write //L to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK. //L The GNU Lesser General Public can also be obtained by writing to the //L Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, //L MA 02111-1307 USA #ifndef CLIPPER_ORIGINMATCH #define CLIPPER_ORIGINMATCH #include "function_object_bases.h" namespace clipper { //! Origin matching method using fast translation function. /*! Perform origin matching by performing a fast translation function. Both hands are tested if possible. \ingroup g_funcobj */ template class OriginMatch : public OriginMatch_base { public: //! constructor OriginMatch( const ftype resol_limit = 0.1 ) : limit(resol_limit) {} //! constructor: shorthand for constructor+operator OriginMatch( bool& invert, Coord_frac& shift, const HKL_data >& fphi1, const HKL_data >& fphi2, const ftype resol_limit = 0.1 ) : limit(resol_limit) { (*this)( invert, shift, fphi1, fphi2 ); } bool operator() ( bool& invert, Coord_frac& shift, const HKL_data >& fphi1, const HKL_data >& fphi2 ) const; private: ftype limit; }; } // namespace clipper #endif clipper-2.1/clipper/clipper-ccp4.h0000644000374100011300000000034410736662166014037 00000000000000/* Clipper header file */ /* (C) 2000-2002 Kevin Cowtan */ #ifndef CLIPPER_CCP4_H #define CLIPPER_CCP4_H #include "clipper/ccp4/ccp4_utils.h" #include "clipper/ccp4/ccp4_mtz_io.h" #include "clipper/ccp4/ccp4_map_io.h" #endif clipper-2.1/README0000644000374100011300000000105610736662166010624 00000000000000The aim of the project is to produce a set of object-oriented libraries for the organisation of crystallographic data and the performance of crystallographic computation. The libraries are designed as a framework for new crystallographic software, which will allow the full power of modern programming techniques to be exploited by the developer. This will lead to greater functionality from simpler code which will be easier to develop and debug. For installation instructions and documentation see: http://www.ysbl.york.ac.uk/~cowtan/clipper/clipper.html clipper-2.1/INSTALL0000644000374100011300000002243211372264321010762 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Here is a another example: /bin/bash ./configure CONFIG_SHELL=/bin/bash Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent configuration-related scripts to be executed by `/bin/bash'. `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. clipper-2.1/examples/0000777000374100011300000000000011372264353011635 500000000000000clipper-2.1/examples/csymmatch.cpp0000644000374100011300000002215311226615230014240 00000000000000// Clipper app to move one model to match another using xtal symmetry /* Copyright 2007 Kevin Cowtan & University of York all rights reserved */ #include #include #include #include class MapFilterFn_g5 : public clipper::MapFilterFn_base { public: clipper::ftype operator() ( const clipper::ftype& radius ) const { return exp(-radius*radius/50.0); } }; int main( int argc, char** argv ) { CCP4Program prog( "csymmatch", "0.3", "$Date: 2009/07/13" ); // defaults clipper::String title; clipper::String ippdbref = "NONE"; clipper::String ippdb = "NONE"; clipper::String oppdb = "symmatch.pdb"; double crad = 2.0; bool omatch = false; // command input CCP4CommandInput args( argc, argv, true ); int arg = 0; while ( ++arg < args.size() ) { if ( args[arg] == "-title" ) { if ( ++arg < args.size() ) title = args[arg]; } else if ( args[arg] == "-pdbin-ref" ) { if ( ++arg < args.size() ) ippdbref = args[arg]; } else if ( args[arg] == "-pdbin" ) { if ( ++arg < args.size() ) ippdb = args[arg]; } else if ( args[arg] == "-pdbout" ) { if ( ++arg < args.size() ) oppdb = args[arg]; } else if ( args[arg] == "-connectivity-radius" ) { if ( ++arg < args.size() ) crad = clipper::String(args[arg]).f(); } else if ( args[arg] == "-origin-hand" ) { omatch = true; } else { std::cout << "Unrecognized:\t" << args[arg] << "\n"; args.clear(); } } if ( args.size() <= 1 ) { std::cout << "Usage: csymmatch\n\t-pdbin-ref \n\t-pdbin \n\t-pdbout \n\t-connectivity-radius \n\t-origin-hand\nApply symmetry and cell shifts to each chain in 'pdbin' to obtain the best match to 'pdbin-ref'.\n"; exit(1); } // atomic models const int mmdbflags = MMDBF_IgnoreBlankLines | MMDBF_IgnoreDuplSeqNum | MMDBF_IgnoreNonCoorPDBErrors | MMDBF_IgnoreRemarks; clipper::MMDBfile mmdbref, mmdbwrk; clipper::MiniMol molref, molwrk; mmdbref.SetFlag( mmdbflags ); mmdbwrk.SetFlag( mmdbflags ); mmdbref.read_file( ippdbref ); mmdbwrk.read_file( ippdb ); mmdbref.import_minimol( molref ); mmdbwrk.import_minimol( molwrk ); clipper::Spacegroup spg1 = clipper::Spacegroup(clipper::Spacegroup::P1); clipper::Spacegroup spgr = mmdbwrk.spacegroup(); clipper::Cell cell = mmdbwrk.cell(); if ( spgr.is_null() ) { std::cerr << "Cannot get spacegroup, check PDB file and CCP4 setup" << std::endl; exit(1); } // user output std::cout << std::endl << "Reference molecule:" << std::endl; if ( !mmdbref.spacegroup().is_null() ) std::cout << " Spacegroup: " << mmdbref.spacegroup().symbol_hm() << std::endl; if ( !mmdbref.cell().is_null() ) std::cout << " Unit cell: " << mmdbref.cell().format() << std::endl; std::cout << "Moving molecule:" << std::endl; if ( !mmdbwrk.spacegroup().is_null() ) std::cout << " Spacegroup: " << mmdbwrk.spacegroup().symbol_hm() << std::endl; if ( !mmdbwrk.cell().is_null() ) std::cout << " Unit cell: " << mmdbwrk.cell().format() << std::endl; std::cout << std::endl; // do origin matching if required if ( omatch ) { // calculate structure factors clipper::Spacegroup rspgr = molref.spacegroup(); clipper::Cell rcell = molref.cell(); clipper::Resolution rreso( 3.0 ); clipper::HKL_sampling hkls( rcell, rreso ); clipper::HKL_data fphi1( rspgr, rcell, hkls ); clipper::HKL_data fphi2( rspgr, rcell, hkls ); clipper::SFcalc_iso_fft sfc; clipper::Atom_list atoms1 = molref.atom_list(); clipper::Atom_list atoms2 = molwrk.atom_list(); sfc( fphi1, atoms1 ); sfc( fphi2, atoms2 ); // get origin shift bool invert = false; clipper::Coord_frac x( 0.0, 0.0, 0.0 ); clipper::OriginMatch( invert, x, fphi1, fphi2 ); if ( invert ) std::cout << std::endl << " Change of hand : YES" << std::endl; else std::cout << std::endl << " Change of hand : NO" << std::endl; std::cout << " Change of origin: " << x.format() << std::endl << std::endl; // now move the atoms clipper::Mat33<> rot = clipper::Mat33<>::identity(); clipper::Coord_orth trn = x.coord_orth( rcell ); if ( invert ) rot = clipper::Mat33<>(-1.0,0.0,0.0,0.0,-1.0,0.0,0.0,0.0,-1.0); clipper::RTop_orth rt( rot, trn ); molwrk.transform( rt ); } // calculate extent of model clipper::Atom_list atomr = molref.atom_list(); clipper::Range urange, vrange, wrange; clipper::Coord_frac cfr( 0.0, 0.0, 0.0 ); for ( int i = 0; i < atomr.size(); i++ ) { clipper::Coord_frac cf = atomr[i].coord_orth().coord_frac( cell ); cfr += cf; urange.include( cf.u() ); vrange.include( cf.v() ); wrange.include( cf.w() ); } clipper::Coord_frac cf0( urange.min(), vrange.min(), wrange.min() ); clipper::Coord_frac cf1( urange.max(), vrange.max(), wrange.max() ); cfr = (1.0/double(atomr.size())) * cfr; // calculate mask using wrk cell and ref atoms clipper::Resolution reso( 5.0 ); clipper::Grid_sampling grid( spg1, cell, reso ); clipper::Grid_range grng( grid, cf0, cf1 ); grng.add_border(4); clipper::NXmap nxmap( cell, grid, grng ), nxflt( cell, grid, grng ); clipper::EDcalc_mask maskcalc( 2.0 ); nxmap = 0.0; maskcalc( nxmap, atomr ); MapFilterFn_g5 fn; clipper::MapFilter_fft fltr( fn, 1.0, clipper::MapFilter_fft::Relative ); fltr( nxflt, nxmap ); // make a list of work atom groups std::vector > groups; for ( int c = 0; c < molwrk.size(); c++ ) { std::vector group; for ( int r0 = 0; r0 < molwrk[c].size(); r0++ ) { // add this monomer for ( int a0 = 0; a0 < molwrk[c][r0].size(); a0++ ) group.push_back( clipper::MAtomIndex(c,r0,a0) ); // check if next monomer is connected to this bool iscon = false; int r1 = r0 + 1; if ( r1 < molwrk[c].size() ) { for ( int a0 = 0; a0 < molwrk[c][r0].size(); a0++ ) for ( int a1 = 0; a1 < molwrk[c][r1].size(); a1++ ) if ( ( molwrk[c][r0][a0].coord_orth() - molwrk[c][r1][a1].coord_orth() ).lengthsq() < crad*crad ) iscon = true; } // if not, add this group if ( !iscon ) { groups.push_back( group ); group.clear(); } } } // now score each chain, symmetry and offset in turn for ( int g = 0; g < groups.size(); g++ ) { const std::vector& group = groups[g]; clipper::Atom_list atoms; for ( int i = 0; i < group.size(); i++ ) atoms.push_back( molwrk[group[i].polymer()][group[i].monomer()] [group[i].atom()] ); double bestscr = 0.0; int bestsym = 0; clipper::Coord_frac bestoff( 0.0, 0.0, 0.0 ); const clipper::Coord_frac cfh( 0.5, 0.5, 0.5 ); for ( int sym = 0; sym < spgr.num_symops(); sym++ ) { clipper::Atom_list atomw = atoms; clipper::RTop_orth rtop = spgr.symop(sym).rtop_orth( cell ); clipper::Coord_orth cow( 0.0, 0.0, 0.0 ); for ( int a = 0; a < atomw.size(); a++ ) { atomw[a].transform( rtop ); cow += atomw[a].coord_orth(); } if ( atomw.size() > 0 ) cow = (1.0/double(atomw.size())) * cow; clipper::Coord_frac cfw = cow.coord_frac( cell ); clipper::Coord_frac cfwt = cfw.lattice_copy_near( cfr - cfh ); clipper::Coord_frac off0 = cfwt - cfw; // try offsets for ( double du = 0.0; du <= 1.01; du += 1.0 ) for ( double dv = 0.0; dv < 1.01; dv += 1.0 ) for ( double dw = 0.0; dw < 1.01; dw += 1.0 ) { clipper::Coord_frac off( rint( off0.u() ) + du, rint( off0.v() ) + dv, rint( off0.w() ) + dw ); clipper::Coord_orth ofo = off.coord_orth( cell ); double scr = 0.0; for ( int a = 0; a < atomw.size(); a++ ) { clipper::Coord_orth coa = atomw[a].coord_orth() + ofo; clipper::Coord_grid cga = nxflt.coord_map( coa ).coord_grid(); if ( nxflt.in_map( cga ) ) scr += nxflt.get_data( cga ); } if ( scr > bestscr ) { bestscr = scr; bestsym = sym; bestoff = off; } } } // now transform using the best operator clipper::Coord_orth cot = bestoff.coord_orth( cell ); clipper::RTop_orth rtop = spgr.symop(bestsym).rtop_orth( cell ); rtop = clipper::RTop_orth( rtop.rot(), rtop.trn()+cot ); for ( int i = 0; i < group.size(); i++ ) molwrk[group[i].polymer()][group[i].monomer()] [group[i].atom()].transform( rtop ); // user output clipper::MAtomIndex g0 = group.front(); clipper::MAtomIndex g1 = group.back(); std::cout << "Chain: " << molwrk[g0.polymer()].id() << " " << molwrk[g0.polymer()][g0.monomer()].id() << "-" << molwrk[g1.polymer()][g1.monomer()].id() << " will be transformed as follows:" << std::endl << " Symmetry operator: " << spgr.symop(bestsym).format() << std::endl << " Lattice shift: " << bestoff.format() << std::endl; } // write file mmdbwrk.export_minimol( molwrk ); mmdbwrk.write_file( oppdb ); } clipper-2.1/examples/clipper_test.cpp0000644000374100011300000000132711110525543014744 00000000000000// Clipper app to run self-tests /* Copyright 2003-2004 Kevin Cowtan & University of York all rights reserved */ #include #include #include #include extern "C" { #include } int main( int argc, char** argv ) { // do self tests std::cout << "Test core:\n"; clipper::Test_core test_core; bool result_core = test_core(); if ( result_core ) std::cout << "OK\n"; std::cout << "Test contrib:\n"; clipper::Test_contrib test_contrib; bool result_contrib = test_contrib(); if ( result_contrib ) std::cout << "OK\n"; // done self tests // error exit code if ( !( result_core && result_contrib ) ) exit(1); } clipper-2.1/examples/cinvfft.cpp0000644000374100011300000000414211362102650013703 00000000000000// Clipper app to perform inverse ffts /* Copyright 2003-2004 Kevin Cowtan & University of York all rights reserved */ #include #include extern "C" { #include } int main( int argc, char** argv ) { CCP4Program prog( "cinvfft", "0.1", "$Date: 2004/06/01" ); // defaults clipper::String title; clipper::String ipmap = "NONE"; clipper::String ipfile = "NONE"; clipper::String opfile = "NONE"; clipper::String opcol = "invfft"; // command input CCP4CommandInput args( argc, argv, true ); int arg = 0; while ( ++arg < args.size() ) { if ( args[arg] == "-title" ) { if ( ++arg < args.size() ) title = args[arg]; } else if ( args[arg] == "-mapin" ) { if ( ++arg < args.size() ) ipmap = args[arg]; } else if ( args[arg] == "-mtzin" ) { if ( ++arg < args.size() ) ipfile = args[arg]; } else if ( args[arg] == "-mtzout" ) { if ( ++arg < args.size() ) opfile = args[arg]; } else if ( args[arg] == "-colout" ) { if ( ++arg < args.size() ) opcol = args[arg]; } else { std::cout << "Unrecognized:\t" << args[arg] << "\n"; args.clear(); } } if ( args.size() <= 1 ) { std::cout << "Usage: cinvfft\n\t-mapin \n\t-mtzin \n\t-mtzout \n\t-colout \nInverse FFT\n"; exit(1); } // make data objects clipper::CCP4MTZfile mtzin, mtzout; clipper::MTZcrystal cxtl; clipper::Xmap xmap; clipper::HKL_info hkls; mtzin.set_column_label_mode( clipper::CCP4MTZfile::Legacy ); // open file mtzin.open_read( ipfile ); if ( opcol[0] != '/' ) opcol = mtzin.assigned_paths().back().notail()+"/"+opcol; mtzin.import_hkl_info( hkls ); mtzin.import_crystal( cxtl, opcol ); clipper::HKL_data fphi( hkls, cxtl ); mtzin.close_read(); // import xmap clipper::CCP4MAPfile mapin; mapin.open_read( ipmap ); mapin.import_xmap( xmap ); mapin.close_read(); // calc fft xmap.fft_to( fphi ); // output data mtzout.open_append( ipfile, opfile ); mtzout.export_hkl_data( fphi, opcol ); mtzout.close_append(); } clipper-2.1/examples/ftplib.c0000644000374100011300000006610010736662167013210 00000000000000/***************************************************************************/ /* */ /* ftplib.c - callable ftp access routines */ /* Copyright (C) 1996-2000 Thomas Pfau, pfau@cnj.digex.net */ /* 73 Catherine Street, South Bound Brook, NJ, 08880 */ /* */ /* This library is free software; you can redistribute it and/or */ /* modify it under the terms of the GNU Library General Public */ /* License as published by the Free Software Foundation; either */ /* version 2 of the License, or (at your option) any later version. */ /* */ /* This library is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */ /* Library General Public License for more details. */ /* */ /* You should have received a copy of the GNU Library General Public */ /* License along with this progam; if not, write to the */ /* Free Software Foundation, Inc., 59 Temple Place - Suite 330, */ /* Boston, MA 02111-1307, USA. */ /* */ /***************************************************************************/ #if defined(__unix__) || defined(__VMS) || defined (__APPLE__) || defined (unix) #include #endif #if defined(_WIN32) #include #include #endif #include #include #include #include #include #if defined(__unix__) || defined (__APPLE__) || defined (unix) #include #include #include #include #include #include #elif defined(VMS) #include #include #include #include #include #elif defined(_WIN32) #include #endif #define BUILDING_LIBRARY #include "ftplib.h" #if defined(_WIN32) #define SETSOCKOPT_OPTVAL_TYPE (const char *) #else #define SETSOCKOPT_OPTVAL_TYPE (void *) #endif #if defined(__osf__) #define SOCKLEN_TYPE int #else #define SOCKLEN_TYPE socklen_t #endif #define FTPLIB_BUFSIZ 8192 #define ACCEPT_TIMEOUT 30 #define FTPLIB_CONTROL 0 #define FTPLIB_READ 1 #define FTPLIB_WRITE 2 #if !defined FTPLIB_DEFMODE #define FTPLIB_DEFMODE FTPLIB_PASSIVE #endif struct NetBuf { char *cput,*cget; int handle; int cavail,cleft; char *buf; int dir; netbuf *ctrl; netbuf *data; int cmode; struct timeval idletime; FtpCallback idlecb; void *idlearg; int xfered; int cbbytes; int xfered1; char response[256]; }; static char *version = "ftplib Release 3.1-1 9/16/00, copyright 1996-2000 Thomas Pfau"; int ftplib_debug = 0; #if defined(__unix__) || defined(VMS) || defined (__APPLE__) || defined (unix) #define net_read read #define net_write write #define net_close close #elif defined(_WIN32) #define net_read(x,y,z) recv(x,y,z,0) #define net_write(x,y,z) send(x,y,z,0) #define net_close closesocket #endif #if defined(NEED_MEMCCPY) /* * VAX C does not supply a memccpy routine so I provide my own */ void *memccpy(void *dest, const void *src, int c, size_t n) { int i=0; const unsigned char *ip=src; unsigned char *op=dest; while (i < n) { if ((*op++ = *ip++) == c) break; i++; } if (i == n) return NULL; return op; } #endif #if defined(NEED_STRDUP) /* * strdup - return a malloc'ed copy of a string */ char *strdup(const char *src) { int l = strlen(src) + 1; char *dst = malloc(l); if (dst) strcpy(dst,src); return dst; } #endif /* * socket_wait - wait for socket to receive or flush data * * return 1 if no user callback, otherwise, return value returned by * user callback */ static int socket_wait(netbuf *ctl) { fd_set fd,*rfd = NULL,*wfd = NULL; struct timeval tv; int rv = 0; if ((ctl->dir == FTPLIB_CONTROL) || (ctl->idlecb == NULL)) return 1; if (ctl->dir == FTPLIB_WRITE) wfd = &fd; else rfd = &fd; FD_ZERO(&fd); do { FD_SET(ctl->handle,&fd); tv = ctl->idletime; rv = select(ctl->handle+1, rfd, wfd, NULL, &tv); if (rv == -1) { rv = 0; strncpy(ctl->ctrl->response, strerror(errno), sizeof(ctl->ctrl->response)); break; } else if (rv > 0) { rv = 1; break; } } while ((rv = ctl->idlecb(ctl, ctl->xfered, ctl->idlearg))); return rv; } /* * read a line of text * * return -1 on error or bytecount */ static int readline(char *buf,int max,netbuf *ctl) { int x,retval = 0; char *end,*bp=buf; int eof = 0; if ((ctl->dir != FTPLIB_CONTROL) && (ctl->dir != FTPLIB_READ)) return -1; if (max == 0) return 0; do { if (ctl->cavail > 0) { x = (max >= ctl->cavail) ? ctl->cavail : max-1; end = (char *)memccpy(bp,ctl->cget,'\n',x); if (end != NULL) x = end - bp; retval += x; bp += x; *bp = '\0'; max -= x; ctl->cget += x; ctl->cavail -= x; if (end != NULL) { bp -= 2; if (strcmp(bp,"\r\n") == 0) { *bp++ = '\n'; *bp++ = '\0'; --retval; } break; } } if (max == 1) { *buf = '\0'; break; } if (ctl->cput == ctl->cget) { ctl->cput = ctl->cget = ctl->buf; ctl->cavail = 0; ctl->cleft = FTPLIB_BUFSIZ; } if (eof) { if (retval == 0) retval = -1; break; } if (!socket_wait(ctl)) return retval; if ((x = net_read(ctl->handle,ctl->cput,ctl->cleft)) == -1) { perror("read"); retval = -1; break; } if (x == 0) eof = 1; ctl->cleft -= x; ctl->cavail += x; ctl->cput += x; } while (1); return retval; } /* * write lines of text * * return -1 on error or bytecount */ static int writeline(char *buf, int len, netbuf *nData) { int x, nb=0, w; char *ubp = buf, *nbp; char lc=0; if (nData->dir != FTPLIB_WRITE) return -1; nbp = nData->buf; for (x=0; x < len; x++) { if ((*ubp == '\n') && (lc != '\r')) { if (nb == FTPLIB_BUFSIZ) { if (!socket_wait(nData)) return x; w = net_write(nData->handle, nbp, FTPLIB_BUFSIZ); if (w != FTPLIB_BUFSIZ) { printf("net_write(1) returned %d, errno = %d\n", w, errno); return(-1); } nb = 0; } nbp[nb++] = '\r'; } if (nb == FTPLIB_BUFSIZ) { if (!socket_wait(nData)) return x; w = net_write(nData->handle, nbp, FTPLIB_BUFSIZ); if (w != FTPLIB_BUFSIZ) { printf("net_write(2) returned %d, errno = %d\n", w, errno); return(-1); } nb = 0; } nbp[nb++] = lc = *ubp++; } if (nb) { if (!socket_wait(nData)) return x; w = net_write(nData->handle, nbp, nb); if (w != nb) { printf("net_write(3) returned %d, errno = %d\n", w, errno); return(-1); } } return len; } /* * read a response from the server * * return 0 if first char doesn't match * return 1 if first char matches */ static int readresp(char c, netbuf *nControl) { char match[5]; if (readline(nControl->response,256,nControl) == -1) { perror("Control socket read failed"); return 0; } if (ftplib_debug > 1) fprintf(stderr,"%s",nControl->response); if (nControl->response[3] == '-') { strncpy(match,nControl->response,3); match[3] = ' '; match[4] = '\0'; do { if (readline(nControl->response,256,nControl) == -1) { perror("Control socket read failed"); return 0; } if (ftplib_debug > 1) fprintf(stderr,"%s",nControl->response); } while (strncmp(nControl->response,match,4)); } if (nControl->response[0] == c) return 1; return 0; } /* * FtpInit for stupid operating systems that require it (Windows NT) */ void FtpInit(void) { #if defined(_WIN32) WORD wVersionRequested; WSADATA wsadata; int err; wVersionRequested = MAKEWORD(1,1); if ((err = WSAStartup(wVersionRequested,&wsadata)) != 0) fprintf(stderr,"Network failed to start: %d\n",err); #endif } /* * FtpLastResponse - return a pointer to the last response received */ char *FtpLastResponse(netbuf *nControl) { if ((nControl) && (nControl->dir == FTPLIB_CONTROL)) return nControl->response; return NULL; } /* * FtpConnect - connect to remote server * * return 1 if connected, 0 if not */ int FtpConnect(const char *host, netbuf **nControl) { int sControl; struct sockaddr_in sin; struct hostent *phe; struct servent *pse; int on=1; netbuf *ctrl; char *lhost; char *pnum; memset(&sin,0,sizeof(sin)); sin.sin_family = AF_INET; lhost = strdup(host); pnum = strchr(lhost,':'); if (pnum == NULL) { #if defined(VMS) sin.sin_port = htons(21); #else if ((pse = getservbyname("ftp","tcp")) == NULL) { perror("getservbyname"); return 0; } sin.sin_port = pse->s_port; #endif } else { *pnum++ = '\0'; if (isdigit(*pnum)) sin.sin_port = htons(atoi(pnum)); else { pse = getservbyname(pnum,"tcp"); sin.sin_port = pse->s_port; } } if ((sin.sin_addr.s_addr = inet_addr(lhost)) == -1) { if ((phe = gethostbyname(lhost)) == NULL) { perror("gethostbyname"); return 0; } memcpy((char *)&sin.sin_addr, phe->h_addr, phe->h_length); } free(lhost); sControl = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); if (sControl == -1) { perror("socket"); return 0; } if (setsockopt(sControl,SOL_SOCKET,SO_REUSEADDR, SETSOCKOPT_OPTVAL_TYPE &on, sizeof(on)) == -1) { perror("setsockopt"); net_close(sControl); return 0; } if (connect(sControl, (struct sockaddr *)&sin, sizeof(sin)) == -1) { perror("connect"); net_close(sControl); return 0; } ctrl = (netbuf *)calloc(1,sizeof(netbuf)); if (ctrl == NULL) { perror("calloc"); net_close(sControl); return 0; } ctrl->buf = (char *)malloc(FTPLIB_BUFSIZ); if (ctrl->buf == NULL) { perror("calloc"); net_close(sControl); free(ctrl); return 0; } ctrl->handle = sControl; ctrl->dir = FTPLIB_CONTROL; ctrl->ctrl = NULL; ctrl->cmode = FTPLIB_DEFMODE; ctrl->idlecb = NULL; ctrl->idletime.tv_sec = ctrl->idletime.tv_usec = 0; ctrl->idlearg = NULL; ctrl->xfered = 0; ctrl->xfered1 = 0; ctrl->cbbytes = 0; if (readresp('2', ctrl) == 0) { net_close(sControl); free(ctrl->buf); free(ctrl); return 0; } *nControl = ctrl; return 1; } /* * FtpOptions - change connection options * * returns 1 if successful, 0 on error */ int FtpOptions(int opt, long val, netbuf *nControl) { int v,rv=0; switch (opt) { case FTPLIB_CONNMODE: v = (int) val; if ((v == FTPLIB_PASSIVE) || (v == FTPLIB_PORT)) { nControl->cmode = v; rv = 1; } break; case FTPLIB_CALLBACK: nControl->idlecb = (FtpCallback) val; rv = 1; break; case FTPLIB_IDLETIME: v = (int) val; rv = 1; nControl->idletime.tv_sec = v / 1000; nControl->idletime.tv_usec = (v % 1000) * 1000; break; case FTPLIB_CALLBACKARG: rv = 1; nControl->idlearg = (void *) val; break; case FTPLIB_CALLBACKBYTES: rv = 1; nControl->cbbytes = (int) val; break; } return rv; } /* * FtpSendCmd - send a command and wait for expected response * * return 1 if proper response received, 0 otherwise */ static int FtpSendCmd(const char *cmd, char expresp, netbuf *nControl) { char buf[256]; if (nControl->dir != FTPLIB_CONTROL) return 0; if (ftplib_debug > 2) fprintf(stderr,"%s\n",cmd); if ((strlen(cmd) + 3) > sizeof(buf)) return 0; sprintf(buf,"%s\r\n",cmd); if (net_write(nControl->handle,buf,strlen(buf)) <= 0) { perror("write"); return 0; } return readresp(expresp, nControl); } /* * FtpLogin - log in to remote server * * return 1 if logged in, 0 otherwise */ int FtpLogin(const char *user, const char *pass, netbuf *nControl) { char tempbuf[64]; if (((strlen(user) + 7) > sizeof(tempbuf)) || ((strlen(pass) + 7) > sizeof(tempbuf))) return 0; sprintf(tempbuf,"USER %s",user); if (!FtpSendCmd(tempbuf,'3',nControl)) { if (nControl->response[0] == '2') return 1; return 0; } sprintf(tempbuf,"PASS %s",pass); return FtpSendCmd(tempbuf,'2',nControl); } /* * FtpOpenPort - set up data connection * * return 1 if successful, 0 otherwise */ static int FtpOpenPort(netbuf *nControl, netbuf **nData, int mode, int dir) { int sData; union { struct sockaddr sa; struct sockaddr_in in; } sin; struct linger lng = { 0, 0 }; SOCKLEN_TYPE l; int on=1; netbuf *ctrl; char *cp; unsigned int v[6]; char buf[256]; if (nControl->dir != FTPLIB_CONTROL) return -1; if ((dir != FTPLIB_READ) && (dir != FTPLIB_WRITE)) { sprintf(nControl->response, "Invalid direction %d\n", dir); return -1; } if ((mode != FTPLIB_ASCII) && (mode != FTPLIB_IMAGE)) { sprintf(nControl->response, "Invalid mode %c\n", mode); return -1; } l = sizeof(sin); if (nControl->cmode == FTPLIB_PASSIVE) { memset(&sin, 0, l); sin.in.sin_family = AF_INET; if (!FtpSendCmd("PASV",'2',nControl)) return -1; cp = strchr(nControl->response,'('); if (cp == NULL) return -1; cp++; sscanf(cp,"%u,%u,%u,%u,%u,%u",&v[2],&v[3],&v[4],&v[5],&v[0],&v[1]); sin.sa.sa_data[2] = v[2]; sin.sa.sa_data[3] = v[3]; sin.sa.sa_data[4] = v[4]; sin.sa.sa_data[5] = v[5]; sin.sa.sa_data[0] = v[0]; sin.sa.sa_data[1] = v[1]; } else { if (getsockname(nControl->handle, &sin.sa, &l) < 0) { perror("getsockname"); return 0; } } sData = socket(PF_INET,SOCK_STREAM,IPPROTO_TCP); if (sData == -1) { perror("socket"); return -1; } if (setsockopt(sData,SOL_SOCKET,SO_REUSEADDR, SETSOCKOPT_OPTVAL_TYPE &on,sizeof(on)) == -1) { perror("setsockopt"); net_close(sData); return -1; } if (setsockopt(sData,SOL_SOCKET,SO_LINGER, SETSOCKOPT_OPTVAL_TYPE &lng,sizeof(lng)) == -1) { perror("setsockopt"); net_close(sData); return -1; } if (nControl->cmode == FTPLIB_PASSIVE) { if (connect(sData, &sin.sa, sizeof(sin.sa)) == -1) { perror("connect"); net_close(sData); return -1; } } else { sin.in.sin_port = 0; if (bind(sData, &sin.sa, sizeof(sin)) == -1) { perror("bind"); net_close(sData); return 0; } if (listen(sData, 1) < 0) { perror("listen"); net_close(sData); return 0; } if (getsockname(sData, &sin.sa, &l) < 0) return 0; sprintf(buf, "PORT %d,%d,%d,%d,%d,%d", (unsigned char) sin.sa.sa_data[2], (unsigned char) sin.sa.sa_data[3], (unsigned char) sin.sa.sa_data[4], (unsigned char) sin.sa.sa_data[5], (unsigned char) sin.sa.sa_data[0], (unsigned char) sin.sa.sa_data[1]); if (!FtpSendCmd(buf,'2',nControl)) { net_close(sData); return 0; } } ctrl = (netbuf *)calloc(1,sizeof(netbuf)); if (ctrl == NULL) { perror("calloc"); net_close(sData); return -1; } if ((mode == 'A') && ((ctrl->buf = (char *)malloc(FTPLIB_BUFSIZ)) == NULL)) { perror("calloc"); net_close(sData); free(ctrl); return -1; } ctrl->handle = sData; ctrl->dir = dir; ctrl->idletime = nControl->idletime; ctrl->idlearg = nControl->idlearg; ctrl->xfered = 0; ctrl->xfered1 = 0; ctrl->cbbytes = nControl->cbbytes; if (ctrl->idletime.tv_sec || ctrl->idletime.tv_usec || ctrl->cbbytes) ctrl->idlecb = nControl->idlecb; else ctrl->idlecb = NULL; *nData = ctrl; return 1; } /* * FtpAcceptConnection - accept connection from server * * return 1 if successful, 0 otherwise */ static int FtpAcceptConnection(netbuf *nData, netbuf *nControl) { int sData; struct sockaddr addr; SOCKLEN_TYPE l; int i; struct timeval tv; fd_set mask; int rv; FD_ZERO(&mask); FD_SET(nControl->handle, &mask); FD_SET(nData->handle, &mask); tv.tv_usec = 0; tv.tv_sec = ACCEPT_TIMEOUT; i = nControl->handle; if (i < nData->handle) i = nData->handle; i = select(i+1, &mask, NULL, NULL, &tv); if (i == -1) { strncpy(nControl->response, strerror(errno), sizeof(nControl->response)); net_close(nData->handle); nData->handle = 0; rv = 0; } else if (i == 0) { strcpy(nControl->response, "timed out waiting for connection"); net_close(nData->handle); nData->handle = 0; rv = 0; } else { if (FD_ISSET(nData->handle, &mask)) { l = sizeof(addr); sData = accept(nData->handle, &addr, &l); i = errno; net_close(nData->handle); if (sData > 0) { rv = 1; nData->handle = sData; } else { strncpy(nControl->response, strerror(i), sizeof(nControl->response)); nData->handle = 0; rv = 0; } } else if (FD_ISSET(nControl->handle, &mask)) { net_close(nData->handle); nData->handle = 0; readresp('2', nControl); rv = 0; } } return rv; } /* * FtpAccess - return a handle for a data stream * * return 1 if successful, 0 otherwise */ int FtpAccess(const char *path, int typ, int mode, netbuf *nControl, netbuf **nData) { char buf[256]; int dir; if ((path == NULL) && ((typ == FTPLIB_FILE_WRITE) || (typ == FTPLIB_FILE_READ))) { sprintf(nControl->response, "Missing path argument for file transfer\n"); return 0; } sprintf(buf, "TYPE %c", mode); if (!FtpSendCmd(buf, '2', nControl)) return 0; switch (typ) { case FTPLIB_DIR: strcpy(buf,"NLST"); dir = FTPLIB_READ; break; case FTPLIB_DIR_VERBOSE: strcpy(buf,"LIST"); dir = FTPLIB_READ; break; case FTPLIB_FILE_READ: strcpy(buf,"RETR"); dir = FTPLIB_READ; break; case FTPLIB_FILE_WRITE: strcpy(buf,"STOR"); dir = FTPLIB_WRITE; break; default: sprintf(nControl->response, "Invalid open type %d\n", typ); return 0; } if (path != NULL) { int i = strlen(buf); buf[i++] = ' '; if ((strlen(path) + i) >= sizeof(buf)) return 0; strcpy(&buf[i],path); } if (FtpOpenPort(nControl, nData, mode, dir) == -1) return 0; if (!FtpSendCmd(buf, '1', nControl)) { FtpClose(*nData); *nData = NULL; return 0; } (*nData)->ctrl = nControl; nControl->data = *nData; if (nControl->cmode == FTPLIB_PORT) { if (!FtpAcceptConnection(*nData,nControl)) { FtpClose(*nData); *nData = NULL; nControl->data = NULL; return 0; } } return 1; } /* * FtpRead - read from a data connection */ int FtpRead(void *buf, int max, netbuf *nData) { int i; if (nData->dir != FTPLIB_READ) return 0; if (nData->buf) i = readline((char *)buf, max, nData); else { i = socket_wait(nData); if (i != 1) return 0; i = net_read(nData->handle, buf, max); } if (i == -1) return 0; nData->xfered += i; if (nData->idlecb && nData->cbbytes) { nData->xfered1 += i; if (nData->xfered1 > nData->cbbytes) { if (nData->idlecb(nData, nData->xfered, nData->idlearg) == 0) return 0; nData->xfered1 = 0; } } return i; } /* * FtpWrite - write to a data connection */ int FtpWrite(void *buf, int len, netbuf *nData) { int i; if (nData->dir != FTPLIB_WRITE) return 0; if (nData->buf) i = writeline((char *)buf, len, nData); else { socket_wait(nData); i = net_write(nData->handle, buf, len); } if (i == -1) return 0; nData->xfered += i; if (nData->idlecb && nData->cbbytes) { nData->xfered1 += i; if (nData->xfered1 > nData->cbbytes) { nData->idlecb(nData, nData->xfered, nData->idlearg); nData->xfered1 = 0; } } return i; } /* * FtpClose - close a data connection */ int FtpClose(netbuf *nData) { netbuf *ctrl; switch (nData->dir) { case FTPLIB_WRITE: /* potential problem - if buffer flush fails, how to notify user? */ if (nData->buf != NULL) writeline(NULL, 0, nData); case FTPLIB_READ: if (nData->buf) free(nData->buf); shutdown(nData->handle,2); net_close(nData->handle); ctrl = nData->ctrl; free(nData); if (ctrl) { ctrl->data = NULL; return(readresp('2', ctrl)); } return 1; case FTPLIB_CONTROL: if (nData->data) { nData->ctrl = NULL; FtpClose(nData); } net_close(nData->handle); free(nData); return 0; } return 1; } /* * FtpSite - send a SITE command * * return 1 if command successful, 0 otherwise */ int FtpSite(const char *cmd, netbuf *nControl) { char buf[256]; if ((strlen(cmd) + 7) > sizeof(buf)) return 0; sprintf(buf,"SITE %s",cmd); if (!FtpSendCmd(buf,'2',nControl)) return 0; return 1; } /* * FtpSysType - send a SYST command * * Fills in the user buffer with the remote system type. If more * information from the response is required, the user can parse * it out of the response buffer returned by FtpLastResponse(). * * return 1 if command successful, 0 otherwise */ int FtpSysType(char *buf, int max, netbuf *nControl) { int l = max; char *b = buf; char *s; if (!FtpSendCmd("SYST",'2',nControl)) return 0; s = &nControl->response[4]; while ((--l) && (*s != ' ')) *b++ = *s++; *b++ = '\0'; return 1; } /* * FtpMkdir - create a directory at server * * return 1 if successful, 0 otherwise */ int FtpMkdir(const char *path, netbuf *nControl) { char buf[256]; if ((strlen(path) + 6) > sizeof(buf)) return 0; sprintf(buf,"MKD %s",path); if (!FtpSendCmd(buf,'2', nControl)) return 0; return 1; } /* * FtpChdir - change path at remote * * return 1 if successful, 0 otherwise */ int FtpChdir(const char *path, netbuf *nControl) { char buf[256]; if ((strlen(path) + 6) > sizeof(buf)) return 0; sprintf(buf,"CWD %s",path); if (!FtpSendCmd(buf,'2',nControl)) return 0; return 1; } /* * FtpCDUp - move to parent directory at remote * * return 1 if successful, 0 otherwise */ int FtpCDUp(netbuf *nControl) { if (!FtpSendCmd("CDUP",'2',nControl)) return 0; return 1; } /* * FtpRmdir - remove directory at remote * * return 1 if successful, 0 otherwise */ int FtpRmdir(const char *path, netbuf *nControl) { char buf[256]; if ((strlen(path) + 6) > sizeof(buf)) return 0; sprintf(buf,"RMD %s",path); if (!FtpSendCmd(buf,'2',nControl)) return 0; return 1; } /* * FtpPwd - get working directory at remote * * return 1 if successful, 0 otherwise */ int FtpPwd(char *path, int max, netbuf *nControl) { int l = max; char *b = path; char *s; if (!FtpSendCmd("PWD",'2',nControl)) return 0; s = strchr(nControl->response, '"'); if (s == NULL) return 0; s++; while ((--l) && (*s) && (*s != '"')) *b++ = *s++; *b++ = '\0'; return 1; } /* * FtpXfer - issue a command and transfer data * * return 1 if successful, 0 otherwise */ static int FtpXfer(const char *localfile, const char *path, netbuf *nControl, int typ, int mode) { int l,c; char *dbuf; FILE *local = NULL; netbuf *nData; int rv=1; if (localfile != NULL) { char ac[4] = "w"; if (typ == FTPLIB_FILE_WRITE) ac[0] = 'r'; if (mode == FTPLIB_IMAGE) ac[1] = 'b'; local = fopen(localfile, ac); if (local == NULL) { strncpy(nControl->response, strerror(errno), sizeof(nControl->response)); return 0; } } if (local == NULL) local = (typ == FTPLIB_FILE_WRITE) ? stdin : stdout; if (!FtpAccess(path, typ, mode, nControl, &nData)) return 0; dbuf = (char *)malloc(FTPLIB_BUFSIZ); if (typ == FTPLIB_FILE_WRITE) { while ((l = fread(dbuf, 1, FTPLIB_BUFSIZ, local)) > 0) if ((c = FtpWrite(dbuf, l, nData)) < l) { printf("short write: passed %d, wrote %d\n", l, c); rv = 0; break; } } else { while ((l = FtpRead(dbuf, FTPLIB_BUFSIZ, nData)) > 0) if (fwrite(dbuf, 1, l, local) <= 0) { perror("localfile write"); rv = 0; break; } } free(dbuf); fflush(local); if (localfile != NULL) fclose(local); FtpClose(nData); return rv; } /* * FtpNlst - issue an NLST command and write response to output * * return 1 if successful, 0 otherwise */ int FtpNlst(const char *outputfile, const char *path, netbuf *nControl) { return FtpXfer(outputfile, path, nControl, FTPLIB_DIR, FTPLIB_ASCII); } /* * FtpDir - issue a LIST command and write response to output * * return 1 if successful, 0 otherwise */ int FtpDir(const char *outputfile, const char *path, netbuf *nControl) { return FtpXfer(outputfile, path, nControl, FTPLIB_DIR_VERBOSE, FTPLIB_ASCII); } /* * FtpSize - determine the size of a remote file * * return 1 if successful, 0 otherwise */ int FtpSize(const char *path, int *size, char mode, netbuf *nControl) { char cmd[256]; int resp,sz,rv=1; if ((strlen(path) + 7) > sizeof(cmd)) return 0; sprintf(cmd, "TYPE %c", mode); if (!FtpSendCmd(cmd, '2', nControl)) return 0; sprintf(cmd,"SIZE %s",path); if (!FtpSendCmd(cmd,'2',nControl)) rv = 0; else { if (sscanf(nControl->response, "%d %d", &resp, &sz) == 2) *size = sz; else rv = 0; } return rv; } /* * FtpModDate - determine the modification date of a remote file * * return 1 if successful, 0 otherwise */ int FtpModDate(const char *path, char *dt, int max, netbuf *nControl) { char buf[256]; int rv = 1; if ((strlen(path) + 7) > sizeof(buf)) return 0; sprintf(buf,"MDTM %s",path); if (!FtpSendCmd(buf,'2',nControl)) rv = 0; else strncpy(dt, &nControl->response[4], max); return rv; } /* * FtpGet - issue a GET command and write received data to output * * return 1 if successful, 0 otherwise */ int FtpGet(const char *outputfile, const char *path, char mode, netbuf *nControl) { return FtpXfer(outputfile, path, nControl, FTPLIB_FILE_READ, mode); } /* * FtpPut - issue a PUT command and send data from input * * return 1 if successful, 0 otherwise */ int FtpPut(const char *inputfile, const char *path, char mode, netbuf *nControl) { return FtpXfer(inputfile, path, nControl, FTPLIB_FILE_WRITE, mode); } /* * FtpRename - rename a file at remote * * return 1 if successful, 0 otherwise */ int FtpRename(const char *src, const char *dst, netbuf *nControl) { char cmd[256]; if (((strlen(src) + 7) > sizeof(cmd)) || ((strlen(dst) + 7) > sizeof(cmd))) return 0; sprintf(cmd,"RNFR %s",src); if (!FtpSendCmd(cmd,'3',nControl)) return 0; sprintf(cmd,"RNTO %s",dst); if (!FtpSendCmd(cmd,'2',nControl)) return 0; return 1; } /* * FtpDelete - delete a file at remote * * return 1 if successful, 0 otherwise */ int FtpDelete(const char *fnm, netbuf *nControl) { char cmd[256]; if ((strlen(fnm) + 7) > sizeof(cmd)) return 0; sprintf(cmd,"DELE %s",fnm); if (!FtpSendCmd(cmd,'2', nControl)) return 0; return 1; } /* * FtpQuit - disconnect from remote * * return 1 if successful, 0 otherwise */ void FtpQuit(netbuf *nControl) { if (nControl->dir != FTPLIB_CONTROL) return; FtpSendCmd("QUIT",'2',nControl); net_close(nControl->handle); free(nControl->buf); free(nControl); } clipper-2.1/examples/ftplib.h0000644000374100011300000000662610736662167013224 00000000000000/***************************************************************************/ /* */ /* ftplib.h - header file for callable ftp access routines */ /* Copyright (C) 1996, 1997 Thomas Pfau, pfau@cnj.digex.net */ /* 73 Catherine Street, South Bound Brook, NJ, 08880 */ /* Modified Kevin Cowtan cowtan@ysbl.york.ac.uk 12/10/2004 */ /* */ /* This library is free software; you can redistribute it and/or */ /* modify it under the terms of the GNU Library General Public */ /* License as published by the Free Software Foundation; either */ /* version 2 of the License, or (at your option) any later version. */ /* */ /* This library is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */ /* Library General Public License for more details. */ /* */ /* You should have received a copy of the GNU Library General Public */ /* License along with this progam; if not, write to the */ /* Free Software Foundation, Inc., 59 Temple Place - Suite 330, */ /* Boston, MA 02111-1307, USA. */ /* */ /***************************************************************************/ #if !defined(__FTPLIB_H) #define __FTPLIB_H /* FtpAccess() type codes */ #define FTPLIB_DIR 1 #define FTPLIB_DIR_VERBOSE 2 #define FTPLIB_FILE_READ 3 #define FTPLIB_FILE_WRITE 4 /* FtpAccess() mode codes */ #define FTPLIB_ASCII 'A' #define FTPLIB_IMAGE 'I' #define FTPLIB_TEXT FTPLIB_ASCII #define FTPLIB_BINARY FTPLIB_IMAGE /* connection modes */ #define FTPLIB_PASSIVE 1 #define FTPLIB_PORT 2 /* connection option names */ #define FTPLIB_CONNMODE 1 #define FTPLIB_CALLBACK 2 #define FTPLIB_IDLETIME 3 #define FTPLIB_CALLBACKARG 4 #define FTPLIB_CALLBACKBYTES 5 #ifdef __cplusplus extern "C" { #endif typedef struct NetBuf netbuf; typedef int (*FtpCallback)(netbuf *nControl, int xfered, void *arg); void FtpInit(void); char *FtpLastResponse(netbuf *nControl); int FtpConnect(const char *host, netbuf **nControl); int FtpOptions(int opt, long val, netbuf *nControl); int FtpLogin(const char *user, const char *pass, netbuf *nControl); int FtpAccess(const char *path, int typ, int mode, netbuf *nControl, netbuf **nData); int FtpRead(void *buf, int max, netbuf *nData); int FtpWrite(void *buf, int len, netbuf *nData); int FtpClose(netbuf *nData); int FtpSite(const char *cmd, netbuf *nControl); int FtpSysType(char *buf, int max, netbuf *nControl); int FtpMkdir(const char *path, netbuf *nControl); int FtpChdir(const char *path, netbuf *nControl); int FtpCDUp(netbuf *nControl); int FtpRmdir(const char *path, netbuf *nControl); int FtpPwd(char *path, int max, netbuf *nControl); int FtpNlst(const char *output, const char *path, netbuf *nControl); int FtpDir(const char *output, const char *path, netbuf *nControl); int FtpSize(const char *path, int *size, char mode, netbuf *nControl); int FtpModDate(const char *path, char *dt, int max, netbuf *nControl); int FtpGet(const char *output, const char *path, char mode, netbuf *nControl); int FtpPut(const char *input, const char *path, char mode, netbuf *nControl); int FtpRename(const char *src, const char *dst, netbuf *nControl); int FtpDelete(const char *fnm, netbuf *nControl); void FtpQuit(netbuf *nControl); #ifdef __cplusplus } #endif #endif /* __FTPLIB_H */ clipper-2.1/examples/cfft.cpp0000644000374100011300000002322311221530047013166 00000000000000// Clipper app to perform ffts and map stats /* Copyright 2003-2004 Kevin Cowtan & University of York all rights reserved */ #include #include #include double sfunc( double q, int i, int j ); double pfunc( double t, int nt ); int main( int argc, char** argv ) { CCP4Program prog( "cfft", "0.1", "$Date: 2004/05/01" ); // defaults clipper::String title; clipper::String ipfile = "NONE"; clipper::String ipcolf = "NONE"; clipper::String ipcold = "NONE"; clipper::String ipcola = "NONE"; clipper::String ipcolh = "NONE"; clipper::String ipcolm = "NONE"; clipper::String opfile = "NONE"; bool stats = false; bool adiff = false; double statsrad = -1.0; double uvalue = 0.0; clipper::Resolution reso; clipper::Grid_sampling grid; // command input CCP4CommandInput args( argc, argv, true ); int arg = 0; while ( ++arg < args.size() ) { if ( args[arg] == "-title" ) { if ( ++arg < args.size() ) title = args[arg]; } else if ( args[arg] == "-mtzin" ) { if ( ++arg < args.size() ) ipfile = args[arg]; } else if ( args[arg] == "-mapout" ) { if ( ++arg < args.size() ) opfile = args[arg]; } else if ( args[arg] == "-colin-fo" ) { if ( ++arg < args.size() ) ipcolf = args[arg]; } else if ( args[arg] == "-colin-fano" ) { if ( ++arg < args.size() ) ipcola = args[arg]; } else if ( args[arg] == "-colin-fdiff" ) { if ( ++arg < args.size() ) ipcold = args[arg]; } else if ( args[arg] == "-colin-hl" ) { if ( ++arg < args.size() ) ipcolh = args[arg]; } else if ( args[arg] == "-colin-fc" ) { if ( ++arg < args.size() ) ipcolm = args[arg]; } else if ( args[arg] == "-u-value" ) { if ( ++arg < args.size() ) uvalue = clipper::String(args[arg]).f(); } else if ( args[arg] == "-b-value" ) { if ( ++arg < args.size() ) uvalue = clipper::Util::b2u(clipper::String(args[arg]).f()); } else if ( args[arg] == "-resolution" ) { if ( ++arg < args.size() ) { reso = clipper::Resolution( clipper::String(args[arg]).f() ); } } else if ( args[arg] == "-grid" ) { if ( ++arg < args.size() ) { std::vector g = clipper::String(args[arg]).split(", "); grid = clipper::Grid_sampling( g[0].i(), g[1].i(), g[2].i() ); } } else if ( args[arg] == "-anomalous" ) { adiff = true; } else if ( args[arg] == "-stats" ) { stats = true; } else if ( args[arg] == "-stats-radius" ) { if ( ++arg < args.size() ) statsrad = clipper::String(args[arg]).f(); } else { std::cout << "Unrecognized:\t" << args[arg] << "\n"; args.clear(); } } if ( args.size() <= 1 ) { std::cout << "Usage: cfft\n\t-mtzin \n\t-mapout \n\t-colin-fo \n\t-colin-fano \n\t-colin-fdiff \n\t-colin-hl \n\t-colin-fc \n\t-u-value \n\t-b-value \n\t-resolution \n\t-grid ,,\n\t-anomalous\n\t-stats\n\t-stats-radius \nIf -colin-hl is specified, conversion is ABCD->phi/fom.\nIf -colin-fo and -colin-hl are specified, they are used to calculate\nmap coefficient. Otherwise the map coefficient may be provided using\n-colin-fc.\n"; exit(1); } // make data objects clipper::CCP4MTZfile mtzin; clipper::MTZcrystal cxtl; clipper::HKL_info hkls; typedef clipper::HKL_data_base::HKL_reference_index HRI; mtzin.set_column_label_mode( clipper::CCP4MTZfile::Legacy ); // open file mtzin.open_read( ipfile ); clipper::Spacegroup spgr = mtzin.spacegroup(); clipper::Cell cell = mtzin.cell(); if ( ipcolf != "NONE" ) mtzin.import_crystal( cxtl, ipcolf+".F_sigF.F" ); if ( ipcola != "NONE" ) mtzin.import_crystal( cxtl, ipcola+".F_sigF_ano.F+"); if ( ipcolm != "NONE" ) mtzin.import_crystal( cxtl, ipcolm+".F_phi.F" ); if ( !cxtl.is_null() ) cell = cxtl; if ( reso.is_null() ) reso = mtzin.resolution(); hkls.init( spgr, cell, reso, true ); clipper::HKL_data abcd( hkls ); clipper::HKL_data fsig( hkls ); clipper::HKL_data dsig( hkls ); clipper::HKL_data fano( hkls ); clipper::HKL_data fphi( hkls ); if ( ipcolf != "NONE" ) mtzin.import_hkl_data( fsig, ipcolf ); if ( ipcola != "NONE" ) mtzin.import_hkl_data( fano, ipcola ); if ( ipcold != "NONE" ) mtzin.import_hkl_data( dsig, ipcolf ); if ( ipcolh != "NONE" ) mtzin.import_hkl_data( abcd, ipcolh ); if ( ipcolm != "NONE" ) mtzin.import_hkl_data( fphi, ipcolm ); mtzin.close_read(); // make anomalous F if necessary if ( ipcola != "NONE" ) { if ( adiff ) fsig.compute( fano, clipper::data32::Compute_diff_fsigf_from_fsigfano() ); else fsig.compute( fano, clipper::data32::Compute_mean_fsigf_from_fsigfano() ); } // subtract difference F if necessary if ( ipcold != "NONE" ) for ( HRI ih = fsig.first(); !ih.last(); ih.next() ) if ( !fsig[ih].missing() && !dsig[ih].missing() ) fsig[ih].f() -= dsig[ih].f(); else fsig[ih].f() = 0.0; // make map coeffs if necessary if ( ipcolm == "NONE" ) { clipper::HKL_data phiw( hkls ); phiw.compute( abcd, clipper::data32::Compute_phifom_from_abcd() ); fphi.compute( fsig, phiw,clipper::data32::Compute_fphi_from_fsigf_phifom()); } // shift phase for anomalous differences is necessary if ( adiff ) for ( HRI ih = fphi.first(); !ih.last(); ih.next() ) fphi[ih].shift_phase( 0.5*clipper::Util::pi() ); // apply U value fphi.compute( fphi, clipper::data32::Compute_scale_u_iso_fphi(1.0,-uvalue) ); // make grid if necessary if ( grid.is_null() ) grid.init( spgr, cell, reso ); // make xmap clipper::Xmap xmap( spgr, cell, grid ); xmap.fft_from( fphi ); // write map if ( opfile != "NONE" ) { clipper::CCP4MAPfile mapout; mapout.open_write( opfile ); mapout.export_xmap( xmap ); mapout.close_write(); } /* ------------------------------------------------------------------------ Calculation is done. Now calculate some stats. ------------------------------------------------------------------------ */ // calculate stats if ( stats ) { double m1z, m1m, m2z, m2m, m3z, m3m, mn, mi, ma, w, r; m1z = m1m = m2z = m2m = m3z = m3m = mn = 0.0; mi = 1.0e20; ma = -1.0e20; clipper::data32::F_phi f000 = fphi[clipper::HKL(0,0,0)]; if ( !f000.missing() ) m1z = f000.f() / cell.volume(); clipper::Xmap::Map_reference_index ix( xmap ); for ( ix = xmap.first(); !ix.last(); ix.next() ) { w = xmap.spacegroup().num_symops() / xmap.multiplicity( ix.coord() ); r = xmap[ix]; mn += w; m2z += w*r*r; m3z += w*r*r*r; r -= m1z; m1m += w*r; m2m += w*r*r; m3m += w*r*r*r; if ( r < mi ) mi = r; if ( r > ma ) ma = r; } m2z = pow( m2z/mn, 0.50000000 ); m3z = pow( m3z/mn, 0.33333333 ); m1m = m1m / mn; m2m = pow( m2m/mn, 0.50000000 ); m3m = pow( m3m/mn, 0.33333333 ); std::cout << "\nMap statistics:\n Number of points in cell: " << clipper::String(mn,20,12) << "\n 1st moment about zero (mean): " << clipper::String(m1z,12,6) << " About mean : " << clipper::String(m1m,12,6) << "\n 2nd moment about zero : " << clipper::String(m2z,12,6) << " About mean (rmsd): " << clipper::String(m2m,12,6) << "\n 3rd moment about zero : " << clipper::String(m3z,12,6) << " About mean (skew): " << clipper::String(m3m,12,6) << "\n Range: Min " << clipper::String(mi,12,6) << " Max " << clipper::String(ma,12,6) << "\n"; if ( statsrad > 0.0 ) { // make squared map clipper::Xmap lmom1( xmap ); clipper::Xmap lmom2( xmap ); for ( ix = lmom2.first(); !ix.last(); ix.next() ) lmom2[ix] = clipper::Util::sqr( lmom2[ix] ); // now calculate local mom1, local mom1 squared clipper::MapFilterFn_step fn( statsrad ); clipper::MapFilter_fft fltr( fn, 1.0, clipper::MapFilter_fft::Relative ); fltr( lmom1, lmom1 ); fltr( lmom2, lmom2 ); // calculate std deviation for ( ix = lmom1.first(); !ix.last(); ix.next() ) lmom2[ix] = sqrt( lmom2[ix] - clipper::Util::sqr( lmom1[ix] ) ); // now get stats of local standard deviation clipper::Map_stats m( lmom2 ); std::cout << "\nLocal map statistics:\n Mean of local RMSD : " << clipper::String( m.mean(), 12, 6 ) << " RMSD of local RMSD: " << clipper::String( m.std_dev(), 12, 6 ) << "\n"; // next do some handidness checks double s, sx, sy, sxx, syy, sxy; s = sx = sy = sxx = syy = sxy = 0.0; for ( ix = lmom1.first(); !ix.last(); ix.next() ) { s += 1.0; sx += lmom1[ix]; sy += lmom2[ix]; sxx += lmom1[ix]*lmom1[ix]; syy += lmom2[ix]*lmom2[ix]; sxy += lmom1[ix]*lmom2[ix]; } int n = fphi.num_obs() - 2; double r = (s*sxy-sx*sy)/sqrt((s*sxx-sx*sx)*(s*syy-sy*sy)); double t = r * sqrt( double(n) / ( 1.0 - r*r ) ); double p = 1.0 - pfunc( t, n ); std::cout << "\n Local mean/variance correlation : " << r << "\n"; std::cout << "\n Local mean/variance significance: " << t << " " << n << " " << p << "\n"; } } } double sfunc( double q, int i, int j ) { double s, t; s = t = 1.0; for ( int k = i; k <= j; k+= 2 ) { t *= q*double(k)/double(k+1); s += t; } return s; } double pfunc( double t, int nt ) { double w = t / sqrt(double(nt)); double th = atan( w ); double c = cos(th); double s = sin(th); if ( nt%2 == 1 ) return 1.0-0.63662*(th+s*c*sfunc(c*c,2,nt-3)); else return 1.0-(s*sfunc(c*c,1,nt-3)); } clipper-2.1/examples/csfcalc.cpp0000644000374100011300000001640211223373653013655 00000000000000// Clipper app to perform structure factor calculation /* Copyright 2003-2004 Kevin Cowtan & University of York all rights reserved */ #include #include #include #include extern "C" { #include } int main( int argc, char** argv ) { CCP4Program prog( "csfcalc", "0.1", "$Date: 2004/06/01" ); // defaults enum ANISO { NONE, FOBS, FCAL }; clipper::String title; clipper::String ippdb = "NONE"; clipper::String ipfile = "NONE"; clipper::String ipcolfo = "NONE"; clipper::String ipcolfree = "NONE"; clipper::String opfile = "sfcalc.mtz"; clipper::String opcol = "sfcalc"; bool bulk = true; ANISO aniso = NONE; int freeflag = 0; int n_refln = 1000; int n_param = 20; int verbose = 0; // command input CCP4CommandInput args( argc, argv, true ); int arg = 0; while ( ++arg < args.size() ) { if ( args[arg] == "-title" ) { if ( ++arg < args.size() ) title = args[arg]; } else if ( args[arg] == "-pdbin" ) { if ( ++arg < args.size() ) ippdb = args[arg]; } else if ( args[arg] == "-mtzin" ) { if ( ++arg < args.size() ) ipfile = args[arg]; } else if ( args[arg] == "-colin-fo" ) { if ( ++arg < args.size() ) ipcolfo = args[arg]; } else if ( args[arg] == "-colin-free" ) { if ( ++arg < args.size() ) ipcolfree = args[arg]; } else if ( args[arg] == "-mtzout" ) { if ( ++arg < args.size() ) opfile = args[arg]; } else if ( args[arg] == "-colout" ) { if ( ++arg < args.size() ) opcol = args[arg]; } else if ( args[arg] == "-free-flag" ) { if ( ++arg < args.size() ) freeflag = clipper::String(args[arg]).i(); } else if ( args[arg] == "-num-reflns" ) { if ( ++arg < args.size() ) n_refln = clipper::String(args[arg]).i(); } else if ( args[arg] == "-num-params" ) { if ( ++arg < args.size() ) n_param = clipper::String(args[arg]).i(); } else if ( args[arg] == "-no-bulk" ) { bulk = false; } else if ( args[arg] == "-aniso-obs" ) { aniso = FOBS; } else if ( args[arg] == "-aniso-cal" ) { aniso = FCAL; } else if ( args[arg] == "-verbose" ) { if ( ++arg < args.size() ) verbose = clipper::String(args[arg]).i(); } else { std::cout << "Unrecognized:\t" << args[arg] << "\n"; args.clear(); } } if ( args.size() <= 1 ) { std::cout << "Usage: csfcalc\n\t-pdbin \n\t-mtzin \n\t-colin-fo \n\t-colin-free \n\t-mtzout \n\t-colout \n\t-free-flag \n\t-num-reflns \n\t-num-params \n\t-no-bulk\n\t-aniso-obs\n\t-aniso-cal\nStructure factor calculation with bulk solvent correction.\n"; exit(1); } // make data objects clipper::CCP4MTZfile mtzin, mtzout; clipper::MTZcrystal cxtl; clipper::HKL_info hkls; double bulkfrc, bulkscl; typedef clipper::HKL_data_base::HKL_reference_index HRI; using clipper::data32::F_sigF; using clipper::data32::F_phi; using clipper::data32::Phi_fom; using clipper::data32::Flag; mtzin.set_column_label_mode( clipper::CCP4MTZfile::Legacy ); // open file mtzin.open_read( ipfile ); mtzin.import_hkl_info( hkls ); mtzin.import_crystal( cxtl, ipcolfo+".F_sigF.F" ); clipper::HKL_data fo( hkls, cxtl ); clipper::HKL_data free( hkls, cxtl ); mtzin.import_hkl_data( fo, ipcolfo ); if ( ipcolfree != "NONE" ) mtzin.import_hkl_data( free, ipcolfree ); if ( opcol[0] != '/' ) opcol = mtzin.assigned_paths()[0].notail()+"/"+opcol; mtzin.close_read(); // atomic model clipper::MMDBManager mmdb; const int mmdbflags = MMDBF_IgnoreBlankLines | MMDBF_IgnoreDuplSeqNum | MMDBF_IgnoreNonCoorPDBErrors | MMDBF_IgnoreRemarks; mmdb.SetFlag( mmdbflags ); mmdb.ReadPDBASCII( (char*)ippdb.c_str() ); // get a list of all the atoms clipper::mmdb::PPCAtom psel; int hndl, nsel; hndl = mmdb.NewSelection(); mmdb.SelectAtoms( hndl, 0, 0, SKEY_NEW ); mmdb.GetSelIndex( hndl, psel, nsel ); clipper::MMDBAtom_list atoms( psel, nsel ); mmdb.DeleteSelection( hndl ); // calculate structure factors clipper::HKL_data fc( hkls, cxtl ); if ( bulk ) { clipper::SFcalc_obs_bulk sfcb; sfcb( fc, fo, atoms ); bulkfrc = sfcb.bulk_frac(); bulkscl = sfcb.bulk_scale(); } else { clipper::SFcalc_aniso_fft sfc; sfc( fc, atoms ); bulkfrc = bulkscl = 0.0; } // do anisotropic scaling if ( aniso != NONE ) { clipper::SFscale_aniso::TYPE F = clipper::SFscale_aniso::F; clipper::SFscale_aniso sfscl; if ( aniso == FOBS ) sfscl( fo, fc ); // scale Fobs if ( aniso == FCAL ) sfscl( fc, fo ); // scale Fcal std::cout << "\nAnisotropic scaling:\n" << sfscl.u_aniso_orth(F).format() << "\n"; } // now do sigmaa calc clipper::HKL_data fb( hkls, cxtl ), fd( hkls, cxtl ); clipper::HKL_data phiw( hkls, cxtl ); clipper::HKL_data flag( hkls, cxtl ); for ( HRI ih = flag.first(); !ih.last(); ih.next() ) if ( !fo[ih].missing() && (free[ih].missing()||free[ih].flag()==freeflag) ) flag[ih].flag() = clipper::SFweight_spline::BOTH; else flag[ih].flag() = clipper::SFweight_spline::NONE; // do sigmaa calc clipper::SFweight_spline sfw( n_refln, n_param ); sfw( fb, fd, phiw, fo, fc, flag ); // calc abcd clipper::HKL_data abcd( hkls ); abcd.compute( phiw, clipper::data32::Compute_abcd_from_phifom() ); // output data mtzout.open_append( ipfile, opfile ); mtzout.export_hkl_data( abcd, opcol ); mtzout.export_hkl_data( fc, opcol ); mtzout.export_hkl_data( fb, opcol+"_BEST" ); mtzout.export_hkl_data( fd, opcol+"_DIFF" ); mtzout.close_append(); // now calc R and R-free std::vector params( n_param, 1.0 ); clipper::BasisFn_spline basisfn( fo, n_param, 1.0 ); clipper::TargetFn_scaleF1F2 targetfn( fc, fo ); clipper::ResolutionFn rfn( hkls, basisfn, targetfn, params ); double r1w, f1w, r1f, f1f, Fo, Fc; r1w = f1w = r1f = f1f = 0.0; for ( HRI ih = fo.first(); !ih.last(); ih.next() ) if ( !fo[ih].missing() ) { Fo = fo[ih].f(); Fc = sqrt( rfn.f(ih) ) * fc[ih].f(); if ( free[ih].flag() == freeflag ) { r1f += fabs( Fo - Fc ); f1f += Fo; } else { r1w += fabs( Fo - Fc ); f1w += Fo; } } r1f /= clipper::Util::max( f1f, 0.1 ); r1w /= clipper::Util::max( f1w, 0.1 ); std::cout << "\n R-factor : " << r1w << "\n Free R-factor : " << r1f << "\n"; // DIAGNOSTIC OUTPUT if ( verbose > 1 ) { std::cout << "\n Bulk Correction Volume: " << bulkfrc; std::cout << "\n Bulk Correction Factor: " << bulkscl << "\n"; std::cout << "\nNumber of spline params: " << sfw.params_scale().size() << "\n"; clipper::BasisFn_spline basisfn( hkls, sfw.params_scale().size(), 1.0 ); printf("\n $TABLE: Sigmaa statistics :\n $GRAPHS:scale vs resolution:N:1,2:\n :lack of closure vs resolution:N:1,3:\n $$\n 1/resol^2 scale lack_of_closure $$\n $$\n"); for ( int i = 0; i <= 20.0; i++ ) { double s = hkls.resolution().invresolsq_limit()*double(i)/20.0; printf( "%6.3f %12.3f %12.3f\n", s, basisfn.f_s(s,sfw.params_scale()), basisfn.f_s(s,sfw.params_error()) ); } printf(" $$\n"); } } clipper-2.1/examples/chltofom.cpp0000644000374100011300000000724611221530224014063 00000000000000// Clipper app to convert HL coeffs to phi/fom or back /* Copyright 2003-2004 Kevin Cowtan & University of York all rights reserved */ #include #include extern "C" { #include } int main( int argc, char** argv ) { CCP4Program prog( "chltofom", "0.1", "$Date: 2004/05/01" ); // defaults clipper::String title; clipper::String ipfile = "NONE"; clipper::String ipcolf = "NONE"; clipper::String ipcolh = "NONE"; clipper::String ipcolp = "NONE"; clipper::String opfile = "hltofom.mtz"; clipper::String opcol = "hltofom"; // command input CCP4CommandInput args( argc, argv, true ); int arg = 0; while ( ++arg < args.size() ) { if ( args[arg] == "-title" ) { if ( ++arg < args.size() ) title = args[arg]; } else if ( args[arg] == "-mtzin" ) { if ( ++arg < args.size() ) ipfile = args[arg]; } else if ( args[arg] == "-mtzout" ) { if ( ++arg < args.size() ) opfile = args[arg]; } else if ( args[arg] == "-colin-hl" ) { if ( ++arg < args.size() ) ipcolh = args[arg]; } else if ( args[arg] == "-colin-phifom" ) { if ( ++arg < args.size() ) ipcolp = args[arg]; } else if ( args[arg] == "-colin-fo" ) { if ( ++arg < args.size() ) ipcolf = args[arg]; } else if ( args[arg] == "-colout" ) { if ( ++arg < args.size() ) opcol = args[arg]; } else { std::cout << "Unrecognized:\t" << args[arg] << "\n"; args.clear(); } } if ( args.size() <= 1 ) { std::cout << "Usage: chltofom\n\t-mtzin \n\t-mtzout \n\t-colin-fo \n\t-colin-hl \n\t-colin-phifom \n\t-colout \nIf -colin-hl is specified, conversion is ABCD->phi/fom.\nIf -colin-phifom is specified, conversion is phi/fom->ABCD.\nIf -colin-fo is specified, weighted map coefficients are calculated in addition.\nIf no FOM is present, it is set to 0.99.\n"; exit(1); } // make data objects clipper::CCP4MTZfile mtzin, mtzout; clipper::HKL_info hkls; mtzin.set_column_label_mode( clipper::CCP4MTZfile::Legacy ); // actual work mtzin.open_read( ipfile ); mtzin.import_hkl_info( hkls ); clipper::HKL_data phiw( hkls ); clipper::HKL_data abcd( hkls ); clipper::HKL_data fsig( hkls ); clipper::HKL_data fphi( hkls ); if ( ipcolh != "NONE" ) mtzin.import_hkl_data( abcd, ipcolh ); if ( ipcolp != "NONE" ) mtzin.import_hkl_data( phiw, ipcolp ); if ( ipcolf != "NONE" ) mtzin.import_hkl_data( fsig, ipcolf ); clipper::String opbase = mtzin.assigned_paths()[0]; if ( opcol == "" ) opcol = opbase.substr( 0, opbase.find(".") ); else if ( opcol[0] != '/' ) opcol = opbase.notail()+"/"+opcol; mtzin.close_read(); mtzout.open_append( ipfile, opfile ); // compute phi+fom from abcd if ( ipcolh != "NONE" ) { phiw.compute( abcd, clipper::data32::Compute_phifom_from_abcd() ); mtzout.export_hkl_data( phiw, opcol ); } // compute abcd from phi+fom if ( ipcolp != "NONE" ) { // if weights absent, then set to 0.99 clipper::HKL_data_base::HKL_reference_index ih; for ( ih = phiw.first(); !ih.last(); ih.next() ) if ( !clipper::Util::is_nan( phiw[ih].fom() ) ) break; if ( ih.last() ) for ( ih = phiw.first(); !ih.last(); ih.next() ) phiw[ih].fom() = 0.99; abcd.compute( phiw, clipper::data32::Compute_abcd_from_phifom() ); mtzout.export_hkl_data( abcd, opcol ); } // compute weighted F from F + phi if ( ipcolf != "NONE" ) { fphi.compute( fsig, phiw, clipper::data32::Compute_fphi_from_fsigf_phifom() ); mtzout.export_hkl_data( fphi, opcol ); } mtzout.close_append(); } clipper-2.1/examples/csfcreate.cpp0000644000374100011300000000754211145025637014222 00000000000000// Clipper app to perform inverse ffts /* Copyright 2003-2004 Kevin Cowtan & University of York all rights reserved */ #include #include #include #include extern "C" { #include } int main( int argc, char** argv ) { CCP4Program prog( "csfcreate.cpp", "0.1", "$Date: 2004/06/01" ); // defaults clipper::String title; clipper::String ipmap = "NONE"; clipper::String ippdb = "NONE"; clipper::String opfile = "sfcreate.mtz"; clipper::String opcol = "sfcreate"; clipper::Resolution reso( 2.0 ); // command input CCP4CommandInput args( argc, argv, true ); int arg = 0; while ( ++arg < args.size() ) { if ( args[arg] == "-title" ) { if ( ++arg < args.size() ) title = args[arg]; } else if ( args[arg] == "-mapin" ) { if ( ++arg < args.size() ) ipmap = args[arg]; } else if ( args[arg] == "-pdbin" ) { if ( ++arg < args.size() ) ippdb = args[arg]; } else if ( args[arg] == "-mtzout" ) { if ( ++arg < args.size() ) opfile = args[arg]; } else if ( args[arg] == "-colout" ) { if ( ++arg < args.size() ) opcol = args[arg]; } else if ( args[arg] == "-resolution" ) { if ( ++arg < args.size() ) { reso = clipper::Resolution( clipper::String(args[arg]).f() ); } } else { std::cout << "Unrecognized:\t" << args[arg] << "\n"; args.clear(); } } if ( args.size() <= 1 ) { std::cout << "Usage: csfcreate.cpp\n\t-mapin \n\t-pdbin \n\t-resolution \n\t-mtzout \n\t-colout \nCreate structure factor file from map or pdb.\n"; exit(1); } // get crystal and dataset names clipper::String colnm = ""; clipper::String prjnm = "project"; clipper::String xtlnm = "xtal"; clipper::String setnm = "dset"; std::vector oppath = opcol.split("/"); colnm = oppath[oppath.size()-1]; if ( oppath.size() >= 2 ) setnm = oppath[oppath.size()-2]; if ( oppath.size() >= 3 ) xtlnm = oppath[oppath.size()-3]; // make data objects clipper::CCP4MTZfile mtzout; clipper::Spacegroup spgr; clipper::Cell cell; clipper::HKL_info hkls; clipper::HKL_data< clipper::data32::F_phi> fphi( hkls ); if ( ipmap != "NONE" ) { // import xmap clipper::Xmap xmap; clipper::CCP4MAPfile mapin; mapin.open_read( ipmap ); mapin.import_xmap( xmap ); mapin.close_read(); // calc structure factors hkls = clipper::HKL_info( xmap.spacegroup(), xmap.cell(), reso, true ); fphi = clipper::HKL_data< clipper::data32::F_phi>( hkls ); xmap.fft_to( fphi ); } else if ( ippdb != "NONE" ) { // import pdb clipper::MMDBManager mmdb; const int mmdbflags = MMDBF_IgnoreBlankLines | MMDBF_IgnoreDuplSeqNum | MMDBF_IgnoreNonCoorPDBErrors | MMDBF_IgnoreRemarks; mmdb.SetFlag( mmdbflags ); mmdb.ReadPDBASCII( (char*)ippdb.c_str() ); // get a list of all the atoms clipper::mmdb::PPCAtom psel; int hndl, nsel; hndl = mmdb.NewSelection(); mmdb.SelectAtoms( hndl, 0, 0, SKEY_NEW ); mmdb.GetSelIndex( hndl, psel, nsel ); clipper::MMDBAtom_list atoms( psel, nsel ); mmdb.DeleteSelection( hndl ); // calc structure factors hkls = clipper::HKL_info( mmdb.spacegroup(), mmdb.cell(), reso, true ); fphi = clipper::HKL_data< clipper::data32::F_phi>( hkls ); clipper::SFcalc_aniso_fft sfc; sfc( fphi, atoms ); } else { std::cerr << "ERROR: Neither map nor pdb given" << std::endl; } // output data clipper::MTZcrystal mxtl( xtlnm, prjnm, hkls.cell()); clipper::MTZdataset mset( setnm, 1.0 ); mtzout.open_write( opfile ); mtzout.export_hkl_info( hkls ); mtzout.export_crystal( mxtl, "/"+xtlnm ); mtzout.export_dataset( mset, "/"+xtlnm+"/"+setnm ); mtzout.export_hkl_data( fphi, "/"+xtlnm+"/"+setnm+"/"+colnm ); mtzout.close_write(); } clipper-2.1/examples/cmakereference.cpp0000644000374100011300000002503010736662170015216 00000000000000// Clipper app to prepare reference structure /* Copyright 2003-2004 Kevin Cowtan & University of York all rights reserved */ #include #include #include #include #include extern "C" { #if defined _MSC_VER #include #define MY_RDONLY O_RDONLY|O_BINARY #else #include #define MY_RDONLY O_RDONLY #endif #include #include #include #include "ftplib.h" // ftp client lib extern void decompress(int,int); // decompress lib } int main( int argc, char** argv ) { CCP4Program prog( "cmakereference", "0.2", "$Date: 2005/04/15" ); std::cout << "\n This program includes a modified version of ftplib\n by Thomas Pfau (see http://nbpfaus.net/~pfau/ftplib/),\n and a portion of the public domain 'ncompress' code.\n It is distributed under CCP4 part 0 or LGPL.\n\n"; // defaults clipper::String pdbid = "NONE"; clipper::String pdbfilez = "NONE"; clipper::String rflfilez = "NONE"; clipper::String ipcolf = "NONE"; clipper::String mtzout = "NONE"; clipper::String pdbout = "NONE"; clipper::Resolution reso; bool bulk = true; int n_refln = 1000; int n_param = 20; int verbose = 0; // command input CCP4CommandInput args( argc, argv, true ); int arg = 0; while ( ++arg < args.size() ) { if ( args[arg] == "-pdbid" ) { if ( ++arg < args.size() ) pdbid = args[arg]; } else if ( args[arg] == "-pdbin" ) { if ( ++arg < args.size() ) pdbfilez = args[arg]; } else if ( args[arg] == "-cifin" ) { if ( ++arg < args.size() ) rflfilez = args[arg]; } else if ( args[arg] == "-mtzout" ) { if ( ++arg < args.size() ) mtzout = args[arg]; } else if ( args[arg] == "-pdbout" ) { if ( ++arg < args.size() ) pdbout = args[arg]; } else if ( args[arg] == "-colin-fo" ) { if ( ++arg < args.size() ) ipcolf = args[arg]; } else if ( args[arg] == "-resolution" ) { if ( ++arg < args.size() ) reso = clipper::Resolution( clipper::String(args[arg]).f() ); } else if ( args[arg] == "-num-reflns" ) { if ( ++arg < args.size() ) n_refln = clipper::String(args[arg]).i(); } else if ( args[arg] == "-num-params" ) { if ( ++arg < args.size() ) n_param = clipper::String(args[arg]).i(); } else if ( args[arg] == "-no-bulk" ) { bulk = false; } else if ( args[arg] == "-verbose" ) { if ( ++arg < args.size() ) verbose = clipper::String(args[arg]).i(); } else { std::cout << "Unrecognized:\t" << args[arg] << "\n"; args.clear(); } } if ( args.size() <= 1 ) { std::cout << "Usage: cmakereference\n\t-pdbid \t\tCOMPULSORY\n\t-pdbin <.ent.Z-file>\n\t-cifin <.ent.Z-file>\n\t-mtzout \n\t-pdbout \n\t-resolution \nGenerate reference structure for pirate/buccaneer.\nIf no .ent.Z files are given, they are fetched by ftp if possible.\n"; exit(1); } // post input if ( mtzout == "NONE" ) mtzout = "reference-"+pdbid+".mtz"; if ( pdbout == "NONE" ) pdbout = "reference-"+pdbid+".pdb"; // ftp settings // db specific std::string host = "ftp.ebi.ac.uk"; std::string pdbdir = "/pub/databases/rcsb/pdb/data/structures/all/pdb/"; std::string rfldir = "/pub/databases/rcsb/pdb/data/structures/all/structure_factors/"; // generic clipper::String user = "anonymous"; clipper::String pass = "user@host"; clipper::String tmpdir = "/tmp"; // from environment const char *ptrusr = getenv("USER"); const char *ptrhst = getenv("HOST"); const char *ptrscr = getenv("CCP4_SCR"); if ( ptrusr != NULL && ptrhst != NULL ) pass = std::string(ptrusr) + "@" + std::string(ptrhst); if ( ptrscr != NULL ) tmpdir = std::string(ptrscr); // messages clipper::Message_fatal noserver( "Unable to connect to server. Try manual ftp and give filenames." ); clipper::Message_fatal nologin( "Unable to login to server. Try manual ftp and give filenames." ); clipper::Message_fatal nopdb( "Unable to fetch coordinate file.\nCheck coordinates are available. Try manual ftp and give filenames." ); clipper::Message_fatal norfl( "Unable to fetch reflection file.\nCheck reflections are available. Try manual ftp and give filenames." ); clipper::Message_fatal nordc( "Unable to read compressed file." ); clipper::Message_fatal nowrc( "Unable to write uncompressed file." ); // ftp the files, if required if ( pdbfilez == "NONE" || rflfilez == "NONE" ) { // provide instructions std::cout << "\nAttempting to connect to EBI/MSD for file download. If this step fails, use \nyour preferred ftp client to fetch the files, then re-run giving the \nfilenames as arguments, or use the EBI/MSD website.\n\nftp " << host << "\n" << user << "\n" << pass << "\nbinary\ncd " << pdbdir << "\nget pdb" << pdbid << ".ent.Z\ncd " << rfldir << "\nget r" << pdbid << "sf.ent.Z\nquit\n\n"; netbuf *pbuf; int err; FtpInit(); std::cout << "Connecting...\n\n"; err = FtpConnect( host.c_str(), &pbuf ); if ( err != 1 ) clipper::Message::message( noserver ); err = FtpLogin( user.c_str(), pass.c_str(), pbuf ); if ( err != 1 ) clipper::Message::message( nologin ); if ( pdbfilez == "NONE" ) { std::cout << "Fetching coordinates...\n\n"; pdbfilez = tmpdir + "/pdb" + pdbid + ".ent.Z"; err = FtpChdir( pdbdir.c_str(), pbuf ); if ( err != 1 ) clipper::Message::message( nopdb ); err = FtpGet(pdbfilez.c_str(),pdbfilez.tail().c_str(),FTPLIB_IMAGE,pbuf); if ( err != 1 ) clipper::Message::message( nopdb ); } if ( rflfilez == "NONE" ) { std::cout << "Fetching reflections...\n\n"; rflfilez = tmpdir + "/r" + pdbid + "sf.ent.Z"; err = FtpChdir( rfldir.c_str(), pbuf ); if ( err != 1 ) clipper::Message::message( norfl ); err = FtpGet(rflfilez.c_str(),rflfilez.tail().c_str(),FTPLIB_IMAGE,pbuf); if ( err != 1 ) clipper::Message::message( norfl ); } FtpQuit( pbuf ); } // now uncompress the files int fdip, fdop; clipper::String pdbfile( pdbfilez ), rflfile( rflfilez ); if ( pdbfilez.substr( pdbfilez.length() - 2 ) == ".Z" ) { std::cout << "Decompressing coordinates...\n\n"; pdbfile = pdbfilez.substr( 0, pdbfilez.length() - 2 ); fdip = open( pdbfilez.c_str(), MY_RDONLY ); if ( fdip < 0 ) clipper::Message::message( nordc ); fdop = open( pdbfile.c_str(), O_CREAT|O_WRONLY|O_TRUNC, S_IREAD|S_IWRITE ); if ( fdop < 0 ) clipper::Message::message( nowrc ); decompress( fdip, fdop ); close( fdip ); close( fdop ); } if ( rflfilez.substr( rflfilez.length() - 2 ) == ".Z" ) { std::cout << "Decompressing reflections...\n\n"; rflfile = rflfilez.substr( 0, rflfilez.length() - 2 ); fdip = open( rflfilez.c_str(), MY_RDONLY ); if ( fdip < 0 ) clipper::Message::message( nordc ); fdop = open( rflfile.c_str(), O_CREAT|O_WRONLY|O_TRUNC, S_IREAD|S_IWRITE ); if ( fdop < 0 ) clipper::Message::message( nowrc ); decompress( fdip, fdop ); close( fdip ); close( fdop ); } // make data objects clipper::CIFfile cifin; clipper::CCP4MTZfile mtzfile; clipper::HKL_info hkls_in; double bulkfrc, bulkscl; typedef clipper::HKL_data_base::HKL_reference_index HRI; // atomic model clipper::MMDBManager mmdb; const int mmdbflags = MMDBF_IgnoreBlankLines | MMDBF_IgnoreDuplSeqNum | MMDBF_IgnoreNonCoorPDBErrors | MMDBF_IgnoreRemarks; mmdb.SetFlag( mmdbflags ); mmdb.ReadPDBASCII( (char*)pdbfile.c_str() ); // read reflection info clipper::Spacegroup spgr = mmdb.spacegroup(); clipper::Cell cell = mmdb.cell(); clipper::HKL_info hkls; clipper::HKL_data fo(hkls); if ( rflfile.substr( rflfile.length() - 4 ) == ".ent" ) { // cif format cifin.open_read( rflfile ); if ( reso.is_null() ) reso = cifin.resolution( cell ); hkls.init( spgr, cell, reso, true ); cifin.import_hkl_data( fo ); cifin.close_read(); } else { // mtz format mtzfile.open_read( rflfile ); if ( reso.is_null() ) reso = mtzfile.resolution(); hkls.init( spgr, cell, reso, true ); mtzfile.import_hkl_data( fo, ipcolf ); mtzfile.close_read(); } std::cout << "Number of reflections: " << hkls.num_reflections() << "\n"; // get a list of all the atoms clipper::mmdb::PPCAtom psel; int hndl, nsel; hndl = mmdb.NewSelection(); mmdb.SelectAtoms( hndl, 0, 0, SKEY_NEW ); mmdb.GetSelIndex( hndl, psel, nsel ); clipper::MMDBAtom_list atoms( psel, nsel ); mmdb.DeleteSelection( hndl ); // calculate structure factors clipper::HKL_data fc( hkls ); if ( bulk ) { clipper::SFcalc_obs_bulk sfcb; sfcb( fc, fo, atoms ); bulkfrc = sfcb.bulk_frac(); bulkscl = sfcb.bulk_scale(); } else { clipper::SFcalc_aniso_fft sfc; sfc( fc, atoms ); bulkfrc = bulkscl = 0.0; } // now do sigmaa calc clipper::HKL_data fb( hkls ), fd( hkls ); clipper::HKL_data phiw( hkls ); clipper::HKL_data flag( hkls ); for ( HRI ih = flag.first(); !ih.last(); ih.next() ) if ( !fo[ih].missing() ) flag[ih].flag() = clipper::SFweight_spline::BOTH; else flag[ih].flag() = clipper::SFweight_spline::NONE; // do sigmaa calc clipper::SFweight_spline sfw( n_refln, n_param ); sfw( fb, fd, phiw, fo, fc, flag ); // calc abcd clipper::HKL_data abcd( hkls ); abcd.compute( phiw, clipper::data32::Compute_abcd_from_phifom() ); // output data mtzfile.open_write( mtzout ); mtzfile.export_hkl_info( hkls ); mtzfile.export_hkl_data( fo, "/*/*/FP" ); mtzfile.export_hkl_data( abcd, "/*/*/FC" ); mtzfile.export_hkl_data( fb, "/*/*/FC_BEST" ); mtzfile.export_hkl_data( fd, "/*/*/FC_DIFF" ); mtzfile.close_write(); mmdb.WritePDBASCII( (char*)pdbout.c_str() ); // now calc R and R-free std::vector params( n_param, 1.0 ); clipper::BasisFn_spline basisfn( fo, n_param, 1.0 ); clipper::TargetFn_scaleF1F2 targetfn( fc, fo ); clipper::ResolutionFn rfn( hkls, basisfn, targetfn, params ); double r1w, f1w, r1f, f1f, Fo, Fc; r1w = f1w = r1f = f1f = 0.0; for ( HRI ih = fo.first(); !ih.last(); ih.next() ) if ( !fo[ih].missing() ) { Fo = fo[ih].f(); Fc = sqrt( rfn.f(ih) ) * fc[ih].f(); r1w += fabs( Fo - Fc ); f1w += Fo; } r1f /= clipper::Util::max( f1f, 0.1 ); r1w /= clipper::Util::max( f1w, 0.1 ); std::cout << "\n R-factor : " << r1w << "\n"; } clipper-2.1/examples/cncsfrommodel.cpp0000644000374100011300000001352411114746706015116 00000000000000// Clipper app to get NCS from model /* Copyright 2008 Kevin Cowtan & University of York all rights reserved */ #include #include #include #include extern "C" { #include #include } clipper::String chain_sequence( const clipper::MPolymer& mp ) { const int NTYPE = 27; const char rtype1[NTYPE] = { 'A', 'R', 'N', 'D', 'C', 'Q', 'E', 'G', 'H', 'I', 'L', 'K', 'M', 'F', 'P', 'S', 'T', 'W', 'Y', 'V', 'M', 'a', 'c', 'g', 't', 'u', '?'}; const char rtype3[NTYPE][4] = {"ALA","ARG","ASN","ASP","CYS","GLN","GLU","GLY","HIS","ILE", "LEU","LYS","MET","PHE","PRO","SER","THR","TRP","TYR","VAL", "MSE"," A"," C"," G"," T"," U","UNK"}; clipper::String seq = ""; for ( int res = 0; res < mp.size(); res++ ) { char c = ' '; for ( int t = 0; t < NTYPE; t++ ) if ( strncmp( mp[res].type().c_str(), rtype3[t], 3 ) == 0 ) c = rtype1[t]; if ( c == ' ' ) c = char( (mp[res].type()[0] + mp[res].type()[1] + mp[res].type()[2]) % 128 + 128 ); // use dummy sequence symbols for unknown types seq += c; } return seq; } clipper::RTop_orth superpose( const clipper::MPolymer& mp1, const clipper::MPolymer& mp2, const double& rmsd, const int& nmin ) { clipper::RTop_orth result = clipper::RTop_orth::null(); clipper::String seq1 = chain_sequence( mp1 ); clipper::String seq2 = chain_sequence( mp2 ); // ensure that '?'s don't match for ( int i = 0; i < seq1.size(); i++ ) if ( seq1[i] == '?' ) seq1[i] = '1'; for ( int i = 0; i < seq2.size(); i++ ) if ( seq2[i] == '?' ) seq2[i] = '2'; // get the sequence alignment clipper::MSequenceAlign align( clipper::MSequenceAlign::LOCAL, 1.0, 0.001, -1.0 ); std::pair,std::vector > valign = align( seq1, seq2 ); const std::vector& v1( valign.first ), v2( valign.second ); // reject any bad matches int nmat, nmis; nmat = nmis = 0; for ( int i1 = 0; i1 < seq1.size(); i1++ ) { int i2 = v1[i1]; if ( i2 >= 0 && i2 < seq2.size() ) if ( isalpha(seq1[i1]) && isalpha(seq2[i2]) ) { if ( seq1[i1] == seq2[i2] ) nmat++; else nmis++; } } if ( nmat < nmin ) return result; // now get the coordinates std::vector c1, c2; for ( int i1 = 0; i1 < seq1.size(); i1++ ) { int i2 = v1[i1]; if ( i2 >= 0 && i2 < seq2.size() ) if ( seq1[i1] == seq2[i2] ) if ( isalpha(seq1[i1]) ) { int a1 = mp1[i1].lookup( " CA ", clipper::MM::ANY ); int a2 = mp2[i2].lookup( " CA ", clipper::MM::ANY ); if ( a1 < 0 && a2 < 0 ) { a1 = mp1[i1].lookup( " C1*", clipper::MM::ANY ); a2 = mp2[i2].lookup( " C1*", clipper::MM::ANY ); } if ( a1 >= 0 && a2 >= 0 ) { c1.push_back( mp1[i1][a1].coord_orth() ); c2.push_back( mp2[i2][a2].coord_orth() ); } } } // refine the alignment clipper::RTop_orth rtop_tmp; double r2; for ( int c = 0; c < 5; c++ ) { int nc = c1.size(); // get transformation rtop_tmp = clipper::RTop_orth( c1, c2 ); // get rmsd std::vector > r2index( nc ); r2 = 0.0; for ( int i = 0; i < nc; i++ ) { double d2 = ( rtop_tmp * c1[i] - c2[i] ).lengthsq(); r2 += d2; r2index[i] = std::pair( d2, i ); } r2 /= double( nc ); // prune the list to improve it std::sort( r2index.begin(), r2index.end() ); std::vector t1, t2; for ( int i = 0; i < (9*r2index.size())/10; i++ ) { t1.push_back( c1[r2index[i].second] ); t2.push_back( c2[r2index[i].second] ); } c1 = t1; c2 = t2; } // if a close match has been found, return it if ( r2 < rmsd*rmsd ) result = rtop_tmp; return result; } int main( int argc, char** argv ) { CCP4Program prog( "cncsfrommodel", "0.1", "$Date: 2008/03/31" ); // defaults clipper::String title; clipper::String ippdb = "NONE"; double rmsd = 1.0; int over = 12; // command input CCP4CommandInput args( argc, argv, true ); int arg = 0; while ( ++arg < args.size() ) { if ( args[arg] == "-title" ) { if ( ++arg < args.size() ) title = args[arg]; } else if ( args[arg] == "-pdbin" ) { if ( ++arg < args.size() ) ippdb = args[arg]; } else if ( args[arg] == "-max-rmsd" ) { if ( ++arg < args.size() ) rmsd = clipper::String(args[arg]).f(); } else if ( args[arg] == "-min-overlap" ) { if ( ++arg < args.size() ) over = clipper::String(args[arg]).i(); } else { std::cout << "Unrecognized:\t" << args[arg] << "\n"; args.clear(); } } if ( args.size() <= 1 ) { std::cout << "Usage: cncsfrompdb\n\t-pdbin \n\t-max-rmsd \n\t-min-overlap \nDetermine NCS from a protein model.\n"; exit(1); } // atomic models const int mmdbflags = MMDBF_IgnoreBlankLines | MMDBF_IgnoreDuplSeqNum | MMDBF_IgnoreNonCoorPDBErrors | MMDBF_IgnoreRemarks; clipper::MMDBfile mmdb; clipper::MiniMol mol; mmdb.SetFlag( mmdbflags ); mmdb.read_file( ippdb ); mmdb.import_minimol( mol ); for ( int c1 = 0; c1 < mol.size(); c1++ ) for ( int c2 = 0; c2 < mol.size(); c2++ ) if ( c1 != c2 ) { clipper::RTop_orth rtop = superpose( mol[c1], mol[c2], rmsd, over ); if ( !rtop.is_null() ) { clipper::Rotation rot( rtop.rot() ); clipper::Euler_ccp4 euler = rot.euler_ccp4(); clipper::Coord_orth coord( rtop.trn() ); std::cout << std::endl << "NCS operator found relating chains " << mol[c1].id() << " and " << mol[c2].id() << std::endl; std::cout << "Euler rotation/deg: " << clipper::Util::rad2d(euler.alpha()) << "," << clipper::Util::rad2d(euler.beta()) << "," << clipper::Util::rad2d(euler.gamma()) << std::endl; std::cout << "Orth translation/A: " << coord.x() << "," << coord.y() << "," << coord.z() << std::endl; } } } clipper-2.1/examples/Makefile.am0000644000374100011300000000326011372264322013602 00000000000000# Makefile.am, passed: examples, extracted subdir: examples # in dir /home/cowtan/clipper-autoconf/clipper-2.1/examples ## -*- mode: Makefile; mode: font-lock -*- bin_PROGRAMS = caniso cecalc cfft chltofom cinvfft clipper_test cmakereference cmaplocal cmodeltoseq cncsfrommodel convert2mtz cpatterson cphasecombine cphasematch csfcalc csfcreate csigmaa csymmatch maketestdata caniso_SOURCES = caniso.cpp cecalc_SOURCES = cecalc.cpp cfft_SOURCES = cfft.cpp chltofom_SOURCES = chltofom.cpp cinvfft_SOURCES = cinvfft.cpp clipper_test_SOURCES = clipper_test.cpp cmakereference_SOURCES = cmakereference.cpp ftplib.h ftplib.c compress42.c cmaplocal_SOURCES = cmaplocal.cpp cmodeltoseq_SOURCES = cmodeltoseq.cpp cncsfrommodel_SOURCES = cncsfrommodel.cpp convert2mtz_SOURCES = convert2mtz.cpp convert2mtz.h cpatterson_SOURCES = cpatterson.cpp cphasecombine_SOURCES = cphasecombine.cpp cphasematch_SOURCES = cphasematch.cpp csfcalc_SOURCES = csfcalc.cpp csfcreate_SOURCES = csfcreate.cpp csigmaa_SOURCES = csigmaa.cpp csymmatch_SOURCES = csymmatch.cpp # no ftndemo maketestdata_SOURCES = maketestdata.cpp TESTS = maketestdata INCLUDES = -I.. $(FFTW_CXXFLAGS) $(MMDB_CXXFLAGS) $(CCP4_CXXFLAGS) $(CCTBX_CXXFLAGS) $(BOOST_CXXFLAGS) LIBS = $(FFTW_LIBS) $(CCP4_LIBS) $(MMDB_LIBS) $(CCTBX_LIBS) LDADD = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la \ -lpthread clipper-2.1/examples/cphasecombine.cpp0000644000374100011300000000663011221530357015053 00000000000000// Clipper app to combine HL coeffs /* Copyright 2003-2004 Kevin Cowtan & University of York all rights reserved */ #include #include extern "C" { #include } int main( int argc, char** argv ) { CCP4Program prog( "cphasecombine", "0.1", "$Date: 2004/06/01" ); // defaults clipper::String title; clipper::String ipfile = "NONE"; clipper::String ipcolh1 = "NONE"; clipper::String ipcolh2 = "NONE"; clipper::String opfile = "phasecombine.mtz"; clipper::String opcol = "hlcomb"; float hlwt1 = 1.0; float hlwt2 = 1.0; // command input CCP4CommandInput args( argc, argv, true ); int arg = 0; while ( ++arg < args.size() ) { if ( args[arg] == "-title" ) { if ( ++arg < args.size() ) title = args[arg]; } else if ( args[arg] == "-mtzin" ) { if ( ++arg < args.size() ) ipfile = args[arg]; } else if ( args[arg] == "-mtzout" ) { if ( ++arg < args.size() ) opfile = args[arg]; } else if ( args[arg] == "-colin-hl-1" ) { if ( ++arg < args.size() ) ipcolh1 = args[arg]; } else if ( args[arg] == "-colin-hl-2" ) { if ( ++arg < args.size() ) ipcolh2 = args[arg]; } else if ( args[arg] == "-weight-hl-1" ) { if ( ++arg < args.size() ) hlwt1 = clipper::String(args[arg]).f(); } else if ( args[arg] == "-weight-hl-2" ) { if ( ++arg < args.size() ) hlwt2 = clipper::String(args[arg]).f(); } else if ( args[arg] == "-colout" ) { if ( ++arg < args.size() ) opcol = args[arg]; } else { std::cout << "Unrecognized:\t" << args[arg] << "\n"; args.clear(); } } if ( args.size() <= 1 ) { std::cout << "Usage: cphasecombine\n\t-mtzin \n\t-mtzout \n\t-colin-hl-1 \n\t-colin-hl-2 \n\t-colout \n\t-weight-hl-1 \n\t-weight-hl-2 \nThe specified phase probabilities, given by HL coefficients, are combined.\nIf weights are supplied, these are applied.\nIf the second set of coefficients are omitted, scaling alone occurs.\n"; exit(1); } // make data objects clipper::CCP4MTZfile mtzin, mtzout; clipper::HKL_info hkls; mtzin.set_column_label_mode( clipper::CCP4MTZfile::Legacy ); // input mtzin.open_read( ipfile ); mtzin.import_hkl_info( hkls ); clipper::HKL_data abcd1( hkls ); clipper::HKL_data abcd2( hkls ); if ( ipcolh1 != "NONE" ) mtzin.import_hkl_data( abcd1, ipcolh1 ); if ( ipcolh2 != "NONE" ) mtzin.import_hkl_data( abcd2, ipcolh2 ); if ( opcol[0] != '/' ) opcol = mtzin.assigned_paths()[0].notail()+"/"+opcol; mtzin.close_read(); // actual work clipper::HKL_data abcd( hkls ); for ( clipper::HKL_data::HKL_reference_index ih = abcd.first(); !ih.last(); ih.next() ) { abcd[ih].a() = abcd[ih].b() = abcd[ih].c() = abcd[ih].d() = 0.0; if ( !abcd1[ih].missing() ) { abcd[ih].a() += hlwt1 * abcd1[ih].a(); abcd[ih].b() += hlwt1 * abcd1[ih].b(); abcd[ih].c() += hlwt1 * abcd1[ih].c(); abcd[ih].d() += hlwt1 * abcd1[ih].d(); } if ( !abcd2[ih].missing() ) { abcd[ih].a() += hlwt2 * abcd2[ih].a(); abcd[ih].b() += hlwt2 * abcd2[ih].b(); abcd[ih].c() += hlwt2 * abcd2[ih].c(); abcd[ih].d() += hlwt2 * abcd2[ih].d(); } } // output mtzout.open_append( ipfile, opfile ); mtzout.export_hkl_data( abcd, opcol ); mtzout.close_append(); } clipper-2.1/examples/compress42.c0000644000374100011300000004430411077601630013716 00000000000000/* (N)compress42.c - File compression ala IEEE Computer, Mar 1992. * * Authors: * Spencer W. Thomas (decvax!harpo!utah-cs!utah-gr!thomas) * Jim McKie (decvax!mcvax!jim) * Steve Davies (decvax!vax135!petsd!peora!srd) * Ken Turkowski (decvax!decwrl!turtlevax!ken) * James A. Woods (decvax!ihnp4!ames!jaw) * Joe Orost (decvax!vax135!petsd!joe) * Dave Mack (csu@alembic.acs.com) * Peter Jannesen, Network Communication Systems * (peter@ncs.nl) * * Revision unlabelled: 08/10/22 cowtan@ysbl.york.ac.uk * Include stdlib.h and string.h * * Revision unlabelled: 04/10/12 cowtan@ysbl.york.ac.uk * Reduce to minimal subset for slow decompression. * * Revision 4.2.3 92/03/14 peter@ncs.nl * Optimise compress and decompress function and a lot of cleanups. * New fast hash algoritme added (if more than 800Kb available). * * Revision 4.1 91/05/26 csu@alembic.acs.com * Modified to recursively compress directories ('r' flag). As a side * effect, compress will no longer attempt to compress things that * aren't "regular" files. See Changes. * * Revision 4.0 85/07/30 12:50:00 joe * Removed ferror() calls in output routine on every output except first. * Prepared for release to the world. * * Revision 3.6 85/07/04 01:22:21 joe * Remove much wasted storage by overlaying hash table with the tables * used by decompress: tab_suffix[1<putc] and * added signal catcher [plus beef in write_error()] to delete effluvia. * * Revision 2.0 84/08/28 22:00:00 petsd!joe * Add check for foreground before prompting user. Insert maxbits into * compressed file. Force file being uncompressed to end with ".Z". * Added "-c" flag and "zcat". Prepared for release. * * Revision 1.10 84/08/24 18:28:00 turtlevax!ken * Will only compress regular files (no directories), added a magic number * header (plus an undocumented -n flag to handle old files without headers), * added -f flag to force overwriting of possibly existing destination file, * otherwise the user is prompted for a response. Will tack on a .Z to a * filename if it doesn't have one when decompressing. Will only replace * file if it was compressed. * * Revision 1.9 84/08/16 17:28:00 turtlevax!ken * Removed scanargs(), getopt(), added .Z extension and unlimited number of * filenames to compress. Flags may be clustered (-Ddvb12) or separated * (-D -d -v -b 12), or combination thereof. Modes and other status is * copied with copystat(). -O bug for 4.2 seems to have disappeared with * 1.8. * * Revision 1.8 84/08/09 23:15:00 joe * Made it compatible with vax version, installed jim's fixes/enhancements * * Revision 1.6 84/08/01 22:08:00 joe * Sped up algorithm significantly by sorting the compress chain. * * Revision 1.5 84/07/13 13:11:00 srd * Added C version of vax asm routines. Changed structure to arrays to * save much memory. Do unsigned compares where possible (faster on * Perkin-Elmer) * * Revision 1.4 84/07/05 03:11:11 thomas * Clean up the code a little and lint it. (Lint complains about all * the regs used in the asm, but I'm not going to "fix" this.) * * Revision 1.3 84/07/05 02:06:54 thomas * Minor fixes. * * Revision 1.2 84/07/05 00:27:27 thomas * Add variable bit length output. * */ #include #include #include #include #include #include #include #include #include #ifdef DIRENT # include # define RECURSIVE 1 # undef SYSDIR #endif #ifdef SYSDIR # include # define RECURSIVE 1 #endif #ifdef UTIME_H # include #else struct utimbuf { time_t actime; time_t modtime; }; #endif #ifdef __STDC__ # define ARGS(a) a #else # define ARGS(a) () #endif #define LARGS(a) () /* Relay on include files for libary func defs. */ #ifndef SIG_TYPE # define SIG_TYPE void (*)() #endif #define MARK(a) { asm(" .globl M.a"); asm("M.a:"); } #ifdef DEF_ERRNO extern int errno; #endif #undef min #define min(a,b) ((a>b) ? b : a) #ifndef IBUFSIZ # define IBUFSIZ BUFSIZ /* Defailt input buffer size */ #endif #ifndef OBUFSIZ # define OBUFSIZ BUFSIZ /* Default output buffer size */ #endif #define MAXPATHLEN 1024 /* MAXPATHLEN - maximum length of a pathname we allow */ #define SIZE_INNER_LOOP 256 /* Size of the inter (fast) compress loop */ /* Defines for third byte of header */ #define MAGIC_1 (char_type)'\037'/* First byte of compressed file */ #define MAGIC_2 (char_type)'\235'/* Second byte of compressed file */ #define BIT_MASK 0x1f /* Mask for 'number of compresssion bits' */ /* Masks 0x20 and 0x40 are free. */ /* I think 0x20 should mean that there is */ /* a fourth header byte (for expansion). */ #define BLOCK_MODE 0x80 /* Block compresssion if table is full and */ /* compression rate is dropping flush tables */ /* the next two codes should not be changed lightly, as they must not */ /* lie within the contiguous general code space. */ #define FIRST 257 /* first free entry */ #define CLEAR 256 /* table clear output code */ #define INIT_BITS 9 /* initial number of bits/code */ #ifndef SACREDMEM /* * SACREDMEM is the amount of physical memory saved for others; compress * will hog the rest. */ # define SACREDMEM 0 #endif #ifndef USERMEM /* * Set USERMEM to the maximum amount of physical user memory available * in bytes. USERMEM is used to determine the maximum BITS that can be used * for compression. */ # define USERMEM 450000 /* default user memory */ #endif #ifndef BYTEORDER # define BYTEORDER 0000 #endif #ifndef NOALLIGN # define NOALLIGN 0 #endif /* * machine variants which require cc -Dmachine: pdp11, z8000, DOS */ #ifndef O_BINARY # define O_BINARY 0 /* System has no binary mode */ #endif #ifndef BITS /* General processor calculate BITS */ # if USERMEM >= (800000+SACREDMEM) # define FAST # else # if USERMEM >= (433484+SACREDMEM) # define BITS 16 # else # if USERMEM >= (229600+SACREDMEM) # define BITS 15 # else # if USERMEM >= (127536+SACREDMEM) # define BITS 14 # else # if USERMEM >= (73464+SACREDMEM) # define BITS 13 # else # define BITS 12 # endif # endif # endif # endif # endif #endif /* BITS */ #ifdef FAST # define HBITS 17 /* 50% occupancy */ # define HSIZE (1<>3]) |= ((long)(c))<<((o)&0x7);\ (o) += (n); \ } #else #ifdef BYTEORDER #define output(b,o,c,n) { char_type *p = &(b)[(o)>>3]; \ union bytes i; \ i.word = ((long)(c))<<((o)&0x7); \ p[0] |= i.bytes.b1; \ p[1] |= i.bytes.b2; \ p[2] |= i.bytes.b3; \ (o) += (n); \ } #else #define output(b,o,c,n) { char_type *p = &(b)[(o)>>3]; \ long i = ((long)(c))<<((o)&0x7); \ p[0] |= (char_type)(i); \ p[1] |= (char_type)(i>>8); \ p[2] |= (char_type)(i>>16); \ (o) += (n); \ } #endif #endif #if BYTEORDER == 4321 && NOALLIGN == 1 #define input(b,o,c,n,m){ \ (c) = (*(long *)(&(b)[(o)>>3])>>((o)&0x7))&(m); \ (o) += (n); \ } #else #define input(b,o,c,n,m){ char_type *p = &(b)[(o)>>3]; \ (c) = ((((long)(p[0]))|((long)(p[1])<<8)| \ ((long)(p[2])<<16))>>((o)&0x7))&(m); \ (o) += (n); \ } #endif char *progname; /* Program name */ int silent = 0; /* don't tell me about errors */ int quiet = 1; /* don't tell me about compression */ int do_decomp = 0; /* Decompress mode */ int force = 0; /* Force overwrite of files and links */ int nomagic = 0; /* Use a 3-byte magic number header, */ /* unless old file */ int block_mode = BLOCK_MODE;/* Block compress mode -C compatible with 2.0*/ int maxbits = BITS; /* user settable max # bits/code */ int zcat_flg = 0; /* Write output on stdout, suppress messages */ int recursive = 0; /* compress directories */ int exit_code = -1; /* Exitcode of compress (-1 no file compressed) */ char_type inbuf[IBUFSIZ+64]; /* Input buffer */ char_type outbuf[OBUFSIZ+2048];/* Output buffer */ struct stat infstat; /* Input file status */ char *ifname; /* Input filename */ int remove_ofname = 0; /* Remove output file on a error */ char ofname[MAXPATHLEN]; /* Output filename */ int fgnd_flag = 0; /* Running in background (SIGINT=SIGIGN) */ long bytes_in; /* Total number of byte from input */ long bytes_out; /* Total number of byte to output */ /* Normal machine */ count_int htab[HSIZE]; unsigned short codetab[HSIZE]; # define htabof(i) htab[i] # define codetabof(i) codetab[i] # define tab_prefixof(i) codetabof(i) # define tab_suffixof(i) ((char_type *)(htab))[i] # define de_stack ((char_type *)&(htab[HSIZE-1])) # define clear_htab() memset(htab, -1, sizeof(htab)) # define clear_tab_prefixof() memset(codetab, 0, 256); void decompress ARGS((int,int)); void read_error ARGS((void)); void write_error ARGS((void)); void abort_compress ARGS((void)); /* * Decompress stdin to stdout. This routine adapts to the codes in the * file building the "string" table on-the-fly; requiring no table to * be stored in the compressed file. The tables used herein are shared * with those of the compress() routine. See the definitions above. */ void decompress(int fdin, int fdout) { char_type *stackp; code_int code; int finchar; code_int oldcode; code_int incode; int inbits; int posbits; int outpos; int insize; int bitmask; code_int free_ent; code_int maxcode; code_int maxmaxcode; int n_bits; int rsize; bytes_in = 0; bytes_out = 0; insize = 0; while (insize < 3 && (rsize = read(fdin, inbuf+insize, IBUFSIZ)) > 0) insize += rsize; if (insize < 3 || inbuf[0] != MAGIC_1 || inbuf[1] != MAGIC_2) { if (rsize < 0) read_error(); if (insize > 0) { fprintf(stderr, "%s: not in compressed format\n", (ifname[0] != '\0'? ifname : "stdin")); exit_code = 1; } return ; } maxbits = inbuf[2] & BIT_MASK; block_mode = inbuf[2] & BLOCK_MODE; maxmaxcode = MAXCODE(maxbits); if (maxbits > BITS) { fprintf(stderr, "%s: compressed with %d bits, can only handle %d bits\n", (*ifname != '\0' ? ifname : "stdin"), maxbits, BITS); exit_code = 4; return; } bytes_in = insize; maxcode = MAXCODE(n_bits = INIT_BITS)-1; bitmask = (1<= 0 ; --code) tab_suffixof(code) = (char_type)code; do { resetbuf: ; { int i; int e; int o; e = insize-(o = (posbits>>3)); for (i = 0 ; i < e ; ++i) inbuf[i] = inbuf[i+o]; insize = e; posbits = 0; } if (insize < sizeof(inbuf)-IBUFSIZ) { if ((rsize = read(fdin, inbuf+insize, IBUFSIZ)) < 0) read_error(); insize += rsize; } inbits = ((rsize > 0) ? (insize - insize%n_bits)<<3 : (insize<<3)-(n_bits-1)); while (inbits > posbits) { if (free_ent > maxcode) { posbits = ((posbits-1) + ((n_bits<<3) - (posbits-1+(n_bits<<3))%(n_bits<<3))); ++n_bits; if (n_bits == maxbits) maxcode = maxmaxcode; else maxcode = MAXCODE(n_bits)-1; bitmask = (1<= free_ent) /* Special case for KwKwK string. */ { if (code > free_ent) { char_type *p; posbits -= n_bits; p = &inbuf[posbits>>3]; fprintf(stderr, "insize:%d posbits:%d inbuf:%02X %02X %02X %02X %02X (%d)\n", insize, posbits, p[-1],p[0],p[1],p[2],p[3], (posbits&07)); fprintf(stderr, "uncompress: corrupt input\n"); abort_compress(); } *--stackp = (char_type)finchar; code = oldcode; } while ((cmp_code_int)code >= (cmp_code_int)256) { /* Generate output characters in reverse order */ *--stackp = tab_suffixof(code); code = tab_prefixof(code); } *--stackp = (char_type)(finchar = tab_suffixof(code)); /* And put them out in forward order */ { int i; if (outpos+(i = (de_stack-stackp)) >= OBUFSIZ) { do { if (i > OBUFSIZ-outpos) i = OBUFSIZ-outpos; if (i > 0) { memcpy(outbuf+outpos, stackp, i); outpos += i; } if (outpos >= OBUFSIZ) { if (write(fdout, outbuf, outpos) != outpos) write_error(); outpos = 0; } stackp+= i; } while ((i = (de_stack-stackp)) > 0); } else { memcpy(outbuf+outpos, stackp, i); outpos += i; } } if ((code = free_ent) < maxmaxcode) /* Generate the new entry. */ { tab_prefixof(code) = (unsigned short)oldcode; tab_suffixof(code) = (char_type)finchar; free_ent = code+1; } oldcode = incode; /* Remember previous code. */ } bytes_in += rsize; } while (rsize > 0); if (outpos > 0 && write(fdout, outbuf, outpos) != outpos) write_error(); } void read_error() { fprintf(stderr, "\nread error on"); perror((ifname[0] != '\0') ? ifname : "stdin"); abort_compress(); } void write_error() { fprintf(stderr, "\nwrite error on"); perror((ofname[0] != '\0') ? ofname : "stdout"); abort_compress(); } void abort_compress() { if (remove_ofname) unlink(ofname); exit(1); } clipper-2.1/examples/cmaplocal.cpp0000644000374100011300000000431411041401234014172 00000000000000// Clipper app to calc local map moments /* Copyright 2003-2004 Kevin Cowtan & University of York all rights reserved */ #include #include #include int main( int argc, char** argv ) { CCP4Program prog( "cmaplocal", "0.1", "$Date: 2004/05/01" ); // defaults clipper::String ipfile = "NONE"; clipper::String opfile1 = "NONE"; clipper::String opfile2 = "NONE"; double statsrad = -1.0; // command input CCP4CommandInput args( argc, argv, true ); int arg = 0; while ( ++arg < args.size() ) { if ( args[arg] == "-mapin" ) { if ( ++arg < args.size() ) ipfile = args[arg]; } else if ( args[arg] == "-mapout-1" ) { if ( ++arg < args.size() ) opfile1 = args[arg]; } else if ( args[arg] == "-mapout-2" ) { if ( ++arg < args.size() ) opfile2 = args[arg]; } else if ( args[arg] == "-radius" ) { if ( ++arg < args.size() ) statsrad = clipper::String(args[arg]).f(); } else { std::cout << "Unrecognized:\t" << args[arg] << "\n"; args.clear(); } } if ( args.size() <= 1 ) { std::cout << "Usage: cmaplocal\n\t-mapin \n\t-mapout-1 \n\t-mapout-2 \n\t-radius \n"; exit(1); } clipper::CCP4MAPfile file; clipper::Xmap xmap; file.open_read( ipfile ); file.import_xmap( xmap ); file.close_read(); // make squared map clipper::Xmap lmom1( xmap ); clipper::Xmap lmom2( xmap ); for ( clipper::Xmap::Map_reference_index ix = lmom2.first(); !ix.last(); ix.next() ) lmom2[ix] = clipper::Util::sqr( lmom2[ix] ); // now calculate local mom1, local mom1 squared clipper::MapFilterFn_step fn( statsrad ); clipper::MapFilter_fft fltr( fn, 1.0, clipper::MapFilter_fft::Relative ); fltr( lmom1, lmom1 ); fltr( lmom2, lmom2 ); // calculate std deviation for ( clipper::Xmap::Map_reference_index ix = lmom1.first(); !ix.last(); ix.next() ) lmom2[ix] = sqrt( lmom2[ix] - clipper::Util::sqr( lmom1[ix] ) ); // output map file.open_write( opfile1 ); file.export_xmap( lmom1 ); file.close_write(); file.open_write( opfile2 ); file.export_xmap( lmom2 ); file.close_write(); } clipper-2.1/examples/COPYING0000644000374100011300000005750510736662170012622 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS clipper-2.1/examples/csigmaa.cpp0000644000374100011300000001116611223373666013671 00000000000000// Clipper app to do sigmaa calc /* Copyright 2003-2004 Kevin Cowtan & University of York all rights reserved */ #include #include #include extern "C" { #include } int main( int argc, char** argv ) { CCP4Program prog( "csigmaa", "0.1", "$Date: 2004/06/01" ); // defaults clipper::String title; clipper::String ipfile = "NONE"; clipper::String ipcolfo = "NONE"; clipper::String ipcolfc = "NONE"; clipper::String ipcolfree = "NONE"; clipper::String opfile = "sigmaa.mtz"; clipper::String opcol = "sigmaa"; int freeflag = 0; int n_refln = 1000; int n_param = 20; int verbose = 0; // command input CCP4CommandInput args( argc, argv, true ); int arg = 0; while ( ++arg < args.size() ) { if ( args[arg] == "-title" ) { if ( ++arg < args.size() ) title = args[arg]; } else if ( args[arg] == "-mtzin" ) { if ( ++arg < args.size() ) ipfile = args[arg]; } else if ( args[arg] == "-mtzout" ) { if ( ++arg < args.size() ) opfile = args[arg]; } else if ( args[arg] == "-colin-fo" ) { if ( ++arg < args.size() ) ipcolfo = args[arg]; } else if ( args[arg] == "-colin-fc" ) { if ( ++arg < args.size() ) ipcolfc = args[arg]; } else if ( args[arg] == "-colin-free" ) { if ( ++arg < args.size() ) ipcolfree = args[arg]; } else if ( args[arg] == "-colout" ) { if ( ++arg < args.size() ) opcol = args[arg]; } else if ( args[arg] == "-free-flag" ) { if ( ++arg < args.size() ) freeflag = clipper::String(args[arg]).i(); } else if ( args[arg] == "-num-reflns" ) { if ( ++arg < args.size() ) n_refln = clipper::String(args[arg]).i(); } else if ( args[arg] == "-num-params" ) { if ( ++arg < args.size() ) n_param = clipper::String(args[arg]).i(); } else if ( args[arg] == "-verbose" ) { if ( ++arg < args.size() ) verbose = clipper::String(args[arg]).i(); } else { std::cout << "Unrecognized:\t" << args[arg] << "\n"; args.clear(); } } if ( args.size() <= 1 ) { std::cout << "Usage: csigmaa\n\t-mtzin \n\t-mtzout \n\t-colin-fo \n\t-colin-fc \n\t-colin-free \n\t-colout \n\t-free-flag \n\t-num-reflns \n\t-num-params \nCalculate HL coeffs from Fo and Fc.\n"; exit(1); } // make data objects clipper::CCP4MTZfile mtzin, mtzout; clipper::HKL_info hkls; typedef clipper::HKL_data_base::HKL_reference_index HRI; mtzin.set_column_label_mode( clipper::CCP4MTZfile::Legacy ); mtzin.open_read( ipfile ); mtzin.import_hkl_info( hkls ); clipper::HKL_data fo( hkls ); clipper::HKL_data fc( hkls ); clipper::HKL_data free( hkls ); mtzin.import_hkl_data( fo, ipcolfo ); mtzin.import_hkl_data( fc, ipcolfc ); if ( ipcolfree != "NONE" ) mtzin.import_hkl_data( free, ipcolfree ); if ( opcol[0] != '/' ) opcol = mtzin.assigned_paths()[0].notail()+"/"+opcol; mtzin.close_read(); // flag reflections clipper::HKL_data fb( hkls ), fd( hkls ); clipper::HKL_data phiw( hkls ); clipper::HKL_data flag( hkls ); for ( HRI ih = flag.first(); !ih.last(); ih.next() ) if ( !fo[ih].missing() && (free[ih].missing()||free[ih].flag()==freeflag) ) flag[ih].flag() = clipper::SFweight_spline::BOTH; else flag[ih].flag() = clipper::SFweight_spline::NONE; // do sigmaa calc clipper::SFweight_spline sfw( n_refln, n_param ); sfw( fb, fd, phiw, fo, fc, flag ); // calc abcd clipper::HKL_data abcd( hkls ); abcd.compute( phiw, clipper::data32::Compute_abcd_from_phifom() ); // output data mtzout.open_append( ipfile, opfile ); mtzout.export_hkl_data( abcd, opcol ); mtzout.export_hkl_data( fb, opcol+"_BEST" ); mtzout.export_hkl_data( fd, opcol+"_DIFF" ); mtzout.close_append(); // DIAGNOSTIC OUTPUT if ( verbose > 1 ) { std::cout << "\nNumber of spline params: " << sfw.params_scale().size() << "\n"; clipper::BasisFn_spline basisfn( hkls, sfw.params_scale().size(), 1.0 ); printf("\n $TABLE: Sigmaa statistics :\n $GRAPHS:scale vs resolution:N:1,2:\n :lack of closure vs resolution:N:1,3:\n $$\n 1/resol^2 scale lack_of_closure $$\n $$\n"); for ( int i = 0; i <= 20.0; i++ ) { double s = hkls.resolution().invresolsq_limit()*double(i)/20.0; printf( "%6.3f %12.3f %12.3f\n", s, basisfn.f_s(s,sfw.params_scale()), basisfn.f_s(s,sfw.params_error()) ); } printf(" $$\n"); } } clipper-2.1/examples/convert2mtz.cpp0000644000374100011300000004776211050270035014555 00000000000000// clipper CNS->MTZ utility /* (C) 2007 Kevin Cowtan */ #include #include #include #include #include "convert2mtz.h" int main( int argc, char** argv ) { CCP4Program prog( "convert2mtz", "0.4", "$Date: 2007/03/30" ); // defaults clipper::String title; clipper::String ipfile = "NONE"; clipper::String opfile = "NONE"; clipper::String ccell = "NONE"; clipper::String cspgr = "NONE"; clipper::String ipfilepdb = "NONE"; clipper::String colin = "NONE"; bool complete = true; bool anom = false; int seed = 54321; int verbose = 0; // command input CCP4CommandInput args( argc, argv, true ); int arg = 0; while ( ++arg < args.size() ) { if ( args[arg] == "-title" ) { if ( ++arg < args.size() ) title = args[arg]; } else if ( args[arg] == "-hklin" || args[arg] == "-cnsin" ) { if ( ++arg < args.size() ) ipfile = args[arg]; } else if ( args[arg] == "-mtzout" ) { if ( ++arg < args.size() ) opfile = args[arg]; } else if ( args[arg] == "-cell" ) { if ( ++arg < args.size() ) ccell = args[arg]; } else if ( args[arg] == "-spacegroup" ) { if ( ++arg < args.size() ) cspgr = args[arg]; } else if ( args[arg] == "-pdbin" ) { if ( ++arg < args.size() ) ipfilepdb = args[arg]; } else if ( args[arg] == "-colin" ) { if ( ++arg < args.size() ) colin = args[arg]; } else if ( args[arg] == "-anomalous" ) { anom = true; } else if ( args[arg] == "-no-complete" ) { complete = false; } else if ( args[arg] == "-seed" ) { if ( ++arg < args.size() ) seed = clipper::String(args[arg]).i(); } else if ( args[arg] == "-verbose" ) { if ( ++arg < args.size() ) verbose = clipper::String(args[arg]).i(); } else { std::cout << "Unrecognized:\t" << args[arg] << "\n"; args.clear(); } } if ( args.size() <= 1 ) { std::cout << "Usage: convert2mtz\n\t-hklin [COMPULSORY]\n\t-mtzout \n\t-cell a,b,c,a,b,g\n\t-spacegroup \n\t-pdbin \n\t-anomalous\n\t-no-complete\n\t-colin \n\t-seed \nConvert formatted reflection file to MTZ.\nCell and spacegroup may be specified directly or by providing a PDB file.\nFor CNS files, column labels and anomalous are detected automatically.\nFor other files (e.g. Shelx/XtalView), give -colin.\n"; exit(1); } if ( ipfilepdb == "NONE" && ccell == "NONE" ) { std::cout << "Missing cell."; exit(1); } if ( ipfilepdb == "NONE" && cspgr == "NONE" ) { std::cout << "Missing spacegroup."; exit(1); } // set defaults srand( seed ); if ( opfile == "NONE" ) { opfile = ipfile; int ldot = int(opfile.rfind(".")); if ( ldot != int(std::string::npos) ) opfile = opfile.substr(0,ldot); opfile = opfile + ".mtz"; } // set crystal info clipper::Cell cell; clipper::Spacegroup spgr; clipper::Resolution reso; if ( ipfilepdb != "NONE" ) { clipper::MMDBManager mmdb; mmdb.ReadCoorFile( (char*)ipfilepdb.c_str() ); spgr = mmdb.spacegroup(); cell = mmdb.cell(); } else { double cd[] = { 100.0, 100.0, 100.0, 90.0, 90.0, 90.0 }; std::vector cellx = ccell.split( ", " ); for ( int i = 0; i < cellx.size(); i++ ) cd[i] = cellx[i].f(); clipper::Cell_descr celld( cd[0], cd[1], cd[2], cd[3], cd[4], cd[5] ); clipper::Spgr_descr spgrd( cspgr ); cell = clipper::Cell( celld ); spgr = clipper::Spacegroup( spgrd ); } // read input file std::vector words; std::ifstream file( ipfile.c_str() ); int lvl = 0; std::string word; while ( file.good() ) { char c; file.get( c ); if ( c == '{' ) lvl++; if ( lvl == 0 ) { if ( isspace(c) || c == '=' ) { if ( word.length() != 0 ) { words.push_back( word ); word = ""; } } else { word = word + c; } } if ( c == '}' ) lvl--; } file.close(); // file info int nref = 0; std::vector cols, typs; std::vector > > grps; cols.push_back( "H" ); cols.push_back( "K" ); cols.push_back( "L" ); typs.push_back( "H" ); typs.push_back( "H" ); typs.push_back( "H" ); std::vector vals; // loop over words and read all info from file int pos = 0; // header section while ( pos < words.size() ) { // CNS headers (irrelevent for non-CNS files) if ( words[pos].substr(0,4) == "NREF" ) { if ( ++pos < words.size() ) nref = clipper::String(words[pos]).i(); } else if ( words[pos].substr(0,4) == "ANOM" ) { if ( ++pos < words.size() ) anom = ( words[pos][0] == 'T' ); } else if ( words[pos].substr(0,4) == "HERM" ) { if ( ++pos < words.size() ) anom = ( words[pos][0] == 'F' ); } else if ( words[pos].substr(0,4) == "DECL" ) { // COLUMN DECLARATIONS ++pos; std::string col, dom, typ; while ( pos < words.size() ) { if ( words[pos] == "END" ) { if ( dom.substr(0,4) == "RECI" ) { if ( typ.substr(0,4) == "INTE" ) { cols.push_back( col ); typs.push_back( "I" ); } else if ( typ.substr(0,4) == "REAL" ) { cols.push_back( col ); typs.push_back( "R" ); } else if ( typ.substr(0,4) == "COMP" ) { cols.push_back( col ); typs.push_back( "F" ); cols.push_back( col+".phase" ); typs.push_back( "P" ); } } break; } else if ( words[pos].substr(0,4) == "NAME" ) { if ( ++pos < words.size() ) col = words[pos]; } else if ( words[pos].substr(0,4) == "DOMA" ) { if ( ++pos < words.size() ) dom = words[pos]; } else if ( words[pos].substr(0,4) == "TYPE" ) { if ( ++pos < words.size() ) typ = words[pos]; } ++pos; } } else if ( words[pos].substr(0,4) == "GROU" ) { // GROUP DECLARATIONS ++pos; std::string gtyp; std::vector gcol; while ( pos < words.size() ) { if ( words[pos] == "END" ) { grps.push_back( std::pair >( gtyp, gcol ) ); break; } else if ( words[pos].substr(0,4) == "TYPE" ) { if ( ++pos < words.size() ) gtyp = words[pos]; } else if ( words[pos].substr(0,4) == "OBJE" ) { if ( ++pos < words.size() ) gcol.push_back( words[pos] ); } ++pos; } } else { if ( words[pos].find_first_not_of("0123456789.-") == std::string::npos ) { vals.push_back( clipper::String(words[pos]).f() ); } } ++pos; } // Now do group assignments for ( int g = 0; g < grps.size(); g++ ) { if ( grps[g].first == "HL" ) { for ( int c = 0; c < grps[g].second.size(); c++ ) { for ( int i = 0; i < cols.size(); i++ ) { if ( cols[i] == grps[g].second[c] ) typs[i] = "A"; } } } } // if columns were input, they override the headers if ( colin != "NONE" ) { cols.clear(); typs.clear(); cols.push_back( "H" ); cols.push_back( "K" ); cols.push_back( "L" ); typs.push_back( "H" ); typs.push_back( "H" ); typs.push_back( "H" ); std::vector cin = colin.split(" ,"); for ( int i = 0; i < cin.size(); i++ ) { cols.push_back( cin[i] ); typs.push_back( "R" ); } nref = vals.size() / cols.size(); } // check data length int ncol = cols.size(); if ( ncol*nref != vals.size() ) { std::cout << "Error: data length does not match number of reflections.\n"; exit(1); } // column assignment heuristics for ( int i = 3; i < ncol; i++ ) { std::string c; for ( int j = 0; j < cols[i].length(); j++ ) c += toupper( cols[i][j] ); if ( typs[i] == "R" ) { if ( cols[i].find("SIG") != std::string::npos ) typs[i] = "Q"; else if ( cols[i].find("FOM") != std::string::npos ) typs[i] = "W"; else if ( cols[i].find("HLA") != std::string::npos ) typs[i] = "A"; else if ( cols[i].find("FREE")!= std::string::npos ) typs[i] = "I"; else if ( cols[i][0] == 'F' ) typs[i] = "F"; else if ( cols[i][0] == 'E' ) typs[i] = "E"; else if ( cols[i][0] == 'I' ) typs[i] = "J"; else if ( cols[i][0] == 'P' ) typs[i] = "P"; else if ( cols[i][0] == 'S' ) typs[i] = "Q"; else if ( cols[i][0] == 'W' ) typs[i] = "W"; else if ( cols[i][0] == 'M' ) typs[i] = "W"; else if ( cols[i][0] == 'A' ) typs[i] = "A"; else if ( cols[i][0] == 'B' ) typs[i] = "A"; else if ( cols[i][0] == 'C' ) typs[i] = "A"; else if ( cols[i][0] == 'D' ) typs[i] = "A"; else if ( cols[i][0] == 'H' ) typs[i] = "A"; } } // post-assignment diagnostics std::cout << std::endl << "Columns found:" << std::endl; for ( int i = 0; i < cols.size(); i++ ) { std::cout << " " << i << " " << cols[i] << " " << typs[i] << std::endl; } std::cout << "Note: these do not represent the final MTZ column types" << std::endl << std::endl; // get reflections std::set hkl_set; const clipper::HKL zero( 0, 0, 0 ); for ( int i = 0; i < nref; i++ ) { clipper::HKL hkl( Util::intr(vals[i*ncol ]), Util::intr(vals[i*ncol+1]), Util::intr(vals[i*ncol+2]) ); clipper::HKL asu; if ( hkl != zero ) { for ( int s = 0; s < spgr.num_primops(); s++ ) { asu = hkl.transform( spgr.symop(s) ); if ( spgr.recip_asu( asu ) ) break; asu = -asu; if ( spgr.recip_asu( asu ) ) break; } hkl_set.insert( asu ); } } std::vector hkl_list( hkl_set.begin(), hkl_set.end() ); // get resolution double smax = 0.0; for ( int i = 0; i < hkl_list.size(); i++ ) { double s = hkl_list[i].invresolsq( cell ); if ( s > smax ) smax = s; } reso = clipper::Resolution( 0.999999/sqrt(smax) ); // prepare data arrays clipper::HKL_info hkls( spgr, cell, reso ); if ( complete ) { hkl_list.clear(); clipper::HKL_info hkl0( spgr, cell, reso, true ); for ( int i = 0; i < hkl0.num_reflections(); i++ ) if ( hkl0.hkl_of(i) != zero ) hkl_list.push_back( hkl0.hkl_of(i) ); } hkls.add_hkl_list( hkl_list ); std::vector opcols; std::vector > datai; std::vector > dataf; std::vector > dataiano; std::vector > datafano; std::vector > datasigiano; std::vector > datasigfano; std::vector > datae; std::vector > datasig; std::vector > dataphi; std::vector > datafom; std::vector > dataabcd; std::vector > dataflag; clipper::HKL_data datafree(hkls); // fill data arrays // loop over the columns bool friedel; int isym; for ( int col = 3; col < ncol; col++ ) { // I or Iano if ( typs[col] == "J" ) { if ( !anom ) { clipper::HKL_data data( hkls ); for ( int ref = 0; ref < nref; ref++ ) { clipper::HKL hkl( Util::intr(vals[ref*ncol ]), Util::intr(vals[ref*ncol+1]), Util::intr(vals[ref*ncol+2]) ); dataI dat( vals[ref*ncol+col] ); data.set_data( hkl, dat ); } datai.push_back( data ); opcols.push_back("i"+cols[col]); } else { clipper::HKL_data data( hkls ); for ( int ref = 0; ref < nref; ref++ ) { clipper::HKL hkl( Util::intr(vals[ref*ncol ]), Util::intr(vals[ref*ncol+1]), Util::intr(vals[ref*ncol+2]) ); clipper::HKL hkl1 = hkls.find_sym( hkl, isym, friedel ); int index = hkls.index_of( hkl1 ); float v = vals[ref*ncol+col]; if ( friedel ) data[index] = dataIano( data[index].I_pl(), v ); else data[index] = dataIano( v, data[index].I_mi() ); } dataiano.push_back( data ); opcols.push_back("I"+cols[col]+"+,"+cols[col]+"-"); } } // F or Fano if ( typs[col] == "F" ) { if ( !anom ) { clipper::HKL_data data( hkls ); for ( int ref = 0; ref < nref; ref++ ) { clipper::HKL hkl( Util::intr(vals[ref*ncol ]), Util::intr(vals[ref*ncol+1]), Util::intr(vals[ref*ncol+2]) ); dataF dat( vals[ref*ncol+col] ); data.set_data( hkl, dat ); } dataf.push_back( data ); opcols.push_back("f"+cols[col]); } else { clipper::HKL_data data( hkls ); for ( int ref = 0; ref < nref; ref++ ) { clipper::HKL hkl( Util::intr(vals[ref*ncol ]), Util::intr(vals[ref*ncol+1]), Util::intr(vals[ref*ncol+2]) ); clipper::HKL hkl1 = hkls.find_sym( hkl, isym, friedel ); int index = hkls.index_of( hkl1 ); float v = vals[ref*ncol+col]; if ( friedel ) data[index] = dataFano( data[index].F_pl(), v ); else data[index] = dataFano( v, data[index].F_mi() ); } datafano.push_back( data ); opcols.push_back("F"+cols[col]+"+,"+cols[col]+"-"); } } // sigF or sigFano or sigIano if ( typs[col] == "Q" ) { if ( !anom ) { clipper::HKL_data data( hkls ); for ( int ref = 0; ref < nref; ref++ ) { clipper::HKL hkl( Util::intr(vals[ref*ncol ]), Util::intr(vals[ref*ncol+1]), Util::intr(vals[ref*ncol+2]) ); dataSig dat( vals[ref*ncol+col] ); data.set_data( hkl, dat ); } datasig.push_back( data ); opcols.push_back("S"+cols[col]); } else { if ( typs[col-1] == "J" ) { clipper::HKL_data data( hkls ); for ( int ref = 0; ref < nref; ref++ ) { clipper::HKL hkl( Util::intr(vals[ref*ncol ]), Util::intr(vals[ref*ncol+1]), Util::intr(vals[ref*ncol+2]) ); clipper::HKL hkl1 = hkls.find_sym( hkl, isym, friedel ); int index = hkls.index_of( hkl1 ); float v = vals[ref*ncol+col]; if ( friedel ) data[index] = dataSigIano(data[index].sigI_pl(), v); else data[index] = dataSigIano(v, data[index].sigI_mi()); } datasigiano.push_back( data ); opcols.push_back("1"+cols[col]+"+,"+cols[col]+"-"); } else { clipper::HKL_data data( hkls ); for ( int ref = 0; ref < nref; ref++ ) { clipper::HKL hkl( Util::intr(vals[ref*ncol ]), Util::intr(vals[ref*ncol+1]), Util::intr(vals[ref*ncol+2]) ); clipper::HKL hkl1 = hkls.find_sym( hkl, isym, friedel ); int index = hkls.index_of( hkl1 ); float v = vals[ref*ncol+col]; if ( friedel ) data[index] = dataSigFano(data[index].sigF_pl(), v); else data[index] = dataSigFano(v, data[index].sigF_mi()); } datasigfano.push_back( data ); opcols.push_back("2"+cols[col]+"+,"+cols[col]+"-"); } } } // E if ( typs[col] == "E" ) { clipper::HKL_data data( hkls ); for ( int ref = 0; ref < nref; ref++ ) { clipper::HKL hkl( Util::intr(vals[ref*ncol ]), Util::intr(vals[ref*ncol+1]), Util::intr(vals[ref*ncol+2]) ); dataE dat( vals[ref*ncol+col] ); data.set_data( hkl, dat ); } datae.push_back( data ); opcols.push_back("E"+cols[col]); } // Phase if ( typs[col] == "P" ) { clipper::HKL_data data( hkls ); for ( int ref = 0; ref < nref; ref++ ) { clipper::HKL hkl( Util::intr(vals[ref*ncol ]), Util::intr(vals[ref*ncol+1]), Util::intr(vals[ref*ncol+2]) ); dataPhi dat( Util::d2rad(vals[ref*ncol+col]) ); data.set_data( hkl, dat ); } dataphi.push_back( data ); opcols.push_back("P"+cols[col]); } // FOM if ( typs[col] == "W" ) { clipper::HKL_data data( hkls ); for ( int ref = 0; ref < nref; ref++ ) { clipper::HKL hkl( Util::intr(vals[ref*ncol ]), Util::intr(vals[ref*ncol+1]), Util::intr(vals[ref*ncol+2]) ); dataFom dat( vals[ref*ncol+col] ); data.set_data( hkl, dat ); } datafom.push_back( data ); opcols.push_back("W"+cols[col]); } // Flag if ( typs[col] == "I" ) { clipper::HKL_data data( hkls ); for ( int ref = 0; ref < nref; ref++ ) { clipper::HKL hkl( Util::intr(vals[ref*ncol ]), Util::intr(vals[ref*ncol+1]), Util::intr(vals[ref*ncol+2]) ); dataFlag dat( Util::max(Util::intr(vals[ref*ncol+col]), 0 ) ); data.set_data( hkl, dat ); } dataflag.push_back( data ); opcols.push_back("X"+cols[col]); } // HL coeffs if ( typs[col] == "A" && col < ncol-3 ) { clipper::HKL_data data( hkls ); for ( int ref = 0; ref < nref; ref++ ) { clipper::HKL hkl( Util::intr(vals[ref*ncol ]), Util::intr(vals[ref*ncol+1]), Util::intr(vals[ref*ncol+2]) ); dataABCD dat( vals[ref*ncol+col ], vals[ref*ncol+col+1], vals[ref*ncol+col+2], vals[ref*ncol+col+3] ); data.set_data( hkl, dat ); } dataabcd.push_back( data ); opcols.push_back("A"+cols[col]+","+cols[col+1]+","+cols[col+2]+","+cols[col+3]); col += 3; } } // Check for Fano/Iano without sigFano/sigIano if ( dataiano.size() > 0 && datasigiano.size() == 0 ) { clipper::HKL_data data( hkls ); dataSigIano dat( 1.0, 1.0 ); data = dat; datasigiano.push_back( data ); opcols.push_back("1SIGI+,SIGI-"); } if ( datafano.size() > 0 && datasigfano.size() == 0 ) { clipper::HKL_data data( hkls ); dataSigFano dat( 1.0, 1.0 ); data = dat; datasigfano.push_back( data ); opcols.push_back("2SIGF+,SIGF-"); } // Free-R flag conversion typedef clipper::HKL_info::HKL_reference_index HRI; if ( dataflag.size() > 0 ) { int n, n0, n1, fl, nfl; n = n0 = n1 = 0; for ( HRI ih = dataflag[0].first(); !ih.last(); ih.next() ) { if ( dataflag[0][ih].flag() >= 0 ) n++; if ( dataflag[0][ih].flag() == 0 ) n0++; if ( dataflag[0][ih].flag() == 1 ) n1++; } fl = 1; nfl = n1; // conventional CNS flag definition if ( n0 < n1/2 ) { fl = 0; nfl = n0; } // SHELX flag definition // generate CCP4 free flags int nfree = Util::intr( double(n) / double(nfl) ); for ( HRI ih = dataflag[0].first(); !ih.last(); ih.next() ) if ( dataflag[0][ih].flag() == fl ) // free: add to free set datafree[ih] = dataFlag( 0 ); else // missing or work: pick a working set datafree[ih] = dataFlag( rand()%(nfree-1) + 1 ); } else { int nfree = nref / 1000; if ( nfree < 10 ) nfree = 10; if ( nfree > 20 ) nfree = 20; for ( HRI ih = datafree.first(); !ih.last(); ih.next() ) datafree[ih] = dataFlag( rand()%nfree ); } // tidy phases for ( int i = 0; i < dataphi.size(); i++ ) for ( HRI ih = dataphi[i].first(); !ih.last(); ih.next() ) dataphi[i][ih].phi() = clipper::Util::mod( dataphi[i][ih].phi(), clipper::Util::twopi() ); // export clipper::CCP4MTZfile mtzout; mtzout.open_write( opfile ); mtzout.export_hkl_info( hkls ); for ( int i = 0; i < opcols.size(); i++ ) { // game name clipper::String ty = opcols[i].substr(0,1); clipper::String nm = "/*/*/["+opcols[i].substr(1)+"]"; // count which column to export int pos = 0; for ( int j = 0; j < i; j++ ) if ( opcols[i][0] == opcols[j][0] ) pos++; // and export if ( ty == "I" ) mtzout.export_hkl_data( dataiano[pos], nm ); if ( ty == "1" ) mtzout.export_hkl_data( datasigiano[pos], nm ); if ( ty == "F" ) mtzout.export_hkl_data( datafano[pos], nm ); if ( ty == "2" ) mtzout.export_hkl_data( datasigfano[pos], nm ); if ( ty == "i" ) mtzout.export_hkl_data( datai[pos], nm ); if ( ty == "f" ) mtzout.export_hkl_data( dataf[pos], nm ); if ( ty == "E" ) mtzout.export_hkl_data( datae[pos], nm ); if ( ty == "S" ) mtzout.export_hkl_data( datasig[pos], nm ); if ( ty == "P" ) mtzout.export_hkl_data( dataphi[pos], nm ); if ( ty == "W" ) mtzout.export_hkl_data( datafom[pos], nm ); if ( ty == "X" ) mtzout.export_hkl_data( dataflag[pos], nm ); if ( ty == "A" ) mtzout.export_hkl_data( dataabcd[pos], nm ); } mtzout.export_hkl_data( datafree, "/*/*/[FreeF_flag]" ); mtzout.close_write(); // output std::cout << ( anom ? "Collecting HKL and -HKL" : "Not collecting HKL and -HKL - anomalous data will be lost." ) << std::endl; std::cout << ( complete ? "Inserting missing reflections" : "Not inserting missing reflections" ) << std::endl; std::cout << "Number of reflections input : " << nref << std::endl; std::cout << "Number of reflections output: " << hkls.num_reflections() << std::endl; } clipper-2.1/examples/convert2mtz.h0000644000374100011300000002622510736662171014231 00000000000000// clipper CNS->MTZ utility /* (C) 2007 Kevin Cowtan */ #include #include #include using clipper::ftype; using clipper::xtype; using clipper::String; using clipper::Datatype_base; using clipper::Util; //! Reflection data type: I class dataI : private Datatype_base { public: dataI() { Util::set_null(i_); } dataI( const float& i ) : i_(i) {} void set_null() { Util::set_null(i_); } static String type() { return ""; } void friedel() {} void shift_phase(const ftype& dphi) {} bool missing() const { return (Util::is_nan(i_)); } static int data_size() { return 1; } static String data_names() { return "I"; } void data_export( xtype array[] ) const { array[0] = I(); } void data_import( const xtype array[] ) { I() = array[0]; } void scale(const ftype& s) { i_ *= s*s; } // accessors const float& I() const { return i_; } // #include #include extern "C" { #include } int main( int argc, char** argv ) { CCP4Program prog( "caniso", "0.1", "$Date: 2007/03/01" ); // defaults enum ANISO { NONE, FOBS, FCAL }; clipper::String title; clipper::String ipfile = "NONE"; clipper::String ipcolfo = "NONE"; clipper::String opfile = "aniso.mtz"; clipper::String opcol = "aniso"; double resflt = -1.0; // command input CCP4CommandInput args( argc, argv, true ); int arg = 0; while ( ++arg < args.size() ) { if ( args[arg] == "-title" ) { if ( ++arg < args.size() ) title = args[arg]; } else if ( args[arg] == "-mtzin" ) { if ( ++arg < args.size() ) ipfile = args[arg]; } else if ( args[arg] == "-colin-fo" ) { if ( ++arg < args.size() ) ipcolfo = args[arg]; } else if ( args[arg] == "-mtzout" ) { if ( ++arg < args.size() ) opfile = args[arg]; } else if ( args[arg] == "-colout" ) { if ( ++arg < args.size() ) opcol = args[arg]; } else if ( args[arg] == "-resolution-filter" ) { if ( ++arg < args.size() ) resflt = clipper::String(args[arg]).f(); } else { std::cout << "Unrecognized:\t" << args[arg] << "\n"; args.clear(); } } if ( args.size() <= 1 ) { std::cout << "Usage: caniso\n\t-mtzin \n\t-colin-fo \n\t-mtzout \n\t-colout \nAnisotropy correction.\n"; exit(1); } // make data objects clipper::CCP4MTZfile mtzin, mtzout; clipper::MTZcrystal cxtl; clipper::HKL_info hkls; typedef clipper::HKL_data_base::HKL_reference_index HRI; using clipper::data32::F_sigF; mtzin.set_column_label_mode( clipper::CCP4MTZfile::Legacy ); // open file mtzin.open_read( ipfile ); mtzin.import_hkl_info( hkls ); mtzin.import_crystal( cxtl, ipcolfo+".F_sigF.F" ); clipper::HKL_data fo( hkls, cxtl ); mtzin.import_hkl_data( fo, ipcolfo ); if ( opcol[0] != '/' ) opcol = mtzin.assigned_paths()[0].notail()+"/"+opcol; mtzin.close_read(); // scale structure factors clipper::SFscale_aniso::TYPE F = clipper::SFscale_aniso::F; clipper::SFscale_aniso::MODE M = clipper::SFscale_aniso::NORMAL; clipper::SFscale_aniso sfscl( 3.0, M ); sfscl( fo, resflt, 12 ); std::cout << "\nAnisotropic scaling:\n" << sfscl.u_aniso_orth(F).format() << "\n"; // output data mtzout.open_append( ipfile, opfile ); mtzout.export_hkl_data( fo, opcol ); mtzout.close_append(); } clipper-2.1/examples/cecalc.cpp0000644000374100011300000000637011221530271013461 00000000000000// Clipper app to do E calc /* Copyright 2003-2004 Kevin Cowtan & University of York all rights reserved */ #include #include extern "C" { #include } int main( int argc, char** argv ) { CCP4Program prog( "cecalc", "0.1", "$Date: 2004/07/01" ); // defaults clipper::String title; clipper::String ipfile = "NONE"; clipper::String ipcolfo = "NONE"; clipper::String opfile = "ecalc.mtz"; clipper::String opcol = "ecalc"; const int nprm = 12; // command input CCP4CommandInput args( argc, argv, true ); int arg = 0; while ( ++arg < args.size() ) { if ( args[arg] == "-title" ) { if ( ++arg < args.size() ) title = args[arg]; } else if ( args[arg] == "-mtzin" ) { if ( ++arg < args.size() ) ipfile = args[arg]; } else if ( args[arg] == "-mtzout" ) { if ( ++arg < args.size() ) opfile = args[arg]; } else if ( args[arg] == "-colin-fo" ) { if ( ++arg < args.size() ) ipcolfo = args[arg]; } else if ( args[arg] == "-colout" ) { if ( ++arg < args.size() ) opcol = args[arg]; } else { std::cout << "Unrecognized:\t" << args[arg] << "\n"; args.clear(); } } if ( args.size() <= 1 ) { std::cout << "Usage: cecalc\n\t-mtzin \n\t-mtzout \n\t-colin-fo \n\t-colout \nCalculate E's from F's\n"; exit(1); } // make data objects clipper::CCP4MTZfile mtzin, mtzout; clipper::HKL_info hkls; typedef clipper::HKL_data_base::HKL_reference_index HRI; mtzin.set_column_label_mode( clipper::CCP4MTZfile::Legacy ); // open file mtzin.open_read( ipfile ); mtzin.import_hkl_info( hkls ); clipper::HKL_data fsig( hkls ); mtzin.import_hkl_data( fsig, ipcolfo ); if ( opcol[0] != '/' ) opcol = mtzin.assigned_paths()[0].notail()+"/"+opcol; mtzin.close_read(); // create initial E clipper::HKL_data esig( hkls ); esig.compute( fsig, clipper::data32::Compute_EsigE_from_FsigF() ); // calc E-scaling std::vector params_init( nprm, 1.0 ); clipper::BasisFn_spline basis_fo( esig, nprm, 2.0 ); clipper::TargetFn_scaleEsq target_fo( esig ); clipper::ResolutionFn escale( hkls, basis_fo, target_fo, params_init ); // apply E-scaling for ( HRI ih = esig.first(); !ih.last(); ih.next() ) if ( !esig[ih].missing() ) esig[ih].scale( sqrt( escale.f(ih) ) ); // output data mtzout.open_append( ipfile, opfile ); mtzout.export_hkl_data( esig, opcol ); mtzout.close_append(); // generate stats: double na, nc, sa, sc; na = nc = sa = sc = 0.0; for ( HRI ih = esig.first(); !ih.last(); ih.next() ) if ( !esig[ih].missing() ) { if ( ih.hkl_class().centric() ) { nc += 1.0; sc += esig[ih].E()*esig[ih].E(); } else { na += 1.0; sa += esig[ih].E()*esig[ih].E(); } } std::cout << "Number of reflections: " << clipper::Util::intr(na+nc) << " Mean E^2: " << (sa+sc)/clipper::Util::max(na+nc,1.0) << std::endl; std::cout << "Number of acentrics : " << clipper::Util::intr(na) << " Mean E^2: " << (sa)/clipper::Util::max(na,1.0) << std::endl; std::cout << "Number of centrics : " << clipper::Util::intr(nc) << " Mean E^2: " << (sc)/clipper::Util::max(nc,1.0) << std::endl; } clipper-2.1/examples/Makefile.in0000644000374100011300000011057411372264333013624 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am, passed: examples, extracted subdir: examples # in dir /home/cowtan/clipper-autoconf/clipper-2.1/examples VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = caniso$(EXEEXT) cecalc$(EXEEXT) cfft$(EXEEXT) \ chltofom$(EXEEXT) cinvfft$(EXEEXT) clipper_test$(EXEEXT) \ cmakereference$(EXEEXT) cmaplocal$(EXEEXT) \ cmodeltoseq$(EXEEXT) cncsfrommodel$(EXEEXT) \ convert2mtz$(EXEEXT) cpatterson$(EXEEXT) \ cphasecombine$(EXEEXT) cphasematch$(EXEEXT) csfcalc$(EXEEXT) \ csfcreate$(EXEEXT) csigmaa$(EXEEXT) csymmatch$(EXEEXT) \ maketestdata$(EXEEXT) TESTS = maketestdata$(EXEEXT) subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ccp4.m4 \ $(top_srcdir)/config/clipper.m4 $(top_srcdir)/config/fftw.m4 \ $(top_srcdir)/config/gpp4.m4 $(top_srcdir)/config/mmdb.m4 \ $(top_srcdir)/config/utimbuf.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_caniso_OBJECTS = caniso.$(OBJEXT) caniso_OBJECTS = $(am_caniso_OBJECTS) caniso_LDADD = $(LDADD) caniso_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_cecalc_OBJECTS = cecalc.$(OBJEXT) cecalc_OBJECTS = $(am_cecalc_OBJECTS) cecalc_LDADD = $(LDADD) cecalc_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_cfft_OBJECTS = cfft.$(OBJEXT) cfft_OBJECTS = $(am_cfft_OBJECTS) cfft_LDADD = $(LDADD) cfft_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_chltofom_OBJECTS = chltofom.$(OBJEXT) chltofom_OBJECTS = $(am_chltofom_OBJECTS) chltofom_LDADD = $(LDADD) chltofom_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_cinvfft_OBJECTS = cinvfft.$(OBJEXT) cinvfft_OBJECTS = $(am_cinvfft_OBJECTS) cinvfft_LDADD = $(LDADD) cinvfft_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_clipper_test_OBJECTS = clipper_test.$(OBJEXT) clipper_test_OBJECTS = $(am_clipper_test_OBJECTS) clipper_test_LDADD = $(LDADD) clipper_test_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_cmakereference_OBJECTS = cmakereference.$(OBJEXT) ftplib.$(OBJEXT) \ compress42.$(OBJEXT) cmakereference_OBJECTS = $(am_cmakereference_OBJECTS) cmakereference_LDADD = $(LDADD) cmakereference_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_cmaplocal_OBJECTS = cmaplocal.$(OBJEXT) cmaplocal_OBJECTS = $(am_cmaplocal_OBJECTS) cmaplocal_LDADD = $(LDADD) cmaplocal_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_cmodeltoseq_OBJECTS = cmodeltoseq.$(OBJEXT) cmodeltoseq_OBJECTS = $(am_cmodeltoseq_OBJECTS) cmodeltoseq_LDADD = $(LDADD) cmodeltoseq_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_cncsfrommodel_OBJECTS = cncsfrommodel.$(OBJEXT) cncsfrommodel_OBJECTS = $(am_cncsfrommodel_OBJECTS) cncsfrommodel_LDADD = $(LDADD) cncsfrommodel_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_convert2mtz_OBJECTS = convert2mtz.$(OBJEXT) convert2mtz_OBJECTS = $(am_convert2mtz_OBJECTS) convert2mtz_LDADD = $(LDADD) convert2mtz_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_cpatterson_OBJECTS = cpatterson.$(OBJEXT) cpatterson_OBJECTS = $(am_cpatterson_OBJECTS) cpatterson_LDADD = $(LDADD) cpatterson_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_cphasecombine_OBJECTS = cphasecombine.$(OBJEXT) cphasecombine_OBJECTS = $(am_cphasecombine_OBJECTS) cphasecombine_LDADD = $(LDADD) cphasecombine_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_cphasematch_OBJECTS = cphasematch.$(OBJEXT) cphasematch_OBJECTS = $(am_cphasematch_OBJECTS) cphasematch_LDADD = $(LDADD) cphasematch_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_csfcalc_OBJECTS = csfcalc.$(OBJEXT) csfcalc_OBJECTS = $(am_csfcalc_OBJECTS) csfcalc_LDADD = $(LDADD) csfcalc_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_csfcreate_OBJECTS = csfcreate.$(OBJEXT) csfcreate_OBJECTS = $(am_csfcreate_OBJECTS) csfcreate_LDADD = $(LDADD) csfcreate_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_csigmaa_OBJECTS = csigmaa.$(OBJEXT) csigmaa_OBJECTS = $(am_csigmaa_OBJECTS) csigmaa_LDADD = $(LDADD) csigmaa_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_csymmatch_OBJECTS = csymmatch.$(OBJEXT) csymmatch_OBJECTS = $(am_csymmatch_OBJECTS) csymmatch_LDADD = $(LDADD) csymmatch_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la am_maketestdata_OBJECTS = maketestdata.$(OBJEXT) maketestdata_OBJECTS = $(am_maketestdata_OBJECTS) maketestdata_LDADD = $(LDADD) maketestdata_DEPENDENCIES = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(caniso_SOURCES) $(cecalc_SOURCES) $(cfft_SOURCES) \ $(chltofom_SOURCES) $(cinvfft_SOURCES) $(clipper_test_SOURCES) \ $(cmakereference_SOURCES) $(cmaplocal_SOURCES) \ $(cmodeltoseq_SOURCES) $(cncsfrommodel_SOURCES) \ $(convert2mtz_SOURCES) $(cpatterson_SOURCES) \ $(cphasecombine_SOURCES) $(cphasematch_SOURCES) \ $(csfcalc_SOURCES) $(csfcreate_SOURCES) $(csigmaa_SOURCES) \ $(csymmatch_SOURCES) $(maketestdata_SOURCES) DIST_SOURCES = $(caniso_SOURCES) $(cecalc_SOURCES) $(cfft_SOURCES) \ $(chltofom_SOURCES) $(cinvfft_SOURCES) $(clipper_test_SOURCES) \ $(cmakereference_SOURCES) $(cmaplocal_SOURCES) \ $(cmodeltoseq_SOURCES) $(cncsfrommodel_SOURCES) \ $(convert2mtz_SOURCES) $(cpatterson_SOURCES) \ $(cphasecombine_SOURCES) $(cphasematch_SOURCES) \ $(csfcalc_SOURCES) $(csfcreate_SOURCES) $(csigmaa_SOURCES) \ $(csymmatch_SOURCES) $(maketestdata_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AR = @AR@ AR_FLAGS = @AR_FLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCP4_CXXFLAGS = @CCP4_CXXFLAGS@ CCP4_LIBS = @CCP4_LIBS@ CFLAGS = @CFLAGS@ CLIPPER_CCP4_DIR = @CLIPPER_CCP4_DIR@ CLIPPER_CIF_DIR = @CLIPPER_CIF_DIR@ CLIPPER_CNS_DIR = @CLIPPER_CNS_DIR@ CLIPPER_CONTRIB_DIR = @CLIPPER_CONTRIB_DIR@ CLIPPER_LT_VERSION = @CLIPPER_LT_VERSION@ CLIPPER_MINIMOL_DIR = @CLIPPER_MINIMOL_DIR@ CLIPPER_MMDB_DIR = @CLIPPER_MMDB_DIR@ CLIPPER_PHS_DIR = @CLIPPER_PHS_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_CXXFLAGS = @FFTW_CXXFLAGS@ FFTW_LIBS = @FFTW_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = $(FFTW_LIBS) $(CCP4_LIBS) $(MMDB_LIBS) $(CCTBX_LIBS) LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMDB_CXXFLAGS = @MMDB_CXXFLAGS@ MMDB_LIBS = @MMDB_LIBS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ caniso_SOURCES = caniso.cpp cecalc_SOURCES = cecalc.cpp cfft_SOURCES = cfft.cpp chltofom_SOURCES = chltofom.cpp cinvfft_SOURCES = cinvfft.cpp clipper_test_SOURCES = clipper_test.cpp cmakereference_SOURCES = cmakereference.cpp ftplib.h ftplib.c compress42.c cmaplocal_SOURCES = cmaplocal.cpp cmodeltoseq_SOURCES = cmodeltoseq.cpp cncsfrommodel_SOURCES = cncsfrommodel.cpp convert2mtz_SOURCES = convert2mtz.cpp convert2mtz.h cpatterson_SOURCES = cpatterson.cpp cphasecombine_SOURCES = cphasecombine.cpp cphasematch_SOURCES = cphasematch.cpp csfcalc_SOURCES = csfcalc.cpp csfcreate_SOURCES = csfcreate.cpp csigmaa_SOURCES = csigmaa.cpp csymmatch_SOURCES = csymmatch.cpp # no ftndemo maketestdata_SOURCES = maketestdata.cpp INCLUDES = -I.. $(FFTW_CXXFLAGS) $(MMDB_CXXFLAGS) $(CCP4_CXXFLAGS) $(CCTBX_CXXFLAGS) $(BOOST_CXXFLAGS) LDADD = \ $(top_builddir)/clipper/contrib/libclipper-contrib.la \ $(top_builddir)/clipper/ccp4/libclipper-ccp4.la \ $(top_builddir)/clipper/phs/libclipper-phs.la \ $(top_builddir)/clipper/cns/libclipper-cns.la \ $(top_builddir)/clipper/cif/libclipper-cif.la \ $(top_builddir)/clipper/minimol/libclipper-minimol.la \ $(top_builddir)/clipper/core/libclipper-core.la \ -lpthread all: all-am .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list caniso$(EXEEXT): $(caniso_OBJECTS) $(caniso_DEPENDENCIES) @rm -f caniso$(EXEEXT) $(CXXLINK) $(caniso_OBJECTS) $(caniso_LDADD) $(LIBS) cecalc$(EXEEXT): $(cecalc_OBJECTS) $(cecalc_DEPENDENCIES) @rm -f cecalc$(EXEEXT) $(CXXLINK) $(cecalc_OBJECTS) $(cecalc_LDADD) $(LIBS) cfft$(EXEEXT): $(cfft_OBJECTS) $(cfft_DEPENDENCIES) @rm -f cfft$(EXEEXT) $(CXXLINK) $(cfft_OBJECTS) $(cfft_LDADD) $(LIBS) chltofom$(EXEEXT): $(chltofom_OBJECTS) $(chltofom_DEPENDENCIES) @rm -f chltofom$(EXEEXT) $(CXXLINK) $(chltofom_OBJECTS) $(chltofom_LDADD) $(LIBS) cinvfft$(EXEEXT): $(cinvfft_OBJECTS) $(cinvfft_DEPENDENCIES) @rm -f cinvfft$(EXEEXT) $(CXXLINK) $(cinvfft_OBJECTS) $(cinvfft_LDADD) $(LIBS) clipper_test$(EXEEXT): $(clipper_test_OBJECTS) $(clipper_test_DEPENDENCIES) @rm -f clipper_test$(EXEEXT) $(CXXLINK) $(clipper_test_OBJECTS) $(clipper_test_LDADD) $(LIBS) cmakereference$(EXEEXT): $(cmakereference_OBJECTS) $(cmakereference_DEPENDENCIES) @rm -f cmakereference$(EXEEXT) $(CXXLINK) $(cmakereference_OBJECTS) $(cmakereference_LDADD) $(LIBS) cmaplocal$(EXEEXT): $(cmaplocal_OBJECTS) $(cmaplocal_DEPENDENCIES) @rm -f cmaplocal$(EXEEXT) $(CXXLINK) $(cmaplocal_OBJECTS) $(cmaplocal_LDADD) $(LIBS) cmodeltoseq$(EXEEXT): $(cmodeltoseq_OBJECTS) $(cmodeltoseq_DEPENDENCIES) @rm -f cmodeltoseq$(EXEEXT) $(CXXLINK) $(cmodeltoseq_OBJECTS) $(cmodeltoseq_LDADD) $(LIBS) cncsfrommodel$(EXEEXT): $(cncsfrommodel_OBJECTS) $(cncsfrommodel_DEPENDENCIES) @rm -f cncsfrommodel$(EXEEXT) $(CXXLINK) $(cncsfrommodel_OBJECTS) $(cncsfrommodel_LDADD) $(LIBS) convert2mtz$(EXEEXT): $(convert2mtz_OBJECTS) $(convert2mtz_DEPENDENCIES) @rm -f convert2mtz$(EXEEXT) $(CXXLINK) $(convert2mtz_OBJECTS) $(convert2mtz_LDADD) $(LIBS) cpatterson$(EXEEXT): $(cpatterson_OBJECTS) $(cpatterson_DEPENDENCIES) @rm -f cpatterson$(EXEEXT) $(CXXLINK) $(cpatterson_OBJECTS) $(cpatterson_LDADD) $(LIBS) cphasecombine$(EXEEXT): $(cphasecombine_OBJECTS) $(cphasecombine_DEPENDENCIES) @rm -f cphasecombine$(EXEEXT) $(CXXLINK) $(cphasecombine_OBJECTS) $(cphasecombine_LDADD) $(LIBS) cphasematch$(EXEEXT): $(cphasematch_OBJECTS) $(cphasematch_DEPENDENCIES) @rm -f cphasematch$(EXEEXT) $(CXXLINK) $(cphasematch_OBJECTS) $(cphasematch_LDADD) $(LIBS) csfcalc$(EXEEXT): $(csfcalc_OBJECTS) $(csfcalc_DEPENDENCIES) @rm -f csfcalc$(EXEEXT) $(CXXLINK) $(csfcalc_OBJECTS) $(csfcalc_LDADD) $(LIBS) csfcreate$(EXEEXT): $(csfcreate_OBJECTS) $(csfcreate_DEPENDENCIES) @rm -f csfcreate$(EXEEXT) $(CXXLINK) $(csfcreate_OBJECTS) $(csfcreate_LDADD) $(LIBS) csigmaa$(EXEEXT): $(csigmaa_OBJECTS) $(csigmaa_DEPENDENCIES) @rm -f csigmaa$(EXEEXT) $(CXXLINK) $(csigmaa_OBJECTS) $(csigmaa_LDADD) $(LIBS) csymmatch$(EXEEXT): $(csymmatch_OBJECTS) $(csymmatch_DEPENDENCIES) @rm -f csymmatch$(EXEEXT) $(CXXLINK) $(csymmatch_OBJECTS) $(csymmatch_LDADD) $(LIBS) maketestdata$(EXEEXT): $(maketestdata_OBJECTS) $(maketestdata_DEPENDENCIES) @rm -f maketestdata$(EXEEXT) $(CXXLINK) $(maketestdata_OBJECTS) $(maketestdata_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caniso.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cecalc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfft.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chltofom.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cinvfft.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clipper_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmakereference.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmaplocal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmodeltoseq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cncsfrommodel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compress42.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convert2mtz.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpatterson.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cphasecombine.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cphasematch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csfcalc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csfcreate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csigmaa.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csymmatch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftplib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maketestdata.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-binPROGRAMS clean-generic clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: clipper-2.1/examples/cmodeltoseq.cpp0000644000374100011300000000462011114746561014576 00000000000000// Clipper app to get sequence from model /* Copyright 2008 Kevin Cowtan & University of York all rights reserved */ #include #include #include #include extern "C" { #include } int main( int argc, char** argv ) { CCP4Program prog( "cmodeltoseq", "0.1", "$Date: 2008/06/09" ); // defaults clipper::String title; clipper::String ippdb = "NONE"; clipper::String opseq = "modeltoseq.seq"; // command input CCP4CommandInput args( argc, argv, true ); int arg = 0; while ( ++arg < args.size() ) { if ( args[arg] == "-title" ) { if ( ++arg < args.size() ) title = args[arg]; } else if ( args[arg] == "-pdbin" ) { if ( ++arg < args.size() ) ippdb = args[arg]; } else if ( args[arg] == "-seqout" ) { if ( ++arg < args.size() ) opseq = args[arg]; } else { std::cout << "Unrecognized:\t" << args[arg] << "\n"; args.clear(); } } if ( args.size() <= 1 ) { std::cout << "Usage: cmodeltoseq\n\t-pdbin \n\t-seqout \nGet sequence from model\n"; exit(1); } // atomic models const int mmdbflags = MMDBF_IgnoreBlankLines | MMDBF_IgnoreDuplSeqNum | MMDBF_IgnoreNonCoorPDBErrors | MMDBF_IgnoreRemarks; clipper::MMDBfile mmdbwrk; clipper::MiniMol molwrk; mmdbwrk.SetFlag( mmdbflags ); mmdbwrk.read_file( ippdb ); mmdbwrk.import_minimol( molwrk ); // assemble sequences const char rtype1[21] = { 'A', 'R', 'N', 'D', 'C', 'Q', 'E', 'G', 'H', 'I', 'L', 'K', 'M', 'F', 'P', 'S', 'T', 'W', 'Y', 'V', 'M'}; const char rtype3[21][4] = {"ALA","ARG","ASN","ASP","CYS","GLN","GLU","GLY","HIS","ILE", "LEU","LYS","MET","PHE","PRO","SER","THR","TRP","TYR","VAL", "MSE"}; const int ntype = sizeof( rtype1 ) / sizeof( rtype1[0] ); clipper::String seqfile = ""; for ( int c = 0; c < molwrk.size(); c++ ) { clipper::String id = molwrk[c].id(); clipper::String seq = ""; for ( int r = 0; r < molwrk[c].size(); r++ ) { char symbol = ' '; for ( int t = 0; t < ntype; t++ ) if ( molwrk[c][r].type() == rtype3[t] ) symbol = rtype1[t]; if ( symbol != ' ' ) seq = seq + symbol; } if ( seq.length() > 0 ) seqfile = seqfile + "> " + id + "\n\n" + seq + "\n\n"; } // write file std::ofstream file( opseq.c_str() ); file << seqfile; file.close(); } clipper-2.1/examples/cphasematch.cpp0000644000374100011300000003330711226573166014546 00000000000000// Clipper app to match origins and calculate phase statistics /* Copyright 2003-2004 Kevin Cowtan & University of York all rights reserved */ #include #include #include extern "C" { #include } int main( int argc, char** argv ) { CCP4Program prog( "cphasematch", "0.1", "$Date: 2004/06/01" ); // defaults clipper::String title; clipper::String ipfile = "NONE"; clipper::String ipcolfo = "NONE"; clipper::String ipcolhl1 = "NONE"; clipper::String ipcolpw1 = "NONE"; clipper::String ipcolfc1 = "NONE"; clipper::String ipcolhl2 = "NONE"; clipper::String ipcolpw2 = "NONE"; clipper::String ipcolfc2 = "NONE"; clipper::String opfile = "NONE"; clipper::String opcol = "phasematch"; int res_bins = 12; int fom_bins = 20; bool omatch = true; // command input CCP4CommandInput args( argc, argv, true ); int arg = 0; while ( ++arg < args.size() ) { if ( args[arg] == "-title" ) { if ( ++arg < args.size() ) title = args[arg]; } else if ( args[arg] == "-mtzin" ) { if ( ++arg < args.size() ) ipfile = args[arg]; } else if ( args[arg] == "-mtzout" ) { if ( ++arg < args.size() ) opfile = args[arg]; } else if ( args[arg] == "-colin-fo" ) { if ( ++arg < args.size() ) ipcolfo = args[arg]; } else if ( args[arg] == "-colin-hl-1" ) { if ( ++arg < args.size() ) ipcolhl1 = args[arg]; } else if ( args[arg] == "-colin-phifom-1" ) { if ( ++arg < args.size() ) ipcolpw1 = args[arg]; } else if ( args[arg] == "-colin-fc-1" ) { if ( ++arg < args.size() ) ipcolfc1 = args[arg]; } else if ( args[arg] == "-colin-hl-2" ) { if ( ++arg < args.size() ) ipcolhl2 = args[arg]; } else if ( args[arg] == "-colin-phifom-2" ) { if ( ++arg < args.size() ) ipcolpw2 = args[arg]; } else if ( args[arg] == "-colin-fc-2" ) { if ( ++arg < args.size() ) ipcolfc2 = args[arg]; } else if ( args[arg] == "-colout" ) { if ( ++arg < args.size() ) opcol = args[arg]; } else if ( args[arg] == "-resolution-bins" ) { if ( ++arg < args.size() ) res_bins = clipper::String(args[arg]).i(); } else if ( args[arg] == "-no-origin-hand" ) { omatch = false; } else { std::cout << "Unrecognized:\t" << args[arg] << "\n"; args.clear(); } } if ( args.size() <= 1 ) { std::cout << "Usage: cphasematch\n\t-mtzin \n\t-mtzout \n\t-colin-fo \n\t-colin-hl-1 \n\t-colin-phifom-1 \n\t-colin-fc-1 \n\t-colin-hl-2 \n\t-colin-phifom-2 \n\t-colin-fc-2 \n\t-colout \n\t-resolution-bins \n\t-no-origin-hand\nInput fo and any one of fc/phifom/abcd for each of dataset 1 and 2.\nIf mtzout is given, the second dataset is shifted to match the first.\n"; exit(1); } // make data objects clipper::CCP4MTZfile mtzin, mtzout; clipper::HKL_info hkls; clipper::HKL_info::HKL_reference_index ih; mtzin.set_column_label_mode( clipper::CCP4MTZfile::Legacy ); // actual work mtzin.open_read( ipfile ); mtzin.import_hkl_info( hkls ); clipper::HKL_data fsig( hkls ); clipper::HKL_data phiw1( hkls ); clipper::HKL_data abcd1( hkls ); clipper::HKL_data fphi1( hkls ); clipper::HKL_data phiw2( hkls ); clipper::HKL_data abcd2( hkls ); clipper::HKL_data fphi2( hkls ); mtzin.import_hkl_data( fsig, ipcolfo ); if ( ipcolhl1 != "NONE" ) mtzin.import_hkl_data( abcd1, ipcolhl1 ); if ( ipcolpw1 != "NONE" ) mtzin.import_hkl_data( phiw1, ipcolpw1 ); if ( ipcolfc1 != "NONE" ) mtzin.import_hkl_data( fphi1, ipcolfc1 ); if ( ipcolhl2 != "NONE" ) mtzin.import_hkl_data( abcd2, ipcolhl2 ); if ( ipcolpw2 != "NONE" ) mtzin.import_hkl_data( phiw2, ipcolpw2 ); if ( ipcolfc2 != "NONE" ) mtzin.import_hkl_data( fphi2, ipcolfc2 ); if ( opcol[0] != '/' ) opcol = mtzin.assigned_paths()[0].notail()+"/"+opcol; mtzin.close_read(); // fill in data for input 1 if ( ipcolhl1 != "NONE" ) { phiw1.compute( abcd1, clipper::data32::Compute_phifom_from_abcd() ); fphi1.compute( fsig, phiw1, clipper::data32::Compute_fphi_from_fsigf_phifom() ); } else if ( ipcolpw1 != "NONE" ) { abcd1.compute( phiw1, clipper::data32::Compute_abcd_from_phifom() ); fphi1.compute( fsig, phiw1, clipper::data32::Compute_fphi_from_fsigf_phifom() ); } else if ( ipcolfc1 != "NONE" ) { for ( ih = hkls.first(); !ih.last(); ih.next() ) { phiw1[ih].phi() = fphi1[ih].phi(); phiw1[ih].fom() = 0.9998; } abcd1.compute( phiw1, clipper::data32::Compute_abcd_from_phifom() ); } else { clipper::Message::message( clipper::Message_fatal( "Missing input 1" ) ); } // fill in data for input 2 if ( ipcolhl2 != "NONE" ) { phiw2.compute( abcd2, clipper::data32::Compute_phifom_from_abcd() ); fphi2.compute( fsig, phiw2, clipper::data32::Compute_fphi_from_fsigf_phifom() ); } else if ( ipcolpw2 != "NONE" ) { abcd2.compute( phiw2, clipper::data32::Compute_abcd_from_phifom() ); fphi2.compute( fsig, phiw2, clipper::data32::Compute_fphi_from_fsigf_phifom() ); } else if ( ipcolfc2 != "NONE" ) { for ( ih = hkls.first(); !ih.last(); ih.next() ) { phiw2[ih].phi() = fphi2[ih].phi(); phiw2[ih].fom() = 0.9998; } abcd2.compute( phiw2, clipper::data32::Compute_abcd_from_phifom() ); } else { clipper::Message::message( clipper::Message_fatal( "Missing input 2" ) ); } // crude mean phase error double sw1 = 0.0, sd1 = 0.0; for ( ih = hkls.first(); !ih.last(); ih.next() ) if ( !fphi1[ih].missing() && !fphi2[ih].missing() ) { double w = 1.0 / ih.hkl_class().epsilon(); sw1 += w; sd1 += w * acos( cos( fphi1[ih].phi() - fphi2[ih].phi() ) ); } // calculate phase shift bool invert( false ); clipper::Coord_frac x( 0.0, 0.0, 0.0 ); if ( omatch ) clipper::OriginMatch( invert, x, fphi1, fphi2 ); if ( invert ) std::cout << std::endl << " Change of hand : YES" << std::endl; else std::cout << std::endl << " Change of hand : NO" << std::endl; std::cout << " Change of origin: " << x.format() << std::endl << " (Shift is applied to second set of phases to match first)" << std::endl << std::endl; // shift phases for ( ih = hkls.first(); !ih.last(); ih.next() ) { clipper::Coord_reci_frac h( ih.hkl() ); const double hx = h * x; const double dphi = clipper::Util::twopi() * ( hx - floor(hx) ); if ( invert ) fphi2[ih].friedel(); if ( invert ) phiw2[ih].friedel(); if ( invert ) abcd2[ih].friedel(); fphi2[ih].shift_phase( dphi ); phiw2[ih].shift_phase( dphi ); abcd2[ih].shift_phase( dphi ); } // crude mean phase error double sw2 = 0.0, sd2 = 0.0; for ( ih = hkls.first(); !ih.last(); ih.next() ) if ( !fphi1[ih].missing() && !fphi2[ih].missing() ) { double w = 1.0 / ih.hkl_class().epsilon(); sw2 += w; sd2 += w * acos( cos( fphi1[ih].phi() - fphi2[ih].phi() ) ); } // verify the origin shift with crude stats std::cout << " Mean phase error before origin fixing: " << clipper::Util::rad2d( sd1/sw1 ) << std::endl; std::cout << " Mean phase error after origin fixing: " << clipper::Util::rad2d( sd2/sw2 ) << std::endl; // output shifted phases if required if ( opfile != "NONE" ) { mtzout.open_append( ipfile, opfile ); if ( ipcolhl2 != "NONE" ) { mtzout.export_hkl_data( abcd2, opcol ); } else if ( ipcolpw2 != "NONE" ) { mtzout.export_hkl_data( phiw2, opcol ); } else if ( ipcolfc2 != "NONE" ) { mtzout.export_hkl_data( fphi2, opcol ); } mtzout.close_append(); } // NOW DO DETAILED REFLECTION STATISTICS // calculate E scale factor const int nprm = 10; clipper::HKL_data esig( hkls ); esig.compute( fsig, clipper::data32::Compute_EsigE_from_FsigF() ); std::vector params_init( nprm, 1.0 ); clipper::BasisFn_binner basis_fo( hkls, nprm, 2.0 ); clipper::TargetFn_scaleEsq target_fo( esig ); clipper::ResolutionFn escale( hkls, basis_fo, target_fo, params_init ); // accumulate stats in bins and overall clipper::Resolution_ordinal resord; resord.init( hkls, 1.0 ); int res_binx = res_bins + 1; double res_scl = 0.9999 * double( res_bins ); std::vector snr(res_binx,0.0), swr(res_binx,0.0), sw1r(res_binx,0.0), sw2r(res_binx,0.0), sdr(res_binx,0.0), sdw1r(res_binx,0.0), sdw2r(res_binx,0.0), scr1(res_binx,0.0), scr2(res_binx,0.0), scr12(res_binx,0.0), scer1(res_binx,0.0), scer2(res_binx,0.0), scer12(res_binx,0.0), sww1(res_binx,0.0), sww2(res_binx,0.0), sdw1(res_binx,0.0), sdw2(res_binx,0.0); std::vector nrfl1(fom_bins,0.0), nrfl2(fom_bins,0.0), mcosd1(fom_bins,0.0), mcosd2(fom_bins,0.0); for ( ih = hkls.first(); !ih.last(); ih.next() ) if ( !fphi1[ih].missing() && !fphi2[ih].missing() ) { int bin = int( res_scl * resord.ordinal( ih.invresolsq() ) ); double w = 1.0 / ih.hkl_class().epsilon(); double cosd = cos( phiw1[ih].phi() - phiw2[ih].phi() ); double d = acos(cosd); snr[bin] += 1.0; swr[bin] += w; sw1r[bin] += w * phiw1[ih].fom(); sw2r[bin] += w * phiw2[ih].fom(); sdr[bin] += w * d; sdw1r[bin] += w * phiw1[ih].fom() * d; sdw2r[bin] += w * phiw2[ih].fom() * d; scr1[bin] += w * fphi1[ih].f() * fphi1[ih].f(); scr2[bin] += w * fphi2[ih].f() * fphi2[ih].f(); scr12[bin] += w * fphi1[ih].f() * fphi2[ih].f() * cosd; sww1[bin] += w * phiw1[ih].fom() * phiw1[ih].fom(); sww2[bin] += w * phiw2[ih].fom() * phiw2[ih].fom(); sdw1[bin] += w * phiw1[ih].fom() * d; sdw2[bin] += w * phiw2[ih].fom() * d; snr[res_bins] += 1.0; swr[res_bins] += w; sw1r[res_bins] += w * phiw1[ih].fom(); sw2r[res_bins] += w * phiw2[ih].fom(); sdr[res_bins] += w * d; sdw1r[res_bins] += w * phiw1[ih].fom() * d; sdw2r[res_bins] += w * phiw2[ih].fom() * d; scr1[res_bins] += w * fphi1[ih].f() * fphi1[ih].f(); scr2[res_bins] += w * fphi2[ih].f() * fphi2[ih].f(); scr12[res_bins] += w * fphi1[ih].f() * fphi2[ih].f() * cosd; sww1[res_bins] += w * phiw1[ih].fom() * phiw1[ih].fom(); sww2[res_bins] += w * phiw2[ih].fom() * phiw2[ih].fom(); sdw1[res_bins] += w * cosd * phiw1[ih].fom(); sdw2[res_bins] += w * cosd * phiw2[ih].fom(); w *= escale.f(ih); scer1[bin] += w * fphi1[ih].f() * fphi1[ih].f(); scer2[bin] += w * fphi2[ih].f() * fphi2[ih].f(); scer12[bin] += w * fphi1[ih].f() * fphi2[ih].f() * cosd; scer1[res_bins] += w * fphi1[ih].f() * fphi1[ih].f(); scer2[res_bins] += w * fphi2[ih].f() * fphi2[ih].f(); scer12[res_bins] += w * fphi1[ih].f() * fphi2[ih].f() * cosd; bin = clipper::Util::bound(0, int(double(fom_bins)*phiw1[ih].fom()), fom_bins-1); nrfl1[bin] += 1.0; mcosd1[bin] += cosd; bin = clipper::Util::bound(0, int(double(fom_bins)*phiw2[ih].fom()), fom_bins-1); nrfl2[bin] += 1.0; mcosd2[bin] += cosd; } // finalise statistics for ( int bin = 0; bin < res_binx; bin++ ) { // phase differences sdr[bin] /= clipper::Util::max( swr[bin], 1.0 ); sdw1r[bin] /= clipper::Util::max( sw1r[bin], 1.0 ); sdw2r[bin] /= clipper::Util::max( sw2r[bin], 1.0 ); // mean foms sw1r[bin] /= clipper::Util::max( swr[bin], 1.0 ); sw2r[bin] /= clipper::Util::max( swr[bin], 1.0 ); // correlation scr12[bin] /= sqrt( clipper::Util::max( scr1[bin]*scr2[bin], 1.0 ) ); scer12[bin] /= sqrt( clipper::Util::max( scer1[bin]*scer2[bin], 1.0 ) ); // Qfom sdw1[bin] /= sww1[bin]; sdw2[bin] /= sww2[bin]; } for ( int bin = 0; bin < fom_bins; bin++ ) { if ( nrfl1[bin] > 0.5 ) mcosd1[bin] /= nrfl1[bin]; if ( nrfl2[bin] > 0.5 ) mcosd2[bin] /= nrfl2[bin]; } // and display resord.invert(); printf("\n $TABLE: Phase statistics with resolution:\n $GRAPHS: vs resolution:N:1,4,5:\n :Unweighted and weighted vs resolution:N:1,6,7,8:\n :Reflection correlation vs resolution:N:1,9,10:\n $$\n 1/resol^2 hi Nrefl w1 w2 wFcorr wEcorr $$\n $$\n"); for ( int bin = 0; bin < res_bins; bin++ ) printf( "%6.3f %6.3f %7i %6.3f %6.3f %7.2f %7.2f %7.2f %6.3f %6.3f\n", resord.ordinal( double(bin)/res_scl ), resord.ordinal( double(bin+0.999)/res_scl ), int(snr[bin]), sw1r[bin], sw2r[bin], clipper::Util::rad2d(sdr[bin]), clipper::Util::rad2d(sdw1r[bin]), clipper::Util::rad2d(sdw2r[bin]), scr12[bin], scer12[bin] ); printf(" $$\n"); printf("\n $TABLE: Phase analysis with FOM:\n $GRAPHS:Histogram of FOM1:N:1,3:\n :Phase difference vs FOM1:N:1,2,4:\n :Histogram of FOM2:N:1,5:\n :Phase difference vs FOM2:N:1,2,6:\n $$\n FOM acos(FOM) N(FOM1) acos N(FOM2) acos$$\n $$\n"); for ( int bin = 0; bin < fom_bins; bin++ ) printf( "%9.3f %9.3f %9.0f %9.3f %9.0f %9.3f\n", (double(bin)+0.5)/double(fom_bins), clipper::Util::rad2d(acos((double(bin)+0.5)/double(fom_bins))), nrfl1[bin],clipper::Util::rad2d(acos(mcosd1[bin])), nrfl2[bin],clipper::Util::rad2d(acos(mcosd2[bin])) ); printf(" $$\n"); printf("\nOverall statistics:\n Nrefl w1 w2 wFcorr wEcorr Qfom1 Qfom2\n"); printf( "%7i %6.3f %6.3f %7.2f %7.2f %7.2f %6.3f %6.3f %6.3f %6.3f\n", int(snr[res_bins]), sw1r[res_bins], sw2r[res_bins], clipper::Util::rad2d(sdr[res_bins]), clipper::Util::rad2d(sdw1r[res_bins]), clipper::Util::rad2d(sdw2r[res_bins]), scr12[res_bins], scer12[res_bins], sdw1[res_bins], sdw2[res_bins] ); } clipper-2.1/examples/cpatterson.cpp0000644000374100011300000001427011221530315014426 00000000000000// Clipper app to perform ffts and map stats /* Copyright 2003-2004 Kevin Cowtan & University of York all rights reserved */ #include #include #include int main( int argc, char** argv ) { CCP4Program prog( "cpatterson", "0.1", "$Date: 2004/07/01" ); // defaults clipper::String title; clipper::String ipfile = "NONE"; clipper::String ipcolf = "NONE"; clipper::String ipcold = "NONE"; clipper::String ipcola = "NONE"; clipper::String ipcolh = "NONE"; clipper::String opfile = "patterson.map"; bool adiff = false; bool oremv = false; double limit_e = 1.0e20; double weight_e = 0.0; clipper::Resolution reso; clipper::Grid_sampling grid; const int nprm = 12; // command input CCP4CommandInput args( argc, argv, true ); int arg = 0; while ( ++arg < args.size() ) { if ( args[arg] == "-title" ) { if ( ++arg < args.size() ) title = args[arg]; } else if ( args[arg] == "-mtzin" ) { if ( ++arg < args.size() ) ipfile = args[arg]; } else if ( args[arg] == "-mapout" ) { if ( ++arg < args.size() ) opfile = args[arg]; } else if ( args[arg] == "-colin-fo" ) { if ( ++arg < args.size() ) ipcolf = args[arg]; } else if ( args[arg] == "-colin-fano" ) { if ( ++arg < args.size() ) ipcola = args[arg]; } else if ( args[arg] == "-colin-fdiff" ) { if ( ++arg < args.size() ) ipcold = args[arg]; } else if ( args[arg] == "-resolution" ) { if ( ++arg < args.size() ) { reso = clipper::Resolution( clipper::String(args[arg]).f() ); } } else if ( args[arg] == "-grid" ) { if ( ++arg < args.size() ) { std::vector g = clipper::String(args[arg]).split(", "); grid = clipper::Grid_sampling( g[0].i(), g[1].i(), g[2].i() ); } } else if ( args[arg] == "-e-limit" ) { if ( ++arg < args.size() ) limit_e = clipper::String(args[arg]).f(); } else if ( args[arg] == "-e-weight" ) { if ( ++arg < args.size() ) weight_e = clipper::String(args[arg]).f(); } else if ( args[arg] == "-anomalous" ) { adiff = true; } else if ( args[arg] == "-origin-removal" ) { oremv = true; } else { std::cout << "Unrecognized:\t" << args[arg] << "\n"; args.clear(); } } if ( args.size() <= 1 ) { std::cout << "Usage: cpatterson\n\t-mtzin \n\t-mapout \n\t-colin-fo \n\t-colin-fano \n\t-colin-fdiff \n\t-resolution \n\t-grid ,,\n\t-e-limit \n\t-e-weight \n\t-anomalous\n\t-origin-removal\nCalculate Patterson from Fobs or Fano.\nFor E-Patterson = 1, for F-Patterson = 0, and other values.\n can reject reflections or differences by E-value.\n"; exit(1); } // make data objects clipper::CCP4MTZfile mtzin; clipper::MTZcrystal cxtl; clipper::HKL_info hkls, hklp; typedef clipper::HKL_data_base::HKL_reference_index HRI; mtzin.set_column_label_mode( clipper::CCP4MTZfile::Legacy ); // open file mtzin.open_read( ipfile ); clipper::Spacegroup spgr = mtzin.spacegroup(); clipper::Cell cell = mtzin.cell(); if ( ipcolf != "NONE" ) mtzin.import_crystal( cxtl, ipcolf+".F_sigF.F" ); if ( ipcola != "NONE" ) mtzin.import_crystal( cxtl, ipcola+".F_sigF_ano.F+"); if ( !cxtl.is_null() ) cell = cxtl; if ( reso.is_null() ) reso = mtzin.resolution(); hkls.init( spgr, cell, reso, true ); clipper::HKL_data fsig( hkls ); clipper::HKL_data dsig( hkls ); clipper::HKL_data fano( hkls ); if ( ipcolf != "NONE" ) mtzin.import_hkl_data( fsig, ipcolf ); if ( ipcola != "NONE" ) mtzin.import_hkl_data( fano, ipcola ); if ( ipcold != "NONE" ) mtzin.import_hkl_data( dsig, ipcolf ); mtzin.close_read(); // make mean/difference F if necessary if ( ipcola != "NONE" ) { if ( adiff ) fsig.compute( fano, clipper::data32::Compute_diff_fsigf_from_fsigfano() ); else fsig.compute( fano, clipper::data32::Compute_mean_fsigf_from_fsigfano() ); } // subtract difference F if necessary if ( ipcold != "NONE" ) for ( HRI ih = fsig.first(); !ih.last(); ih.next() ) if ( !fsig[ih].missing() && !dsig[ih].missing() ) fsig[ih].f() -= dsig[ih].f(); else fsig[ih].f() = 0.0; // calculate E scale factor clipper::HKL_data esig( hkls ); esig.compute( fsig, clipper::data32::Compute_EsigE_from_FsigF() ); std::vector params_init( nprm, 1.0 ); clipper::BasisFn_spline basis_fo( esig, nprm, 2.0 ); clipper::TargetFn_scaleEsq target_fo( esig ); clipper::ResolutionFn escale( hkls, basis_fo, target_fo, params_init ); // reject reflections by E-value for ( HRI ih = esig.first(); !ih.last(); ih.next() ) if ( !esig[ih].missing() ) if ( esig[ih].E() / sqrt( escale.f(ih) ) > limit_e ) fsig[ih] = clipper::data32::F_sigF(); // calculate E-F combination for ( HRI ih = fsig.first(); !ih.last(); ih.next() ) if ( !fsig[ih].missing() ) fsig[ih].scale( pow( escale.f(ih), 0.5*weight_e ) ); // get Patterson spacegroup clipper::Spacegroup pspgr( clipper::Spgr_descr( spgr.generator_ops().patterson_ops() ) ); hklp.init( pspgr, cell, reso, true ); // make patterson coeffs clipper::HKL_data fphi( hklp ); for ( HRI ih = fphi.first(); !ih.last(); ih.next() ) { clipper::data32::F_sigF f = fsig[ih.hkl()]; if ( !f.missing() ) { fphi[ih].f() = f.f()*f.f(); fphi[ih].phi() = 0.0 ; } } // origin removal if ( oremv ) { clipper::BasisFn_spline basis_fp( fphi, nprm, 2.0 ); clipper::TargetFn_meanFnth target_fp( fphi, 1.0 ); clipper::ResolutionFn oscale( hklp, basis_fp, target_fp, params_init ); for ( HRI ih = fphi.first(); !ih.last(); ih.next() ) if ( !fphi[ih].missing() ) fphi[ih].f() -= oscale.f(ih); } // make grid if necessary if ( grid.is_null() ) grid.init( pspgr, cell, reso ); // make xmap clipper::Xmap xmap( pspgr, cell, grid ); xmap.fft_from( fphi ); // write map clipper::CCP4MAPfile mapout; mapout.open_write( opfile ); mapout.export_xmap( xmap ); mapout.close_write(); } clipper-2.1/examples/maketestdata.cpp0000644000374100011300000001027411062443724014725 00000000000000// Clipper app to make test data /* Copyright 2003-2004 Kevin Cowtan & University of York all rights reserved */ #include #include #include #include #include #include #include extern "C" { #include } int main( int argc, char** argv ) { if ( argc == 1 ) { // do self tests std::cout << "Test core:\n"; clipper::Test_core test_core; bool result_core = test_core(); if ( result_core ) std::cout << "OK\n"; std::cout << "Test contrib:\n"; clipper::Test_contrib test_contrib; bool result_contrib = test_contrib(); if ( result_contrib ) std::cout << "OK\n"; // done self tests // error exit code if ( !( result_core && result_contrib ) ) exit(1); } else { // make data for self-tests // make data objects for reflection data clipper::CCP4MTZfile mtzin; clipper::HKL_info hkls; clipper::HKL_data fsig( hkls ); clipper::HKL_data abcd( hkls ); typedef clipper::HKL_data_base::HKL_reference_index HRI; // open file mtzin.open_read( argv[1] ); clipper::Spacegroup spgr = mtzin.spacegroup(); clipper::Cell cell = mtzin.cell(); clipper::Resolution reso( 5.0 ); hkls.init( spgr, cell, reso, true ); mtzin.import_hkl_data( fsig, "/*/*/[FNAT,SIGFNAT]" ); mtzin.import_hkl_data( abcd, "/*/*/[HLA,HLB,HLC,HLD]" ); mtzin.close_read(); // print data for ( HRI ih = hkls.first(); !ih.last(); ih.next() ) { if ( !fsig[ih].missing() && !abcd[ih].missing() ) { int h = ih.hkl().h(); int k = ih.hkl().k(); int l = ih.hkl().l(); double f = rint(fsig[ih].f()/0.1)*0.1; double sigf = rint(fsig[ih].sigf()/0.1)*0.1; double a = rint(abcd[ih].a()/0.01)*0.01; double b = rint(abcd[ih].b()/0.01)*0.01; double c = rint(abcd[ih].c()/0.01)*0.01; double d = rint(abcd[ih].d()/0.01)*0.01; std::cout << "{" << h << "," << k << "," << l << "," << f << "," << sigf << "," << a << "," << b << "," << c << "," << d << "},\n"; } } // make data objects for model data clipper::MMDBManager mmdb; mmdb.ReadPDBASCII( argv[2] ); // get a list of all the non-solvent atoms clipper::mmdb::PPCAtom psel; int hndl, nsel; hndl = mmdb.NewSelection(); mmdb.Select( hndl, STYPE_ATOM, "(!WAT,H2O,HOH)", SKEY_NEW ); mmdb.GetSelIndex( hndl, psel, nsel ); clipper::MMDBAtom_list atoms( psel, nsel ); mmdb.DeleteSelection( hndl ); // print data for ( int i = 0; i < atoms.size(); i++ ) { atoms[i].set_element( atoms[i].element().trim() ); double x = rint(atoms[i].coord_orth().x()/0.001)*0.001; double y = rint(atoms[i].coord_orth().y()/0.001)*0.001; double z = rint(atoms[i].coord_orth().z()/0.001)*0.001; double u_iso = rint(atoms[i].u_iso()/0.001)*0.001; double occ = rint(atoms[i].occupancy()/0.001)*0.001; std::cout << "{\"" << atoms[i].element() << "\"," << x << "," << y << "," << z << "," << u_iso << "," << occ << "},\n"; } // check the existing data clipper::data::Test_data data; for ( HRI ih = hkls.first(); !ih.last(); ih.next() ) { clipper::data32::F_sigF fs = data.hkl_data_f_sigf()[ih.hkl()]; if ( !fs.missing() ) if ( fabs( fs.f() - fsig[ih].f() ) > 0.05 ) std::cerr << "Err: " << ih.hkl().format() << "\n"; } for ( int i = 0; i < data.atom_list().size(); i++ ) { if ( atoms[i].element() != data.atom_list()[i].element() || fabs(atoms[i].u_iso() -data.atom_list()[i].u_iso() ) > 0.001 || fabs(atoms[i].occupancy()-data.atom_list()[i].occupancy()) > 0.001 || ( atoms[i].coord_orth() - data.atom_list()[i].coord_orth() ).lengthsq() > 0.001 ) { std::cerr << "Err: " << data.atom_list()[i].element() << "\t" << data.atom_list()[i].coord_orth().format() << "\n"; } } // make tables for big result lists clipper::Test_contrib test_contrib; std::fstream contrib_data( "test_contrib.dat", std::fstream::out ); test_contrib.set_stream( contrib_data ); test_contrib(); contrib_data.close(); // done make test data } } clipper-2.1/ChangeLog0000644000374100011300000003414211372264167011514 00000000000000Latest changes:
16/04/10:
Minor compatibility fixes. A lot of extra searching and selection functionality added to MiniMol.
15/12/09:
Update anisotropy correction code to handle I's and low resolution data. Update autoconf and bump so version.
14/07/09:
Update mtz write to give correct symbols. Extend csymmatch to handle waters and to do optional origin and hand matching. Provide legacy mtz column label syntax. gcc 4.4 fixes.
22/05/09:
Enable MiniMol to export alternate conformation codes. Correntions to new Clipper2-stype HKL_data handling.
20/05/09:
Clipper2-stype HKL_data handling extended, including CNS, CIF import. Experimental patch to allow clean shutdown in Coot. Screw operator decomposition in RTop_orth (Phil).
10/02/09:
Support for new extended CNS file import, minor warning fixes.
01/12/08:
2.1 release. Support for threading. New MLHL weighting function. Improved anisotropy correction. gcc 4.3 fixes.
18/11/08:
2.1 release. Support for threading. New MLHL weighting function. Improved anisotropy correction. gcc 4.3 fixes.
07/09/07:
Minor bug fix in Rotation::abs_angle. Avoid crash on reading pdb file with missing CRYST1. Compiler warning fix.
25/04/07:
Work around for compiler bug in gcc 3.2/3.3. No other changes.
12/04/07:
MTZ file creation from scratch fixes. Anisotropic scaling improvements. 'caniso' anisotropic correction tool. 'convert2mtz' file conversion tool. Autoconf build system option.
16/06/06:
Rotation fixes. Backport of ccp4 utilities from 2.0 branch.
31/08/05:
Minimol fix. Additional cfft output.
15/07/05:
Fedora Core 4 NaN fix. New mapfilter method to support NCS in pirate.
17/03/05:
Minor portability fixes for CCP4 release. 'Lattman' spelling fix (sorry).
25/02/05:
Minor portability fixes for CCP4 release.
22/11/04:
Minor portability fixes for CCP4 release.
22/10/04:
Added Fortran sfcalc demo code. Fix in SF weighting 'best' coeffs (from RWGK).
12/10/04:
Fixes and testing of SF calc, SF weighting. Additional cctbx methods. cmakereference app for pirate.
16/07/04:
Add some additional spacegroup methods, extend utilities and add 2 new utilties programs.
25/06/04:
Fix for compilation -O3 on gcc 3.2, other portability fixes, add 1 new jiffy programs.
16/06/04:
Add structure factor calculation with bulk solvent method, sigmaa spline method, add 3 new jiffy programs.
25/05/04:
Add error checking on mtz/map i/o, add origin/hand matching method, add map curvature methods, add 4 new jiffy programs.
06/04/04:
Synchronize to fixes in CCP4 libs.
08/03/04:
Bugfix in MiniMol export to MMDB.
18/02/04:
Bugfix in LogPhaseProb conversion to and from HL coeffs.
03/02/04:
Bugfixes in MiniMol, license update, CCP4v5 install.
27/10/03:
Virtual destructors adjusted for gcc 3.2 bug.
23/10/03:
MTZ History now preserved. Created MTZ's now fixed for common spacegroups. Virtual destructors supplied for all virtual bases (I hope).
08/10/03:
Second attempt at update for new CCP4 v5 libraries.
06/10/03:
Update for new CCP4 v5 libraries.
31/07/03:
New classes for phase probability distributions. Lots of portability fixes.
18/07/03:
License now LGPL (or CCP4 part 0). SCONS now build non-shared libraries on alpha and sun. rpath still not implmented.
07/06/03:
Resolution function tidyup, added SCONS build system.
30/05/03:
Bug fix release for xmap crash and gcc 2.95.3.
17/05/03:
API change from previous release reversed.
14/05/03:
Port Xmap and Spacegroup to ObjectCache architecture for improved performance.
24/04/03:
More documentation. Even more documentation. Documentation tidyup. MiniMol tidyup.
17/04/03:
New MMDB lightweight interface added. New MiniMol STL model added.
10/04/03:
Separated out old MMDB interface as separate package. Started work for ObjectCache architecture. Fixes for Windows build using MinGW.
27/03/03:
Support for new CCP4 C-libraries. New fast NaN tests.
12/03/03:
Fix reflection cif build. Fix to mmdb wrapper segfault.
04/03/03:
Reflection cif import added (Paul Emsley). Preparation for new MTZ interface. Minor updates.
14/02/03:
Tiny MMDB 'is_atom()' fix. Minor updates.
07/02/03:
Ported to Sun. This version tested on gcc 3.2, SGI, Alpha, Sun. Hopefully still builds on MacOSX and gcc 2.96 too.
20/01/03:
Implemented AtomShapeFn, with Agarwal coeffs for isotropic atoms.
10/01/03:
Minor cleanups.
08/01/03:
New FFFear methods, MapFilter methods, generic Euler angles.
10/12/02:
+=, -= implemented for all maps, Vec3<>s.
28/11/02:
Heavy spacegroup testing completed: see cctbxtest.
22/11/02:
Sparse FFT map added.
23/10/02:
Ramachandran class, FFFear methods, new FFTmap backend.
10/10/02:
All files and libraries reorganised, mccp4 and cctbx optional.
07/10/02:
Stand-alone spacegroup library.
30/09/02:
MMDB associative behaviour, MMDB unsorted selections, map statistics objects, map sorting object, PHS file i/o.
30/08/02:
Generic rotation class, least squares coordinate fitting, and lots of stress testing on real calculations.
18/07/02:
Function objects for structure factor calculations, skeletonisation. Message passing library added.
25/06/02:
Slight changes for skeletonisation.
24/06/02:
Anisotropic map calculation implemented (see sftest.cpp). Anisotropic basis function added to resolution function evaluator.
22/05/02:
Audit of communication in hierarchies completed. Minor changes to i/o classes.
08/05/02:
Form factor class added. Demo structure factor calculation added, using either FFT or direct summation. Map bug fixed (for spacegroups where symops do not commute, e.g. P422).
26/04/02:
Rewrite of coordinate types. Reflection datalist operators added.
21/03/02:
More complete MMDB wrapper. New classes for Aniso U's.
16/03/02:
First attempt at MMDB wrapper object. Numerous other cleanups.
05/03/02:
NX_operator, NXmap_operator added. Pluggable interpolators added. Code style imporvements. Resolution function evaluator speedups. New mccp4 library.
12/02/02:
More documentation, cleanups.
09/02/02:
Added lots of conversion operators for structure factor arithmetic and manipulation of HL coeffs. A new mini-ccp4 library includes both mmtzlib and cmaplib. Most importantly, the SGI PORT IS WORKING. There is now a 'fake' configure script which detect the platform. You'll need up to date compilers and gmake.
30/01/02:
Cleanups, more documentation.
23/01/02:
Hopefully finished method renaming, updated fft example.
22/01/02:
Major rewrite of the container hierarchy, including new inheritables (resolution, grid sampling), updated i/o classes, more flexibility, more automation. In particular containers can now be stored in STL vectors.
13/01/02:
New classes for grid samplings (consistent with spacegroup, cell, resolution and FFT), and reciprocal space fractional and orthogonal coordinates. Documentation improvements (now 250 pages).
11/01/02:
Bspline FFTmap class added. Classes for orthogonal and fractional gradients and curvatures and their transformations added. Map I/O class now imports and exports NXmap<>s.
07/01/02:
Map I/O class now imports and exports Xmap<>s. NXmap<>s coming soon. The patched CMAP lib has now been packaged, and the auto-install script updated accordingly.
04/01/02:
Map I/O class started. Map import is working, as long as you have a hacked version of the CMAP lib. I'll tidy this up for distribution as soon as I can.
19/12/01:
More tidyups.
15/12/01:
More tidyups.
13/12/01:
More tidyups: easier MTZ import function, lose the last few pointer methods, fill in some default parameters to allow default name generation for container objects.
08/12/01:
Basic interpolation methods added to Xmap. Documentation improvements.
05/12/01:
Smooth bspline resolution basis function implemented. Lots more cleanups.
04/12/01:
'cfft' works again. Major cleanups. 'HKL_data_base' now contains a full list of virtual functions. Naive binner replaced with something rather more sensible.
03/12/01:
Implemented the strict donor/recipient model for inheriting cell and spacegroup information. Some tidying up will probably be needed. I think cfft is broken - I don't know when this happened yet.
01/12/01:
Iterators and reflection classes renamed to something clearer. Updated to use cctbx 1.0. That should make installation rather simpler.
29/11/01:
The mtz i/o layer has been abstracted from the Clipper core, i.e. Clipper is now completely independent of MTZ (and therefore CCP4). This should make it very simple to interface to other file formats, e.g. CNS, and eventually the PHENIX database.
A sigmaa-target has been implemented for the resolution function evaluator. Convergence is not very fast since it doesn't know how to pick sensible starting values, and it produces copious debugging output, but I think it is working.
01/11/01:
Conversion operators to convert between HKL_data types are implented. (Unary only for now, but binary operators are easy). A sample operator to convert phi_fom to abcd is provided. The reciprocal ASU is now mandatory, as this allows rather faster symmetry lookups.
15/10/01:
Resolution function evaluator implemented. This will evaluate an arbitrary function of HKL, by optimising the parameters of a user defined basis function to minimise a user defined target functions. This completely replaces the idea of 'resolution bins', and does a lot of other things besides. A terget for mean |F|2 is provided, a sigmaa taget shouldn't be too hard.
FFTw config has changed again: FFTw should be configured with just --enable-float
01/10/01:
Do type conversion in fft's. FFTw should be configured with --enable-float --enable-type-prefix
25/09/01:
Update to latest version of cctbx.
10/09/01:
Small tidyups and documentation improvements.
04/09/01:
Various small tidyups and documentation improvements. umtzlib extended to handle multi-record MTZ files.
01/09/01:
MTZ interface completely replaced. MTZ i/o is now handled through a new lightweight C library: umtzlib/mmtzlib (Micro/Mini mtzlib). The mtz i/o interface has also been cleaned up.
16/08/01:
Interface redesign completed. The whole package is now (at least from the outside) written in such a way that programs can be written without using new, delete, or pointers. License changed to CCP4 part (i).
09/08/01:
FFTs implemented! You'll need fftw. The interfaces have been largely redesigned to remove most of the pointers and new/delete. My current priorities are: finishing the interface cleanup, relicencing under CCP4 part (i) (to be consistent with fftw), writing a binner/optimiser, and a non-crystal map class. Long term it would be nice to implement mmdb coordinate objects and density generation (including anisotropic atoms).
26/07/01:
Two big jobs completed: Firstly, the optimised map class is working. Secondly, the package now uses the cctbx libraries for all its symmetry information. You'll need to install cctbx to compile clipper. The Makefile needs to be tweaked by hand for now.
29/06/01:
Map class working (but not optimised, and no interpolation yet). More importantly I've done another major re-architecture. Every object now comes in two forms: a non-tree and a tree variant. You can now use the maps and Datalists as stand-alone components, although for Datalists you will have to manage linking a Datalist to an HKL_list yourself. In future the map class will probably be split up in the same way, providing one object which provides organizational and fast indexing services, from which a number of Data objects can be hung.
20/06/01:
Map class started (It doesn't build yet). Spacegroup extended to include ASU calculation.
01/05/01:
MTZ io re-written to allow extension to other formats in future. Other general tidyups.
25/04/01:
Created a simple `cad' utility to combine and manipulate mtz files as clipper datalists. A few extra methods were provided for this purpose. In the light of this work the MTZ import/export framework is going to be rewritten again.
28/03/01:
Updated to latest CMTZ library.
27/03/01:
The mtz i/o has been rewritten to allow any combination of input, input-append, output, output-append. This should make it trivial to write a clipper-cad utility.
05/03/01:
Namespaces have been implemented. The data types have been templatised as `dtype' so that float or double data may be stored, and selected by a single `using' statement. (i/o to mtz must be float of course). All other values are defined as `ftype', defined in clipper_util, which will normally be double. (This could easily be templatised too).
22/02/01:
Efficient handle class for Datalists implemented. MTZ hierarchical name parsing improved. Recursive update fixed. Doxygen documentation implemented. CMTZ cell export bug fixed (my fault - thanks Martyn).
20/02/01:
Project level removed from both CMTZ and Clipper hierarchy. Minor architechture improvements.
12/02/01:
Mark 2 design now exports as well as imports MTZs.
10/02/01:
CMTZ modified to support hierarchical data naming and duplicate names. `reflection_data_mtz' now updated use the new data structure (import works, export still pending).
07/02/01:
Data structure completely rewritten. The data hierarchy is now a completely generic tree object, so any type can be insterted anywhere. Objects are addressed using UNIX-like directory references. MTZ i/o has not yet been ported to the new structure, but MTZ items will arrive in the hierarchy at '/project/crystal/dataset/datalist', and must be similarly positioned for export.

Things to do

clipper-2.1/Makefile.am0000644000374100011300000000056511372264321011770 00000000000000# -*- mode: Makefile; mode: font-lock -*- AUTOMAKE_OPTIONS = foreign SUBDIRS = config clipper examples dox DIST_SUBDIRS = config clipper examples dox EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL NEWS README bin_SCRIPTS = clipper-config # pkgconfigdir = $(libdir)/pkgconfig # pkgconfig_DATA = clipper.pc if DEBUG AM_CXXFLAGS = -g -DDEBUG endif ACLOCAL_AMFLAGS = -I config clipper-2.1/COPYING0000644000374100011300000005750510736662240011002 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS clipper-2.1/configure0000755000374100011300000333752611372264330011660 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63 for clipper 2.1. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='clipper' PACKAGE_TARNAME='clipper' PACKAGE_VERSION='2.1' PACKAGE_STRING='clipper 2.1' PACKAGE_BUGREPORT='cowtan@ysbl.york.ac.uk' ac_unique_file="clipper/clipper.h" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS DEBUG_FALSE DEBUG_TRUE AR_FLAGS POW_LIB LIBOBJS ALLOCA CCP4_LIBS CCP4_CXXFLAGS MMDB_LIBS MMDB_CXXFLAGS FFTW_LIBS FFTW_CXXFLAGS CLIPPER_CNS_DIR CLIPPER_CCP4_DIR CLIPPER_CIF_DIR CLIPPER_MINIMOL_DIR CLIPPER_MMDB_DIR CLIPPER_PHS_DIR CLIPPER_CONTRIB_DIR CLIPPER_LT_VERSION LIBTOOL ac_ct_F77 FFLAGS F77 CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX CPP NMEDIT DSYMUTIL RANLIB AR ECHO LN_S EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_shared enable_static enable_fast_install enable_dependency_tracking with_gnu_ld enable_libtool_lock with_pic with_tags enable_debug enable_contrib enable_phs enable_mmdb enable_minimol enable_cif enable_ccp4 enable_gpp4 enable_cns with_fftw with_mmdb with_gpp4 with_ccp4 ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP F77 FFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures clipper 2.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/clipper] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of clipper 2.1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-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-debug enable debugging options --enable-contrib enable contrib library (default yes) --enable-phs enable PHASEs file interface library (default yes) --enable-mmdb enable mmdb-interface library (requires mmdb library, default no) --enable-minimol enable minimol library (requires mmdb library, default no) --enable-cif enable cif-interface library (requires mmdb library, default no) --enable-ccp4 enable ccp4-interface library (requires ccp4c library, default no) --enable-gpp4 enable gpp4 library (default no) --enable-cns enable cns-hkl-interface library (default no) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] --with-fftw=PFX Prefix where FFTW has been installed --with-mmdb=PFX use mmdb library (default NO) and set prefix --with-gpp4=PFX use gpp4 library (default is NO) and set prefix --with-ccp4=PFX use ccp4c library (default is NO) and set prefix Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF clipper configure 2.1 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi 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 clipper $as_me 2.1, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ##AC_CONFIG_HEADER(config.h) ac_aux_dir= for ac_dir in config "$srcdir"/config; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5 $as_echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 $as_echo "$as_me: error: unsafe absolute working directory name" >&2;} { (exit 1); exit 1; }; };; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 $as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} { (exit 1); exit 1; }; };; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 $as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='clipper' VERSION='2.1' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 $as_echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; 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:$LINENO: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 $as_echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; 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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:$LINENO: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:$LINENO: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 $as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi fi fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -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" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac 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:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$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:$LINENO: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${lt_cv_path_SED+set}" = set; then $as_echo_n "(cached) " >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED { $as_echo "$as_me:$LINENO: result: $SED" >&5 $as_echo "$SED" >&6; } { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:$LINENO: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac { $as_echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 $as_echo_n "checking for BSD-compatible nm... " >&6; } if test "${lt_cv_path_NM+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi { $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi { $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 4515 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) libsuff=64 case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_cc_needs_belf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" 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:$LINENO: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:$LINENO: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to cowtan@ysbl.york.ac.uk ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:$LINENO: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 $as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_F77+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { $as_echo "$as_me:$LINENO: result: $F77" >&5 $as_echo "$F77" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 $as_echo "$ac_ct_F77" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$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 F77=$ac_ct_F77 fi fi # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 $as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 $as_echo "$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { $as_echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 $as_echo_n "checking whether $F77 accepts -g... " >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then $as_echo_n "(cached) " >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 $as_echo "$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi if test $ac_compiler_gnu = yes; then G77=yes else G77= 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 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments { $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:$LINENO: result: none" >&5 $as_echo "none" >&6; } fi # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:$LINENO: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:$LINENO: result: ok" >&5 $as_echo "ok" >&6; } fi { $as_echo "$as_me:$LINENO: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:$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:$LINENO: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$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 RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:$LINENO: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$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 DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$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 NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi fi { $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_ld_exported_symbols_list=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_ld_exported_symbols_list=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[0123]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic was given. if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7620: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7624: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7910: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7914: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8014: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:8018: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi { $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 $as_echo_n "checking for shl_load... " >&6; } if test "${ac_cv_func_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 $as_echo "$ac_cv_func_shl_load" >&6; } if test "x$ac_cv_func_shl_load" = x""yes; then lt_cv_dlopen="shl_load" else { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 $as_echo_n "checking for dlopen... " >&6; } if test "${ac_cv_func_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_dlopen || defined __stub___dlopen choke me #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 $as_echo "$ac_cv_func_dlopen" >&6; } if test "x$ac_cv_func_dlopen" = x""yes; then lt_cv_dlopen="dlopen" else { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_svld_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_dld_link=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ compiler_lib_search_dirs \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ fix_srcfile_path \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { $as_echo "$as_me:$LINENO: creating $ofile" >&5 $as_echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" # Check whether --with-tags was given. if test "${with_tags+set}" = set; then withval=$with_tags; tagnames="$withval" fi if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { $as_echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 $as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { $as_echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 $as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { $as_echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 $as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { $as_echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 $as_echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { $as_echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 $as_echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then 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 archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= compiler_lib_search_dirs_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else ld_shlibs_CXX=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext compiler_lib_search_dirs_CXX= if test -n "$compiler_lib_search_path_CXX"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 $as_echo "$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:12925: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:12929: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13029: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:13033: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 $as_echo "$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ compiler_lib_search_dirs_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; rdos*) lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 $as_echo "$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14614: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:14618: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; } if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_F77=yes fi else lt_cv_prog_compiler_static_works_F77=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5 $as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; } if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14718: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:14722: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 $as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_F77=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_F77=no fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi { $as_echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 $as_echo "$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 $as_echo "$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 $as_echo "$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ compiler_lib_search_dirs_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ fix_srcfile_path_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16935: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16939: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; rdos*) lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 $as_echo "$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:17225: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:17229: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_GCJ=yes fi else lt_cv_prog_compiler_static_works_GCJ=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_static_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:17329: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:17333: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix[3-9]*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_GCJ=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_GCJ="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_GCJ=no fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi { $as_echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 $as_echo "$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 $as_echo "$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 $as_echo "$hardcode_action_GCJ" >&6; } if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ compiler_lib_search_dirs_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ fix_srcfile_path_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ compiler_lib_search_dirs_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ fix_srcfile_path_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) { { $as_echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 $as_echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { $as_echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 $as_echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion ##AM_MAINTAINER_MODE 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 # Checks for programs. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in xlc++ CC cxx c++ icc g++ 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:$LINENO: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in xlc++ CC cxx c++ icc g++ 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in xlc cc icc gcc 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in xlc cc icc gcc 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -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" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$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 # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi CLIPPER_LT_VERSION="2:7:0" # Optional args # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; ac_cv_enable_debug=yes else ac_cv_enable_debug=no fi # Check whether --enable-contrib was given. if test "${enable_contrib+set}" = set; then enableval=$enable_contrib; case $enableval in yes) enable_contrib=yes ;; no) enable_contrib=no ;; *) enable_contrib=yes esac else enable_contrib=yes #dnl default is yes fi if test "$enable_contrib" = yes; then CLIPPER_CONTRIB_DIR="contrib" else CLIPPER_CONTRIB_DIR="" fi # Check whether --enable-phs was given. if test "${enable_phs+set}" = set; then enableval=$enable_phs; case $enableval in yes) enable_phs=yes ;; no) enable_phs=no ;; *) enable_phs=yes esac else enable_phs=yes #dnl default is yes fi if test "$enable_phs" = yes; then CLIPPER_PHS_DIR="phs" else CLIPPER_PHS_DIR="" fi # Check whether --enable-mmdb was given. if test "${enable_mmdb+set}" = set; then enableval=$enable_mmdb; case $enableval in yes) enable_mmdb=yes ;; no) enable_mmdb=no ;; *) enable_mmdb=no esac else enable_mmdb=no #dnl default is no fi if test "$enable_mmdb" = yes; then CLIPPER_MMDB_DIR="mmdb" else CLIPPER_MMDB_DIR="" fi #dnl minimol # Check whether --enable-minimol was given. if test "${enable_minimol+set}" = set; then enableval=$enable_minimol; case $enableval in yes) enable_minimol=yes ;; no) enable_minimol=no ;; *) enable_minimol=no esac else enable_minimol=no #dnl default is no fi if test "$enable_minimol" = yes; then CLIPPER_MINIMOL_DIR="minimol" else CLIPPER_MINIMOL_DIR="" fi # Check whether --enable-cif was given. if test "${enable_cif+set}" = set; then enableval=$enable_cif; case $enableval in yes) enable_cif=yes ;; no) enable_cif=no ;; *) enable_cif=no esac else enable_cif=no #dnl default is no fi if test "$enable_cif" = yes; then CLIPPER_CIF_DIR="cif" else CLIPPER_CIF_DIR="" fi # Check whether --enable-ccp4 was given. if test "${enable_ccp4+set}" = set; then enableval=$enable_ccp4; case $enableval in yes) enable_ccp4=yes;; no) enable_ccp4=no ;; *) enable_ccp4=no esac else enable_ccp4=no #dnl default is no fi # Check whether --enable-gpp4 was given. if test "${enable_gpp4+set}" = set; then enableval=$enable_gpp4; case $enableval in yes) enable_gpp4=yes ;; no) enable_gpp4=no ;; *) enable_gpp4=no esac else enable_gpp4=no #dnl default is no fi if test "$enable_ccp4" = yes -o "$enable_gpp4" = yes; then CLIPPER_CCP4_DIR="ccp4" else CLIPPER_CCP4_DIR="" fi # Check whether --enable-cns was given. if test "${enable_cns+set}" = set; then enableval=$enable_cns; case $enableval in no) enable_cns=no ;; *) enable_cns=yes esac else enable_cns=no #dnl default is no fi if test "$enable_cns" = yes; then CLIPPER_CNS_DIR="cns" else CLIPPER_CNS_DIR="" fi #specifics for various machines test "${target:+set}" = set || target="$host_os" case "$target" in *osf* | *64* ) if test "`basename $CXX`" = cxx; then case "$CXXFLAGS" in *strict_ansi* ) ;; * ) CXXFLAGS="$CXXFLAGS -ieee -std strict_ansi -alternative_tokens -timplicit_local -no_implicit_include" esac fi ;; *linux* ) ;; *irix* ) if test "`basename $CXX`" = CC; then case "$CXXFLAGS" in *LANG:std* ) ;; * ) CXXFLAGS="$CXXFLAGS -LANG:std -ptused" esac fi ;; *darwin* ) if test "`basename $CXX`" = gcc || test "`basename $CXX`" = g++; then case `$CXX -v 2>&1` in *3.1*) # problem with PIC relocation tables for 3.1 case "$CXXFLAGS" in *-O* | *-O1* | *-O2* | *-O3* ) CXXFLAGS=`echo $CXXFLAGS | sed s%-O\ 123%-O0%g` ;; *-O0* ) ;; * ) CXXFLAGS="$CXXFLAGS -O0" esac ;; *) esac fi ;; *solaris* ) if test "`basename $CXX`" = CC; then AR=CC AR_FLAGS="-xar -o" fi ;; * ) esac # disable strict aliasing in all versions of gcc if test "`basename $CXX`" = gcc || test "`basename $CXX`" = g++; then CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" fi # test for function in m { $as_echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 $as_echo_n "checking for sqrt in -lm... " >&6; } if test "${ac_cv_lib_m_sqrt+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sqrt (); int main () { return sqrt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_m_sqrt=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_sqrt=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5 $as_echo "$ac_cv_lib_m_sqrt" >&6; } if test "x$ac_cv_lib_m_sqrt" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi # Check whether --with-fftw was given. if test "${with_fftw+set}" = set; then withval=$with_fftw; test "$withval" = no && { { $as_echo "$as_me:$LINENO: error: fftw is a required package" >&5 $as_echo "$as_me: error: fftw is a required package" >&2;} { (exit 1); exit 1; }; } test "$withval" = yes || fftw_prefix="$withval" with_fftw=yes else with_fftw=yes fi if test $with_fftw = yes ; then #user override if test "x$FFTW_LIBS" != x && test "x$FFTW_CXXFLAGS" != x ; then have_fftw=yes else saved_LIBS="$LIBS" saved_CXXFLAGS="$CXXFLAGS" FFTW_LIBS="" FFTW_CXXFLAGS="" if test x$fftw_prefix != x; then # very likely the majority of cases, we will have been configured with: # --with-fftw=/some/thing # # should be ac_FFTW_CXXFLAGS="-I$FFTW_prefix/include" # ac_FFTW_CXXFLAGS="-I$fftw_prefix/include" # # Similarly for fftw, the uninstalled library position is simply in # $fftw_prefix, but the installed is in the standard prefixed subdirectory. # # SGI compiler CC (CXX=CC) needs -lm to link maths library, but # GCC c++ does not. # ac_FFTW_LDOPTS="-L$fftw_prefix/lib" else # the compiler looks in the "standard" places for FFTW. In real life, # it would be quite possible that FFTW would not be installed in # /usr/include, /usr/lib etc. so the defaults will not usually find # the right dependencies. ac_FFTW_CXXFLAGS="" ac_FFTW_LDOPTS="" fi #dnl test fftw_prefix fftwname="fftw" rfftwname="rfftw" { $as_echo "$as_me:$LINENO: checking for fftw_print_max_memory_usage in $fftwname" >&5 $as_echo_n "checking for fftw_print_max_memory_usage in $fftwname... " >&6; } LIBS="$ac_FFTW_LDOPTS $saved_LIBS -l$rfftwname -l$fftwname" CXXFLAGS="$ac_FFTW_CXXFLAGS $saved_CXXFLAGS" # # AC_TRY_LINK uses the c compiler (set by AC_LANG), so we will # temporarily reassign $CC to the c++ compiler. # 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$fftwname.h> int main () { fftw_print_max_memory_usage(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then have_fftw=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_fftw=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test x$have_fftw=xyes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$fftwname.h> int main () { fftw_real *fftwp = 0; float *fftp = 0; fftp = fftwp; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then have_fftw=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_fftw=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $have_fftw" >&5 $as_echo "$have_fftw" >&6; } if test $have_fftw = no; then fftwname="sfftw" rfftwname="srfftw" { $as_echo "$as_me:$LINENO: checking for fftw_print_max_memory_usage in $fftwname" >&5 $as_echo_n "checking for fftw_print_max_memory_usage in $fftwname... " >&6; } LIBS="$ac_FFTW_LDOPTS $saved_LIBS -l$rfftwname -l$fftwname" CXXFLAGS="$ac_FFTW_CXXFLAGS $saved_CXXFLAGS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$fftwname.h> int main () { fftw_print_max_memory_usage(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then have_fftw=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_fftw=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test x$have_fftw=xyes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$fftwname.h> int main () { fftw_real *fftwp = 0; float *fftp = 0; fftp = fftwp; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then have_fftw=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_fftw=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $have_fftw" >&5 $as_echo "$have_fftw" >&6; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu LIBS="$saved_LIBS" CXXFLAGS="$saved_CXXFLAGS" fi #dnl user override if test x$have_fftw = xyes; then test "x$FFTW_CXXFLAGS" = x && FFTW_CXXFLAGS="$ac_FFTW_CXXFLAGS" test "x$FFTW_LIBS" = x && FFTW_LIBS="$ac_FFTW_LDOPTS -l$rfftwname -l$fftwname" : else { { $as_echo "$as_me:$LINENO: error: If fftw exist on you system, are you sure you are using the fftw libraries that was configured with --enable-float?" >&5 $as_echo "$as_me: error: If fftw exist on you system, are you sure you are using the fftw libraries that was configured with --enable-float?" >&2;} { (exit 1); exit 1; }; } { { $as_echo "$as_me:$LINENO: error: locating necessary fftw" >&5 $as_echo "$as_me: error: locating necessary fftw" >&2;} { (exit 1); exit 1; }; } fi fi # --with-fftw cat >>confdefs.h <<\_ACEOF #define FFTW_ENABLE_FLOAT 1 _ACEOF # Check whether --with-mmdb was given. if test "${with_mmdb+set}" = set; then withval=$with_mmdb; test "$withval" = no || with_mmdb=yes test "$withval" = yes || mmdb_prefix="$withval" else with_mmdb="$enable_mmdb" test $enable_mmdbold = yes && with_mmdb=yes test $enable_cif = yes && with_mmdb=yes test $enable_minimol = yes && with_mmdb=yes fi if test x$with_mmdb = xyes ; then #user override if test "x$MMDB_LIBS" != x && test "x$MMDB_CXXFLAGS" != x ; then have_mmdb=yes else saved_LIBS="$LIBS" saved_CXXFLAGS="$CXXFLAGS" MMDB_CXXFLAGS="" MMDB_LIBS="" if test x$mmdb_prefix != x; then # very likely the majority of cases, we will try to configure with: # --with-mmdb=/some/thing # # should ideally be MMDB_CXXFLAGS="-I$MMDB_prefix/include", and the like # when MMDB and dependencies get installed # ac_mmdb_dirs=' . include include/mmdb lib src lib/src lib/src/mmdb' for ac_dir in $ac_mmdb_dirs; do if test -r "$mmdb_prefix/$ac_dir/mmdb/mmdb_manager.h"; then ac_MMDB_CXXFLAGS="-I$mmdb_prefix/$ac_dir" break fi done # # SGI compiler CC (CXX=CC) needs -lm to link maths library, but # GCC c++ does not. # for ac_dir in $ac_mmdb_dirs; do for ac_extension in a so sl dylib; do if test -r "$mmdb_prefix/$ac_dir/libmmdb.$ac_extension"; then ac_MMDB_LDOPTS="-L$mmdb_prefix/$ac_dir -lmmdb" break 2 fi done done else # the compiler looks in the "standard" places for MMDB. In real life, # it would be quite unlikely that MMDB would be installed in /usr/include, # /usr/lib etc. so this code will not usually find the right dependencies. ac_MMDB_CXXFLAGS="" ac_MMDB_LDOPTS="" fi { $as_echo "$as_me:$LINENO: checking for CMMDBManager in MMDB" >&5 $as_echo_n "checking for CMMDBManager in MMDB... " >&6; } LIBS="$ac_MMDB_LDOPTS $saved_LIBS" CXXFLAGS="$ac_MMDB_CXXFLAGS $saved_CXXFLAGS" # # AC_TRY_LINK uses the c compiler (set by AC_LANG), so we will # temporarily reassign $CC to the c++ compiler. # 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include "mmdb/mmdb_manager.h" int main () { CMMDBManager a; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then have_mmdb=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_mmdb=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext 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 # the language we have just quit LIBS="$saved_LIBS" CXXFLAGS="$saved_CXXFLAGS" fi # user override if test "x$have_mmdb" = xyes; then test "x$MMDB_CXXFLAGS" = x && MMDB_CXXFLAGS=$ac_MMDB_CXXFLAGS test "x$MMDB_LIBS" = x && MMDB_LIBS=$ac_MMDB_LDOPTS { $as_echo "$as_me:$LINENO: result: $have_mmdb" >&5 $as_echo "$have_mmdb" >&6; } : else { $as_echo "$as_me:$LINENO: result: $have_mmdb" >&5 $as_echo "$have_mmdb" >&6; } if test "x$mmdb_prefix" != x ; then if test "x$ac_MMDB_CXXFLAGS" != x ; then case "$ac_MMDB_CXXFLAGS" in *src/mmdb ) ac_MMDB_LDOPTS=`echo "$ac_MMDB_CXXFLAGS" | sed s#src/mmdb#src#g` ;; *include/mmdb ) ac_MMDB_LDOPTS=`echo "$ac_MMDB_CXXFLAGS" | sed s#include/mmdb#lib#g` ;; *) esac MMDB_CXXFLAGS="$ac_MMDB_CXXFLAGS" MMDB_LIBS=`echo "$ac_MMDB_LDOPTS -lmmdb" | sed s#-I#-L#` { $as_echo "$as_me:$LINENO: WARNING: assuming library $MMDB_LIBS headers $MMDB_CXXFLAGS" >&5 $as_echo "$as_me: WARNING: assuming library $MMDB_LIBS headers $MMDB_CXXFLAGS" >&2;} else MMDB_CXXFLAGS="-I$mmdb_prefix/src -I$mmdb_prefix/include" MMDB_LIBS="-L$mmdb_prefix/src -L$mmdb_prefix/lib -lmmdb" { $as_echo "$as_me:$LINENO: WARNING: assuming library $MMDB_LIBS headers $MMDB_CXXFLAGS" >&5 $as_echo "$as_me: WARNING: assuming library $MMDB_LIBS headers $MMDB_CXXFLAGS" >&2;} fi else test $enable_mmdb = yes && { { $as_echo "$as_me:$LINENO: error: Failed to find mmdb, but --enable-mmdb was given " >&5 $as_echo "$as_me: error: Failed to find mmdb, but --enable-mmdb was given " >&2;} { (exit 1); exit 1; }; } test $enable_minimol = yes && { { $as_echo "$as_me:$LINENO: error: Failed to find mmdb, but --enable-minimol was given" >&5 $as_echo "$as_me: error: Failed to find mmdb, but --enable-minimol was given" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: WARNING: mmdb not found" >&5 $as_echo "$as_me: WARNING: mmdb not found" >&2;} fi fi fi #dnl --with-mmdb # Check whether --with-gpp4 was given. if test "${with_gpp4+set}" = set; then withval=$with_gpp4; test "$withval" = no || with_gpp4=yes test "$withval" = yes || gpp4_prefix="$withval" else with_gpp4="$enable_gpp4" fi #dnl default is no for now if test x$with_gpp4 = xyes ; then #user override if test "x$CCP4_LIBS" != x && test "x$CCP4_CXXFLAGS" != x ; then have_gpp4=yes else { $as_echo "$as_me:$LINENO: checking for ccp4_errno in GPP4" >&5 $as_echo_n "checking for ccp4_errno in GPP4... " >&6; } saved_LIBS="$LIBS" saved_CXXFLAGS="$CXXFLAGS" CCP4_LIBS="" CCP4_CXXFLAGS="" if test "x$gpp4_prefix" != x; then # ie. gpp4=thing was given (thing is what we're checking for) ac_CCP4_CXXFLAGS="-I$gpp4_prefix/include/gpp4" ac_CCP4_LDOPTS="-L$gpp4_prefix/lib -lgpp4" else # treat as standard lib/include ac_CCP4_CXXFLAGS="" ac_CCP4_LDOPTS="-lgpp4" fi LIBS="$ac_CCP4_LDOPTS $saved_LIBS" CXXFLAGS="$ac_CCP4_CXXFLAGS $saved_CXXFLAGS" # # AC_TRY_LINK uses the c compiler (set by AC_LANG), so we will # temporarily reassign $CC to the c++ compiler. # 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include "ccp4/ccp4_errno.h" int main () { int a = ccp4_errno; CCP4::ccp4_error("conftest"); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then have_gpp4=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_gpp4=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext 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 # the language we have just quit { $as_echo "$as_me:$LINENO: result: $have_gpp4" >&5 $as_echo "$have_gpp4" >&6; } LIBS="$saved_LIBS" CXXFLAGS="$saved_CXXFLAGS" fi #user override if test x$have_gpp4 = xyes; then CCP4_CXXFLAGS="$ac_CCP4_CXXFLAGS" CCP4_LIBS="$ac_CCP4_LDOPTS" : else test x$enable_gpp4 = xyes && { { $as_echo "$as_me:$LINENO: error: Failed to find gpp4, but --enable-gpp4 was given " >&5 $as_echo "$as_me: error: Failed to find gpp4, but --enable-gpp4 was given " >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: WARNING: gpp4 not found" >&5 $as_echo "$as_me: WARNING: gpp4 not found" >&2;} fi fi #dnl --with-gpp4 # Check whether --with-ccp4 was given. if test "${with_ccp4+set}" = set; then withval=$with_ccp4; test "$withval" = no || with_ccp4=yes test "$withval" = yes || ccp4_prefix="$withval" else with_ccp4="$enable_ccp4" fi #dnl default is yes for now if test x$with_ccp4 = xyes ; then #user override if test "x$CCP4_LIBS" != x && test "x$CCP4_CXXFLAGS" != x ; then have_ccp4=yes else { $as_echo "$as_me:$LINENO: checking for ccp4_errno in CCP4" >&5 $as_echo_n "checking for ccp4_errno in CCP4... " >&6; } saved_LIBS="$LIBS" saved_CXXFLAGS="$CXXFLAGS" CCP4_LIBS="" CCP4_CXXFLAGS="" if test "x$ccp4_prefix" != x; then ac_ccp4_dirs=' . include include/ccp4 lib lib/src' for ac_dir in $ac_ccp4_dirs; do if test -r "$ccp4_prefix/$ac_dir/ccp4/ccp4_errno.h"; then ac_CCP4_CXXFLAGS="-I$ccp4_prefix/$ac_dir" break fi done for ac_dir in $ac_ccp4_dirs; do for ac_extension in a so sl dylib; do if test -r "$ccp4_prefix/$ac_dir/libccp4c.$ac_extension"; then ac_CCP4_LDOPTS="-L$ccp4_prefix/$ac_dir -lccp4c" break 2 fi done done else ac_CCP4_CXXFLAGS="" ac_CCP4_LDOPTS="-lccp4c" fi LIBS="$ac_CCP4_LDOPTS $saved_LIBS" CXXFLAGS="$ac_CCP4_CXXFLAGS $saved_CXXFLAGS" # # AC_TRY_LINK uses the c compiler (set by AC_LANG), so we will # temporarily reassign $CC to the c++ compiler. # 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include "ccp4/ccp4_errno.h" int main () { int a = ccp4_errno; CCP4::ccp4_error("conftest"); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then have_ccp4=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_ccp4=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext 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 # the language we have just quit { $as_echo "$as_me:$LINENO: result: $have_ccp4" >&5 $as_echo "$have_ccp4" >&6; } LIBS="$saved_LIBS" CXXFLAGS="$saved_CXXFLAGS" fi # user override if test x$have_ccp4 = xyes; then test "x$CCP4_CXXFLAGS" = x && CCP4_CXXFLAGS="$ac_CCP4_CXXFLAGS" test "x$CCP4_LIBS" = x && CCP4_LIBS="$ac_CCP4_LDOPTS" : else if test "x$ccp4_prefix" != x ; then if test "x$ac_CCP4_CXXFLAGS" != x ; then case "$ac_CCP4_CXXFLAGS" in *include/ccp4 ) ac_CCP4_LDOPTS=`echo "$ac_CCP4_CXXFLAGS" | sed s#include/ccp4#lib#g` ;; *) ac_CCP4_LDOPTS="$ac_CCP4_CXXFLAGS" esac ac_CCP4_LDOPTS=`echo "$ac_CCP4_LDOPTS" | sed s#-I#-L#` CCP4_CXXFLAGS="$ac_CCP4_CXXFLAGS" CCP4_LIBS="$ac_CCP4_LDOPTS -lccp4c" { $as_echo "$as_me:$LINENO: WARNING: assuming library $CCP4_LIBS headers $CCP4_CXXFLAGS" >&5 $as_echo "$as_me: WARNING: assuming library $CCP4_LIBS headers $CCP4_CXXFLAGS" >&2;} else CCP4_CXXFLAGS="-I$ccp4_prefix/lib/src" CCP4_LIBS="-L$ccp4_prefix/lib/src -L$ccp4_prefix/lib -lccp4c" { $as_echo "$as_me:$LINENO: WARNING: assuming library $CCP4_LIBS headers $CCP4_CXXFLAGS" >&5 $as_echo "$as_me: WARNING: assuming library $CCP4_LIBS headers $CCP4_CXXFLAGS" >&2;} fi else test $enable_ccp4 = yes && { { $as_echo "$as_me:$LINENO: error: Failed to find ccp4 libs, but --enable-ccp4 was given " >&5 $as_echo "$as_me: error: Failed to find ccp4 libs, but --enable-ccp4 was given " >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: WARNING: ccp4 not found" >&5 $as_echo "$as_me: WARNING: ccp4 not found" >&2;} fi fi fi #dnl --with-ccp4 # Checks for library functions. for ac_func in floor pow rint do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Checks for header files. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if test "${ac_cv_working_alloca_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_working_alloca_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_working_alloca_h=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA_H 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if test "${ac_cv_func_alloca_works+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_alloca_works=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_alloca_works=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 _ACEOF else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 _ACEOF { $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if test "${ac_cv_os_cray+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if test "${ac_cv_c_stack_direction+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int find_stack_direction () { static char *addr = 0; auto char dummy; if (addr == 0) { addr = &dummy; return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1; } int main () { return find_stack_direction () < 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_stack_direction=1 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if test "${ac_cv_search_opendir+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_search_opendir=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if test "${ac_cv_search_opendir+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_search_opendir=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_sys_wait_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi for ac_header in OS.h arpa/inet.h fcntl.h float.h libintl.h limits.h locale.h malloc.h memory.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/file.h sys/socket.h sys/time.h unistd.h wchar.h wctype.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to cowtan@ysbl.york.ac.uk ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if test "${ac_cv_header_stdbool_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; bool e = &s; char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; # if defined __xlc__ || defined __GNUC__ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 reported by James Lemley on 2005-10-05; see http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html This test is not quite right, since xlc is allowed to reject this program, as the initializer for xlcbug is not one of the forms that C requires support for. However, doing the test right would require a runtime test, and that would make cross-compilation harder. Let us hope that IBM fixes the xlc bug, and also adds support for this kind of constant expression. In the meantime, this test will reject xlc, which is OK, since our stdbool.h substitute should suffice. We also test this with GCC, where it should work, to detect more quickly whether someone messes up the test in the future. */ char digs[] = "0123456789"; int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); # endif /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdbool_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } { $as_echo "$as_me:$LINENO: checking for _Bool" >&5 $as_echo_n "checking for _Bool... " >&6; } if test "${ac_cv_type__Bool+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type__Bool=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (_Bool)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((_Bool))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type__Bool=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 $as_echo "$ac_cv_type__Bool" >&6; } if test "x$ac_cv_type__Bool" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STDBOOL_H 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const /**/ _ACEOF fi { $as_echo "$as_me:$LINENO: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if test "${ac_cv_c_inline+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_inline=$ac_kw else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac { $as_echo "$as_me:$LINENO: checking for mode_t" >&5 $as_echo_n "checking for mode_t... " >&6; } if test "${ac_cv_type_mode_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_mode_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (mode_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((mode_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_mode_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 $as_echo "$ac_cv_type_mode_t" >&6; } if test "x$ac_cv_type_mode_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi { $as_echo "$as_me:$LINENO: checking for off_t" >&5 $as_echo_n "checking for off_t... " >&6; } if test "${ac_cv_type_off_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_off_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (off_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((off_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_off_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 $as_echo "$ac_cv_type_off_t" >&6; } if test "x$ac_cv_type_off_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi { $as_echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } if test "${ac_cv_c_restrict+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; } int main () { int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t) ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_restrict=$ac_kw else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_restrict" != no && break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5 $as_echo "$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; no) cat >>confdefs.h <<\_ACEOF #define restrict /**/ _ACEOF ;; *) cat >>confdefs.h <<_ACEOF #define restrict $ac_cv_c_restrict _ACEOF ;; esac { $as_echo "$as_me:$LINENO: checking for size_t" >&5 $as_echo_n "checking for size_t... " >&6; } if test "${ac_cv_type_size_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_size_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((size_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 $as_echo "$ac_cv_type_size_t" >&6; } if test "x$ac_cv_type_size_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if test "${ac_cv_header_time+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if test "${ac_cv_struct_tm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_struct_tm=time.h else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF #define TM_IN_SYS_TIME 1 _ACEOF fi # Checks for library functions. { $as_echo "$as_me:$LINENO: checking for error_at_line" >&5 $as_echo_n "checking for error_at_line... " >&6; } if test "${ac_cv_lib_error_at_line+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { error_at_line (0, 0, "", 0, "an error occurred"); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_error_at_line=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_error_at_line=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5 $as_echo "$ac_cv_lib_error_at_line" >&6; } if test $ac_cv_lib_error_at_line = no; then case " $LIBOBJS " in *" error.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS error.$ac_objext" ;; esac fi { $as_echo "$as_me:$LINENO: checking for pid_t" >&5 $as_echo_n "checking for pid_t... " >&6; } if test "${ac_cv_type_pid_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_pid_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((pid_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 $as_echo "$ac_cv_type_pid_t" >&6; } if test "x$ac_cv_type_pid_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi for ac_header in vfork.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to cowtan@ysbl.york.ac.uk ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in fork vfork do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:$LINENO: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if test "${ac_cv_func_fork_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_fork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_fork_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_fork_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:$LINENO: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if test "${ac_cv_func_vfork_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_vfork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_vfork_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_vfork_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WORKING_VFORK 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define vfork fork _ACEOF fi if test "x$ac_cv_func_fork_works" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WORKING_FORK 1 _ACEOF fi for ac_header in stdlib.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to cowtan@ysbl.york.ac.uk ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_malloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_malloc_0_nonnull=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_malloc_0_nonnull=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 0 _ACEOF case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF #define malloc rpl_malloc _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether mbrtowc and mbstate_t are properly declared" >&5 $as_echo_n "checking whether mbrtowc and mbstate_t are properly declared... " >&6; } if test "${ac_cv_func_mbrtowc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { wchar_t wc; char const s[] = ""; size_t n = 1; mbstate_t state; return ! (sizeof state && (mbrtowc) (&wc, s, n, &state)); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_mbrtowc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_mbrtowc=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_mbrtowc" >&5 $as_echo "$ac_cv_func_mbrtowc" >&6; } if test $ac_cv_func_mbrtowc = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MBRTOWC 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for working memcmp" >&5 $as_echo_n "checking for working memcmp... " >&6; } if test "${ac_cv_func_memcmp_working+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_memcmp_working=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Some versions of memcmp are not 8-bit clean. */ char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) return 1; } return 0; } ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_memcmp_working=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 $as_echo "$ac_cv_func_memcmp_working" >&6; } test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac for ac_header in stdlib.h unistd.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to cowtan@ysbl.york.ac.uk ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpagesize do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H # define HAVE_SYS_PARAM_H 1 # endif # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; int i, pagesize; int fd; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) return 1; for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) return 1; if (write (fd, data, pagesize) != pagesize) return 1; close (fd); /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) return 1; data2 = (char *) malloc (2 * pagesize); if (!data2) return 1; data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) return 1; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) return 1; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) return 1; if (read (fd, data3, pagesize) != pagesize) return 1; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) return 1; close (fd); return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_mmap_fixed_mapped=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_mmap_fixed_mapped=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MMAP 1 _ACEOF fi rm -f conftest.mmap for ac_header in stdlib.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to cowtan@ysbl.york.ac.uk ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5 $as_echo_n "checking for GNU libc compatible realloc... " >&6; } if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_realloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { return ! realloc (0, 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_realloc_0_nonnull=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_realloc_0_nonnull=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } if test $ac_cv_func_realloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC 0 _ACEOF case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF #define realloc rpl_realloc _ACEOF fi for ac_header in sys/select.h sys/socket.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to cowtan@ysbl.york.ac.uk ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking types of arguments for select" >&5 $as_echo_n "checking types of arguments for select... " >&6; } if test "${ac_cv_func_select_args+set}" = set; then $as_echo_n "(cached) " >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_SYS_SELECT_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif int main () { extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done done # Provide a safe default value. : ${ac_cv_func_select_args='int,int *,struct timeval *'} fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5 $as_echo "$ac_cv_func_select_args" >&6; } ac_save_IFS=$IFS; IFS=',' set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS shift cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG1 $1 _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG234 ($2) _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG5 ($3) _ACEOF rm -f conftest* if test "${ac_cv_func_setvbuf_reversed+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_func_setvbuf_reversed=no fi { $as_echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 $as_echo_n "checking whether lstat dereferences a symlink specified with a trailing slash... " >&6; } if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then ac_cv_func_lstat_dereferences_slashed_symlink=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_lstat_dereferences_slashed_symlink=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:$LINENO: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_stat_empty_string_bug=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_stat_empty_string_bug=no else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_stat_empty_string_bug=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_stat_empty_string_bug" >&5 $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for working strtod" >&5 $as_echo_n "checking for working strtod... " >&6; } if test "${ac_cv_func_strtod+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_strtod=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #ifndef strtod double strtod (); #endif int main() { { /* Some versions of Linux strtod mis-parse strings with leading '+'. */ char *string = " +69"; char *term; double value; value = strtod (string, &term); if (value != 69 || term != (string + 4)) return 1; } { /* Under Solaris 2.4, strtod returns the wrong value for the terminating character under some conditions. */ char *string = "NaN"; char *term; strtod (string, &term); if (term != string && *(term - 1) == 0) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_strtod=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_strtod=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 $as_echo "$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = no; then case " $LIBOBJS " in *" strtod.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; esac { $as_echo "$as_me:$LINENO: checking for pow" >&5 $as_echo_n "checking for pow... " >&6; } if test "${ac_cv_func_pow+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define pow to an innocuous variant, in case declares pow. For example, HP-UX 11i declares gettimeofday. */ #define pow innocuous_pow /* System header to define __stub macros and hopefully few prototypes, which can conflict with char pow (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef pow /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pow (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_pow || defined __stub___pow choke me #endif int main () { return pow (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_pow=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_pow=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_pow" >&5 $as_echo "$ac_cv_func_pow" >&6; } if test $ac_cv_func_pow = no; then { $as_echo "$as_me:$LINENO: checking for pow in -lm" >&5 $as_echo_n "checking for pow in -lm... " >&6; } if test "${ac_cv_lib_m_pow+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pow (); int main () { return pow (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_m_pow=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_pow=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5 $as_echo "$ac_cv_lib_m_pow" >&6; } if test "x$ac_cv_lib_m_pow" = x""yes; then POW_LIB=-lm else { $as_echo "$as_me:$LINENO: WARNING: cannot find library containing definition of pow" >&5 $as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} fi fi fi for ac_func in vprintf do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF { $as_echo "$as_me:$LINENO: checking for _doprnt" >&5 $as_echo_n "checking for _doprnt... " >&6; } if test "${ac_cv_func__doprnt+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define _doprnt to an innocuous variant, in case declares _doprnt. For example, HP-UX 11i declares gettimeofday. */ #define _doprnt innocuous__doprnt /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _doprnt /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char _doprnt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub__doprnt || defined __stub____doprnt choke me #endif int main () { return _doprnt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func__doprnt=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 $as_echo "$ac_cv_func__doprnt" >&6; } if test "x$ac_cv_func__doprnt" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DOPRNT 1 _ACEOF fi fi done for ac_func in bzero floor gethostbyname gettimeofday localtime_r mbrlen memmove memset mkdir modf munmap pow putenv re_comp regcomp rint select setenv socket sqrt strcasecmp strchr strdup strerror strncasecmp strpbrk strrchr strstr do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in utime.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to cowtan@ysbl.york.ac.uk ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for struct utimbuf" >&5 $as_echo_n "checking for struct utimbuf... " >&6; } if test "${fu_cv_sys_struct_utimbuf+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #ifdef HAVE_UTIME_H # include #endif int main () { static struct utimbuf x; x.actime = x.modtime; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then fu_cv_sys_struct_utimbuf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fu_cv_sys_struct_utimbuf=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $fu_cv_sys_struct_utimbuf" >&5 $as_echo "$fu_cv_sys_struct_utimbuf" >&6; } if test $fu_cv_sys_struct_utimbuf = yes; then if test x = y; then # This code is deliberately never run via ./configure. # This is a hack to make autoheader put the corresponding # HAVE_* undef for this symbol in config.h.in. This saves me the # trouble of having to maintain the #undef in acconfig.h manually. for ac_func in STRUCT_UTIMBUF do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi # Defining it this way (rather than via AC_DEFINE) short-circuits the # autoheader check -- autoheader doesn't know it's already been taken # care of by the hack above. ac_kludge=HAVE_STRUCT_UTIMBUF cat >>confdefs.h <<_ACEOF #define $ac_kludge 1 _ACEOF fi if test "$ac_cv_enable_debug" = yes; then DEBUG_TRUE= DEBUG_FALSE='#' else DEBUG_TRUE='#' DEBUG_FALSE= fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_config_files="$ac_config_files Makefile clipper-config clipper/Makefile clipper/ccp4/Makefile clipper/contrib/Makefile clipper/core/Makefile clipper/mmdb/Makefile clipper/minimol/Makefile clipper/phs/Makefile clipper/cif/Makefile clipper/cns/Makefile examples/Makefile config/Makefile dox/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by clipper $as_me 2.1, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ clipper config.status 2.1 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "clipper-config") CONFIG_FILES="$CONFIG_FILES clipper-config" ;; "clipper/Makefile") CONFIG_FILES="$CONFIG_FILES clipper/Makefile" ;; "clipper/ccp4/Makefile") CONFIG_FILES="$CONFIG_FILES clipper/ccp4/Makefile" ;; "clipper/contrib/Makefile") CONFIG_FILES="$CONFIG_FILES clipper/contrib/Makefile" ;; "clipper/core/Makefile") CONFIG_FILES="$CONFIG_FILES clipper/core/Makefile" ;; "clipper/mmdb/Makefile") CONFIG_FILES="$CONFIG_FILES clipper/mmdb/Makefile" ;; "clipper/minimol/Makefile") CONFIG_FILES="$CONFIG_FILES clipper/minimol/Makefile" ;; "clipper/phs/Makefile") CONFIG_FILES="$CONFIG_FILES clipper/phs/Makefile" ;; "clipper/cif/Makefile") CONFIG_FILES="$CONFIG_FILES clipper/cif/Makefile" ;; "clipper/cns/Makefile") CONFIG_FILES="$CONFIG_FILES clipper/cns/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "config/Makefile") CONFIG_FILES="$CONFIG_FILES config/Makefile" ;; "dox/Makefile") CONFIG_FILES="$CONFIG_FILES dox/Makefile" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi echo " " echo " " Configuration Summary echo "" ------------------------------ echo core: " " yes echo contrib: " " $enable_contrib echo phs: " " $enable_phs if test $enable_mmdb = yes; then echo mmdb: " " $have_mmdb else echo mmdb: " " no fi if test $enable_minimol = yes; then echo minimol: " " $enable_minimol else echo minimol: " " no fi if test $enable_cif = yes; then echo cif: " " $have_mmdb else echo cif: " " no fi if test $enable_ccp4 = yes; then echo ccp4: " " $have_ccp4 else echo ccp4: " " no fi if test $enable_cns = yes; then echo cns: " " $enable_cns else echo cns: " " no fi if test x$enable_gpp4 = xyes; then echo gpp4: " " $enable_gpp4 else echo gpp4: " " no fi echo " " #### clipper-2.1/AUTHORS0000644000374100011300000000010010736662246011000 00000000000000Core: Kevin Cowtan Other Packages: Kevin Cowtan, Paul Emsley clipper-2.1/Makefile.in0000644000374100011300000006146611372264332012012 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/clipper-config.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ccp4.m4 \ $(top_srcdir)/config/clipper.m4 $(top_srcdir)/config/fftw.m4 \ $(top_srcdir)/config/gpp4.m4 $(top_srcdir)/config/mmdb.m4 \ $(top_srcdir)/config/utimbuf.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = clipper-config CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AR = @AR@ AR_FLAGS = @AR_FLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCP4_CXXFLAGS = @CCP4_CXXFLAGS@ CCP4_LIBS = @CCP4_LIBS@ CFLAGS = @CFLAGS@ CLIPPER_CCP4_DIR = @CLIPPER_CCP4_DIR@ CLIPPER_CIF_DIR = @CLIPPER_CIF_DIR@ CLIPPER_CNS_DIR = @CLIPPER_CNS_DIR@ CLIPPER_CONTRIB_DIR = @CLIPPER_CONTRIB_DIR@ CLIPPER_LT_VERSION = @CLIPPER_LT_VERSION@ CLIPPER_MINIMOL_DIR = @CLIPPER_MINIMOL_DIR@ CLIPPER_MMDB_DIR = @CLIPPER_MMDB_DIR@ CLIPPER_PHS_DIR = @CLIPPER_PHS_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_CXXFLAGS = @FFTW_CXXFLAGS@ FFTW_LIBS = @FFTW_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMDB_CXXFLAGS = @MMDB_CXXFLAGS@ MMDB_LIBS = @MMDB_LIBS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # -*- mode: Makefile; mode: font-lock -*- AUTOMAKE_OPTIONS = foreign SUBDIRS = config clipper examples dox DIST_SUBDIRS = config clipper examples dox EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL NEWS README bin_SCRIPTS = clipper-config # pkgconfigdir = $(libdir)/pkgconfig # pkgconfig_DATA = clipper.pc @DEBUG_TRUE@AM_CXXFLAGS = -g -DDEBUG ACLOCAL_AMFLAGS = -I config all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): clipper-config: $(top_builddir)/config.status $(srcdir)/clipper-config.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(SCRIPTS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binSCRIPTS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-binSCRIPTS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: clipper-2.1/clipper-config.in0000644000374100011300000000312011372264321013153 00000000000000#! /bin/sh prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ version=@VERSION@ usage() { cat <&2 fi while test $# -gt 0 ; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --prefix=*) prefix=$optarg local_prefix=yes ;; --prefix) echo_prefix=yes ;; --exec-prefix=*) exec_prefix=$optarg exec_prefix_set=yes local_prefix=yes ;; --exec-prefix) echo_exec_prefix=yes ;; --version) echo $version exit 0 ;; --cflags) echo_cflags=yes ;; --libs) echo_libs=yes ;; *) usage 1 1>&2 ;; esac shift done if test "$local_prefix" = "yes" ; then if test "$exec_prefix_set" != "yes" ; then exec_prefix=$prefix fi fi if test "$echo_prefix" = "yes" ; then echo $prefix fi if test "$echo_exec_prefix" = "yes" ; then echo $exec_prefix fi if test "$echo_cflags" = "yes" ; then cflags="-I${includedir} @CCP4_CXXFLAGS@ @MMDB_CXXFLAGS@ @FFTW_CXXFLAGS@" echo $cflags fi if test "$echo_libs" = "yes" ; then # note BOOST_LIBS should be part of CCTBX_LIBS libs="-lclipper-minimol -lclipper-mmdb -lclipper-cns -lclipper-cif -lclipper-contrib -lclipper-ccp4 -lclipper-phs -lclipper-core @CCP4_LIBS@ @MMDB_LIBS@ @FFTW_LIBS@ @CCTBX_LIBS@" if test "${libdir}" != "/usr/lib" ; then echo -L${libdir} $libs else echo $libs fi fi # EOF clipper-2.1/ltmain.sh0000644000374100011300000054652611372264321011570 00000000000000# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.5.6 TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42)" # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" ##################################### # Shell function definitions: # This seems to be the best place for them # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` if test "X$win32_nmres" = "Ximport" ; then win32_libid_type="x86 archive import" else win32_libid_type="x86 archive static" fi fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo $echo "Copyright (C) 2003 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $EXIT_SUCCESS ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $EXIT_SUCCESS ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $EXIT_SUCCESS ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case "$arg_mode" in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo $srcfile > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi fi build_libtool_libs=no build_old_libs=yes prefer_static_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 exit $EXIT_FAILURE fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-mingw* | *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # gcc -m* arguments should be passed to the linker via $compiler_flags # in order to pass architecture information to the linker # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo # but this is not reliable with gcc because gcc may use -mfoo to # select a different linker, different libraries, etc, while # -Wl,-mfoo simply passes -mfoo to the linker. -m*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" if test "$with_gcc" = "yes" ; then compiler_flags="$compiler_flags $arg" fi continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test "$status" -ne 0 && test ! -d "$output_objdir"; then exit $status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) if test "$deplibs_check_method" != pass_all; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var"; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $dir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5* ) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else convenience="$convenience $dir/$old_library" old_convenience="$old_convenience $dir/$old_library" deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$deplibs $path" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in [0-9]*) ;; *) $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in [0-9]*) ;; *) $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in [0-9]*) ;; *) $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) major=`expr $current - $age + 1` case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. for path in $notinst_path; do lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name="`expr $a_deplib : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$save_output-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$save_output-${k}.$objext k=`expr $k + 1` output=$output_objdir/$save_output-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadale object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$output.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) cwrappersource=`$echo ${objdir}/lt-${output}.c` cwrapper=`$echo ${output}.exe` $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR #define DIR_SEPARATOR '/' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) #define HAVE_DOS_BASED_FILE_SYSTEM #ifndef DIR_SEPARATOR_2 #define DIR_SEPARATOR_2 '\\' #endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); char * basename (const char *name); char * fnqualify(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup ((char *) basename (argv[0])); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = fnqualify(argv[0]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } char * basename (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha (name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return (char *) base; } char * fnqualify(const char *path) { size_t size; char *p; char tmp[LT_PATHMAX + 1]; assert(path != NULL); /* Is it qualified already? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha (path[0]) && path[1] == ':') return xstrdup (path); #endif if (IS_DIR_SEPARATOR (path[0])) return xstrdup (path); /* prepend the current directory */ /* doesn't handle '~' */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ p = XMALLOC(char, size); sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); return p; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \$progdir\\\\\$program \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \$progdir/\$program \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" # Add in members from convenience archives. for xlib in $addlibs; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` done fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # GNU ar 2.10+ was changed to match POSIX; thus no paths are # encoded into archives. This makes 'ar r' malfunction in # this piecewise linking case whenever conflicting object # names appear in distinct ar calls; check, warn and compensate. if (for obj in $save_oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 AR_FLAGS=cq fi # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg="$nonopt" fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest="$arg" continue fi case $arg in -d) isdir=yes ;; -f) prev="-f" ;; -g) prev="-g" ;; -m) prev="-m" ;; -o) prev="-o" ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest="$arg" continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir="$tmpdir/libtool-$$" save_umask=`umask` umask 0077 if $mkdir "$tmpdir"; then umask $save_umask else umask $save_umask $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyways case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "----------------------------------------------------------------------" $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "----------------------------------------------------------------------" exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" if test "$mode" = uninstall; then if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. fi fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $EXIT_SUCCESS # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: clipper-2.1/configure.ac0000754000374100011300000002116211372264321012220 00000000000000# -*- mode: Autoconf; mode: font-lock -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) AC_INIT(clipper, 2.1, cowtan@ysbl.york.ac.uk) AC_CONFIG_SRCDIR([clipper/clipper.h]) ##AC_CONFIG_HEADER(config.h) AC_CONFIG_AUX_DIR([config]) AM_INIT_AUTOMAKE AC_PROG_LIBTOOL ##AM_MAINTAINER_MODE AC_LANG(C++) # Checks for programs. AC_PROG_CXX(xlc++ CC cxx c++ icc g++) AC_PROG_CC(xlc cc icc gcc) AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_LIBTOOL CLIPPER_LT_VERSION="2:7:0" AC_SUBST(CLIPPER_LT_VERSION) # Optional args AC_ARG_ENABLE(debug, AC_HELP_STRING( [--enable-debug], [ enable debugging options ] ), [ac_cv_enable_debug=yes ], [ac_cv_enable_debug=no ] ) AC_ARG_ENABLE(contrib, AC_HELP_STRING( [--enable-contrib], [enable contrib library (default yes)] ), [ case $enableval in yes) enable_contrib=yes ;; no) enable_contrib=no ;; *) enable_contrib=yes esac ], [ enable_contrib=yes ] #dnl default is yes ) AS_IF([test "$enable_contrib" = yes], [ CLIPPER_CONTRIB_DIR="contrib"], [ CLIPPER_CONTRIB_DIR="" ] ) AC_SUBST(CLIPPER_CONTRIB_DIR) AC_ARG_ENABLE(phs, AC_HELP_STRING( [--enable-phs], [enable PHASEs file interface library (default yes)] ), [ case $enableval in yes) enable_phs=yes ;; no) enable_phs=no ;; *) enable_phs=yes esac ], [ enable_phs=yes ] #dnl default is yes ) AS_IF([test "$enable_phs" = yes], [ CLIPPER_PHS_DIR="phs"], [ CLIPPER_PHS_DIR="" ] ) AC_SUBST(CLIPPER_PHS_DIR) AC_ARG_ENABLE(mmdb, AC_HELP_STRING( [--enable-mmdb], [enable mmdb-interface library (requires mmdb library, default no)] ), [ case $enableval in yes) enable_mmdb=yes ;; no) enable_mmdb=no ;; *) enable_mmdb=no esac ], [ enable_mmdb=no ] #dnl default is no ) AS_IF([test "$enable_mmdb" = yes], [ CLIPPER_MMDB_DIR="mmdb" ], [ CLIPPER_MMDB_DIR="" ] ) AC_SUBST(CLIPPER_MMDB_DIR) #dnl minimol AC_ARG_ENABLE(minimol, AC_HELP_STRING( [--enable-minimol], [enable minimol library (requires mmdb library, default no)] ), [ case $enableval in yes) enable_minimol=yes ;; no) enable_minimol=no ;; *) enable_minimol=no esac ], [ enable_minimol=no ] #dnl default is no ) AS_IF([test "$enable_minimol" = yes], [ CLIPPER_MINIMOL_DIR="minimol" ], [ CLIPPER_MINIMOL_DIR="" ] ) AC_SUBST(CLIPPER_MINIMOL_DIR) dnl cif AC_ARG_ENABLE(cif, AC_HELP_STRING( [--enable-cif], [enable cif-interface library (requires mmdb library, default no)] ), [ case $enableval in yes) enable_cif=yes ;; no) enable_cif=no ;; *) enable_cif=no esac ], [ enable_cif=no ] #dnl default is no ) AS_IF([test "$enable_cif" = yes], [ CLIPPER_CIF_DIR="cif"], [ CLIPPER_CIF_DIR="" ] ) AC_SUBST(CLIPPER_CIF_DIR) AC_ARG_ENABLE(ccp4, AC_HELP_STRING( [--enable-ccp4], [enable ccp4-interface library (requires ccp4c library, default no)] ), [ case $enableval in yes) enable_ccp4=yes;; no) enable_ccp4=no ;; *) enable_ccp4=no esac ], [ enable_ccp4=no ] #dnl default is no ) AC_ARG_ENABLE(gpp4, AC_HELP_STRING( [--enable-gpp4], [enable gpp4 library (default no)] ), [ case $enableval in yes) enable_gpp4=yes ;; no) enable_gpp4=no ;; *) enable_gpp4=no esac ], [ enable_gpp4=no ] #dnl default is no ) AS_IF([test "$enable_ccp4" = yes -o "$enable_gpp4" = yes], [ CLIPPER_CCP4_DIR="ccp4"], [ CLIPPER_CCP4_DIR="" ] ) AC_SUBST(CLIPPER_CCP4_DIR) AC_ARG_ENABLE(cns, AC_HELP_STRING( [--enable-cns], [enable cns-hkl-interface library (default no)] ), [ case $enableval in no) enable_cns=no ;; *) enable_cns=yes esac ], [ enable_cns=no ] #dnl default is no ) AS_IF([test "$enable_cns" = yes], [ CLIPPER_CNS_DIR="cns"], [ CLIPPER_CNS_DIR="" ] ) AC_SUBST(CLIPPER_CNS_DIR) AC_CLIPPER_OPTIONS # test for function in m AC_CHECK_LIB([m], [sqrt]) dnl Check for FFTW. AM_PATH_FFTW(, AC_MSG_ERROR([locating necessary fftw]) ) AC_DEFINE([FFTW_ENABLE_FLOAT]) dnl Optional: Check for MMDB. AM_PATH_MMDB(, [ if test "x$mmdb_prefix" != x ; then if test "x$ac_MMDB_CXXFLAGS" != x ; then case "$ac_MMDB_CXXFLAGS" in *src/mmdb ) ac_MMDB_LDOPTS=`echo "$ac_MMDB_CXXFLAGS" | sed s#src/mmdb#src#g` ;; *include/mmdb ) ac_MMDB_LDOPTS=`echo "$ac_MMDB_CXXFLAGS" | sed s#include/mmdb#lib#g` ;; *) esac MMDB_CXXFLAGS="$ac_MMDB_CXXFLAGS" MMDB_LIBS=`echo "$ac_MMDB_LDOPTS -lmmdb" | sed s#-I#-L#` AC_MSG_WARN([assuming library $MMDB_LIBS headers $MMDB_CXXFLAGS]) else MMDB_CXXFLAGS="-I$mmdb_prefix/src -I$mmdb_prefix/include" MMDB_LIBS="-L$mmdb_prefix/src -L$mmdb_prefix/lib -lmmdb" AC_MSG_WARN([assuming library $MMDB_LIBS headers $MMDB_CXXFLAGS]) fi else test $enable_mmdb = yes && AC_MSG_ERROR([Failed to find mmdb, but --enable-mmdb was given ]) test $enable_minimol = yes && AC_MSG_ERROR([Failed to find mmdb, but --enable-minimol was given]) AC_MSG_WARN([mmdb not found]) fi ] ) AM_PATH_GPP4(, [ test x$enable_gpp4 = xyes && AC_MSG_ERROR([Failed to find gpp4, but --enable-gpp4 was given ]) AC_MSG_WARN([gpp4 not found]) ] ) dnl Optional: Check for CCP4. AM_PATH_CCP4(, [ if test "x$ccp4_prefix" != x ; then if test "x$ac_CCP4_CXXFLAGS" != x ; then case "$ac_CCP4_CXXFLAGS" in *include/ccp4 ) ac_CCP4_LDOPTS=`echo "$ac_CCP4_CXXFLAGS" | sed s#include/ccp4#lib#g` ;; *) ac_CCP4_LDOPTS="$ac_CCP4_CXXFLAGS" esac ac_CCP4_LDOPTS=`echo "$ac_CCP4_LDOPTS" | sed s#-I#-L#` CCP4_CXXFLAGS="$ac_CCP4_CXXFLAGS" CCP4_LIBS="$ac_CCP4_LDOPTS -lccp4c" AC_MSG_WARN([assuming library $CCP4_LIBS headers $CCP4_CXXFLAGS]) else CCP4_CXXFLAGS="-I$ccp4_prefix/lib/src" CCP4_LIBS="-L$ccp4_prefix/lib/src -L$ccp4_prefix/lib -lccp4c" AC_MSG_WARN([assuming library $CCP4_LIBS headers $CCP4_CXXFLAGS]) fi else test $enable_ccp4 = yes && AC_MSG_ERROR([Failed to find ccp4 libs, but --enable-ccp4 was given ]) AC_MSG_WARN([ccp4 not found]) fi ] ) # Checks for library functions. AC_CHECK_FUNCS([floor pow rint]) # Checks for header files. AC_FUNC_ALLOCA AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([OS.h arpa/inet.h fcntl.h float.h libintl.h limits.h locale.h malloc.h memory.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/file.h sys/socket.h sys/time.h unistd.h wchar.h wctype.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_CONST AC_C_INLINE AC_TYPE_MODE_T AC_TYPE_OFF_T AC_C_RESTRICT AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM # Checks for library functions. AC_FUNC_ERROR_AT_LINE AC_FUNC_FORK AC_FUNC_MALLOC AC_FUNC_MBRTOWC AC_FUNC_MEMCMP AC_FUNC_MMAP AC_FUNC_REALLOC AC_FUNC_SELECT_ARGTYPES AC_FUNC_SETVBUF_REVERSED AC_FUNC_STAT AC_FUNC_STRTOD AC_FUNC_VPRINTF AC_CHECK_FUNCS([bzero floor gethostbyname gettimeofday localtime_r mbrlen memmove memset mkdir modf munmap pow putenv re_comp regcomp rint select setenv socket sqrt strcasecmp strchr strdup strerror strncasecmp strpbrk strrchr strstr]) jm_STRUCT_UTIMBUF AC_SUBST(AR_FLAGS) AM_CONDITIONAL(DEBUG, test "$ac_cv_enable_debug" = yes) AM_CONDITIONAL(AMDEP, test "x$enable_dependency_tracking" != xno) AC_CONFIG_FILES([Makefile clipper-config clipper/Makefile clipper/ccp4/Makefile clipper/contrib/Makefile clipper/core/Makefile clipper/mmdb/Makefile clipper/minimol/Makefile clipper/phs/Makefile clipper/cif/Makefile clipper/cns/Makefile examples/Makefile config/Makefile dox/Makefile ]) AC_OUTPUT echo " " echo " " Configuration Summary echo "" ------------------------------ echo core: " " yes echo contrib: " " $enable_contrib echo phs: " " $enable_phs if test $enable_mmdb = yes; then echo mmdb: " " $have_mmdb else echo mmdb: " " no fi if test $enable_minimol = yes; then echo minimol: " " $enable_minimol else echo minimol: " " no fi if test $enable_cif = yes; then echo cif: " " $have_mmdb else echo cif: " " no fi if test $enable_ccp4 = yes; then echo ccp4: " " $have_ccp4 else echo ccp4: " " no fi if test $enable_cns = yes; then echo cns: " " $enable_cns else echo cns: " " no fi if test x$enable_gpp4 = xyes; then echo gpp4: " " $enable_gpp4 else echo gpp4: " " no fi echo " " ####