summaryrefslogtreecommitdiffstats
path: root/replace
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-05-18 14:45:41 -0400
committerSimo Sorce <ssorce@redhat.com>2009-05-19 11:09:45 -0400
commitc2d554258995afd79228f6d0296d4093730cb5bd (patch)
tree0811e0646a79943b0a606b2c455e5be330400b5c /replace
parent7d3d79c5b325ce5002c0f6a936b4e84d04edf5ce (diff)
downloadsssd-c2d554258995afd79228f6d0296d4093730cb5bd.tar.gz
sssd-c2d554258995afd79228f6d0296d4093730cb5bd.tar.xz
sssd-c2d554258995afd79228f6d0296d4093730cb5bd.zip
Enable automake builds for libreplace
Diffstat (limited to 'replace')
-rw-r--r--replace/Makefile.am50
-rw-r--r--replace/Makefile.in70
-rw-r--r--replace/acinclude.m4 (renamed from replace/aclocal.m4)0
-rw-r--r--replace/configure.ac10
4 files changed, 57 insertions, 73 deletions
diff --git a/replace/Makefile.am b/replace/Makefile.am
new file mode 100644
index 000000000..6a0cf573b
--- /dev/null
+++ b/replace/Makefile.am
@@ -0,0 +1,50 @@
+libreplace_sources = \
+ dlfcn.c \
+ getaddrinfo.c \
+ getifaddrs.c \
+ getpass.c \
+ inet_aton.c \
+ inet_ntoa.c \
+ inet_ntop.c \
+ inet_pton.c \
+ repdir_getdents.c \
+ repdir_getdirentries.c \
+ replace.c \
+ snprintf.c \
+ socket.c \
+ socketpair.c \
+ strptime.c \
+ timegm.c \
+ getaddrinfo.h \
+ replace.h \
+ win32_replace.h \
+ system/aio.h \
+ system/capability.h \
+ system/dir.h \
+ system/filesys.h \
+ system/glob.h \
+ system/iconv.h \
+ system/kerberos.h \
+ system/locale.h \
+ system/network.h \
+ system/passwd.h \
+ system/readline.h \
+ system/select.h \
+ system/shmem.h \
+ system/syslog.h \
+ system/terminal.h \
+ system/time.h \
+ system/wait.h
+
+noinst_LIBRARIES = \
+ libreplace.a
+
+libreplace_a_SOURCES =
+EXTRA_libreplace_a_SOURCES = \
+ $(libreplace_sources)
+libreplace_a_DEPENDENCIES = \
+ @LIBREPLACEOBJ@
+
+libreplace_a_LIBADD = \
+ @LIBREPLACEOBJ@
+
diff --git a/replace/Makefile.in b/replace/Makefile.in
deleted file mode 100644
index 0986d601a..000000000
--- a/replace/Makefile.in
+++ /dev/null
@@ -1,70 +0,0 @@
-#!gmake
-#
-CC = @CC@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-includedir = @includedir@
-libdir = @libdir@
-VPATH = @libreplacedir@
-srcdir = @srcdir@
-builddir = @builddir@
-sharedbuilddir = @sharedbuilddir@
-INSTALLCMD = @INSTALL@
-LIBS = @LIBS@
-
-.PHONY: test all showflags install installcheck clean distclean realdistclean
-
-CFLAGS += -I. @CFLAGS@
-LDFLAGS += @LDFLAGS@
-
-OBJS = @LIBREPLACEOBJ@
-
-all: showflags libreplace.a testsuite
-
-showflags:
- @echo 'libreplace will be compiled with flags:'
- @echo ' CC = $(CC)'
- @echo ' CFLAGS = $(CFLAGS)'
- @echo ' LDFLAGS= $(LDFLAGS)'
- @echo ' LIBS = $(LIBS)'
-
-install: all
- ${INSTALLCMD} -d $(libdir)
- ${INSTALLCMD} -m 644 libreplace.a $(libdir)
-
-shared-build: all
- ${INSTALLCMD} -d $(sharedbuilddir)/include
- ${INSTALLCMD} -m 644 replace.h $(sharedbuilddir)/include
- ${INSTALLCMD} -d $(sharedbuilddir)/lib
- ${INSTALLCMD} -m 644 libreplace.a $(sharedbuilddir)/lib
-
-libreplace.a: $(OBJS)
- ar -rcsv $@ $(OBJS)
-
-test: all
- ./testsuite
-
-installcheck: install test
-
-TEST_OBJS = test/main.o test/testsuite.o test/os2_delete.o test/strptime.o test/getifaddrs.o
-
-testsuite: libreplace.a $(TEST_OBJS)
- $(CC) -o testsuite $(TEST_OBJS) -L. -lreplace $(LDFLAGS) $(LIBS)
-
-.c.o:
- @echo Compiling $*.c
- @mkdir -p `dirname $@`
- @$(CC) $(CFLAGS) -c $< -o $@
-
-clean:
- rm -f *.o test/*.o *.a testsuite
- rm -f testfile.dat
-
-distclean: clean
- rm -f *~ */*~
- rm -f config.log config.status config.h config.cache
- rm -f Makefile
-
-realdistclean: distclean
- rm -f configure config.h.in
diff --git a/replace/aclocal.m4 b/replace/acinclude.m4
index 5605e476b..5605e476b 100644
--- a/replace/aclocal.m4
+++ b/replace/acinclude.m4
diff --git a/replace/configure.ac b/replace/configure.ac
index 0361825a0..c90e2a439 100644
--- a/replace/configure.ac
+++ b/replace/configure.ac
@@ -1,8 +1,10 @@
AC_PREREQ(2.50)
-AC_INIT(replace.c)
+AC_INIT([libreplace], [0.0])
AC_CONFIG_SRCDIR([replace.c])
AC_CONFIG_HEADER(config.h)
-
+AC_CONFIG_AUX_DIR([build])
+AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
+AC_PROG_RANLIB
CFLAGS="$CFLAGS -I$srcdir"
AC_LIBREPLACE_ALL_CHECKS
@@ -30,4 +32,6 @@ AC_SUBST(LIBS)
AC_SUBST(LDFLAGS)
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+
+AC_OUTPUT