+++ /dev/null
-all: blind_id
-
-OBJECTS = d0.o d0_blind_id.o d0_iobuf.o d0_bignum-gmp.o sha1.o main.o
-
-blind_id: $(OBJECTS)
- $(CC) $(LDFLAGS) -o $@ $^
-clean:
- $(RM) blind_id $(OBJECTS)
-
-CFLAGS += -Wall -Wextra
-CPPFLAGS += -I/opt/gmp/include
-LDFLAGS += -L/opt/gmp/lib -Wl,-rpath,/opt/gmp/lib -lgmp -lm -lrt -s -O3
--- /dev/null
+bin_PROGRAMS = blind_id
+blind_id_SOURCES = main.c
+blind_id_LDADD = libblind_id.la
+
+lib_LTLIBRARIES = libblind_id.la
+libblind_id_la_SOURCES = d0_bignum-gmp.c d0_blind_id.c d0.c d0_iobuf.c sha1.c
+libblind_id_la_LDFLAGS = -versioninfo 0:0:0
+# versioninfo:
+# - compatible interface change: c:r:a -> c+1:0:a+1
+# - incompatible interface change: c:r:a -> c+1:0:0
+# - internal change: c:r:a -> c:r+1:a
+
+library_includedir = $(includedir)
+library_include_HEADERS = d0_blind_id.h
--- /dev/null
+#!/bin/sh
+
+set -ex
+
+aclocal
+automake
+autoconf
--- /dev/null
+AC_INIT([d0_blind_id], [0.1], [divVerent@alientrap.org])
+AM_INIT_AUTOMAKE([-Wall foreign])
+AC_PROG_CC
+AM_PROG_LIBTOOL
+
+AC_SEARCH_LIBS(clock_gettime, rt, , [AC_MSG_ERROR([GNU MP not found, see http://gmplib.org/])])
+AC_SEARCH_LIBS(__gmpz_init, gmp, , [AC_MSG_ERROR([GNU MP not found, see http://gmplib.org/])])
+
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT