diff --git a/.gitignore b/.gitignore index 6fb5d60..46c3668 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,26 @@ -echoc +*.la +*.lo *.o *~ +.deps +.libs +m4/*.m4 +Makefile +Makefile.in +aclocal.m4 +autom4te.cache +compile +config.guess +config.h +config.h.in +config.log +config.status +config.sub +configure +depcomp +install-sh +libtool +ltmain.sh +missing +stamp-* +obj* diff --git a/Makefile b/Makefile deleted file mode 100644 index 16f7a91..0000000 --- a/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# - -PROG= echoc -SRCS= echoc.c - -OBJS= $(SRCS:%.c=%.o) - -LIBS= -lbsd - -all: $(PROG) - -$(PROG): $(OBJS) - $(CC) -o $@ $(OBJS) $(LIBS) - -clean: - rm -f $(OBJS) $(PROG) - -.c.o: - $(CC) -c $(CFLAGS) -o $@ $< diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..c30d877 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,5 @@ +bin_PROGRAMS = echoc + +AM_CFLAGS = -g -Wall + +dist_man_MANS = echoc.1 diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..ecee3c3 --- /dev/null +++ b/configure.ac @@ -0,0 +1,10 @@ +AC_PREREQ([2.65]) +AC_INIT([echoc], 0.3.99, [https://chiliproject.tetaneutral.net/projects/git-tetaneutral-net/repository/echoc], echoc) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AC_CONFIG_MACRO_DIR([m4]) +AC_PROG_CC + +AC_CHECK_HEADERS([bsd/stdlib.h]) +AC_SEARCH_LIBS(strtonum, [bsd]) + +AC_OUTPUT([Makefile]) diff --git a/echoc.c b/echoc.c index 591d698..993a8a2 100644 --- a/echoc.c +++ b/echoc.c @@ -19,7 +19,9 @@ #include #include +#ifdef HAVE_BSD_STDLIB_H #include +#endif #include #include