Index: xtra/pgagent/Makefile.am
===================================================================
--- xtra/pgagent/Makefile.am	(revision 4751)
+++ xtra/pgagent/Makefile.am	(working copy)
@@ -37,24 +37,11 @@
 AM_CPPFLAGS = -DDATA_DIR=\"$(pkgdatadir)/\" -Wall -Wno-non-virtual-dtor -I$(srcdir)/include
 AM_CFLAGS = -DDATA_DIR=\"$(pkgdatadir)/\" -Wall -I$(srcdir)/include
 
-# Automake trys to execute install-exec-hook if it appears anywhere in the file, so we need a dummy
-# for non-APPBUNDLE cases.
-install-exec-hook:
+install-data-local:
+	$(install_sh) -c -m 644 pgagent.sql $(DESTDIR)/$(pkgdatadir)/pgagent.sql
 
 else
 
-AM_CXXFLAGS = -Wall -Wno-non-virtual-dtor -I$(srcdir)/include
-AM_CPPFLAGS = -Wall -Wno-non-virtual-dtor -I$(srcdir)/include
-AM_CFLAGS = -Wall -I$(srcdir)/include
-install-exec-hook:
-		cd $(bindir) ;\
-		mv pgagent tmp ;\
-		mv tmp pgagent ;\
-		if test "$(pg_debug_build)" = "no"; then \
-				strip pgagent ;\
-		fi
+install-data-local:
 
 endif
-
-install-data-local:
-	$(install_sh) -c -m 644 pgagent.sql $(DESTDIR)/$(pkgdatadir)/pgagent.sql
Index: xtra/Makefile.am
===================================================================
--- xtra/Makefile.am	(revision 4751)
+++ xtra/Makefile.am	(working copy)
@@ -7,8 +7,12 @@
 # Makefile - Makefile for *nix systems
 ##############################################################################
 
+if !APPBUNDLE
+
 SUBDIRS = pgagent
 
+endif
+
 # Note: We cannot add a Makefile to the admin directory as it already
 #       contains one to be used as part of the PostreSQL contrib build
 #	system. Instead, we'll add the files in that directory here.
