+ set -v

export COMMAND_DIR="`canonicalpath $0`"
canonicalpath $0
++ canonicalpath ./dune-common/bin/dunecontrol
++ test 1 -ne 1
canonicalname "$1"
+++ canonicalname ./dune-common/bin/dunecontrol
+++ test 1 -ne 1
eval echo $1
++++ eval echo ./dune-common/bin/dunecontrol
echo ./dune-common/bin/dunecontrol
+++++ echo ./dune-common/bin/dunecontrol
+++ file=./dune-common/bin/dunecontrol
+++ test '!' -e ./dune-common/bin/dunecontrol
+++ test -L ./dune-common/bin/dunecontrol
+++ test -f ./dune-common/bin/dunecontrol
dirname "$file"
++++ dirname ./dune-common/bin/dunecontrol
+++ fdir=./dune-common/bin
basename "$file"
++++ basename ./dune-common/bin/dunecontrol
+++ fname=dunecontrol
canonicalname "$fdir"
++++ canonicalname ./dune-common/bin
++++ test 1 -ne 1
eval echo $1
+++++ eval echo ./dune-common/bin
echo ./dune-common/bin
++++++ echo ./dune-common/bin
++++ file=./dune-common/bin
++++ test '!' -e ./dune-common/bin
++++ test -L ./dune-common/bin
++++ test -f ./dune-common/bin
++++ test -d ./dune-common/bin
++++ cd ./dune-common/bin
++++ pwd
+++ fdir=/export/home/navi/workspace/dune-common/bin
+++ echo /export/home/navi/workspace/dune-common/bin/dunecontrol
+++ test -d ./dune-common/bin/dunecontrol
++ dirname /export/home/navi/workspace/dune-common/bin/dunecontrol
+ export COMMAND_DIR=/export/home/navi/workspace/dune-common/bin
+ COMMAND_DIR=/export/home/navi/workspace/dune-common/bin

# Read the modules find part
. "$COMMAND_DIR/dunemodules.inc"
+ . /export/home/navi/workspace/dune-common/bin/dunemodules.inc
# -*-sh-*-

###############################################
###
### Configuration
###

# name of the "control" files
CONTROL="dune.module"
++ CONTROL=dune.module

###############################################
###
### check for environment variables
###

if test -z $DUNE_CONTROL_PATH; then
  DUNE_CONTROL_PATH=.
fi
++ test -z
++ DUNE_CONTROL_PATH=.
if test -z $GREP; then
  GREP=grep
fi
++ test -z
++ GREP=grep
# SunOS [e]grep does not seem to comprehend character classes.  Set up
# some variables to spell them out
UPPER=ABCDEFGHIJKLMNOPQRSTUVWXYZ
++ UPPER=ABCDEFGHIJKLMNOPQRSTUVWXYZ
LOWER=abcdefghijklmnopqrstuvwxyz
++ LOWER=abcdefghijklmnopqrstuvwxyz
ALPHA="$UPPER$LOWER"
++ ALPHA=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
DIGIT=0123456789
++ DIGIT=0123456789
ALNUM="$ALPHA$DIGIT"
++ ALNUM=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789

space=" "
++ space=' '
formfeed=""
++ formfeed=$'\f'
newline="
"
++ newline='
'
cr="
"
++ cr='
'
tab="	"
++ tab='	'
vtab=""
++ vtab=$'\v'
# $SPACE will unfortunately not work since grep will not accept an
# embedded newline.  Instead one can often get away with using $BLANK
SPACE="$space$formfeed$newline$cr$tab$vtab"
++ SPACE=' 

	'
BLANK="$space$tab"
++ BLANK=' 	'

#
# read paramters from a $CONTROL file
#
# paramters:
# $1 file to read
#
parse_control() {
  # check file existence
  if ! test -f "$1"; then
    echo "ERROR: could not read file $1" >&2
    exit 1
  fi
  # read parameters from control file
  local name="$(echo $($GREP Module: "$1" | cut -d ':' -f2))"
  if test "x$name" = "x"; then
    echo "ERROR: $CONTROL files $1 does not contain a Module entry" >&2
    exit 1
  fi
  # create and check variable name from module name
  export module_inst=""
  export module=$(fix_variable_name $name)
  # read dune.module file
  local deps="$(echo $($GREP "^[$BLANK]*Depends:" "$1" | cut -d ':' -f2))"
  local sugs="$(echo $($GREP "^[$BLANK]*Suggests:" "$1" | cut -d ':' -f2))"
  local vers="$(echo $($GREP "^[$BLANK]*Version:" "$1" | cut -d ':' -f2))"
  local main="$(echo $($GREP "^[$BLANK]*Maintainer:" "$1" | cut -d ':' -f2))"
  # guess the path of the dune module:
  # - installed module: ${path}/lib/dunecontrol/${name}/dune.module
  #   and there is a file ${path}/lib/pkgconfig/${name}.pc
  # - source module: ${path}/dune.module
  #   and there is a file ${path}/${name}.pc.in
  local path="$(canonicalpath "$1")"
  if test -f $path/../../../lib/dunecontrol/${name}/dune.module; then
	  path=$(canonicalname "$path/../../../")
      export module_inst="true"
      export INST_${module}=yes
  else
      export INST_${module}=no
  fi
  if ! check_modname "$module"; then
    echo "ERROR: $CONTROL files $1 contains an invalid Module entry" >&2
    exit 1
  fi
  # avoid multiple definition of the same module
  if test "x$(eval echo \$HAVE_$module)" != "x"; then
    echo "ERROR: multiple definition of module $name" >&2
    echo "previous defined in:" >&2
    echo "  $(eval echo \$PATH_$module)/$CONTROL" >&2
    echo "redefined in:" >&2
    echo "  $path/$CONTROL" >&2
    exit 1
  fi
  # set status variables
  export HAVE_${module}=yes
  export PATH_${module}="$path"
  export VERS_${module}="$vers"
  export NAME_${module}="$name"
  export MAIN_${module}="$main"
  export DEPS_${module}="$deps"
  for name in $deps; do
    mod=$(fix_variable_name $name)
    export NAME_${mod}="$name"
  done
  export SUGS_${module}="$sugs"
  for name in $sugs; do
    mod=$(fix_variable_name $name)
    export NAME_${mod}="$name"
  done
}

#
# search for modules in each directory in DUNE_CONTROL_PATH
#
find_modules_in_path() {
  if test -z "$FOUND_MODULES"; then
    # foreach dir in $@
    while read dir; do
      if test -d "$dir"; then
        while read m; do
          find_modules $m
        done <<EOFM
        $(find "$dir" -name $CONTROL | $GREP -v 'dune-[-_a-zA-Z]/dune-[-a-zA-Z_]*-[0-9]\{1,\}.[0-9]\{1,\}/')
EOFM
	  else
        find_modules $dir
	  fi
    done <<EOF
    $(echo $DUNE_CONTROL_PATH | tr ':' '\n') 
EOF
    export FOUND_MODULES="$MODULES$INSTMODULES"
  fi
}

#
# search a directory recursively for $CONTROL files
#
# paramters:
# $1 directory to search for modules
#
find_modules() {
  if test -f "$1" && 
      test "$(basename $1)" = "$CONTROL"; then
      export module=""
      export module_inst=""
      parse_control "$1"
      if test -n "$module_inst"; then
        export INSTMODULES="$MODULES$module "
      else
        export MODULES="$MODULES$module "
	  fi
  else
      echo "ERROR: '$1' is no $CONTROL file" >&2
      false
  fi
}

#
# sort $MODULES according to the dependencies
#
sort_modules() {
  # reset list
  export SORTEDMODULES=""
  # handle each modules passed as parameter
  for m in "$@"; do
    # did we find a module file for this mopdule?
    if test "x$(eval echo \$HAVE_$m)" != "x"; then
      _sort_module $m
    else
      echo "ERROR: could not find module $(eval echo \$NAME_$m)" >&2
      exit 1
    fi
  done
  # save result
  export MODULES="$SORTEDMODULES"
  # clean up temporary variables
  for m in $MODULES; do
    export SORT_DONE_${m}=""
  done
}

#
# sort $MODULES's dependencies according to the dependencies
# don't include $MODULE itself
#
sort_dependencies() {
  # reset list
  export SORTEDMODULES=""
  local deps=""
  local name=""
  local dep=""
  local ver=""
  local xdeps=""
  # handle each modules passed as parameter
  for m in "$@"; do
    # did we find a module file for this mopdule?
    if test "x$(eval echo \$HAVE_$m)" != "x"; then
      eval deps=\$DEPS_$m
      deps=`echo "$deps" | sed 's/,/ /g;s/([^)]*)/ /'`
      for name in $deps; do
        dep=`fix_variable_name $name`
        _sort_module $dep
      done
    else
      eval echo ERROR: could not find module \$NAME_$m >&2
      exit 1
    fi
  done
  # save result
  export MODULES="$SORTEDMODULES"
  # clean up temporary variables
  for m in $MODULES; do
    export SORT_DONE_${m}=""
  done
}

#
# sort $MODULES's dependencies according to the dependencies
# don't include $MODULE itself
#
sort_suggestions() {
  # get dependencies
  sort_dependencies $@
  export DEPENDENCIES="$SORTEDMODULES"
  # reset list
  export SORTEDMODULES=""
  # handle each modules passed as parameter
  for m in "$@"; do
    # did we find a module file for this mopdule?
    if test "x$(eval echo \$HAVE_$m)" != "x"; then
	  if test "x$(eval echo \$SUGS_$m)" != "x" ; then
        for name in $(eval echo \$SUGS_$m); do
			dep=$(fix_variable_name $name)
			if test "x$(eval echo \$HAVE_$dep)" != "x"; then
				_sort_module $dep
			fi
        done
      fi
    else
      echo "ERROR: could not find module $(eval echo \$NAME_$m)" >&2
      exit 1
    fi
  done
  # save result
  local FOUND=no
  export MODULES=""
  for m in $SORTEDMODULES; do
    FOUND=no
    for d in $DEPENDENCIES; do
      if test "x$m" = "x$d"; then
        FOUND=yes
      fi
    done
    if test "x$FOUND" = "xno"; then
      export MODULES="$MODULES $m"
    fi
  done
  # clean up temporary variables
  for m in $MODULES; do
    export SORT_DONE_${m}=""
  done
}

#
# recursive part of sort_modules
# evaluate dependencies of one module
#
# paramters:
# $1 name of the modules
#
_sort_module() {
  local module="$1"
  local modname=""
  eval modname=\$NAME_$module
  local deps=""
  local name=""
  local dep=""
  local ver=""
  local depver=""
  local xdeps=""
  shift 1
  if ! check_modname $module; then 
    echo "ERROR: invalid module name $module" >&2
    exit 1
  fi
  if test "x$(eval echo \$SORT_DONE_${module})" != "xyes"; then
    # resolve dependencies
    eval deps=\$DEPS_$module
    #initially remove leading space
    deps=`echo "$deps" | sed 's/^ *//'`
    while test -n "$deps"; do
      #the end of the name is marked either by space, opening paren
      #or comma
      name="${deps%%[ (,]*}"
      #remove the name and adjacent whitespace
      deps=`echo "$deps" | sed 's/^[^ (,]* *//'`
      #check whether there is a dependency version
      case "$deps" in
      '('*) deps="${deps#(}"
            depver="${deps%%)*}"
            deps="${deps#*)}"
            ;;
      *)    depver=
            ;;
      esac
      #remove any leading whitespace or commas for te next iteration
      deps=`echo "$deps" | sed 's/^[, ]*//'`
      dep=$(fix_variable_name $name)
      if ! check_modname $dep; then 
        echo "ERROR: invalid module name $name" >&2
        exit 1
      fi
      if test "x$(eval echo \$HAVE_$dep)" != "x"; then
	    eval ver=\$VERS_$dep
        if ! check_version "$ver" "$depver"; then
          echo "ERROR: version mismatch." >&2
          echo "       $modname requires $name $depver," >&2
          echo "       but only $name = $ver available." >&2
          exit 1
        fi
        _sort_module $dep
      else
        # perhaps this module is installed,
        # then it should be handled via pkg-config
        if ! pkg-config $name; then
          echo "ERROR: could not find module $name," >&2
          echo "       module is also unknown to pkg-config." >&2
          echo "       Maybe you need to adjust PKG_CONFIG_PATH!" >&2
          echo "       $name is required by $modname" >&2
          exit 1
        fi
      fi
    done
    # resolve suggestions
    for name in $(eval "echo \$SUGS_$module"); do
	  dep=$(fix_variable_name $name)
      if ! check_modname $dep; then
        echo "ERROR: invalid module name $name" >&2
        exit 1
      fi
      if test "x$(eval echo \$HAVE_$dep)" != "x"; then
        _sort_module $dep
      fi
    done
    # insert this module into the list
    export SORT_DONE_${module}=yes
    export SORTEDMODULES="$SORTEDMODULES $module"
  fi
}

#
# load the $CONTROL file, skip all control variables
# and run a command
#
# parameters:
# $1 command to execute
# $2 full path of the $CONTROL file
#
eval_control() {
  local command="$1"
  local file="$2"
  shift 2
  if test -f "$file"; then
    # open subshell
    (
      set -e
      # load functions defined in $file
      # if $command is not defined in $file,
      # then the default implementation will be executed
      eval "$($GREP -v "^[$ALNUM]\{1,\}:" $file)"
      # execute $command
      $command
    ) || false
  else
    echo "ERROR: could not find $file" >&2
    exit 1
  fi
}

#
# fix a value such that it is suitable for a variable name and assign it
#
# parameters:
# $1 name of variable
# $2 value
#
fix_variable_name() {
  # The replacement sequence has to be extended explicitly to the length of
  # the matching set for SunOS compatibility
  echo -n "$@" | tr '[:punct:]' '[_*]'
}

fix_and_assign() {
  local name="$1"
  if ! check_modname $name; then
    echo "ERROR: error in assignment. $name is not a valid variabel name." >&2
  fi
  shift 1
  export $name=$(fix_variable_name $@)
}

#
# make sure the module name fits the naming convention
#
# parameters:
# $1 module name
#
check_modname() {
  if sh -c "$ID=huhu" > /dev/null 2>&1; then
    return 1
  fi
#  if ! echo "$1" | $GREP '^[a-zA-Z0-9_]\{1,\}$' >/dev/null; then
#    return 1
#  fi
  return 0
}

#
# compare a sub part of the version string
#
# parameters:
# $1 version
# $2 part
#
# parts:
# 1: major
# 2: minor
# 3: revision
#
get_sub_version() {
  #it would be nice to give the part to awk via a "-v FIELD=$2"
  #command line argument.  Unfortunatly, SunOS does not support this.
  #Worse, we cannot use awks int() function here, since under SunOS it
  #will always return 0 for string input.
  echo $1 | cut -d. -f"$2" | sed 's/[^0-9].*$//;s/^$/0/'
}

#
# compare two versions
#
# parameters:
# $1 version1
# $2 version1
#
# return:
# 0: equal
# 1: v1 > v2
# 2: v1 < v2
#
compare_versions() {
  local v1="$1"
  local v2="$2"

  for i in 1 2 3; do
    compare_sub_version $v1 $v2 $i || return 0
  done

  echo "eq"
}

compare_sub_version() {
  # compare sub version number
  local sub1=`get_sub_version $1 $3`
  local sub2=`get_sub_version $2 $3`

  if test $sub1 -gt $sub2; then
    echo "gt"
	return 1
  fi
  if test $sub1 -lt $sub2; then
    echo "lt"
	return 1
  fi

  return 0
}

check_version() {
  if test -z "$2"; then # if no constraint is given, check_version is true
    return 0
  fi
  local v=$1
  local PATTERN="^ *\([<>=]*\) *\([0-9.]*\)\(.*\)$"
  if test x != `echo "$2" | sed -e "s/$PATTERN/x/"`; then
    echo "ERROR: invalid version constraint $2" >&2
    exit 1
  fi
  local op=`echo "$2" | sed -e "s/$PATTERN/\1/"`
  local v2=`echo "$2" | sed -e "s/$PATTERN/\2/"`
  local rest=`echo "$2" | sed -e "s/$PATTERN/\3/" -e 's/ //g'`
  local result=1
  
  local rel=`compare_versions $v $v2`

  case $rel$op in
  "eq<="|"eq="|"eq>="|\
  "gt>="|"gt>"|\
  "lt<="|"lt<")
    result=0
	;;
  esac
  if test -z "$rest"; then
    return $result
  fi
  PATTERN="\([|&]\{2\}\)\(.*\)$"
  if test xx != x`echo "$rest" | sed -e "s/$PATTERN/x/"`; then
    echo "ERROR: invalid version constraint '$rest'" >&2
    exit 1
  fi
  op=`echo "$rest" | sed -e "s/$PATTERN/\1/"`
  v2=`echo "$rest" | sed -e "s/$PATTERN/\2/"`
  if eval "test $result -eq 0" $op "check_version \"$v\" \"$v2\""; then
    return 0
  fi
  return 1
}

# create PKG_CONFIG_PATH for installed dune modules
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:`canonicalpath $0`/../lib/pkgconfig"
canonicalpath $0
++ canonicalpath ./dune-common/bin/dunecontrol
++ test 1 -ne 1
canonicalname "$1"
+++ canonicalname ./dune-common/bin/dunecontrol
+++ test 1 -ne 1
eval echo $1
++++ eval echo ./dune-common/bin/dunecontrol
echo ./dune-common/bin/dunecontrol
+++++ echo ./dune-common/bin/dunecontrol
+++ file=./dune-common/bin/dunecontrol
+++ test '!' -e ./dune-common/bin/dunecontrol
+++ test -L ./dune-common/bin/dunecontrol
+++ test -f ./dune-common/bin/dunecontrol
dirname "$file"
++++ dirname ./dune-common/bin/dunecontrol
+++ fdir=./dune-common/bin
basename "$file"
++++ basename ./dune-common/bin/dunecontrol
+++ fname=dunecontrol
canonicalname "$fdir"
++++ canonicalname ./dune-common/bin
++++ test 1 -ne 1
eval echo $1
+++++ eval echo ./dune-common/bin
echo ./dune-common/bin
++++++ echo ./dune-common/bin
++++ file=./dune-common/bin
++++ test '!' -e ./dune-common/bin
++++ test -L ./dune-common/bin
++++ test -f ./dune-common/bin
++++ test -d ./dune-common/bin
++++ cd ./dune-common/bin
++++ pwd
+++ fdir=/export/home/navi/workspace/dune-common/bin
+++ echo /export/home/navi/workspace/dune-common/bin/dunecontrol
+++ test -d ./dune-common/bin/dunecontrol
++ dirname /export/home/navi/workspace/dune-common/bin/dunecontrol
+ export PKG_CONFIG_PATH=:/export/home/navi/workspace/dune-common/bin/../lib/pkgconfig
+ PKG_CONFIG_PATH=:/export/home/navi/workspace/dune-common/bin/../lib/pkgconfig

###############################################

#
# for each module load the $CONTROL script part and run $command
#
# parameters:
# $1 command to execute
#
build_modules() {
  local command="$1"
  shift
  local runcommand=run_$command
  modules="$@"
  for module in $modules; do
    local path=$(eval "echo \$PATH_${module}")
    eval echo "--- calling $command for \$NAME_${module} ---"
    if ! (
      set -e
      cd "$path"
	  export module
      eval_control $runcommand $path/$CONTROL
    ); then eval echo "--- Failed to build \$NAME_${module} ---"; exit 1; fi
    eval echo "--- \$NAME_${module} done ---"
  done
}

#
# load command options from an opts file
# the name of the opts file is stored in the global variable $DUNE_OPTS_FILE
#
# parameters:
# $1 command
#
load_opts() {
  local command=$1
  local COMMAND=$(echo $command | tr '[:lower:]' '[:upper:]')
  CMD_FLAGS="$(eval echo \$${COMMAND}_FLAGS)"
  local CMD_FLAGS_FROM_FILE=""
  if test "x$DUNE_OPTS_FILE" != "x"; then
    CMD_FLAGS_FROM_FILE="$(eval ${COMMAND}_FLAGS=""; . $DUNE_OPTS_FILE; eval echo \$${COMMAND}_FLAGS)"
  fi
  if test -n "$CMD_FLAGS_FROM_FILE"; then
    echo "----- using default flags \$${COMMAND}_FLAGS from $DUNE_OPTS_FILE -----"
    CMD_FLAGS=$CMD_FLAGS_FROM_FILE
  elif test -n "$CMD_FLAGS"; then
    echo "----- using default flags \$${COMMAND}_FLAGS from environment -----"
  fi
}

###############################################
###
### Commands
###

# check wheteher the parameter is valid command or not
is_command() {
eval '
case "$1" in
  '`echo $COMMANDS | sed -e 's/ / | /g'`')
    return 0
    ;;
  *)
    return 1
    ;;
esac'
}

# list of all dunecontrol commands
COMMANDS="update autogen configure make all exec status svn"
+ COMMANDS='update autogen configure make all exec status svn'

# help string for the commands
update_HELP="updated all modules from the repository"
+ update_HELP='updated all modules from the repository'
autogen_HELP="run the autogen.sh script for each module"
+ autogen_HELP='run the autogen.sh script for each module'
configure_HELP="run configure for each module"
+ configure_HELP='run configure for each module'
       # "NOTE: the --with-dune* parameters will be generated by dunecontrol"
make_HELP="run make for each module"
+ make_HELP='run make for each module'
all_HELP="\trun 'autogen', 'configure' and 'make' command for each module"
+ all_HELP='\trun '\''autogen'\'', '\''configure'\'' and '\''make'\'' command for each module'
       # "NOTE: run all for an initial setup"
exec_HELP="execute an arbitrary command in each module directory"
+ exec_HELP='execute an arbitrary command in each module directory'
status_HELP="show vc status for all modules"
+ status_HELP='show vc status for all modules'
svn_HELP="\trun svn command for each svn managed module"
+ svn_HELP='\trun svn command for each svn managed module'

#
# setup command proxies
# call will be forwarded to run_default_$command
#

for command in $COMMANDS; do
  eval "run_$command () { run_default_$command; }"
done
+ for command in '$COMMANDS'
+ eval 'run_update () { run_default_update; }'
run_update () { run_default_update; }
+ for command in '$COMMANDS'
+ eval 'run_autogen () { run_default_autogen; }'
run_autogen () { run_default_autogen; }
+ for command in '$COMMANDS'
+ eval 'run_configure () { run_default_configure; }'
run_configure () { run_default_configure; }
+ for command in '$COMMANDS'
+ eval 'run_make () { run_default_make; }'
run_make () { run_default_make; }
+ for command in '$COMMANDS'
+ eval 'run_all () { run_default_all; }'
run_all () { run_default_all; }
+ for command in '$COMMANDS'
+ eval 'run_exec () { run_default_exec; }'
run_exec () { run_default_exec; }
+ for command in '$COMMANDS'
+ eval 'run_status () { run_default_status; }'
run_status () { run_default_status; }
+ for command in '$COMMANDS'
+ eval 'run_svn () { run_default_svn; }'
run_svn () { run_default_svn; }

#
# default implementations for commands... 
# these can be overwritten in the $CONTROL files
#

run_default_exec () { bash -c "eval $CMD_FLAGS"; }

run_default_status () {
  local verbose=0
  local update=""
  for i in $CMD_FLAGS; do
    if eval test "x$i" = "x-v"; then verbose=1; fi
    if eval test "x$i" = "x-vv"; then verbose=2; fi
    if eval test "x$i" = "x-u"; then update="-u"; fi
  done
  # is out output connected to a tty?
  if test -t 1; then
    blue="\e[1m\e[34m"
    green="\e[1m\e[32m"
    red="\e[1m\e[31m"
    reset="\e[0m\e[0m"
  fi

  if test $verbose -eq 1; then
    svn status $update | grep -E "^M|^A|^D|^C|^U"
  elif test $verbose -eq 2; then
    svn status $update
  fi

  name="$(eval echo \$NAME_$module)"
  changed=$(svn status | grep -E "^M|^A|^D" | wc -l)
  collisions=$(svn status | grep -E "^C"| wc -l)
  pending=$(svn status $update | grep -E "^...... \* " | wc -l)

  color=$green
  text="no changes"
  if [ $changed -eq 0 ]; then
	true
  elif [ $changed -eq 1 ]; then
	color=$blue;
    text="1 change"
  else
	color=$blue;
    text="$changed changes"
  fi
  if [ $pending -eq 0 ]; then
	true
  elif [ $pending -eq 1 ]; then
	color=$blue;
    text="$text, 1 update pending"
  else
	color=$blue;
    text="$text, $pending updates pending"
  fi
  if [ $collisions -eq 0 ]; then
	true
  elif [ $collisions -eq 1 ]; then
	color=$red
    text="$text, 1 collision"
  else
	color=$red
    text="$text, $count collisions"
  fi
  echo -e "$color[$text]$reset $name"
}

run_default_update () {
  if test -d .git/svn && type git > /dev/null &&
      test x`git config --get dune.autoupdate` = xtrue; then
      git checkout master
      git svn rebase
      echo '*.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store' | tr ' ' '\n' \
          > .git/info/exclude
      git svn show-ignore >> .git/info/exclude
      return
  fi
  if test -d .svn; then
    svn update
    return
  fi
  if test -d CVS; then
    cvs update -dP
    return
  fi
  echo "WARNING: $module is not under a known version control system."
  echo "         We support svn and cvs."
}

run_default_autogen () {
  PARAMS="$CMD_FLAGS"
  local M4_PATH=""
  if test -f configure.ac && \
     ( test -d .svn || test -d .git || test -d CVS || test -f stamp-vc ); then
    for m in $FOUND_MODULES; do
      path=$(eval "echo \$PATH_$m")
      MODULE_PATHS="$MODULE_PATHS$path "
    done
    if test -f autogen.sh; then
      eval echo "WARNING: \$NAME_$module contains obsolete autogen.sh," \
		  >&2
	  echo "         dune-autogen is used instead." >&2
    fi
    eval "$COMMAND_DIR/dune-autogen" "$MODULE_PATHS" "$PARAMS" || exit 1
  else
    echo Skipping dune-autogen
  fi
}

run_default_configure () {
  PARAMS="$CMD_FLAGS"
  if test -x configure; then
	ACLOCAL_FLAGS="-I ."
	for m in $FOUND_MODULES; do
      path=$(eval "echo \$PATH_$m")
      name=$(eval "echo \$NAME_$m")
      if test -d "$path/m4"; then
          ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $path/m4"
      fi
      if test -d "$path/share/aclocal"; then
          ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $path/share/aclocal"
      fi
	  PARAMS="$PARAMS \"--with-$name=$path\""
	done
	PARAMS="$PARAMS ACLOCAL_AMFLAGS=\"$ACLOCAL_FLAGS\""
    echo ./configure "$PARAMS"
    eval ./configure "$PARAMS" || exit 1
  else
    if test -f configure.in || test -f configure.ac; then
      echo "ERROR: configure.[in|ac] found, but configure missing." >&2
      echo "Did you forget to run autoconf?" >&2
      echo "Perhaps you didn't update your project to" >&2
      echo "the latest buildsystem changes (FS#382)." >&2
      echo "If your project is under version control, please make sure" >&2
      echo "you have a file stamp-vc in you top_srcdir." >&2
      exit 1
    fi
  fi
}

run_default_make () {
  PARAMS="$CMD_FLAGS"
  echo make "$PARAMS"
  eval $MAKE "$PARAMS"
}

run_default_all () {
  for cmd in autogen configure make; do
    eval echo "--- calling $cmd for \$NAME_${module} ---"
    load_opts $cmd
    run_$cmd
  done
}

run_default_svn () {
  if test -d .svn; then
	PARAMS="$CMD_FLAGS"
	eval svn "$PARAMS"
  fi
}

###############################################
###
### main
###

onfailure() {
  echo "Execution of $(basename $0) terminated due to errors!" >&2
  exit 1
}

usage () {
  (
    echo "Usage: $(basename $0) [OPTIONS] COMMANDS [COMMAND-OPTIONS]"
    echo ""
    echo "  Execute COMMANDS for all Dune modules found. All entries in the"
    echo "  DUNE_CONTROL_PATH variable are scanned recursively for Dune modules."
	echo "  If DUNE_CONTROL_PATH is empty, the current directory is scanned."
    echo "  Dependencies are controlled by the $CONTROL files."
    echo ""
    echo "OPTIONS:"
    echo "  -h, --help         show this help"
    echo "      --debug        enable debug output of this script"
    echo "      --module=mod   only apply the actions on module mod"
    echo "                     and all modules it depends on"
    echo "      --only=mod     only apply the actions on module mod"
    echo "                     and not the modules it depends on"
    echo "      --current      only apply the actions on the current module,"
    echo "                     the one in whichs source tree we are standing"
    echo "      --opts=FILE    load default options from FILE"
    echo "                     (see dune-common/doc/example.opts)"
    echo "      --[COMMAND]-opts=opts   set options for COMMAND"
    echo "                     (this is mainly useful for the all COMMAND)"
    echo "COMMANDS:"
    echo "  Colon seperated list of commands. Availabel commands are:"
    printf "  \`help'\tguess what :-)\n"
    printf "  \`print'\tprint the list of modules sorted after their dependencies\n"
    for i in $COMMANDS; do
      printf "  \`$i'\t$(eval echo \$${i}_HELP)\n"
    done
    printf "  \`export'\trun eval \`dunecontrol export\` to save the list of\n"
    printf "  \t\tdune.module files to the DUNE_CONTROL_PATH variable\n"
    echo
  )  >&2
}

# create the module list
create_module_list() {
  find_modules_in_path
  if test "x$SEARCH_MODULES" != "x"; then
	sort_modules $SEARCH_MODULES
  else
	sort_modules $MODULES
  fi
  if test "x$ONLY" != x; then
    export MODULES="$ONLY"
  fi
}

# print the module list
print_module_list() {
  DELIM=$1
  shift
  while test -n "$2"; do
    echo -n "$(eval echo \$NAME_$1)$DELIM"
    shift
  done
  echo -n "$(eval echo \$NAME_$1)"
}

if test "x$1" = "x"; then
  usage
  exit 1
fi
+ test x--opts=build.opts = x

trap onfailure EXIT
+ trap onfailure EXIT

# clear command opts
#for i in $COMMANDS; do
#  COMMAND=$(echo $i | tr '[:lower:]' '[:upper:]')
#  export ${COMMAND}_FLAGS=""
#done

# clear variables
export SEARCH_MODULES=""
+ export SEARCH_MODULES=
+ SEARCH_MODULES=
export MODULES=""
+ export MODULES=
+ MODULES=
export ONLY=""
+ export ONLY=
+ ONLY=

# parse commandline parameters
while test $# -gt 0; do
    # get option
    option=$1

    # get args
    set +e
    # stolen from configure...
    # when no option is set, this returns an error code
    arg=`expr "x$option" : 'x[^=]*=\(.*\)'`
    set -e

    # switch
    case "$option" in
    --opts=*)
      if test "x$arg" = "x"; then
        usage
        echo "ERROR: Parameter for --opts is missing"  >&2
        echo  >&2
        exit 1;
      fi
      DUNE_OPTS_FILE=`canonicalname $arg`
      if ! test -r "$DUNE_OPTS_FILE"; then
        usage
        echo "ERROR: could not read opts file \"$DUNE_OPTS_FILE\""  >&2
        echo  >&2
        exit 1;
      fi
    ;;
	--*-opts=*)
      optcmd=`expr "x$option=" : 'x--\([^-]*\)-opts=.*'`
      if is_command $optcmd; then
        COMMAND=`echo $optcmd | tr '[:lower:]' '[:upper:]'`
        export ${COMMAND}_FLAGS="$arg"
      else
        usage
        echo "ERROR: unknown option \"$option\""  >&2
        exit 1
      fi
    ;;
    -h|--help) 
      command=help
      break
    ;;
    -p|--print) 
      command=print
      break
    ;;
    --module=*)
      if test "x$arg" = "x"; then
        usage
        echo "ERROR: Parameter for --module is missing"  >&2
        echo  >&2
        exit 1;
      fi
	  for a in `echo $arg | tr ',' ' '`; do
        export NAME_`fix_variable_name $a`="$a"
        fix_and_assign MODULE "$a"
        export SEARCH_MODULES="$SEARCH_MODULES $MODULE"
      done
    ;;
    --only=*)
      if test "x$arg" = "x"; then
        usage
        echo "ERROR: Parameter for --only is missing"  >&2
        echo  >&2
        exit 1;
      fi
	  for a in `echo $arg | tr ',' ' '`; do
        export NAME_`fix_variable_name $a`="$a"
        fix_and_assign MODULE "$a"
        export SEARCH_MODULES="$SEARCH_MODULES $MODULE"
        export ONLY="$ONLY $MODULE"
      done
	;;
    --current)
	  while ! test -f $CONTROL; do
        cd ..
	 	if test "$OLDPWD" = "$PWD"; then
		  echo "You are not inside the source tree of a DUNE module." >&2
		  exit -1
 		fi
	  done;
	  parse_control $PWD/$CONTROL
      fix_and_assign MODULE "$module"
      export SEARCH_MODULES="$SEARCH_MODULES $MODULE"
      export ONLY="$ONLY $MODULE"
      export HAVE_${module}=
    ;;
    --debug) true ;; # ignore this option, it is handled right at the beginning
    --*)
      usage
      echo "ERROR: Unknown option \`$option'"  >&2
      echo  >&2
	  exit 1
      ;;
    *)
      break
    ;;
    esac

    shift
done
+ test 3 -gt 0
+ option=--opts=build.opts
+ set +e
expr "x$option" : 'x[^=]*=\(.*\)'
++ expr x--opts=build.opts : 'x[^=]*=\(.*\)'
+ arg=build.opts
+ set -e
+ case "$option" in
+ test xbuild.opts = x
canonicalname $arg
++ canonicalname build.opts
++ test 1 -ne 1
eval echo $1
+++ eval echo build.opts
echo build.opts
++++ echo build.opts
++ file=build.opts
++ test '!' -e build.opts
++ test -L build.opts
++ test -f build.opts
dirname "$file"
+++ dirname build.opts
++ fdir=.
basename "$file"
+++ basename build.opts
++ fname=build.opts
canonicalname "$fdir"
+++ canonicalname .
+++ test 1 -ne 1
eval echo $1
++++ eval echo .
echo .
+++++ echo .
+++ file=.
+++ test '!' -e .
+++ test -L .
+++ test -f .
+++ test -d .
+++ cd .
+++ pwd
++ fdir=/export/home/navi/workspace
++ echo /export/home/navi/workspace/build.opts
++ test -d build.opts
+ DUNE_OPTS_FILE=/export/home/navi/workspace/build.opts
+ test -r /export/home/navi/workspace/build.opts
+ shift
+ test 2 -gt 0
+ option=--debug
+ set +e
expr "x$option" : 'x[^=]*=\(.*\)'
++ expr x--debug : 'x[^=]*=\(.*\)'
+ arg=
+ set -e
+ case "$option" in
+ true
+ shift
+ test 1 -gt 0
+ option=all
+ set +e
expr "x$option" : 'x[^=]*=\(.*\)'
++ expr xall : 'x[^=]*=\(.*\)'
+ arg=
+ set -e
+ case "$option" in
+ break

while test $# -gt 0; do
  # get command
  command=$1
  shift

  # get command options
  CMD_FLAGS=
  while test $# -gt 0 && test "$1" != ":"; do
    COMMAND=$(echo $command | tr '[:lower:]' '[:upper:]')
    # setup paramter list
    CMD_FLAGS="$CMD_FLAGS \"$1\""
    shift
  done
  if test -z "$CMD_FLAGS"; then
    load_opts $command
  else
    # disable usage of opts file
    if test "x$DUNE_OPTS_FILE" != "x"; then
      echo "WARNING: commandline parameters will overwrite setting in opts file \"$DUNE_OPTS_FILE\""
    fi 
  fi

  # skip command delimiter
  if test "$1" = ":"; then shift; fi

  case "$command" in
    print)
      create_module_list
      eval "print_module_list ' ' $MODULES"
      echo >&2
      ;;
    export)
      create_module_list
      DUNE_CONTROL_PATH=""
      for mod in $MODULES; do
        if test x != x$DUNE_CONTROL_PATH; then
          export DUNE_CONTROL_PATH="$DUNE_CONTROL_PATH:$(eval echo \$PATH_$mod/dune.module)"
        else
          export DUNE_CONTROL_PATH="$(eval echo \$PATH_$mod/dune.module)"
        fi
      done
      echo export DUNE_CONTROL_PATH=$DUNE_CONTROL_PATH
      ;;
    m4create)
      find_modules_in_path
      mainmod=`echo $SEARCH_MODULES`
      fname="dependencies.m4"
      name=`eval echo \\${NAME_$mainmod}`
      version=`eval echo \\${VERS_$mainmod}`
      maintainer=`eval echo \\${MAIN_$mainmod}`
      # get dependencies
      eval deps=\$DEPS_$module
      #initially remove leading space
      deps=`echo "$deps" | sed 's/^ *//'`
      while test -n "$deps"; do
        #the end of the name is marked either by space, opening paren
        #or comma
        depname="${deps%%[ (,]*}"
        #remove the name and adjacent whitespace
        deps=`echo "$deps" | sed 's/^[^ (,]* *//'`
        #check whether there is a dependency version
        case "$deps" in
        '('*) deps="${deps#(}"
              depver="${deps%%)*}"
              deps="${deps#*)}"
              ;;
        *)    depver=
              ;;
        esac
        #remove any leading whitespace or commas for te next iteration
        deps=`echo "$deps" | sed 's/^[, ]*//'`
  
        requires="$requires $depname $depver "
      done
      # ensure a version number
      if test "x$version" = "x"; then version="0.0"; fi
      echo "writing $fname"
      echo "    for $name $version $maintainer"
      echo "        requires $requires"
      cat > $fname <<EOF
m4_define([DUNE_AC_INIT],[
  AC_INIT([$name], [$version], [$maintainer])
  AC_SUBST([DUNE_MOD_VERSION], [$version])
  AC_SUBST([DUNE_MOD_NAME], [$name])
  AC_SUBST([DUNE_MAINTAINER_NAME], [$maintainer])
  DUNE_PARSE_MODULE_VERSION([$name], [$version])
  # don't build shared libs per default, this is way better for debugging...
  m4_ifdef([LT_INIT],
    [LT_INIT],
    [AC_DEFUN([LT_OUTPUT])])
  AC_DISABLE_SHARED

  REQUIRES="$requires"
  AC_SUBST(REQUIRES, [$REQUIRES])
])

AC_DEFUN([DUNE_CHECK_MOD_DEPENDENCIES], [
  AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  AC_REQUIRE([AC_PROG_CC])
  AC_REQUIRE([AC_PROG_CPP])
  AC_REQUIRE([AC_PROG_CXX])
  AC_REQUIRE([AC_PROG_CXXCPP])
  AC_REQUIRE([AC_PROG_LIBTOOL])
  m4_ifdef([AC_LIBTOOL_LANG_CXX_CONFIG],[AC_LIBTOOL_LANG_CXX_CONFIG])
  LT_OUTPUT
EOF
      ### initialize AM_CONDITIONAL for suggestions that were not found
      for name in $(eval echo \$SUGS_$mainmod); do
        mod=$(fix_variable_name $name)
        MOD=`echo $mod | tr [:lower:] [:upper:]`
        if test "x$(eval echo \$HAVE_$mod)" = "x"; then
          cat >> $fname <<EOF
  ### add a conditional check for $name,
  # just in case the module is not available at autogen time
  AM_CONDITIONAL([HAVE_${MOD}], false)
EOF
        fi
      done
      ### DEPENDENCIES
      if test "x$SEARCH_MODULES" != "x"; then
        MODULES=$SEARCH_MODULES
      fi
      sort_dependencies $MODULES
      for mod in $MODULES; do
        name=`eval echo \\$NAME_$mod`
        MOD=`echo $mod | tr [:lower:] [:upper:]`
        cat >> $fname <<EOF
  ### check dependency $name
  # invoke checks required by this module
  AC_REQUIRE([${MOD}_CHECKS])
  # invoke check for this module
  AC_REQUIRE([${MOD}_CHECK_MODULE])
  if test x\$with_$mod = xno; then
    AC_MSG_ERROR([could not find required module _dune_name])
  fi
EOF
      done
      ### 
      sort_suggestions $mainmod
      for mod in $MODULES; do
        name=`eval echo \\$NAME_$mod`
        MOD=`echo $mod | tr [:lower:] [:upper:]`
        cat >> $fname <<EOF
  ### check suggestion $name
  # invoke checks required by this module
  AC_REQUIRE([${MOD}_CHECKS])
  # invoke check for this module
  AC_REQUIRE([${MOD}_CHECK_MODULE])
  if test x\$with_$mod = xno; then
    AC_MSG_WARN([could not find suggested module _dune_name])
  fi
EOF
      done
      ###
      mod=$mainmod
      name=`eval echo \\$NAME_$mod`
      MOD=`echo $mod | tr [:lower:] [:upper:]`
      cat >> $fname <<EOF
  ### invoke checks for $name
  AC_REQUIRE([${MOD}_CHECKS])
])
EOF
    ;;
    unexport)
      echo export DUNE_CONTROL_PATH=""
    ;;
    help)
      usage
    ;;
    *)
      if is_command $command; then
        create_module_list
        NAMES=""
        BUILDMODULES=""
        for mod in $MODULES; do
          if test "$(eval echo \$INST_$mod)" != "yes"; then
            NAMES="$NAMES$(eval echo \$NAME_$mod) "
            BUILDMODULES="$BUILDMODULES$mod "
          fi
        done
        echo "--- going to build $NAMES ---"
          build_modules "$command" $BUILDMODULES
        echo "--- done ---"
      else
        usage
        echo "ERROR: unknown command \"$command\""  >&2
        exit 1
      fi
    ;;
  esac
done
+ test 1 -gt 0
+ command=all
+ shift
+ CMD_FLAGS=
+ test 0 -gt 0
+ test -z ''
+ load_opts all
+ local command=all
echo $command | tr '[:lower:]' '[:upper:]'
++ tr '[:lower:]' '[:upper:]'
++ echo all
+ local COMMAND=ALL
eval echo \$${COMMAND}_FLAGS
++ eval echo '$ALL_FLAGS'
echo $ALL_FLAGS
+++ echo
+ CMD_FLAGS=
+ local CMD_FLAGS_FROM_FILE=
+ test x/export/home/navi/workspace/build.opts '!=' x
eval ${COMMAND}_FLAGS=""; . $DUNE_OPTS_FILE; eval echo \$${COMMAND}_FLAGS
++ eval ALL_FLAGS=
ALL_FLAGS=
+++ ALL_FLAGS=
++ . /export/home/navi/workspace/build.opts
CONFIGURE_FLAGS="--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx"
+++ CONFIGURE_FLAGS='--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx'
++ eval echo '$ALL_FLAGS'
echo $ALL_FLAGS
+++ echo
+ CMD_FLAGS_FROM_FILE=
+ test -n ''
+ test -n ''
+ test '' = :
+ case "$command" in
+ is_command all
echo $COMMANDS | sed -e 's/ / | /g'
++ sed -e 's/ / | /g'
++ echo update autogen configure make all exec status svn
+ eval '
case "$1" in
  update' '|' autogen '|' configure '|' make '|' all '|' exec '|' status '|' 'svn)
    return 0
    ;;
  *)
    return 1
    ;;
esac'

case "$1" in
  update | autogen | configure | make | all | exec | status | svn)
    return 0
    ;;
  *)
    return 1
    ;;
esac
++ case "$1" in
++ return 0
+ create_module_list
+ find_modules_in_path
+ test -z ''
echo $DUNE_CONTROL_PATH | tr ':' '\n'
++ tr : '\n'
++ echo .
+ read dir
+ test -d .
find "$dir" -name $CONTROL | $GREP -v 'dune-[-_a-zA-Z]/dune-[-a-zA-Z_]*-[0-9]\{1,\}.[0-9]\{1,\}/'
++ grep -v 'dune-[-_a-zA-Z]/dune-[-a-zA-Z_]*-[0-9]\{1,\}.[0-9]\{1,\}/'
++ find . -name dune.module
+ read m
+ find_modules ./dune-grid/dune.module
+ test -f ./dune-grid/dune.module
basename $1
++ basename ./dune-grid/dune.module
+ test dune.module = dune.module
+ export module=
+ module=
+ export module_inst=
+ module_inst=
+ parse_control ./dune-grid/dune.module
+ test -f ./dune-grid/dune.module
echo $($GREP Module: "$1" | cut -d ':' -f2)
$GREP Module: "$1" | cut -d ':' -f2
+++ grep Module: ./dune-grid/dune.module
+++ cut -d : -f2
++ echo dune-grid
+ local name=dune-grid
+ test xdune-grid = x
+ export module_inst=
+ module_inst=
fix_variable_name $name
++ fix_variable_name dune-grid
++ echo -n dune-grid
++ tr '[:punct:]' '[_*]'
+ export module=dune_grid
+ module=dune_grid
echo $($GREP "^[$BLANK]*Depends:" "$1" | cut -d ':' -f2)
$GREP "^[$BLANK]*Depends:" "$1" | cut -d ':' -f2
+++ grep '^[ 	]*Depends:' ./dune-grid/dune.module
+++ cut -d : -f2
++ echo dune-common '(>=' '1.2)'
+ local 'deps=dune-common (>= 1.2)'
echo $($GREP "^[$BLANK]*Suggests:" "$1" | cut -d ':' -f2)
$GREP "^[$BLANK]*Suggests:" "$1" | cut -d ':' -f2
+++ grep '^[ 	]*Suggests:' ./dune-grid/dune.module
+++ cut -d : -f2
++ echo UG Alberta Alu3d
+ local 'sugs=UG Alberta Alu3d'
echo $($GREP "^[$BLANK]*Version:" "$1" | cut -d ':' -f2)
$GREP "^[$BLANK]*Version:" "$1" | cut -d ':' -f2
+++ cut -d : -f2
+++ grep '^[ 	]*Version:' ./dune-grid/dune.module
++ echo 1.2svn
+ local vers=1.2svn
echo $($GREP "^[$BLANK]*Maintainer:" "$1" | cut -d ':' -f2)
$GREP "^[$BLANK]*Maintainer:" "$1" | cut -d ':' -f2
+++ cut -d : -f2
+++ grep '^[ 	]*Maintainer:' ./dune-grid/dune.module
++ echo dune@dune-project.org
+ local main=dune@dune-project.org
canonicalpath "$1"
++ canonicalpath ./dune-grid/dune.module
++ test 1 -ne 1
canonicalname "$1"
+++ canonicalname ./dune-grid/dune.module
+++ test 1 -ne 1
eval echo $1
++++ eval echo ./dune-grid/dune.module
echo ./dune-grid/dune.module
+++++ echo ./dune-grid/dune.module
+++ file=./dune-grid/dune.module
+++ test '!' -e ./dune-grid/dune.module
+++ test -L ./dune-grid/dune.module
+++ test -f ./dune-grid/dune.module
dirname "$file"
++++ dirname ./dune-grid/dune.module
+++ fdir=./dune-grid
basename "$file"
++++ basename ./dune-grid/dune.module
+++ fname=dune.module
canonicalname "$fdir"
++++ canonicalname ./dune-grid
++++ test 1 -ne 1
eval echo $1
+++++ eval echo ./dune-grid
echo ./dune-grid
++++++ echo ./dune-grid
++++ file=./dune-grid
++++ test '!' -e ./dune-grid
++++ test -L ./dune-grid
++++ test -f ./dune-grid
++++ test -d ./dune-grid
++++ cd ./dune-grid
++++ pwd
+++ fdir=/export/home/navi/workspace/dune-grid
+++ echo /export/home/navi/workspace/dune-grid/dune.module
+++ test -d ./dune-grid/dune.module
++ dirname /export/home/navi/workspace/dune-grid/dune.module
+ local path=/export/home/navi/workspace/dune-grid
+ test -f /export/home/navi/workspace/dune-grid/../../../lib/dunecontrol/dune-grid/dune.module
+ export INST_dune_grid=no
+ INST_dune_grid=no
+ check_modname dune_grid
+ sh -c =huhu
+ return 0
eval echo \$HAVE_$module
++ eval echo '$HAVE_dune_grid'
echo $HAVE_dune_grid
+++ echo
+ test x '!=' x
+ export HAVE_dune_grid=yes
+ HAVE_dune_grid=yes
+ export PATH_dune_grid=/export/home/navi/workspace/dune-grid
+ PATH_dune_grid=/export/home/navi/workspace/dune-grid
+ export VERS_dune_grid=1.2svn
+ VERS_dune_grid=1.2svn
+ export NAME_dune_grid=dune-grid
+ NAME_dune_grid=dune-grid
+ export MAIN_dune_grid=dune@dune-project.org
+ MAIN_dune_grid=dune@dune-project.org
+ export 'DEPS_dune_grid=dune-common (>= 1.2)'
+ DEPS_dune_grid='dune-common (>= 1.2)'
+ for name in '$deps'
fix_variable_name $name
++ fix_variable_name dune-common
++ tr '[:punct:]' '[_*]'
++ echo -n dune-common
+ mod=dune_common
+ export NAME_dune_common=dune-common
+ NAME_dune_common=dune-common
+ for name in '$deps'
fix_variable_name $name
++ fix_variable_name '(>='
++ tr '[:punct:]' '[_*]'
++ echo -n '(>='
+ mod=___
+ export 'NAME____=(>='
+ NAME____='(>='
+ for name in '$deps'
fix_variable_name $name
++ fix_variable_name '1.2)'
++ tr '[:punct:]' '[_*]'
++ echo -n '1.2)'
+ mod=1_2_
+ export 'NAME_1_2_=1.2)'
+ NAME_1_2_='1.2)'
+ export 'SUGS_dune_grid=UG Alberta Alu3d'
+ SUGS_dune_grid='UG Alberta Alu3d'
+ for name in '$sugs'
fix_variable_name $name
++ fix_variable_name UG
++ tr '[:punct:]' '[_*]'
++ echo -n UG
+ mod=UG
+ export NAME_UG=UG
+ NAME_UG=UG
+ for name in '$sugs'
fix_variable_name $name
++ fix_variable_name Alberta
++ tr '[:punct:]' '[_*]'
++ echo -n Alberta
+ mod=Alberta
+ export NAME_Alberta=Alberta
+ NAME_Alberta=Alberta
+ for name in '$sugs'
fix_variable_name $name
++ fix_variable_name Alu3d
++ tr '[:punct:]' '[_*]'
++ echo -n Alu3d
+ mod=Alu3d
+ export NAME_Alu3d=Alu3d
+ NAME_Alu3d=Alu3d
+ test -n ''
+ export 'MODULES=dune_grid '
+ MODULES='dune_grid '
+ read m
+ find_modules ./dune-common/dune.module
+ test -f ./dune-common/dune.module
basename $1
++ basename ./dune-common/dune.module
+ test dune.module = dune.module
+ export module=
+ module=
+ export module_inst=
+ module_inst=
+ parse_control ./dune-common/dune.module
+ test -f ./dune-common/dune.module
echo $($GREP Module: "$1" | cut -d ':' -f2)
$GREP Module: "$1" | cut -d ':' -f2
+++ grep Module: ./dune-common/dune.module
+++ cut -d : -f2
++ echo dune-common
+ local name=dune-common
+ test xdune-common = x
+ export module_inst=
+ module_inst=
fix_variable_name $name
++ fix_variable_name dune-common
++ echo -n dune-common
++ tr '[:punct:]' '[_*]'
+ export module=dune_common
+ module=dune_common
echo $($GREP "^[$BLANK]*Depends:" "$1" | cut -d ':' -f2)
$GREP "^[$BLANK]*Depends:" "$1" | cut -d ':' -f2
+++ grep '^[ 	]*Depends:' ./dune-common/dune.module
+++ cut -d : -f2
++ echo
+ local deps=
echo $($GREP "^[$BLANK]*Suggests:" "$1" | cut -d ':' -f2)
$GREP "^[$BLANK]*Suggests:" "$1" | cut -d ':' -f2
+++ grep '^[ 	]*Suggests:' ./dune-common/dune.module
+++ cut -d : -f2
++ echo
+ local sugs=
echo $($GREP "^[$BLANK]*Version:" "$1" | cut -d ':' -f2)
$GREP "^[$BLANK]*Version:" "$1" | cut -d ':' -f2
+++ cut -d : -f2
+++ grep '^[ 	]*Version:' ./dune-common/dune.module
++ echo 1.2svn
+ local vers=1.2svn
echo $($GREP "^[$BLANK]*Maintainer:" "$1" | cut -d ':' -f2)
$GREP "^[$BLANK]*Maintainer:" "$1" | cut -d ':' -f2
+++ cut -d : -f2
+++ grep '^[ 	]*Maintainer:' ./dune-common/dune.module
++ echo dune@dune-project.org
+ local main=dune@dune-project.org
canonicalpath "$1"
++ canonicalpath ./dune-common/dune.module
++ test 1 -ne 1
canonicalname "$1"
+++ canonicalname ./dune-common/dune.module
+++ test 1 -ne 1
eval echo $1
++++ eval echo ./dune-common/dune.module
echo ./dune-common/dune.module
+++++ echo ./dune-common/dune.module
+++ file=./dune-common/dune.module
+++ test '!' -e ./dune-common/dune.module
+++ test -L ./dune-common/dune.module
+++ test -f ./dune-common/dune.module
dirname "$file"
++++ dirname ./dune-common/dune.module
+++ fdir=./dune-common
basename "$file"
++++ basename ./dune-common/dune.module
+++ fname=dune.module
canonicalname "$fdir"
++++ canonicalname ./dune-common
++++ test 1 -ne 1
eval echo $1
+++++ eval echo ./dune-common
echo ./dune-common
++++++ echo ./dune-common
++++ file=./dune-common
++++ test '!' -e ./dune-common
++++ test -L ./dune-common
++++ test -f ./dune-common
++++ test -d ./dune-common
++++ cd ./dune-common
++++ pwd
+++ fdir=/export/home/navi/workspace/dune-common
+++ echo /export/home/navi/workspace/dune-common/dune.module
+++ test -d ./dune-common/dune.module
++ dirname /export/home/navi/workspace/dune-common/dune.module
+ local path=/export/home/navi/workspace/dune-common
+ test -f /export/home/navi/workspace/dune-common/../../../lib/dunecontrol/dune-common/dune.module
+ export INST_dune_common=no
+ INST_dune_common=no
+ check_modname dune_common
+ sh -c =huhu
+ return 0
eval echo \$HAVE_$module
++ eval echo '$HAVE_dune_common'
echo $HAVE_dune_common
+++ echo
+ test x '!=' x
+ export HAVE_dune_common=yes
+ HAVE_dune_common=yes
+ export PATH_dune_common=/export/home/navi/workspace/dune-common
+ PATH_dune_common=/export/home/navi/workspace/dune-common
+ export VERS_dune_common=1.2svn
+ VERS_dune_common=1.2svn
+ export NAME_dune_common=dune-common
+ NAME_dune_common=dune-common
+ export MAIN_dune_common=dune@dune-project.org
+ MAIN_dune_common=dune@dune-project.org
+ export DEPS_dune_common=
+ DEPS_dune_common=
+ export SUGS_dune_common=
+ SUGS_dune_common=
+ test -n ''
+ export 'MODULES=dune_grid dune_common '
+ MODULES='dune_grid dune_common '
+ read m
+ find_modules ./dune-pargm/dune.module
+ test -f ./dune-pargm/dune.module
basename $1
++ basename ./dune-pargm/dune.module
+ test dune.module = dune.module
+ export module=
+ module=
+ export module_inst=
+ module_inst=
+ parse_control ./dune-pargm/dune.module
+ test -f ./dune-pargm/dune.module
echo $($GREP Module: "$1" | cut -d ':' -f2)
$GREP Module: "$1" | cut -d ':' -f2
+++ cut -d : -f2
+++ grep Module: ./dune-pargm/dune.module
++ echo dune-pargm
+ local name=dune-pargm
+ test xdune-pargm = x
+ export module_inst=
+ module_inst=
fix_variable_name $name
++ fix_variable_name dune-pargm
++ tr '[:punct:]' '[_*]'
++ echo -n dune-pargm
+ export module=dune_pargm
+ module=dune_pargm
echo $($GREP "^[$BLANK]*Depends:" "$1" | cut -d ':' -f2)
$GREP "^[$BLANK]*Depends:" "$1" | cut -d ':' -f2
+++ cut -d : -f2
+++ grep '^[ 	]*Depends:' ./dune-pargm/dune.module
++ echo dune-common dune-grid
+ local 'deps=dune-common dune-grid'
echo $($GREP "^[$BLANK]*Suggests:" "$1" | cut -d ':' -f2)
$GREP "^[$BLANK]*Suggests:" "$1" | cut -d ':' -f2
+++ cut -d : -f2
+++ grep '^[ 	]*Suggests:' ./dune-pargm/dune.module
++ echo
+ local sugs=
echo $($GREP "^[$BLANK]*Version:" "$1" | cut -d ':' -f2)
$GREP "^[$BLANK]*Version:" "$1" | cut -d ':' -f2
+++ cut -d : -f2
+++ grep '^[ 	]*Version:' ./dune-pargm/dune.module
++ echo rc1
+ local vers=rc1
echo $($GREP "^[$BLANK]*Maintainer:" "$1" | cut -d ':' -f2)
$GREP "^[$BLANK]*Maintainer:" "$1" | cut -d ':' -f2
+++ cut -d : -f2
+++ grep '^[ 	]*Maintainer:' ./dune-pargm/dune.module
++ echo gabbml@studi.informatik.uni-stuttgart.de
+ local main=gabbml@studi.informatik.uni-stuttgart.de
canonicalpath "$1"
++ canonicalpath ./dune-pargm/dune.module
++ test 1 -ne 1
canonicalname "$1"
+++ canonicalname ./dune-pargm/dune.module
+++ test 1 -ne 1
eval echo $1
++++ eval echo ./dune-pargm/dune.module
echo ./dune-pargm/dune.module
+++++ echo ./dune-pargm/dune.module
+++ file=./dune-pargm/dune.module
+++ test '!' -e ./dune-pargm/dune.module
+++ test -L ./dune-pargm/dune.module
+++ test -f ./dune-pargm/dune.module
dirname "$file"
++++ dirname ./dune-pargm/dune.module
+++ fdir=./dune-pargm
basename "$file"
++++ basename ./dune-pargm/dune.module
+++ fname=dune.module
canonicalname "$fdir"
++++ canonicalname ./dune-pargm
++++ test 1 -ne 1
eval echo $1
+++++ eval echo ./dune-pargm
echo ./dune-pargm
++++++ echo ./dune-pargm
++++ file=./dune-pargm
++++ test '!' -e ./dune-pargm
++++ test -L ./dune-pargm
++++ test -f ./dune-pargm
++++ test -d ./dune-pargm
++++ cd ./dune-pargm
++++ pwd
+++ fdir=/export/home/navi/workspace/dune-pargm
+++ echo /export/home/navi/workspace/dune-pargm/dune.module
+++ test -d ./dune-pargm/dune.module
++ dirname /export/home/navi/workspace/dune-pargm/dune.module
+ local path=/export/home/navi/workspace/dune-pargm
+ test -f /export/home/navi/workspace/dune-pargm/../../../lib/dunecontrol/dune-pargm/dune.module
+ export INST_dune_pargm=no
+ INST_dune_pargm=no
+ check_modname dune_pargm
+ sh -c =huhu
+ return 0
eval echo \$HAVE_$module
++ eval echo '$HAVE_dune_pargm'
echo $HAVE_dune_pargm
+++ echo
+ test x '!=' x
+ export HAVE_dune_pargm=yes
+ HAVE_dune_pargm=yes
+ export PATH_dune_pargm=/export/home/navi/workspace/dune-pargm
+ PATH_dune_pargm=/export/home/navi/workspace/dune-pargm
+ export VERS_dune_pargm=rc1
+ VERS_dune_pargm=rc1
+ export NAME_dune_pargm=dune-pargm
+ NAME_dune_pargm=dune-pargm
+ export MAIN_dune_pargm=gabbml@studi.informatik.uni-stuttgart.de
+ MAIN_dune_pargm=gabbml@studi.informatik.uni-stuttgart.de
+ export 'DEPS_dune_pargm=dune-common dune-grid'
+ DEPS_dune_pargm='dune-common dune-grid'
+ for name in '$deps'
fix_variable_name $name
++ fix_variable_name dune-common
++ tr '[:punct:]' '[_*]'
++ echo -n dune-common
+ mod=dune_common
+ export NAME_dune_common=dune-common
+ NAME_dune_common=dune-common
+ for name in '$deps'
fix_variable_name $name
++ fix_variable_name dune-grid
++ echo -n dune-grid
++ tr '[:punct:]' '[_*]'
+ mod=dune_grid
+ export NAME_dune_grid=dune-grid
+ NAME_dune_grid=dune-grid
+ export SUGS_dune_pargm=
+ SUGS_dune_pargm=
+ test -n ''
+ export 'MODULES=dune_grid dune_common dune_pargm '
+ MODULES='dune_grid dune_common dune_pargm '
+ read m
+ read dir
+ export 'FOUND_MODULES=dune_grid dune_common dune_pargm '
+ FOUND_MODULES='dune_grid dune_common dune_pargm '
+ test x '!=' x
+ sort_modules dune_grid dune_common dune_pargm
+ export SORTEDMODULES=
+ SORTEDMODULES=
+ for m in '"$@"'
eval echo \$HAVE_$m
++ eval echo '$HAVE_dune_grid'
echo $HAVE_dune_grid
+++ echo yes
+ test xyes '!=' x
+ _sort_module dune_grid
+ local module=dune_grid
+ local modname=
+ eval 'modname=$NAME_dune_grid'
modname=$NAME_dune_grid
++ modname=dune-grid
+ local deps=
+ local name=
+ local dep=
+ local ver=
+ local depver=
+ local xdeps=
+ shift 1
+ check_modname dune_grid
+ sh -c =huhu
+ return 0
eval echo \$SORT_DONE_${module}
++ eval echo '$SORT_DONE_dune_grid'
echo $SORT_DONE_dune_grid
+++ echo
+ test x '!=' xyes
+ eval 'deps=$DEPS_dune_grid'
deps=$DEPS_dune_grid
++ deps='dune-common (>= 1.2)'
echo "$deps" | sed 's/^ *//'
++ echo 'dune-common (>= 1.2)'
++ sed 's/^ *//'
+ deps='dune-common (>= 1.2)'
+ test -n 'dune-common (>= 1.2)'
+ name=dune-common
echo "$deps" | sed 's/^[^ (,]* *//'
++ sed 's/^[^ (,]* *//'
++ echo 'dune-common (>= 1.2)'
+ deps='(>= 1.2)'
+ case "$deps" in
+ deps='>= 1.2)'
+ depver='>= 1.2'
+ deps=
echo "$deps" | sed 's/^[, ]*//'
++ sed 's/^[, ]*//'
++ echo ''
+ deps=
fix_variable_name $name
++ fix_variable_name dune-common
++ tr '[:punct:]' '[_*]'
++ echo -n dune-common
+ dep=dune_common
+ check_modname dune_common
+ sh -c =huhu
+ return 0
eval echo \$HAVE_$dep
++ eval echo '$HAVE_dune_common'
echo $HAVE_dune_common
+++ echo yes
+ test xyes '!=' x
+ eval 'ver=$VERS_dune_common'
ver=$VERS_dune_common
++ ver=1.2svn
+ check_version 1.2svn '>= 1.2'
+ test -z '>= 1.2'
+ local v=1.2svn
+ local 'PATTERN=^ *\([<>=]*\) *\([0-9.]*\)\(.*\)$'
echo "$2" | sed -e "s/$PATTERN/x/"
++ sed -e 's/^ *\([<>=]*\) *\([0-9.]*\)\(.*\)$/x/'
++ echo '>= 1.2'
+ test x '!=' x
echo "$2" | sed -e "s/$PATTERN/\1/"
++ sed -e 's/^ *\([<>=]*\) *\([0-9.]*\)\(.*\)$/\1/'
++ echo '>= 1.2'
+ local 'op=>='
echo "$2" | sed -e "s/$PATTERN/\2/"
++ sed -e 's/^ *\([<>=]*\) *\([0-9.]*\)\(.*\)$/\2/'
++ echo '>= 1.2'
+ local v2=1.2
echo "$2" | sed -e "s/$PATTERN/\3/" -e 's/ //g'
++ sed -e 's/^ *\([<>=]*\) *\([0-9.]*\)\(.*\)$/\3/' -e 's/ //g'
++ echo '>= 1.2'
+ local rest=
+ local result=1
compare_versions $v $v2
++ compare_versions 1.2svn 1.2
++ local v1=1.2svn
++ local v2=1.2
++ for i in 1 2 3
++ compare_sub_version 1.2svn 1.2 1
get_sub_version $1 $3
+++ get_sub_version 1.2svn 1
+++ sed 's/[^0-9].*$//;s/^$/0/'
+++ cut -d. -f1
+++ echo 1.2svn
++ local sub1=1
get_sub_version $2 $3
+++ get_sub_version 1.2 1
+++ sed 's/[^0-9].*$//;s/^$/0/'
+++ cut -d. -f1
+++ echo 1.2
++ local sub2=1
++ test 1 -gt 1
++ test 1 -lt 1
++ return 0
++ for i in 1 2 3
++ compare_sub_version 1.2svn 1.2 2
get_sub_version $1 $3
+++ get_sub_version 1.2svn 2
+++ sed 's/[^0-9].*$//;s/^$/0/'
+++ cut -d. -f2
+++ echo 1.2svn
++ local sub1=2
get_sub_version $2 $3
+++ get_sub_version 1.2 2
+++ sed 's/[^0-9].*$//;s/^$/0/'
+++ cut -d. -f2
+++ echo 1.2
++ local sub2=2
++ test 2 -gt 2
++ test 2 -lt 2
++ return 0
++ for i in 1 2 3
++ compare_sub_version 1.2svn 1.2 3
get_sub_version $1 $3
+++ get_sub_version 1.2svn 3
+++ sed 's/[^0-9].*$//;s/^$/0/'
+++ cut -d. -f3
+++ echo 1.2svn
++ local sub1=0
get_sub_version $2 $3
+++ get_sub_version 1.2 3
+++ sed 's/[^0-9].*$//;s/^$/0/'
+++ cut -d. -f3
+++ echo 1.2
++ local sub2=0
++ test 0 -gt 0
++ test 0 -lt 0
++ return 0
++ echo eq
+ local rel=eq
+ case $rel$op in
+ result=0
+ test -z ''
+ return 0
+ _sort_module dune_common
+ local module=dune_common
+ local modname=
+ eval 'modname=$NAME_dune_common'
modname=$NAME_dune_common
++ modname=dune-common
+ local deps=
+ local name=
+ local dep=
+ local ver=
+ local depver=
+ local xdeps=
+ shift 1
+ check_modname dune_common
+ sh -c =huhu
+ return 0
eval echo \$SORT_DONE_${module}
++ eval echo '$SORT_DONE_dune_common'
echo $SORT_DONE_dune_common
+++ echo
+ test x '!=' xyes
+ eval 'deps=$DEPS_dune_common'
deps=$DEPS_dune_common
++ deps=
echo "$deps" | sed 's/^ *//'
++ sed 's/^ *//'
++ echo ''
+ deps=
+ test -n ''
eval "echo \$SUGS_$module"
++ eval 'echo $SUGS_dune_common'
echo $SUGS_dune_common
+++ echo
+ export SORT_DONE_dune_common=yes
+ SORT_DONE_dune_common=yes
+ export 'SORTEDMODULES= dune_common'
+ SORTEDMODULES=' dune_common'
+ test -n ''
eval "echo \$SUGS_$module"
++ eval 'echo $SUGS_dune_grid'
echo $SUGS_dune_grid
+++ echo UG Alberta Alu3d
+ for name in '$(eval "echo \$SUGS_$module")'
fix_variable_name $name
++ fix_variable_name UG
++ tr '[:punct:]' '[_*]'
++ echo -n UG
+ dep=UG
+ check_modname UG
+ sh -c =huhu
+ return 0
eval echo \$HAVE_$dep
++ eval echo '$HAVE_UG'
echo $HAVE_UG
+++ echo
+ test x '!=' x
+ for name in '$(eval "echo \$SUGS_$module")'
fix_variable_name $name
++ fix_variable_name Alberta
++ tr '[:punct:]' '[_*]'
++ echo -n Alberta
+ dep=Alberta
+ check_modname Alberta
+ sh -c =huhu
+ return 0
eval echo \$HAVE_$dep
++ eval echo '$HAVE_Alberta'
echo $HAVE_Alberta
+++ echo
+ test x '!=' x
+ for name in '$(eval "echo \$SUGS_$module")'
fix_variable_name $name
++ fix_variable_name Alu3d
++ echo -n Alu3d
++ tr '[:punct:]' '[_*]'
+ dep=Alu3d
+ check_modname Alu3d
+ sh -c =huhu
+ return 0
eval echo \$HAVE_$dep
++ eval echo '$HAVE_Alu3d'
echo $HAVE_Alu3d
+++ echo
+ test x '!=' x
+ export SORT_DONE_dune_grid=yes
+ SORT_DONE_dune_grid=yes
+ export 'SORTEDMODULES= dune_common dune_grid'
+ SORTEDMODULES=' dune_common dune_grid'
+ for m in '"$@"'
eval echo \$HAVE_$m
++ eval echo '$HAVE_dune_common'
echo $HAVE_dune_common
+++ echo yes
+ test xyes '!=' x
+ _sort_module dune_common
+ local module=dune_common
+ local modname=
+ eval 'modname=$NAME_dune_common'
modname=$NAME_dune_common
++ modname=dune-common
+ local deps=
+ local name=
+ local dep=
+ local ver=
+ local depver=
+ local xdeps=
+ shift 1
+ check_modname dune_common
+ sh -c =huhu
+ return 0
eval echo \$SORT_DONE_${module}
++ eval echo '$SORT_DONE_dune_common'
echo $SORT_DONE_dune_common
+++ echo yes
+ test xyes '!=' xyes
+ for m in '"$@"'
eval echo \$HAVE_$m
++ eval echo '$HAVE_dune_pargm'
echo $HAVE_dune_pargm
+++ echo yes
+ test xyes '!=' x
+ _sort_module dune_pargm
+ local module=dune_pargm
+ local modname=
+ eval 'modname=$NAME_dune_pargm'
modname=$NAME_dune_pargm
++ modname=dune-pargm
+ local deps=
+ local name=
+ local dep=
+ local ver=
+ local depver=
+ local xdeps=
+ shift 1
+ check_modname dune_pargm
+ sh -c =huhu
+ return 0
eval echo \$SORT_DONE_${module}
++ eval echo '$SORT_DONE_dune_pargm'
echo $SORT_DONE_dune_pargm
+++ echo
+ test x '!=' xyes
+ eval 'deps=$DEPS_dune_pargm'
deps=$DEPS_dune_pargm
++ deps='dune-common dune-grid'
echo "$deps" | sed 's/^ *//'
++ sed 's/^ *//'
++ echo 'dune-common dune-grid'
+ deps='dune-common dune-grid'
+ test -n 'dune-common dune-grid'
+ name=dune-common
echo "$deps" | sed 's/^[^ (,]* *//'
++ sed 's/^[^ (,]* *//'
++ echo 'dune-common dune-grid'
+ deps=dune-grid
+ case "$deps" in
+ depver=
echo "$deps" | sed 's/^[, ]*//'
++ sed 's/^[, ]*//'
++ echo dune-grid
+ deps=dune-grid
fix_variable_name $name
++ fix_variable_name dune-common
++ tr '[:punct:]' '[_*]'
++ echo -n dune-common
+ dep=dune_common
+ check_modname dune_common
+ sh -c =huhu
+ return 0
eval echo \$HAVE_$dep
++ eval echo '$HAVE_dune_common'
echo $HAVE_dune_common
+++ echo yes
+ test xyes '!=' x
+ eval 'ver=$VERS_dune_common'
ver=$VERS_dune_common
++ ver=1.2svn
+ check_version 1.2svn ''
+ test -z ''
+ return 0
+ _sort_module dune_common
+ local module=dune_common
+ local modname=
+ eval 'modname=$NAME_dune_common'
modname=$NAME_dune_common
++ modname=dune-common
+ local deps=
+ local name=
+ local dep=
+ local ver=
+ local depver=
+ local xdeps=
+ shift 1
+ check_modname dune_common
+ sh -c =huhu
+ return 0
eval echo \$SORT_DONE_${module}
++ eval echo '$SORT_DONE_dune_common'
echo $SORT_DONE_dune_common
+++ echo yes
+ test xyes '!=' xyes
+ test -n dune-grid
+ name=dune-grid
echo "$deps" | sed 's/^[^ (,]* *//'
++ sed 's/^[^ (,]* *//'
++ echo dune-grid
+ deps=
+ case "$deps" in
+ depver=
echo "$deps" | sed 's/^[, ]*//'
++ echo ''
++ sed 's/^[, ]*//'
+ deps=
fix_variable_name $name
++ fix_variable_name dune-grid
++ tr '[:punct:]' '[_*]'
++ echo -n dune-grid
+ dep=dune_grid
+ check_modname dune_grid
+ sh -c =huhu
+ return 0
eval echo \$HAVE_$dep
++ eval echo '$HAVE_dune_grid'
echo $HAVE_dune_grid
+++ echo yes
+ test xyes '!=' x
+ eval 'ver=$VERS_dune_grid'
ver=$VERS_dune_grid
++ ver=1.2svn
+ check_version 1.2svn ''
+ test -z ''
+ return 0
+ _sort_module dune_grid
+ local module=dune_grid
+ local modname=
+ eval 'modname=$NAME_dune_grid'
modname=$NAME_dune_grid
++ modname=dune-grid
+ local deps=
+ local name=
+ local dep=
+ local ver=
+ local depver=
+ local xdeps=
+ shift 1
+ check_modname dune_grid
+ sh -c =huhu
+ return 0
eval echo \$SORT_DONE_${module}
++ eval echo '$SORT_DONE_dune_grid'
echo $SORT_DONE_dune_grid
+++ echo yes
+ test xyes '!=' xyes
+ test -n ''
eval "echo \$SUGS_$module"
++ eval 'echo $SUGS_dune_pargm'
echo $SUGS_dune_pargm
+++ echo
+ export SORT_DONE_dune_pargm=yes
+ SORT_DONE_dune_pargm=yes
+ export 'SORTEDMODULES= dune_common dune_grid dune_pargm'
+ SORTEDMODULES=' dune_common dune_grid dune_pargm'
+ export 'MODULES= dune_common dune_grid dune_pargm'
+ MODULES=' dune_common dune_grid dune_pargm'
+ for m in '$MODULES'
+ export SORT_DONE_dune_common=
+ SORT_DONE_dune_common=
+ for m in '$MODULES'
+ export SORT_DONE_dune_grid=
+ SORT_DONE_dune_grid=
+ for m in '$MODULES'
+ export SORT_DONE_dune_pargm=
+ SORT_DONE_dune_pargm=
+ test x '!=' x
+ NAMES=
+ BUILDMODULES=
+ for mod in '$MODULES'
eval echo \$INST_$mod
++ eval echo '$INST_dune_common'
echo $INST_dune_common
+++ echo no
+ test no '!=' yes
eval echo \$NAME_$mod
++ eval echo '$NAME_dune_common'
echo $NAME_dune_common
+++ echo dune-common
+ NAMES='dune-common '
+ BUILDMODULES='dune_common '
+ for mod in '$MODULES'
eval echo \$INST_$mod
++ eval echo '$INST_dune_grid'
echo $INST_dune_grid
+++ echo no
+ test no '!=' yes
eval echo \$NAME_$mod
++ eval echo '$NAME_dune_grid'
echo $NAME_dune_grid
+++ echo dune-grid
+ NAMES='dune-common dune-grid '
+ BUILDMODULES='dune_common dune_grid '
+ for mod in '$MODULES'
eval echo \$INST_$mod
++ eval echo '$INST_dune_pargm'
echo $INST_dune_pargm
+++ echo no
+ test no '!=' yes
eval echo \$NAME_$mod
++ eval echo '$NAME_dune_pargm'
echo $NAME_dune_pargm
+++ echo dune-pargm
+ NAMES='dune-common dune-grid dune-pargm '
+ BUILDMODULES='dune_common dune_grid dune_pargm '
+ echo '--- going to build dune-common dune-grid dune-pargm  ---'
--- going to build dune-common dune-grid dune-pargm  ---
+ build_modules all dune_common dune_grid dune_pargm
+ local command=all
+ shift
+ local runcommand=run_all
+ modules='dune_common dune_grid dune_pargm'
+ for module in '$modules'
eval "echo \$PATH_${module}"
++ eval 'echo $PATH_dune_common'
echo $PATH_dune_common
+++ echo /export/home/navi/workspace/dune-common
+ local path=/export/home/navi/workspace/dune-common
+ eval echo '--- calling all for $NAME_dune_common ---'
echo --- calling all for $NAME_dune_common ---
++ echo --- calling all for dune-common ---
--- calling all for dune-common ---
+ set -e
+ cd /export/home/navi/workspace/dune-common
+ export module
+ eval_control run_all /export/home/navi/workspace/dune-common/dune.module
+ local command=run_all
+ local file=/export/home/navi/workspace/dune-common/dune.module
+ shift 2
+ test -f /export/home/navi/workspace/dune-common/dune.module
+ set -e
$GREP -v "^[$ALNUM]\{1,\}:" $file
++ grep -v '^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789]\{1,\}:' /export/home/navi/workspace/dune-common/dune.module
+ eval ''
+ run_all
+ run_default_all
+ for cmd in autogen configure make
+ eval echo '--- calling autogen for $NAME_dune_common ---'
echo --- calling autogen for $NAME_dune_common ---
++ echo --- calling autogen for dune-common ---
--- calling autogen for dune-common ---
+ load_opts autogen
+ local command=autogen
echo $command | tr '[:lower:]' '[:upper:]'
++ tr '[:lower:]' '[:upper:]'
++ echo autogen
+ local COMMAND=AUTOGEN
eval echo \$${COMMAND}_FLAGS
++ eval echo '$AUTOGEN_FLAGS'
echo $AUTOGEN_FLAGS
+++ echo
+ CMD_FLAGS=
+ local CMD_FLAGS_FROM_FILE=
+ test x/export/home/navi/workspace/build.opts '!=' x
eval ${COMMAND}_FLAGS=""; . $DUNE_OPTS_FILE; eval echo \$${COMMAND}_FLAGS
++ eval AUTOGEN_FLAGS=
AUTOGEN_FLAGS=
+++ AUTOGEN_FLAGS=
++ . /export/home/navi/workspace/build.opts
CONFIGURE_FLAGS="--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx"
+++ CONFIGURE_FLAGS='--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx'
++ eval echo '$AUTOGEN_FLAGS'
echo $AUTOGEN_FLAGS
+++ echo
+ CMD_FLAGS_FROM_FILE=
+ test -n ''
+ test -n ''
+ run_autogen
+ run_default_autogen
+ PARAMS=
+ local M4_PATH=
+ test -f configure.ac
+ test -d .svn
+ for m in '$FOUND_MODULES'
eval "echo \$PATH_$m"
++ eval 'echo $PATH_dune_grid'
echo $PATH_dune_grid
+++ echo /export/home/navi/workspace/dune-grid
+ path=/export/home/navi/workspace/dune-grid
+ MODULE_PATHS='/export/home/navi/workspace/dune-grid '
+ for m in '$FOUND_MODULES'
eval "echo \$PATH_$m"
++ eval 'echo $PATH_dune_common'
echo $PATH_dune_common
+++ echo /export/home/navi/workspace/dune-common
+ path=/export/home/navi/workspace/dune-common
+ MODULE_PATHS='/export/home/navi/workspace/dune-grid /export/home/navi/workspace/dune-common '
+ for m in '$FOUND_MODULES'
eval "echo \$PATH_$m"
++ eval 'echo $PATH_dune_pargm'
echo $PATH_dune_pargm
+++ echo /export/home/navi/workspace/dune-pargm
+ path=/export/home/navi/workspace/dune-pargm
+ MODULE_PATHS='/export/home/navi/workspace/dune-grid /export/home/navi/workspace/dune-common /export/home/navi/workspace/dune-pargm '
+ test -f autogen.sh
+ eval /export/home/navi/workspace/dune-common/bin/dune-autogen '/export/home/navi/workspace/dune-grid /export/home/navi/workspace/dune-common /export/home/navi/workspace/dune-pargm ' ''
/export/home/navi/workspace/dune-common/bin/dune-autogen /export/home/navi/workspace/dune-grid /export/home/navi/workspace/dune-common /export/home/navi/workspace/dune-pargm  
++ /export/home/navi/workspace/dune-common/bin/dune-autogen /export/home/navi/workspace/dune-grid /export/home/navi/workspace/dune-common /export/home/navi/workspace/dune-pargm
Found am directory /export/home/navi/workspace/dune-common/am
--> libtoolize...
Remember to add `AC_PROG_LIBTOOL' to `configure.ac'.
--> writing dependencies.m4
    for dune-common 1.2svn dune@dune-project.org
        requires 
--> aclocal...
/usr/share/aclocal/audiofile.m4:12: warning: underquoted definition of AM_PATH_AUDIOFILE
/usr/share/aclocal/audiofile.m4:12:   run info '(automake)Extending aclocal'
/usr/share/aclocal/audiofile.m4:12:   or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.ac:15: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd
dependencies.m4:28: DUNE_CHECK_MOD_DEPENDENCIES is expanded from...
/export/home/navi/workspace/dune-common/m4/dune_all.m4:47: DUNE_CHECK_ALL is expanded from...
configure.ac:15: the top level
--> autoheader...
configure.ac:15: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd
dependencies.m4:28: DUNE_CHECK_MOD_DEPENDENCIES is expanded from...
aclocal.m4:7754: DUNE_CHECK_ALL is expanded from...
configure.ac:15: the top level
--> automake...
configure.ac:15: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd
dependencies.m4:28: DUNE_CHECK_MOD_DEPENDENCIES is expanded from...
aclocal.m4:7754: DUNE_CHECK_ALL is expanded from...
configure.ac:15: the top level
doc/doxygen/Makefile.am:10: WHAT was already defined in condition TRUE, which includes condition BUILD_DOCS and WML ...
doc/doxygen/Makefile.am:6: ... `WHAT' previously defined here
am/doxygen:70: user target `html' defined here...
doc/doxygen/Makefile.am:22:   `am/doxygen' included from here
automake: ... overrides Automake target `html' defined here
am/doxygen:70: consider using html-local instead of html
doc/doxygen/Makefile.am:22:   `am/doxygen' included from here
--> autoconf...
configure.ac:15: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd
dependencies.m4:28: DUNE_CHECK_MOD_DEPENDENCIES is expanded from...
aclocal.m4:7754: DUNE_CHECK_ALL is expanded from...
configure.ac:15: the top level
Now run ./configure to setup dune-common
+ for cmd in autogen configure make
+ eval echo '--- calling configure for $NAME_dune_common ---'
echo --- calling configure for $NAME_dune_common ---
++ echo --- calling configure for dune-common ---
--- calling configure for dune-common ---
+ load_opts configure
+ local command=configure
echo $command | tr '[:lower:]' '[:upper:]'
++ echo configure
++ tr '[:lower:]' '[:upper:]'
+ local COMMAND=CONFIGURE
eval echo \$${COMMAND}_FLAGS
++ eval echo '$CONFIGURE_FLAGS'
echo $CONFIGURE_FLAGS
+++ echo
+ CMD_FLAGS=
+ local CMD_FLAGS_FROM_FILE=
+ test x/export/home/navi/workspace/build.opts '!=' x
eval ${COMMAND}_FLAGS=""; . $DUNE_OPTS_FILE; eval echo \$${COMMAND}_FLAGS
++ eval CONFIGURE_FLAGS=
CONFIGURE_FLAGS=
+++ CONFIGURE_FLAGS=
++ . /export/home/navi/workspace/build.opts
CONFIGURE_FLAGS="--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx"
+++ CONFIGURE_FLAGS='--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx'
++ eval echo '$CONFIGURE_FLAGS'
echo $CONFIGURE_FLAGS
+++ echo --enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx
+ CMD_FLAGS_FROM_FILE='--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx'
+ test -n '--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx'
+ echo '----- using default flags $CONFIGURE_FLAGS from /export/home/navi/workspace/build.opts -----'
----- using default flags $CONFIGURE_FLAGS from /export/home/navi/workspace/build.opts -----
+ CMD_FLAGS='--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx'
+ run_configure
+ run_default_configure
+ PARAMS='--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx'
+ test -x configure
+ ACLOCAL_FLAGS='-I .'
+ for m in '$FOUND_MODULES'
eval "echo \$PATH_$m"
++ eval 'echo $PATH_dune_grid'
echo $PATH_dune_grid
+++ echo /export/home/navi/workspace/dune-grid
+ path=/export/home/navi/workspace/dune-grid
eval "echo \$NAME_$m"
++ eval 'echo $NAME_dune_grid'
echo $NAME_dune_grid
+++ echo dune-grid
+ name=dune-grid
+ test -d /export/home/navi/workspace/dune-grid/m4
+ ACLOCAL_FLAGS='-I . -I /export/home/navi/workspace/dune-grid/m4'
+ test -d /export/home/navi/workspace/dune-grid/share/aclocal
+ PARAMS='--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx "--with-dune-grid=/export/home/navi/workspace/dune-grid"'
+ for m in '$FOUND_MODULES'
eval "echo \$PATH_$m"
++ eval 'echo $PATH_dune_common'
echo $PATH_dune_common
+++ echo /export/home/navi/workspace/dune-common
+ path=/export/home/navi/workspace/dune-common
eval "echo \$NAME_$m"
++ eval 'echo $NAME_dune_common'
echo $NAME_dune_common
+++ echo dune-common
+ name=dune-common
+ test -d /export/home/navi/workspace/dune-common/m4
+ ACLOCAL_FLAGS='-I . -I /export/home/navi/workspace/dune-grid/m4 -I /export/home/navi/workspace/dune-common/m4'
+ test -d /export/home/navi/workspace/dune-common/share/aclocal
+ PARAMS='--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx "--with-dune-grid=/export/home/navi/workspace/dune-grid" "--with-dune-common=/export/home/navi/workspace/dune-common"'
+ for m in '$FOUND_MODULES'
eval "echo \$PATH_$m"
++ eval 'echo $PATH_dune_pargm'
echo $PATH_dune_pargm
+++ echo /export/home/navi/workspace/dune-pargm
+ path=/export/home/navi/workspace/dune-pargm
eval "echo \$NAME_$m"
++ eval 'echo $NAME_dune_pargm'
echo $NAME_dune_pargm
+++ echo dune-pargm
+ name=dune-pargm
+ test -d /export/home/navi/workspace/dune-pargm/m4
+ ACLOCAL_FLAGS='-I . -I /export/home/navi/workspace/dune-grid/m4 -I /export/home/navi/workspace/dune-common/m4 -I /export/home/navi/workspace/dune-pargm/m4'
+ test -d /export/home/navi/workspace/dune-pargm/share/aclocal
+ PARAMS='--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx "--with-dune-grid=/export/home/navi/workspace/dune-grid" "--with-dune-common=/export/home/navi/workspace/dune-common" "--with-dune-pargm=/export/home/navi/workspace/dune-pargm"'
+ PARAMS='--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx "--with-dune-grid=/export/home/navi/workspace/dune-grid" "--with-dune-common=/export/home/navi/workspace/dune-common" "--with-dune-pargm=/export/home/navi/workspace/dune-pargm" ACLOCAL_AMFLAGS="-I . -I /export/home/navi/workspace/dune-grid/m4 -I /export/home/navi/workspace/dune-common/m4 -I /export/home/navi/workspace/dune-pargm/m4"'
+ echo ./configure '--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx "--with-dune-grid=/export/home/navi/workspace/dune-grid" "--with-dune-common=/export/home/navi/workspace/dune-common" "--with-dune-pargm=/export/home/navi/workspace/dune-pargm" ACLOCAL_AMFLAGS="-I . -I /export/home/navi/workspace/dune-grid/m4 -I /export/home/navi/workspace/dune-common/m4 -I /export/home/navi/workspace/dune-pargm/m4"'
./configure --enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx "--with-dune-grid=/export/home/navi/workspace/dune-grid" "--with-dune-common=/export/home/navi/workspace/dune-common" "--with-dune-pargm=/export/home/navi/workspace/dune-pargm" ACLOCAL_AMFLAGS="-I . -I /export/home/navi/workspace/dune-grid/m4 -I /export/home/navi/workspace/dune-common/m4 -I /export/home/navi/workspace/dune-pargm/m4"
+ eval ./configure '--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx "--with-dune-grid=/export/home/navi/workspace/dune-grid" "--with-dune-common=/export/home/navi/workspace/dune-common" "--with-dune-pargm=/export/home/navi/workspace/dune-pargm" ACLOCAL_AMFLAGS="-I . -I /export/home/navi/workspace/dune-grid/m4 -I /export/home/navi/workspace/dune-common/m4 -I /export/home/navi/workspace/dune-pargm/m4"'
./configure --enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx "--with-dune-grid=/export/home/navi/workspace/dune-grid" "--with-dune-common=/export/home/navi/workspace/dune-common" "--with-dune-pargm=/export/home/navi/workspace/dune-pargm" ACLOCAL_AMFLAGS="-I . -I /export/home/navi/workspace/dune-grid/m4 -I /export/home/navi/workspace/dune-common/m4 -I /export/home/navi/workspace/dune-pargm/m4"
++ ./configure --enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx --with-dune-grid=/export/home/navi/workspace/dune-grid --with-dune-common=/export/home/navi/workspace/dune-common --with-dune-pargm=/export/home/navi/workspace/dune-pargm 'ACLOCAL_AMFLAGS=-I . -I /export/home/navi/workspace/dune-grid/m4 -I /export/home/navi/workspace/dune-common/m4 -I /export/home/navi/workspace/dune-pargm/m4'
awk: syntax error near line 1
awk: bailing out near line 1
awk: syntax error near line 1
awk: bailing out near line 1
awk: syntax error near line 1
awk: bailing out near line 1
./configure[2054]: LT_INIT: not found [No such file or directory]
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether ln -s works... yes
HOSTID:
./configure[2742]: PKG_PROG_PKG_CONFIG: not found [No such file or directory]
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking whether we are using the GNU C++ compiler... yes
checking whether mpicxx accepts -g... yes
checking dependency style of mpicxx... gcc3
checking how to run the C++ preprocessor... mpicxx -E
checking build system type... i386-pc-solaris2.11
checking host system type... i386-pc-solaris2.11
checking for a sed that does not truncate output... /usr/bin/gsed
checking for grep that handles long lines and -e... /usr/bin/ggrep
checking for egrep... /usr/bin/ggrep -E
checking for ld used by gcc... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for /usr/ccs/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -p
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... mpicxx -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 262144
checking command to parse /usr/bin/nm -p output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.11 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by mpicxx... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking whether the mpicxx linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking for mpicxx option to produce PIC... -fPIC
checking if mpicxx PIC flag -fPIC works... yes
checking if mpicxx static flag -static works... no
checking if mpicxx supports -c -o file.o... yes
checking whether the mpicxx linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.11 ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 static flag -static works... no
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.11 ld.so
checking how to hardcode library paths into programs... immediate
checking for ranlib... (cached) ranlib
checking whether g++ accepts -std=c++0x... no
checking whether static_assert is supported... no
checking whether nullptr is supported... no
checking whether compiling C++ code works... yes
checking whether linking C++ objects works... yes
checking for __attribute__((deprecated))... yes
checking rpc/rpc.h usability... yes
checking rpc/rpc.h presence... yes
checking for rpc/rpc.h... yes
checking for mpicc... mpicc
checking for MPI_Init... yes
checking for mpi.h... yes
configure: Trying to identify the version of MPI compiler mpicc
checking for lam... no
checking for mpich... grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
no
checking for OpenMPI... grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
no
checking for MVAPICH... no
checking for mpich2... yes
checking whether compiling with MPICH2 works... yes
configure: WARNING: Diabled test whether running with MPICH2 works.
checking for MPI_Finalized in -lm... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for inkscape... no
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for string.h... (cached) yes
checking type_traits usability... no
checking type_traits presence... no
checking for type_traits... no
checking tr1/type_traits usability... no
checking tr1/type_traits presence... no
checking for tr1/type_traits... no
checking array usability... no
checking array presence... no
checking for array... no
checking tr1/array usability... no
checking tr1/array presence... no
checking for tr1/array... no
checking tuple usability... no
checking tuple presence... no
checking for tuple... no
checking tr1/tuple usability... no
checking tr1/tuple presence... no
checking for tr1/tuple... no
checking for pow in -lm... yes
checking for sqrt... yes
checking for strchr... yes
checking for doxygen... no
checking for latex... no
checking for bibtex... no
checking for dvipdf... dvipdf
checking for dvips... no
checking for wml... no
checking for perl... perl
checking for convert... convert
checking for ld used by mpicxx... (cached) /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... (cached) no
checking whether the mpicxx linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking for mpicxx option to produce PIC... -fPIC
checking if mpicxx PIC flag -fPIC works... (cached) yes
checking if mpicxx static flag -static works... (cached) no
checking if mpicxx supports -c -o file.o... (cached) yes
checking whether the mpicxx linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.11 ld.so
checking how to hardcode library paths into programs... immediate
./configure[25733]: LT_OUTPUT: not found [No such file or directory]
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating bin/Makefile
config.status: creating common/Makefile
config.status: creating common/test/Makefile
config.status: creating common/exprtmpl/Makefile
config.status: creating doc/Makefile
config.status: creating doc/devel/Makefile
config.status: creating doc/layout/Makefile
config.status: creating doc/doxygen/Makefile
config.status: creating doc/doxygen/Doxyfile
config.status: creating doc/buildsystem/Makefile
config.status: creating m4/Makefile
config.status: creating am/Makefile
config.status: creating bin/wmlwrap
config.status: creating bin/check-log-store
config.status: creating dune-common.pc
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

Found the following Dune-components: 

-----------------------------

MPI..............: yes (MPICH2)

-----------------------------

See ./configure --help and config.log for reasons why a component wasn't found


Note: Most of the libraries checked for above are only used for the self-test
of Dune. The library itself will build and the headers will work even if
ALBERTA, MPI, etc. cannot be found. An exception to this are UG and AmiraMesh
which need to be found right now if you want to use them later.

+ for cmd in autogen configure make
+ eval echo '--- calling make for $NAME_dune_common ---'
echo --- calling make for $NAME_dune_common ---
++ echo --- calling make for dune-common ---
--- calling make for dune-common ---
+ load_opts make
+ local command=make
echo $command | tr '[:lower:]' '[:upper:]'
++ echo make
++ tr '[:lower:]' '[:upper:]'
+ local COMMAND=MAKE
eval echo \$${COMMAND}_FLAGS
++ eval echo '$MAKE_FLAGS'
echo $MAKE_FLAGS
+++ echo
+ CMD_FLAGS=
+ local CMD_FLAGS_FROM_FILE=
+ test x/export/home/navi/workspace/build.opts '!=' x
eval ${COMMAND}_FLAGS=""; . $DUNE_OPTS_FILE; eval echo \$${COMMAND}_FLAGS
++ eval MAKE_FLAGS=
MAKE_FLAGS=
+++ MAKE_FLAGS=
++ . /export/home/navi/workspace/build.opts
CONFIGURE_FLAGS="--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx"
+++ CONFIGURE_FLAGS='--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx'
++ eval echo '$MAKE_FLAGS'
echo $MAKE_FLAGS
+++ echo
+ CMD_FLAGS_FROM_FILE=
+ test -n ''
+ test -n ''
+ run_make
+ run_default_make
+ PARAMS=
+ echo make ''
make 
+ eval make ''
make 
++ make
cd . && /bin/sh /export/home/navi/workspace/dune-common/missing --run autoheader
configure.ac:15: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd
dependencies.m4:28: DUNE_CHECK_MOD_DEPENDENCIES is expanded from...
aclocal.m4:7754: DUNE_CHECK_ALL is expanded from...
configure.ac:15: the top level
rm -f stamp-h1
touch config.h.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make  all-recursive
Making all in common
Making all in .
Making all in test
Making all in exprtmpl
Making all in lib
Making all in doc
Making all in devel
Making all in doxygen
make: Fatal error in reader: Makefile, line 489: Extra `:', `::', or `:=' on dependency line
Current working directory /export/home/navi/workspace/dune-common/doc/doxygen
*** Error code 1
The following command caused the error:
failcom='exit 1'; \
for f in x $MAKEFLAGS; do \
  case $f in \
    *=* | --[!k]*);; \
    *k*) failcom='fail=yes';; \
  esac; \
done; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
list='devel doxygen layout buildsystem'; for subdir in $list; do \
  echo "Making $target in $subdir"; \
  if test "$subdir" = "."; then \
    dot_seen=yes; \
    local_target="$target-am"; \
  else \
    local_target="$target"; \
  fi; \
  (cd $subdir && make  $local_target) \
  || eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
  make  "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'
Current working directory /export/home/navi/workspace/dune-common/doc
*** Error code 1
The following command caused the error:
failcom='exit 1'; \
for f in x $MAKEFLAGS; do \
  case $f in \
    *=* | --[!k]*);; \
    *k*) failcom='fail=yes';; \
  esac; \
done; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
list='common lib doc bin m4 am'; for subdir in $list; do \
  echo "Making $target in $subdir"; \
  if test "$subdir" = "."; then \
    dot_seen=yes; \
    local_target="$target-am"; \
  else \
    local_target="$target"; \
  fi; \
  (cd $subdir && make  $local_target) \
  || eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
  make  "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'
Current working directory /export/home/navi/workspace/dune-common
*** Error code 1
make: Fatal error: Command failed for target `all'
+ false
+ eval echo '--- Failed to build $NAME_dune_common ---'
echo --- Failed to build $NAME_dune_common ---
++ echo --- Failed to build dune-common ---
--- Failed to build dune-common ---
+ exit 1
onfailure
+ onfailure
basename $0
++ basename ./dune-common/bin/dunecontrol
+ echo 'Execution of dunecontrol terminated due to errors!'
Execution of dunecontrol terminated due to errors!
+ exit 1
