If `canna-dev' is not found (Lion), don't specify '--with-canna'.
authortomo <tomo>
Sat, 18 Feb 2012 11:09:21 +0000 (11:09 +0000)
committertomo <tomo>
Sat, 18 Feb 2012 11:09:21 +0000 (11:09 +0000)
bootstrap.fink

index f785354..8debabf 100755 (executable)
@@ -1,6 +1,5 @@
 #!/bin/sh
 
-fink install compface-dev
 fink install libpng3
 fink install libtiff
 fink install libjpeg
@@ -8,9 +7,18 @@ fink install db48
 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
@@ -19,7 +27,6 @@ fink install db48-shlibs
 fink install xaw3d-shlibs
 fink install ncurses
 fink install libncurses5-shlibs
-fink install canna-shlibs
 
 #fink install coreutils-default
 fink install wget
@@ -27,8 +34,7 @@ fink install unzip
 
 ./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