|
|
|
odnl> Do not add anything above
|
|
|
|
AC_INIT([edge],@N2N_VERSION_SHORT@)
|
|
|
|
dnl> Do not add anything above
|
|
|
|
|
|
|
|
N2N_VERSION_SHORT=${PACKAGE_VERSION}
|
|
|
|
|
|
|
|
if test -d ".git"; then
|
|
|
|
# NOTE: keep in sync with the definitions for configure.in files under the packages folder
|
|
|
|
GIT_COMMITS=`git rev-list --count HEAD`
|
|
|
|
GIT_REVISION=`git rev-parse --short HEAD`
|
|
|
|
GIT_RELEASE="${N2N_VERSION_SHORT}.r${GIT_COMMITS}.${GIT_REVISION}"
|
|
|
|
else
|
|
|
|
GIT_RELEASE=${N2N_VERSION_SHORT}
|
|
|
|
fi
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
AC_CHECK_LIB([pcap], [pcap_open_live], pcap=true)
|
|
|
|
|
|
|
|
if test x$pcap != x; then
|
|
|
|
AC_DEFINE([N2N_HAVE_PCAP], [], [Have PCAP library])
|
|
|
|
ADDITIONAL_TOOLS="$ADDITIONAL_TOOLS n2n-decode"
|
|
|
|
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])
|
|
|
|
AC_DEFINE_UNQUOTED(GIT_RELEASE, "${GIT_RELEASE}", [GIT release])
|
|
|
|
|
|
|
|
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_MAJOR)
|
|
|
|
AC_SUBST(N2N_MINOR)
|
|
|
|
AC_SUBST(N2N_PATCH)
|
|
|
|
AC_SUBST(N2N_VERSION_SHORT)
|
|
|
|
AC_SUBST(GIT_COMMITS)
|
|
|
|
AC_SUBST(GIT_REVISION)
|
|
|
|
AC_SUBST(GIT_RELEASE)
|
|
|
|
AC_SUBST(N2N_DEFINES)
|
|
|
|
AC_SUBST(N2N_LIBS)
|
|
|
|
AC_SUBST(ADDITIONAL_TOOLS)
|
|
|
|
AC_CONFIG_HEADERS(config.h)
|
|
|
|
AC_CONFIG_FILES(Makefile)
|
|
|
|
AC_CONFIG_FILES(tools/Makefile)
|
|
|
|
|
|
|
|
AC_OUTPUT
|
|
|
|
|