Index: trunk/ippMonitor/configure.tcsh
===================================================================
--- trunk/ippMonitor/configure.tcsh	(revision 21137)
+++ trunk/ippMonitor/configure.tcsh	(revision 24662)
@@ -18,4 +18,5 @@
 set libdir  = ""
 set datadir = ""
+set site = ""
 
 set DBI     = "DB"
@@ -107,4 +108,12 @@
    endif
    breaksw;
+  case --site*
+   if ("$1" == "--site") then
+     shift
+     set site = $1
+   else
+     set site = `echo $1 | tr = ' ' | awk '{print $2}'`
+   endif
+   breaksw;
   case --useMDB2
    set DBI = "MDB2"
@@ -129,4 +138,5 @@
 echo "libdir: $libdir"
 echo "datadir:$datadir"
+echo "site:   $site"
 echo "htdocs: $htdocs"
 echo "dbhost: $dbhost"
@@ -157,4 +167,10 @@
   if ("$prefix" == "") goto usage
   set datadir = $prefix/share
+endif
+
+# SITE defines the location of the ipprc.config file
+if ("$site" == "") then
+  if ("$datadir" == "") goto usage
+  set site = $datadir/ippconfig/ipprc.config
 endif
 
@@ -174,5 +190,5 @@
 cat tmp.1           | sed "s|@BINDIR@|$bindir|"  > tmp.2
 cat tmp.2           | sed "s|@PERLLIB@|$libdir|" > tmp.1
-cat tmp.1           | sed "s|@SITE@|$datadir|"   > tmp.2
+cat tmp.1           | sed "s|@SITE@|$site|"      > tmp.2
 cat tmp.2           | sed "s|@DBI@|$DBI|"        > raw/site.php
 rm -f tmp.1 tmp.2
@@ -183,10 +199,11 @@
 
 usage:
+if ($#args > 1) then
+  echo unrecognized options: $args
+endif
+
 cat <<EOF
 USAGE: configure [OPTION]
 
-echo $#args
-echo remaining args: $args
-
 set the WWW installation directory root with --htdocs
 set the IPP installation directory root with --prefix
@@ -194,5 +211,7 @@
 set the database host, user, password with: --dbhost, --dbuser, -dbpass
  
-either --prefix or all of --bindir, --libdir, --datadir are required
+either --prefix or both --bindir and --libdir and [--datadir or --site] are required
+
+if both --datadir and --site are defined, --site overrides the ipprc.config definition
 
 Configuration:
@@ -206,4 +225,5 @@
   --libdir=DIR           object code libraries [PREFIX/lib/$ARCH]
   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --site=PATH            location of the ipprc.config file [DATADIR/ippconfig/ipprc.config]
 
 EOF
