From 28a2ee5c0e64ceb2a9c227bd965eabaf68b574c5 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 18 Dec 2012 00:56:36 -0500 Subject: [PATCH] Add a configure.ac, and replace the old makefile with two Makefile.am files. --- Makefile.am | 1 + configure.ac | 21 +++++++++++++++++++++ makefile | 34 ---------------------------------- src/Makefile.am | 2 ++ 4 files changed, 24 insertions(+), 34 deletions(-) create mode 100644 Makefile.am create mode 100644 configure.ac delete mode 100644 makefile create mode 100644 src/Makefile.am diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..af437a6 --- /dev/null +++ b/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = src diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..7fe6637 --- /dev/null +++ b/configure.ac @@ -0,0 +1,21 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.68]) +AC_INIT([reapply_default_acl], [0.0.2], [michael@orlitzky.com]) +AM_INIT_AUTOMAKE +AC_CONFIG_SRCDIR([src/reapply_default_acl.c]) +AC_CONFIG_FILES([Makefile src/Makefile]) + +# Checks for programs. +AC_PROG_CC + +# Checks for header files. +AC_CHECK_HEADERS([limits.h stdlib.h string.h sys/acl.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_TYPE_MODE_T + + +AC_OUTPUT diff --git a/makefile b/makefile deleted file mode 100644 index 0da82fe..0000000 --- a/makefile +++ /dev/null @@ -1,34 +0,0 @@ -VERSION = 0.0.1 -BIN = reapply_default_acl -P = $(BIN)-$(VERSION) -TARBALL = $(BIN)-$(VERSION).tar.bz2 - -CC := gcc -CFLAGS := -O2 -march=native -pipe -Wall -LIBS = -lacl - -SOURCES = $(shell find ./src -type f -name '*.c') -HEADERS = $(shell find ./src -type f -name '*.h') -OBJS = $(patsubst %.c, %.o, $(SOURCES)) - -%.o: %.c $(HEADERS) - $(CC) $(CFLAGS) -c -o $@ $< - -$(BIN): $(OBJS) - $(CC) $(CFLAGS) $(LIBS) -o $@ $^ - -.PHONY: clean test - -clean: - rm -f $(OBJS) - rm -f $(BIN) - rm -f $(TARBALL) - rm -rf $(P) - -test: $(BIN) - ./run-tests.sh - -dist: clean - mkdir $(P) - cp -a doc makefile src $(P) - tar -cjf $(TARBALL) $(P) diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..1e494f4 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,2 @@ +bin_PROGRAMS = reapply_default_acl +reapply_default_acl_LDFLAGS = -lacl -- 2.43.2