-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- (djm) Use autoconf to detect various things; in preparation of more
portability
- Loading branch information
djm
committed
Apr 15, 2004
1 parent
acf77e9
commit 4b117ff
Showing
7 changed files
with
366 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# $Id$ | ||
|
||
prefix=@prefix@ | ||
exec_prefix=@exec_prefix@ | ||
bindir=@bindir@ | ||
sbindir=@sbindir@ | ||
libexecdir=@libexecdir@ | ||
datadir=@datadir@ | ||
mandir=@mandir@ | ||
mansubdir=@mansubdir@ | ||
sysconfdir=@sysconfdir@ | ||
piddir=@piddir@ | ||
srcdir=@srcdir@ | ||
top_srcdir=@top_srcdir@ | ||
VPATH=@srcdir@ | ||
CC=@CC@ | ||
LD=@LD@ | ||
CFLAGS=@CFLAGS@ | ||
CPPFLAGS=-I$(srcdir) @CPPFLAGS@ | ||
LIBS=@LIBS@ | ||
EXEEXT=@EXEEXT@ | ||
INSTALL=@INSTALL@ | ||
|
||
WARNFLAGS=\ | ||
-Wall -Waggregate-return -Wcast-align -Wcast-qual \ | ||
-Wmissing-declarations -Wmissing-prototypes -Wno-conversion \ | ||
-Wpointer-arith -Wshadow -Wuninitialized -Wcast-align \ | ||
-Wcast-qual -WformatC=2 -Wformat-nonliteral -Wwrite-strings \ | ||
#-Werror | ||
|
||
#CFLAGS+=-DFLOW_RB # Use red-black tree for flows | ||
CFLAGS+=-DFLOW_SPLAY # Use splay tree for flows | ||
CFLAGS+=-DEXPIRY_RB # Use red-black tree for expiry events | ||
#CFLAGS+=-DEXPIRY_SPLAY # Use splay tree for expiry events | ||
|
||
TARGETS=softflowd${EXEEXT} softflowctl${EXEEXT} | ||
|
||
all: $(TARGETS) | ||
|
||
softflowd${EXEEXT}: convtime.o softflowd.o | ||
$(CC) $(LDFLAGS) -o $@ softflowd.o convtime.o $(LIBS) | ||
|
||
softflowctl${EXEEXT}: convtime.o softflowctl.o | ||
$(CC) $(LDFLAGS) -o $@ softflowctl.o convtime.o $(LIBS) | ||
|
||
clean: | ||
rm -f $(TARGETS) *.o core *.core | ||
|
||
realclean: clean | ||
rm -rf autom4te.cache Makefile config.log config.status | ||
|
||
distclean: realclean | ||
rm -f config.h* configure | ||
|
||
strip: | ||
strip $(TARGETS) | ||
|
||
install: | ||
$(INSTALL) -m 0755 -s softflowd $(sbindir)/softflowd | ||
$(INSTALL) -m 0755 -s softflowctl $(isbindir)/softflowctl | ||
$(INSTALL) -m 0644 softflowd.8 $(mandir)/$(mansubdir)8/softflowd.8 | ||
$(INSTALL) -m 0644 softflowctl.8 $(mandir)/$(mansubdir)8/softflowctl.8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dnl Nothing here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# $Id$ | ||
# | ||
# Copyright (c) 2004 Damien Miller | ||
# | ||
# Permission to use, copy, modify, and distribute this software for any | ||
# purpose with or without fee is hereby granted, provided that the above | ||
# copyright notice and this permission notice appear in all copies. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
|
||
AC_INIT | ||
AC_CONFIG_SRCDIR([softflowd.c]) | ||
|
||
AC_CONFIG_HEADER(config.h) | ||
AC_PROG_CC | ||
AC_PROG_INSTALL | ||
|
||
dnl AC_CHECK_HEADERS(netinet/in_systm.h netinet/tcp.h netinet/udp.h) | ||
dnl | ||
dnl # This ugliness is because of autoconf's stupid default include list | ||
dnl AC_CHECK_HEADERS([netinet/ip.h], | ||
dnl [AC_DEFINE([HAVE_HAVE_NETINET_IP_H], 1, [has netinet/ip.h])], [], | ||
dnl [ | ||
dnl #include <sys/types.h> | ||
dnl #include <netinet/in.h> | ||
dnl #if HAVE_NETINET_IN_SYSTM_H | ||
dnl #include <netinet/in_systm.h> | ||
dnl #endif | ||
dnl ]) | ||
|
||
AC_CHECK_MEMBER([struct sockaddr.sa_len], | ||
[AC_DEFINE([SOCK_HAS_LEN], 1, [struct sockaddr contains length])], , | ||
[#include <sys/types.h> | ||
#include <sys/socket.h>]) | ||
|
||
AC_CHECK_LIB(pcap, pcap_open_live) | ||
|
||
AC_EXEEXT | ||
AC_CONFIG_FILES([Makefile]) | ||
AC_OUTPUT | ||
|
Oops, something went wrong.