Index: trunk/ppSub/configure.ac
===================================================================
--- trunk/ppSub/configure.ac	(revision 32822)
+++ trunk/ppSub/configure.ac	(revision 34089)
@@ -9,5 +9,5 @@
 AM_MAINTAINER_MODE
 
-IPP_STDCFLAGS
+IPP_STDLDFLAGS
 
 AC_LANG(C)
@@ -30,5 +30,5 @@
 dnl Set CFLAGS for build
 IPP_STDOPTS
-CFLAGS="${CFLAGS} -Wall -Werror"
+IPP_STDCFLAGS
 
 IPP_VERSION
Index: trunk/ppSub/src/ppSubExit.c
===================================================================
--- trunk/ppSub/src/ppSubExit.c	(revision 32822)
+++ trunk/ppSub/src/ppSubExit.c	(revision 34089)
@@ -11,5 +11,13 @@
     }
 
-    psErrorCode errorCode = psErrorCodeLast(); // Error code
+    // gcc -Wswitch complains here if err is declared as type psErrorCode
+    // the collection of ps*ErrorCode values are enums defined separately for 
+    // each module (psphot, pswarp, etc).  the lowest type, psErrorCode is only the base set and does
+    // not include the possible psphot values
+
+    // for now, to get around this, we just use an int for the switch
+
+    // psErrorCode errorCode = psErrorCodeLast(); // Error code
+    int errorCode = psErrorCodeLast(); // Error code
     if (errorCode != PS_ERR_NONE) {
         pmFPAfileFreeSetStrict(false);
Index: trunk/ppSub/src/ppSubMatchPSFs.c
===================================================================
--- trunk/ppSub/src/ppSubMatchPSFs.c	(revision 32822)
+++ trunk/ppSub/src/ppSubMatchPSFs.c	(revision 34089)
@@ -266,5 +266,5 @@
         if (!detections->allSources) {
             psFree(detections);
-            psErrorCode error = psErrorCodeLast(); // Error code
+            int error = psErrorCodeLast(); // Error code
             if (error == PM_ERR_OBJECTS) {
                 psErrorStackPrint(stderr, "Unable to match source lists");
@@ -439,5 +439,5 @@
 
     if (!success) {
-        psErrorCode error = psErrorCodeLast(); // Error code
+        int error = psErrorCodeLast(); // Error code
         if (error == PM_ERR_STAMPS) {
             psErrorStackPrint(stderr, "Unable to find stamps");
@@ -471,8 +471,8 @@
             psRegion *region = regItem->data.V; // Region of interest
             psMetadataItem *modeItem = psMetadataGetAndIncrement(modeIter); // Item with mode
-            psAssert(modeItem && modeItem->type == PS_TYPE_S32, "Expect subtraction mode");
+            psAssert(modeItem && modeItem->type == PS_DATA_S32, "Expect subtraction mode");
             pmSubtractionMode mode = modeItem->data.S32; // Subtraction mode
             psMetadataItem *normItem = psMetadataGetAndIncrement(normIter); // Item with normalisation
-            psAssert(normItem && normItem->type == PS_TYPE_F32 && isfinite(normItem->data.F32),
+            psAssert(normItem && normItem->type == PS_DATA_F32 && isfinite(normItem->data.F32),
                      "Expect normalisation");
             float norm = normItem->data.F32; // Normalisation
