From: Ole Streicher <olebole@debian.org>
Date: Fri, 8 Jul 2016 09:28:16 +0200
Subject: Use the system provided sextractor binary instead of the convenience
 copy

---
 acinclude.m4         | 2 +-
 configure.ac         | 2 +-
 external/Makefile.am | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/acinclude.m4 b/acinclude.m4
index d0048c5..17e07fc 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -153,7 +153,7 @@ AC_DEFUN([VIMOS_SET_PATHS],
     # Define the preprocessor symbols for the sextractor executable
     # and the configuration files.
 
-    eval sext_bindir="${prefix}/lib/${PACKAGE}-${VERSION}/bin"
+    eval sext_bindir="/usr/bin"
 
     AC_DEFINE_UNQUOTED(VIMOS_SEXTRACTOR_PATH, "$sext_bindir",
                        [Absolute path to the sextractor executable])
diff --git a/configure.ac b/configure.ac
index a057320..27df716 100644
--- a/configure.ac
+++ b/configure.ac
@@ -125,7 +125,7 @@ VIMOS_SET_SEX_PREFIX
 
 VIMOS_SET_PSFEX_PREFIX
 
-AC_CONFIG_SUBDIRS(external/sextractor external/psfex)
+AC_CONFIG_SUBDIRS(external/psfex)
 
 AC_CONFIG_FILES(Makefile
                 doxygen/Doxyfile
diff --git a/external/Makefile.am b/external/Makefile.am
index a6853b3..f112b5f 100644
--- a/external/Makefile.am
+++ b/external/Makefile.am
@@ -24,10 +24,10 @@ DISTCLEANFILES = *~
 
 COMPILE_FIRST =
 
-TOPSUBDIRS = libwcs sextractor
+TOPSUBDIRS = libwcs
 
-COMPILE_LAST = $(PSFEXDIR)
+COMPILE_LAST =
 
 SUBDIRS = $(COMPILE_FIRST) $(TOPSUBDIRS) $(COMPILE_LAST)
 
-DIST_SUBDIRS = $(COMPILE_FIRST) $(TOPSUBDIRS) psfex
+DIST_SUBDIRS = $(COMPILE_FIRST) $(TOPSUBDIRS)
