Index: /tags/ohana/base-1-5-1/Ohana/Configure.in
===================================================================
--- /tags/ohana/base-1-5-1/Ohana/Configure.in	(revision 21695)
+++ /tags/ohana/base-1-5-1/Ohana/Configure.in	(revision 21695)
@@ -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)
+
+DESTBIN	 = @BINDIR@
+DESTINC	 = @INCDIR@
+DESTLIB	 = @LIBDIR@
+DESTMAN	 = @MANDIR@
+DESTDATA = @DATADIR@
+
+# prefered C compiler
+# CC = gcc -g -DOHANA_MEMORY -Wall -Werror
+CC = gcc @OPTFLAGS@
+INCDIRS = @INCDIRS@
+LIBDIRS = @LIBDIRS@
+LIBFLAGS = @LIBFLAGS@
+
+# select the appropriate version of ranlib
+RANLIB-sid = ranlib
+RANLIB-sol = touch
+RANLIB-linux = ranlib
+RANLIB-lin64 = ranlib
+RANLIB-linrh = ranlib
+RANLIB = $(RANLIB-$(ARCH))
Index: /tags/ohana/base-1-5-1/Ohana/Makefile.Common
===================================================================
--- /tags/ohana/base-1-5-1/Ohana/Makefile.Common	(revision 21695)
+++ /tags/ohana/base-1-5-1/Ohana/Makefile.Common	(revision 21695)
@@ -0,0 +1,79 @@
+# this file must be added to the makefile *after* LIB,BIN, etc are defined
+
+# XXX replace BINDIR, etc with DESTBIN in Configure.in
+
+CFLAGS	=	-I$(INC) -I$(DESTINC) $(INCDIRS) -D$(ARCH)
+LDFLAGS = 	-L$(LIB) -L$(DESTLIB) $(LIBDIRS) $(LIBFLAGS)
+
+.PRECIOUS: %.$(ARCH).o
+.PRECIOUS: $(BIN)/%.$(ARCH)
+
+# is this line needed?
+.SUFFIXES: .$(ARCH).o
+
+$(DESTINC)/%: $(INC)/%
+	@if [ ! -d $(DESTINC) ]; then mkdir -p $(DESTINC); fi
+	rm -f $@
+	cp $< $@
+
+%.$(ARCH).o : %.c
+	$(CC) $(CFLAGS) -c $< -o $@
+
+$(BIN)/%.$(ARCH):
+	@echo "trying $*"
+	@if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
+	$(CC) -o $@ $^ $(LDFLAGS)
+	@echo "compiled $*"
+	@echo ""
+
+$(DESTBIN)/%: $(BIN)/%.$(ARCH) 
+	@if [ ! -d $(DESTBIN) ]; then mkdir -p $(DESTBIN); fi
+	rm -f $(DESTBIN)/$*
+	cp $(BIN)/$*.$(ARCH) $(DESTBIN)/$*
+	@echo "installed $*"
+	@echo ""
+
+$(LIB):
+	@if [ ! -d $(LIB) ]; then mkdir -p $(LIB); fi
+
+$(LIB)/%.$(ARCH).a:
+	@if [ ! -d $(LIB) ]; then mkdir -p $(LIB); fi
+	rm -f $@
+	ar rcv $@ $^
+	$(RANLIB) $@
+
+$(DESTLIB)/%.a: $(LIB)/%.$(ARCH).a
+	@if [ ! -d $(DESTLIB) ]; then mkdir -p $(DESTLIB); fi
+	rm -f $@
+	cp $< $@
+
+$(LIB)/%.$(ARCH).so:
+	@if [ ! -d $(LIB) ]; then mkdir -p $(LIB); fi
+	rm -f $@
+	gcc -shared -Wl,-soname,$*.so -o $@ $^ -lc
+
+$(DESTLIB)/%.so: $(LIB)/%.$(ARCH).so
+	@if [ ! -d $(DESTLIB) ]; then mkdir -p $(DESTLIB); fi
+	rm -f $@
+	cp $< $@
+
+$(DESTMAN)/%: $(MAN)/%
+	@if [ ! -d $(DESTMAN) ]; then mkdir -p $(DESTMAN); fi
+	rm -f $@
+	cp $< $@
+
+clean:
+	rm -f `find . -name "*.o"`
+	rm -f `find . -name "*.o"`
+	rm -f `find . -name "*~"`
+	rm -f `find . -name "#*"`
+
+dist: clean
+	rm -rf $(BIN)
+	rm -rf $(LIB)
+
+# $@ : target filename
+# $* : matched word (%)
+# $< : first prereq
+# $^ : all prereqs
+
Index: /tags/ohana/base-1-5-1/Ohana/Makefile.in
===================================================================
--- /tags/ohana/base-1-5-1/Ohana/Makefile.in	(revision 21695)
+++ /tags/ohana/base-1-5-1/Ohana/Makefile.in	(revision 21695)
@@ -0,0 +1,149 @@
+# --------------------------------------------------------------------------- #
+# --------------------------------------------------------------------------- #
+#									      #
+#                 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     \
+getstar     \
+gcompare    \
+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    \
+fixcat      \
+gophot      \
+getusno     \
+lightcurve  \
+markrock    \
+photdbc     \
+markstar    \
+mosastro.v1 \
+mosastro.v2 \
+skycalc     
+
+OLD = mana status addusno addrefs addspphot
+
+# Required libraries depends on the architecture
+LIBS-linux = libtap libohana libfits libdvo libkapa
+LIBS-lin64 = libtap libohana libfits libdvo libkapa
+LIBS-linrh = libtap libohana libfits libdvo libkapa
+LIBS-sid   = libtap libohana libfits libdvo libkapa
+LIBS-sol   = libtap libohana libfits libdvo libkapa 
+
+# 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 $(DESTINC)
+	mkdir -p $(DESTLIB)
+	mkdir -p $(DESTBIN)
+	for i in $(LIBS-$(ARCH)); do make $$i.install || exit; done
+	chmod +x ohana-config
+	cp -f ohana-config $(DESTBIN)/
+
+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
+
+pantasks:
+	make libs || exit
+	cd src/opihi; make pclient.install && exit
+	cd src/opihi; make pcontrol.install && exit
+	cd src/opihi; make pantasks.install && exit
+
+mana:
+	make libs
+	make kii.install
+	make kapa.install
+	cd src/opihi; make mana.install && exit
+
+dvoshell:
+	make libs
+	make kii.install
+	make kapa.install
+	cd src/opihi; make dvo.install && exit
+
+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
+	@rm -f `find . -name .mana`
+	@rm -f `find . -name .dvo`
+
+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-5-1/Ohana/autogen.sh
===================================================================
--- /tags/ohana/base-1-5-1/Ohana/autogen.sh	(revision 21695)
+++ /tags/ohana/base-1-5-1/Ohana/autogen.sh	(revision 21695)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+./configure.tcsh $*
Index: /tags/ohana/base-1-5-1/Ohana/configure
===================================================================
--- /tags/ohana/base-1-5-1/Ohana/configure	(revision 21695)
+++ /tags/ohana/base-1-5-1/Ohana/configure	(revision 21695)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+./configure.tcsh $*
Index: /tags/ohana/base-1-5-1/Ohana/configure.tcsh
===================================================================
--- /tags/ohana/base-1-5-1/Ohana/configure.tcsh	(revision 21695)
+++ /tags/ohana/base-1-5-1/Ohana/configure.tcsh	(revision 21695)
@@ -0,0 +1,388 @@
+#!/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 bindir  = ""
+set libdir  = ""
+set incdir  = ""
+set mandir  = ""
+set datadir  = ""
+set sysconfdir  = ""
+set optflags = "-g -O0"
+set pedantic = ""
+
+set root    = ""
+set args    = ""
+while ("$1" != "") 
+ switch ($1)
+  case --vararch
+   set vararch = 1
+   breaksw;
+  # options passed by jhbuild which we ignore
+  case --enable-maintainer-mode
+  case --no-create
+  case --no-recursion
+   breaksw;
+  case --enable-optimize
+   set optflags = "-O2"
+   breaksw;
+  case --pedantic
+   set pedantic = "-Wall -Werror"
+   breaksw;
+  case --prefix*
+   if ("$1" == "--prefix") then
+     shift
+     set prefix = $1
+   else
+     set prefix = `echo $1 | tr = ' ' | awk '{print $2}'`
+   endif
+   set exec_prefix = $prefix
+   breaksw;
+  case --bindir*
+   if ("$1" == "--bindir") then
+     shift
+     set bindir = $1
+   else
+     set bindir = `echo $1 | tr = ' ' | awk '{print $2}'`
+   endif
+   breaksw;
+  case --libdir*
+   if ("$1" == "--libdir") then
+     shift
+     set libdir = $1
+   else
+     set libdir = `echo $1 | tr = ' ' | awk '{print $2}'`
+   endif
+   breaksw;
+  case --includedir*
+   if ("$1" == "--includedir") then
+     shift
+     set includedir = $1
+   else
+     set includedir = `echo $1 | tr = ' ' | awk '{print $2}'`
+   endif
+   breaksw;
+  case --sysconfdir*
+   if ("$1" == "--sysconfdir") then
+     shift
+     set sysconfdir = $1
+   else
+     set sysconfdir = `echo $1 | tr = ' ' | awk '{print $2}'`
+   endif
+   breaksw;
+  case --datadir*
+   if ("$1" == "--datadir") then
+     shift
+     set datadir = $1
+   else
+     set datadir = `echo $1 | tr = ' ' | awk '{print $2}'`
+   endif
+   breaksw;
+  case --mandir*
+   if ("$1" == "--mandir") then
+     shift
+     set mandir = $1
+   else
+     set mandir = `echo $1 | tr = ' ' | awk '{print $2}'`
+   endif
+   breaksw;
+  case --help:
+   goto usage
+  case -*: 
+   echo ""
+   echo "Unknown option: $1"
+   goto usage
+  default:
+   set args=($args $1);
+   breaksw;
+ endsw
+ shift
+end
+if ($#args != 1) goto usage
+
+set needlibs = "png z jpeg readline X11 pthread m"
+set syslibpath = "/lib /usr/lib /usr/X11R6/lib /usr/openwin/lib"
+
+set needincs = "math.h fcntl.h malloc.h errno.h time.h memory.h stdlib.h string.h X11/X.h"
+set sysincpath = "/usr/include /usr/X11R6/include /usr/openwin/include"
+
+# 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
+   # sun (at least) seems to need the socket library (linux does not)
+   set needlibs = "$needlibs libsocket libnsl"
+   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";
+    set syslibpath = "/lib64 /lib /usr/lib64 /usr/lib /usr/X11R6/lib64 /usr/X11R6/lib"
+   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:
+# XXX : this should be set based on the rules for libdir below
+set root = `pwd`
+if ($prefix == "") set prefix = $root
+if ($vararch) then
+  set inc = $prefix/include/$arch
+  set lib = $prefix/lib/$arch
+else
+  set inc = $prefix/include
+  set lib = $prefix/lib
+endif
+if ($?LD_LIBRARY_PATH) then 
+  set libpath = `echo $LD_LIBRARY_PATH | tr ':' ' '`
+else
+  set libpath = ""
+endif
+
+# check for basic libraries
+set faillibs = ""
+set libflags = ""
+set libdirs  = ""
+set nonomatch
+foreach f ( $needlibs )
+    foreach g ( $syslibpath $lib $libpath )
+	set name = $g/lib$f.a
+	if (-e $name[1]) goto got_lib;
+	set name = $g/lib$f.so*
+	if (-e $name[1]) goto got_lib;
+    end
+    echo "missing lib$f"
+    set faillibs = "$faillibs lib$f"
+    continue
+got_lib:
+    echo "found lib$f ($name)"
+    echo "$libdirs" | grep -- "-L$g " > /dev/null
+    if ($status) then
+      set libdirs  = "$libdirs -L$g "
+    endif
+    echo "$libflags" | grep -- "-l$f " > /dev/null
+    if ($status) then
+      set libflags = "$libflags -l$f "
+    endif
+end
+
+# we need a curses library; can choose one of the following:
+# check for termcap, curses, etc
+foreach f ( ncurses curses termcap )
+    foreach g ( $syslibpath $lib $libpath )
+	set name = "$g/lib$f.a"
+	if (-e $name) goto got_curses;
+	set name = "$g/lib$f.so"
+	if (-e $name) goto got_curses;
+    end
+end
+set faillibs = "$faillibs (ncurses | curses | termcap)"
+echo "missing a valid curses library"
+echo "missing: $faillibs"
+echo "please find them and install them in $lib"
+exit 1
+
+got_curses:
+  echo "found $f ($name)"
+  echo "$libdirs" | grep -- "-L$g " > /dev/null
+  if ($status) then
+    set libdirs  = "$libdirs -L$g "
+  endif
+  echo "$libflags" | grep -- "-l$f " > /dev/null
+  if ($status) then
+    set libflags = "$libflags -l$f "
+  endif
+
+if ("$faillibs" != "") then
+  echo "your installation is missing some important libraries"
+  echo "missing: $faillibs"
+  echo "please find them and install them in $lib"
+  exit 1
+endif    
+
+# check for headers
+set failincs = ""
+set incdirs = ""
+foreach f ( $needincs )
+  foreach g ( $sysincpath $inc )
+    set name = "$g/$f"
+    if (-e $name) goto got_inc;
+  end
+  echo "missing $f"
+  set failincs = "$failincs $f"
+  continue
+got_inc:
+  echo "found $f ($name)"
+  echo "$incdirs" | grep -- "-I$g " > /dev/null
+  if ($status) then
+    set incdirs = "$incdirs -I$g "
+  endif
+end
+
+if ("$failincs" != "") then
+  echo "your installation is missing some important library headers"
+  echo "please find them and install them in $inc"
+  exit 1
+endif    
+
+echo INCDIRS: $incdirs
+echo LIBDIRS: $libdirs
+echo LIBFLAGS: $libflags
+
+echo ARCH: $arch
+echo ROOT: $root
+echo PREFIX: $prefix
+echo 
+
+#echo BINDIR $bindir
+#echo LIBDIR $libdir
+#echo INCDIR $incdir
+#echo DATADIR $datadir
+#echo MANDIR $mandir
+
+if (-e Configure) mv Configure Configure.bak
+
+rm -f Configure.in.tmp Configure.tmp
+cp Configure.in Configure.in.tmp
+
+# we don't currently need to modify the Makefile but since configure
+# should create a new Makefile, we need to do this:
+cp -f Makefile.in Makefile
+
+# modify the BINDIR
+if ("$bindir" == "") then
+  set subdir = bin
+  set subpath = bin
+  if ($vararch) then 
+    set subdir = 'bin/$(ARCH)'
+    set subpath = "bin/$arch"
+  endif
+  set bindir = $prefix/$subdir
+  set binpath = $prefix/$subpath
+endif
+cat Configure.in.tmp | sed "s|@BINDIR@| $bindir|" > Configure.tmp
+rm -f Configure.in.tmp
+mv Configure.tmp Configure.in.tmp
+echo BINDIR $bindir
+
+# modify the INCDIR
+if ("$incdir" == "") then
+  set subdir = include
+  if ($vararch) set subdir = 'include/$(ARCH)'
+  set incdir = $prefix/$subdir
+endif
+cat Configure.in.tmp | sed "s|@INCDIR@|$incdir|" > Configure.tmp
+rm -f Configure.in.tmp
+mv Configure.tmp Configure.in.tmp
+echo INCDIR $incdir
+
+# modify the LIBDIR
+if ("$libdir" == "") then
+  set subdir = lib
+  if ($vararch) set subdir = 'lib/$(ARCH)'
+  set libdir = $prefix/$subdir
+endif
+cat Configure.in.tmp | sed "s|@LIBDIR@|$libdir|" > Configure.tmp
+rm -f Configure.in.tmp
+mv Configure.tmp Configure.in.tmp
+echo LIBDIR $libdir
+
+# modify the MANDIR
+if ("$mandir" == "") then
+  set mandir = $prefix/man
+endif
+cat Configure.in.tmp | sed "s|@MANDIR@|$mandir|" > Configure.tmp
+rm -f Configure.in.tmp
+mv Configure.tmp Configure.in.tmp
+echo MANDIR $mandir
+
+# modify the DATADIR
+if ("$datadir" == "") then
+  set datadir = $prefix/share
+endif
+cat Configure.in.tmp | sed "s|@DATADIR@|$datadir|" > Configure.tmp
+rm -f Configure.in.tmp
+mv Configure.tmp Configure.in.tmp
+echo DATADIR $datadir
+
+if ($vararch) then
+  cat Configure.in.tmp | sed "s|^\s*ARCH|# ARCH|" > Configure.tmp
+else 
+  cat Configure.in.tmp | sed "s|@ARCHVAL@|$arch|" > Configure.tmp
+endif 
+rm -f Configure.in.tmp
+mv Configure.tmp Configure.in.tmp
+
+cat Configure.in.tmp | sed "s|@ROOTDIR@|$root|" | sed "s|@INCDIRS@|$incdirs|" | sed "s|@LIBDIRS@|$libdirs|" | sed "s|@LIBFLAGS@|$libflags|" | sed "s|@OPTFLAGS@|$optflags $pedantic|" > Configure
+rm -f Configure.in.tmp Configure.tmp
+
+cat ohana-config.in | sed "s|@INCDIR@|$incdir|" | sed "s|@LIBDIR@|$libdir|" | sed "s|(ARCH)|ARCH|" > ohana-config
+
+echo ""
+echo "include $bindir in your path"
+
+exit 0
+
+usage:
+cat <<EOF
+USAGE: configure [OPTION]
+
+echo remaining args: $args
+
+set the installation directory root with --prefix
+if you define the environment variable ARCH, you can set --vararch
+ 
+Configuration:
+  -h, --help              display this help and exit
+  --enable-optimize       enable compiler optimization
+  --pedantic              include -Wall -Werror on compilation
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+  --vararch               install with ARCH suffixes for variable architectures
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [PREFIX/bin/$ARCH] 
+  --libdir=DIR           object code libraries [PREFIX/lib/$ARCH]
+  --includedir=DIR       C header files [PREFIX/include]
+  --mandir=DIR           man documentation [PREFIX/man]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+
+EOF
+ exit 2;
Index: /tags/ohana/base-1-5-1/Ohana/ohana-config.in
===================================================================
--- /tags/ohana/base-1-5-1/Ohana/ohana-config.in	(revision 21695)
+++ /tags/ohana/base-1-5-1/Ohana/ohana-config.in	(revision 21695)
@@ -0,0 +1,25 @@
+#!/bin/csh -f
+
+if ($#argv != 1) then
+  echo "USAGE: ohana-config [option]"
+  echo "valid options:"
+  echo " --libs"
+  echo " --cflags"
+  echo " --prefix"
+  exit 2
+endif
+
+switch ($1) 
+  case "--libs":
+    echo "-L@LIBDIR@ -lkapa -ldvo -lFITS -lohana"
+    shift
+    breaksw
+  case "--cflags":
+    echo "-I@INCDIR@"
+    shift
+    breaksw
+  default:
+    echo "unknown option $1"
+    exit 2
+endsw
+ 
