Permalink
Browse files

Properly autotoolize package.

Use automake rather than hand-tailor a Makefile.in that has a few mistakes
in it.

Make it possible to disable knockd at ./configure time.

Fail if knockd is to be built and libpcap is not found.

Remove all checks that were not used.

Ignore extra files.
  • Loading branch information...
1 parent 42c6c9e commit 9d5e6f0709c3425adb2b2e23f0086d7e9b6dfed3 @Flameeyes committed Feb 15, 2012
Showing with 53 additions and 6,913 deletions.
  1. +20 −0 .gitignore
  2. +21 −0 Makefile.am
  3. +0 −85 Makefile.in
  4. +0 −159 config.h.in
  5. +0 −6,390 configure
  6. +12 −28 configure.ac
  7. +0 −251 install-sh
View
@@ -0,0 +1,20 @@
+*.o
+*~
+.deps
+/Makefile
+/Makefile.in
+/aclocal.m4
+/autom4te.cache/
+/config.h
+/config.h.in
+/config.log
+/config.status
+/configure
+/depcomp
+/doc/*.1
+/install-sh
+/knock
+/knock-*.tar.*
+/knockd
+/missing
+/stamp-h1
View
@@ -0,0 +1,21 @@
+AM_CFLAGS=-g -Wall -pedantic -fno-exceptions
+
+bin_PROGRAMS = knock
+
+man_MANS = doc/knock.1
+
+if BUILD_KNOCKD
+sbin_PROGRAMS = knockd
+man_MANS += doc/knockd.1
+sysconf_DATA = knockd.conf
+endif
+
+dist_doc_DATA = README TODO ChangeLog COPYING
+
+knock_SOURCES = src/knock.c
+knockd_SOURCES = src/knockd.c src/list.c src/list.h
+
+%.1: %.1.in
+ sed -e "s/#VERSION#/$(VERSION)/" $< > $@
+
+EXTRA_DIST = doc/knock.1 doc/knock.1.in doc/knockd.1 doc/knockd.1.in knockd.conf
View
@@ -1,85 +0,0 @@
-#
-# knock
-#
-# Copyright (c) 2004 by Judd Vinet <jvinet@zeroflux.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-# USA.
-#
-
-DESTDIR =
-prefix = @prefix@
-exec_prefix = @prefix@
-
-VERSION = 0.5
-
-BINDIR = @bindir@
-SBINDIR = @sbindir@
-MANDIR = @mandir@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-
-TOPDIR = @srcdir@
-SRCDIR = $(TOPDIR)/src/
-OBJDIR = $(TOPDIR)/src/
-MANSRC = $(TOPDIR)/doc/
-
-CXX = @CC@
-CXXFLAGS += @CFLAGS@ -g -Wall -pedantic -fno-exceptions \
- -D_GNU_SOURCE -I.
-LDFLAGS += @LDFLAGS@
-
-SRCS = $(SRCDIR)knockd.c \
- $(SRCDIR)knock.c \
- $(SRCDIR)list.c
-
-all: knockd knock man
-
-knockd: $(OBJDIR)knockd.o $(OBJDIR)list.o
- $(CXX) $(OBJDIR)knockd.o $(OBJDIR)list.o -o $@ $(LDFLAGS) -lpcap
-
-knock: $(OBJDIR)knock.o
- $(CXX) $(OBJDIR)knock.o -o $@ $(LDFLAGS)
-
-.c.o: $(SRCS)
- $(CXX) $(CXXFLAGS) -o $@ -c $<
-
-man: $(MANSRC)knockd.1 $(MANSRC)knock.1
-
-%.1: %.1.in
- sed -e "s/#VERSION#/$(VERSION)/" $< > $@
-
-dist: distclean
- (cd ..; tar czvf knock-$(VERSION).tar.gz knock-$(VERSION))
-
-install: all
- $(INSTALL) -D -m0755 knockd $(DESTDIR)$(SBINDIR)/knockd
- $(INSTALL) -D -m0755 knock $(DESTDIR)$(BINDIR)/knock
- $(INSTALL) -D -m0644 $(MANSRC)knockd.1 $(DESTDIR)$(MANDIR)/man1/knockd.1
- $(INSTALL) -D -m0644 $(MANSRC)knock.1 $(DESTDIR)$(MANDIR)/man1/knock.1
- $(INSTALL) -D -m0644 knockd.conf $(DESTDIR)/etc/knockd.conf
-
-clean:
- rm -f *~ $(OBJDIR)*.o $(MANSRC)*.1
-
-distclean: clean
- rm -f knockd knock
- rm -f Makefile
- rm -f config.h config.status config.log
-
-# End of file
View
@@ -1,159 +0,0 @@
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the <arpa/inet.h> header file. */
-#undef HAVE_ARPA_INET_H
-
-/* Define to 1 if you have the `bzero' function. */
-#undef HAVE_BZERO
-
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
-#undef HAVE_DOPRNT
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define to 1 if you have the `fork' function. */
-#undef HAVE_FORK
-
-/* Define to 1 if you have the `gethostbyaddr' function. */
-#undef HAVE_GETHOSTBYADDR
-
-/* Define to 1 if you have the `gethostbyname' function. */
-#undef HAVE_GETHOSTBYNAME
-
-/* Define to 1 if you have the `inet_ntoa' function. */
-#undef HAVE_INET_NTOA
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `pcap' library (-lpcap). */
-#undef HAVE_LIBPCAP
-
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
- to 0 otherwise. */
-#undef HAVE_MALLOC
-
-/* Define to 1 if you have the `memmove' function. */
-#undef HAVE_MEMMOVE
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the `memset' function. */
-#undef HAVE_MEMSET
-
-/* Define to 1 if you have the <netdb.h> header file. */
-#undef HAVE_NETDB_H
-
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#undef HAVE_NETINET_IN_H
-
-/* Define to 1 if your system has a GNU libc compatible `realloc' function,
- and to 0 otherwise. */
-#undef HAVE_REALLOC
-
-/* Define to 1 if you have the `socket' function. */
-#undef HAVE_SOCKET
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the `strchr' function. */
-#undef HAVE_STRCHR
-
-/* Define to 1 if you have the `strdup' function. */
-#undef HAVE_STRDUP
-
-/* Define to 1 if you have the `strerror' function. */
-#undef HAVE_STRERROR
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the `strstr' function. */
-#undef HAVE_STRSTR
-
-/* Define to 1 if you have the <syslog.h> header file. */
-#undef HAVE_SYSLOG_H
-
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
-#undef HAVE_SYS_IOCTL_H
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#undef HAVE_SYS_SOCKET_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
-#undef HAVE_SYS_WAIT_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the `vfork' function. */
-#undef HAVE_VFORK
-
-/* Define to 1 if you have the <vfork.h> header file. */
-#undef HAVE_VFORK_H
-
-/* Define to 1 if you have the `vprintf' function. */
-#undef HAVE_VPRINTF
-
-/* Define to 1 if `fork' works. */
-#undef HAVE_WORKING_FORK
-
-/* Define to 1 if `vfork' works. */
-#undef HAVE_WORKING_VFORK
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define as the return type of signal handlers (`int' or `void'). */
-#undef RETSIGTYPE
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to 1 if your <sys/time.h> declares `struct tm'. */
-#undef TM_IN_SYS_TIME
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to rpl_malloc if the replacement function should be used. */
-#undef malloc
-
-/* Define to `int' if <sys/types.h> does not define. */
-#undef pid_t
-
-/* Define to rpl_realloc if the replacement function should be used. */
-#undef realloc
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-#undef size_t
-
-/* Define as `fork' if `vfork' does not work. */
-#undef vfork
Oops, something went wrong.

0 comments on commit 9d5e6f0

Please sign in to comment.