Changeset 914 for trunk/vizservers


Ignore:
Timestamp:
Mar 4, 2008, 2:15:12 PM (17 years ago)
Author:
gah
Message:

fixes to configure.in

Location:
trunk/vizservers
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/vizservers/configure

    r751 r914  
    11#! /bin/sh
    22# Guess values for system-dependent variables and create Makefiles.
    3 # Generated by GNU Autoconf 2.59 for vizservers 0.1.
     3# Generated by GNU Autoconf 2.61 for vizservers 0.1.
    44#
    55# Report bugs to <rappture@nanohub.org>.
    66#
    7 # Copyright (C) 2003 Free Software Foundation, Inc.
     7# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
     8# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
    89# This configure script is free software; the Free Software Foundation
    910# gives unlimited permission to copy, distribute and modify it.
     
    1213## --------------------- ##
    1314
    14 # Be Bourne compatible
     15# Be more Bourne compatible
     16DUALCASE=1; export DUALCASE # for MKS sh
    1517if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
    1618  emulate sh
     
    1921  # is contrary to our usage.  Disable this feature.
    2022  alias -g '${1+"$@"}'='"$@"'
    21 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
    22   set -o posix
    23 fi
    24 DUALCASE=1; export DUALCASE # for MKS sh
    25 
    26 # Support unset when possible.
    27 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
    28   as_unset=unset
    29 else
    30   as_unset=false
    31 fi
    32 
    33 
    34 # Work around bugs in pre-3.0 UWIN ksh.
    35 $as_unset ENV MAIL MAILPATH
    36 PS1='$ '
    37 PS2='> '
    38 PS4='+ '
    39 
    40 # NLS nuisances.
    41 for as_var in \
    42   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
    43   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
    44   LC_TELEPHONE LC_TIME
    45 do
    46   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
    47     eval $as_var=C; export $as_var
    48   else
    49     $as_unset $as_var
    50   fi
    51 done
    52 
    53 # Required to use basename.
    54 if expr a : '\(a\)' >/dev/null 2>&1; then
    55   as_expr=expr
    56 else
    57   as_expr=false
    58 fi
    59 
    60 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
    61   as_basename=basename
    62 else
    63   as_basename=false
    64 fi
    65 
    66 
    67 # Name of the executable.
    68 as_me=`$as_basename "$0" ||
    69 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
    70          X"$0" : 'X\(//\)$' \| \
    71          X"$0" : 'X\(/\)$' \| \
    72          .     : '\(.\)' 2>/dev/null ||
    73 echo X/"$0" |
    74     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
    75           /^X\/\(\/\/\)$/{ s//\1/; q; }
    76           /^X\/\(\/\).*/{ s//\1/; q; }
    77           s/.*/./; q'`
    78 
    79 
    80 # PATH needs CR, and LINENO needs CR and PATH.
     23  setopt NO_GLOB_SUBST
     24else
     25  case `(set -o) 2>/dev/null` in
     26  *posix*) set -o posix ;;
     27esac
     28
     29fi
     30
     31
     32
     33
     34# PATH needs CR
    8135# Avoid depending upon Character Ranges.
    8236as_cr_letters='abcdefghijklmnopqrstuvwxyz'
     
    9953fi
    10054
    101 
    102   as_lineno_1=$LINENO
    103   as_lineno_2=$LINENO
    104   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
    105   test "x$as_lineno_1" != "x$as_lineno_2" &&
    106   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
    107   # Find who we are.  Look in the path if we contain no path at all
    108   # relative or not.
    109   case $0 in
    110     *[\\/]* ) as_myself=$0 ;;
    111     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     55# Support unset when possible.
     56if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
     57  as_unset=unset
     58else
     59  as_unset=false
     60fi
     61
     62
     63# IFS
     64# We need space, tab and new line, in precisely that order.  Quoting is
     65# there to prevent editors from complaining about space-tab.
     66# (If _AS_PATH_WALK were called with IFS unset, it would disable word
     67# splitting by setting IFS to empty value.)
     68as_nl='
     69'
     70IFS=" ""        $as_nl"
     71
     72# Find who we are.  Look in the path if we contain no directory separator.
     73case $0 in
     74  *[\\/]* ) as_myself=$0 ;;
     75  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    11276for as_dir in $PATH
    11377do
     
    11680  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
    11781done
    118 
    119        ;;
    120   esac
    121   # We did not find ourselves, most probably we were run as `sh COMMAND'
    122   # in which case we are not to be found in the path.
    123   if test "x$as_myself" = x; then
    124     as_myself=$0
     82IFS=$as_save_IFS
     83
     84     ;;
     85esac
     86# We did not find ourselves, most probably we were run as `sh COMMAND'
     87# in which case we are not to be found in the path.
     88if test "x$as_myself" = x; then
     89  as_myself=$0
     90fi
     91if test ! -f "$as_myself"; then
     92  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
     93  { (exit 1); exit 1; }
     94fi
     95
     96# Work around bugs in pre-3.0 UWIN ksh.
     97for as_var in ENV MAIL MAILPATH
     98do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
     99done
     100PS1='$ '
     101PS2='> '
     102PS4='+ '
     103
     104# NLS nuisances.
     105for as_var in \
     106  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
     107  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
     108  LC_TELEPHONE LC_TIME
     109do
     110  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     111    eval $as_var=C; export $as_var
     112  else
     113    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
    125114  fi
    126   if test ! -f "$as_myself"; then
    127     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
    128    { (exit 1); exit 1; }; }
    129   fi
    130   case $CONFIG_SHELL in
    131   '')
     115done
     116
     117# Required to use basename.
     118if expr a : '\(a\)' >/dev/null 2>&1 &&
     119   test "X`expr 00001 : '.*\(...\)'`" = X001; then
     120  as_expr=expr
     121else
     122  as_expr=false
     123fi
     124
     125if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
     126  as_basename=basename
     127else
     128  as_basename=false
     129fi
     130
     131
     132# Name of the executable.
     133as_me=`$as_basename -- "$0" ||
     134$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
     135         X"$0" : 'X\(//\)$' \| \
     136         X"$0" : 'X\(/\)' \| . 2>/dev/null ||
     137echo X/"$0" |
     138    sed '/^.*\/\([^/][^/]*\)\/*$/{
     139            s//\1/
     140            q
     141          }
     142          /^X\/\(\/\/\)$/{
     143            s//\1/
     144            q
     145          }
     146          /^X\/\(\/\).*/{
     147            s//\1/
     148            q
     149          }
     150          s/.*/./; q'`
     151
     152# CDPATH.
     153$as_unset CDPATH
     154
     155
     156if test "x$CONFIG_SHELL" = x; then
     157  if (eval ":") 2>/dev/null; then
     158  as_have_required=yes
     159else
     160  as_have_required=no
     161fi
     162
     163  if test $as_have_required = yes &&     (eval ":
     164(as_func_return () {
     165  (exit \$1)
     166}
     167as_func_success () {
     168  as_func_return 0
     169}
     170as_func_failure () {
     171  as_func_return 1
     172}
     173as_func_ret_success () {
     174  return 0
     175}
     176as_func_ret_failure () {
     177  return 1
     178}
     179
     180exitcode=0
     181if as_func_success; then
     182  :
     183else
     184  exitcode=1
     185  echo as_func_success failed.
     186fi
     187
     188if as_func_failure; then
     189  exitcode=1
     190  echo as_func_failure succeeded.
     191fi
     192
     193if as_func_ret_success; then
     194  :
     195else
     196  exitcode=1
     197  echo as_func_ret_success failed.
     198fi
     199
     200if as_func_ret_failure; then
     201  exitcode=1
     202  echo as_func_ret_failure succeeded.
     203fi
     204
     205if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
     206  :
     207else
     208  exitcode=1
     209  echo positional parameters were not saved.
     210fi
     211
     212test \$exitcode = 0) || { (exit 1); exit 1; }
     213
     214(
     215  as_lineno_1=\$LINENO
     216  as_lineno_2=\$LINENO
     217  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
     218  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
     219") 2> /dev/null; then
     220  :
     221else
     222  as_candidate_shells=
    132223    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    133224for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
     
    135226  IFS=$as_save_IFS
    136227  test -z "$as_dir" && as_dir=.
    137   for as_base in sh bash ksh sh5; do
    138          case $as_dir in
     228  case $as_dir in
    139229         /*)
    140            if ("$as_dir/$as_base" -c '
     230           for as_base in sh bash ksh sh5; do
     231             as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
     232           done;;
     233       esac
     234done
     235IFS=$as_save_IFS
     236
     237
     238      for as_shell in $as_candidate_shells $SHELL; do
     239         # Try only shells that exist, to save several forks.
     240         if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
     241                { ("$as_shell") 2> /dev/null <<\_ASEOF
     242if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
     243  emulate sh
     244  NULLCMD=:
     245  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
     246  # is contrary to our usage.  Disable this feature.
     247  alias -g '${1+"$@"}'='"$@"'
     248  setopt NO_GLOB_SUBST
     249else
     250  case `(set -o) 2>/dev/null` in
     251  *posix*) set -o posix ;;
     252esac
     253
     254fi
     255
     256
     257:
     258_ASEOF
     259}; then
     260  CONFIG_SHELL=$as_shell
     261               as_have_required=yes
     262               if { "$as_shell" 2> /dev/null <<\_ASEOF
     263if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
     264  emulate sh
     265  NULLCMD=:
     266  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
     267  # is contrary to our usage.  Disable this feature.
     268  alias -g '${1+"$@"}'='"$@"'
     269  setopt NO_GLOB_SUBST
     270else
     271  case `(set -o) 2>/dev/null` in
     272  *posix*) set -o posix ;;
     273esac
     274
     275fi
     276
     277
     278:
     279(as_func_return () {
     280  (exit $1)
     281}
     282as_func_success () {
     283  as_func_return 0
     284}
     285as_func_failure () {
     286  as_func_return 1
     287}
     288as_func_ret_success () {
     289  return 0
     290}
     291as_func_ret_failure () {
     292  return 1
     293}
     294
     295exitcode=0
     296if as_func_success; then
     297  :
     298else
     299  exitcode=1
     300  echo as_func_success failed.
     301fi
     302
     303if as_func_failure; then
     304  exitcode=1
     305  echo as_func_failure succeeded.
     306fi
     307
     308if as_func_ret_success; then
     309  :
     310else
     311  exitcode=1
     312  echo as_func_ret_success failed.
     313fi
     314
     315if as_func_ret_failure; then
     316  exitcode=1
     317  echo as_func_ret_failure succeeded.
     318fi
     319
     320if ( set x; as_func_ret_success y && test x = "$1" ); then
     321  :
     322else
     323  exitcode=1
     324  echo positional parameters were not saved.
     325fi
     326
     327test $exitcode = 0) || { (exit 1); exit 1; }
     328
     329(
    141330  as_lineno_1=$LINENO
    142331  as_lineno_2=$LINENO
    143   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
    144332  test "x$as_lineno_1" != "x$as_lineno_2" &&
    145   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
    146              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
    147              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
    148              CONFIG_SHELL=$as_dir/$as_base
    149              export CONFIG_SHELL
    150              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
    151            fi;;
    152          esac
    153        done
    154 done
    155 ;;
    156   esac
     333  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
     334
     335_ASEOF
     336}; then
     337  break
     338fi
     339
     340fi
     341
     342      done
     343
     344      if test "x$CONFIG_SHELL" != x; then
     345  for as_var in BASH_ENV ENV
     346        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
     347        done
     348        export CONFIG_SHELL
     349        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
     350fi
     351
     352
     353    if test $as_have_required = no; then
     354  echo This script requires a shell more modern than all the
     355      echo shells that I found on your system.  Please install a
     356      echo modern shell, or manually run the script under such a
     357      echo shell if you do have one.
     358      { (exit 1); exit 1; }
     359fi
     360
     361
     362fi
     363
     364fi
     365
     366
     367
     368(eval "as_func_return () {
     369  (exit \$1)
     370}
     371as_func_success () {
     372  as_func_return 0
     373}
     374as_func_failure () {
     375  as_func_return 1
     376}
     377as_func_ret_success () {
     378  return 0
     379}
     380as_func_ret_failure () {
     381  return 1
     382}
     383
     384exitcode=0
     385if as_func_success; then
     386  :
     387else
     388  exitcode=1
     389  echo as_func_success failed.
     390fi
     391
     392if as_func_failure; then
     393  exitcode=1
     394  echo as_func_failure succeeded.
     395fi
     396
     397if as_func_ret_success; then
     398  :
     399else
     400  exitcode=1
     401  echo as_func_ret_success failed.
     402fi
     403
     404if as_func_ret_failure; then
     405  exitcode=1
     406  echo as_func_ret_failure succeeded.
     407fi
     408
     409if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
     410  :
     411else
     412  exitcode=1
     413  echo positional parameters were not saved.
     414fi
     415
     416test \$exitcode = 0") || {
     417  echo No shell found that supports shell functions.
     418  echo Please tell autoconf@gnu.org about your system,
     419  echo including any error possibly output before this
     420  echo message
     421}
     422
     423
     424
     425  as_lineno_1=$LINENO
     426  as_lineno_2=$LINENO
     427  test "x$as_lineno_1" != "x$as_lineno_2" &&
     428  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
    157429
    158430  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
    159431  # uniformly replaced by the line number.  The first 'sed' inserts a
    160   # line-number line before each line; the second 'sed' does the real
    161   # work.  The second script uses 'N' to pair each line-number line
    162   # with the numbered line, and appends trailing '-' during
    163   # substitution so that $LINENO is not a special case at line end.
     432  # line-number line after each line using $LINENO; the second 'sed'
     433  # does the real work.  The second script uses 'N' to pair each
     434  # line-number line with the line containing $LINENO, and appends
     435  # trailing '-' during substitution so that $LINENO is not a special
     436  # case at line end.
    164437  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
    165   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
    166   sed '=' <$as_myself |
     438  # scripts with optimization help from Paolo Bonzini.  Blame Lee
     439  # E. McMahon (1931-1989) for sed's syntax.  :-)
     440  sed -n '
     441    p
     442    /[$]LINENO/=
     443  ' <$as_myself |
    167444    sed '
     445      s/[$]LINENO.*/&-/
     446      t lineno
     447      b
     448      :lineno
    168449      N
    169       s,$,-,
    170       : loop
    171       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
     450      :loop
     451      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
    172452      t loop
    173       s,-$,,
    174       s,^['$as_cr_digits']*\n,,
     453      s/-\n.*//
    175454    ' >$as_me.lineno &&
    176   chmod +x $as_me.lineno ||
     455  chmod +x "$as_me.lineno" ||
    177456    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
    178457   { (exit 1); exit 1; }; }
     
    180459  # Don't try to exec as it changes $[0], causing all sort of problems
    181460  # (the dirname of $[0] is not the place where we might find the
    182   # original and so on.  Autoconf is especially sensible to this).
    183   . ./$as_me.lineno
     461  # original and so on.  Autoconf is especially sensitive to this).
     462  . "./$as_me.lineno"
    184463  # Exit status is that of the last command.
    185464  exit
     
    187466
    188467
    189 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
    190   *c*,-n*) ECHO_N= ECHO_C='
    191 ' ECHO_T='      ' ;;
    192   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
    193   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
    194 esac
    195 
    196 if expr a : '\(a\)' >/dev/null 2>&1; then
     468if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
     469  as_dirname=dirname
     470else
     471  as_dirname=false
     472fi
     473
     474ECHO_C= ECHO_N= ECHO_T=
     475case `echo -n x` in
     476-n*)
     477  case `echo 'x\c'` in
     478  *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
     479  *)   ECHO_C='\c';;
     480  esac;;
     481*)
     482  ECHO_N='-n';;
     483esac
     484
     485if expr a : '\(a\)' >/dev/null 2>&1 &&
     486   test "X`expr 00001 : '.*\(...\)'`" = X001; then
    197487  as_expr=expr
    198488else
     
    201491
    202492rm -f conf$$ conf$$.exe conf$$.file
     493if test -d conf$$.dir; then
     494  rm -f conf$$.dir/conf$$.file
     495else
     496  rm -f conf$$.dir
     497  mkdir conf$$.dir
     498fi
    203499echo >conf$$.file
    204500if ln -s conf$$.file conf$$ 2>/dev/null; then
    205   # We could just check for DJGPP; but this test a) works b) is more generic
    206   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
    207   if test -f conf$$.exe; then
    208     # Don't use ln at all; we don't have any links
     501  as_ln_s='ln -s'
     502  # ... but there are two gotchas:
     503  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     504  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
     505  # In both cases, we have to default to `cp -p'.
     506  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
    209507    as_ln_s='cp -p'
    210   else
    211     as_ln_s='ln -s'
    212   fi
    213508elif ln conf$$.file conf$$ 2>/dev/null; then
    214509  as_ln_s=ln
     
    216511  as_ln_s='cp -p'
    217512fi
    218 rm -f conf$$ conf$$.exe conf$$.file
     513rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
     514rmdir conf$$.dir 2>/dev/null
    219515
    220516if mkdir -p . 2>/dev/null; then
     
    225521fi
    226522
    227 as_executable_p="test -f"
     523if test -x / >/dev/null 2>&1; then
     524  as_test_x='test -x'
     525else
     526  if ls -dL / >/dev/null 2>&1; then
     527    as_ls_L_option=L
     528  else
     529    as_ls_L_option=
     530  fi
     531  as_test_x='
     532    eval sh -c '\''
     533      if test -d "$1"; then
     534        test -d "$1/.";
     535      else
     536        case $1 in
     537        -*)set "./$1";;
     538        esac;
     539        case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
     540        ???[sx]*):;;*)false;;esac;fi
     541    '\'' sh
     542  '
     543fi
     544as_executable_p=$as_test_x
    228545
    229546# Sed expression to map a string onto a valid CPP name.
     
    234551
    235552
    236 # IFS
    237 # We need space, tab and new line, in precisely that order.
    238 as_nl='
    239 '
    240 IFS="   $as_nl"
    241 
    242 # CDPATH.
    243 $as_unset CDPATH
    244 
     553
     554exec 7<&0 </dev/null 6>&1
    245555
    246556# Name of the host.
     
    249559ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
    250560
    251 exec 6>&1
    252 
    253561#
    254562# Initializations.
    255563#
    256564ac_default_prefix=/usr/local
     565ac_clean_files=
    257566ac_config_libobj_dir=.
     567LIBOBJS=
    258568cross_compiling=no
    259569subdirs=
     
    261571MAKEFLAGS=
    262572SHELL=${CONFIG_SHELL-/bin/sh}
    263 
    264 # Maximum number of lines to put in a shell here document.
    265 # This variable seems obsolete.  It should probably be removed, and
    266 # only ac_max_sed_lines should be used.
    267 : ${ac_max_here_lines=38}
    268573
    269574# Identity of this package.
     
    277582ac_includes_default="\
    278583#include <stdio.h>
    279 #if HAVE_SYS_TYPES_H
     584#ifdef HAVE_SYS_TYPES_H
    280585# include <sys/types.h>
    281586#endif
    282 #if HAVE_SYS_STAT_H
     587#ifdef HAVE_SYS_STAT_H
    283588# include <sys/stat.h>
    284589#endif
    285 #if STDC_HEADERS
     590#ifdef STDC_HEADERS
    286591# include <stdlib.h>
    287592# include <stddef.h>
    288593#else
    289 # if HAVE_STDLIB_H
     594# ifdef HAVE_STDLIB_H
    290595#  include <stdlib.h>
    291596# endif
    292597#endif
    293 #if HAVE_STRING_H
    294 # if !STDC_HEADERS && HAVE_MEMORY_H
     598#ifdef HAVE_STRING_H
     599# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
    295600#  include <memory.h>
    296601# endif
    297602# include <string.h>
    298603#endif
    299 #if HAVE_STRINGS_H
     604#ifdef HAVE_STRINGS_H
    300605# include <strings.h>
    301606#endif
    302 #if HAVE_INTTYPES_H
     607#ifdef HAVE_INTTYPES_H
    303608# include <inttypes.h>
    304 #else
    305 # if HAVE_STDINT_H
    306 #  include <stdint.h>
    307 # endif
    308609#endif
    309 #if HAVE_UNISTD_H
     610#ifdef HAVE_STDINT_H
     611# include <stdint.h>
     612#endif
     613#ifdef HAVE_UNISTD_H
    310614# include <unistd.h>
    311615#endif"
    312616
    313 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION LIB_SEARCH_DIRS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX SUBDIRS CXXCPP EGREP TCL_LIB_DIR TCL_LIB TCL_LIB_VERSION TCL_INCL_DIR RP2_INCL_DIR RP_DIR LIBOBJS LTLIBOBJS'
     617ac_subst_vars='SHELL
     618PATH_SEPARATOR
     619PACKAGE_NAME
     620PACKAGE_TARNAME
     621PACKAGE_VERSION
     622PACKAGE_STRING
     623PACKAGE_BUGREPORT
     624exec_prefix
     625prefix
     626program_transform_name
     627bindir
     628sbindir
     629libexecdir
     630datarootdir
     631datadir
     632sysconfdir
     633sharedstatedir
     634localstatedir
     635includedir
     636oldincludedir
     637docdir
     638infodir
     639htmldir
     640dvidir
     641pdfdir
     642psdir
     643libdir
     644localedir
     645mandir
     646DEFS
     647ECHO_C
     648ECHO_N
     649ECHO_T
     650LIBS
     651build_alias
     652host_alias
     653target_alias
     654VERSION
     655LIB_SEARCH_DIRS
     656INSTALL_PROGRAM
     657INSTALL_SCRIPT
     658INSTALL_DATA
     659SET_MAKE
     660CC
     661CFLAGS
     662LDFLAGS
     663CPPFLAGS
     664ac_ct_CC
     665EXEEXT
     666OBJEXT
     667RANLIB
     668CXX
     669CXXFLAGS
     670ac_ct_CXX
     671SUBDIRS
     672CXXCPP
     673GREP
     674EGREP
     675TCL_LIB_DIR
     676TCL_LIB
     677TCL_LIB_VERSION
     678TCL_INCL_DIR
     679RP2_INCL_DIR
     680RP_DIR
     681LIBOBJS
     682LTLIBOBJS'
    314683ac_subst_files=''
     684      ac_precious_vars='build_alias
     685host_alias
     686target_alias
     687CC
     688CFLAGS
     689LDFLAGS
     690LIBS
     691CPPFLAGS
     692CXX
     693CXXFLAGS
     694CCC
     695CXXCPP'
     696
    315697
    316698# Initialize some variables set by options.
     
    339721# by default will actually change.
    340722# Use braces instead of parens because sh, perl, etc. also accept them.
     723# (The list follows the same order as the GNU Coding Standards.)
    341724bindir='${exec_prefix}/bin'
    342725sbindir='${exec_prefix}/sbin'
    343726libexecdir='${exec_prefix}/libexec'
    344 datadir='${prefix}/share'
     727datarootdir='${prefix}/share'
     728datadir='${datarootdir}'
    345729sysconfdir='${prefix}/etc'
    346730sharedstatedir='${prefix}/com'
    347731localstatedir='${prefix}/var'
    348 libdir='${exec_prefix}/lib'
    349732includedir='${prefix}/include'
    350733oldincludedir='/usr/include'
    351 infodir='${prefix}/info'
    352 mandir='${prefix}/man'
     734docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
     735infodir='${datarootdir}/info'
     736htmldir='${docdir}'
     737dvidir='${docdir}'
     738pdfdir='${docdir}'
     739psdir='${docdir}'
     740libdir='${exec_prefix}/lib'
     741localedir='${datarootdir}/locale'
     742mandir='${datarootdir}/man'
    353743
    354744ac_prev=
     745ac_dashdash=
    355746for ac_option
    356747do
    357748  # If the previous option needs an argument, assign it.
    358749  if test -n "$ac_prev"; then
    359     eval "$ac_prev=\$ac_option"
     750    eval $ac_prev=\$ac_option
    360751    ac_prev=
    361752    continue
    362753  fi
    363754
    364   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
     755  case $ac_option in
     756  *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
     757  *)    ac_optarg=yes ;;
     758  esac
    365759
    366760  # Accept the important Cygnus configure options, so we can diagnose typos.
    367761
    368   case $ac_option in
     762  case $ac_dashdash$ac_option in
     763  --)
     764    ac_dashdash=yes ;;
    369765
    370766  -bindir | --bindir | --bindi | --bind | --bin | --bi)
     
    388784    cache_file=config.cache ;;
    389785
    390   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
     786  -datadir | --datadir | --datadi | --datad)
    391787    ac_prev=datadir ;;
    392   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
    393   | --da=*)
     788  -datadir=* | --datadir=* | --datadi=* | --datad=*)
    394789    datadir=$ac_optarg ;;
     790
     791  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
     792  | --dataroo | --dataro | --datar)
     793    ac_prev=datarootdir ;;
     794  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
     795  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
     796    datarootdir=$ac_optarg ;;
    395797
    396798  -disable-* | --disable-*)
    397799    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
    398800    # Reject names that are not valid shell variable names.
    399     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
     801    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
    400802      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
    401803   { (exit 1); exit 1; }; }
    402     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
    403     eval "enable_$ac_feature=no" ;;
     804    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
     805    eval enable_$ac_feature=no ;;
     806
     807  -docdir | --docdir | --docdi | --doc | --do)
     808    ac_prev=docdir ;;
     809  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
     810    docdir=$ac_optarg ;;
     811
     812  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
     813    ac_prev=dvidir ;;
     814  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
     815    dvidir=$ac_optarg ;;
    404816
    405817  -enable-* | --enable-*)
    406818    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
    407819    # Reject names that are not valid shell variable names.
    408     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
     820    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
    409821      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
    410822   { (exit 1); exit 1; }; }
    411     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
    412     case $ac_option in
    413       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
    414       *) ac_optarg=yes ;;
    415     esac
    416     eval "enable_$ac_feature='$ac_optarg'" ;;
     823    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
     824    eval enable_$ac_feature=\$ac_optarg ;;
    417825
    418826  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
     
    441849    host_alias=$ac_optarg ;;
    442850
     851  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
     852    ac_prev=htmldir ;;
     853  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
     854  | --ht=*)
     855    htmldir=$ac_optarg ;;
     856
    443857  -includedir | --includedir | --includedi | --included | --include \
    444858  | --includ | --inclu | --incl | --inc)
     
    465879    libexecdir=$ac_optarg ;;
    466880
     881  -localedir | --localedir | --localedi | --localed | --locale)
     882    ac_prev=localedir ;;
     883  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
     884    localedir=$ac_optarg ;;
     885
    467886  -localstatedir | --localstatedir | --localstatedi | --localstated \
    468   | --localstate | --localstat | --localsta | --localst \
    469   | --locals | --local | --loca | --loc | --lo)
     887  | --localstate | --localstat | --localsta | --localst | --locals)
    470888    ac_prev=localstatedir ;;
    471889  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
    472   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
    473   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
     890  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
    474891    localstatedir=$ac_optarg ;;
    475892
     
    536953    program_transform_name=$ac_optarg ;;
    537954
     955  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
     956    ac_prev=pdfdir ;;
     957  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
     958    pdfdir=$ac_optarg ;;
     959
     960  -psdir | --psdir | --psdi | --psd | --ps)
     961    ac_prev=psdir ;;
     962  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
     963    psdir=$ac_optarg ;;
     964
    538965  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
    539966  | -silent | --silent | --silen | --sile | --sil)
     
    5881015    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
    5891016    # Reject names that are not valid shell variable names.
    590     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
     1017    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
    5911018      { echo "$as_me: error: invalid package name: $ac_package" >&2
    5921019   { (exit 1); exit 1; }; }
    593     ac_package=`echo $ac_package| sed 's/-/_/g'`
    594     case $ac_option in
    595       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
    596       *) ac_optarg=yes ;;
    597     esac
    598     eval "with_$ac_package='$ac_optarg'" ;;
     1020    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
     1021    eval with_$ac_package=\$ac_optarg ;;
    5991022
    6001023  -without-* | --without-*)
    6011024    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
    6021025    # Reject names that are not valid shell variable names.
    603     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
     1026    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
    6041027      { echo "$as_me: error: invalid package name: $ac_package" >&2
    6051028   { (exit 1); exit 1; }; }
    606     ac_package=`echo $ac_package | sed 's/-/_/g'`
    607     eval "with_$ac_package=no" ;;
     1029    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
     1030    eval with_$ac_package=no ;;
    6081031
    6091032  --x)
     
    6361059      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
    6371060   { (exit 1); exit 1; }; }
    638     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
    639     eval "$ac_envvar='$ac_optarg'"
     1061    eval $ac_envvar=\$ac_optarg
    6401062    export $ac_envvar ;;
    6411063
     
    6571079fi
    6581080
    659 # Be sure to have absolute paths.
    660 for ac_var in exec_prefix prefix
     1081# Be sure to have absolute directory names.
     1082for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
     1083                datadir sysconfdir sharedstatedir localstatedir includedir \
     1084                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
     1085                libdir localedir mandir
    6611086do
    662   eval ac_val=$`echo $ac_var`
     1087  eval ac_val=\$$ac_var
    6631088  case $ac_val in
    664     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
    665     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
    666    { (exit 1); exit 1; }; };;
     1089    [\\/$]* | ?:[\\/]* )  continue;;
     1090    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
    6671091  esac
    668 done
    669 
    670 # Be sure to have absolute paths.
    671 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
    672               localstatedir libdir includedir oldincludedir infodir mandir
    673 do
    674   eval ac_val=$`echo $ac_var`
    675   case $ac_val in
    676     [\\/$]* | ?:[\\/]* ) ;;
    677     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
    678    { (exit 1); exit 1; }; };;
    679   esac
     1092  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
     1093   { (exit 1); exit 1; }; }
    6801094done
    6811095
     
    7041118
    7051119
     1120ac_pwd=`pwd` && test -n "$ac_pwd" &&
     1121ac_ls_di=`ls -di .` &&
     1122ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
     1123  { echo "$as_me: error: Working directory cannot be determined" >&2
     1124   { (exit 1); exit 1; }; }
     1125test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
     1126  { echo "$as_me: error: pwd does not report name of working directory" >&2
     1127   { (exit 1); exit 1; }; }
     1128
     1129
    7061130# Find the source files, if location was not specified.
    7071131if test -z "$srcdir"; then
    7081132  ac_srcdir_defaulted=yes
    709   # Try the directory containing this script, then its parent.
    710   ac_confdir=`(dirname "$0") 2>/dev/null ||
     1133  # Try the directory containing this script, then the parent directory.
     1134  ac_confdir=`$as_dirname -- "$0" ||
    7111135$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
    7121136         X"$0" : 'X\(//\)[^/]' \| \
    7131137         X"$0" : 'X\(//\)$' \| \
    714          X"$0" : 'X\(/\)' \| \
    715          .     : '\(.\)' 2>/dev/null ||
     1138         X"$0" : 'X\(/\)' \| . 2>/dev/null ||
    7161139echo X"$0" |
    717     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
    718           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
    719           /^X\(\/\/\)$/{ s//\1/; q; }
    720           /^X\(\/\).*/{ s//\1/; q; }
    721           s/.*/./; q'`
     1140    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
     1141            s//\1/
     1142            q
     1143          }
     1144          /^X\(\/\/\)[^/].*/{
     1145            s//\1/
     1146            q
     1147          }
     1148          /^X\(\/\/\)$/{
     1149            s//\1/
     1150            q
     1151          }
     1152          /^X\(\/\).*/{
     1153            s//\1/
     1154            q
     1155          }
     1156          s/.*/./; q'`
    7221157  srcdir=$ac_confdir
    723   if test ! -r $srcdir/$ac_unique_file; then
     1158  if test ! -r "$srcdir/$ac_unique_file"; then
    7241159    srcdir=..
    7251160  fi
     
    7271162  ac_srcdir_defaulted=no
    7281163fi
    729 if test ! -r $srcdir/$ac_unique_file; then
    730   if test "$ac_srcdir_defaulted" = yes; then
    731     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
     1164if test ! -r "$srcdir/$ac_unique_file"; then
     1165  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
     1166  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
    7321167   { (exit 1); exit 1; }; }
    733   else
    734     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
     1168fi
     1169ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
     1170ac_abs_confdir=`(
     1171        cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
    7351172   { (exit 1); exit 1; }; }
    736   fi
    737 fi
    738 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
    739   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
    740    { (exit 1); exit 1; }; }
    741 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
    742 ac_env_build_alias_set=${build_alias+set}
    743 ac_env_build_alias_value=$build_alias
    744 ac_cv_env_build_alias_set=${build_alias+set}
    745 ac_cv_env_build_alias_value=$build_alias
    746 ac_env_host_alias_set=${host_alias+set}
    747 ac_env_host_alias_value=$host_alias
    748 ac_cv_env_host_alias_set=${host_alias+set}
    749 ac_cv_env_host_alias_value=$host_alias
    750 ac_env_target_alias_set=${target_alias+set}
    751 ac_env_target_alias_value=$target_alias
    752 ac_cv_env_target_alias_set=${target_alias+set}
    753 ac_cv_env_target_alias_value=$target_alias
    754 ac_env_CC_set=${CC+set}
    755 ac_env_CC_value=$CC
    756 ac_cv_env_CC_set=${CC+set}
    757 ac_cv_env_CC_value=$CC
    758 ac_env_CFLAGS_set=${CFLAGS+set}
    759 ac_env_CFLAGS_value=$CFLAGS
    760 ac_cv_env_CFLAGS_set=${CFLAGS+set}
    761 ac_cv_env_CFLAGS_value=$CFLAGS
    762 ac_env_LDFLAGS_set=${LDFLAGS+set}
    763 ac_env_LDFLAGS_value=$LDFLAGS
    764 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
    765 ac_cv_env_LDFLAGS_value=$LDFLAGS
    766 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
    767 ac_env_CPPFLAGS_value=$CPPFLAGS
    768 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
    769 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
    770 ac_env_CXX_set=${CXX+set}
    771 ac_env_CXX_value=$CXX
    772 ac_cv_env_CXX_set=${CXX+set}
    773 ac_cv_env_CXX_value=$CXX
    774 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
    775 ac_env_CXXFLAGS_value=$CXXFLAGS
    776 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
    777 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
    778 ac_env_CXXCPP_set=${CXXCPP+set}
    779 ac_env_CXXCPP_value=$CXXCPP
    780 ac_cv_env_CXXCPP_set=${CXXCPP+set}
    781 ac_cv_env_CXXCPP_value=$CXXCPP
     1173        pwd)`
     1174# When building in place, set srcdir=.
     1175if test "$ac_abs_confdir" = "$ac_pwd"; then
     1176  srcdir=.
     1177fi
     1178# Remove unnecessary trailing slashes from srcdir.
     1179# Double slashes in file names in object file debugging info
     1180# mess up M-x gdb in Emacs.
     1181case $srcdir in
     1182*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
     1183esac
     1184for ac_var in $ac_precious_vars; do
     1185  eval ac_env_${ac_var}_set=\${${ac_var}+set}
     1186  eval ac_env_${ac_var}_value=\$${ac_var}
     1187  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
     1188  eval ac_cv_env_${ac_var}_value=\$${ac_var}
     1189done
    7821190
    7831191#
     
    8081216      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
    8091217
    810 _ACEOF
    811 
    812   cat <<_ACEOF
    8131218Installation directories:
    8141219  --prefix=PREFIX         install architecture-independent files in PREFIX
     
    8281233  --sbindir=DIR          system admin executables [EPREFIX/sbin]
    8291234  --libexecdir=DIR       program executables [EPREFIX/libexec]
    830   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
    8311235  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
    8321236  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
     
    8351239  --includedir=DIR       C header files [PREFIX/include]
    8361240  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
    837   --infodir=DIR          info documentation [PREFIX/info]
    838   --mandir=DIR           man documentation [PREFIX/man]
     1241  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
     1242  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
     1243  --infodir=DIR          info documentation [DATAROOTDIR/info]
     1244  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
     1245  --mandir=DIR           man documentation [DATAROOTDIR/man]
     1246  --docdir=DIR           documentation root [DATAROOTDIR/doc/vizservers]
     1247  --htmldir=DIR          html documentation [DOCDIR]
     1248  --dvidir=DIR           dvi documentation [DOCDIR]
     1249  --pdfdir=DIR           pdf documentation [DOCDIR]
     1250  --psdir=DIR            ps documentation [DOCDIR]
    8391251_ACEOF
    8401252
     
    8521264  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
    8531265  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
    854   --with-tcllib=DIR     location of Tcl binary library libtclstubs.a
     1266  --with-tcllib=DIR       location of Tcl binary library libtclstubs.a
    8551267                          [default=/usr/lib]
    856   --with-tclinclude=DIR location of tcl.h header file
    857                           [default=/usr/include]
    858   --with-rappture=DIR   location of rappture files lib/librappture2.a and
     1268  --with-tclinclude=DIR   location of tcl.h header file [default=/usr/include]
     1269  --with-rappture=DIR     location of rappture files lib/librappture2.a and
    8591270                          include/rappture2/rappture2.h [default=/usr]
    8601271
     
    8641275  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
    8651276              nonstandard directory <lib dir>
    866   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
    867               headers in a nonstandard directory <include dir>
     1277  LIBS        libraries to pass to the linker, e.g. -l<library>
     1278  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
     1279              you have headers in a nonstandard directory <include dir>
    8681280  CXX         C++ compiler command
    8691281  CXXFLAGS    C++ compiler flags
     
    8751287Report bugs to <rappture@nanohub.org>.
    8761288_ACEOF
     1289ac_status=$?
    8771290fi
    8781291
    8791292if test "$ac_init_help" = "recursive"; then
    8801293  # If there are subdirs, report their specific --help.
    881   ac_popdir=`pwd`
    8821294  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
    883     test -d $ac_dir || continue
     1295    test -d "$ac_dir" || continue
    8841296    ac_builddir=.
    8851297
    886 if test "$ac_dir" != .; then
     1298case "$ac_dir" in
     1299.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
     1300*)
    8871301  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
    888   # A "../" for each directory in $ac_dir_suffix.
    889   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
    890 else
    891   ac_dir_suffix= ac_top_builddir=
    892 fi
     1302  # A ".." for each directory in $ac_dir_suffix.
     1303  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
     1304  case $ac_top_builddir_sub in
     1305  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
     1306  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
     1307  esac ;;
     1308esac
     1309ac_abs_top_builddir=$ac_pwd
     1310ac_abs_builddir=$ac_pwd$ac_dir_suffix
     1311# for backward compatibility:
     1312ac_top_builddir=$ac_top_build_prefix
    8931313
    8941314case $srcdir in
    895   .)  # No --srcdir option.  We are building in place.
     1315  .)  # We are building in place.
    8961316    ac_srcdir=.
    897     if test -z "$ac_top_builddir"; then
    898        ac_top_srcdir=.
    899     else
    900        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
    901     fi ;;
    902   [\\/]* | ?:[\\/]* )  # Absolute path.
     1317    ac_top_srcdir=$ac_top_builddir_sub
     1318    ac_abs_top_srcdir=$ac_pwd ;;
     1319  [\\/]* | ?:[\\/]* )  # Absolute name.
    9031320    ac_srcdir=$srcdir$ac_dir_suffix;
    904     ac_top_srcdir=$srcdir ;;
    905   *) # Relative path.
    906     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
    907     ac_top_srcdir=$ac_top_builddir$srcdir ;;
    908 esac
    909 
    910 # Do not use `cd foo && pwd` to compute absolute paths, because
    911 # the directories may not exist.
    912 case `pwd` in
    913 .) ac_abs_builddir="$ac_dir";;
    914 *)
    915   case "$ac_dir" in
    916   .) ac_abs_builddir=`pwd`;;
    917   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
    918   *) ac_abs_builddir=`pwd`/"$ac_dir";;
    919   esac;;
    920 esac
    921 case $ac_abs_builddir in
    922 .) ac_abs_top_builddir=${ac_top_builddir}.;;
    923 *)
    924   case ${ac_top_builddir}. in
    925   .) ac_abs_top_builddir=$ac_abs_builddir;;
    926   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
    927   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
    928   esac;;
    929 esac
    930 case $ac_abs_builddir in
    931 .) ac_abs_srcdir=$ac_srcdir;;
    932 *)
    933   case $ac_srcdir in
    934   .) ac_abs_srcdir=$ac_abs_builddir;;
    935   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
    936   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
    937   esac;;
    938 esac
    939 case $ac_abs_builddir in
    940 .) ac_abs_top_srcdir=$ac_top_srcdir;;
    941 *)
    942   case $ac_top_srcdir in
    943   .) ac_abs_top_srcdir=$ac_abs_builddir;;
    944   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
    945   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
    946   esac;;
    947 esac
    948 
    949     cd $ac_dir
    950     # Check for guested configure; otherwise get Cygnus style configure.
    951     if test -f $ac_srcdir/configure.gnu; then
    952       echo
    953       $SHELL $ac_srcdir/configure.gnu  --help=recursive
    954     elif test -f $ac_srcdir/configure; then
    955       echo
    956       $SHELL $ac_srcdir/configure  --help=recursive
    957     elif test -f $ac_srcdir/configure.ac ||
    958            test -f $ac_srcdir/configure.in; then
    959       echo
    960       $ac_configure --help
     1321    ac_top_srcdir=$srcdir
     1322    ac_abs_top_srcdir=$srcdir ;;
     1323  *) # Relative name.
     1324    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
     1325    ac_top_srcdir=$ac_top_build_prefix$srcdir
     1326    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
     1327esac
     1328ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
     1329
     1330    cd "$ac_dir" || { ac_status=$?; continue; }
     1331    # Check for guested configure.
     1332    if test -f "$ac_srcdir/configure.gnu"; then
     1333      echo &&
     1334      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
     1335    elif test -f "$ac_srcdir/configure"; then
     1336      echo &&
     1337      $SHELL "$ac_srcdir/configure" --help=recursive
    9611338    else
    9621339      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
    963     fi
    964     cd "$ac_popdir"
     1340    fi || ac_status=$?
     1341    cd "$ac_pwd" || { ac_status=$?; break; }
    9651342  done
    9661343fi
    9671344
    968 test -n "$ac_init_help" && exit 0
     1345test -n "$ac_init_help" && exit $ac_status
    9691346if $ac_init_version; then
    9701347  cat <<\_ACEOF
    9711348vizservers configure 0.1
    972 generated by GNU Autoconf 2.59
    973 
    974 Copyright (C) 2003 Free Software Foundation, Inc.
     1349generated by GNU Autoconf 2.61
     1350
     1351Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
     13522002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
    9751353This configure script is free software; the Free Software Foundation
    9761354gives unlimited permission to copy, distribute and modify it.
    9771355_ACEOF
    978   exit 0
    979 fi
    980 exec 5>config.log
    981 cat >&5 <<_ACEOF
     1356  exit
     1357fi
     1358cat >config.log <<_ACEOF
    9821359This file contains any messages produced by compilers while
    9831360running configure, to aid debugging if configure makes a mistake.
    9841361
    9851362It was created by vizservers $as_me 0.1, which was
    986 generated by GNU Autoconf 2.59.  Invocation command line was
     1363generated by GNU Autoconf 2.61.  Invocation command line was
    9871364
    9881365  $ $0 $@
    9891366
    9901367_ACEOF
     1368exec 5>>config.log
    9911369{
    9921370cat <<_ASUNAME
     
    10071385/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
    10081386/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
    1009 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
     1387/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
    10101388/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
    10111389/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
     
    10211399  echo "PATH: $as_dir"
    10221400done
     1401IFS=$as_save_IFS
    10231402
    10241403} >&5
     
    10421421ac_configure_args0=
    10431422ac_configure_args1=
    1044 ac_sep=
    10451423ac_must_keep_next=false
    10461424for ac_pass in 1 2
     
    10531431    | -silent | --silent | --silen | --sile | --sil)
    10541432      continue ;;
    1055     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
     1433    *\'*)
    10561434      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
    10571435    esac
     
    10751453        esac
    10761454      fi
    1077       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
    1078       # Get rid of the leading space.
    1079       ac_sep=" "
     1455      ac_configure_args="$ac_configure_args '$ac_arg'"
    10801456      ;;
    10811457    esac
     
    10881464# config.log.  We remove comments because anyway the quotes in there
    10891465# would cause problems or look ugly.
    1090 # WARNING: Be sure not to use single quotes in there, as some shells,
    1091 # such as our DU 5.0 friend, will then `close' the trap.
     1466# WARNING: Use '\'' to represent an apostrophe within the trap.
     1467# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
    10921468trap 'exit_status=$?
    10931469  # Save into config.log some information that might help in debugging.
     
    11021478    echo
    11031479    # The following way of writing the cache mishandles newlines in values,
    1104 {
     1480(
     1481  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
     1482    eval ac_val=\$$ac_var
     1483    case $ac_val in #(
     1484    *${as_nl}*)
     1485      case $ac_var in #(
     1486      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
     1487echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
     1488      esac
     1489      case $ac_var in #(
     1490      _ | IFS | as_nl) ;; #(
     1491      *) $as_unset $ac_var ;;
     1492      esac ;;
     1493    esac
     1494  done
    11051495  (set) 2>&1 |
    1106     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
    1107     *ac_space=\ *)
     1496    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
     1497    *${as_nl}ac_space=\ *)
    11081498      sed -n \
    1109         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
    1110           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
     1499        "s/'\''/'\''\\\\'\'''\''/g;
     1500          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
     1501      ;; #(
     1502    *)
     1503      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
    11111504      ;;
    1112     *)
    1113       sed -n \
    1114         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
    1115       ;;
    1116     esac;
    1117 }
     1505    esac |
     1506    sort
     1507)
    11181508    echo
    11191509
     
    11261516    for ac_var in $ac_subst_vars
    11271517    do
    1128       eval ac_val=$`echo $ac_var`
    1129       echo "$ac_var='"'"'$ac_val'"'"'"
     1518      eval ac_val=\$$ac_var
     1519      case $ac_val in
     1520      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
     1521      esac
     1522      echo "$ac_var='\''$ac_val'\''"
    11301523    done | sort
    11311524    echo
     
    11331526    if test -n "$ac_subst_files"; then
    11341527      cat <<\_ASBOX
    1135 ## ------------- ##
    1136 ## Output files. ##
    1137 ## ------------- ##
     1528## ------------------- ##
     1529## File substitutions. ##
     1530## ------------------- ##
    11381531_ASBOX
    11391532      echo
    11401533      for ac_var in $ac_subst_files
    11411534      do
    1142         eval ac_val=$`echo $ac_var`
    1143         echo "$ac_var='"'"'$ac_val'"'"'"
     1535        eval ac_val=\$$ac_var
     1536        case $ac_val in
     1537        *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
     1538        esac
     1539        echo "$ac_var='\''$ac_val'\''"
    11441540      done | sort
    11451541      echo
     
    11531549_ASBOX
    11541550      echo
    1155       sed "/^$/d" confdefs.h | sort
     1551      cat confdefs.h
    11561552      echo
    11571553    fi
     
    11601556    echo "$as_me: exit $exit_status"
    11611557  } >&5
    1162   rm -f core *.core &&
    1163   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
     1558  rm -f core *.core core.conftest.* &&
     1559    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
    11641560    exit $exit_status
    1165      ' 0
     1561' 0
    11661562for ac_signal in 1 2 13 15; do
    11671563  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
     
    11701566
    11711567# confdefs.h avoids OS command line length limits that DEFS can exceed.
    1172 rm -rf conftest* confdefs.h
    1173 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
    1174 echo >confdefs.h
     1568rm -f -r conftest* confdefs.h
    11751569
    11761570# Predefined preprocessor variables.
     
    12031597# Let the site file select an alternate cache file if it wants to.
    12041598# Prefer explicitly selected file to automatically selected ones.
    1205 if test -z "$CONFIG_SITE"; then
    1206   if test "x$prefix" != xNONE; then
    1207     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
    1208   else
    1209     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
    1210   fi
    1211 fi
    1212 for ac_site_file in $CONFIG_SITE; do
     1599if test -n "$CONFIG_SITE"; then
     1600  set x "$CONFIG_SITE"
     1601elif test "x$prefix" != xNONE; then
     1602  set x "$prefix/share/config.site" "$prefix/etc/config.site"
     1603else
     1604  set x "$ac_default_prefix/share/config.site" \
     1605        "$ac_default_prefix/etc/config.site"
     1606fi
     1607shift
     1608for ac_site_file
     1609do
    12131610  if test -r "$ac_site_file"; then
    12141611    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
     
    12261623echo "$as_me: loading cache $cache_file" >&6;}
    12271624    case $cache_file in
    1228       [\\/]* | ?:[\\/]* ) . $cache_file;;
    1229       *)                      . ./$cache_file;;
     1625      [\\/]* | ?:[\\/]* ) . "$cache_file";;
     1626      *)                      . "./$cache_file";;
    12301627    esac
    12311628  fi
     
    12391636# value.
    12401637ac_cache_corrupted=false
    1241 for ac_var in `(set) 2>&1 |
    1242                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
     1638for ac_var in $ac_precious_vars; do
    12431639  eval ac_old_set=\$ac_cv_env_${ac_var}_set
    12441640  eval ac_new_set=\$ac_env_${ac_var}_set
    1245   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
    1246   eval ac_new_val="\$ac_env_${ac_var}_value"
     1641  eval ac_old_val=\$ac_cv_env_${ac_var}_value
     1642  eval ac_new_val=\$ac_env_${ac_var}_value
    12471643  case $ac_old_set,$ac_new_set in
    12481644    set,)
     
    12691665  if test "$ac_new_set" = set; then
    12701666    case $ac_new_val in
    1271     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
    1272       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
     1667    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
    12731668    *) ac_arg=$ac_var=$ac_new_val ;;
    12741669    esac
     
    12871682fi
    12881683
     1684
     1685
     1686
     1687
     1688
     1689
     1690
     1691
     1692
     1693
     1694
     1695
     1696
     1697
     1698
     1699
     1700
     1701
     1702
     1703
     1704
     1705
     1706
     1707
    12891708ac_ext=c
    12901709ac_cpp='$CPP $CPPFLAGS'
     
    12951714
    12961715
    1297 
    1298 
    1299 
    1300 
    1301 
    1302 
    1303 
    1304 
    1305 
    1306 
    1307 
    1308 
    1309 
    1310 
    1311 
    1312 
    1313 
    1314 
    1315 
    1316 
    1317 
    1318 
    1319 
    1320 
    1321 
    13221716VERSION=0.0.1
    13231717
     
    13431737
    13441738ac_aux_dir=
    1345 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
    1346   if test -f $ac_dir/install-sh; then
     1739for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
     1740  if test -f "$ac_dir/install-sh"; then
    13471741    ac_aux_dir=$ac_dir
    13481742    ac_install_sh="$ac_aux_dir/install-sh -c"
    13491743    break
    1350   elif test -f $ac_dir/install.sh; then
     1744  elif test -f "$ac_dir/install.sh"; then
    13511745    ac_aux_dir=$ac_dir
    13521746    ac_install_sh="$ac_aux_dir/install.sh -c"
    13531747    break
    1354   elif test -f $ac_dir/shtool; then
     1748  elif test -f "$ac_dir/shtool"; then
    13551749    ac_aux_dir=$ac_dir
    13561750    ac_install_sh="$ac_aux_dir/shtool install -c"
     
    13591753done
    13601754if test -z "$ac_aux_dir"; then
    1361   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
    1362 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
     1755  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
     1756echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
    13631757   { (exit 1); exit 1; }; }
    13641758fi
    1365 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
    1366 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
    1367 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
     1759
     1760# These three variables are undocumented and unsupported,
     1761# and are intended to be withdrawn in a future Autoconf release.
     1762# They can cause serious problems if a builder's source tree is in a directory
     1763# whose full name contains unusual characters.
     1764ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
     1765ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
     1766ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
     1767
    13681768
    13691769# Find a good install program.  We prefer a C program (faster),
     
    13801780# OS/2's system install, which has a completely different semantic
    13811781# ./install, which can be erroneously created by make from ./install.sh.
    1382 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
    1383 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
     1782{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
     1783echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
    13841784if test -z "$INSTALL"; then
    13851785if test "${ac_cv_path_install+set}" = set; then
     
    14031803    for ac_prog in ginstall scoinst install; do
    14041804      for ac_exec_ext in '' $ac_executable_extensions; do
    1405         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
     1805        if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
    14061806          if test $ac_prog = install &&
    14071807            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
     
    14221822esac
    14231823done
     1824IFS=$as_save_IFS
    14241825
    14251826
     
    14281829    INSTALL=$ac_cv_path_install
    14291830  else
    1430     # As a last resort, use the slow shell script.  We don't cache a
    1431     # path for INSTALL within a source directory, because that will
     1831    # As a last resort, use the slow shell script.  Don't cache a
     1832    # value for INSTALL within a source directory, because that will
    14321833    # break other packages using the cache if that directory is
    1433     # removed, or if the path is relative.
     1834    # removed, or if the value is a relative name.
    14341835    INSTALL=$ac_install_sh
    14351836  fi
    14361837fi
    1437 echo "$as_me:$LINENO: result: $INSTALL" >&5
    1438 echo "${ECHO_T}$INSTALL" >&6
     1838{ echo "$as_me:$LINENO: result: $INSTALL" >&5
     1839echo "${ECHO_T}$INSTALL" >&6; }
    14391840
    14401841# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
     
    14461847test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
    14471848
    1448 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
    1449 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
    1450 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
    1451 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
     1849{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
     1850echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
     1851set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
     1852if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
    14521853  echo $ECHO_N "(cached) $ECHO_C" >&6
    14531854else
    14541855  cat >conftest.make <<\_ACEOF
     1856SHELL = /bin/sh
    14551857all:
    1456         @echo 'ac_maketemp="$(MAKE)"'
     1858        @echo '@@@%%%=$(MAKE)=@@@%%%'
    14571859_ACEOF
    14581860# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
    1459 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
    1460 if test -n "$ac_maketemp"; then
    1461   eval ac_cv_prog_make_${ac_make}_set=yes
    1462 else
    1463   eval ac_cv_prog_make_${ac_make}_set=no
    1464 fi
     1861case `${MAKE-make} -f conftest.make 2>/dev/null` in
     1862  *@@@%%%=?*=@@@%%%*)
     1863    eval ac_cv_prog_make_${ac_make}_set=yes;;
     1864  *)
     1865    eval ac_cv_prog_make_${ac_make}_set=no;;
     1866esac
    14651867rm -f conftest.make
    14661868fi
    1467 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
    1468   echo "$as_me:$LINENO: result: yes" >&5
    1469 echo "${ECHO_T}yes" >&6
     1869if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
     1870  { echo "$as_me:$LINENO: result: yes" >&5
     1871echo "${ECHO_T}yes" >&6; }
    14701872  SET_MAKE=
    14711873else
    1472   echo "$as_me:$LINENO: result: no" >&5
    1473 echo "${ECHO_T}no" >&6
     1874  { echo "$as_me:$LINENO: result: no" >&5
     1875echo "${ECHO_T}no" >&6; }
    14741876  SET_MAKE="MAKE=${MAKE-make}"
    14751877fi
     
    14841886  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
    14851887set dummy ${ac_tool_prefix}gcc; ac_word=$2
    1486 echo "$as_me:$LINENO: checking for $ac_word" >&5
    1487 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
     1888{ echo "$as_me:$LINENO: checking for $ac_word" >&5
     1889echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
    14881890if test "${ac_cv_prog_CC+set}" = set; then
    14891891  echo $ECHO_N "(cached) $ECHO_C" >&6
     
    14981900  test -z "$as_dir" && as_dir=.
    14991901  for ac_exec_ext in '' $ac_executable_extensions; do
    1500   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     1902  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    15011903    ac_cv_prog_CC="${ac_tool_prefix}gcc"
    15021904    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     
    15051907done
    15061908done
     1909IFS=$as_save_IFS
    15071910
    15081911fi
     
    15101913CC=$ac_cv_prog_CC
    15111914if test -n "$CC"; then
    1512   echo "$as_me:$LINENO: result: $CC" >&5
    1513 echo "${ECHO_T}$CC" >&6
    1514 else
    1515   echo "$as_me:$LINENO: result: no" >&5
    1516 echo "${ECHO_T}no" >&6
    1517 fi
     1915  { echo "$as_me:$LINENO: result: $CC" >&5
     1916echo "${ECHO_T}$CC" >&6; }
     1917else
     1918  { echo "$as_me:$LINENO: result: no" >&5
     1919echo "${ECHO_T}no" >&6; }
     1920fi
     1921
    15181922
    15191923fi
     
    15221926  # Extract the first word of "gcc", so it can be a program name with args.
    15231927set dummy gcc; ac_word=$2
    1524 echo "$as_me:$LINENO: checking for $ac_word" >&5
    1525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
     1928{ echo "$as_me:$LINENO: checking for $ac_word" >&5
     1929echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
    15261930if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
    15271931  echo $ECHO_N "(cached) $ECHO_C" >&6
     
    15361940  test -z "$as_dir" && as_dir=.
    15371941  for ac_exec_ext in '' $ac_executable_extensions; do
    1538   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     1942  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    15391943    ac_cv_prog_ac_ct_CC="gcc"
    15401944    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     
    15431947done
    15441948done
     1949IFS=$as_save_IFS
    15451950
    15461951fi
     
    15481953ac_ct_CC=$ac_cv_prog_ac_ct_CC
    15491954if test -n "$ac_ct_CC"; then
    1550   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
    1551 echo "${ECHO_T}$ac_ct_CC" >&6
    1552 else
    1553   echo "$as_me:$LINENO: result: no" >&5
    1554 echo "${ECHO_T}no" >&6
    1555 fi
    1556 
    1557   CC=$ac_ct_CC
     1955  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
     1956echo "${ECHO_T}$ac_ct_CC" >&6; }
     1957else
     1958  { echo "$as_me:$LINENO: result: no" >&5
     1959echo "${ECHO_T}no" >&6; }
     1960fi
     1961
     1962  if test "x$ac_ct_CC" = x; then
     1963    CC=""
     1964  else
     1965    case $cross_compiling:$ac_tool_warned in
     1966yes:)
     1967{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
     1968whose name does not start with the host triplet.  If you think this
     1969configuration is useful to you, please write to autoconf@gnu.org." >&5
     1970echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
     1971whose name does not start with the host triplet.  If you think this
     1972configuration is useful to you, please write to autoconf@gnu.org." >&2;}
     1973ac_tool_warned=yes ;;
     1974esac
     1975    CC=$ac_ct_CC
     1976  fi
    15581977else
    15591978  CC="$ac_cv_prog_CC"
     
    15611980
    15621981if test -z "$CC"; then
    1563   if test -n "$ac_tool_prefix"; then
    1564   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
     1982          if test -n "$ac_tool_prefix"; then
     1983    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
    15651984set dummy ${ac_tool_prefix}cc; ac_word=$2
    1566 echo "$as_me:$LINENO: checking for $ac_word" >&5
    1567 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
     1985{ echo "$as_me:$LINENO: checking for $ac_word" >&5
     1986echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
    15681987if test "${ac_cv_prog_CC+set}" = set; then
    15691988  echo $ECHO_N "(cached) $ECHO_C" >&6
     
    15781997  test -z "$as_dir" && as_dir=.
    15791998  for ac_exec_ext in '' $ac_executable_extensions; do
    1580   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     1999  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    15812000    ac_cv_prog_CC="${ac_tool_prefix}cc"
    15822001    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     
    15852004done
    15862005done
     2006IFS=$as_save_IFS
    15872007
    15882008fi
     
    15902010CC=$ac_cv_prog_CC
    15912011if test -n "$CC"; then
    1592   echo "$as_me:$LINENO: result: $CC" >&5
    1593 echo "${ECHO_T}$CC" >&6
    1594 else
    1595   echo "$as_me:$LINENO: result: no" >&5
    1596 echo "${ECHO_T}no" >&6
    1597 fi
    1598 
    1599 fi
    1600 if test -z "$ac_cv_prog_CC"; then
    1601   ac_ct_CC=$CC
    1602   # Extract the first word of "cc", so it can be a program name with args.
    1603 set dummy cc; ac_word=$2
    1604 echo "$as_me:$LINENO: checking for $ac_word" >&5
    1605 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
    1606 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
    1607   echo $ECHO_N "(cached) $ECHO_C" >&6
    1608 else
    1609   if test -n "$ac_ct_CC"; then
    1610   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
    1611 else
    1612 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    1613 for as_dir in $PATH
    1614 do
    1615   IFS=$as_save_IFS
    1616   test -z "$as_dir" && as_dir=.
    1617   for ac_exec_ext in '' $ac_executable_extensions; do
    1618   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    1619     ac_cv_prog_ac_ct_CC="cc"
    1620     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    1621     break 2
     2012  { echo "$as_me:$LINENO: result: $CC" >&5
     2013echo "${ECHO_T}$CC" >&6; }
     2014else
     2015  { echo "$as_me:$LINENO: result: no" >&5
     2016echo "${ECHO_T}no" >&6; }
     2017fi
     2018
     2019
    16222020  fi
    1623 done
    1624 done
    1625 
    1626 fi
    1627 fi
    1628 ac_ct_CC=$ac_cv_prog_ac_ct_CC
    1629 if test -n "$ac_ct_CC"; then
    1630   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
    1631 echo "${ECHO_T}$ac_ct_CC" >&6
    1632 else
    1633   echo "$as_me:$LINENO: result: no" >&5
    1634 echo "${ECHO_T}no" >&6
    1635 fi
    1636 
    1637   CC=$ac_ct_CC
    1638 else
    1639   CC="$ac_cv_prog_CC"
    1640 fi
    1641 
    16422021fi
    16432022if test -z "$CC"; then
    16442023  # Extract the first word of "cc", so it can be a program name with args.
    16452024set dummy cc; ac_word=$2
    1646 echo "$as_me:$LINENO: checking for $ac_word" >&5
    1647 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
     2025{ echo "$as_me:$LINENO: checking for $ac_word" >&5
     2026echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
    16482027if test "${ac_cv_prog_CC+set}" = set; then
    16492028  echo $ECHO_N "(cached) $ECHO_C" >&6
     
    16592038  test -z "$as_dir" && as_dir=.
    16602039  for ac_exec_ext in '' $ac_executable_extensions; do
    1661   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     2040  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    16622041    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
    16632042       ac_prog_rejected=yes
     
    16702049done
    16712050done
     2051IFS=$as_save_IFS
    16722052
    16732053if test $ac_prog_rejected = yes; then
     
    16872067CC=$ac_cv_prog_CC
    16882068if test -n "$CC"; then
    1689   echo "$as_me:$LINENO: result: $CC" >&5
    1690 echo "${ECHO_T}$CC" >&6
    1691 else
    1692   echo "$as_me:$LINENO: result: no" >&5
    1693 echo "${ECHO_T}no" >&6
    1694 fi
     2069  { echo "$as_me:$LINENO: result: $CC" >&5
     2070echo "${ECHO_T}$CC" >&6; }
     2071else
     2072  { echo "$as_me:$LINENO: result: no" >&5
     2073echo "${ECHO_T}no" >&6; }
     2074fi
     2075
    16952076
    16962077fi
    16972078if test -z "$CC"; then
    16982079  if test -n "$ac_tool_prefix"; then
    1699   for ac_prog in cl
     2080  for ac_prog in cl.exe
    17002081  do
    17012082    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
    17022083set dummy $ac_tool_prefix$ac_prog; ac_word=$2
    1703 echo "$as_me:$LINENO: checking for $ac_word" >&5
    1704 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
     2084{ echo "$as_me:$LINENO: checking for $ac_word" >&5
     2085echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
    17052086if test "${ac_cv_prog_CC+set}" = set; then
    17062087  echo $ECHO_N "(cached) $ECHO_C" >&6
     
    17152096  test -z "$as_dir" && as_dir=.
    17162097  for ac_exec_ext in '' $ac_executable_extensions; do
    1717   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     2098  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    17182099    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
    17192100    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     
    17222103done
    17232104done
     2105IFS=$as_save_IFS
    17242106
    17252107fi
     
    17272109CC=$ac_cv_prog_CC
    17282110if test -n "$CC"; then
    1729   echo "$as_me:$LINENO: result: $CC" >&5
    1730 echo "${ECHO_T}$CC" >&6
    1731 else
    1732   echo "$as_me:$LINENO: result: no" >&5
    1733 echo "${ECHO_T}no" >&6
    1734 fi
     2111  { echo "$as_me:$LINENO: result: $CC" >&5
     2112echo "${ECHO_T}$CC" >&6; }
     2113else
     2114  { echo "$as_me:$LINENO: result: no" >&5
     2115echo "${ECHO_T}no" >&6; }
     2116fi
     2117
    17352118
    17362119    test -n "$CC" && break
     
    17392122if test -z "$CC"; then
    17402123  ac_ct_CC=$CC
    1741   for ac_prog in cl
     2124  for ac_prog in cl.exe
    17422125do
    17432126  # Extract the first word of "$ac_prog", so it can be a program name with args.
    17442127set dummy $ac_prog; ac_word=$2
    1745 echo "$as_me:$LINENO: checking for $ac_word" >&5
    1746 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
     2128{ echo "$as_me:$LINENO: checking for $ac_word" >&5
     2129echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
    17472130if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
    17482131  echo $ECHO_N "(cached) $ECHO_C" >&6
     
    17572140  test -z "$as_dir" && as_dir=.
    17582141  for ac_exec_ext in '' $ac_executable_extensions; do
    1759   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     2142  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    17602143    ac_cv_prog_ac_ct_CC="$ac_prog"
    17612144    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     
    17642147done
    17652148done
     2149IFS=$as_save_IFS
    17662150
    17672151fi
     
    17692153ac_ct_CC=$ac_cv_prog_ac_ct_CC
    17702154if test -n "$ac_ct_CC"; then
    1771   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
    1772 echo "${ECHO_T}$ac_ct_CC" >&6
    1773 else
    1774   echo "$as_me:$LINENO: result: no" >&5
    1775 echo "${ECHO_T}no" >&6
    1776 fi
     2155  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
     2156echo "${ECHO_T}$ac_ct_CC" >&6; }
     2157else
     2158  { echo "$as_me:$LINENO: result: no" >&5
     2159echo "${ECHO_T}no" >&6; }
     2160fi
     2161
    17772162
    17782163  test -n "$ac_ct_CC" && break
    17792164done
    17802165
    1781   CC=$ac_ct_CC
     2166  if test "x$ac_ct_CC" = x; then
     2167    CC=""
     2168  else
     2169    case $cross_compiling:$ac_tool_warned in
     2170yes:)
     2171{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
     2172whose name does not start with the host triplet.  If you think this
     2173configuration is useful to you, please write to autoconf@gnu.org." >&5
     2174echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
     2175whose name does not start with the host triplet.  If you think this
     2176configuration is useful to you, please write to autoconf@gnu.org." >&2;}
     2177ac_tool_warned=yes ;;
     2178esac
     2179    CC=$ac_ct_CC
     2180  fi
    17822181fi
    17832182
     
    17922191
    17932192# Provide some information about the compiler.
    1794 echo "$as_me:$LINENO:" \
    1795      "checking for C compiler version" >&5
     2193echo "$as_me:$LINENO: checking for C compiler version" >&5
    17962194ac_compiler=`set X $ac_compile; echo $2`
    1797 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
    1798   (eval $ac_compiler --version </dev/null >&5) 2>&5
     2195{ (ac_try="$ac_compiler --version >&5"
     2196case "(($ac_try" in
     2197  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     2198  *) ac_try_echo=$ac_try;;
     2199esac
     2200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2201  (eval "$ac_compiler --version >&5") 2>&5
    17992202  ac_status=$?
    18002203  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    18012204  (exit $ac_status); }
    1802 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
    1803   (eval $ac_compiler -v </dev/null >&5) 2>&5
     2205{ (ac_try="$ac_compiler -v >&5"
     2206case "(($ac_try" in
     2207  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     2208  *) ac_try_echo=$ac_try;;
     2209esac
     2210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2211  (eval "$ac_compiler -v >&5") 2>&5
    18042212  ac_status=$?
    18052213  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    18062214  (exit $ac_status); }
    1807 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
    1808   (eval $ac_compiler -V </dev/null >&5) 2>&5
     2215{ (ac_try="$ac_compiler -V >&5"
     2216case "(($ac_try" in
     2217  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     2218  *) ac_try_echo=$ac_try;;
     2219esac
     2220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2221  (eval "$ac_compiler -V >&5") 2>&5
    18092222  ac_status=$?
    18102223  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     
    18312244# It will help us diagnose broken compilers, and finding out an intuition
    18322245# of exeext.
    1833 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
    1834 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
     2246{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
     2247echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
    18352248ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
    1836 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
    1837   (eval $ac_link_default) 2>&5
     2249#
     2250# List of possible output files, starting from the most likely.
     2251# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
     2252# only as a last resort.  b.out is created by i960 compilers.
     2253ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
     2254#
     2255# The IRIX 6 linker writes into existing files which may not be
     2256# executable, retaining their permissions.  Remove them first so a
     2257# subsequent execution test works.
     2258ac_rmfiles=
     2259for ac_file in $ac_files
     2260do
     2261  case $ac_file in
     2262    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
     2263    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
     2264  esac
     2265done
     2266rm -f $ac_rmfiles
     2267
     2268if { (ac_try="$ac_link_default"
     2269case "(($ac_try" in
     2270  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     2271  *) ac_try_echo=$ac_try;;
     2272esac
     2273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2274  (eval "$ac_link_default") 2>&5
    18382275  ac_status=$?
    18392276  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    18402277  (exit $ac_status); }; then
    1841   # Find the output, starting from the most likely.  This scheme is
    1842 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
    1843 # resort.
    1844 
    1845 # Be careful to initialize this variable, since it used to be cached.
    1846 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
    1847 ac_cv_exeext=
    1848 # b.out is created by i960 compilers.
    1849 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
     2278  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
     2279# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
     2280# in a Makefile.  We should not override ac_cv_exeext if it was cached,
     2281# so that the user can short-circuit this test for compilers unknown to
     2282# Autoconf.
     2283for ac_file in $ac_files ''
    18502284do
    18512285  test -f "$ac_file" || continue
    18522286  case $ac_file in
    1853     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
    1854         ;;
    1855     conftest.$ac_ext )
    1856         # This is the source file.
     2287    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
    18572288        ;;
    18582289    [ab].out )
     
    18612292        break;;
    18622293    *.* )
    1863         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
    1864         # FIXME: I believe we export ac_cv_exeext for Libtool,
    1865         # but it would be cool to find out if it's true.  Does anybody
    1866         # maintain Libtool? --akim.
    1867         export ac_cv_exeext
     2294        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
     2295        then :; else
     2296           ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
     2297        fi
     2298        # We set ac_cv_exeext here because the later test for it is not
     2299        # safe: cross compilers may not add the suffix if given an `-o'
     2300        # argument, so we may need to know it at that point already.
     2301        # Even if this section looks crufty: it has the advantage of
     2302        # actually working.
    18682303        break;;
    18692304    * )
     
    18712306  esac
    18722307done
    1873 else
     2308test "$ac_cv_exeext" = no && ac_cv_exeext=
     2309
     2310else
     2311  ac_file=''
     2312fi
     2313
     2314{ echo "$as_me:$LINENO: result: $ac_file" >&5
     2315echo "${ECHO_T}$ac_file" >&6; }
     2316if test -z "$ac_file"; then
    18742317  echo "$as_me: failed program was:" >&5
    18752318sed 's/^/| /' conftest.$ac_ext >&5
     
    18832326
    18842327ac_exeext=$ac_cv_exeext
    1885 echo "$as_me:$LINENO: result: $ac_file" >&5
    1886 echo "${ECHO_T}$ac_file" >&6
    1887 
    1888 # Check the compiler produces executables we can run.  If not, either
     2328
     2329# Check that the compiler produces executables we can run.  If not, either
    18892330# the compiler is broken, or we cross compile.
    1890 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
    1891 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
     2331{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
     2332echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
    18922333# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
    18932334# If not cross compiling, check that we can run a simple program.
    18942335if test "$cross_compiling" != yes; then
    18952336  if { ac_try='./$ac_file'
    1896   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    1897   (eval $ac_try) 2>&5
     2337  { (case "(($ac_try" in
     2338  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     2339  *) ac_try_echo=$ac_try;;
     2340esac
     2341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2342  (eval "$ac_try") 2>&5
    18982343  ac_status=$?
    18992344  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     
    19142359  fi
    19152360fi
    1916 echo "$as_me:$LINENO: result: yes" >&5
    1917 echo "${ECHO_T}yes" >&6
     2361{ echo "$as_me:$LINENO: result: yes" >&5
     2362echo "${ECHO_T}yes" >&6; }
    19182363
    19192364rm -f a.out a.exe conftest$ac_cv_exeext b.out
    19202365ac_clean_files=$ac_clean_files_save
    1921 # Check the compiler produces executables we can run.  If not, either
     2366# Check that the compiler produces executables we can run.  If not, either
    19222367# the compiler is broken, or we cross compile.
    1923 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
    1924 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
    1925 echo "$as_me:$LINENO: result: $cross_compiling" >&5
    1926 echo "${ECHO_T}$cross_compiling" >&6
    1927 
    1928 echo "$as_me:$LINENO: checking for suffix of executables" >&5
    1929 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
    1930 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    1931   (eval $ac_link) 2>&5
     2368{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
     2369echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
     2370{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
     2371echo "${ECHO_T}$cross_compiling" >&6; }
     2372
     2373{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
     2374echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
     2375if { (ac_try="$ac_link"
     2376case "(($ac_try" in
     2377  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     2378  *) ac_try_echo=$ac_try;;
     2379esac
     2380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2381  (eval "$ac_link") 2>&5
    19322382  ac_status=$?
    19332383  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     
    19402390  test -f "$ac_file" || continue
    19412391  case $ac_file in
    1942     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
     2392    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
    19432393    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
    1944           export ac_cv_exeext
    19452394          break;;
    19462395    * ) break;;
     
    19562405
    19572406rm -f conftest$ac_cv_exeext
    1958 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
    1959 echo "${ECHO_T}$ac_cv_exeext" >&6
     2407{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
     2408echo "${ECHO_T}$ac_cv_exeext" >&6; }
    19602409
    19612410rm -f conftest.$ac_ext
    19622411EXEEXT=$ac_cv_exeext
    19632412ac_exeext=$EXEEXT
    1964 echo "$as_me:$LINENO: checking for suffix of object files" >&5
    1965 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
     2413{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
     2414echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
    19662415if test "${ac_cv_objext+set}" = set; then
    19672416  echo $ECHO_N "(cached) $ECHO_C" >&6
     
    19832432_ACEOF
    19842433rm -f conftest.o conftest.obj
    1985 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    1986   (eval $ac_compile) 2>&5
     2434if { (ac_try="$ac_compile"
     2435case "(($ac_try" in
     2436  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     2437  *) ac_try_echo=$ac_try;;
     2438esac
     2439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2440  (eval "$ac_compile") 2>&5
    19872441  ac_status=$?
    19882442  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    19892443  (exit $ac_status); }; then
    1990   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
     2444  for ac_file in conftest.o conftest.obj conftest.*; do
     2445  test -f "$ac_file" || continue;
    19912446  case $ac_file in
    1992     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
     2447    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
    19932448    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
    19942449       break;;
     
    20082463rm -f conftest.$ac_cv_objext conftest.$ac_ext
    20092464fi
    2010 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
    2011 echo "${ECHO_T}$ac_cv_objext" >&6
     2465{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
     2466echo "${ECHO_T}$ac_cv_objext" >&6; }
    20122467OBJEXT=$ac_cv_objext
    20132468ac_objext=$OBJEXT
    2014 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
    2015 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
     2469{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
     2470echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
    20162471if test "${ac_cv_c_compiler_gnu+set}" = set; then
    20172472  echo $ECHO_N "(cached) $ECHO_C" >&6
     
    20362491_ACEOF
    20372492rm -f conftest.$ac_objext
    2038 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    2039   (eval $ac_compile) 2>conftest.er1
     2493if { (ac_try="$ac_compile"
     2494case "(($ac_try" in
     2495  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     2496  *) ac_try_echo=$ac_try;;
     2497esac
     2498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2499  (eval "$ac_compile") 2>conftest.er1
    20402500  ac_status=$?
    20412501  grep -v '^ *+' conftest.er1 >conftest.err
     
    20432503  cat conftest.err >&5
    20442504  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2045   (exit $ac_status); } &&
    2046          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
    2047   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2048   (eval $ac_try) 2>&5
    2049   ac_status=$?
    2050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2051   (exit $ac_status); }; } &&
    2052          { ac_try='test -s conftest.$ac_objext'
    2053   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2054   (eval $ac_try) 2>&5
    2055   ac_status=$?
    2056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2057   (exit $ac_status); }; }; then
     2505  (exit $ac_status); } && {
     2506         test -z "$ac_c_werror_flag" ||
     2507         test ! -s conftest.err
     2508       } && test -s conftest.$ac_objext; then
    20582509  ac_compiler_gnu=yes
    20592510else
     
    20612512sed 's/^/| /' conftest.$ac_ext >&5
    20622513
    2063 ac_compiler_gnu=no
    2064 fi
    2065 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     2514        ac_compiler_gnu=no
     2515fi
     2516
     2517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    20662518ac_cv_c_compiler_gnu=$ac_compiler_gnu
    20672519
    20682520fi
    2069 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
    2070 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
     2521{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
     2522echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
    20712523GCC=`test $ac_compiler_gnu = yes && echo yes`
    20722524ac_test_CFLAGS=${CFLAGS+set}
    20732525ac_save_CFLAGS=$CFLAGS
    2074 CFLAGS="-g"
    2075 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
    2076 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
     2526{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
     2527echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
    20772528if test "${ac_cv_prog_cc_g+set}" = set; then
    20782529  echo $ECHO_N "(cached) $ECHO_C" >&6
    20792530else
    2080   cat >conftest.$ac_ext <<_ACEOF
     2531  ac_save_c_werror_flag=$ac_c_werror_flag
     2532   ac_c_werror_flag=yes
     2533   ac_cv_prog_cc_g=no
     2534   CFLAGS="-g"
     2535   cat >conftest.$ac_ext <<_ACEOF
    20812536/* confdefs.h.  */
    20822537_ACEOF
     
    20942549_ACEOF
    20952550rm -f conftest.$ac_objext
    2096 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    2097   (eval $ac_compile) 2>conftest.er1
     2551if { (ac_try="$ac_compile"
     2552case "(($ac_try" in
     2553  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     2554  *) ac_try_echo=$ac_try;;
     2555esac
     2556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2557  (eval "$ac_compile") 2>conftest.er1
    20982558  ac_status=$?
    20992559  grep -v '^ *+' conftest.er1 >conftest.err
     
    21012561  cat conftest.err >&5
    21022562  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2103   (exit $ac_status); } &&
    2104          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
    2105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2106   (eval $ac_try) 2>&5
    2107   ac_status=$?
    2108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2109   (exit $ac_status); }; } &&
    2110          { ac_try='test -s conftest.$ac_objext'
    2111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2112   (eval $ac_try) 2>&5
    2113   ac_status=$?
    2114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2115   (exit $ac_status); }; }; then
     2563  (exit $ac_status); } && {
     2564         test -z "$ac_c_werror_flag" ||
     2565         test ! -s conftest.err
     2566       } && test -s conftest.$ac_objext; then
    21162567  ac_cv_prog_cc_g=yes
    21172568else
     
    21192570sed 's/^/| /' conftest.$ac_ext >&5
    21202571
    2121 ac_cv_prog_cc_g=no
    2122 fi
    2123 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    2124 fi
    2125 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
    2126 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
     2572        CFLAGS=""
     2573      cat >conftest.$ac_ext <<_ACEOF
     2574/* confdefs.h.  */
     2575_ACEOF
     2576cat confdefs.h >>conftest.$ac_ext
     2577cat >>conftest.$ac_ext <<_ACEOF
     2578/* end confdefs.h.  */
     2579
     2580int
     2581main ()
     2582{
     2583
     2584  ;
     2585  return 0;
     2586}
     2587_ACEOF
     2588rm -f conftest.$ac_objext
     2589if { (ac_try="$ac_compile"
     2590case "(($ac_try" in
     2591  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     2592  *) ac_try_echo=$ac_try;;
     2593esac
     2594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2595  (eval "$ac_compile") 2>conftest.er1
     2596  ac_status=$?
     2597  grep -v '^ *+' conftest.er1 >conftest.err
     2598  rm -f conftest.er1
     2599  cat conftest.err >&5
     2600  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2601  (exit $ac_status); } && {
     2602         test -z "$ac_c_werror_flag" ||
     2603         test ! -s conftest.err
     2604       } && test -s conftest.$ac_objext; then
     2605  :
     2606else
     2607  echo "$as_me: failed program was:" >&5
     2608sed 's/^/| /' conftest.$ac_ext >&5
     2609
     2610        ac_c_werror_flag=$ac_save_c_werror_flag
     2611         CFLAGS="-g"
     2612         cat >conftest.$ac_ext <<_ACEOF
     2613/* confdefs.h.  */
     2614_ACEOF
     2615cat confdefs.h >>conftest.$ac_ext
     2616cat >>conftest.$ac_ext <<_ACEOF
     2617/* end confdefs.h.  */
     2618
     2619int
     2620main ()
     2621{
     2622
     2623  ;
     2624  return 0;
     2625}
     2626_ACEOF
     2627rm -f conftest.$ac_objext
     2628if { (ac_try="$ac_compile"
     2629case "(($ac_try" in
     2630  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     2631  *) ac_try_echo=$ac_try;;
     2632esac
     2633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2634  (eval "$ac_compile") 2>conftest.er1
     2635  ac_status=$?
     2636  grep -v '^ *+' conftest.er1 >conftest.err
     2637  rm -f conftest.er1
     2638  cat conftest.err >&5
     2639  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2640  (exit $ac_status); } && {
     2641         test -z "$ac_c_werror_flag" ||
     2642         test ! -s conftest.err
     2643       } && test -s conftest.$ac_objext; then
     2644  ac_cv_prog_cc_g=yes
     2645else
     2646  echo "$as_me: failed program was:" >&5
     2647sed 's/^/| /' conftest.$ac_ext >&5
     2648
     2649
     2650fi
     2651
     2652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     2653fi
     2654
     2655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     2656fi
     2657
     2658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     2659   ac_c_werror_flag=$ac_save_c_werror_flag
     2660fi
     2661{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
     2662echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
    21272663if test "$ac_test_CFLAGS" = set; then
    21282664  CFLAGS=$ac_save_CFLAGS
     
    21402676  fi
    21412677fi
    2142 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
    2143 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
    2144 if test "${ac_cv_prog_cc_stdc+set}" = set; then
     2678{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
     2679echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
     2680if test "${ac_cv_prog_cc_c89+set}" = set; then
    21452681  echo $ECHO_N "(cached) $ECHO_C" >&6
    21462682else
    2147   ac_cv_prog_cc_stdc=no
     2683  ac_cv_prog_cc_c89=no
    21482684ac_save_CC=$CC
    21492685cat >conftest.$ac_ext <<_ACEOF
     
    21792715   function prototypes and stuff, but not '\xHH' hex character constants.
    21802716   These don't provoke an error unfortunately, instead are silently treated
    2181    as 'x'.  The following induces an error, until -std1 is added to get
     2717   as 'x'.  The following induces an error, until -std is added to get
    21822718   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
    21832719   array size at least.  It's necessary to write '\x00'==0 to get something
    2184    that's true only with -std1.  */
     2720   that's true only with -std.  */
    21852721int osf4_cc_array ['\x00' == 0 ? 1 : -1];
     2722
     2723/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
     2724   inside strings and character constants.  */
     2725#define FOO(x) 'x'
     2726int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
    21862727
    21872728int test (int i, double x);
     
    21992740}
    22002741_ACEOF
    2201 # Don't try gcc -ansi; that turns off useful extensions and
    2202 # breaks some systems' header files.
    2203 # AIX                   -qlanglvl=ansi
    2204 # Ultrix and OSF/1      -std1
    2205 # HP-UX 10.20 and later -Ae
    2206 # HP-UX older versions  -Aa -D_HPUX_SOURCE
    2207 # SVR4                  -Xc -D__EXTENSIONS__
    2208 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
     2742for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
     2743        -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
    22092744do
    22102745  CC="$ac_save_CC $ac_arg"
    22112746  rm -f conftest.$ac_objext
    2212 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    2213   (eval $ac_compile) 2>conftest.er1
     2747if { (ac_try="$ac_compile"
     2748case "(($ac_try" in
     2749  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     2750  *) ac_try_echo=$ac_try;;
     2751esac
     2752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2753  (eval "$ac_compile") 2>conftest.er1
    22142754  ac_status=$?
    22152755  grep -v '^ *+' conftest.er1 >conftest.err
     
    22172757  cat conftest.err >&5
    22182758  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2219   (exit $ac_status); } &&
    2220          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
    2221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2222   (eval $ac_try) 2>&5
    2223   ac_status=$?
    2224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2225   (exit $ac_status); }; } &&
    2226          { ac_try='test -s conftest.$ac_objext'
    2227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2228   (eval $ac_try) 2>&5
    2229   ac_status=$?
    2230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2231   (exit $ac_status); }; }; then
    2232   ac_cv_prog_cc_stdc=$ac_arg
    2233 break
     2759  (exit $ac_status); } && {
     2760         test -z "$ac_c_werror_flag" ||
     2761         test ! -s conftest.err
     2762       } && test -s conftest.$ac_objext; then
     2763  ac_cv_prog_cc_c89=$ac_arg
    22342764else
    22352765  echo "$as_me: failed program was:" >&5
    22362766sed 's/^/| /' conftest.$ac_ext >&5
    22372767
    2238 fi
    2239 rm -f conftest.err conftest.$ac_objext
    2240 done
    2241 rm -f conftest.$ac_ext conftest.$ac_objext
     2768
     2769fi
     2770
     2771rm -f core conftest.err conftest.$ac_objext
     2772  test "x$ac_cv_prog_cc_c89" != "xno" && break
     2773done
     2774rm -f conftest.$ac_ext
    22422775CC=$ac_save_CC
    22432776
    22442777fi
    2245 
    2246 case "x$ac_cv_prog_cc_stdc" in
    2247   x|xno)
    2248     echo "$as_me:$LINENO: result: none needed" >&5
    2249 echo "${ECHO_T}none needed" >&6 ;;
     2778# AC_CACHE_VAL
     2779case "x$ac_cv_prog_cc_c89" in
     2780  x)
     2781    { echo "$as_me:$LINENO: result: none needed" >&5
     2782echo "${ECHO_T}none needed" >&6; } ;;
     2783  xno)
     2784    { echo "$as_me:$LINENO: result: unsupported" >&5
     2785echo "${ECHO_T}unsupported" >&6; } ;;
    22502786  *)
    2251     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
    2252 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
    2253     CC="$CC $ac_cv_prog_cc_stdc" ;;
    2254 esac
    2255 
    2256 # Some people use a C++ compiler to compile C.  Since we use `exit',
    2257 # in C++ we need to declare it.  In case someone uses the same compiler
    2258 # for both compiling C and C++ we need to have the C++ compiler decide
    2259 # the declaration of exit, since it's the most demanding environment.
    2260 cat >conftest.$ac_ext <<_ACEOF
    2261 #ifndef __cplusplus
    2262   choke me
    2263 #endif
    2264 _ACEOF
    2265 rm -f conftest.$ac_objext
    2266 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    2267   (eval $ac_compile) 2>conftest.er1
    2268   ac_status=$?
    2269   grep -v '^ *+' conftest.er1 >conftest.err
    2270   rm -f conftest.er1
    2271   cat conftest.err >&5
    2272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2273   (exit $ac_status); } &&
    2274          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
    2275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2276   (eval $ac_try) 2>&5
    2277   ac_status=$?
    2278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2279   (exit $ac_status); }; } &&
    2280          { ac_try='test -s conftest.$ac_objext'
    2281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2282   (eval $ac_try) 2>&5
    2283   ac_status=$?
    2284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2285   (exit $ac_status); }; }; then
    2286   for ac_declaration in \
    2287    '' \
    2288    'extern "C" void std::exit (int) throw (); using std::exit;' \
    2289    'extern "C" void std::exit (int); using std::exit;' \
    2290    'extern "C" void exit (int) throw ();' \
    2291    'extern "C" void exit (int);' \
    2292    'void exit (int);'
    2293 do
    2294   cat >conftest.$ac_ext <<_ACEOF
    2295 /* confdefs.h.  */
    2296 _ACEOF
    2297 cat confdefs.h >>conftest.$ac_ext
    2298 cat >>conftest.$ac_ext <<_ACEOF
    2299 /* end confdefs.h.  */
    2300 $ac_declaration
    2301 #include <stdlib.h>
    2302 int
    2303 main ()
    2304 {
    2305 exit (42);
    2306   ;
    2307   return 0;
    2308 }
    2309 _ACEOF
    2310 rm -f conftest.$ac_objext
    2311 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    2312   (eval $ac_compile) 2>conftest.er1
    2313   ac_status=$?
    2314   grep -v '^ *+' conftest.er1 >conftest.err
    2315   rm -f conftest.er1
    2316   cat conftest.err >&5
    2317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2318   (exit $ac_status); } &&
    2319          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
    2320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2321   (eval $ac_try) 2>&5
    2322   ac_status=$?
    2323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2324   (exit $ac_status); }; } &&
    2325          { ac_try='test -s conftest.$ac_objext'
    2326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2327   (eval $ac_try) 2>&5
    2328   ac_status=$?
    2329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2330   (exit $ac_status); }; }; then
    2331   :
    2332 else
    2333   echo "$as_me: failed program was:" >&5
    2334 sed 's/^/| /' conftest.$ac_ext >&5
    2335 
    2336 continue
    2337 fi
    2338 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    2339   cat >conftest.$ac_ext <<_ACEOF
    2340 /* confdefs.h.  */
    2341 _ACEOF
    2342 cat confdefs.h >>conftest.$ac_ext
    2343 cat >>conftest.$ac_ext <<_ACEOF
    2344 /* end confdefs.h.  */
    2345 $ac_declaration
    2346 int
    2347 main ()
    2348 {
    2349 exit (42);
    2350   ;
    2351   return 0;
    2352 }
    2353 _ACEOF
    2354 rm -f conftest.$ac_objext
    2355 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    2356   (eval $ac_compile) 2>conftest.er1
    2357   ac_status=$?
    2358   grep -v '^ *+' conftest.er1 >conftest.err
    2359   rm -f conftest.er1
    2360   cat conftest.err >&5
    2361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2362   (exit $ac_status); } &&
    2363          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
    2364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2365   (eval $ac_try) 2>&5
    2366   ac_status=$?
    2367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2368   (exit $ac_status); }; } &&
    2369          { ac_try='test -s conftest.$ac_objext'
    2370   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2371   (eval $ac_try) 2>&5
    2372   ac_status=$?
    2373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2374   (exit $ac_status); }; }; then
    2375   break
    2376 else
    2377   echo "$as_me: failed program was:" >&5
    2378 sed 's/^/| /' conftest.$ac_ext >&5
    2379 
    2380 fi
    2381 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    2382 done
    2383 rm -f conftest*
    2384 if test -n "$ac_declaration"; then
    2385   echo '#ifdef __cplusplus' >>confdefs.h
    2386   echo $ac_declaration      >>confdefs.h
    2387   echo '#endif'             >>confdefs.h
    2388 fi
    2389 
    2390 else
    2391   echo "$as_me: failed program was:" >&5
    2392 sed 's/^/| /' conftest.$ac_ext >&5
    2393 
    2394 fi
    2395 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     2787    CC="$CC $ac_cv_prog_cc_c89"
     2788    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
     2789echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
     2790esac
     2791
     2792
    23962793ac_ext=c
    23972794ac_cpp='$CPP $CPPFLAGS'
     
    24072804
    24082805
    2409 ac_ext=cc
    2410 ac_cpp='$CXXCPP $CPPFLAGS'
    2411 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
    2412 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
    2413 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
    24142806if test -n "$ac_tool_prefix"; then
    2415   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
    2416   do
    2417     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
    2418 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
    2419 echo "$as_me:$LINENO: checking for $ac_word" >&5
    2420 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
    2421 if test "${ac_cv_prog_CXX+set}" = set; then
     2807  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
     2808set dummy ${ac_tool_prefix}ranlib; ac_word=$2
     2809{ echo "$as_me:$LINENO: checking for $ac_word" >&5
     2810echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     2811if test "${ac_cv_prog_RANLIB+set}" = set; then
    24222812  echo $ECHO_N "(cached) $ECHO_C" >&6
    24232813else
    2424   if test -n "$CXX"; then
    2425   ac_cv_prog_CXX="$CXX" # Let the user override the test.
     2814  if test -n "$RANLIB"; then
     2815  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
    24262816else
    24272817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     
    24312821  test -z "$as_dir" && as_dir=.
    24322822  for ac_exec_ext in '' $ac_executable_extensions; do
    2433   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    2434     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
     2823  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     2824    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
    24352825    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    24362826    break 2
     
    24382828done
    24392829done
    2440 
    2441 fi
    2442 fi
    2443 CXX=$ac_cv_prog_CXX
    2444 if test -n "$CXX"; then
    2445   echo "$as_me:$LINENO: result: $CXX" >&5
    2446 echo "${ECHO_T}$CXX" >&6
    2447 else
    2448   echo "$as_me:$LINENO: result: no" >&5
    2449 echo "${ECHO_T}no" >&6
    2450 fi
    2451 
    2452     test -n "$CXX" && break
    2453   done
    2454 fi
    2455 if test -z "$CXX"; then
    2456   ac_ct_CXX=$CXX
    2457   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
    2458 do
    2459   # Extract the first word of "$ac_prog", so it can be a program name with args.
    2460 set dummy $ac_prog; ac_word=$2
    2461 echo "$as_me:$LINENO: checking for $ac_word" >&5
    2462 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
    2463 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
     2830IFS=$as_save_IFS
     2831
     2832fi
     2833fi
     2834RANLIB=$ac_cv_prog_RANLIB
     2835if test -n "$RANLIB"; then
     2836  { echo "$as_me:$LINENO: result: $RANLIB" >&5
     2837echo "${ECHO_T}$RANLIB" >&6; }
     2838else
     2839  { echo "$as_me:$LINENO: result: no" >&5
     2840echo "${ECHO_T}no" >&6; }
     2841fi
     2842
     2843
     2844fi
     2845if test -z "$ac_cv_prog_RANLIB"; then
     2846  ac_ct_RANLIB=$RANLIB
     2847  # Extract the first word of "ranlib", so it can be a program name with args.
     2848set dummy ranlib; ac_word=$2
     2849{ echo "$as_me:$LINENO: checking for $ac_word" >&5
     2850echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     2851if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
    24642852  echo $ECHO_N "(cached) $ECHO_C" >&6
    24652853else
    2466   if test -n "$ac_ct_CXX"; then
    2467   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
     2854  if test -n "$ac_ct_RANLIB"; then
     2855  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
    24682856else
    24692857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     
    24732861  test -z "$as_dir" && as_dir=.
    24742862  for ac_exec_ext in '' $ac_executable_extensions; do
    2475   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     2863  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     2864    ac_cv_prog_ac_ct_RANLIB="ranlib"
     2865    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     2866    break 2
     2867  fi
     2868done
     2869done
     2870IFS=$as_save_IFS
     2871
     2872fi
     2873fi
     2874ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
     2875if test -n "$ac_ct_RANLIB"; then
     2876  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
     2877echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
     2878else
     2879  { echo "$as_me:$LINENO: result: no" >&5
     2880echo "${ECHO_T}no" >&6; }
     2881fi
     2882
     2883  if test "x$ac_ct_RANLIB" = x; then
     2884    RANLIB=":"
     2885  else
     2886    case $cross_compiling:$ac_tool_warned in
     2887yes:)
     2888{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
     2889whose name does not start with the host triplet.  If you think this
     2890configuration is useful to you, please write to autoconf@gnu.org." >&5
     2891echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
     2892whose name does not start with the host triplet.  If you think this
     2893configuration is useful to you, please write to autoconf@gnu.org." >&2;}
     2894ac_tool_warned=yes ;;
     2895esac
     2896    RANLIB=$ac_ct_RANLIB
     2897  fi
     2898else
     2899  RANLIB="$ac_cv_prog_RANLIB"
     2900fi
     2901
     2902
     2903ac_ext=cpp
     2904ac_cpp='$CXXCPP $CPPFLAGS'
     2905ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     2906ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     2907ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
     2908if test -z "$CXX"; then
     2909  if test -n "$CCC"; then
     2910    CXX=$CCC
     2911  else
     2912    if test -n "$ac_tool_prefix"; then
     2913  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
     2914  do
     2915    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
     2916set dummy $ac_tool_prefix$ac_prog; ac_word=$2
     2917{ echo "$as_me:$LINENO: checking for $ac_word" >&5
     2918echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     2919if test "${ac_cv_prog_CXX+set}" = set; then
     2920  echo $ECHO_N "(cached) $ECHO_C" >&6
     2921else
     2922  if test -n "$CXX"; then
     2923  ac_cv_prog_CXX="$CXX" # Let the user override the test.
     2924else
     2925as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     2926for as_dir in $PATH
     2927do
     2928  IFS=$as_save_IFS
     2929  test -z "$as_dir" && as_dir=.
     2930  for ac_exec_ext in '' $ac_executable_extensions; do
     2931  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     2932    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
     2933    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     2934    break 2
     2935  fi
     2936done
     2937done
     2938IFS=$as_save_IFS
     2939
     2940fi
     2941fi
     2942CXX=$ac_cv_prog_CXX
     2943if test -n "$CXX"; then
     2944  { echo "$as_me:$LINENO: result: $CXX" >&5
     2945echo "${ECHO_T}$CXX" >&6; }
     2946else
     2947  { echo "$as_me:$LINENO: result: no" >&5
     2948echo "${ECHO_T}no" >&6; }
     2949fi
     2950
     2951
     2952    test -n "$CXX" && break
     2953  done
     2954fi
     2955if test -z "$CXX"; then
     2956  ac_ct_CXX=$CXX
     2957  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
     2958do
     2959  # Extract the first word of "$ac_prog", so it can be a program name with args.
     2960set dummy $ac_prog; ac_word=$2
     2961{ echo "$as_me:$LINENO: checking for $ac_word" >&5
     2962echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     2963if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
     2964  echo $ECHO_N "(cached) $ECHO_C" >&6
     2965else
     2966  if test -n "$ac_ct_CXX"; then
     2967  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
     2968else
     2969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     2970for as_dir in $PATH
     2971do
     2972  IFS=$as_save_IFS
     2973  test -z "$as_dir" && as_dir=.
     2974  for ac_exec_ext in '' $ac_executable_extensions; do
     2975  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    24762976    ac_cv_prog_ac_ct_CXX="$ac_prog"
    24772977    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     
    24802980done
    24812981done
     2982IFS=$as_save_IFS
    24822983
    24832984fi
     
    24852986ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
    24862987if test -n "$ac_ct_CXX"; then
    2487   echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
    2488 echo "${ECHO_T}$ac_ct_CXX" >&6
    2489 else
    2490   echo "$as_me:$LINENO: result: no" >&5
    2491 echo "${ECHO_T}no" >&6
    2492 fi
     2988  { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
     2989echo "${ECHO_T}$ac_ct_CXX" >&6; }
     2990else
     2991  { echo "$as_me:$LINENO: result: no" >&5
     2992echo "${ECHO_T}no" >&6; }
     2993fi
     2994
    24932995
    24942996  test -n "$ac_ct_CXX" && break
    24952997done
    2496 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
    2497 
    2498   CXX=$ac_ct_CXX
    2499 fi
    2500 
    2501 
     2998
     2999  if test "x$ac_ct_CXX" = x; then
     3000    CXX="g++"
     3001  else
     3002    case $cross_compiling:$ac_tool_warned in
     3003yes:)
     3004{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
     3005whose name does not start with the host triplet.  If you think this
     3006configuration is useful to you, please write to autoconf@gnu.org." >&5
     3007echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
     3008whose name does not start with the host triplet.  If you think this
     3009configuration is useful to you, please write to autoconf@gnu.org." >&2;}
     3010ac_tool_warned=yes ;;
     3011esac
     3012    CXX=$ac_ct_CXX
     3013  fi
     3014fi
     3015
     3016  fi
     3017fi
    25023018# Provide some information about the compiler.
    2503 echo "$as_me:$LINENO:" \
    2504      "checking for C++ compiler version" >&5
     3019echo "$as_me:$LINENO: checking for C++ compiler version" >&5
    25053020ac_compiler=`set X $ac_compile; echo $2`
    2506 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
    2507   (eval $ac_compiler --version </dev/null >&5) 2>&5
     3021{ (ac_try="$ac_compiler --version >&5"
     3022case "(($ac_try" in
     3023  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3024  *) ac_try_echo=$ac_try;;
     3025esac
     3026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3027  (eval "$ac_compiler --version >&5") 2>&5
    25083028  ac_status=$?
    25093029  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    25103030  (exit $ac_status); }
    2511 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
    2512   (eval $ac_compiler -v </dev/null >&5) 2>&5
     3031{ (ac_try="$ac_compiler -v >&5"
     3032case "(($ac_try" in
     3033  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3034  *) ac_try_echo=$ac_try;;
     3035esac
     3036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3037  (eval "$ac_compiler -v >&5") 2>&5
    25133038  ac_status=$?
    25143039  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    25153040  (exit $ac_status); }
    2516 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
    2517   (eval $ac_compiler -V </dev/null >&5) 2>&5
     3041{ (ac_try="$ac_compiler -V >&5"
     3042case "(($ac_try" in
     3043  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3044  *) ac_try_echo=$ac_try;;
     3045esac
     3046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3047  (eval "$ac_compiler -V >&5") 2>&5
    25183048  ac_status=$?
    25193049  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    25203050  (exit $ac_status); }
    25213051
    2522 echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
    2523 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
     3052{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
     3053echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
    25243054if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
    25253055  echo $ECHO_N "(cached) $ECHO_C" >&6
     
    25443074_ACEOF
    25453075rm -f conftest.$ac_objext
    2546 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    2547   (eval $ac_compile) 2>conftest.er1
     3076if { (ac_try="$ac_compile"
     3077case "(($ac_try" in
     3078  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3079  *) ac_try_echo=$ac_try;;
     3080esac
     3081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3082  (eval "$ac_compile") 2>conftest.er1
    25483083  ac_status=$?
    25493084  grep -v '^ *+' conftest.er1 >conftest.err
     
    25513086  cat conftest.err >&5
    25523087  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2553   (exit $ac_status); } &&
    2554          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
    2555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2556   (eval $ac_try) 2>&5
    2557   ac_status=$?
    2558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2559   (exit $ac_status); }; } &&
    2560          { ac_try='test -s conftest.$ac_objext'
    2561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2562   (eval $ac_try) 2>&5
    2563   ac_status=$?
    2564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2565   (exit $ac_status); }; }; then
     3088  (exit $ac_status); } && {
     3089         test -z "$ac_cxx_werror_flag" ||
     3090         test ! -s conftest.err
     3091       } && test -s conftest.$ac_objext; then
    25663092  ac_compiler_gnu=yes
    25673093else
     
    25693095sed 's/^/| /' conftest.$ac_ext >&5
    25703096
    2571 ac_compiler_gnu=no
    2572 fi
    2573 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     3097        ac_compiler_gnu=no
     3098fi
     3099
     3100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    25743101ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
    25753102
    25763103fi
    2577 echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
    2578 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
     3104{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
     3105echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
    25793106GXX=`test $ac_compiler_gnu = yes && echo yes`
    25803107ac_test_CXXFLAGS=${CXXFLAGS+set}
    25813108ac_save_CXXFLAGS=$CXXFLAGS
    2582 CXXFLAGS="-g"
    2583 echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
    2584 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
     3109{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
     3110echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
    25853111if test "${ac_cv_prog_cxx_g+set}" = set; then
    25863112  echo $ECHO_N "(cached) $ECHO_C" >&6
    25873113else
    2588   cat >conftest.$ac_ext <<_ACEOF
     3114  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
     3115   ac_cxx_werror_flag=yes
     3116   ac_cv_prog_cxx_g=no
     3117   CXXFLAGS="-g"
     3118   cat >conftest.$ac_ext <<_ACEOF
    25893119/* confdefs.h.  */
    25903120_ACEOF
     
    26023132_ACEOF
    26033133rm -f conftest.$ac_objext
    2604 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    2605   (eval $ac_compile) 2>conftest.er1
     3134if { (ac_try="$ac_compile"
     3135case "(($ac_try" in
     3136  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3137  *) ac_try_echo=$ac_try;;
     3138esac
     3139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3140  (eval "$ac_compile") 2>conftest.er1
    26063141  ac_status=$?
    26073142  grep -v '^ *+' conftest.er1 >conftest.err
     
    26093144  cat conftest.err >&5
    26103145  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2611   (exit $ac_status); } &&
    2612          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
    2613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2614   (eval $ac_try) 2>&5
    2615   ac_status=$?
    2616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2617   (exit $ac_status); }; } &&
    2618          { ac_try='test -s conftest.$ac_objext'
    2619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2620   (eval $ac_try) 2>&5
    2621   ac_status=$?
    2622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2623   (exit $ac_status); }; }; then
     3146  (exit $ac_status); } && {
     3147         test -z "$ac_cxx_werror_flag" ||
     3148         test ! -s conftest.err
     3149       } && test -s conftest.$ac_objext; then
    26243150  ac_cv_prog_cxx_g=yes
    26253151else
     
    26273153sed 's/^/| /' conftest.$ac_ext >&5
    26283154
    2629 ac_cv_prog_cxx_g=no
    2630 fi
    2631 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    2632 fi
    2633 echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
    2634 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
     3155        CXXFLAGS=""
     3156      cat >conftest.$ac_ext <<_ACEOF
     3157/* confdefs.h.  */
     3158_ACEOF
     3159cat confdefs.h >>conftest.$ac_ext
     3160cat >>conftest.$ac_ext <<_ACEOF
     3161/* end confdefs.h.  */
     3162
     3163int
     3164main ()
     3165{
     3166
     3167  ;
     3168  return 0;
     3169}
     3170_ACEOF
     3171rm -f conftest.$ac_objext
     3172if { (ac_try="$ac_compile"
     3173case "(($ac_try" in
     3174  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3175  *) ac_try_echo=$ac_try;;
     3176esac
     3177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3178  (eval "$ac_compile") 2>conftest.er1
     3179  ac_status=$?
     3180  grep -v '^ *+' conftest.er1 >conftest.err
     3181  rm -f conftest.er1
     3182  cat conftest.err >&5
     3183  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3184  (exit $ac_status); } && {
     3185         test -z "$ac_cxx_werror_flag" ||
     3186         test ! -s conftest.err
     3187       } && test -s conftest.$ac_objext; then
     3188  :
     3189else
     3190  echo "$as_me: failed program was:" >&5
     3191sed 's/^/| /' conftest.$ac_ext >&5
     3192
     3193        ac_cxx_werror_flag=$ac_save_cxx_werror_flag
     3194         CXXFLAGS="-g"
     3195         cat >conftest.$ac_ext <<_ACEOF
     3196/* confdefs.h.  */
     3197_ACEOF
     3198cat confdefs.h >>conftest.$ac_ext
     3199cat >>conftest.$ac_ext <<_ACEOF
     3200/* end confdefs.h.  */
     3201
     3202int
     3203main ()
     3204{
     3205
     3206  ;
     3207  return 0;
     3208}
     3209_ACEOF
     3210rm -f conftest.$ac_objext
     3211if { (ac_try="$ac_compile"
     3212case "(($ac_try" in
     3213  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3214  *) ac_try_echo=$ac_try;;
     3215esac
     3216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3217  (eval "$ac_compile") 2>conftest.er1
     3218  ac_status=$?
     3219  grep -v '^ *+' conftest.er1 >conftest.err
     3220  rm -f conftest.er1
     3221  cat conftest.err >&5
     3222  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3223  (exit $ac_status); } && {
     3224         test -z "$ac_cxx_werror_flag" ||
     3225         test ! -s conftest.err
     3226       } && test -s conftest.$ac_objext; then
     3227  ac_cv_prog_cxx_g=yes
     3228else
     3229  echo "$as_me: failed program was:" >&5
     3230sed 's/^/| /' conftest.$ac_ext >&5
     3231
     3232
     3233fi
     3234
     3235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     3236fi
     3237
     3238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     3239fi
     3240
     3241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     3242   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
     3243fi
     3244{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
     3245echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
    26353246if test "$ac_test_CXXFLAGS" = set; then
    26363247  CXXFLAGS=$ac_save_CXXFLAGS
     
    26483259  fi
    26493260fi
    2650 for ac_declaration in \
    2651    '' \
    2652    'extern "C" void std::exit (int) throw (); using std::exit;' \
    2653    'extern "C" void std::exit (int); using std::exit;' \
    2654    'extern "C" void exit (int) throw ();' \
    2655    'extern "C" void exit (int);' \
    2656    'void exit (int);'
    2657 do
    2658   cat >conftest.$ac_ext <<_ACEOF
    2659 /* confdefs.h.  */
    2660 _ACEOF
    2661 cat confdefs.h >>conftest.$ac_ext
    2662 cat >>conftest.$ac_ext <<_ACEOF
    2663 /* end confdefs.h.  */
    2664 $ac_declaration
    2665 #include <stdlib.h>
    2666 int
    2667 main ()
    2668 {
    2669 exit (42);
    2670   ;
    2671   return 0;
    2672 }
    2673 _ACEOF
    2674 rm -f conftest.$ac_objext
    2675 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    2676   (eval $ac_compile) 2>conftest.er1
    2677   ac_status=$?
    2678   grep -v '^ *+' conftest.er1 >conftest.err
    2679   rm -f conftest.er1
    2680   cat conftest.err >&5
    2681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2682   (exit $ac_status); } &&
    2683          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
    2684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2685   (eval $ac_try) 2>&5
    2686   ac_status=$?
    2687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2688   (exit $ac_status); }; } &&
    2689          { ac_try='test -s conftest.$ac_objext'
    2690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2691   (eval $ac_try) 2>&5
    2692   ac_status=$?
    2693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2694   (exit $ac_status); }; }; then
    2695   :
    2696 else
    2697   echo "$as_me: failed program was:" >&5
    2698 sed 's/^/| /' conftest.$ac_ext >&5
    2699 
    2700 continue
    2701 fi
    2702 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    2703   cat >conftest.$ac_ext <<_ACEOF
    2704 /* confdefs.h.  */
    2705 _ACEOF
    2706 cat confdefs.h >>conftest.$ac_ext
    2707 cat >>conftest.$ac_ext <<_ACEOF
    2708 /* end confdefs.h.  */
    2709 $ac_declaration
    2710 int
    2711 main ()
    2712 {
    2713 exit (42);
    2714   ;
    2715   return 0;
    2716 }
    2717 _ACEOF
    2718 rm -f conftest.$ac_objext
    2719 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    2720   (eval $ac_compile) 2>conftest.er1
    2721   ac_status=$?
    2722   grep -v '^ *+' conftest.er1 >conftest.err
    2723   rm -f conftest.er1
    2724   cat conftest.err >&5
    2725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2726   (exit $ac_status); } &&
    2727          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
    2728   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2729   (eval $ac_try) 2>&5
    2730   ac_status=$?
    2731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2732   (exit $ac_status); }; } &&
    2733          { ac_try='test -s conftest.$ac_objext'
    2734   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    2735   (eval $ac_try) 2>&5
    2736   ac_status=$?
    2737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2738   (exit $ac_status); }; }; then
    2739   break
    2740 else
    2741   echo "$as_me: failed program was:" >&5
    2742 sed 's/^/| /' conftest.$ac_ext >&5
    2743 
    2744 fi
    2745 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    2746 done
    2747 rm -f conftest*
    2748 if test -n "$ac_declaration"; then
    2749   echo '#ifdef __cplusplus' >>confdefs.h
    2750   echo $ac_declaration      >>confdefs.h
    2751   echo '#endif'             >>confdefs.h
    2752 fi
    2753 
    27543261ac_ext=c
    27553262ac_cpp='$CPP $CPPFLAGS'
     
    27583265ac_compiler_gnu=$ac_cv_c_compiler_gnu
    27593266
    2760 ac_ext=cc
     3267ac_ext=cpp
    27613268ac_cpp='$CXXCPP $CPPFLAGS'
    27623269ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     
    27693276
    27703277
    2771 # Check whether --with-tcllib or --without-tcllib was given.
     3278# Check whether --with-tcllib was given.
    27723279if test "${with_tcllib+set}" = set; then
    2773   withval="$with_tcllib"
    2774   with_tcllib=$withval
     3280  withval=$with_tcllib; with_tcllib=$withval
    27753281else
    27763282  with_tcllib=/usr/lib
    2777 fi;
     3283fi
     3284
    27783285
    27793286TCL_LIB_DIR=""
    27803287TCL_LIB=""
    27813288TCL_LIB_VERSION=""
    2782 echo "$as_me:$LINENO: checking for tcl binary libraries" >&5
    2783 echo $ECHO_N "checking for tcl binary libraries... $ECHO_C" >&6
     3289{ echo "$as_me:$LINENO: checking for tcl binary libraries" >&5
     3290echo $ECHO_N "checking for tcl binary libraries... $ECHO_C" >&6; }
    27843291if test "x$with_tcllib" != "x" ; then
    27853292    if test -f "$with_tcllib"
     
    27963303                TCL_LIB_DIR="$with_tcllib"
    27973304            else
    2798                 echo "$as_me:$LINENO: result: no" >&5
    2799 echo "${ECHO_T}no" >&6
     3305                { echo "$as_me:$LINENO: result: no" >&5
     3306echo "${ECHO_T}no" >&6; }
    28003307                { { echo "$as_me:$LINENO: error: cannot find tcl binary libraries, try using --with-tcllib" >&5
    28013308echo "$as_me: error: cannot find tcl binary libraries, try using --with-tcllib" >&2;}
     
    28033310            fi
    28043311        else
    2805             echo "$as_me:$LINENO: result: no" >&5
    2806 echo "${ECHO_T}no" >&6
     3312            { echo "$as_me:$LINENO: result: no" >&5
     3313echo "${ECHO_T}no" >&6; }
    28073314            { { echo "$as_me:$LINENO: error: cannot find tcl binary libraries inside $with_tcllib, try using --with-tcllib" >&5
    28083315echo "$as_me: error: cannot find tcl binary libraries inside $with_tcllib, try using --with-tcllib" >&2;}
     
    28123319else
    28133320
    2814 ac_ext=cc
     3321ac_ext=cpp
    28153322ac_cpp='$CXXCPP $CPPFLAGS'
    28163323ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
    28173324ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
    28183325ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
    2819 echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
    2820 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
     3326{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
     3327echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; }
    28213328if test -z "$CXXCPP"; then
    28223329  if test "${ac_cv_prog_CXXCPP+set}" = set; then
     
    28483355                     Syntax error
    28493356_ACEOF
    2850 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
    2851   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     3357if { (ac_try="$ac_cpp conftest.$ac_ext"
     3358case "(($ac_try" in
     3359  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3360  *) ac_try_echo=$ac_try;;
     3361esac
     3362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3363  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    28523364  ac_status=$?
    28533365  grep -v '^ *+' conftest.er1 >conftest.err
     
    28553367  cat conftest.err >&5
    28563368  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2857   (exit $ac_status); } >/dev/null; then
    2858   if test -s conftest.err; then
    2859     ac_cpp_err=$ac_cxx_preproc_warn_flag
    2860     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
    2861   else
    2862     ac_cpp_err=
    2863   fi
    2864 else
    2865   ac_cpp_err=yes
    2866 fi
    2867 if test -z "$ac_cpp_err"; then
     3369  (exit $ac_status); } >/dev/null && {
     3370         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     3371         test ! -s conftest.err
     3372       }; then
    28683373  :
    28693374else
     
    28743379continue
    28753380fi
     3381
    28763382rm -f conftest.err conftest.$ac_ext
    28773383
    2878   # OK, works on sane cases.  Now check whether non-existent headers
     3384  # OK, works on sane cases.  Now check whether nonexistent headers
    28793385  # can be detected and how.
    28803386  cat >conftest.$ac_ext <<_ACEOF
     
    28863392#include <ac_nonexistent.h>
    28873393_ACEOF
    2888 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
    2889   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     3394if { (ac_try="$ac_cpp conftest.$ac_ext"
     3395case "(($ac_try" in
     3396  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3397  *) ac_try_echo=$ac_try;;
     3398esac
     3399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3400  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    28903401  ac_status=$?
    28913402  grep -v '^ *+' conftest.er1 >conftest.err
     
    28933404  cat conftest.err >&5
    28943405  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2895   (exit $ac_status); } >/dev/null; then
    2896   if test -s conftest.err; then
    2897     ac_cpp_err=$ac_cxx_preproc_warn_flag
    2898     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
    2899   else
    2900     ac_cpp_err=
    2901   fi
    2902 else
    2903   ac_cpp_err=yes
    2904 fi
    2905 if test -z "$ac_cpp_err"; then
     3406  (exit $ac_status); } >/dev/null && {
     3407         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     3408         test ! -s conftest.err
     3409       }; then
    29063410  # Broken: success on invalid input.
    29073411continue
     
    29143418break
    29153419fi
     3420
    29163421rm -f conftest.err conftest.$ac_ext
    29173422
     
    29313436  ac_cv_prog_CXXCPP=$CXXCPP
    29323437fi
    2933 echo "$as_me:$LINENO: result: $CXXCPP" >&5
    2934 echo "${ECHO_T}$CXXCPP" >&6
     3438{ echo "$as_me:$LINENO: result: $CXXCPP" >&5
     3439echo "${ECHO_T}$CXXCPP" >&6; }
    29353440ac_preproc_ok=false
    29363441for ac_cxx_preproc_warn_flag in '' yes
     
    29553460                     Syntax error
    29563461_ACEOF
    2957 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
    2958   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     3462if { (ac_try="$ac_cpp conftest.$ac_ext"
     3463case "(($ac_try" in
     3464  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3465  *) ac_try_echo=$ac_try;;
     3466esac
     3467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3468  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    29593469  ac_status=$?
    29603470  grep -v '^ *+' conftest.er1 >conftest.err
     
    29623472  cat conftest.err >&5
    29633473  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2964   (exit $ac_status); } >/dev/null; then
    2965   if test -s conftest.err; then
    2966     ac_cpp_err=$ac_cxx_preproc_warn_flag
    2967     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
    2968   else
    2969     ac_cpp_err=
    2970   fi
    2971 else
    2972   ac_cpp_err=yes
    2973 fi
    2974 if test -z "$ac_cpp_err"; then
     3474  (exit $ac_status); } >/dev/null && {
     3475         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     3476         test ! -s conftest.err
     3477       }; then
    29753478  :
    29763479else
     
    29813484continue
    29823485fi
     3486
    29833487rm -f conftest.err conftest.$ac_ext
    29843488
    2985   # OK, works on sane cases.  Now check whether non-existent headers
     3489  # OK, works on sane cases.  Now check whether nonexistent headers
    29863490  # can be detected and how.
    29873491  cat >conftest.$ac_ext <<_ACEOF
     
    29933497#include <ac_nonexistent.h>
    29943498_ACEOF
    2995 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
    2996   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     3499if { (ac_try="$ac_cpp conftest.$ac_ext"
     3500case "(($ac_try" in
     3501  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3502  *) ac_try_echo=$ac_try;;
     3503esac
     3504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3505  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    29973506  ac_status=$?
    29983507  grep -v '^ *+' conftest.er1 >conftest.err
     
    30003509  cat conftest.err >&5
    30013510  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3002   (exit $ac_status); } >/dev/null; then
    3003   if test -s conftest.err; then
    3004     ac_cpp_err=$ac_cxx_preproc_warn_flag
    3005     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
    3006   else
    3007     ac_cpp_err=
    3008   fi
    3009 else
    3010   ac_cpp_err=yes
    3011 fi
    3012 if test -z "$ac_cpp_err"; then
     3511  (exit $ac_status); } >/dev/null && {
     3512         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     3513         test ! -s conftest.err
     3514       }; then
    30133515  # Broken: success on invalid input.
    30143516continue
     
    30213523break
    30223524fi
     3525
    30233526rm -f conftest.err conftest.$ac_ext
    30243527
     
    30363539fi
    30373540
    3038 ac_ext=cc
     3541ac_ext=cpp
    30393542ac_cpp='$CXXCPP $CPPFLAGS'
    30403543ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     
    30433546
    30443547
    3045 echo "$as_me:$LINENO: checking for egrep" >&5
    3046 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
    3047 if test "${ac_cv_prog_egrep+set}" = set; then
     3548{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
     3549echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
     3550if test "${ac_cv_path_GREP+set}" = set; then
    30483551  echo $ECHO_N "(cached) $ECHO_C" >&6
    30493552else
    3050   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
    3051     then ac_cv_prog_egrep='grep -E'
    3052     else ac_cv_prog_egrep='egrep'
     3553  # Extract the first word of "grep ggrep" to use in msg output
     3554if test -z "$GREP"; then
     3555set dummy grep ggrep; ac_prog_name=$2
     3556if test "${ac_cv_path_GREP+set}" = set; then
     3557  echo $ECHO_N "(cached) $ECHO_C" >&6
     3558else
     3559  ac_path_GREP_found=false
     3560# Loop through the user's path and test for each of PROGNAME-LIST
     3561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3562for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
     3563do
     3564  IFS=$as_save_IFS
     3565  test -z "$as_dir" && as_dir=.
     3566  for ac_prog in grep ggrep; do
     3567  for ac_exec_ext in '' $ac_executable_extensions; do
     3568    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
     3569    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
     3570    # Check for GNU ac_path_GREP and select it if it is found.
     3571  # Check for GNU $ac_path_GREP
     3572case `"$ac_path_GREP" --version 2>&1` in
     3573*GNU*)
     3574  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
     3575*)
     3576  ac_count=0
     3577  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
     3578  while :
     3579  do
     3580    cat "conftest.in" "conftest.in" >"conftest.tmp"
     3581    mv "conftest.tmp" "conftest.in"
     3582    cp "conftest.in" "conftest.nl"
     3583    echo 'GREP' >> "conftest.nl"
     3584    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
     3585    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     3586    ac_count=`expr $ac_count + 1`
     3587    if test $ac_count -gt ${ac_path_GREP_max-0}; then
     3588      # Best one so far, save it but keep looking for a better one
     3589      ac_cv_path_GREP="$ac_path_GREP"
     3590      ac_path_GREP_max=$ac_count
    30533591    fi
    3054 fi
    3055 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
    3056 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
    3057  EGREP=$ac_cv_prog_egrep
    3058 
    3059 
    3060 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
    3061 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
     3592    # 10*(2^10) chars as input seems more than enough
     3593    test $ac_count -gt 10 && break
     3594  done
     3595  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
     3596esac
     3597
     3598
     3599    $ac_path_GREP_found && break 3
     3600  done
     3601done
     3602
     3603done
     3604IFS=$as_save_IFS
     3605
     3606
     3607fi
     3608
     3609GREP="$ac_cv_path_GREP"
     3610if test -z "$GREP"; then
     3611  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
     3612echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
     3613   { (exit 1); exit 1; }; }
     3614fi
     3615
     3616else
     3617  ac_cv_path_GREP=$GREP
     3618fi
     3619
     3620
     3621fi
     3622{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
     3623echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
     3624 GREP="$ac_cv_path_GREP"
     3625
     3626
     3627{ echo "$as_me:$LINENO: checking for egrep" >&5
     3628echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
     3629if test "${ac_cv_path_EGREP+set}" = set; then
     3630  echo $ECHO_N "(cached) $ECHO_C" >&6
     3631else
     3632  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
     3633   then ac_cv_path_EGREP="$GREP -E"
     3634   else
     3635     # Extract the first word of "egrep" to use in msg output
     3636if test -z "$EGREP"; then
     3637set dummy egrep; ac_prog_name=$2
     3638if test "${ac_cv_path_EGREP+set}" = set; then
     3639  echo $ECHO_N "(cached) $ECHO_C" >&6
     3640else
     3641  ac_path_EGREP_found=false
     3642# Loop through the user's path and test for each of PROGNAME-LIST
     3643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3644for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
     3645do
     3646  IFS=$as_save_IFS
     3647  test -z "$as_dir" && as_dir=.
     3648  for ac_prog in egrep; do
     3649  for ac_exec_ext in '' $ac_executable_extensions; do
     3650    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
     3651    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
     3652    # Check for GNU ac_path_EGREP and select it if it is found.
     3653  # Check for GNU $ac_path_EGREP
     3654case `"$ac_path_EGREP" --version 2>&1` in
     3655*GNU*)
     3656  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
     3657*)
     3658  ac_count=0
     3659  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
     3660  while :
     3661  do
     3662    cat "conftest.in" "conftest.in" >"conftest.tmp"
     3663    mv "conftest.tmp" "conftest.in"
     3664    cp "conftest.in" "conftest.nl"
     3665    echo 'EGREP' >> "conftest.nl"
     3666    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
     3667    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     3668    ac_count=`expr $ac_count + 1`
     3669    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
     3670      # Best one so far, save it but keep looking for a better one
     3671      ac_cv_path_EGREP="$ac_path_EGREP"
     3672      ac_path_EGREP_max=$ac_count
     3673    fi
     3674    # 10*(2^10) chars as input seems more than enough
     3675    test $ac_count -gt 10 && break
     3676  done
     3677  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
     3678esac
     3679
     3680
     3681    $ac_path_EGREP_found && break 3
     3682  done
     3683done
     3684
     3685done
     3686IFS=$as_save_IFS
     3687
     3688
     3689fi
     3690
     3691EGREP="$ac_cv_path_EGREP"
     3692if test -z "$EGREP"; then
     3693  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
     3694echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
     3695   { (exit 1); exit 1; }; }
     3696fi
     3697
     3698else
     3699  ac_cv_path_EGREP=$EGREP
     3700fi
     3701
     3702
     3703   fi
     3704fi
     3705{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
     3706echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
     3707 EGREP="$ac_cv_path_EGREP"
     3708
     3709
     3710{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
     3711echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
    30623712if test "${ac_cv_header_stdc+set}" = set; then
    30633713  echo $ECHO_N "(cached) $ECHO_C" >&6
     
    30833733_ACEOF
    30843734rm -f conftest.$ac_objext
    3085 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    3086   (eval $ac_compile) 2>conftest.er1
     3735if { (ac_try="$ac_compile"
     3736case "(($ac_try" in
     3737  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3738  *) ac_try_echo=$ac_try;;
     3739esac
     3740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3741  (eval "$ac_compile") 2>conftest.er1
    30873742  ac_status=$?
    30883743  grep -v '^ *+' conftest.er1 >conftest.err
     
    30903745  cat conftest.err >&5
    30913746  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3092   (exit $ac_status); } &&
    3093          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
    3094   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    3095   (eval $ac_try) 2>&5
    3096   ac_status=$?
    3097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3098   (exit $ac_status); }; } &&
    3099          { ac_try='test -s conftest.$ac_objext'
    3100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    3101   (eval $ac_try) 2>&5
    3102   ac_status=$?
    3103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3104   (exit $ac_status); }; }; then
     3747  (exit $ac_status); } && {
     3748         test -z "$ac_cxx_werror_flag" ||
     3749         test ! -s conftest.err
     3750       } && test -s conftest.$ac_objext; then
    31053751  ac_cv_header_stdc=yes
    31063752else
     
    31083754sed 's/^/| /' conftest.$ac_ext >&5
    31093755
    3110 ac_cv_header_stdc=no
    3111 fi
    3112 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     3756        ac_cv_header_stdc=no
     3757fi
     3758
     3759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    31133760
    31143761if test $ac_cv_header_stdc = yes; then
     
    31663813/* end confdefs.h.  */
    31673814#include <ctype.h>
     3815#include <stdlib.h>
    31683816#if ((' ' & 0x0FF) == 0x020)
    31693817# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
     
    31853833    if (XOR (islower (i), ISLOWER (i))
    31863834        || toupper (i) != TOUPPER (i))
    3187       exit(2);
    3188   exit (0);
     3835      return 2;
     3836  return 0;
    31893837}
    31903838_ACEOF
    31913839rm -f conftest$ac_exeext
    3192 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    3193   (eval $ac_link) 2>&5
     3840if { (ac_try="$ac_link"
     3841case "(($ac_try" in
     3842  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3843  *) ac_try_echo=$ac_try;;
     3844esac
     3845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3846  (eval "$ac_link") 2>&5
    31943847  ac_status=$?
    31953848  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    31963849  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    3197   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    3198   (eval $ac_try) 2>&5
     3850  { (case "(($ac_try" in
     3851  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3852  *) ac_try_echo=$ac_try;;
     3853esac
     3854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3855  (eval "$ac_try") 2>&5
    31993856  ac_status=$?
    32003857  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     
    32093866ac_cv_header_stdc=no
    32103867fi
    3211 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
    3212 fi
    3213 fi
    3214 fi
    3215 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
    3216 echo "${ECHO_T}$ac_cv_header_stdc" >&6
     3868rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
     3869fi
     3870
     3871
     3872fi
     3873fi
     3874{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
     3875echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
    32173876if test $ac_cv_header_stdc = yes; then
    32183877
     
    32373896do
    32383897as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
    3239 echo "$as_me:$LINENO: checking for $ac_header" >&5
    3240 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    3241 if eval "test \"\${$as_ac_Header+set}\" = set"; then
     3898{ echo "$as_me:$LINENO: checking for $ac_header" >&5
     3899echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
     3900if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    32423901  echo $ECHO_N "(cached) $ECHO_C" >&6
    32433902else
     
    32533912_ACEOF
    32543913rm -f conftest.$ac_objext
    3255 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    3256   (eval $ac_compile) 2>conftest.er1
     3914if { (ac_try="$ac_compile"
     3915case "(($ac_try" in
     3916  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3917  *) ac_try_echo=$ac_try;;
     3918esac
     3919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3920  (eval "$ac_compile") 2>conftest.er1
    32573921  ac_status=$?
    32583922  grep -v '^ *+' conftest.er1 >conftest.err
     
    32603924  cat conftest.err >&5
    32613925  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3262   (exit $ac_status); } &&
    3263          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
    3264   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    3265   (eval $ac_try) 2>&5
    3266   ac_status=$?
    3267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3268   (exit $ac_status); }; } &&
    3269          { ac_try='test -s conftest.$ac_objext'
    3270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    3271   (eval $ac_try) 2>&5
    3272   ac_status=$?
    3273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3274   (exit $ac_status); }; }; then
     3926  (exit $ac_status); } && {
     3927         test -z "$ac_cxx_werror_flag" ||
     3928         test ! -s conftest.err
     3929       } && test -s conftest.$ac_objext; then
    32753930  eval "$as_ac_Header=yes"
    32763931else
     
    32783933sed 's/^/| /' conftest.$ac_ext >&5
    32793934
    3280 eval "$as_ac_Header=no"
    3281 fi
    3282 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    3283 fi
    3284 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
    3285 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     3935        eval "$as_ac_Header=no"
     3936fi
     3937
     3938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     3939fi
     3940ac_res=`eval echo '${'$as_ac_Header'}'`
     3941               { echo "$as_me:$LINENO: result: $ac_res" >&5
     3942echo "${ECHO_T}$ac_res" >&6; }
    32863943if test `eval echo '${'$as_ac_Header'}'` = yes; then
    32873944  cat >>confdefs.h <<_ACEOF
     
    32983955do
    32993956as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
    3300 if eval "test \"\${$as_ac_Header+set}\" = set"; then
    3301   echo "$as_me:$LINENO: checking for $ac_header" >&5
    3302 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    3303 if eval "test \"\${$as_ac_Header+set}\" = set"; then
     3957if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
     3958  { echo "$as_me:$LINENO: checking for $ac_header" >&5
     3959echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
     3960if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    33043961  echo $ECHO_N "(cached) $ECHO_C" >&6
    33053962fi
    3306 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
    3307 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     3963ac_res=`eval echo '${'$as_ac_Header'}'`
     3964               { echo "$as_me:$LINENO: result: $ac_res" >&5
     3965echo "${ECHO_T}$ac_res" >&6; }
    33083966else
    33093967  # Is the header compilable?
    3310 echo "$as_me:$LINENO: checking $ac_header usability" >&5
    3311 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     3968{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
     3969echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
    33123970cat >conftest.$ac_ext <<_ACEOF
    33133971/* confdefs.h.  */
     
    33203978_ACEOF
    33213979rm -f conftest.$ac_objext
    3322 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    3323   (eval $ac_compile) 2>conftest.er1
     3980if { (ac_try="$ac_compile"
     3981case "(($ac_try" in
     3982  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3983  *) ac_try_echo=$ac_try;;
     3984esac
     3985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3986  (eval "$ac_compile") 2>conftest.er1
    33243987  ac_status=$?
    33253988  grep -v '^ *+' conftest.er1 >conftest.err
     
    33273990  cat conftest.err >&5
    33283991  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3329   (exit $ac_status); } &&
    3330          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
    3331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    3332   (eval $ac_try) 2>&5
    3333   ac_status=$?
    3334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3335   (exit $ac_status); }; } &&
    3336          { ac_try='test -s conftest.$ac_objext'
    3337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    3338   (eval $ac_try) 2>&5
    3339   ac_status=$?
    3340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3341   (exit $ac_status); }; }; then
     3992  (exit $ac_status); } && {
     3993         test -z "$ac_cxx_werror_flag" ||
     3994         test ! -s conftest.err
     3995       } && test -s conftest.$ac_objext; then
    33423996  ac_header_compiler=yes
    33433997else
     
    33453999sed 's/^/| /' conftest.$ac_ext >&5
    33464000
    3347 ac_header_compiler=no
    3348 fi
    3349 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    3350 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
    3351 echo "${ECHO_T}$ac_header_compiler" >&6
     4001        ac_header_compiler=no
     4002fi
     4003
     4004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     4005{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     4006echo "${ECHO_T}$ac_header_compiler" >&6; }
    33524007
    33534008# Is the header present?
    3354 echo "$as_me:$LINENO: checking $ac_header presence" >&5
    3355 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     4009{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
     4010echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
    33564011cat >conftest.$ac_ext <<_ACEOF
    33574012/* confdefs.h.  */
     
    33624017#include <$ac_header>
    33634018_ACEOF
    3364 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
    3365   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     4019if { (ac_try="$ac_cpp conftest.$ac_ext"
     4020case "(($ac_try" in
     4021  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     4022  *) ac_try_echo=$ac_try;;
     4023esac
     4024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4025  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    33664026  ac_status=$?
    33674027  grep -v '^ *+' conftest.er1 >conftest.err
     
    33694029  cat conftest.err >&5
    33704030  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3371   (exit $ac_status); } >/dev/null; then
    3372   if test -s conftest.err; then
    3373     ac_cpp_err=$ac_cxx_preproc_warn_flag
    3374     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
    3375   else
    3376     ac_cpp_err=
    3377   fi
    3378 else
    3379   ac_cpp_err=yes
    3380 fi
    3381 if test -z "$ac_cpp_err"; then
     4031  (exit $ac_status); } >/dev/null && {
     4032         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     4033         test ! -s conftest.err
     4034       }; then
    33824035  ac_header_preproc=yes
    33834036else
     
    33874040  ac_header_preproc=no
    33884041fi
     4042
    33894043rm -f conftest.err conftest.$ac_ext
    3390 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
    3391 echo "${ECHO_T}$ac_header_preproc" >&6
     4044{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     4045echo "${ECHO_T}$ac_header_preproc" >&6; }
    33924046
    33934047# So?  What about this header?
     
    34134067    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
    34144068echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    3415     (
    3416       cat <<\_ASBOX
     4069    ( cat <<\_ASBOX
    34174070## ----------------------------------- ##
    34184071## Report this to rappture@nanohub.org ##
    34194072## ----------------------------------- ##
    34204073_ASBOX
    3421     ) |
    3422       sed "s/^/$as_me: WARNING:     /" >&2
     4074     ) | sed "s/^/$as_me: WARNING:     /" >&2
    34234075    ;;
    34244076esac
    3425 echo "$as_me:$LINENO: checking for $ac_header" >&5
    3426 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    3427 if eval "test \"\${$as_ac_Header+set}\" = set"; then
     4077{ echo "$as_me:$LINENO: checking for $ac_header" >&5
     4078echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
     4079if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    34284080  echo $ECHO_N "(cached) $ECHO_C" >&6
    34294081else
    34304082  eval "$as_ac_Header=\$ac_header_preproc"
    34314083fi
    3432 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
    3433 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     4084ac_res=`eval echo '${'$as_ac_Header'}'`
     4085               { echo "$as_me:$LINENO: result: $ac_res" >&5
     4086echo "${ECHO_T}$ac_res" >&6; }
    34344087
    34354088fi
     
    34524105# TCL_LIB=`ls ${TCL_LIB_DIR} | sed -e '/libtcl([0-9]\.?[0-9])?\.so$/ {p}'`
    34534106# TCL_LIB_VERSION=$(echo ${TCL_LIB} | sed -e s/libtcl// -e s/\.so//)
    3454 echo "$as_me:$LINENO: result: ${TCL_LIB_DIR}/${TCL_LIB}" >&5
    3455 echo "${ECHO_T}${TCL_LIB_DIR}/${TCL_LIB}" >&6
     4107{ echo "$as_me:$LINENO: result: ${TCL_LIB_DIR}/${TCL_LIB}" >&5
     4108echo "${ECHO_T}${TCL_LIB_DIR}/${TCL_LIB}" >&6; }
    34564109# echo TCL_LIB_DIR = ${TCL_LIB_DIR}
    34574110# echo TCL_LIB = ${TCL_LIB}
     
    34624115
    34634116
    3464 # Check whether --with-tclinclude or --without-tclinclude was given.
     4117# Check whether --with-tclinclude was given.
    34654118if test "${with_tclinclude+set}" = set; then
    3466   withval="$with_tclinclude"
    3467   with_tclinclude=$withval
     4119  withval=$with_tclinclude; with_tclinclude=$withval
    34684120else
    34694121  with_tclinclude=/usr/include
    3470 fi;
     4122fi
     4123
    34714124
    34724125TCL_INCL_DIR=""
    3473 echo "$as_me:$LINENO: checking for tcl.h" >&5
    3474 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
     4126{ echo "$as_me:$LINENO: checking for tcl.h" >&5
     4127echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6; }
    34754128if test "x$with_tclinclude" != "x" ; then
    34764129    if test -f "$with_tclinclude"
     
    34914144                    TCL_INCL_DIR="$with_tclinclude/tcl${TCL_LIB_VERSION}"
    34924145                else
    3493                     echo "$as_me:$LINENO: result: no" >&5
    3494 echo "${ECHO_T}no" >&6
     4146                    { echo "$as_me:$LINENO: result: no" >&5
     4147echo "${ECHO_T}no" >&6; }
    34954148                    { { echo "$as_me:$LINENO: error: cannot find tcl.h, try using --with-tclinclude" >&5
    34964149echo "$as_me: error: cannot find tcl.h, try using --with-tclinclude" >&2;}
     
    34994152            fi
    35004153        else
    3501             echo "$as_me:$LINENO: result: no" >&5
    3502 echo "${ECHO_T}no" >&6
     4154            { echo "$as_me:$LINENO: result: no" >&5
     4155echo "${ECHO_T}no" >&6; }
    35034156            { { echo "$as_me:$LINENO: error: cannot find tcl.h inside $with_tclinclude, try using --with-tclinclude" >&5
    35044157echo "$as_me: error: cannot find tcl.h inside $with_tclinclude, try using --with-tclinclude" >&2;}
     
    35114164do
    35124165as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
    3513 if eval "test \"\${$as_ac_Header+set}\" = set"; then
    3514   echo "$as_me:$LINENO: checking for $ac_header" >&5
    3515 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    3516 if eval "test \"\${$as_ac_Header+set}\" = set"; then
     4166if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
     4167  { echo "$as_me:$LINENO: checking for $ac_header" >&5
     4168echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
     4169if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    35174170  echo $ECHO_N "(cached) $ECHO_C" >&6
    35184171fi
    3519 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
    3520 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     4172ac_res=`eval echo '${'$as_ac_Header'}'`
     4173               { echo "$as_me:$LINENO: result: $ac_res" >&5
     4174echo "${ECHO_T}$ac_res" >&6; }
    35214175else
    35224176  # Is the header compilable?
    3523 echo "$as_me:$LINENO: checking $ac_header usability" >&5
    3524 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     4177{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
     4178echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
    35254179cat >conftest.$ac_ext <<_ACEOF
    35264180/* confdefs.h.  */
     
    35334187_ACEOF
    35344188rm -f conftest.$ac_objext
    3535 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    3536   (eval $ac_compile) 2>conftest.er1
     4189if { (ac_try="$ac_compile"
     4190case "(($ac_try" in
     4191  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     4192  *) ac_try_echo=$ac_try;;
     4193esac
     4194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4195  (eval "$ac_compile") 2>conftest.er1
    35374196  ac_status=$?
    35384197  grep -v '^ *+' conftest.er1 >conftest.err
     
    35404199  cat conftest.err >&5
    35414200  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3542   (exit $ac_status); } &&
    3543          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
    3544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    3545   (eval $ac_try) 2>&5
    3546   ac_status=$?
    3547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3548   (exit $ac_status); }; } &&
    3549          { ac_try='test -s conftest.$ac_objext'
    3550   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    3551   (eval $ac_try) 2>&5
    3552   ac_status=$?
    3553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3554   (exit $ac_status); }; }; then
     4201  (exit $ac_status); } && {
     4202         test -z "$ac_cxx_werror_flag" ||
     4203         test ! -s conftest.err
     4204       } && test -s conftest.$ac_objext; then
    35554205  ac_header_compiler=yes
    35564206else
     
    35584208sed 's/^/| /' conftest.$ac_ext >&5
    35594209
    3560 ac_header_compiler=no
    3561 fi
    3562 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    3563 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
    3564 echo "${ECHO_T}$ac_header_compiler" >&6
     4210        ac_header_compiler=no
     4211fi
     4212
     4213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     4214{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     4215echo "${ECHO_T}$ac_header_compiler" >&6; }
    35654216
    35664217# Is the header present?
    3567 echo "$as_me:$LINENO: checking $ac_header presence" >&5
    3568 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     4218{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
     4219echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
    35694220cat >conftest.$ac_ext <<_ACEOF
    35704221/* confdefs.h.  */
     
    35754226#include <$ac_header>
    35764227_ACEOF
    3577 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
    3578   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     4228if { (ac_try="$ac_cpp conftest.$ac_ext"
     4229case "(($ac_try" in
     4230  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     4231  *) ac_try_echo=$ac_try;;
     4232esac
     4233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4234  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    35794235  ac_status=$?
    35804236  grep -v '^ *+' conftest.er1 >conftest.err
     
    35824238  cat conftest.err >&5
    35834239  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3584   (exit $ac_status); } >/dev/null; then
    3585   if test -s conftest.err; then
    3586     ac_cpp_err=$ac_cxx_preproc_warn_flag
    3587     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
    3588   else
    3589     ac_cpp_err=
    3590   fi
    3591 else
    3592   ac_cpp_err=yes
    3593 fi
    3594 if test -z "$ac_cpp_err"; then
     4240  (exit $ac_status); } >/dev/null && {
     4241         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     4242         test ! -s conftest.err
     4243       }; then
    35954244  ac_header_preproc=yes
    35964245else
     
    36004249  ac_header_preproc=no
    36014250fi
     4251
    36024252rm -f conftest.err conftest.$ac_ext
    3603 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
    3604 echo "${ECHO_T}$ac_header_preproc" >&6
     4253{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     4254echo "${ECHO_T}$ac_header_preproc" >&6; }
    36054255
    36064256# So?  What about this header?
     
    36264276    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
    36274277echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    3628     (
    3629       cat <<\_ASBOX
     4278    ( cat <<\_ASBOX
    36304279## ----------------------------------- ##
    36314280## Report this to rappture@nanohub.org ##
    36324281## ----------------------------------- ##
    36334282_ASBOX
    3634     ) |
    3635       sed "s/^/$as_me: WARNING:     /" >&2
     4283     ) | sed "s/^/$as_me: WARNING:     /" >&2
    36364284    ;;
    36374285esac
    3638 echo "$as_me:$LINENO: checking for $ac_header" >&5
    3639 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    3640 if eval "test \"\${$as_ac_Header+set}\" = set"; then
     4286{ echo "$as_me:$LINENO: checking for $ac_header" >&5
     4287echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
     4288if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    36414289  echo $ECHO_N "(cached) $ECHO_C" >&6
    36424290else
    36434291  eval "$as_ac_Header=\$ac_header_preproc"
    36444292fi
    3645 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
    3646 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     4293ac_res=`eval echo '${'$as_ac_Header'}'`
     4294               { echo "$as_me:$LINENO: result: $ac_res" >&5
     4295echo "${ECHO_T}$ac_res" >&6; }
    36474296
    36484297fi
     
    36614310
    36624311fi
    3663 echo "$as_me:$LINENO: result: ${TCL_INCL_DIR}" >&5
    3664 echo "${ECHO_T}${TCL_INCL_DIR}" >&6
    3665 
    3666 
    3667 
    3668 # Check whether --with-rappture or --without-rappture was given.
     4312{ echo "$as_me:$LINENO: result: ${TCL_INCL_DIR}" >&5
     4313echo "${ECHO_T}${TCL_INCL_DIR}" >&6; }
     4314
     4315
     4316
     4317# Check whether --with-rappture was given.
    36694318if test "${with_rappture+set}" = set; then
    3670   withval="$with_rappture"
    3671   with_rappture=$withval
     4319  withval=$with_rappture; with_rappture=$withval
    36724320else
    36734321  with_rappture=/usr
    3674 fi;
     4322fi
     4323
    36754324
    36764325RP2_INCL_DIR=""
    36774326RP_DIR=""
    3678 echo "$as_me:$LINENO: checking for rappture" >&5
    3679 echo $ECHO_N "checking for rappture... $ECHO_C" >&6
     4327{ echo "$as_me:$LINENO: checking for rappture" >&5
     4328echo $ECHO_N "checking for rappture... $ECHO_C" >&6; }
    36804329if test "x$with_rappture" != "x" ; then
    36814330    if test "x$with_rappture" != "xprefix" ; then
    36824331        if test -f "$with_rappture"
    36834332        then
    3684             echo "$as_me:$LINENO: result: no" >&5
    3685 echo "${ECHO_T}no" >&6
     4333            { echo "$as_me:$LINENO: result: no" >&5
     4334echo "${ECHO_T}no" >&6; }
    36864335            { { echo "$as_me:$LINENO: error: please provide --with-rappture with directory" >&5
    36874336echo "$as_me: error: please provide --with-rappture with directory" >&2;}
     
    36944343                    RP2_INCL_DIR="$with_rappture/include/rappture2"
    36954344                    RP_DIR="$with_rappture"
    3696                     echo "$as_me:$LINENO: result: yes" >&5
    3697 echo "${ECHO_T}yes" >&6
     4345                    { echo "$as_me:$LINENO: result: yes" >&5
     4346echo "${ECHO_T}yes" >&6; }
    36984347                else
    3699                     echo "$as_me:$LINENO: result: no" >&5
    3700 echo "${ECHO_T}no" >&6
     4348                    { echo "$as_me:$LINENO: result: no" >&5
     4349echo "${ECHO_T}no" >&6; }
    37014350                    { { echo "$as_me:$LINENO: error: cannot find rappture2.h and librappture2.a, try using --with-rappture" >&5
    37024351echo "$as_me: error: cannot find rappture2.h and librappture2.a, try using --with-rappture" >&2;}
     
    37044353                fi
    37054354            else
    3706                 echo "$as_me:$LINENO: result: no" >&5
    3707 echo "${ECHO_T}no" >&6
     4355                { echo "$as_me:$LINENO: result: no" >&5
     4356echo "${ECHO_T}no" >&6; }
    37084357                { { echo "$as_me:$LINENO: error: cannot find rappture2.h and librappture2.a inside $with_rappture, try using --with-rappture" >&5
    37094358echo "$as_me: error: cannot find rappture2.h and librappture2.a inside $with_rappture, try using --with-rappture" >&2;}
     
    37144363        RP2_INCL_DIR="$prefix/include/rappture2"
    37154364        RP_DIR="$prefix"
    3716         echo "$as_me:$LINENO: result: set to prefix" >&5
    3717 echo "${ECHO_T}set to prefix" >&6
     4365        { echo "$as_me:$LINENO: result: set to prefix" >&5
     4366echo "${ECHO_T}set to prefix" >&6; }
    37184367    fi
    37194368else
     
    37224371do
    37234372as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
    3724 if eval "test \"\${$as_ac_Header+set}\" = set"; then
    3725   echo "$as_me:$LINENO: checking for $ac_header" >&5
    3726 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    3727 if eval "test \"\${$as_ac_Header+set}\" = set"; then
     4373if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
     4374  { echo "$as_me:$LINENO: checking for $ac_header" >&5
     4375echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
     4376if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    37284377  echo $ECHO_N "(cached) $ECHO_C" >&6
    37294378fi
    3730 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
    3731 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     4379ac_res=`eval echo '${'$as_ac_Header'}'`
     4380               { echo "$as_me:$LINENO: result: $ac_res" >&5
     4381echo "${ECHO_T}$ac_res" >&6; }
    37324382else
    37334383  # Is the header compilable?
    3734 echo "$as_me:$LINENO: checking $ac_header usability" >&5
    3735 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     4384{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
     4385echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
    37364386cat >conftest.$ac_ext <<_ACEOF
    37374387/* confdefs.h.  */
     
    37444394_ACEOF
    37454395rm -f conftest.$ac_objext
    3746 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    3747   (eval $ac_compile) 2>conftest.er1
     4396if { (ac_try="$ac_compile"
     4397case "(($ac_try" in
     4398  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     4399  *) ac_try_echo=$ac_try;;
     4400esac
     4401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4402  (eval "$ac_compile") 2>conftest.er1
    37484403  ac_status=$?
    37494404  grep -v '^ *+' conftest.er1 >conftest.err
     
    37514406  cat conftest.err >&5
    37524407  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3753   (exit $ac_status); } &&
    3754          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
    3755   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    3756   (eval $ac_try) 2>&5
    3757   ac_status=$?
    3758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3759   (exit $ac_status); }; } &&
    3760          { ac_try='test -s conftest.$ac_objext'
    3761   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    3762   (eval $ac_try) 2>&5
    3763   ac_status=$?
    3764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3765   (exit $ac_status); }; }; then
     4408  (exit $ac_status); } && {
     4409         test -z "$ac_cxx_werror_flag" ||
     4410         test ! -s conftest.err
     4411       } && test -s conftest.$ac_objext; then
    37664412  ac_header_compiler=yes
    37674413else
     
    37694415sed 's/^/| /' conftest.$ac_ext >&5
    37704416
    3771 ac_header_compiler=no
    3772 fi
    3773 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    3774 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
    3775 echo "${ECHO_T}$ac_header_compiler" >&6
     4417        ac_header_compiler=no
     4418fi
     4419
     4420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     4421{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     4422echo "${ECHO_T}$ac_header_compiler" >&6; }
    37764423
    37774424# Is the header present?
    3778 echo "$as_me:$LINENO: checking $ac_header presence" >&5
    3779 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     4425{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
     4426echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
    37804427cat >conftest.$ac_ext <<_ACEOF
    37814428/* confdefs.h.  */
     
    37864433#include <$ac_header>
    37874434_ACEOF
    3788 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
    3789   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     4435if { (ac_try="$ac_cpp conftest.$ac_ext"
     4436case "(($ac_try" in
     4437  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     4438  *) ac_try_echo=$ac_try;;
     4439esac
     4440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4441  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    37904442  ac_status=$?
    37914443  grep -v '^ *+' conftest.er1 >conftest.err
     
    37934445  cat conftest.err >&5
    37944446  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3795   (exit $ac_status); } >/dev/null; then
    3796   if test -s conftest.err; then
    3797     ac_cpp_err=$ac_cxx_preproc_warn_flag
    3798     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
    3799   else
    3800     ac_cpp_err=
    3801   fi
    3802 else
    3803   ac_cpp_err=yes
    3804 fi
    3805 if test -z "$ac_cpp_err"; then
     4447  (exit $ac_status); } >/dev/null && {
     4448         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     4449         test ! -s conftest.err
     4450       }; then
    38064451  ac_header_preproc=yes
    38074452else
     
    38114456  ac_header_preproc=no
    38124457fi
     4458
    38134459rm -f conftest.err conftest.$ac_ext
    3814 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
    3815 echo "${ECHO_T}$ac_header_preproc" >&6
     4460{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     4461echo "${ECHO_T}$ac_header_preproc" >&6; }
    38164462
    38174463# So?  What about this header?
     
    38374483    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
    38384484echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    3839     (
    3840       cat <<\_ASBOX
     4485    ( cat <<\_ASBOX
    38414486## ----------------------------------- ##
    38424487## Report this to rappture@nanohub.org ##
    38434488## ----------------------------------- ##
    38444489_ASBOX
    3845     ) |
    3846       sed "s/^/$as_me: WARNING:     /" >&2
     4490     ) | sed "s/^/$as_me: WARNING:     /" >&2
    38474491    ;;
    38484492esac
    3849 echo "$as_me:$LINENO: checking for $ac_header" >&5
    3850 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    3851 if eval "test \"\${$as_ac_Header+set}\" = set"; then
     4493{ echo "$as_me:$LINENO: checking for $ac_header" >&5
     4494echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
     4495if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    38524496  echo $ECHO_N "(cached) $ECHO_C" >&6
    38534497else
    38544498  eval "$as_ac_Header=\$ac_header_preproc"
    38554499fi
    3856 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
    3857 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     4500ac_res=`eval echo '${'$as_ac_Header'}'`
     4501               { echo "$as_me:$LINENO: result: $ac_res" >&5
     4502echo "${ECHO_T}$ac_res" >&6; }
    38584503
    38594504fi
     
    38724517
    38734518fi
    3874 echo "$as_me:$LINENO: result: ${RP_DIR}/include" >&5
    3875 echo "${ECHO_T}${RP_DIR}/include" >&6
    3876 
    3877 
    3878 
    3879 
    3880 
    3881                                                   ac_config_files="$ac_config_files Makefile nanoscale/Makefile nanovis/Makefile pymolproxy/Makefile start_viz.sh"
     4519{ echo "$as_me:$LINENO: result: ${RP_DIR}/include" >&5
     4520echo "${ECHO_T}${RP_DIR}/include" >&6; }
     4521
     4522
     4523
     4524
     4525
     4526ac_config_files="$ac_config_files Makefile nanoscale/Makefile nanovis/Makefile nanovis/newmat11/Makefile nanovis/R2/src/Makefile pymolproxy/Makefile start_viz.sh"
     4527
    38824528cat >confcache <<\_ACEOF
    38834529# This file is a shell script that caches the results of configure
     
    38984544# The following way of writing the cache mishandles newlines in values,
    38994545# but we know of no workaround that is simple, portable, and efficient.
    3900 # So, don't put newlines in cache variables' values.
     4546# So, we kill variables containing newlines.
    39014547# Ultrix sh set writes to stderr and can't be redirected directly,
    39024548# and sets the high bit in the cache file unless we assign to the vars.
    3903 {
     4549(
     4550  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
     4551    eval ac_val=\$$ac_var
     4552    case $ac_val in #(
     4553    *${as_nl}*)
     4554      case $ac_var in #(
     4555      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
     4556echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
     4557      esac
     4558      case $ac_var in #(
     4559      _ | IFS | as_nl) ;; #(
     4560      *) $as_unset $ac_var ;;
     4561      esac ;;
     4562    esac
     4563  done
     4564
    39044565  (set) 2>&1 |
    3905     case `(ac_space=' '; set | grep ac_space) 2>&1` in
    3906     *ac_space=\ *)
     4566    case $as_nl`(ac_space=' '; set) 2>&1` in #(
     4567    *${as_nl}ac_space=\ *)
    39074568      # `set' does not quote correctly, so add quotes (double-quote
    39084569      # substitution turns \\\\ into \\, and sed turns \\ into \).
     
    39104571        "s/'/'\\\\''/g;
    39114572          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
    3912       ;;
     4573      ;; #(
    39134574    *)
    39144575      # `set' quotes correctly as required by POSIX, so do not add quotes.
    3915       sed -n \
    3916         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
     4576      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
    39174577      ;;
    3918     esac;
    3919 } |
     4578    esac |
     4579    sort
     4580) |
    39204581  sed '
     4582     /^ac_cv_env_/b end
    39214583     t clear
    3922      : clear
     4584     :clear
    39234585     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
    39244586     t end
    3925      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
    3926      : end' >>confcache
    3927 if diff $cache_file confcache >/dev/null 2>&1; then :; else
    3928   if test -w $cache_file; then
    3929     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
     4587     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     4588     :end' >>confcache
     4589if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
     4590  if test -w "$cache_file"; then
     4591    test "x$cache_file" != "x/dev/null" &&
     4592      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
     4593echo "$as_me: updating cache $cache_file" >&6;}
    39304594    cat confcache >$cache_file
    39314595  else
    3932     echo "not updating unwritable cache $cache_file"
     4596    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
     4597echo "$as_me: not updating unwritable cache $cache_file" >&6;}
    39334598  fi
    39344599fi
     
    39384603# Let make expand exec_prefix.
    39394604test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
    3940 
    3941 # VPATH may cause trouble with some makes, so we remove $(srcdir),
    3942 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
    3943 # trailing colons and then remove the whole line if VPATH becomes empty
    3944 # (actually we leave an empty line to preserve line numbers).
    3945 if test "x$srcdir" = x.; then
    3946   ac_vpsub='/^[  ]*VPATH[        ]*=/{
    3947 s/:*\$(srcdir):*/:/;
    3948 s/:*\${srcdir}:*/:/;
    3949 s/:*@srcdir@:*/:/;
    3950 s/^\([^=]*=[     ]*\):*/\1/;
    3951 s/:*$//;
    3952 s/^[^=]*=[       ]*$//;
    3953 }'
    3954 fi
    39554605
    39564606# Transform confdefs.h into DEFS.
     
    39594609#
    39604610# If the first sed substitution is executed (which looks for macros that
    3961 # take arguments), then we branch to the quote section.  Otherwise,
     4611# take arguments), then branch to the quote section.  Otherwise,
    39624612# look for a macro that doesn't take arguments.
    3963 cat >confdef2opt.sed <<\_ACEOF
     4613ac_script='
    39644614t clear
    3965 : clear
    3966 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\),-D\1=\2,g
     4615:clear
     4616s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
    39674617t quote
    3968 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\),-D\1=\2,g
     4618s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
    39694619t quote
    3970 d
    3971 : quote
    3972 s,[      `~#$^&*(){}\\|;'"<>?],\\&,g
    3973 s,\[,\\&,g
    3974 s,\],\\&,g
    3975 s,\$,$$,g
    3976 p
    3977 _ACEOF
    3978 # We use echo to avoid assuming a particular line-breaking character.
    3979 # The extra dot is to prevent the shell from consuming trailing
    3980 # line-breaks from the sub-command output.  A line-break within
    3981 # single-quotes doesn't work because, if this script is created in a
    3982 # platform that uses two characters for line-breaks (e.g., DOS), tr
    3983 # would break.
    3984 ac_LF_and_DOT=`echo; echo .`
    3985 DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
    3986 rm -f confdef2opt.sed
     4620b any
     4621:quote
     4622s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
     4623s/\[/\\&/g
     4624s/\]/\\&/g
     4625s/\$/$$/g
     4626H
     4627:any
     4628${
     4629        g
     4630        s/^\n//
     4631        s/\n/ /g
     4632        p
     4633}
     4634'
     4635DEFS=`sed -n "$ac_script" confdefs.h`
    39874636
    39884637
     
    39914640for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
    39924641  # 1. Remove the extension, and $U if already installed.
    3993   ac_i=`echo "$ac_i" |
    3994          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
    3995   # 2. Add them.
    3996   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
    3997   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
     4642  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
     4643  ac_i=`echo "$ac_i" | sed "$ac_script"`
     4644  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
     4645  #    will be set to the directory where LIBOBJS objects are built.
     4646  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
     4647  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
    39984648done
    39994649LIBOBJS=$ac_libobjs
     
    40264676## --------------------- ##
    40274677
    4028 # Be Bourne compatible
     4678# Be more Bourne compatible
     4679DUALCASE=1; export DUALCASE # for MKS sh
    40294680if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
    40304681  emulate sh
     
    40334684  # is contrary to our usage.  Disable this feature.
    40344685  alias -g '${1+"$@"}'='"$@"'
    4035 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
    4036   set -o posix
    4037 fi
    4038 DUALCASE=1; export DUALCASE # for MKS sh
    4039 
    4040 # Support unset when possible.
    4041 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
    4042   as_unset=unset
    4043 else
    4044   as_unset=false
    4045 fi
    4046 
    4047 
    4048 # Work around bugs in pre-3.0 UWIN ksh.
    4049 $as_unset ENV MAIL MAILPATH
    4050 PS1='$ '
    4051 PS2='> '
    4052 PS4='+ '
    4053 
    4054 # NLS nuisances.
    4055 for as_var in \
    4056   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
    4057   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
    4058   LC_TELEPHONE LC_TIME
    4059 do
    4060   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
    4061     eval $as_var=C; export $as_var
    4062   else
    4063     $as_unset $as_var
    4064   fi
    4065 done
    4066 
    4067 # Required to use basename.
    4068 if expr a : '\(a\)' >/dev/null 2>&1; then
    4069   as_expr=expr
    4070 else
    4071   as_expr=false
    4072 fi
    4073 
    4074 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
    4075   as_basename=basename
    4076 else
    4077   as_basename=false
    4078 fi
    4079 
    4080 
    4081 # Name of the executable.
    4082 as_me=`$as_basename "$0" ||
    4083 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
    4084          X"$0" : 'X\(//\)$' \| \
    4085          X"$0" : 'X\(/\)$' \| \
    4086          .     : '\(.\)' 2>/dev/null ||
    4087 echo X/"$0" |
    4088     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
    4089           /^X\/\(\/\/\)$/{ s//\1/; q; }
    4090           /^X\/\(\/\).*/{ s//\1/; q; }
    4091           s/.*/./; q'`
    4092 
    4093 
    4094 # PATH needs CR, and LINENO needs CR and PATH.
     4686  setopt NO_GLOB_SUBST
     4687else
     4688  case `(set -o) 2>/dev/null` in
     4689  *posix*) set -o posix ;;
     4690esac
     4691
     4692fi
     4693
     4694
     4695
     4696
     4697# PATH needs CR
    40954698# Avoid depending upon Character Ranges.
    40964699as_cr_letters='abcdefghijklmnopqrstuvwxyz'
     
    41134716fi
    41144717
    4115 
    4116   as_lineno_1=$LINENO
    4117   as_lineno_2=$LINENO
    4118   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
    4119   test "x$as_lineno_1" != "x$as_lineno_2" &&
    4120   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
    4121   # Find who we are.  Look in the path if we contain no path at all
    4122   # relative or not.
    4123   case $0 in
    4124     *[\\/]* ) as_myself=$0 ;;
    4125     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     4718# Support unset when possible.
     4719if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
     4720  as_unset=unset
     4721else
     4722  as_unset=false
     4723fi
     4724
     4725
     4726# IFS
     4727# We need space, tab and new line, in precisely that order.  Quoting is
     4728# there to prevent editors from complaining about space-tab.
     4729# (If _AS_PATH_WALK were called with IFS unset, it would disable word
     4730# splitting by setting IFS to empty value.)
     4731as_nl='
     4732'
     4733IFS=" ""        $as_nl"
     4734
     4735# Find who we are.  Look in the path if we contain no directory separator.
     4736case $0 in
     4737  *[\\/]* ) as_myself=$0 ;;
     4738  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    41264739for as_dir in $PATH
    41274740do
     
    41304743  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
    41314744done
    4132 
    4133        ;;
    4134   esac
    4135   # We did not find ourselves, most probably we were run as `sh COMMAND'
    4136   # in which case we are not to be found in the path.
    4137   if test "x$as_myself" = x; then
    4138     as_myself=$0
     4745IFS=$as_save_IFS
     4746
     4747     ;;
     4748esac
     4749# We did not find ourselves, most probably we were run as `sh COMMAND'
     4750# in which case we are not to be found in the path.
     4751if test "x$as_myself" = x; then
     4752  as_myself=$0
     4753fi
     4754if test ! -f "$as_myself"; then
     4755  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
     4756  { (exit 1); exit 1; }
     4757fi
     4758
     4759# Work around bugs in pre-3.0 UWIN ksh.
     4760for as_var in ENV MAIL MAILPATH
     4761do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
     4762done
     4763PS1='$ '
     4764PS2='> '
     4765PS4='+ '
     4766
     4767# NLS nuisances.
     4768for as_var in \
     4769  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
     4770  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
     4771  LC_TELEPHONE LC_TIME
     4772do
     4773  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     4774    eval $as_var=C; export $as_var
     4775  else
     4776    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
    41394777  fi
    4140   if test ! -f "$as_myself"; then
    4141     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
    4142 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
    4143    { (exit 1); exit 1; }; }
    4144   fi
    4145   case $CONFIG_SHELL in
    4146   '')
    4147     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    4148 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
    4149 do
    4150   IFS=$as_save_IFS
    4151   test -z "$as_dir" && as_dir=.
    4152   for as_base in sh bash ksh sh5; do
    4153          case $as_dir in
    4154          /*)
    4155            if ("$as_dir/$as_base" -c '
     4778done
     4779
     4780# Required to use basename.
     4781if expr a : '\(a\)' >/dev/null 2>&1 &&
     4782   test "X`expr 00001 : '.*\(...\)'`" = X001; then
     4783  as_expr=expr
     4784else
     4785  as_expr=false
     4786fi
     4787
     4788if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
     4789  as_basename=basename
     4790else
     4791  as_basename=false
     4792fi
     4793
     4794
     4795# Name of the executable.
     4796as_me=`$as_basename -- "$0" ||
     4797$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
     4798         X"$0" : 'X\(//\)$' \| \
     4799         X"$0" : 'X\(/\)' \| . 2>/dev/null ||
     4800echo X/"$0" |
     4801    sed '/^.*\/\([^/][^/]*\)\/*$/{
     4802            s//\1/
     4803            q
     4804          }
     4805          /^X\/\(\/\/\)$/{
     4806            s//\1/
     4807            q
     4808          }
     4809          /^X\/\(\/\).*/{
     4810            s//\1/
     4811            q
     4812          }
     4813          s/.*/./; q'`
     4814
     4815# CDPATH.
     4816$as_unset CDPATH
     4817
     4818
     4819
    41564820  as_lineno_1=$LINENO
    41574821  as_lineno_2=$LINENO
    4158   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
    41594822  test "x$as_lineno_1" != "x$as_lineno_2" &&
    4160   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
    4161              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
    4162              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
    4163              CONFIG_SHELL=$as_dir/$as_base
    4164              export CONFIG_SHELL
    4165              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
    4166            fi;;
    4167          esac
    4168        done
    4169 done
    4170 ;;
    4171   esac
     4823  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
    41724824
    41734825  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
    41744826  # uniformly replaced by the line number.  The first 'sed' inserts a
    4175   # line-number line before each line; the second 'sed' does the real
    4176   # work.  The second script uses 'N' to pair each line-number line
    4177   # with the numbered line, and appends trailing '-' during
    4178   # substitution so that $LINENO is not a special case at line end.
     4827  # line-number line after each line using $LINENO; the second 'sed'
     4828  # does the real work.  The second script uses 'N' to pair each
     4829  # line-number line with the line containing $LINENO, and appends
     4830  # trailing '-' during substitution so that $LINENO is not a special
     4831  # case at line end.
    41794832  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
    4180   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
    4181   sed '=' <$as_myself |
     4833  # scripts with optimization help from Paolo Bonzini.  Blame Lee
     4834  # E. McMahon (1931-1989) for sed's syntax.  :-)
     4835  sed -n '
     4836    p
     4837    /[$]LINENO/=
     4838  ' <$as_myself |
    41824839    sed '
     4840      s/[$]LINENO.*/&-/
     4841      t lineno
     4842      b
     4843      :lineno
    41834844      N
    4184       s,$,-,
    4185       : loop
    4186       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
     4845      :loop
     4846      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
    41874847      t loop
    4188       s,-$,,
    4189       s,^['$as_cr_digits']*\n,,
     4848      s/-\n.*//
    41904849    ' >$as_me.lineno &&
    4191   chmod +x $as_me.lineno ||
    4192     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
    4193 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
     4850  chmod +x "$as_me.lineno" ||
     4851    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
    41944852   { (exit 1); exit 1; }; }
    41954853
    41964854  # Don't try to exec as it changes $[0], causing all sort of problems
    41974855  # (the dirname of $[0] is not the place where we might find the
    4198   # original and so on.  Autoconf is especially sensible to this).
    4199   . ./$as_me.lineno
     4856  # original and so on.  Autoconf is especially sensitive to this).
     4857  . "./$as_me.lineno"
    42004858  # Exit status is that of the last command.
    42014859  exit
     
    42034861
    42044862
    4205 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
    4206   *c*,-n*) ECHO_N= ECHO_C='
    4207 ' ECHO_T='      ' ;;
    4208   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
    4209   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
    4210 esac
    4211 
    4212 if expr a : '\(a\)' >/dev/null 2>&1; then
     4863if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
     4864  as_dirname=dirname
     4865else
     4866  as_dirname=false
     4867fi
     4868
     4869ECHO_C= ECHO_N= ECHO_T=
     4870case `echo -n x` in
     4871-n*)
     4872  case `echo 'x\c'` in
     4873  *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
     4874  *)   ECHO_C='\c';;
     4875  esac;;
     4876*)
     4877  ECHO_N='-n';;
     4878esac
     4879
     4880if expr a : '\(a\)' >/dev/null 2>&1 &&
     4881   test "X`expr 00001 : '.*\(...\)'`" = X001; then
    42134882  as_expr=expr
    42144883else
     
    42174886
    42184887rm -f conf$$ conf$$.exe conf$$.file
     4888if test -d conf$$.dir; then
     4889  rm -f conf$$.dir/conf$$.file
     4890else
     4891  rm -f conf$$.dir
     4892  mkdir conf$$.dir
     4893fi
    42194894echo >conf$$.file
    42204895if ln -s conf$$.file conf$$ 2>/dev/null; then
    4221   # We could just check for DJGPP; but this test a) works b) is more generic
    4222   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
    4223   if test -f conf$$.exe; then
    4224     # Don't use ln at all; we don't have any links
     4896  as_ln_s='ln -s'
     4897  # ... but there are two gotchas:
     4898  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     4899  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
     4900  # In both cases, we have to default to `cp -p'.
     4901  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
    42254902    as_ln_s='cp -p'
    4226   else
    4227     as_ln_s='ln -s'
    4228   fi
    42294903elif ln conf$$.file conf$$ 2>/dev/null; then
    42304904  as_ln_s=ln
     
    42324906  as_ln_s='cp -p'
    42334907fi
    4234 rm -f conf$$ conf$$.exe conf$$.file
     4908rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
     4909rmdir conf$$.dir 2>/dev/null
    42354910
    42364911if mkdir -p . 2>/dev/null; then
     
    42414916fi
    42424917
    4243 as_executable_p="test -f"
     4918if test -x / >/dev/null 2>&1; then
     4919  as_test_x='test -x'
     4920else
     4921  if ls -dL / >/dev/null 2>&1; then
     4922    as_ls_L_option=L
     4923  else
     4924    as_ls_L_option=
     4925  fi
     4926  as_test_x='
     4927    eval sh -c '\''
     4928      if test -d "$1"; then
     4929        test -d "$1/.";
     4930      else
     4931        case $1 in
     4932        -*)set "./$1";;
     4933        esac;
     4934        case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
     4935        ???[sx]*):;;*)false;;esac;fi
     4936    '\'' sh
     4937  '
     4938fi
     4939as_executable_p=$as_test_x
    42444940
    42454941# Sed expression to map a string onto a valid CPP name.
     
    42504946
    42514947
    4252 # IFS
    4253 # We need space, tab and new line, in precisely that order.
    4254 as_nl='
    4255 '
    4256 IFS="   $as_nl"
    4257 
    4258 # CDPATH.
    4259 $as_unset CDPATH
    4260 
    42614948exec 6>&1
    42624949
    4263 # Open the log real soon, to keep \$[0] and so on meaningful, and to
     4950# Save the log message, to keep $[0] and so on meaningful, and to
    42644951# report actual input values of CONFIG_FILES etc. instead of their
    4265 # values after options handling.  Logging --version etc. is OK.
    4266 exec 5>>config.log
    4267 {
    4268   echo
    4269   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
    4270 ## Running $as_me. ##
    4271 _ASBOX
    4272 } >&5
    4273 cat >&5 <<_CSEOF
    4274 
     4952# values after options handling.
     4953ac_log="
    42754954This file was extended by vizservers $as_me 0.1, which was
    4276 generated by GNU Autoconf 2.59.  Invocation command line was
     4955generated by GNU Autoconf 2.61.  Invocation command line was
    42774956
    42784957  CONFIG_FILES    = $CONFIG_FILES
     
    42824961  $ $0 $@
    42834962
    4284 _CSEOF
    4285 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
    4286 echo >&5
    4287 _ACEOF
    4288 
     4963on `(hostname || uname -n) 2>/dev/null | sed 1q`
     4964"
     4965
     4966_ACEOF
     4967
     4968cat >>$CONFIG_STATUS <<_ACEOF
    42894969# Files that config.status was made for.
    4290 if test -n "$ac_config_files"; then
    4291   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
    4292 fi
    4293 
    4294 if test -n "$ac_config_headers"; then
    4295   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
    4296 fi
    4297 
    4298 if test -n "$ac_config_links"; then
    4299   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
    4300 fi
    4301 
    4302 if test -n "$ac_config_commands"; then
    4303   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
    4304 fi
     4970config_files="$ac_config_files"
     4971
     4972_ACEOF
    43054973
    43064974cat >>$CONFIG_STATUS <<\_ACEOF
    4307 
    43084975ac_cs_usage="\
    43094976\`$as_me' instantiates files from templates according to the
     
    43134980
    43144981  -h, --help       print this help, then exit
    4315   -V, --version    print version number, then exit
     4982  -V, --version    print version number and configuration settings, then exit
    43164983  -q, --quiet      do not print progress messages
    43174984  -d, --debug      don't remove temporary files
     
    43244991
    43254992Report bugs to <bug-autoconf@gnu.org>."
    4326 _ACEOF
    4327 
     4993
     4994_ACEOF
    43284995cat >>$CONFIG_STATUS <<_ACEOF
    43294996ac_cs_version="\\
    43304997vizservers config.status 0.1
    4331 configured by $0, generated by GNU Autoconf 2.59,
    4332   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
    4333 
    4334 Copyright (C) 2003 Free Software Foundation, Inc.
     4998configured by $0, generated by GNU Autoconf 2.61,
     4999  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
     5000
     5001Copyright (C) 2006 Free Software Foundation, Inc.
    43355002This config.status script is free software; the Free Software Foundation
    43365003gives unlimited permission to copy, distribute and modify it."
    4337 srcdir=$srcdir
    4338 INSTALL="$INSTALL"
     5004
     5005ac_pwd='$ac_pwd'
     5006srcdir='$srcdir'
     5007INSTALL='$INSTALL'
    43395008_ACEOF
    43405009
     
    43475016  case $1 in
    43485017  --*=*)
    4349     ac_option=`expr "x$1" : 'x\([^=]*\)='`
    4350     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
     5018    ac_option=`expr "X$1" : 'X\([^=]*\)='`
     5019    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
    43515020    ac_shift=:
    43525021    ;;
    4353   -*)
     5022  *)
    43545023    ac_option=$1
    43555024    ac_optarg=$2
    43565025    ac_shift=shift
    43575026    ;;
    4358   *) # This is not an option, so the user has probably given explicit
    4359      # arguments.
    4360      ac_option=$1
    4361      ac_need_defaults=false;;
    43625027  esac
    43635028
    43645029  case $ac_option in
    43655030  # Handling of the options.
    4366 _ACEOF
    4367 cat >>$CONFIG_STATUS <<\_ACEOF
    43685031  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    43695032    ac_cs_recheck=: ;;
    4370   --version | --vers* | -V )
    4371     echo "$ac_cs_version"; exit 0 ;;
    4372   --he | --h)
    4373     # Conflict between --help and --header
    4374     { { echo "$as_me:$LINENO: error: ambiguous option: $1
    4375 Try \`$0 --help' for more information." >&5
    4376 echo "$as_me: error: ambiguous option: $1
    4377 Try \`$0 --help' for more information." >&2;}
    4378    { (exit 1); exit 1; }; };;
    4379   --help | --hel | -h )
    4380     echo "$ac_cs_usage"; exit 0 ;;
    4381   --debug | --d* | -d )
     5033  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
     5034    echo "$ac_cs_version"; exit ;;
     5035  --debug | --debu | --deb | --de | --d | -d )
    43825036    debug=: ;;
    43835037  --file | --fil | --fi | --f )
     
    43855039    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
    43865040    ac_need_defaults=false;;
    4387   --header | --heade | --head | --hea )
    4388     $ac_shift
    4389     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
    4390     ac_need_defaults=false;;
     5041  --he | --h |  --help | --hel | -h )
     5042    echo "$ac_cs_usage"; exit ;;
    43915043  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
    43925044  | -silent | --silent | --silen | --sile | --sil | --si | --s)
     
    43945046
    43955047  # This is an error.
    4396   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
    4397 Try \`$0 --help' for more information." >&5
    4398 echo "$as_me: error: unrecognized option: $1
    4399 Try \`$0 --help' for more information." >&2;}
     5048  -*) { echo "$as_me: error: unrecognized option: $1
     5049Try \`$0 --help' for more information." >&2
    44005050   { (exit 1); exit 1; }; } ;;
    44015051
    4402   *) ac_config_targets="$ac_config_targets $1" ;;
     5052  *) ac_config_targets="$ac_config_targets $1"
     5053     ac_need_defaults=false ;;
    44035054
    44045055  esac
     
    44165067cat >>$CONFIG_STATUS <<_ACEOF
    44175068if \$ac_cs_recheck; then
    4418   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
    4419   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
    4420 fi
    4421 
    4422 _ACEOF
    4423 
    4424 
    4425 
    4426 
    4427 
     5069  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
     5070  CONFIG_SHELL=$SHELL
     5071  export CONFIG_SHELL
     5072  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
     5073fi
     5074
     5075_ACEOF
    44285076cat >>$CONFIG_STATUS <<\_ACEOF
     5077exec 5>>config.log
     5078{
     5079  echo
     5080  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
     5081## Running $as_me. ##
     5082_ASBOX
     5083  echo "$ac_log"
     5084} >&5
     5085
     5086_ACEOF
     5087cat >>$CONFIG_STATUS <<_ACEOF
     5088_ACEOF
     5089
     5090cat >>$CONFIG_STATUS <<\_ACEOF
     5091
     5092# Handling of arguments.
    44295093for ac_config_target in $ac_config_targets
    44305094do
    4431   case "$ac_config_target" in
    4432   # Handling of arguments.
    4433   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
    4434   "nanoscale/Makefile" ) CONFIG_FILES="$CONFIG_FILES nanoscale/Makefile" ;;
    4435   "nanovis/Makefile" ) CONFIG_FILES="$CONFIG_FILES nanovis/Makefile" ;;
    4436   "pymolproxy/Makefile" ) CONFIG_FILES="$CONFIG_FILES pymolproxy/Makefile" ;;
    4437   "start_viz.sh" ) CONFIG_FILES="$CONFIG_FILES start_viz.sh" ;;
     5095  case $ac_config_target in
     5096    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     5097    "nanoscale/Makefile") CONFIG_FILES="$CONFIG_FILES nanoscale/Makefile" ;;
     5098    "nanovis/Makefile") CONFIG_FILES="$CONFIG_FILES nanovis/Makefile" ;;
     5099    "nanovis/newmat11/Makefile") CONFIG_FILES="$CONFIG_FILES nanovis/newmat11/Makefile" ;;
     5100    "nanovis/R2/src/Makefile") CONFIG_FILES="$CONFIG_FILES nanovis/R2/src/Makefile" ;;
     5101    "pymolproxy/Makefile") CONFIG_FILES="$CONFIG_FILES pymolproxy/Makefile" ;;
     5102    "start_viz.sh") CONFIG_FILES="$CONFIG_FILES start_viz.sh" ;;
     5103
    44385104  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
    44395105echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
     
    44415107  esac
    44425108done
     5109
    44435110
    44445111# If the user did not use the arguments to specify the items to instantiate,
     
    44515118
    44525119# Have a temporary directory for convenience.  Make it in the build tree
    4453 # simply because there is no reason to put it here, and in addition,
     5120# simply because there is no reason against having it here, and in addition,
    44545121# creating and moving files from /tmp can sometimes cause problems.
    4455 # Create a temporary directory, and hook for its removal unless debugging.
     5122# Hook for its removal unless debugging.
     5123# Note that there is a small window in which the directory will not be cleaned:
     5124# after its creation but before its name has been assigned to `$tmp'.
    44565125$debug ||
    44575126{
    4458   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
     5127  tmp=
     5128  trap 'exit_status=$?
     5129  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
     5130' 0
    44595131  trap '{ (exit 1); exit 1; }' 1 2 13 15
    44605132}
    4461 
    44625133# Create a (secure) tmp directory for tmp files.
    44635134
    44645135{
    4465   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
     5136  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
    44665137  test -n "$tmp" && test -d "$tmp"
    44675138}  ||
    44685139{
    4469   tmp=./confstat$$-$RANDOM
    4470   (umask 077 && mkdir $tmp)
     5140  tmp=./conf$$-$RANDOM
     5141  (umask 077 && mkdir "$tmp")
    44715142} ||
    44725143{
     
    44755146}
    44765147
    4477 _ACEOF
    4478 
    4479 cat >>$CONFIG_STATUS <<_ACEOF
    4480 
    44815148#
    4482 # CONFIG_FILES section.
     5149# Set up the sed scripts for CONFIG_FILES section.
    44835150#
    44845151
    44855152# No need to generate the scripts if there are no CONFIG_FILES.
    44865153# This happens for instance when ./config.status config.h
    4487 if test -n "\$CONFIG_FILES"; then
    4488   # Protect against being on the right side of a sed subst in config.status.
    4489   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
    4490    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
    4491 s,@SHELL@,$SHELL,;t t
    4492 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
    4493 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
    4494 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
    4495 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
    4496 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
    4497 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
    4498 s,@exec_prefix@,$exec_prefix,;t t
    4499 s,@prefix@,$prefix,;t t
    4500 s,@program_transform_name@,$program_transform_name,;t t
    4501 s,@bindir@,$bindir,;t t
    4502 s,@sbindir@,$sbindir,;t t
    4503 s,@libexecdir@,$libexecdir,;t t
    4504 s,@datadir@,$datadir,;t t
    4505 s,@sysconfdir@,$sysconfdir,;t t
    4506 s,@sharedstatedir@,$sharedstatedir,;t t
    4507 s,@localstatedir@,$localstatedir,;t t
    4508 s,@libdir@,$libdir,;t t
    4509 s,@includedir@,$includedir,;t t
    4510 s,@oldincludedir@,$oldincludedir,;t t
    4511 s,@infodir@,$infodir,;t t
    4512 s,@mandir@,$mandir,;t t
    4513 s,@build_alias@,$build_alias,;t t
    4514 s,@host_alias@,$host_alias,;t t
    4515 s,@target_alias@,$target_alias,;t t
    4516 s,@DEFS@,$DEFS,;t t
    4517 s,@ECHO_C@,$ECHO_C,;t t
    4518 s,@ECHO_N@,$ECHO_N,;t t
    4519 s,@ECHO_T@,$ECHO_T,;t t
    4520 s,@LIBS@,$LIBS,;t t
    4521 s,@VERSION@,$VERSION,;t t
    4522 s,@LIB_SEARCH_DIRS@,$LIB_SEARCH_DIRS,;t t
    4523 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
    4524 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
    4525 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
    4526 s,@SET_MAKE@,$SET_MAKE,;t t
    4527 s,@CC@,$CC,;t t
    4528 s,@CFLAGS@,$CFLAGS,;t t
    4529 s,@LDFLAGS@,$LDFLAGS,;t t
    4530 s,@CPPFLAGS@,$CPPFLAGS,;t t
    4531 s,@ac_ct_CC@,$ac_ct_CC,;t t
    4532 s,@EXEEXT@,$EXEEXT,;t t
    4533 s,@OBJEXT@,$OBJEXT,;t t
    4534 s,@CXX@,$CXX,;t t
    4535 s,@CXXFLAGS@,$CXXFLAGS,;t t
    4536 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
    4537 s,@SUBDIRS@,$SUBDIRS,;t t
    4538 s,@CXXCPP@,$CXXCPP,;t t
    4539 s,@EGREP@,$EGREP,;t t
    4540 s,@TCL_LIB_DIR@,$TCL_LIB_DIR,;t t
    4541 s,@TCL_LIB@,$TCL_LIB,;t t
    4542 s,@TCL_LIB_VERSION@,$TCL_LIB_VERSION,;t t
    4543 s,@TCL_INCL_DIR@,$TCL_INCL_DIR,;t t
    4544 s,@RP2_INCL_DIR@,$RP2_INCL_DIR,;t t
    4545 s,@RP_DIR@,$RP_DIR,;t t
    4546 s,@LIBOBJS@,$LIBOBJS,;t t
    4547 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
    4548 CEOF
    4549 
    4550 _ACEOF
    4551 
    4552   cat >>$CONFIG_STATUS <<\_ACEOF
    4553   # Split the substitutions into bite-sized pieces for seds with
    4554   # small command number limits, like on Digital OSF/1 and HP-UX.
    4555   ac_max_sed_lines=48
    4556   ac_sed_frag=1 # Number of current file.
    4557   ac_beg=1 # First line for current file.
    4558   ac_end=$ac_max_sed_lines # Line after last line for current file.
    4559   ac_more_lines=:
    4560   ac_sed_cmds=
    4561   while $ac_more_lines; do
    4562     if test $ac_beg -gt 1; then
    4563       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
    4564     else
    4565       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
     5154if test -n "$CONFIG_FILES"; then
     5155
     5156_ACEOF
     5157
     5158
     5159
     5160ac_delim='%!_!# '
     5161for ac_last_try in false false false false false :; do
     5162  cat >conf$$subs.sed <<_ACEOF
     5163SHELL!$SHELL$ac_delim
     5164PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
     5165PACKAGE_NAME!$PACKAGE_NAME$ac_delim
     5166PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
     5167PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
     5168PACKAGE_STRING!$PACKAGE_STRING$ac_delim
     5169PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
     5170exec_prefix!$exec_prefix$ac_delim
     5171prefix!$prefix$ac_delim
     5172program_transform_name!$program_transform_name$ac_delim
     5173bindir!$bindir$ac_delim
     5174sbindir!$sbindir$ac_delim
     5175libexecdir!$libexecdir$ac_delim
     5176datarootdir!$datarootdir$ac_delim
     5177datadir!$datadir$ac_delim
     5178sysconfdir!$sysconfdir$ac_delim
     5179sharedstatedir!$sharedstatedir$ac_delim
     5180localstatedir!$localstatedir$ac_delim
     5181includedir!$includedir$ac_delim
     5182oldincludedir!$oldincludedir$ac_delim
     5183docdir!$docdir$ac_delim
     5184infodir!$infodir$ac_delim
     5185htmldir!$htmldir$ac_delim
     5186dvidir!$dvidir$ac_delim
     5187pdfdir!$pdfdir$ac_delim
     5188psdir!$psdir$ac_delim
     5189libdir!$libdir$ac_delim
     5190localedir!$localedir$ac_delim
     5191mandir!$mandir$ac_delim
     5192DEFS!$DEFS$ac_delim
     5193ECHO_C!$ECHO_C$ac_delim
     5194ECHO_N!$ECHO_N$ac_delim
     5195ECHO_T!$ECHO_T$ac_delim
     5196LIBS!$LIBS$ac_delim
     5197build_alias!$build_alias$ac_delim
     5198host_alias!$host_alias$ac_delim
     5199target_alias!$target_alias$ac_delim
     5200VERSION!$VERSION$ac_delim
     5201LIB_SEARCH_DIRS!$LIB_SEARCH_DIRS$ac_delim
     5202INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
     5203INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
     5204INSTALL_DATA!$INSTALL_DATA$ac_delim
     5205SET_MAKE!$SET_MAKE$ac_delim
     5206CC!$CC$ac_delim
     5207CFLAGS!$CFLAGS$ac_delim
     5208LDFLAGS!$LDFLAGS$ac_delim
     5209CPPFLAGS!$CPPFLAGS$ac_delim
     5210ac_ct_CC!$ac_ct_CC$ac_delim
     5211EXEEXT!$EXEEXT$ac_delim
     5212OBJEXT!$OBJEXT$ac_delim
     5213RANLIB!$RANLIB$ac_delim
     5214CXX!$CXX$ac_delim
     5215CXXFLAGS!$CXXFLAGS$ac_delim
     5216ac_ct_CXX!$ac_ct_CXX$ac_delim
     5217SUBDIRS!$SUBDIRS$ac_delim
     5218CXXCPP!$CXXCPP$ac_delim
     5219GREP!$GREP$ac_delim
     5220EGREP!$EGREP$ac_delim
     5221TCL_LIB_DIR!$TCL_LIB_DIR$ac_delim
     5222TCL_LIB!$TCL_LIB$ac_delim
     5223TCL_LIB_VERSION!$TCL_LIB_VERSION$ac_delim
     5224TCL_INCL_DIR!$TCL_INCL_DIR$ac_delim
     5225RP2_INCL_DIR!$RP2_INCL_DIR$ac_delim
     5226RP_DIR!$RP_DIR$ac_delim
     5227LIBOBJS!$LIBOBJS$ac_delim
     5228LTLIBOBJS!$LTLIBOBJS$ac_delim
     5229_ACEOF
     5230
     5231  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 66; then
     5232    break
     5233  elif $ac_last_try; then
     5234    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
     5235echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
     5236   { (exit 1); exit 1; }; }
     5237  else
     5238    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
     5239  fi
     5240done
     5241
     5242ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
     5243if test -n "$ac_eof"; then
     5244  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
     5245  ac_eof=`expr $ac_eof + 1`
     5246fi
     5247
     5248cat >>$CONFIG_STATUS <<_ACEOF
     5249cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
     5250/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
     5251_ACEOF
     5252sed '
     5253s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
     5254s/^/s,@/; s/!/@,|#_!!_#|/
     5255:n
     5256t n
     5257s/'"$ac_delim"'$/,g/; t
     5258s/$/\\/; p
     5259N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
     5260' >>$CONFIG_STATUS <conf$$subs.sed
     5261rm -f conf$$subs.sed
     5262cat >>$CONFIG_STATUS <<_ACEOF
     5263:end
     5264s/|#_!!_#|//g
     5265CEOF$ac_eof
     5266_ACEOF
     5267
     5268
     5269# VPATH may cause trouble with some makes, so we remove $(srcdir),
     5270# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
     5271# trailing colons and then remove the whole line if VPATH becomes empty
     5272# (actually we leave an empty line to preserve line numbers).
     5273if test "x$srcdir" = x.; then
     5274  ac_vpsub='/^[  ]*VPATH[        ]*=/{
     5275s/:*\$(srcdir):*/:/
     5276s/:*\${srcdir}:*/:/
     5277s/:*@srcdir@:*/:/
     5278s/^\([^=]*=[     ]*\):*/\1/
     5279s/:*$//
     5280s/^[^=]*=[       ]*$//
     5281}'
     5282fi
     5283
     5284cat >>$CONFIG_STATUS <<\_ACEOF
     5285fi # test -n "$CONFIG_FILES"
     5286
     5287
     5288for ac_tag in  :F $CONFIG_FILES
     5289do
     5290  case $ac_tag in
     5291  :[FHLC]) ac_mode=$ac_tag; continue;;
     5292  esac
     5293  case $ac_mode$ac_tag in
     5294  :[FHL]*:*);;
     5295  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
     5296echo "$as_me: error: Invalid tag $ac_tag." >&2;}
     5297   { (exit 1); exit 1; }; };;
     5298  :[FH]-) ac_tag=-:-;;
     5299  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
     5300  esac
     5301  ac_save_IFS=$IFS
     5302  IFS=:
     5303  set x $ac_tag
     5304  IFS=$ac_save_IFS
     5305  shift
     5306  ac_file=$1
     5307  shift
     5308
     5309  case $ac_mode in
     5310  :L) ac_source=$1;;
     5311  :[FH])
     5312    ac_file_inputs=
     5313    for ac_f
     5314    do
     5315      case $ac_f in
     5316      -) ac_f="$tmp/stdin";;
     5317      *) # Look for the file first in the build tree, then in the source tree
     5318         # (if the path is not absolute).  The absolute path cannot be DOS-style,
     5319         # because $ac_f cannot contain `:'.
     5320         test -f "$ac_f" ||
     5321           case $ac_f in
     5322           [\\/$]*) false;;
     5323           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
     5324           esac ||
     5325           { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
     5326echo "$as_me: error: cannot find input file: $ac_f" >&2;}
     5327   { (exit 1); exit 1; }; };;
     5328      esac
     5329      ac_file_inputs="$ac_file_inputs $ac_f"
     5330    done
     5331
     5332    # Let's still pretend it is `configure' which instantiates (i.e., don't
     5333    # use $as_me), people would be surprised to read:
     5334    #    /* config.h.  Generated by config.status.  */
     5335    configure_input="Generated from "`IFS=:
     5336          echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
     5337    if test x"$ac_file" != x-; then
     5338      configure_input="$ac_file.  $configure_input"
     5339      { echo "$as_me:$LINENO: creating $ac_file" >&5
     5340echo "$as_me: creating $ac_file" >&6;}
    45665341    fi
    4567     if test ! -s $tmp/subs.frag; then
    4568       ac_more_lines=false
    4569     else
    4570       # The purpose of the label and of the branching condition is to
    4571       # speed up the sed processing (if there are no `@' at all, there
    4572       # is no need to browse any of the substitutions).
    4573       # These are the two extra sed commands mentioned above.
    4574       (echo ':t
    4575   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
    4576       if test -z "$ac_sed_cmds"; then
    4577         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
    4578       else
    4579         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
    4580       fi
    4581       ac_sed_frag=`expr $ac_sed_frag + 1`
    4582       ac_beg=$ac_end
    4583       ac_end=`expr $ac_end + $ac_max_sed_lines`
    4584     fi
    4585   done
    4586   if test -z "$ac_sed_cmds"; then
    4587     ac_sed_cmds=cat
    4588   fi
    4589 fi # test -n "$CONFIG_FILES"
    4590 
    4591 _ACEOF
    4592 cat >>$CONFIG_STATUS <<\_ACEOF
    4593 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
    4594   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
    4595   case $ac_file in
    4596   - | *:- | *:-:* ) # input from stdin
    4597         cat >$tmp/stdin
    4598         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
    4599         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
    4600   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
    4601         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
    4602   * )   ac_file_in=$ac_file.in ;;
     5342
     5343    case $ac_tag in
     5344    *:-:* | *:-) cat >"$tmp/stdin";;
     5345    esac
     5346    ;;
    46035347  esac
    46045348
    4605   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
    4606   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
     5349  ac_dir=`$as_dirname -- "$ac_file" ||
    46075350$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
    46085351         X"$ac_file" : 'X\(//\)[^/]' \| \
    46095352         X"$ac_file" : 'X\(//\)$' \| \
    4610          X"$ac_file" : 'X\(/\)' \| \
    4611          .     : '\(.\)' 2>/dev/null ||
     5353         X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
    46125354echo X"$ac_file" |
    4613     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
    4614           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
    4615           /^X\(\/\/\)$/{ s//\1/; q; }
    4616           /^X\(\/\).*/{ s//\1/; q; }
    4617           s/.*/./; q'`
    4618   { if $as_mkdir_p; then
    4619     mkdir -p "$ac_dir"
    4620   else
    4621     as_dir="$ac_dir"
     5355    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
     5356            s//\1/
     5357            q
     5358          }
     5359          /^X\(\/\/\)[^/].*/{
     5360            s//\1/
     5361            q
     5362          }
     5363          /^X\(\/\/\)$/{
     5364            s//\1/
     5365            q
     5366          }
     5367          /^X\(\/\).*/{
     5368            s//\1/
     5369            q
     5370          }
     5371          s/.*/./; q'`
     5372  { as_dir="$ac_dir"
     5373  case $as_dir in #(
     5374  -*) as_dir=./$as_dir;;
     5375  esac
     5376  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
    46225377    as_dirs=
    4623     while test ! -d "$as_dir"; do
    4624       as_dirs="$as_dir $as_dirs"
    4625       as_dir=`(dirname "$as_dir") 2>/dev/null ||
     5378    while :; do
     5379      case $as_dir in #(
     5380      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
     5381      *) as_qdir=$as_dir;;
     5382      esac
     5383      as_dirs="'$as_qdir' $as_dirs"
     5384      as_dir=`$as_dirname -- "$as_dir" ||
    46265385$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
    46275386         X"$as_dir" : 'X\(//\)[^/]' \| \
    46285387         X"$as_dir" : 'X\(//\)$' \| \
    4629          X"$as_dir" : 'X\(/\)' \| \
    4630          .     : '\(.\)' 2>/dev/null ||
     5388         X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
    46315389echo X"$as_dir" |
    4632     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
    4633           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
    4634           /^X\(\/\/\)$/{ s//\1/; q; }
    4635           /^X\(\/\).*/{ s//\1/; q; }
    4636           s/.*/./; q'`
     5390    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
     5391            s//\1/
     5392            q
     5393          }
     5394          /^X\(\/\/\)[^/].*/{
     5395            s//\1/
     5396            q
     5397          }
     5398          /^X\(\/\/\)$/{
     5399            s//\1/
     5400            q
     5401          }
     5402          /^X\(\/\).*/{
     5403            s//\1/
     5404            q
     5405          }
     5406          s/.*/./; q'`
     5407      test -d "$as_dir" && break
    46375408    done
    4638     test ! -n "$as_dirs" || mkdir $as_dirs
    4639   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
    4640 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
     5409    test -z "$as_dirs" || eval "mkdir $as_dirs"
     5410  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
     5411echo "$as_me: error: cannot create directory $as_dir" >&2;}
    46415412   { (exit 1); exit 1; }; }; }
    4642 
    46435413  ac_builddir=.
    46445414
    4645 if test "$ac_dir" != .; then
     5415case "$ac_dir" in
     5416.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
     5417*)
    46465418  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
    4647   # A "../" for each directory in $ac_dir_suffix.
    4648   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
    4649 else
    4650   ac_dir_suffix= ac_top_builddir=
    4651 fi
     5419  # A ".." for each directory in $ac_dir_suffix.
     5420  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
     5421  case $ac_top_builddir_sub in
     5422  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
     5423  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
     5424  esac ;;
     5425esac
     5426ac_abs_top_builddir=$ac_pwd
     5427ac_abs_builddir=$ac_pwd$ac_dir_suffix
     5428# for backward compatibility:
     5429ac_top_builddir=$ac_top_build_prefix
    46525430
    46535431case $srcdir in
    4654   .)  # No --srcdir option.  We are building in place.
     5432  .)  # We are building in place.
    46555433    ac_srcdir=.
    4656     if test -z "$ac_top_builddir"; then
    4657        ac_top_srcdir=.
    4658     else
    4659        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
    4660     fi ;;
    4661   [\\/]* | ?:[\\/]* )  # Absolute path.
     5434    ac_top_srcdir=$ac_top_builddir_sub
     5435    ac_abs_top_srcdir=$ac_pwd ;;
     5436  [\\/]* | ?:[\\/]* )  # Absolute name.
    46625437    ac_srcdir=$srcdir$ac_dir_suffix;
    4663     ac_top_srcdir=$srcdir ;;
    4664   *) # Relative path.
    4665     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
    4666     ac_top_srcdir=$ac_top_builddir$srcdir ;;
    4667 esac
    4668 
    4669 # Do not use `cd foo && pwd` to compute absolute paths, because
    4670 # the directories may not exist.
    4671 case `pwd` in
    4672 .) ac_abs_builddir="$ac_dir";;
    4673 *)
    4674   case "$ac_dir" in
    4675   .) ac_abs_builddir=`pwd`;;
    4676   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
    4677   *) ac_abs_builddir=`pwd`/"$ac_dir";;
    4678   esac;;
    4679 esac
    4680 case $ac_abs_builddir in
    4681 .) ac_abs_top_builddir=${ac_top_builddir}.;;
    4682 *)
    4683   case ${ac_top_builddir}. in
    4684   .) ac_abs_top_builddir=$ac_abs_builddir;;
    4685   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
    4686   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
    4687   esac;;
    4688 esac
    4689 case $ac_abs_builddir in
    4690 .) ac_abs_srcdir=$ac_srcdir;;
    4691 *)
    4692   case $ac_srcdir in
    4693   .) ac_abs_srcdir=$ac_abs_builddir;;
    4694   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
    4695   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
    4696   esac;;
    4697 esac
    4698 case $ac_abs_builddir in
    4699 .) ac_abs_top_srcdir=$ac_top_srcdir;;
    4700 *)
    4701   case $ac_top_srcdir in
    4702   .) ac_abs_top_srcdir=$ac_abs_builddir;;
    4703   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
    4704   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
    4705   esac;;
    4706 esac
    4707 
     5438    ac_top_srcdir=$srcdir
     5439    ac_abs_top_srcdir=$srcdir ;;
     5440  *) # Relative name.
     5441    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
     5442    ac_top_srcdir=$ac_top_build_prefix$srcdir
     5443    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
     5444esac
     5445ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
     5446
     5447
     5448  case $ac_mode in
     5449  :F)
     5450  #
     5451  # CONFIG_FILE
     5452  #
    47085453
    47095454  case $INSTALL in
    47105455  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
    4711   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
     5456  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
    47125457  esac
    4713 
    4714   # Let's still pretend it is `configure' which instantiates (i.e., don't
    4715   # use $as_me), people would be surprised to read:
    4716   #    /* config.h.  Generated by config.status.  */
    4717   if test x"$ac_file" = x-; then
    4718     configure_input=
    4719   else
    4720     configure_input="$ac_file.  "
    4721   fi
    4722   configure_input=$configure_input"Generated from `echo $ac_file_in |
    4723                                      sed 's,.*/,,'` by configure."
    4724 
    4725   # First look for the input files in the build tree, otherwise in the
    4726   # src tree.
    4727   ac_file_inputs=`IFS=:
    4728     for f in $ac_file_in; do
    4729       case $f in
    4730       -) echo $tmp/stdin ;;
    4731       [\\/$]*)
    4732          # Absolute (can't be DOS-style, as IFS=:)
    4733          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
    4734 echo "$as_me: error: cannot find input file: $f" >&2;}
    4735    { (exit 1); exit 1; }; }
    4736          echo "$f";;
    4737       *) # Relative
    4738          if test -f "$f"; then
    4739            # Build tree
    4740            echo "$f"
    4741          elif test -f "$srcdir/$f"; then
    4742            # Source tree
    4743            echo "$srcdir/$f"
    4744          else
    4745            # /dev/null tree
    4746            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
    4747 echo "$as_me: error: cannot find input file: $f" >&2;}
    4748    { (exit 1); exit 1; }; }
    4749          fi;;
    4750       esac
    4751     done` || { (exit 1); exit 1; }
    4752 
    4753   if test x"$ac_file" != x-; then
    4754     { echo "$as_me:$LINENO: creating $ac_file" >&5
    4755 echo "$as_me: creating $ac_file" >&6;}
    4756     rm -f "$ac_file"
    4757   fi
    4758 _ACEOF
     5458_ACEOF
     5459
     5460cat >>$CONFIG_STATUS <<\_ACEOF
     5461# If the template does not know about datarootdir, expand it.
     5462# FIXME: This hack should be removed a few years after 2.60.
     5463ac_datarootdir_hack=; ac_datarootdir_seen=
     5464
     5465case `sed -n '/datarootdir/ {
     5466  p
     5467  q
     5468}
     5469/@datadir@/p
     5470/@docdir@/p
     5471/@infodir@/p
     5472/@localedir@/p
     5473/@mandir@/p
     5474' $ac_file_inputs` in
     5475*datarootdir*) ac_datarootdir_seen=yes;;
     5476*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
     5477  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
     5478echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
     5479_ACEOF
     5480cat >>$CONFIG_STATUS <<_ACEOF
     5481  ac_datarootdir_hack='
     5482  s&@datadir@&$datadir&g
     5483  s&@docdir@&$docdir&g
     5484  s&@infodir@&$infodir&g
     5485  s&@localedir@&$localedir&g
     5486  s&@mandir@&$mandir&g
     5487    s&\\\${datarootdir}&$datarootdir&g' ;;
     5488esac
     5489_ACEOF
     5490
     5491# Neutralize VPATH when `$srcdir' = `.'.
     5492# Shell code in configure.ac might set extrasub.
     5493# FIXME: do we really want to maintain this feature?
    47595494cat >>$CONFIG_STATUS <<_ACEOF
    47605495  sed "$ac_vpsub
     
    47645499:t
    47655500/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
    4766 s,@configure_input@,$configure_input,;t t
    4767 s,@srcdir@,$ac_srcdir,;t t
    4768 s,@abs_srcdir@,$ac_abs_srcdir,;t t
    4769 s,@top_srcdir@,$ac_top_srcdir,;t t
    4770 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
    4771 s,@builddir@,$ac_builddir,;t t
    4772 s,@abs_builddir@,$ac_abs_builddir,;t t
    4773 s,@top_builddir@,$ac_top_builddir,;t t
    4774 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
    4775 s,@INSTALL@,$ac_INSTALL,;t t
    4776 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
    4777   rm -f $tmp/stdin
    4778   if test x"$ac_file" != x-; then
    4779     mv $tmp/out $ac_file
    4780   else
    4781     cat $tmp/out
    4782     rm -f $tmp/out
    4783   fi
    4784 
    4785 done
    4786 _ACEOF
    4787 
    4788 cat >>$CONFIG_STATUS <<\_ACEOF
     5501s&@configure_input@&$configure_input&;t t
     5502s&@top_builddir@&$ac_top_builddir_sub&;t t
     5503s&@srcdir@&$ac_srcdir&;t t
     5504s&@abs_srcdir@&$ac_abs_srcdir&;t t
     5505s&@top_srcdir@&$ac_top_srcdir&;t t
     5506s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
     5507s&@builddir@&$ac_builddir&;t t
     5508s&@abs_builddir@&$ac_abs_builddir&;t t
     5509s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
     5510s&@INSTALL@&$ac_INSTALL&;t t
     5511$ac_datarootdir_hack
     5512" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
     5513
     5514test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
     5515  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
     5516  { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
     5517  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
     5518which seems to be undefined.  Please make sure it is defined." >&5
     5519echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
     5520which seems to be undefined.  Please make sure it is defined." >&2;}
     5521
     5522  rm -f "$tmp/stdin"
     5523  case $ac_file in
     5524  -) cat "$tmp/out"; rm -f "$tmp/out";;
     5525  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
     5526  esac
     5527 ;;
     5528
     5529
     5530
     5531  esac
     5532
     5533done # for ac_tag
     5534
    47895535
    47905536{ (exit 0); exit 0; }
  • trunk/vizservers/configure.in

    r760 r914  
    2929AC_PROG_CC
    3030AC_LANG_C
     31
     32AC_PROG_RANLIB
    3133
    3234AC_PROG_CXX
     
    189191            nanoscale/Makefile \
    190192            nanovis/Makefile \
     193            nanovis/newmat11/Makefile \
     194            nanovis/R2/src/Makefile \
    191195            pymolproxy/Makefile \
    192196            start_viz.sh    )
  • trunk/vizservers/pymolproxy/pymolproxy.c

    r721 r914  
     1
     2/*
     3 * ----------------------------------------------------------------------
     4 * proxypymol.c
     5 *
     6 *      This module creates the Tcl interface to the pymol server.  It acts as
     7 *      a go-between establishing communication between a molvisviewer widget
     8 *      and the pymol server. The communication protocol from the molvisviewer
     9 *      widget is the Tcl language.  Commands are then relayed to the pymol
     10 *      server.  Responses from the pymol server are translated into Tcl
     11 *      commands * and send to the molvisviewer widget. For example, resulting
     12 *      image rendered offscreen is returned as BMP-formatted image data.
     13 *
     14 *  Copyright (c) 2004-2006  Purdue Research Foundation
     15 *
     16 *  See the file "license.terms" for information on usage and
     17 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
     18 * ======================================================================
     19 */
     20
    121#include <stdio.h>
     22#include <assert.h>
    223#include <unistd.h>
    324#include <stdlib.h>
     
    1839#include <tcl.h>
    1940
     41#undef INLINE
     42#ifdef __GNUC__
     43#  define INLINE __inline__
     44#else
     45#  define INLINE
     46#endif
     47
    2048#define IO_TIMEOUT (30000)
    2149
    22 struct dyBuffer
    23 {
     50static FILE *flog;
     51static int debug = 1;
     52
     53static void
     54trace TCL_VARARGS_DEF(char *, arg1)
     55{
     56    if (debug) {
     57        char *format;
     58        va_list args;
     59
     60        format = TCL_VARARGS_START(char *, arg1, args);
     61        vfprintf(flog, format, args);
     62        fprintf(flog, "\n");
     63        fflush(flog);
     64    }
     65}
     66
     67typedef struct {
    2468    char *data;
    25         int   used;
    26         int   allocated;
    27 };
    28 
    29 struct pymol_proxy
    30 {
    31         int p_stdin;
    32         int p_stdout;
    33         int p_stderr;
    34         int c_stdin;
    35         int c_stdout;
    36         struct dyBuffer image;
    37         int need_update;
    38         int can_update;
    39         int immediate_update;
    40         int sync;
    41         int labels;
    42         int frame;
    43         int rock_offset;
    44         int cacheid;
    45         int invalidate_cache;
    46         int error;
    47         int status;
    48 };
     69    int   used;
     70    int   allocated;
     71} DyBuffer;
     72
     73typedef struct {
     74    int p_stdin;
     75    int p_stdout;
     76    int p_stderr;
     77    int c_stdin;
     78    int c_stdout;
     79    DyBuffer image;
     80    int need_update;
     81    int can_update;
     82    int immediate_update;
     83    int sync;
     84    int labels;
     85    int frame;
     86    int rock_offset;
     87    int cacheid;
     88    int invalidate_cache;
     89    int error;
     90    int status;
     91} PymolProxy;
     92
     93INLINE static void
     94dyBufferInit(DyBuffer *buffer)
     95{
     96    buffer->data = NULL;
     97    buffer->used = 0;
     98    buffer->allocated = 0;
     99}
     100
     101INLINE static void
     102dyBufferFree(DyBuffer *buffer)
     103{
     104    assert(buffer != NULL);
     105    free(buffer->data);
     106    dyBufferInit(buffer);
     107}
    49108
    50109void
    51 dyBufferInit(struct dyBuffer *buffer)
    52 {
    53     buffer->data = NULL;
    54         buffer->used = 0;
    55         buffer->allocated = 0;
    56 }
    57 
    58 void
    59 dyBufferFree(struct dyBuffer *buffer)
    60 {
    61     if (buffer == NULL)
    62             return;
    63 
    64         free(buffer->data);
    65 
    66         dyBufferInit(buffer);
    67 
    68         return;
    69 }
    70 
    71 void
    72 dyBufferSetLength(struct dyBuffer *buffer, int length)
    73 {
    74     char *newdata;
    75 
    76         if (buffer == NULL)
    77                 return;
    78 
    79     if (length == 0)
    80             dyBufferFree(buffer);
    81         else if (length > buffer->used) {
    82                 newdata = realloc(buffer->data, length);
    83 
    84                 if (newdata != NULL) {
    85                     buffer->data = newdata;
    86                         buffer->used = length;
    87                         buffer->allocated = length;
    88                 }
     110dyBufferSetLength(DyBuffer *buffer, int length)
     111{
     112    assert(buffer != NULL);
     113    if (length == 0) {
     114        dyBufferFree(buffer);
     115    } else if (length > buffer->used) {
     116        char *newdata;
     117       
     118        newdata = realloc(buffer->data, length);
     119        if (newdata != NULL) {
     120            buffer->data = newdata;
     121            buffer->used = length;
     122            buffer->allocated = length;
    89123        }
    90         else
    91             buffer->used = length;
    92 }
    93 
    94 void
    95 dyBufferAppend(struct dyBuffer *buffer, const char *data, int length)
     124    } else {
     125        buffer->used = length;
     126    }
     127}
     128
     129static void
     130dyBufferAppend(DyBuffer *buffer, const char *data, int length)
    96131{
    97132    int offset;
    98133
     134    assert(buffer != NULL);
    99135    offset = buffer->used;
    100 
    101136    dyBufferSetLength(buffer, offset + length);
    102 
    103137    memcpy(buffer->data + offset, data, length);
    104138}
    105139
    106 int
     140static int
    107141bwrite(int sock, char *buffer, int size)
    108142{
     
    111145    int left = size;
    112146
    113         while(1) {
    114                 result = write(sock,buffer+total,left);
    115 
    116                 if (result <= 0)
    117                         break;
    118 
    119                 total += result;
    120                 left -= result;
    121 
    122                 if (total == size)
    123                         break;
    124         }
    125 
     147    trace("bwrite: want to write %d bytes\n", size);
     148    while(1) {
     149        result = write(sock,buffer+total,left);
     150
     151        if (result <= 0)
     152            break;
     153
     154        total += result;
     155        left -= result;
     156
     157        if (total == size)
     158            break;
     159    }
     160    trace("bwrite: wrote %d bytes\n", total);
    126161    return(total);
    127162}
    128163
    129 int
     164static int
    130165bread(int sock, char *buffer, int size)
    131166{
    132167    int result, total, left;
    133168
    134         for( total = 0, left = size; left > 0; left -= result)
    135         {
    136                 result = read(sock,buffer+total,left);
    137 
    138                 if (result > 0) {
    139                         total += result;
    140                         continue;
    141                 }
    142                
    143                 if ((result < 0) && (errno != EAGAIN) && (errno != EINTR))
    144                 {
    145                         fprintf(stderr,"pymolproxy: Error reading sock(%d), %d/%s\n", sock, errno,strerror(errno));
    146                         break;
    147                 }
    148 
    149                 result = 0;
    150         }
     169    for( total = 0, left = size; left > 0; left -= result)
     170        {
     171            result = read(sock,buffer+total,left);
     172
     173            if (result > 0) {
     174                total += result;
     175                continue;
     176            }
     177               
     178            if ((result < 0) && (errno != EAGAIN) && (errno != EINTR))
     179                {
     180                    trace("pymolproxy: Error reading sock(%d), %d/%s\n",
     181                          sock, errno,strerror(errno));
     182                    break;
     183                }
     184
     185            result = 0;
     186        }
    151187
    152188    return(total);
    153189}
    154190
    155 int
     191static int
    156192bflush(int sock, char *buffer, int size, int bytes)
    157193{
    158         int bsize;
    159 
    160         while(bytes)
    161         {
    162                 if (bytes > size)
    163                         bsize = size;
    164                 else
    165                         bsize = bytes;
    166 
    167                 bsize = bread(sock,buffer,bsize);
    168        
    169                 bytes -= bsize;
    170         }
     194    int bsize;
     195
     196    while(bytes)
     197        {
     198            if (bytes > size)
     199                bsize = size;
     200            else
     201                bsize = bytes;
     202
     203            bsize = bread(sock,buffer,bsize);
     204       
     205            bytes -= bsize;     
     206        }
    171207}
    172208
     
    174210#undef timeradd
    175211
    176 void
     212static void
    177213timersub(struct timeval *a, struct timeval *b, struct timeval *result)
    178214{
    179215    result->tv_sec = a->tv_sec - b->tv_sec;
    180         result->tv_usec = a->tv_usec - b->tv_usec;
     216    result->tv_usec = a->tv_usec - b->tv_usec;
    181217
    182218    while(result->tv_usec < 0) {
    183                 result->tv_sec -= 1;
    184                 result->tv_usec += 1000000;
    185         }
    186 }
    187 
    188 void
     219        result->tv_sec -= 1;
     220        result->tv_usec += 1000000;
     221    }
     222}
     223
     224static void
    189225timersub_ms(struct timeval *a, struct timeval *b, int *result)
    190226{
    191         struct timeval tmp;
     227    struct timeval tmp;
    192228
    193229    tmp.tv_sec = a->tv_sec - b->tv_sec;
    194         tmp.tv_usec = a->tv_usec - b->tv_usec;
     230    tmp.tv_usec = a->tv_usec - b->tv_usec;
    195231
    196232    while(tmp.tv_usec < 0) {
    197                 tmp.tv_sec -= 1;
    198                 tmp.tv_usec += 1000000;
    199         }
    200 
    201         *result = (tmp.tv_sec * 1000) + (tmp.tv_usec / 1000);
    202 }
    203 
    204 
    205 void
     233        tmp.tv_sec -= 1;
     234        tmp.tv_usec += 1000000;
     235    }
     236
     237    *result = (tmp.tv_sec * 1000) + (tmp.tv_usec / 1000);
     238}
     239
     240
     241static void
    206242timeradd(struct timeval *a, struct timeval *b, struct timeval *result)
    207243{
    208         result->tv_sec = a->tv_sec + b->tv_sec;
     244    result->tv_sec = a->tv_sec + b->tv_sec;
    209245    result->tv_usec = a->tv_usec + b->tv_usec;
    210246
    211         while(result->tv_usec >= 1000000) {
    212                 result->tv_sec += 1;
    213                 result->tv_usec -= 1000000;
    214         }
    215 }
    216 
    217 void
     247    while(result->tv_usec >= 1000000) {
     248        result->tv_sec += 1;
     249        result->tv_usec -= 1000000;
     250    }
     251}
     252
     253static void
    218254timerset_ms(struct timeval *result, int timeout)
    219255{
     
    222258}
    223259
    224 int
     260static int
    225261getline(int sock, char *buffer, int size, long timeout)
    226262{
    227263    int pos = 0, status, timeo;
    228         struct timeval now, end, tmo;
     264    struct timeval now, end, tmo;
    229265    struct pollfd ufd;
    230266
    231         gettimeofday(&now,NULL);
    232         timerset_ms(&tmo, timeout);
     267    gettimeofday(&now,NULL);
     268    timerset_ms(&tmo, timeout);
    233269    timeradd(&now,&tmo,&end);
    234270
    235         ufd.fd = sock;
    236         ufd.events = POLLIN;
     271    ufd.fd = sock;
     272    ufd.events = POLLIN;
    237273
    238274    size--;
    239275
    240         while(pos < size) {
    241                 if (timeout > 0) {
    242                         gettimeofday(&now,NULL);
    243                         timersub_ms(&now,&end,&timeo);
    244                 }
    245                 else
    246                         timeo = -1;
    247 
    248         status = poll(&ufd, 1, timeo);
    249 
    250         if (status > 0)
    251                         status = read(sock,&buffer[pos],1);
    252 
    253                 if ( (status < 0) && ( (errno == EINTR) || (errno == EAGAIN) ) )
    254                         continue; /* try again, if interrupted/blocking */
    255 
    256                 if (status <= 0)
    257                         break;
    258                        
    259                 if (buffer[pos] == '\n')
    260                 {
    261                         pos++;
    262                         break;
    263                 }
    264 
    265                 pos++;
    266 
    267     }
    268 
    269         buffer[pos]=0;
    270 
    271         return(pos);
    272 }
    273 
    274 int
    275 waitForString(struct pymol_proxy *pymol, char *string, char *buffer, int length)
     276    while(pos < size) {
     277        if (timeout > 0) {
     278            gettimeofday(&now,NULL);
     279            timersub_ms(&now,&end,&timeo);
     280        }
     281        else
     282            timeo = -1;
     283
     284        status = poll(&ufd, 1, timeo);
     285
     286        if (status > 0)
     287            status = read(sock,&buffer[pos],1);
     288
     289        if ( (status < 0) && ( (errno == EINTR) || (errno == EAGAIN) ) )
     290            continue; /* try again, if interrupted/blocking */
     291
     292        if (status <= 0)
     293            break;
     294                       
     295        if (buffer[pos] == '\n')
     296            {
     297                pos++;
     298                break;
     299            }
     300
     301        pos++;
     302
     303    }
     304
     305    buffer[pos]=0;
     306
     307    return(pos);
     308}
     309
     310static int
     311waitForString(PymolProxy *pymol, char *string, char *buffer, int length)
    276312{
    277313    int sock;
    278314
    279         if ((pymol == NULL) || (buffer == NULL))
    280             return(TCL_ERROR);
    281 
    282         if (pymol->status != TCL_OK)
    283                 return(pymol->status);
    284 
    285         sock = pymol->p_stdout;
    286 
     315    assert(buffer != NULL);
     316    if (pymol->status != TCL_OK)
     317        return pymol->status;
     318
     319    sock = pymol->p_stdout;
     320    trace("want to match (%s)\n", string);
    287321    while(1) {
    288                 if (getline(sock,buffer,length,IO_TIMEOUT) == 0) {
    289                     pymol->error = 2;
    290                         pymol->status = TCL_ERROR;
    291                         break;
    292                 }
    293 
    294                 if (strncmp(buffer,string,strlen(string)) == 0) {
    295                         //fprintf(stderr,"stdout-e> %s",buffer);
    296                         pymol->error = 0;
    297                         pymol->status = TCL_OK;
    298                         break;
    299                 }
    300 
    301                 //fprintf(stderr,"stdout-u> %s",buffer);
    302     }
    303 
    304         return(pymol->status);
    305 }
    306 
    307 int
    308 clear_error(struct pymol_proxy *pymol)
    309 {
    310     if (pymol == NULL)
    311             return(TCL_ERROR);
    312 
    313         pymol->error = 0;
    314         pymol->status = TCL_OK;
    315 
    316     return(pymol->status);
    317 }
    318 
    319 int
    320 sendf(struct pymol_proxy *pymol, char *format, ...)
     322        if (getline(sock,buffer,length,IO_TIMEOUT) == 0) {
     323            pymol->error = 2;
     324            pymol->status = TCL_ERROR;
     325            break;
     326        }
     327        if (strncmp(buffer, string, strlen(string)) == 0) {
     328            trace("stdout-e> %s",buffer);
     329            pymol->error = 0;
     330            pymol->status = TCL_OK;
     331            break;
     332        }
     333        trace("stdout-u>(%s)", buffer);
     334    }
     335
     336    return pymol->status;
     337}
     338
     339INLINE static int
     340clear_error(PymolProxy *pymol)
     341{
     342    pymol->error = 0;
     343    pymol->status = TCL_OK;
     344    return pymol->status;
     345}
     346
     347static int
     348send_expect(PymolProxy *pymol, char *expect, char *cmd)
     349{
     350    char string[800];
     351
     352    if (pymol->error)
     353        return(TCL_ERROR);
     354
     355    trace("to-pymol>(%s)", cmd);
     356    write(pymol->p_stdin, cmd, strlen(cmd));
     357    if (waitForString(pymol, expect, cmd, 800)) {
     358        trace("pymolproxy: Timeout reading data [%s]\n",cmd);
     359        pymol->error = 1;
     360        pymol->status = TCL_ERROR;
     361        return pymol->status;
     362    }
     363    return( pymol->status );
     364}
     365
     366static int
     367sendf(PymolProxy *pymol, char *format, ...)
    321368{
    322369    va_list ap;
    323370    char buffer[800];
    324371
    325         if (pymol == NULL)
    326                 return(TCL_ERROR);
    327 
    328         if (pymol->error)
    329             return(TCL_ERROR);
     372    if (pymol->error)
     373        return(TCL_ERROR);
    330374
    331375    va_start(ap, format);
    332376    vsnprintf(buffer, 800, format, ap);
    333377    va_end(ap);
    334     //fprintf(stderr,"stdin> %s", buffer);
     378    trace("to-pymol>(%s)", buffer);
    335379    write(pymol->p_stdin, buffer, strlen(buffer));
    336380
    337381    if (waitForString(pymol, "PyMOL>", buffer, 800)) {
    338         fprintf(stderr,"pymolproxy: Timeout reading data [%s]\n",buffer);
    339                 pymol->error = 1;
    340                 pymol->status = TCL_ERROR;
    341         return(pymol->status);
    342     }
    343 
    344         return( pymol->status );
    345 }
    346 
    347 int
    348 BallAndStickCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
     382        trace("pymolproxy: Timeout reading data [%s]\n",buffer);
     383        pymol->error = 1;
     384        pymol->status = TCL_ERROR;
     385        return pymol->status;
     386    }
     387
     388    return( pymol->status );
     389}
     390
     391static int
     392BallNStickCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    349393{
    350394    int ghost = 0, defer = 0, push = 0, arg;
    351         const char *model = "all";
    352         struct pymol_proxy *pymol = (struct pymol_proxy *) cdata;
    353 
    354         if (pymol == NULL)
    355                 return(TCL_ERROR);
    356 
    357         clear_error(pymol);
     395    const char *model = "all";
     396    PymolProxy *pymol = (PymolProxy *) cdata;
     397
     398    clear_error(pymol);
    358399
    359400    for(arg = 1; arg < argc; arg++) {
    360                 if ( strcmp(argv[arg],"-defer") == 0 )
    361                     defer = 1;
    362                 else if (strcmp(argv[arg],"-push") == 0)
    363                     push = 1;
    364                 else if (strcmp(argv[arg],"-ghost") == 0)
    365                     ghost = 1;
    366                 else if (strcmp(argv[arg],"-normal") == 0)
    367                     ghost = 0;
    368                 else if (strcmp(argv[arg],"-model") == 0) {
    369                         if (++arg < argc)
    370                                 model = argv[arg];
    371                 }
    372                 else
    373                     model = argv[arg];
    374         }
    375 
    376         pymol->invalidate_cache = 1;
    377         pymol->need_update = !defer || push;
     401        if ( strcmp(argv[arg],"-defer") == 0 )
     402            defer = 1;
     403        else if (strcmp(argv[arg],"-push") == 0)
     404            push = 1;
     405        else if (strcmp(argv[arg],"-ghost") == 0)
     406            ghost = 1;
     407        else if (strcmp(argv[arg],"-normal") == 0)
     408            ghost = 0;
     409        else if (strcmp(argv[arg],"-model") == 0) {
     410            if (++arg < argc)
     411                model = argv[arg];
     412        }
     413        else
     414            model = argv[arg];
     415    }
     416
     417    pymol->invalidate_cache = 1;
     418    pymol->need_update = !defer || push;
    378419    pymol->immediate_update |= push;
    379420
    380         sendf(pymol, "hide everything,%s\n",model);
    381         sendf(pymol, "set stick_color,white,%s\n",model);
    382        
    383         if (ghost)
    384                 sendf(pymol, "set stick_radius,0.1,%s\n",model);
    385         else
    386                 sendf(pymol, "set stick_radius,0.14,%s\n",model);
    387 
    388         sendf(pymol, "set sphere_scale=0.25,%s\n", model);
     421    sendf(pymol, "hide everything,%s\n",model);
     422    sendf(pymol, "set stick_color,white,%s\n",model);
     423       
     424    if (ghost)
     425        sendf(pymol, "set stick_radius,0.1,%s\n",model);
     426    else
     427        sendf(pymol, "set stick_radius,0.14,%s\n",model);
     428
     429    sendf(pymol, "set sphere_scale=0.25,%s\n", model);
    389430
    390431    if (ghost) {
     
    392433        sendf(pymol, "set stick_transparency,0.75,%s\n", model);
    393434    }
    394         else {
     435    else {
    395436        sendf(pymol, "set sphere_transparency,0,%s\n", model);
    396437        sendf(pymol, "set stick_transparency,0,%s\n", model);
    397438    }
    398439
    399         sendf(pymol, "show sticks,%s\n",model);
    400         sendf(pymol, "show spheres,%s\n",model);
    401 
    402         if (pymol->labels)
    403                 sendf(pymol, "show labels,%s\n", model);
    404 
    405         return( pymol->status );
    406 }
    407 
    408 int
     440    sendf(pymol, "show sticks,%s\n",model);
     441    sendf(pymol, "show spheres,%s\n",model);
     442
     443    if (pymol->labels)
     444        sendf(pymol, "show labels,%s\n", model);
     445
     446    return( pymol->status );
     447}
     448
     449static int
    409450SpheresCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    410451{
    411452    int defer = 0, ghost = 0, push = 0, arg;
    412         const char *model = "all";
    413         struct pymol_proxy *pymol = (struct pymol_proxy *) cdata;
    414 
    415         if (pymol == NULL)
    416                 return(TCL_ERROR);
    417 
    418         clear_error(pymol);
     453    const char *model = "all";
     454    PymolProxy *pymol = (PymolProxy *) cdata;
     455
     456    clear_error(pymol);
    419457
    420458    for(arg = 1; arg < argc; arg++) {
    421                 if ( strcmp(argv[arg],"-defer") == 0 )
    422                     defer = 1;
    423                 else if (strcmp(argv[arg],"-push") == 0)
    424                     push = 1;
    425                 else if (strcmp(argv[arg],"-ghost") == 0)
    426                     ghost = 1;
    427                 else if (strcmp(argv[arg],"-normal") == 0)
    428                     ghost = 0;
    429                 else if (strcmp(argv[arg],"-model") == 0) {
    430                         if (++arg < argc)
    431                                 model = argv[arg];
    432                 }
    433                 else
    434                     model = argv[arg];
    435         }
    436 
    437         pymol->invalidate_cache = 1;
    438         pymol->need_update = !defer || push;
    439         pymol->immediate_update |= push;
     459        if ( strcmp(argv[arg],"-defer") == 0 )
     460            defer = 1;
     461        else if (strcmp(argv[arg],"-push") == 0)
     462            push = 1;
     463        else if (strcmp(argv[arg],"-ghost") == 0)
     464            ghost = 1;
     465        else if (strcmp(argv[arg],"-normal") == 0)
     466            ghost = 0;
     467        else if (strcmp(argv[arg],"-model") == 0) {
     468            if (++arg < argc)
     469                model = argv[arg];
     470        }
     471        else
     472            model = argv[arg];
     473    }
     474
     475    pymol->invalidate_cache = 1;
     476    pymol->need_update = !defer || push;
     477    pymol->immediate_update |= push;
    440478
    441479    sendf(pymol, "hide everything, %s\n", model);
     
    446484    if (ghost)
    447485        sendf(pymol, "set sphere_transparency,.75,%s\n", model);
    448         else
     486    else
    449487        sendf(pymol, "set sphere_transparency,0,%s\n", model);
    450488
    451489    sendf(pymol, "show spheres,%s\n", model);
    452490
    453         if (pymol->labels)
    454                 sendf(pymol, "show labels,%s\n", model);
    455 
    456         return(pymol->status);
    457 }
    458 
    459 int
     491    if (pymol->labels)
     492        sendf(pymol, "show labels,%s\n", model);
     493
     494    return pymol->status;
     495}
     496
     497static int
    460498LinesCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    461499{
    462500    int ghost = 0, defer = 0, push = 0, arg;
    463         const char *model = "all";
    464         struct pymol_proxy *pymol = (struct pymol_proxy *) cdata;
    465 
    466         if (pymol == NULL)
    467                 return(TCL_ERROR);
    468 
    469         clear_error(pymol);
     501    const char *model = "all";
     502    PymolProxy *pymol = (PymolProxy *) cdata;
     503
     504    clear_error(pymol);
    470505
    471506    for(arg = 1; arg < argc; arg++) {
    472                 if ( strcmp(argv[arg],"-defer") == 0 )
    473                     defer = 1;
    474                 else if (strcmp(argv[arg],"-push") == 0)
    475                     push = 1;
    476                 else if (strcmp(argv[arg],"-ghost") == 0)
    477                     ghost = 1;
    478                 else if (strcmp(argv[arg],"-normal") == 0)
    479                     ghost = 0;
    480                 else if (strcmp(argv[arg],"-model") == 0) {
    481                         if (++arg < argc)
    482                                 model = argv[arg];
    483                 }
    484                 else
    485                     model = argv[arg];
    486         }
    487 
    488         pymol->invalidate_cache = 1;
    489         pymol->need_update = !defer || push;
    490         pymol->immediate_update |= push;
     507        if ( strcmp(argv[arg],"-defer") == 0 )
     508            defer = 1;
     509        else if (strcmp(argv[arg],"-push") == 0)
     510            push = 1;
     511        else if (strcmp(argv[arg],"-ghost") == 0)
     512            ghost = 1;
     513        else if (strcmp(argv[arg],"-normal") == 0)
     514            ghost = 0;
     515        else if (strcmp(argv[arg],"-model") == 0) {
     516            if (++arg < argc)
     517                model = argv[arg];
     518        }
     519        else
     520            model = argv[arg];
     521    }
     522
     523    pymol->invalidate_cache = 1;
     524    pymol->need_update = !defer || push;
     525    pymol->immediate_update |= push;
    491526
    492527    sendf(pymol, "hide everything,%s\n",model);
    493528
    494529    if (ghost)
    495             sendf(pymol, "set line_width,.25,%s\n",model);
    496         else
    497             sendf(pymol, "set line_width,1,%s\n",model);
     530        sendf(pymol, "set line_width,.25,%s\n",model);
     531    else
     532        sendf(pymol, "set line_width,1,%s\n",model);
    498533
    499534    sendf(pymol, "show lines,%s\n",model);
    500535
    501         if (pymol->labels)
    502                 sendf(pymol, "show labels,%s\n",model);
    503 
    504         return(pymol->status);
    505 }
    506 
    507 int
     536    if (pymol->labels)
     537        sendf(pymol, "show labels,%s\n",model);
     538
     539    return pymol->status;
     540}
     541
     542static int
    508543DisableCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    509544{
    510         struct pymol_proxy *pymol = (struct pymol_proxy *) cdata;
     545    PymolProxy *pymol = (PymolProxy *) cdata;
    511546    const char *model = "all";
    512         int arg, defer = 0, push = 0;
    513 
    514         if (pymol == NULL)
    515             return(TCL_ERROR);
    516 
    517         clear_error(pymol);
     547    int arg, defer = 0, push = 0;
     548
     549    clear_error(pymol);
    518550
    519551    for(arg = 1; arg < argc; arg++) {
    520552
    521             if (strcmp(argv[arg], "-defer") == 0 )
    522                         defer = 1;
    523                 else if (strcmp(argv[arg], "-push") == 0 )
    524                     push = 1;
    525                 else
    526                         model = argv[arg];
    527        
    528         }
    529 
    530         pymol->need_update = !defer || push;
    531         pymol->immediate_update |= push;
    532         pymol->invalidate_cache = 1;
    533 
    534         sendf( pymol, "disable %s\n", model);
    535 
    536         return(pymol->status);
    537 }
    538 
    539 int
     553        if (strcmp(argv[arg], "-defer") == 0 )
     554            defer = 1;
     555        else if (strcmp(argv[arg], "-push") == 0 )
     556            push = 1;
     557        else
     558            model = argv[arg];
     559       
     560    }
     561
     562    pymol->need_update = !defer || push;
     563    pymol->immediate_update |= push;
     564    pymol->invalidate_cache = 1;
     565
     566    sendf( pymol, "disable %s\n", model);
     567
     568    return pymol->status;
     569}
     570
     571static int
    540572EnableCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    541573{
    542         struct pymol_proxy *pymol = (struct pymol_proxy *) cdata;
     574    PymolProxy *pymol = (PymolProxy *) cdata;
    543575    const char *model = "all";
    544         int arg, defer = 0, push = 0;
    545 
    546         if (pymol == NULL)
    547             return(TCL_ERROR);
    548 
    549         clear_error(pymol);
    550 
    551         for(arg = 1; arg < argc; arg++) {
    552                
    553                 if (strcmp(argv[arg],"-defer") == 0)
    554                         defer = 1;
    555                 else if (strcmp(argv[arg], "-push") == 0 )
    556                     push = 1;
    557                 else
    558                     model = argv[arg];
    559 
    560         }
    561 
    562         pymol->need_update = !defer || push;
    563         pymol->immediate_update |= push;
    564         pymol->invalidate_cache = 1;
    565 
    566         sendf( pymol, "enable %s\n", model);
    567 
    568         return(pymol->status);
    569 }
    570 
    571 int
     576    int arg, defer = 0, push = 0;
     577
     578    clear_error(pymol);
     579
     580    for(arg = 1; arg < argc; arg++) {
     581               
     582        if (strcmp(argv[arg],"-defer") == 0)
     583            defer = 1;
     584        else if (strcmp(argv[arg], "-push") == 0 )
     585            push = 1;
     586        else
     587            model = argv[arg];
     588
     589    }
     590
     591    pymol->need_update = !defer || push;
     592    pymol->immediate_update |= push;
     593    pymol->invalidate_cache = 1;
     594
     595    sendf( pymol, "enable %s\n", model);
     596
     597    return pymol->status;
     598}
     599
     600static int
    572601VMouseCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    573602{
    574         struct pymol_proxy *pymol = (struct pymol_proxy *) cdata;
     603    PymolProxy *pymol = (PymolProxy *) cdata;
    575604    int arg, defer = 0, push = 0, varg = 1;
    576605    int arg1 = 0, arg2 = 0, arg3 = 0, arg4 = 0, arg5 = 0;
    577606
    578         if (pymol == NULL)
    579             return(TCL_ERROR);
    580 
    581         clear_error(pymol);
     607    clear_error(pymol);
    582608
    583609    for(arg = 1; arg < argc; arg++) {
    584                 if (strcmp(argv[arg], "-defer") == 0)
    585                     defer = 1;
    586                 else if (strcmp(argv[arg], "-push") == 0)
    587                     push = 1;
    588                 else if (varg == 1) {
    589                         arg1 = atoi(argv[arg]);
    590                         varg++;
    591                 }
    592                 else if (varg == 2) {
    593                         arg2 = atoi(argv[arg]);
    594                         varg++;
    595                 }
    596                 else if (varg == 3) {
    597                         arg3 = atoi(argv[arg]);
    598                         varg++;
    599                 }
    600                 else if (varg == 4) {
    601                         arg4 = atoi(argv[arg]);
    602                         varg++;
    603                 }
    604                 else if (varg == 5) {
    605                         arg5 = atoi(argv[arg]);
    606                         varg++;
    607                 }
     610        if (strcmp(argv[arg], "-defer") == 0)
     611            defer = 1;
     612        else if (strcmp(argv[arg], "-push") == 0)
     613            push = 1;
     614        else if (varg == 1) {
     615            arg1 = atoi(argv[arg]);
     616            varg++;
     617        }
     618        else if (varg == 2) {
     619            arg2 = atoi(argv[arg]);
     620            varg++;
     621        }
     622        else if (varg == 3) {
     623            arg3 = atoi(argv[arg]);
     624            varg++;
     625        }
     626        else if (varg == 4) {
     627            arg4 = atoi(argv[arg]);
     628            varg++;
     629        }
     630        else if (varg == 5) {
     631            arg5 = atoi(argv[arg]);
     632            varg++;
     633        }
    608634    }
    609635
    610636    pymol->need_update = !defer || push;
    611637    pymol->immediate_update |= push;
    612         pymol->invalidate_cache = 1;
     638    pymol->invalidate_cache = 1;
    613639
    614640    sendf(pymol, "vmouse %d,%d,%d,%d,%d\n", arg1,arg2,arg3,arg4,arg5);
    615641
    616         return(pymol->status);
    617 }
    618 
    619 int
     642    return pymol->status;
     643}
     644
     645static int
    620646RawCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    621647{
    622         struct pymol_proxy *pymol = (struct pymol_proxy *) cdata;
    623     struct dyBuffer buffer;
     648    PymolProxy *pymol = (PymolProxy *) cdata;
     649    DyBuffer buffer;
    624650    int arg, defer = 0, push = 0;
    625    
    626     if (pymol == NULL)
    627             return(TCL_ERROR);
    628 
    629         clear_error(pymol);
     651    const char *cmd;
     652    clear_error(pymol);
    630653
    631654    dyBufferInit(&buffer);
    632655
    633         for(arg = 1; arg < argc; arg++) {
    634             if (strcmp(argv[arg], "-defer") == 0)
    635                     defer = 1;
    636                 else if (strcmp(argv[arg], "-push") == 0)
    637                     push = 1;
    638                 else {
    639                     dyBufferAppend(&buffer,argv[arg],(int)strlen(argv[arg]));
    640                     dyBufferAppend(&buffer," ",1);
    641             }
    642         }
    643 
    644         pymol->need_update = !defer || push;
    645         pymol->immediate_update |= push;
    646         pymol->invalidate_cache = 1;
    647 
    648     sendf(pymol,"%s\n",buffer);
    649 
    650         dyBufferFree(&buffer);
    651 
    652         return(pymol->status);
    653 }
    654 
    655 int
     656    cmd = NULL;
     657    for(arg = 1; arg < argc; arg++) {
     658        if (strcmp(argv[arg], "-defer") == 0)
     659            defer = 1;
     660        else if (strcmp(argv[arg], "-push") == 0)
     661            push = 1;
     662        else {
     663            cmd = argv[arg];
     664        }
     665    }
     666
     667    pymol->need_update = !defer || push;
     668    pymol->immediate_update |= push;
     669    pymol->invalidate_cache = 1;
     670
     671    sendf(pymol,"%s\n", cmd);
     672    dyBufferFree(&buffer);
     673
     674    return pymol->status;
     675}
     676
     677static int
    656678LabelCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    657679{
    658         struct pymol_proxy *pymol = (struct pymol_proxy *) cdata;
     680    PymolProxy *pymol = (PymolProxy *) cdata;
    659681    int state = 1;
    660         int arg, push = 0, defer = 0;
    661 
    662         if (pymol == NULL)
    663                 return(TCL_ERROR);
    664 
    665         clear_error(pymol);
    666 
    667         for(arg = 1; arg < argc; arg++) {
    668                 if ( strcmp(argv[arg],"-defer") == 0 )
    669                         defer = 1;
    670                 else if (strcmp(argv[arg],"-push") == 0 )
    671                         push = 1;
    672                 else if (strcmp(argv[arg],"on") == 0 )
    673                         state = 1;
    674                 else if (strcmp(argv[arg],"off") == 0 )
    675                         state = 0;
    676                 else if (strcmp(argv[arg],"toggle") == 0 )
    677                         state =  !pymol->labels;
    678         }
    679 
    680         pymol->need_update = !defer || push;
    681         pymol->immediate_update |= push;
    682         pymol->invalidate_cache = 1;
     682    int arg, push = 0, defer = 0;
     683
     684    clear_error(pymol);
     685
     686    for(arg = 1; arg < argc; arg++) {
     687        if ( strcmp(argv[arg],"-defer") == 0 )
     688            defer = 1;
     689        else if (strcmp(argv[arg],"-push") == 0 )
     690            push = 1;
     691        else if (strcmp(argv[arg],"on") == 0 )
     692            state = 1;
     693        else if (strcmp(argv[arg],"off") == 0 )
     694            state = 0;
     695        else if (strcmp(argv[arg],"toggle") == 0 )
     696            state =  !pymol->labels;
     697    }
     698
     699    pymol->need_update = !defer || push;
     700    pymol->immediate_update |= push;
     701    pymol->invalidate_cache = 1;
    683702
    684703    if (state) {
    685                 sendf(pymol, "set label_color,white,all\n");
    686                 sendf(pymol, "set label_size,14,all\n");
    687                 sendf(pymol, "label all,\"%%s%%s\" %% (ID,name)\n");
    688     }
    689         else
    690                 sendf(pymol, "label all\n");
    691 
    692         pymol->labels = state;
    693 
    694     return(pymol->status);
    695 }
    696 
    697 int
     704        sendf(pymol, "set label_color,white,all\n");
     705        sendf(pymol, "set label_size,14,all\n");
     706        sendf(pymol, "label all,\"%%s%%s\" %% (ID,name)\n");
     707    }
     708    else
     709        sendf(pymol, "label all\n");
     710
     711    pymol->labels = state;
     712
     713    return pymol->status;
     714}
     715
     716static int
    698717FrameCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    699718{
    700         struct pymol_proxy *pymol = (struct pymol_proxy *) cdata;
     719    PymolProxy *pymol = (PymolProxy *) cdata;
    701720    int frame = 0;
    702         int arg, push = 0, defer = 0;
    703 
    704         if (pymol == NULL)
    705                 return(TCL_ERROR);
    706 
    707         clear_error(pymol);
    708 
    709         for(arg = 1; arg < argc; arg++) {
    710                 if ( strcmp(argv[arg],"-defer") == 0 )
    711                     defer = 1;
    712                 else if (strcmp(argv[arg],"-push") == 0 )
    713                     push = 1;
    714                 else
    715                     frame = atoi(argv[arg]);
    716         }
    717                
    718         pymol->need_update = !defer || push;
     721    int arg, push = 0, defer = 0;
     722
     723    clear_error(pymol);
     724
     725    for(arg = 1; arg < argc; arg++) {
     726        if ( strcmp(argv[arg],"-defer") == 0 )
     727            defer = 1;
     728        else if (strcmp(argv[arg],"-push") == 0 )
     729            push = 1;
     730        else
     731            frame = atoi(argv[arg]);
     732    }
     733               
     734    pymol->need_update = !defer || push;
    719735    pymol->immediate_update |= push;
    720736
    721737    pymol->frame = frame;
    722738
    723         sendf(pymol,"frame %d\n", frame);
    724        
    725         return(pymol->status);
    726 }
    727 
    728 int
     739    sendf(pymol,"frame %d\n", frame);
     740       
     741    return pymol->status;
     742}
     743
     744static int
    729745ResetCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    730746{
    731         struct pymol_proxy *pymol = (struct pymol_proxy *) cdata;
     747    PymolProxy *pymol = (PymolProxy *) cdata;
    732748    int arg, push = 0, defer = 0;
    733749
    734         if (pymol == NULL)
    735                 return(TCL_ERROR);
    736 
    737         clear_error(pymol);
    738 
    739         for(arg = 1; arg < argc; arg++) {
    740                 if ( strcmp(argv[arg],"-defer") == 0 )
    741                     defer = 1;
    742                 else if (strcmp(argv[arg],"-push") == 0 )
    743                     push = 1;
    744         }
    745                
    746         pymol->need_update = !defer || push;
    747         pymol->immediate_update |= push;
    748         pymol->invalidate_cache = 1;
    749        
    750         sendf(pymol, "reset\n");
    751         sendf(pymol, "zoom buffer=2\n");
    752 
    753         return(pymol->status);
    754 }
    755 
    756 int
     750    clear_error(pymol);
     751
     752    for(arg = 1; arg < argc; arg++) {
     753        if ( strcmp(argv[arg],"-defer") == 0 )
     754            defer = 1;
     755        else if (strcmp(argv[arg],"-push") == 0 )
     756            push = 1;
     757    }
     758               
     759    pymol->need_update = !defer || push;
     760    pymol->immediate_update |= push;
     761    pymol->invalidate_cache = 1;
     762       
     763    sendf(pymol, "reset\n");
     764    sendf(pymol, "zoom buffer=2\n");
     765
     766    return pymol->status;
     767}
     768
     769static int
    757770RockCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    758771{
    759         struct pymol_proxy *pymol = (struct pymol_proxy *) cdata;
    760         float y = 0.0;
     772    PymolProxy *pymol = (PymolProxy *) cdata;
     773    float y = 0.0;
    761774    int arg, push = 0, defer = 0;
    762775
    763         if (pymol == NULL)
    764                 return(TCL_ERROR);
    765 
    766         clear_error(pymol);
    767 
    768         for(arg = 1; arg < argc; arg++) {
    769                 if ( strcmp(argv[arg],"-defer") == 0 )
    770                     defer = 1;
    771                 else if (strcmp(argv[arg],"-push") == 0 )
    772                     push = 1;
    773                 else
    774                     y = atof( argv[arg] );
    775         }
    776                
    777         pymol->need_update = !defer || push;
     776    clear_error(pymol);
     777
     778    for(arg = 1; arg < argc; arg++) {
     779        if ( strcmp(argv[arg],"-defer") == 0 )
     780            defer = 1;
     781        else if (strcmp(argv[arg],"-push") == 0 )
     782            push = 1;
     783        else
     784            y = atof( argv[arg] );
     785    }
     786               
     787    pymol->need_update = !defer || push;
    778788    pymol->immediate_update |= push;
    779789
    780         sendf(pymol,"turn y, %f\n", y - pymol->rock_offset);
    781 
    782         pymol->rock_offset = y;
    783 
    784         return(pymol->status);
    785 }
    786 
    787 int
     790    sendf(pymol,"turn y, %f\n", y - pymol->rock_offset);
     791
     792    pymol->rock_offset = y;
     793
     794    return pymol->status;
     795}
     796
     797static int
    788798ViewportCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    789799{
    790         struct pymol_proxy *pymol = (struct pymol_proxy *) cdata;
     800    PymolProxy *pymol = (PymolProxy *) cdata;
    791801    int width = 640, height = 480;
    792802    int defer = 0, push = 0, arg, varg = 1;
    793803
    794         if (pymol == NULL)
    795                 return(TCL_ERROR);
    796 
    797         clear_error(pymol);
    798 
    799         for(arg = 1; arg < argc; arg++) {
    800                 if ( strcmp(argv[arg],"-defer") == 0 )
    801                         defer = 1;
    802                 else if ( strcmp(argv[arg], "-push") == 0 )
    803                     push = 1;
    804                 else if (varg == 1) {
    805                         width = atoi(argv[arg]);
    806                         height = width;
    807                         varg++;
    808                 }
    809                 else if (varg == 2) {
    810                         height = atoi(argv[arg]);
    811                         varg++;
    812                 }
     804    clear_error(pymol);
     805
     806    for(arg = 1; arg < argc; arg++) {
     807        if ( strcmp(argv[arg],"-defer") == 0 )
     808            defer = 1;
     809        else if ( strcmp(argv[arg], "-push") == 0 )
     810            push = 1;
     811        else if (varg == 1) {
     812            width = atoi(argv[arg]);
     813            height = width;
     814            varg++;
     815        }
     816        else if (varg == 2) {
     817            height = atoi(argv[arg]);
     818            varg++;
     819        }
     820    }
     821
     822    pymol->need_update = !defer || push;
     823    pymol->immediate_update |= push;
     824    pymol->invalidate_cache = 1;
     825
     826    sendf(pymol, "viewport %d,%d\n", width, height);
     827
     828    //usleep(205000); // .2s delay for pymol to update its geometry *HACK ALERT*
     829       
     830    return pymol->status;
     831}
     832
     833static int
     834LoadPDBCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
     835{
     836    const char *pdbdata, *pdb, *name;
     837    char *buf;
     838    char buffer[800];
     839    PymolProxy *pymol = (PymolProxy *) cdata;
     840    int state = 1;
     841    int arg, defer = 0, push = 0, varg = 1;
     842    char filename[] = "/tmp/fileXXXXXX.pdb";
     843
     844    clear_error(pymol);
     845
     846    for(arg = 1; arg < argc; arg++) {
     847        if ( strcmp(argv[arg],"-defer") == 0 )
     848            defer = 1;
     849        else if (strcmp(argv[arg],"-push") == 0)
     850            push = 1;
     851        else if (varg == 1) {
     852            pdbdata = argv[arg];
     853            varg++;
     854        }
     855        else if (varg == 2) {
     856            name = argv[arg];
     857            varg++;
     858        }
     859        else if (varg == 3) {
     860            state = atoi( argv[arg] );
     861            varg++;
     862        }
     863    }
     864
     865    pymol->need_update = !defer || push;
     866    pymol->immediate_update |= push;
     867
     868#ifdef notdef
     869    {
     870        /* Pymol expects to load the pdb from a file.
     871         * Should create a rappture owned directory to write files.
     872         */
     873        int fd;
     874        char fileName[200];
     875
     876        sprintf(fileName, "/tmp/pymol-%d.pdb", getpid());
     877        fd = open(fileName,O_WRONLY | O_TRUNC | O_CREAT, 0600);
     878        if (fd < 0) {
     879            Tcl_AppendResult(interp, "pymolproxy: error opening \"", fileName,
     880                "\": ", strerror(errno), (char *)NULL);
     881            pymol->status = TCL_ERROR;
     882            return TCL_ERROR;
    813883        }
    814 
    815     pymol->need_update = !defer || push;
    816         pymol->immediate_update |= push;
    817         pymol->invalidate_cache = 1;
    818 
    819     sendf(pymol, "viewport %d,%d\n", width, height);
    820 
    821         //usleep(205000); // .2s delay for pymol to update its geometry *HACK ALERT*
     884        write(fd, pdbdata, strlen(pdbdata));
     885        close(fd);
     886        sendf(pymol, "load %s, %s, %d\n", fileName, name, state);
     887    }
     888#else
     889    {
     890        int count;
     891        const char *p;
     892        char *q, *newdata;
     893
     894        count = 0;
     895        for (p = pdbdata; *p != '\0'; p++) {
     896            if (*p == '\n') {
     897                count++;
     898            }
     899            count++;
     900        }
    822901       
    823         return(pymol->status);
    824 }
    825 
    826 int
    827 LoadPDBStrCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    828 {
    829     const char *pdbdata, *pdb, *name;
    830         char *buf;
    831         char buffer[800];
    832         struct pymol_proxy *pymol = (struct pymol_proxy *) cdata;
    833     int state = 1;
    834     int tmpf;
    835         int arg, defer = 0, push = 0, varg = 1;
    836         char filename[] = "/tmp/fileXXXXXX.pdb";
    837 
    838         if (pymol == NULL)
    839                 return(TCL_ERROR);
    840 
    841         clear_error(pymol);
    842 
    843     for(arg = 1; arg < argc; arg++) {
    844                 if ( strcmp(argv[arg],"-defer") == 0 )
    845                         defer = 1;
    846                 else if (strcmp(argv[arg],"-push") == 0)
    847                     push = 1;
    848         else if (varg == 1) {
    849                         pdbdata = argv[arg];
    850                         varg++;
    851                 }
    852                 else if (varg == 2) {
    853                         name = argv[arg];
    854                         varg++;
    855                 }
    856                 else if (varg == 3) {
    857                         state = atoi( argv[arg] );
    858                         varg++;
    859                 }
     902        q = newdata = malloc(count + 100);
     903        strcpy(newdata, "cmd.read_pdbstr(\"\"\"\\\n");
     904        q = newdata + strlen(newdata);
     905        for (p = pdbdata; *p != '\0'; p++, q++) {
     906            if (*p == '\n') {
     907                *q++ = '\\';
     908            }
     909            *q = *p;
    860910        }
    861 
    862         pymol->need_update = !defer || push;
    863     pymol->immediate_update |= push;
    864 
    865     tmpf = open(filename,O_RDWR|O_TRUNC|O_CREAT,0700);
    866        
    867         if (tmpf <= 0)
    868             fprintf(stderr,"pymolproxy: error opening file %d\n",errno);
    869 
    870     write(tmpf,pdbdata,strlen(pdbdata));
    871         close(tmpf);
    872        
    873     sendf(pymol, "load %s, %s, %d\n", filename, name, state);
    874         sendf(pymol, "zoom buffer=2\n");
    875 
    876         return(pymol->status);
    877 }
    878 
    879 int
     911        sprintf(q, "\\\n\"\"\",\"%s\",%d)\n", name, state);
     912        {
     913            char expect[800];
     914
     915            sprintf(expect, "PyMOL>\"\"\",\"%s\",%d)\n", name, state);
     916            send_expect(pymol, expect, newdata);
     917        }
     918        free(newdata);
     919    }
     920#endif
     921    sendf(pymol, "zoom buffer=2\n");
     922
     923    return pymol->status;
     924}
     925
     926static int
    880927RotateCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    881928{
    882         double turnx = 0.0;
    883         double turny = 0.0;
    884         double turnz = 0.0;
    885         struct pymol_proxy *pymol = (struct pymol_proxy *) cdata;
     929    double turnx = 0.0;
     930    double turny = 0.0;
     931    double turnz = 0.0;
     932    PymolProxy *pymol = (PymolProxy *) cdata;
    886933    int defer = 0, push = 0, arg, varg = 1;
    887934
    888         if (pymol == NULL)
    889                 return(TCL_ERROR);
    890 
    891         clear_error(pymol);
     935    clear_error(pymol);
    892936
    893937    for(arg = 1; arg < argc; arg++)
    894         {
    895             if (strcmp(argv[arg],"-defer") == 0)
    896                     defer = 1;
    897                 else if (strcmp(argv[arg],"-push") == 0)
    898                     push = 1;
    899         else  if (varg == 1) {
    900                         turnx = atof(argv[arg]);
    901                         varg++;
    902                 }
    903                 else if (varg == 2) {
    904                     turny = atof(argv[arg]);
    905                         varg++;
    906                 }
    907         else if (varg == 3) {
    908                         turnz = atof(argv[arg]);
    909                         varg++;
    910                 }
    911     }
     938        {
     939            if (strcmp(argv[arg],"-defer") == 0)
     940                defer = 1;
     941            else if (strcmp(argv[arg],"-push") == 0)
     942                push = 1;
     943            else  if (varg == 1) {
     944                turnx = atof(argv[arg]);
     945                varg++;
     946            }
     947            else if (varg == 2) {
     948                turny = atof(argv[arg]);
     949                varg++;
     950            }
     951            else if (varg == 3) {
     952                turnz = atof(argv[arg]);
     953                varg++;
     954            }
     955        }
    912956 
    913957    pymol->need_update = !defer || push;
    914         pymol->immediate_update  |= push;
    915         pymol->invalidate_cache = 1;
    916 
    917         if (turnx != 0.0)
    918                 sendf(pymol,"turn x, %f\n", turnx);
    919        
    920         if (turny != 0.0)
    921                 sendf(pymol,"turn y, %f\n", turny);
    922        
    923         if (turnz != 0.0)
    924                 sendf(pymol,"turn z, %f\n", turnz);
    925 
    926         return(pymol->status);
    927 }
    928 
    929 int
     958    pymol->immediate_update  |= push;
     959    pymol->invalidate_cache = 1;
     960
     961    if (turnx != 0.0)
     962        sendf(pymol,"turn x, %f\n", turnx);
     963       
     964    if (turny != 0.0)
     965        sendf(pymol,"turn y, %f\n", turny);
     966       
     967    if (turnz != 0.0)
     968        sendf(pymol,"turn z, %f\n", turnz);
     969
     970    return pymol->status;
     971}
     972
     973static int
    930974ZoomCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    931975{
    932976    double factor = 0.0;
    933977    double zmove = 0.0;
    934         struct pymol_proxy *pymol = (struct pymol_proxy *) cdata;
     978    PymolProxy *pymol = (PymolProxy *) cdata;
    935979    int defer = 0, push = 0, arg, varg = 1;
    936980
    937         if (pymol == NULL)
    938                 return(TCL_ERROR);
    939 
    940         clear_error(pymol);
     981    clear_error(pymol);
    941982
    942983    for(arg = 1; arg < argc; arg++)
    943         {
    944             if (strcmp(argv[arg],"-defer") == 0)
    945                     defer = 1;
    946                 else if (strcmp(argv[arg],"-push") == 0)
    947                     push = 1;
    948                 else if (varg == 1) {
    949                 factor = atof(argv[arg]);
    950                         varg++;
    951                 }
    952     }
    953 
    954         zmove = factor * -75;
     984        {
     985            if (strcmp(argv[arg],"-defer") == 0)
     986                defer = 1;
     987            else if (strcmp(argv[arg],"-push") == 0)
     988                push = 1;
     989            else if (varg == 1) {
     990                factor = atof(argv[arg]);
     991                varg++;
     992            }
     993        }
     994
     995    zmove = factor * -75;
    955996 
    956997    pymol->need_update = !defer || push;
    957         pymol->immediate_update  |= push;
    958         pymol->invalidate_cache = 1;
    959 
    960         if (zmove != 0.0)
    961                 sendf(pymol,"move z, %f\n", factor);
    962 
    963         return(pymol->status);
    964 }
    965 
    966 int
     998    pymol->immediate_update  |= push;
     999    pymol->invalidate_cache = 1;
     1000
     1001    if (zmove != 0.0)
     1002        sendf(pymol,"move z, %f\n", factor);
     1003
     1004    return pymol->status;
     1005}
     1006
     1007static int
    9671008PNGCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    9681009{
    969         char buffer[800];
    970         unsigned int bytes=0;
    971         float samples = 0.0;
    972         struct pymol_proxy *pymol = (struct pymol_proxy *) cdata;
    973 
    974         if (pymol == NULL)
    975                 return(TCL_ERROR);
    976 
    977         clear_error(pymol);
     1010    char buffer[800];
     1011    unsigned int bytes=0;
     1012    float samples = 0.0;
     1013    PymolProxy *pymol = (PymolProxy *) cdata;
     1014
     1015    clear_error(pymol);
    9781016
    9791017    if (pymol->invalidate_cache)
    980             pymol->cacheid++;
    981 
    982         pymol->need_update = 0;
    983         pymol->immediate_update = 0;
    984         pymol->invalidate_cache = 0;
    985 
    986         sendf(pymol,"png -\n");
    987 
    988         waitForString(pymol, "image follows: ", buffer, 800);
    989 
    990         sscanf(buffer, "image follows: %d %f\n", &bytes, &samples);
     1018        pymol->cacheid++;
     1019
     1020    pymol->need_update = 0;
     1021    pymol->immediate_update = 0;
     1022    pymol->invalidate_cache = 0;
     1023
     1024    sendf(pymol,"png -\n");
     1025
     1026    waitForString(pymol, "image follows: ", buffer, 800);
     1027
     1028    sscanf(buffer, "image follows: %d %f\n", &bytes, &samples);
    9911029 
    992         write(3,&samples,sizeof(samples));
     1030    write(3,&samples,sizeof(samples));
    9931031 
    9941032    dyBufferSetLength(&pymol->image, bytes);
    9951033
    996         bread(pymol->p_stdout, pymol->image.data, pymol->image.used);
    997 
    998         waitForString(pymol, " ScenePNG", buffer,800);
     1034    bread(pymol->p_stdout, pymol->image.data, pymol->image.used);
     1035
     1036    waitForString(pymol, " ScenePNG", buffer,800);
    9991037
    10001038    if (bytes && (pymol->image.used == bytes)) {
    1001             sprintf(buffer, "nv>image %d %d,%d,%d\n",
    1002                 bytes, pymol->cacheid, pymol->frame, pymol->rock_offset);
    1003 
    1004             write(pymol->c_stdin, buffer, strlen(buffer));
    1005             bwrite(pymol->c_stdin, pymol->image.data, bytes);
    1006     }
    1007 
    1008         return(pymol->status);
    1009 }
    1010 
    1011 int
     1039        sprintf(buffer, "nv>image %d %d %d %d\n",
     1040                bytes, pymol->cacheid, pymol->frame, pymol->rock_offset);
     1041        trace("to-molvis> %s", buffer);
     1042        write(pymol->c_stdin, buffer, strlen(buffer));
     1043        bwrite(pymol->c_stdin, pymol->image.data, bytes);
     1044    }
     1045    return pymol->status;
     1046}
     1047
     1048static int
    10121049BMPCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    10131050{
    1014         char buffer[800];
    1015         unsigned int bytes=0;
    1016         float samples = 0.0;
    1017         struct pymol_proxy *pymol = (struct pymol_proxy *) cdata;
    1018 
    1019         if (pymol == NULL)
    1020                 return(TCL_ERROR);
    1021 
    1022         clear_error(pymol);
     1051    char buffer[800];
     1052    unsigned int bytes=0;
     1053    float samples = 0.0;
     1054    PymolProxy *pymol = (PymolProxy *) cdata;
     1055
     1056    clear_error(pymol);
    10231057
    10241058    if (pymol->invalidate_cache)
    1025             pymol->cacheid++;
    1026 
    1027         pymol->need_update = 0;
    1028         pymol->immediate_update = 0;
    1029         pymol->invalidate_cache = 0;
    1030 
    1031         sendf(pymol,"bmp -\n");
    1032 
    1033         waitForString(pymol, "image follows: ", buffer, 800);
    1034 
    1035         sscanf(buffer, "image follows: %d %f\n", &bytes, &samples);
    1036         write(3,&samples,sizeof(samples));
     1059        pymol->cacheid++;
     1060
     1061    pymol->need_update = 0;
     1062    pymol->immediate_update = 0;
     1063    pymol->invalidate_cache = 0;
     1064
     1065    sendf(pymol,"bmp -\n");
     1066
     1067    waitForString(pymol, "image follows: ", buffer, 800);
     1068
     1069    sscanf(buffer, "image follows: %d %f\n", &bytes, &samples);
     1070    write(3,&samples,sizeof(samples));
    10371071
    10381072    dyBufferSetLength(&pymol->image, bytes);
    10391073
    1040         bread(pymol->p_stdout, pymol->image.data, pymol->image.used);
     1074    bread(pymol->p_stdout, pymol->image.data, pymol->image.used);
    10411075
    10421076    if (bytes && (pymol->image.used == bytes)) {
    1043             sprintf(buffer, "nv>image %d %d,%d,%d\n",
    1044                     bytes, pymol->cacheid, pymol->frame, pymol->rock_offset);
    1045             write(pymol->c_stdin, buffer, strlen(buffer));
    1046                 //fprintf(stderr,buffer);
    1047             bwrite(pymol->c_stdin, pymol->image.data, bytes);
    1048     }
    1049 
    1050         return(pymol->status);
    1051 }
    1052        
    1053 int pyMol_Proxy(int c_in, int c_out, char *command, char *argv[])
     1077        sprintf(buffer, "nv>image %d %d %d %d\n",
     1078                bytes, pymol->cacheid, pymol->frame, pymol->rock_offset);
     1079        write(pymol->c_stdin, buffer, strlen(buffer));
     1080        trace("to-molvis buffer=%s\n", buffer);
     1081        bwrite(pymol->c_stdin, pymol->image.data, bytes);
     1082    }
     1083    return pymol->status;
     1084}
     1085       
     1086static int
     1087ProxyInit(int c_in, int c_out, char *const *argv)
    10541088{
    10551089    int flags, status, result = 0;
    1056         int pairIn[2];
    1057         int pairOut[2];
    1058         int pairErr[2];
    1059         char buffer[800];
    1060         Tcl_Interp *interp;
    1061         Tcl_DString cmdbuffer;
    1062         struct dyBuffer dybuffer, dybuffer2;
    1063         struct pollfd ufd[3];
    1064         int pid;
    1065         struct pymol_proxy pymol;
    1066         struct timeval now,end;
    1067         int timeout;
    1068 
    1069         /* Create three pipes for communication with the external application   */
    1070         /* One each for the applications's: stdin, stdout, and stderr                   */
    1071 
    1072         if (pipe(pairIn) == -1)
    1073                 return(-1);
    1074 
    1075         if (pipe(pairOut) == -1) {
    1076                 close(pairIn[0]);
    1077                 close(pairIn[1]);
    1078                 return(-1);
    1079         }
    1080 
    1081         if (pipe(pairErr) == -1) {
    1082                 close(pairIn[0]);
    1083                 close(pairIn[1]);
    1084                 close(pairOut[0]);
    1085                 close(pairOut[1]);
    1086                 return(-1);
    1087         }
    1088 
    1089         /* Fork the new process.  Connect i/o to the new socket.                                */
    1090 
    1091         pid = fork();
     1090    int pairIn[2];
     1091    int pairOut[2];
     1092    int pairErr[2];
     1093    char buffer[800];
     1094    Tcl_Interp *interp;
     1095    Tcl_DString cmdbuffer;
     1096    DyBuffer dybuffer, dybuffer2;
     1097    struct pollfd ufd[3];
     1098    int pid;
     1099    PymolProxy pymol;
     1100    struct timeval now,end;
     1101    int timeout;
     1102
     1103    /* Create three pipes for communication with the external application. One
     1104     * each for the applications's: stdin, stdout, and stderr  */
     1105
     1106    if (pipe(pairIn) == -1)
     1107        return(-1);
     1108
     1109    if (pipe(pairOut) == -1) {
     1110        close(pairIn[0]);
     1111        close(pairIn[1]);
     1112        return(-1);
     1113    }
     1114
     1115    if (pipe(pairErr) == -1) {
     1116        close(pairIn[0]);
     1117        close(pairIn[1]);
     1118        close(pairOut[0]);
     1119        close(pairOut[1]);
     1120        return(-1);
     1121    }
     1122
     1123    /* Fork the new process.  Connect i/o to the new socket.  */
     1124
     1125    pid = fork();
    10921126       
    1093         if (pid < 0)
    1094                 return(-3);
    1095 
    1096         if (pid == 0)  /* child process */
    1097         {
    1098                 int i, fd;
    1099 
    1100                 /* create a new process group, so we can later kill this process and
    1101                  * all its children without affecting the process that created this one
    1102                  */
    1103 
    1104                 setpgid(pid, 0);
    1105 
    1106                 /* Redirect stdin, stdout, and stderr to pipes before execing           */
    1107 
    1108                 dup2(pairIn[0] ,0);  // stdin
    1109                 dup2(pairOut[1],1);  // stdout
    1110                 dup2(pairErr[1],2);  // stderr
    1111 
    1112                 for(fd = 3; fd < FD_SETSIZE; fd++)      /* close all other descriptors  */
    1113                         close(fd);
    1114 
    1115                 execvp(command,argv);
    1116                 fprintf(stderr,"pymolproxy: Failed to start pyMol\n");
    1117                 exit(-1);
    1118         }
     1127    if (pid < 0)
     1128        return(-3);
     1129
     1130    if (pid == 0)  /* child process */
     1131        {
     1132            int i, fd;
     1133
     1134            /* Create a new process group, so we can later kill this process
     1135             * and all its children without affecting the process that created
     1136             * this one
     1137             */
     1138
     1139            setpgid(pid, 0);
     1140
     1141            /* Redirect stdin, stdout, and stderr to pipes before execing               */
     1142
     1143            dup2(pairIn[0] ,0);  // stdin
     1144            dup2(pairOut[1],1);  // stdout
     1145            dup2(pairErr[1],2);  // stderr
     1146
     1147            for(fd = 3; fd < FD_SETSIZE; fd++)  /* close all other descriptors  */
     1148                close(fd);
     1149
     1150            execvp(argv[0], argv);
     1151            trace("pymolproxy: Failed to start pyMol\n");
     1152            exit(-1);
     1153        }
    11191154       
    1120         /* close opposite end of pipe, these now belong to the child process    */
     1155    /* close opposite end of pipe, these now belong to the child process        */
    11211156    close(pairIn[0]);
    11221157    close(pairOut[1]);
    11231158    close(pairErr[1]);
    11241159
    1125         signal(SIGPIPE, SIG_IGN); // ignore SIGPIPE (ie if nanoscale terminates)
    1126 
    1127         pymol.p_stdin = pairIn[1];
    1128         pymol.p_stdout = pairOut[0];
    1129         pymol.p_stderr = pairErr[0];
    1130         pymol.c_stdin  = c_in;
    1131         pymol.c_stdout = c_out;
    1132         pymol.labels = 0;
    1133         pymol.need_update = 0;
    1134         pymol.can_update = 1;
    1135         pymol.immediate_update = 0;
    1136         pymol.sync = 0;
     1160    signal(SIGPIPE, SIG_IGN); // ignore SIGPIPE (ie if nanoscale terminates)
     1161
     1162    pymol.p_stdin = pairIn[1];
     1163    pymol.p_stdout = pairOut[0];
     1164    pymol.p_stderr = pairErr[0];
     1165    pymol.c_stdin  = c_in;
     1166    pymol.c_stdout = c_out;
     1167    pymol.labels = 0;
     1168    pymol.need_update = 0;
     1169    pymol.can_update = 1;
     1170    pymol.immediate_update = 0;
     1171    pymol.sync = 0;
    11371172    pymol.frame = 1;
    1138         pymol.rock_offset = 0;
    1139         pymol.cacheid = 0;
    1140         pymol.invalidate_cache = 0;
    1141 
    1142         ufd[0].fd = pymol.c_stdout;
    1143         ufd[0].events = POLLIN | POLLHUP; /* ensure catching EOF */
    1144         ufd[1].fd = pymol.p_stdout;
    1145         ufd[1].events = POLLIN | POLLHUP;
    1146         ufd[2].fd = pymol.p_stderr;
    1147         ufd[2].events = POLLIN | POLLHUP;
     1173    pymol.rock_offset = 0;
     1174    pymol.cacheid = 0;
     1175    pymol.invalidate_cache = 0;
     1176
     1177    ufd[0].fd = pymol.c_stdout;
     1178    ufd[0].events = POLLIN | POLLHUP; /* ensure catching EOF */
     1179    ufd[1].fd = pymol.p_stdout;
     1180    ufd[1].events = POLLIN | POLLHUP;
     1181    ufd[2].fd = pymol.p_stderr;
     1182    ufd[2].events = POLLIN | POLLHUP;
    11481183
    11491184    flags = fcntl(pymol.p_stdout, F_GETFL);
    11501185    fcntl(pymol.p_stdout, F_SETFL, flags|O_NONBLOCK);
    11511186
    1152         interp = Tcl_CreateInterp();
    1153         Tcl_MakeSafe(interp);
    1154 
    1155         Tcl_DStringInit(&cmdbuffer);
    1156         dyBufferInit(&pymol.image);
     1187    interp = Tcl_CreateInterp();
     1188    Tcl_MakeSafe(interp);
     1189
     1190    Tcl_DStringInit(&cmdbuffer);
     1191    dyBufferInit(&pymol.image);
    11571192    dyBufferInit(&dybuffer);
    11581193    dyBufferInit(&dybuffer2);
    11591194
    1160         Tcl_CreateCommand(interp,"bmp",BMPCmd,(ClientData)&pymol, (Tcl_CmdDeleteProc*)NULL);
    1161         Tcl_CreateCommand(interp,"png",PNGCmd,(ClientData)&pymol, (Tcl_CmdDeleteProc*)NULL);
    1162         Tcl_CreateCommand(interp,"screen",ViewportCmd,(ClientData)&pymol, (Tcl_CmdDeleteProc*)NULL);
    1163         Tcl_CreateCommand(interp,"viewport",ViewportCmd,(ClientData)&pymol, (Tcl_CmdDeleteProc*)NULL);
    1164         Tcl_CreateCommand(interp,"rotate",RotateCmd,(ClientData)&pymol, (Tcl_CmdDeleteProc*)NULL);
    1165         Tcl_CreateCommand(interp,"zoom",ZoomCmd,(ClientData)&pymol, (Tcl_CmdDeleteProc*)NULL);
    1166         Tcl_CreateCommand(interp,"loadpdb", LoadPDBStrCmd, (ClientData)&pymol, (Tcl_CmdDeleteProc *)NULL);
    1167         Tcl_CreateCommand(interp,"ball_and_stick", BallAndStickCmd, (ClientData)&pymol, (Tcl_CmdDeleteProc*)NULL);
    1168         Tcl_CreateCommand(interp,"spheres", SpheresCmd, (ClientData)&pymol, (Tcl_CmdDeleteProc*)NULL);
    1169         Tcl_CreateCommand(interp,"lines", LinesCmd, (ClientData)&pymol, (Tcl_CmdDeleteProc*)NULL);
    1170         Tcl_CreateCommand(interp,"raw", RawCmd, (ClientData)&pymol, (Tcl_CmdDeleteProc*)NULL);
    1171         Tcl_CreateCommand(interp,"label", LabelCmd, (ClientData)&pymol, (Tcl_CmdDeleteProc*)NULL);
    1172         Tcl_CreateCommand(interp,"reset", ResetCmd, (ClientData)&pymol, (Tcl_CmdDeleteProc*)NULL);
    1173         Tcl_CreateCommand(interp,"rock", RockCmd, (ClientData)&pymol, (Tcl_CmdDeleteProc*)NULL);
    1174         Tcl_CreateCommand(interp,"frame", FrameCmd, (ClientData)&pymol, (Tcl_CmdDeleteProc*)NULL);
    1175         Tcl_CreateCommand(interp,"vmouse", VMouseCmd, (ClientData)&pymol, (Tcl_CmdDeleteProc*)NULL);
    1176         Tcl_CreateCommand(interp,"disable", DisableCmd, (ClientData)&pymol, (Tcl_CmdDeleteProc*)NULL);
    1177         Tcl_CreateCommand(interp,"enable", EnableCmd, (ClientData)&pymol, (Tcl_CmdDeleteProc*)NULL);
    1178 
    1179         // Main Proxy Loop
    1180         //      accept tcl commands from socket
    1181         //  translate them into pyMol commands, and issue them to child proccess
    1182         //  send images back
    1183 
    1184         gettimeofday(&end, NULL);
    1185 
    1186         while(1)
    1187         {
    1188                 char ch;
    1189 
    1190             gettimeofday(&now,NULL);
    1191 
    1192         if ( (!pymol.need_update) )
    1193             timeout = -1;
    1194         else if ((now.tv_sec > end.tv_sec) || ( (now.tv_sec == end.tv_sec) && (now.tv_usec >= end.tv_usec)) )
    1195             timeout = 0;
    1196         else
     1195    Tcl_CreateCommand(interp, "bmp",     BMPCmd,        &pymol, NULL);
     1196    Tcl_CreateCommand(interp, "png",     PNGCmd,        &pymol, NULL);
     1197    Tcl_CreateCommand(interp, "screen",  ViewportCmd,   &pymol, NULL);
     1198    Tcl_CreateCommand(interp, "viewport",ViewportCmd,   &pymol, NULL);
     1199    Tcl_CreateCommand(interp, "rotate",  RotateCmd,     &pymol, NULL);
     1200    Tcl_CreateCommand(interp, "zoom",    ZoomCmd,       &pymol, NULL);
     1201    Tcl_CreateCommand(interp, "loadpdb", LoadPDBCmd,    &pymol, NULL);
     1202    Tcl_CreateCommand(interp, "ballnstick",BallNStickCmd, &pymol, NULL);
     1203    Tcl_CreateCommand(interp, "spheres", SpheresCmd,    &pymol, NULL);
     1204    Tcl_CreateCommand(interp, "lines",   LinesCmd,      &pymol, NULL);
     1205    Tcl_CreateCommand(interp, "raw",     RawCmd,        &pymol, NULL);
     1206    Tcl_CreateCommand(interp, "label",   LabelCmd,      &pymol, NULL);
     1207    Tcl_CreateCommand(interp, "reset",   ResetCmd,      &pymol, NULL);
     1208    Tcl_CreateCommand(interp, "rock",    RockCmd,       &pymol, NULL);
     1209    Tcl_CreateCommand(interp, "frame",   FrameCmd,      &pymol, NULL);
     1210    Tcl_CreateCommand(interp, "vmouse",  VMouseCmd,     &pymol, NULL);
     1211    Tcl_CreateCommand(interp, "disable", DisableCmd,    &pymol, NULL);
     1212    Tcl_CreateCommand(interp, "enable",  EnableCmd,     &pymol, NULL);
     1213
     1214    // Main Proxy Loop
     1215    //  accept tcl commands from socket
     1216    //  translate them into pyMol commands, and issue them to child proccess
     1217    //  send images back
     1218
     1219    gettimeofday(&end, NULL);
     1220
     1221    while(1)
    11971222        {
    1198             timeout = (end.tv_sec - now.tv_sec) * 1000;
    1199 
    1200             if (end.tv_usec > now.tv_usec)
    1201                 timeout += (end.tv_usec - now.tv_usec) / 1000;
     1223            char ch;
     1224
     1225            gettimeofday(&now,NULL);
     1226
     1227            if ( (!pymol.need_update) )
     1228                timeout = -1;
     1229            else if ((now.tv_sec > end.tv_sec) || ( (now.tv_sec == end.tv_sec) && (now.tv_usec >= end.tv_usec)) )
     1230                timeout = 0;
    12021231            else
    1203                 timeout += (((1000000 + end.tv_usec) - now.tv_usec) / 1000) - 1000;
    1204 
    1205         }
    1206 
    1207                 if (!pymol.immediate_update)
    1208                         status = poll(ufd, 3, timeout);
    1209             else
    1210                     status = 0;
    1211 
    1212                 if ( status < 0 )
    1213                 {
    1214                         fprintf(stderr, "pymolproxy: POLL ERROR: status = %d, errno = %d, %s \n", status,errno,strerror(errno));
    1215                 }
    1216                 else if (status > 0)
    1217                 {
    1218                         gettimeofday(&now,NULL);
    1219 
    1220             if (ufd[0].revents) { /* Client Stdout Connection: command input */
    1221                             if (read(ufd[0].fd,&ch,1) <= 0)
    1222                             {
    1223                                     if (errno != EINTR)
    1224                                         {
    1225                                         fprintf(stderr,"pymolproxy: lost client connection (%d).\n", errno);
    1226                                         break;
    1227                                         }
    1228                             }
    1229                             else
    1230                             {
    1231                                     Tcl_DStringAppend(&cmdbuffer, &ch, 1);
    1232 
    1233                                     if (ch == '\n' && Tcl_CommandComplete(Tcl_DStringValue(&cmdbuffer))) {
    1234                                     Tcl_Eval(interp, Tcl_DStringValue(&cmdbuffer));
    1235                                             //fprintf(stderr,"Executed(%d,%d): %s", pymol.need_update, pymol.immediate_update, Tcl_DStringValue(&cmdbuffer));
    1236                                     Tcl_DStringSetLength(&cmdbuffer, 0);
    1237 
    1238                                             if (timeout == 0) status = 0; // send update
    1239                             }
    1240                             }
    1241                         }
    1242 
    1243                         if (ufd[1].revents ) { /* pyMol Stdout Connection: pymol (unexpected) output */
    1244                             if (read(ufd[1].fd, &ch, 1) <= 0)
    1245                                 {
    1246                                     if (errno != EINTR) {
    1247                                         fprintf(stderr,"pymolproxy: lost connection (stdout) to pymol server\n");
    1248                                                 break;
    1249                                         }
    1250                                 }
    1251                                 else
    1252                                 {
    1253                                     dyBufferAppend(&dybuffer, &ch, 1);
    1254 
    1255                                         if (ch == '\n') {
    1256                                             ch = 0;
    1257                                             dyBufferAppend(&dybuffer, &ch, 1);
    1258                                                 fprintf(stderr,"STDOUT>%s",dybuffer.data);
    1259                                                 dyBufferSetLength(&dybuffer,0);
    1260                                         }
    1261                                 }
    1262                         }
    1263 
    1264                         if (ufd[2].revents) { /* pyMol Stderr Connection: pymol standard error output */
    1265                                 if (read(ufd[2].fd, &ch, 1) <= 0)
    1266                                 {
    1267                                     if (errno != EINTR) {
    1268                                             fprintf(stderr,"pymolproxy: lost connection (stderr) to pymol server\n");
    1269                                                 break;
    1270                                         }
    1271                                 }
    1272                                 else {
    1273                                         dyBufferAppend(&dybuffer2, &ch, 1);
    1274 
    1275                                         if (ch == '\n') {
    1276                                             ch = 0;
    1277                                                 dyBufferAppend(&dybuffer2, &ch, 1);
    1278                                                 fprintf(stderr,"stderr>%s", dybuffer2.data);
    1279                                                 dyBufferSetLength(&dybuffer2,0);
    1280                                         }
    1281                                 }
    1282                         }
    1283                 }
    1284 
    1285         if (status == 0)
    1286                 {
    1287                         gettimeofday(&now,NULL);
    1288 
    1289                         if (pymol.need_update && pymol.can_update)
    1290                                 Tcl_Eval(interp, "bmp -\n");
    1291 
    1292                         end.tv_sec = now.tv_sec;
    1293                         end.tv_usec = now.tv_usec + 150000;
    1294 
    1295             if (end.tv_usec >= 1000000)
    1296                         {
    1297                                 end.tv_sec++;
    1298                                 end.tv_usec -= 1000000;
    1299                         }
    1300 
    1301                 }
    1302 
    1303     }
    1304 
    1305         status = waitpid(pid, &result, WNOHANG);
    1306 
    1307         if (status == -1)
    1308                 fprintf(stderr, "pymolproxy: error waiting on pymol server to exit (%d)\n", errno);
    1309         else if (status == 0) {
    1310                 fprintf(stderr, "pymolproxy: attempting to SIGTERM pymol server\n");
    1311                 kill(-pid, SIGTERM); // kill process group
    1312                 alarm(5);
    1313                 status = waitpid(pid, &result, 0);
    1314                 alarm(0);
    1315 
    1316                 while ((status == -1) && (errno == EINTR))
    1317                 {
    1318                         fprintf(stderr, "pymolproxy: Attempting to SIGKILL process.\n");
    1319                         kill(-pid, SIGKILL); // kill process group
    1320                         alarm(10);
    1321                         status = waitpid(pid, &result, 0);
    1322                         alarm(0);
    1323                 }
    1324         }
    1325 
    1326         fprintf(stderr, "pymolproxy: pymol server process ended (%d)\n", result);
    1327 
    1328         dyBufferFree(&pymol.image);
    1329 
    1330         Tcl_DeleteInterp(interp);
    1331 
    1332         return( (status == pid) ? 0 : 1);
     1232                {
     1233                    timeout = (end.tv_sec - now.tv_sec) * 1000;
     1234
     1235                    if (end.tv_usec > now.tv_usec)
     1236                        timeout += (end.tv_usec - now.tv_usec) / 1000;
     1237                    else
     1238                        timeout += (((1000000 + end.tv_usec) - now.tv_usec) / 1000) - 1000;
     1239
     1240                }
     1241
     1242            if (!pymol.immediate_update)
     1243                status = poll(ufd, 3, timeout);
     1244            else
     1245                status = 0;
     1246
     1247            if ( status < 0 )
     1248                {
     1249                    trace("pymolproxy: POLL ERROR: status = %d, errno = %d, %s \n", status,errno,strerror(errno));
     1250                }
     1251            else if (status > 0)
     1252                {
     1253                    gettimeofday(&now,NULL);
     1254
     1255                    if (ufd[0].revents) { /* Client Stdout Connection: command input */
     1256                        if (read(ufd[0].fd,&ch,1) <= 0)
     1257                            {
     1258                                if (errno != EINTR)
     1259                                    {
     1260                                        trace("pymolproxy: lost client connection (%d).\n", errno);
     1261                                        break;
     1262                                    }
     1263                            }
     1264                        else
     1265                            {
     1266                                Tcl_DStringAppend(&cmdbuffer, &ch, 1);
     1267
     1268                                if (ch == '\n' && Tcl_CommandComplete(Tcl_DStringValue(&cmdbuffer))) {
     1269                                    Tcl_Eval(interp, Tcl_DStringValue(&cmdbuffer));
     1270                                    trace("Executed(%d,%d): %s", pymol.need_update, pymol.immediate_update, Tcl_DStringValue(&cmdbuffer));
     1271                                    Tcl_DStringSetLength(&cmdbuffer, 0);
     1272
     1273                                    if (timeout == 0) status = 0; // send update
     1274                                }
     1275                            }
     1276                    }
     1277
     1278                    if (ufd[1].revents ) { /* pyMol Stdout Connection: pymol (unexpected) output */
     1279                        if (read(ufd[1].fd, &ch, 1) <= 0)
     1280                            {
     1281                                if (errno != EINTR) {
     1282                                    trace("pymolproxy: lost connection (stdout) to pymol server\n");
     1283                                    break;
     1284                                }
     1285                            }
     1286                        else
     1287                            {
     1288                                dyBufferAppend(&dybuffer, &ch, 1);
     1289
     1290                                if (ch == '\n') {
     1291                                    ch = 0;
     1292                                    dyBufferAppend(&dybuffer, &ch, 1);
     1293                                    trace("STDOUT>%s",dybuffer.data);
     1294                                    dyBufferSetLength(&dybuffer,0);
     1295                                }
     1296                            }
     1297                    }
     1298
     1299                    if (ufd[2].revents) { /* pyMol Stderr Connection: pymol standard error output */
     1300                        if (read(ufd[2].fd, &ch, 1) <= 0)
     1301                            {
     1302                                if (errno != EINTR) {
     1303                                    trace("pymolproxy: lost connection (stderr) to pymol server\n");
     1304                                    break;
     1305                                }
     1306                            }
     1307                        else {
     1308                            dyBufferAppend(&dybuffer2, &ch, 1);
     1309
     1310                            if (ch == '\n') {
     1311                                ch = 0;
     1312                                dyBufferAppend(&dybuffer2, &ch, 1);
     1313                                trace("stderr>%s", dybuffer2.data);
     1314                                dyBufferSetLength(&dybuffer2,0);
     1315                            }
     1316                        }
     1317                    }
     1318                }
     1319
     1320            if (status == 0)
     1321                {
     1322                    gettimeofday(&now,NULL);
     1323
     1324                    if (pymol.need_update && pymol.can_update)
     1325                        Tcl_Eval(interp, "bmp -\n");
     1326
     1327                    end.tv_sec = now.tv_sec;
     1328                    end.tv_usec = now.tv_usec + 150000;
     1329
     1330                    if (end.tv_usec >= 1000000)
     1331                        {
     1332                            end.tv_sec++;
     1333                            end.tv_usec -= 1000000;
     1334                        }
     1335
     1336                }
     1337
     1338        }
     1339
     1340    status = waitpid(pid, &result, WNOHANG);
     1341
     1342    if (status == -1) {
     1343        trace("pymolproxy: error waiting on pymol server to exit (%d)\n", errno);
     1344    } else if (status == 0) {
     1345        trace("pymolproxy: attempting to SIGTERM pymol server\n");
     1346        kill(-pid, SIGTERM); // kill process group
     1347        alarm(5);
     1348        status = waitpid(pid, &result, 0);
     1349        alarm(0);
     1350
     1351        while ((status == -1) && (errno == EINTR))
     1352            {
     1353                trace("pymolproxy: Attempting to SIGKILL process.\n");
     1354                kill(-pid, SIGKILL); // kill process group
     1355                alarm(10);
     1356                status = waitpid(pid, &result, 0);
     1357                alarm(0);
     1358            }
     1359    }
     1360
     1361    trace("pymolproxy: pymol server process ended (%d)\n", result);
     1362
     1363    dyBufferFree(&pymol.image);
     1364
     1365    Tcl_DeleteInterp(interp);
     1366
     1367    return( (status == pid) ? 0 : 1);
    13331368}
    13341369
    13351370#ifdef STANDALONE
    1336 
    1337 #define MAX_ARGS 100
    13381371
    13391372int
    13401373main(int argc, char *argv[])
    13411374{
    1342     int arg;
    1343     char *myargv[MAX_ARGS+1];
    1344 
    1345         if (argc > MAX_ARGS+1) {
    1346         fprintf(stderr, "%s: Argument list too long (%d > %d arguments).", argv[0], argc, MAX_ARGS + 1);
    1347                 return(1);
    1348         }
    1349 
    1350     for(arg = 1; arg < argc; arg++)
    1351             myargv[arg-1] = argv[arg];
    1352 
    1353         myargv[arg-1] = NULL;
    1354 
    1355     pyMol_Proxy(fileno(stdout), fileno(stdin), myargv[0], myargv);
     1375    if (debug) {
     1376        flog = stderr;
     1377        flog = fopen("/tmp/pymolproxy.log", "w");
     1378    }   
     1379    ProxyInit(fileno(stdout), fileno(stdin), argv + 1);
     1380    return 0;
    13561381}
    13571382
Note: See TracChangeset for help on using the changeset viewer.