diff --git a/lib/Makefile.am b/lib/Makefile.am
index 80455690d1180d974b6866c08424eadd5280d86f..7edac1f2fb405ae1fdd3c81efd886dc57b434d38 100644 (file)
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
xmalloc.c
-libcoreutils_a_LIBADD = $(LIBOBJS)
+libcoreutils_a_LIBADD = $(LIBOBJS) $(ALLOCA)
libcoreutils_a_DEPENDENCIES = $(libcoreutils_a_LIBADD)
+lib_OBJECTS = $(libcoreutils_a_OBJECTS)
libnagiosplug_a_SOURCES = snprintf.c utils_base.c utils_disk.c
EXTRA_DIST += utils_base.h utils_disk.h
sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' $(srcdir)/stdbool_.h > $@t
mv $@t $@
+BUILT_SOURCES += $(ALLOCA_H)
+EXTRA_DIST += alloca_.h
+
+# We need the following in order to create an <alloca.h> when the system
+# doesn't have one that works with the given compiler
+all-local $(lib_OBJECTS): $(ALLOCA_H)
+alloca.h: alloca_.h
+ cp $(srcdir)/alloca_.h $@-t
+ mv $@-t $@
+MOSTLYCLEANFILES += alloca.h alloca.h-t
+
BUILT_SOURCES += $(GETOPT_H)
EXTRA_DIST += getopt_.h getopt_int.h