diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..51d6d52739fe9e1b6361268cade843014485be81
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,5 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = src
+
+ACLOCAL_AMFLAGS = --install -I build-macro
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000000000000000000000000000000000000..35d0adcc974020e155fcc315be13bbf076e809f7
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,32 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([SeFHT], [0.9], [jonathan@xn--schbel-yxa.info])
+AC_CONFIG_SRCDIR([src/main.c])
+AC_CONFIG_HEADERS([src/config.h])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([build-macro])
+
+AM_INIT_AUTOMAKE([foreign -Wall -Werror subdir-objects])
+
+# Checks for programs.
+AC_PROG_CC
+
+PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_CHECK_HEADER([stdio.h])
+AC_CHECK_HEADER([stdlib.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+# Checks for library functions.
+
+# Makefiles
+AC_CONFIG_FILES([Makefile
+		 src/Makefile])
+
+AC_OUTPUT
diff --git a/sefht.geany b/sefht.geany
index 61561cac50bb552690e6844d3e902d93b7d94015..7f08fc451cc6a283db9e3e12a80fdf551b2e93cf 100644
--- a/sefht.geany
+++ b/sefht.geany
@@ -45,7 +45,7 @@ external_dirs=
 [build-menu]
 NF_00_LB=_Make
 NF_00_CM=make
-NF_00_WD=build
+NF_00_WD=%p/build
 NF_01_LB=Make (eigenes _Target)...
 NF_01_CM=
 NF_01_WD=
@@ -53,8 +53,12 @@ NF_03_LB=
 NF_03_CM=
 NF_03_WD=
 EX_00_LB=_Ausführen
-EX_00_CM=./src/a.out
-EX_00_WD=build
+EX_00_CM=./src/sefht.fcgi
+EX_00_WD=%p/build
 EX_01_LB=
 EX_01_CM=
 EX_01_WD=
+CFT_00_LB=_Compile
+CFT_00_CM=make
+CFT_00_WD=%p/build
+filetypes=C;
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..d2b854044a4a4ce5da025721f046c602a7e6dcd2
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,8 @@
+## Process this file with automake to produce Makefile.in
+
+AM_CFLAGS = -Wall -Wextra
+
+bin_PROGRAMS = sefht.fcgi
+
+sefht_fcgi_SOURCES =
+sefht_fcgi_SOURCES += main.c