#!/bin/sh
-fink install compface-dev
fink install libpng3
fink install libtiff
fink install libjpeg
fink install xaw3d
fink install libncurses5
fink install x11-dev
-fink install canna-dev
+
+canna_is_not_found=`fink install canna-dev | grep "Failed: no package found for specification 'canna-dev'"`
+if [ "s${canna_is_not_found}" = "s" ]
+then
+ fink install canna-shlibs
+ canna_opts='--with-canna'
+else
+ canna_opts=''
+fi
fink install x11
+fink install compface-dev
fink install compface-shlibs
fink install libpng3-shlibs
fink install libtiff-shlibs
fink install xaw3d-shlibs
fink install ncurses
fink install libncurses5-shlibs
-fink install canna-shlibs
#fink install coreutils-default
fink install wget
./configure \
--with-site-includes=/sw/include/db4:/sw/include \
- --with-site-libraries=/sw/lib \
- --with-canna
+ --with-site-libraries=/sw/lib ${canna_opts}
ulimit -n 2048