From 370e57ec9b30b8022385123870cf34c327baed19 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 24 Apr 2010 20:29:43 +0200 Subject: [PATCH] initial autoconf stuff --- Makefile | 12 ------------ Makefile.am | 14 ++++++++++++++ autogen.sh | 7 +++++++ configure.ac | 11 +++++++++++ 4 files changed, 32 insertions(+), 12 deletions(-) delete mode 100644 Makefile create mode 100644 Makefile.am create mode 100644 autogen.sh create mode 100644 configure.ac diff --git a/Makefile b/Makefile deleted file mode 100644 index 8534658..0000000 --- a/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -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 diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..803afe3 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,14 @@ +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 diff --git a/autogen.sh b/autogen.sh new file mode 100644 index 0000000..ba97cb9 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +set -ex + +aclocal +automake +autoconf diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..65b2ea8 --- /dev/null +++ b/configure.ac @@ -0,0 +1,11 @@ +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 -- 2.39.2