mirror of
https://github.com/ntop/n2n.git
synced 2024-11-27 11:54:34 +08:00
Added configure and autogen.sh
This commit is contained in:
parent
75adf2fa06
commit
a80fa1dd27
@ -1,6 +1,5 @@
|
||||
|
||||
N2N_VERSION=2.5.0
|
||||
N2N_OSNAME=$(shell uname -p)
|
||||
N2N_VERSION=@N2N_VERSION@
|
||||
|
||||
########
|
||||
|
||||
@ -13,19 +12,11 @@ WARN?=-Wall -Wshadow -Wpointer-arith -Wmissing-declarations -Wnested-externs
|
||||
#(thanks to Robert Gibbon)
|
||||
PLATOPTS_SPARC64=-mcpu=ultrasparc -pipe -fomit-frame-pointer -ffast-math -finline-functions -fweb -frename-registers -mapp-regs
|
||||
|
||||
N2N_DEFINES=
|
||||
N2N_OBJS_OPT=
|
||||
LIBS_EDGE_OPT=
|
||||
LIBS_EDGE_OPT=@N2N_LIBS@
|
||||
|
||||
N2N_OPTION_AES?="yes"
|
||||
#N2N_OPTION_AES=no
|
||||
|
||||
ifeq ($(N2N_OPTION_AES), "yes")
|
||||
N2N_DEFINES+=-DN2N_HAVE_AES
|
||||
LIBS_EDGE_OPT+=-lcrypto
|
||||
endif
|
||||
|
||||
CFLAGS+=$(DEBUG) $(OPTIMIZATION) $(WARN) $(OPTIONS) $(PLATOPTS) $(N2N_DEFINES)
|
||||
CFLAGS+=$(DEBUG) $(OPTIMIZATION) $(WARN) $(OPTIONS) $(PLATOPTS)
|
||||
|
||||
INSTALL=install
|
||||
MKDIR=mkdir -p
|
||||
@ -97,7 +88,7 @@ $(N2N_LIB): $(N2N_OBJS)
|
||||
# $(RANLIB) $@
|
||||
|
||||
version.o: Makefile
|
||||
$(CC) $(CFLAGS) -DN2N_VERSION='"$(N2N_VERSION)"' -DN2N_OSNAME='"$(N2N_OSNAME)"' -c version.c
|
||||
$(CC) $(CFLAGS) -c version.c
|
||||
|
||||
clean:
|
||||
rm -rf $(N2N_OBJS) $(N2N_LIB) $(APPS) $(DOCS) test *.dSYM *~
|
1438
config.guess
vendored
Executable file
1438
config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
51
configure.ac
Normal file
51
configure.ac
Normal file
@ -0,0 +1,51 @@
|
||||
odnl> Do not add anything above
|
||||
AC_INIT([edge],2.5.0)
|
||||
dnl> Do not add anything above
|
||||
|
||||
N2N_VERSION=2.5.0
|
||||
|
||||
AC_CHECK_LIB([crypto], [AES_cbc_encrypt])
|
||||
|
||||
N2N_LIBS=
|
||||
|
||||
if test "x$ac_cv_lib_crypto_AES_cbc_encrypt" != xyes; then
|
||||
AC_MSG_RESULT(Building n2n without AES support)
|
||||
else
|
||||
AC_DEFINE([N2N_HAVE_AES], [], [Have AES support])
|
||||
N2N_LIBS=-lcrypto
|
||||
fi
|
||||
|
||||
MACHINE=`uname -m`
|
||||
SYSTEM=`uname -s`
|
||||
|
||||
if test $SYSTEM = "Linux"; then
|
||||
if test -f /etc/debian_version; then
|
||||
DEBIAN_VERSION=`cat /etc/debian_version`
|
||||
OSNAME="Debian $DEBIAN_VERSION"
|
||||
else
|
||||
OSNAME=`./config.guess`
|
||||
fi
|
||||
else
|
||||
dnl> wget -O config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
|
||||
OSNAME=`./config.guess`
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_OSNAME, "${OSNAME}", [OS name])
|
||||
|
||||
if test $MACHINE = "x86_64"; then
|
||||
EXTN="amd64"
|
||||
else
|
||||
if test $MACHINE = "i686"; then
|
||||
EXTN="i386"
|
||||
fi
|
||||
fi
|
||||
|
||||
DATE=`date +"%Y-%m-%d"`
|
||||
|
||||
AC_SUBST(N2N_VERSION)
|
||||
AC_SUBST(N2N_DEFINES)
|
||||
AC_SUBST(N2N_LIBS)
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
AC_CONFIG_FILES(Makefile)
|
||||
|
||||
AC_OUTPUT
|
||||
|
2
n2n.h
2
n2n.h
@ -41,6 +41,8 @@
|
||||
#undef N2N_HAVE_SETUID
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
|
Loading…
Reference in New Issue
Block a user