#!/bin/sh

echo "configure dlm-kernel"
(cd dlm-kernel; ./configure $@)

echo "configure gnbd-kernel"
(cd gnbd-kernel; ./configure $@)

echo "configure magma"
(cd magma; ./configure $@)

echo "configure ccs"
(cd ccs; ./configure $@ --magmaincdir=`pwd`/../magma/lib --magmalibdir=`pwd`/../magma/lib)

echo "configure cman"
(cd cman; ./configure $@ --ccsincdir=`pwd`/../ccs/lib --ccslibdir=`pwd`/../ccs/lib)

# No config for group yet.
#echo "configure group"
#(cd group; ./configure $@)

echo "configure dlm"
(cd dlm; ./configure $@)

echo "configure fence"
(cd fence; ./configure $@ -ccslibdir=`pwd`/../ccs/lib --ccsincdir=`pwd`/../ccs/lib)

echo "configure iddev"
(cd iddev; ./configure $@)

echo "configure gulm"
(cd gulm; ./configure $@ --ccsincdir=`pwd`/../ccs/lib --ccslibdir=`pwd`/../ccs/lib)

echo "configure gfs-kernel"
(cd gfs-kernel; ./configure $@ --dlmkincdir=`pwd`/../dlm-kernel/src2)

echo "configure gfs2-kernel"
(cd gfs2-kernel; ./configure $@)

echo "configure gfs"
(cd gfs; ./configure $@ --gfskincdir=`pwd`/../gfs-kernel/src/gfs --iddevlibdir=`pwd`/../iddev/lib --iddevincdir=`pwd`/../iddev/lib)

echo "configure gfs2"
(cd gfs2; ./configure $@ --gfs2kincdir=`pwd`/../gfs2-kernel/src/gfs2 --iddevlibdir=`pwd`/../iddev/lib --iddevincdir=`pwd`/../iddev/lib)

echo "configure gnbd"
(cd gnbd; ./configure $@ --gnbdkincdir=`pwd`/../gnbd-kernel/src --magmaincdir=`pwd`/../magma/lib --magmalibdir=`pwd`/../magma/lib)

echo "configure magma-plugins"
(cd magma-plugins; ./configure $@ --magmaincdir=`pwd`/../magma/lib --gulmincdir=`pwd`/../gulm/lib --gulmlibdir=`pwd`/../gulm/lib --cmanuincdir=`pwd`/../cman/lib)

echo "configure rgmanager"
(cd rgmanager; ./configure $@ --magmaincdir=`pwd`/../magma/lib --magmalibdir=`pwd`/../magma/lib --ccsincdir=`pwd`/../ccs/lib --ccslibdir=`pwd`/../ccs/lib)

echo "configure cmirror"
(cd cmirror; ./configure $@)
