Index: trunk/Ohana/configure.tcsh
===================================================================
--- trunk/Ohana/configure.tcsh	(revision 31669)
+++ trunk/Ohana/configure.tcsh	(revision 34088)
@@ -10,4 +10,6 @@
 set optimize = 0
 set pedantic = 1
+set no_as_needed = 0
+set debug_build = 0
 set memcheck = 0
 set use_tcmalloc = 0
@@ -31,8 +33,14 @@
 while ("$1" != "") 
  switch ("$1")
-  # options passed by jhbuild or others which we ignore
+  # options passed by build systems which we ignore
   case --enable-maintainer-mode
   case --no-create
   case --no-recursion
+  case --disable-shared
+  case --enable-shared
+  case --disable-static
+  case --enable-static
+   breaksw;
+  # key/value options passed by build systems which we ignore
   case --sbindir*
   case --libexecdir*
@@ -49,12 +57,14 @@
    endif
    breaksw;
-  case --disable-shared
-  case --enable-shared
-  case --disable-static
-  case --enable-static
-    echo ""
-    echo "WARNING: Ohana can't turn shared/static builds on/off."
-    echo ""
-    breaksw;
+  case --enable-no-as-needed
+   set no_as_needed = 1
+   breaksw;
+  case --enable-debug-build
+   set debug_build = 1
+   set pedantic = 0
+   echo "disabling pedantic build"
+   endif    
+   breaksw;
+  # options used by Ohana, but not gpcsw
   case --vararch
    set vararch = 1
@@ -80,4 +90,8 @@
   case --pedantic
    set pedantic = 1
+   if ($debug_build) then
+    echo "--pedantic and --enable-debug-build are mutually exclusive"
+    exit 2;
+   endif    
    breaksw;
   case --no-pedantic
@@ -203,5 +217,7 @@
   set CPPFLAGS = ""
 endif  
+
 if ($pedantic) set CPPFLAGS = "$CPPFLAGS -Wall -Werror"
+if ($debug_build) set CPPFLAGS = "$CPPFLAGS -Wall"
 if ($memcheck) set CPPFLAGS = "$CPPFLAGS -DOHANA_MEMORY"
 
@@ -211,5 +227,10 @@
 if ($profile) set LDFLAGS = "$LDFLAGS -Wl,--start-group -Wl,-Bstatic -Wl,-Bdynamic"
 
+if ($no_as_needed) set LDFLAGS = "$LDFLAGS -Wl,--no-as-needed"
+
 set syslibpath = "/lib /usr/lib /usr/X11R6/lib /usr/local/lib"
+set xtrlibpath = `checkpaths.pl lib`
+set syslibpath = "$syslibpath $xtrlibpath"
+
 set needlibs   = ""
 set needlibs   = "$needlibs png"
@@ -226,4 +247,6 @@
 
 set sysincpath = "/usr/include /usr/local/include /usr/X11R6/include"
+set xtrincpath = `checkpaths.pl include`
+set sysincpath = "$sysincpath $xtrincpath"
 
 set needincs = ""
@@ -334,4 +357,6 @@
 echo "setting architecture to: $arch" 
 
+# add 
+
 # set up the basic directory names:
 set root = `pwd`
@@ -707,2 +732,3 @@
 EOF
  exit 2;
+
