Index: /tags/ohana/base-1-0/Ohana/.cvsignore
===================================================================
--- /tags/ohana/base-1-0/Ohana/.cvsignore	(revision 21689)
+++ /tags/ohana/base-1-0/Ohana/.cvsignore	(revision 21689)
@@ -0,0 +1,7 @@
+help
+bin
+lib
+include
+man
+CVS
+Configure
Index: /tags/ohana/base-1-0/Ohana/Configure.in
===================================================================
--- /tags/ohana/base-1-0/Ohana/Configure.in	(revision 21689)
+++ /tags/ohana/base-1-0/Ohana/Configure.in	(revision 21689)
@@ -0,0 +1,33 @@
+# Configure file for Ohana Package
+#
+# this is the location of the package
+# change this to match your location of the source
+ROOT    = ROOTDIR
+ARCH    = ARCHVAL
+
+# destination directories:
+# these are the installation directories.
+# if you use a different toplevel directory than $(ROOT), you might 
+# need to copy the include files in $(ROOT)/include by hand to the destination
+LBIN	= PREFIX/bin/$(ARCH)
+LINC	= PREFIX/include/$(ARCH)
+LLIB	= PREFIX/lib/$(ARCH)
+LMAN	= PREFIX/man/man1
+LHLP	= PREFIX/help
+
+# X include and lib directories
+# put your X paths here if they are not automatically included (they
+# seem to be ok on most linux distributions)
+XINC    = XINCDIR
+XLIB    = -LXLIBDIR
+
+# prefered C compiler
+# CC = gcc -g -DOHANA_MEMORY -Wall -Werror
+CC   = gcc -g -O1
+
+# select the appropriate version of ranlib
+RANLIB-sid = ranlib
+RANLIB-sol = touch
+RANLIB-linux = ranlib
+RANLIB-lin64 = ranlib
+RANLIB = $(RANLIB-$(ARCH))
Index: /tags/ohana/base-1-0/Ohana/Makefile
===================================================================
--- /tags/ohana/base-1-0/Ohana/Makefile	(revision 21689)
+++ /tags/ohana/base-1-0/Ohana/Makefile	(revision 21689)
@@ -0,0 +1,128 @@
+# --------------------------------------------------------------------------- #
+# --------------------------------------------------------------------------- #
+#									      #
+#                 OOO    HH   HH    AAA    NN   NN    AAA		      #
+#               OO   OO  HH   HH  AA   AA  NNN  NN  AA   AA		      #
+#               OO   OO  HHHHHHH  AAAAAAA  NN N NN  AAAAAAA		      #
+#               OO   OO  HH   HH  AA   AA  NN  NNN  AA   AA		      #
+#                 OOO    HH   HH  AA   AA  NN   NN  AA   AA		      #
+#      								              #
+# --------------------------------------------------------------------------- #
+# --------------------------------------------------------------------------- #
+
+# This makefile compiles all Ohana package programs in the Elixir
+# system, and their libraries.  Most of the components in this
+# directory were created for Ohana, but there are a few libraries
+# which are from external sources: libjpeg, libpng, zlib, and
+# readline.  Extra care should be taken in compiling those libraries. 
+
+# Edit Configure to reflect the location of your installation 
+# or use the script 'configure'
+
+include Configure
+
+# .SILENT:								       
+default: all
+
+# The collection of Ohana programs.  Other components in the src
+# directory may be compiled by going to those directories. 
+PROGRAM =   \
+addstar     \
+delstar     \
+elixir      \
+gastro      \
+gastro2     \
+gcompare    \
+gophot      \
+imclean     \
+imregister  \
+kapa        \
+kii         \
+misc        \
+mosastro    \
+nightd      \
+opihi       \
+perl        \
+relphot     \
+shell       \
+tcl         \
+uniphot
+
+# any of these programs can be built with 'make (name)' 
+EXTRAS =     \
+opihi.v1    \
+addusno     \
+addrefs     \
+addspphot   \
+fixcat      \
+getstar     \
+getusno     \
+lightcurve  \
+markrock    \
+photdbc     \
+markstar    \
+mosastro.v1 \
+mosastro.v2 \
+skycalc     
+
+OLD = mana status 
+
+# Required libraries depends on the architecture
+LIBS-linux = libfits libohana libdummy
+LIBS-lin64 = libfits libohana libdummy
+LIBS-sid   = libfits libohana libdummy
+LIBS-sol   = libfits libohana
+
+# general build targets:
+libs:
+	@if [ "$(ARCH)" = "" ]; then echo ""; echo " *** please define ARCH ***"; echo; exit 1; fi
+	@if [ "$(LIBS-$(ARCH))" = "" ]; then echo; echo " *** LIBS-$(ARCH) is missing"; echo; exit 1; fi
+	mkdir -p $(LINC)
+	mkdir -p $(LLIB)
+	for i in $(LIBS-$(ARCH)); do make $$i.install || exit; done
+
+bins: 
+	for i in $(PROGRAM); do make $$i; done
+
+all:
+	make libs || exit
+	for i in $(PROGRAM); do make $$i || exit; done
+
+extras:
+	for i in $(EXTRAS); do make $$i || exit; done
+
+clean:
+	@if [ "$(ARCH)" = "" ]; then echo ""; echo " *** please define ARCH ***"; echo; exit 1; fi
+	@if [ "$(LIBS-$(ARCH))" = "" ]; then echo; echo " *** LIBS-$(ARCH) is missing"; echo; exit 1; fi
+	for i in $(LIBS-$(ARCH)); do make $$i.clean || exit; done
+	for i in $(PROGRAM); do make $$i.clean || exit; done
+	for i in $(EXTRAS); do make $$i.clean || exit; done
+
+dist:
+	@if [ "$(ARCH)" = "" ]; then echo ""; echo " *** please define ARCH ***"; echo; exit 1; fi
+	@if [ "$(LIBS-$(ARCH))" = "" ]; then echo; echo " *** LIBS-$(ARCH) is missing"; echo; exit 1; fi
+	for i in $(LIBS-$(ARCH)); do make $$i.dist || exit; done
+	for i in $(PROGRAM); do make $$i.dist || exit; done
+
+install:
+	@if [ "$(ARCH)" = "" ]; then echo ""; echo " *** please define ARCH ***"; echo; exit 1; fi
+	@if [ "$(LIBS-$(ARCH))" = "" ]; then echo; echo " *** LIBS-$(ARCH) is missing"; echo; exit 1; fi
+	for i in $(LIBS-$(ARCH)); do make $$i.install || exit; done
+	for i in $(PROGRAM); do make $$i.install || exit; done
+
+install.extras:
+	for i in $(EXTRAS); do make $$i.install || exit; done
+
+# standard rules: targets are foo, foo.clean, foo.install, foo.dist
+$(PROGRAM) $(LIBS-$(ARCH)) $(EXTRAS): 
+	if [ -d "src/$@" ]; then (cd src/$@ && make); fi
+
+%.install:
+	mkdir -p bin/$(ARCH)
+	if [ -d "src/$*" ]; then (cd src/$* && make install); fi
+
+%.clean:
+	if [ -d "src/$*" ]; then (cd src/$* && make clean); fi
+
+%.dist:
+	(cd src/$* && make dist)
Index: /tags/ohana/base-1-0/Ohana/configure
===================================================================
--- /tags/ohana/base-1-0/Ohana/configure	(revision 21689)
+++ /tags/ohana/base-1-0/Ohana/configure	(revision 21689)
@@ -0,0 +1,178 @@
+#!/bin/csh -f
+
+# this is a very low-tech version of configure, not built by autoconf.
+# we check for the following libraries:
+
+# we need to be able to list the required libraries for a given distribution
+
+# libX11.a
+# libsocket.a
+# libnsl.a
+# libpng.a
+# libjpeg.a
+# libz.a
+# libreadline.a
+# libtermcap.a
+
+# evaluate command-line options
+set vararch = 0
+set prefix  = ""
+set root    = ""
+set args    = ""
+while ("$1" != "") 
+ switch ($1)
+  case --prefix
+   shift
+   set prefix = $1
+   breaksw;
+  case --vararch
+   set vararch = 1
+   breaksw;
+  case -*: 
+   goto usage
+   breaksw;
+  default:
+   set args=($args $1);
+   breaksw;
+ endsw
+ shift
+end
+if ($#args != 1) goto usage
+
+# sun (at least) seems to need the socket library 
+# linux does not
+set sockets = ""
+
+# check the hardware architecture:
+set sys=`uname -s` 
+switch ($sys)
+ case IRIX64:
+   set arch="irix";
+   breaksw;
+ case SunOS:
+   set ver=`uname -r | awk '{print substr($1,1,1)}'`;
+   if ($ver == 5) then
+     set arch="sol";
+   else 
+     set arch="sun4";
+   endif
+   set sockets = "libsocket.a libnsl.a"
+   breaksw;
+ case Linux:
+   set arch="linux";
+   if (-e /etc/sidious.config) set arch="sid";
+   set mach=`uname -m`
+   if ("$mach" == "x86_64") then
+    set arch="lin64";
+   endif
+   breaksw;
+ case HP-UX:
+    set arch="hpux";
+    breaksw;
+ default:
+   echo "unknown architecture";
+   exit 1;
+   breaksw;
+endsw
+echo "setting architecture to: $arch" 
+
+# set up the basic directory names:
+set root = `pwd`
+if ($prefix == "") set prefix = $root
+set inc = $prefix/include/$arch
+set lib = $prefix/lib/$arch
+
+# check for basic libraries
+set fail = 0
+foreach f ( libpng.a libz.a libjpeg.a libreadline.a libtermcap.a $sockets )
+    foreach g ( /usr/lib $lib )
+	set name = "$g/$f"
+	if (-e $name) then
+	    echo "found $g/$f"
+	    goto next_lib;
+	endif
+    end
+    echo "missing $f"
+    set fail = 1
+next_lib:
+    continue
+end
+
+if ($fail) then
+  echo "your installation is missing some important libraries"
+  echo "please find them and install them in $lib"
+  exit 1
+endif    
+
+# check for basic libraries
+set fail = 0
+foreach f ( libX11.a )
+    foreach g ( /usr/lib $lib /usr/X11R6/lib /usr/openwin/lib )
+	set name = "$g/$f"
+	if (-e $name) then 
+	    echo "found $g/$f"
+	    set xlib = $g
+	    goto next_xlib;
+	endif
+    end
+    echo "missing $f"
+    set fail = 1
+next_xlib:
+    continue
+end
+
+if ($fail) then
+  echo "your installation is missing some important libraries"
+  echo "please find them and install them in $lib"
+  exit 1
+endif    
+
+# check for X11 headers
+set fail = 0
+foreach f ( X11/X.h )
+    foreach g ( /usr/include $inc /usr/X11R6/include /usr/openwin/include )
+	set name = "$g/$f"
+	if (-e $name) then 
+	    echo "found $g/$f"
+	    set xinc = $g
+	    goto next_xinc;
+	endif
+    end
+    echo "missing $f"
+    set fail = 1
+next_xinc:
+    continue
+end
+
+if ($fail) then
+  echo "your installation is missing some important libraries"
+  echo "please find them and install them in $lib"
+  exit 1
+endif    
+
+echo XINC: $xinc
+echo XLIB: $xlib
+
+echo ARCH: $arch
+echo ROOT: $root
+echo PREFIX: $prefix
+
+if (-e Configure) mv Configure Configure.bak
+
+if ($vararch) then
+  cat Configure.in | sed "s|ROOTDIR|$root|" | sed "s|PREFIX|$prefix|" | sed "s|^\s*ARCH|# ARCH|"   | sed "s|XINCDIR|$xinc|" | sed "s|XLIBDIR|$xlib|" > Configure
+  echo ""
+  echo "include $prefix/bin/"\$"ARCH in your path"
+else 
+  cat Configure.in | sed "s|ROOTDIR|$root|" | sed "s|PREFIX|$prefix|" | sed "s|ARCHVAL|$arch|" | sed "s|XINCDIR|$xinc|" | sed "s|XLIBDIR|$xlib|" > Configure
+  echo ""
+  echo "include $prefix/bin/$arch in your path"
+endif 
+
+exit 0
+
+usage:
+ echo "USAGE: configure [--prefix (dir)] [--vararch]"
+ echo "set the installation directory root with --prefix"
+ echo "if you define the environment variable $ARCH, you can set --vararch"
+ exit 2;
