#! /bin/sh

# This script is called by the Makefile to install the Perl modules.
# As the main Makefile and the configure script don't know the details
# of the Perl installation and setup we leave it up to Perl to create
# the module Makefile and do the installation.

IB=''
ISA=''
[ "X$1" = "X" ] || IB="INSTALL_BASE=$1"
[ "X$2" != "X" ] || IB=''
[ "X$2" = "X" ] || ISA="INSTALLSITEARCH=$2"

cd perlxs
MODULES=`echo DK*`
for i in $MODULES
do
  echo Make install for $i
  if [ -d "$i" ]
  then
  cd $i
    echo Not perl Makefile.PL $IB $ISA
    # perl Makefile.PL $IB $ISA
    make install
  cd ..
  else
    echo "$i: ERROR: Not a directory"
    exit 1
  fi
done
cd ..

if [ "X$DESTDIR" != "X" ]
then
find ${DESTDIR} -name DKrause -exec ./modify_so_permissions.sh {} \;
fi


