summaryrefslogtreecommitdiff
path: root/replace
diff options
context:
space:
mode:
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 00000000..6a0cf573
--- /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 0986d601..00000000
--- 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 5605e476..5605e476 100644
--- a/replace/aclocal.m4
+++ b/replace/acinclude.m4
diff --git a/replace/configure.ac b/replace/configure.ac
index 0361825a..c90e2a43 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