]> gitweb.michael.orlitzky.com - apply-default-acl.git/commitdiff
Add a configure.ac, and replace the old makefile with two Makefile.am files.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 18 Dec 2012 05:56:36 +0000 (00:56 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 18 Dec 2012 05:56:36 +0000 (00:56 -0500)
Makefile.am [new file with mode: 0644]
configure.ac [new file with mode: 0644]
makefile [deleted file]
src/Makefile.am [new file with mode: 0644]

diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..af437a6
--- /dev/null
@@ -0,0 +1 @@
+SUBDIRS = src
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..7fe6637
--- /dev/null
@@ -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 (file)
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 (file)
index 0000000..1e494f4
--- /dev/null
@@ -0,0 +1,2 @@
+bin_PROGRAMS = reapply_default_acl
+reapply_default_acl_LDFLAGS = -lacl