--- a/configure.ac.template
+++ b/configure.ac.template
@@ -548,7 +548,6 @@
 src/libParaverTraceParser/Makefile
 src/libSharedComponents/Makefile
 src/libSharedComponents/kalign2/Makefile
-src/libANN/Makefile
 src/libClustering/gmeans/Makefile
 src/libClustering/Makefile
 src/libTraceClustering/Makefile
--- a/PATHS
+++ b/PATHS
@@ -4,4 +4,3 @@
 CLUSTERING_DIR       = $(SRC_DIR)/libClustering
 CLUSTERING_ALG_DIR   = $(SRC_DIR)/libClusteringAlgorithms
 PARAVER_PARSER_DIR    = $(SRC_DIR)/libParaverTraceParser
-ANN_DIR              = $(SRC_DIR)/libANN
--- a/src/libClustering/Makefile.am
+++ b/src/libClustering/Makefile.am
@@ -70,11 +70,10 @@
 
 endif
 
-libClustering_la_CPPFLAGS=@CLUSTERING_CPPFLAGS@ -I$(top_srcdir)/src/libANN
-libClustering_la_LDFLAGS=@CLUSTERING_LDFLAGS@ @CLUSTERING_CPPFLAGS@
+libClustering_la_CPPFLAGS=@CLUSTERING_CPPFLAGS@ -I/usr/include/ANN
+libClustering_la_LDFLAGS=@CLUSTERING_LDFLAGS@ @CLUSTERING_CPPFLAGS@ -lann
 libClustering_la_LIBADD= \
 	$(top_builddir)/src/BasicClasses/libBasicClasses.la \
-	$(top_builddir)/src/libANN/libANN.la \
 	./gmeans/libInternalGMeans.la \
 	@CLUSTERING_LIBS@
 
--- a/src/libDistributedClustering/Makefile.am
+++ b/src/libDistributedClustering/Makefile.am
@@ -32,7 +32,7 @@
  -I$(top_srcdir)/src/libSharedComponents\
  -I$(top_srcdir)/pcfparser_svn3942\
  -I$(top_srcdir)/src/libParaverTraceParser\
- -I$(top_srcdir)/src/libANN
+ -I/usr/include/ANN
  
 libDistributedClustering_la_LDFLAGS  = @CLUSTERING_LDFLAGS@ @CLUSTERING_CPPFLAGS@
 libDistributedClustering_la_LIBADD= \
--- a/src/libSharedComponents/Makefile.am
+++ b/src/libSharedComponents/Makefile.am
@@ -76,7 +76,7 @@
 libSharedComponents_la_CPPFLAGS = @CLUSTERING_CPPFLAGS@\
   -I${top_srcdir}/src/libClustering\
   -I${top_srcdir}/src/libParaverTraceParser\
-  -I${top_srcdir}/src/libANN
+  -I/usr/include/ANN
 if MAKE_OLD_PCFPARSER
   libSharedComponents_la_CPPFLAGS += -I${top_srcdir}/pcfparser_svn3942/old
 else
--- a/src/libTraceClustering/Makefile.am
+++ b/src/libTraceClustering/Makefile.am
@@ -7,7 +7,7 @@
 AM_CPPFLAGS = \
 	-I$(top_srcdir)/include \
 	-I$(top_srcdir)/src/BasicClasses \
-	-I$(top_srcdir)/src/libANN \
+	-I/usr/include/ANN \
 	-I$(top_srcdir)/src/libSharedComponents \
 	-I$(top_srcdir)/src/libParaverTraceParser \
 	-I$(top_srcdir)/common_utilities \
@@ -28,7 +28,7 @@
   -I$(top_srcdir)/src/libClustering\
   -I$(top_srcdir)/src/libSharedComponents\
   -I$(top_srcdir)/pcfparser_svn3942\
-  -I$(top_srcdir)/src/libANN\
+  -I/usr/include/ANN\
   -I$(top_srcdir)/src/libParaverTraceParser
 
 libTraceClustering_la_LDFLAGS  = @CLUSTERING_CPPFLAGS@ @CLUSTERING_LDFLAGS@
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,7 +5,6 @@
 SUBDIRS = \
 	BasicClasses \
 	libParaverTraceParser \
-	libANN \
 	libClustering \
 	libSharedComponents \
 	libTraceClustering \
