diff --git a/.gitignore b/.gitignore
index d826675..1e4e913 100644
--- a/.gitignore
+++ b/.gitignore
@@ -49,6 +49,8 @@ CMakeFiles
 # autotools artifacts
 .deps
 config.status
+test-driver
+ELFIOTest/runELFtests.trs
 
 # eclipse project files
 .settings
diff --git a/ELFIOTest/Makefile b/ELFIOTest/Makefile
deleted file mode 100644
index ceb4c93..0000000
--- a/ELFIOTest/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-CXX=g++
-CPPFLAGS=-c -Wall -std=c++0x -I..
-LDLIBS=-lboost_unit_test_framework
-
-ELFIODIR=../elfio/
-SOURCES=ELFIOTest.cpp ELFIOTest1.cpp
-INCLUDES=$(ELFIODIR)elfio.hpp         $(ELFIODIR)elfio_header.hpp  \
-         $(ELFIODIR)elfio_note.hpp    $(ELFIODIR)elfio_section.hpp \
-         $(ELFIODIR)elfio_segment.hpp $(ELFIODIR)elfio_strings.hpp \
-         $(ELFIODIR)elfio_symbols.hpp $(ELFIODIR)elfio_utils.hpp   \
-         $(ELFIODIR)elf_types.hpp
-OBJECTS=$(SOURCES:.cpp=.o)
-EXECUTABLE=ELFIOTest
-
-all: $(SOURCES) $(EXECUTABLE) $(INCLUDES)
-
-$(EXECUTABLE): $(OBJECTS)
-	$(CXX) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $@
-
-.cpp.o:
-	$(CXX) $(CPPFLAGS) $< -o $@
-
-test: $(EXECUTABLE)
-	./$(EXECUTABLE) -r short
-
-clean:
-	rm $(OBJECTS) $(EXECUTABLE)
diff --git a/ELFIOTest/Makefile.am b/ELFIOTest/Makefile.am
new file mode 100644
index 0000000..362342e
--- /dev/null
+++ b/ELFIOTest/Makefile.am
@@ -0,0 +1,6 @@
+AM_CPPFLAGS     = -I$(top_srcdir)
+bin_PROGRAMS    = ELFIOTest
+ELFIOTest_SOURCES = ELFIOTest.cpp ELFIOTest1.cpp
+ELFIOTest_LDADD = -lboost_unit_test_framework
+
+TESTS=runELFtests
diff --git a/ELFIOTest/runELFtests b/ELFIOTest/runELFtests
new file mode 100755
index 0000000..2c94c3c
--- /dev/null
+++ b/ELFIOTest/runELFtests
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# ELFIOTest requires to have the current working directory here, 
+# otherwise it would not find its test files
+cd `dirname $0`
+./ELFIOTest
diff --git a/Makefile.am b/Makefile.am
index dd2a4b4..c40fbc2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = examples
+SUBDIRS = examples ELFIOTest
 nobase_include_HEADERS = elfio/elf_types.hpp     elfio/elfio_dynamic.hpp    \
                          elfio/elfio.hpp         elfio/elfio_header.hpp     \
                          elfio/elfio_note.hpp    elfio/elfio_relocation.hpp \
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..ab3aee3
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1 @@
+autoreconf --install
diff --git a/configure b/configure
index 7242a25..55eeaab 100755
--- a/configure
+++ b/configure
@@ -3099,7 +3099,7 @@ else
 fi
 
 
-ac_config_files="$ac_config_files Makefile examples/Makefile examples/elfdump/Makefile examples/tutorial/Makefile examples/writer/Makefile examples/write_obj/Makefile"
+ac_config_files="$ac_config_files Makefile examples/Makefile examples/elfdump/Makefile examples/tutorial/Makefile examples/writer/Makefile examples/anonymizer/Makefile examples/write_obj/Makefile ELFIOTest/Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -3848,7 +3848,9 @@ do
     "examples/elfdump/Makefile") CONFIG_FILES="$CONFIG_FILES examples/elfdump/Makefile" ;;
     "examples/tutorial/Makefile") CONFIG_FILES="$CONFIG_FILES examples/tutorial/Makefile" ;;
     "examples/writer/Makefile") CONFIG_FILES="$CONFIG_FILES examples/writer/Makefile" ;;
+    "examples/anonymizer/Makefile") CONFIG_FILES="$CONFIG_FILES examples/anonymizer/Makefile" ;;
     "examples/write_obj/Makefile") CONFIG_FILES="$CONFIG_FILES examples/write_obj/Makefile" ;;
+    "ELFIOTest/Makefile") CONFIG_FILES="$CONFIG_FILES ELFIOTest/Makefile" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
diff --git a/configure.ac b/configure.ac
index 2d94110..9594b70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,5 +9,6 @@ AC_CONFIG_FILES([
            examples/writer/Makefile
            examples/anonymizer/Makefile
            examples/write_obj/Makefile
+           ELFIOTest/Makefile
 ])
 AC_OUTPUT