2017-02-02 11:34:37 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
dnl
|
|
|
|
dnl This file is free software; as a special exception the author gives
|
|
|
|
dnl unlimited permission to copy and/or distribute it, with or without
|
|
|
|
dnl modifications, as long as this notice is preserved.
|
|
|
|
dnl
|
|
|
|
dnl This program is distributed in the hope that it will be useful, but
|
|
|
|
dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
|
|
|
dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
2018-08-17 04:28:50 +00:00
|
|
|
AC_INIT([NextEPC], [0.3.10], [acetcom@gmail.com])
|
2017-02-02 11:34:37 +00:00
|
|
|
|
2017-11-07 12:41:20 +00:00
|
|
|
AC_SUBST(LIBVERSION)
|
|
|
|
LIBVERSION=1:0:0
|
|
|
|
|
2017-02-02 11:34:37 +00:00
|
|
|
CORE_CONFIG_NICE(config.nice)
|
|
|
|
|
|
|
|
dnl Must come before AM_INIT_AUTOMAKE.
|
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
2018-02-06 02:59:49 +00:00
|
|
|
AC_CONFIG_TESTDIR(test)
|
2017-11-07 15:00:57 +00:00
|
|
|
AM_INIT_AUTOMAKE([1.10 -Wall -Werror foreign subdir-objects])
|
2017-02-02 11:34:37 +00:00
|
|
|
|
|
|
|
# Where to generate output; srcdir location.
|
|
|
|
AC_CONFIG_HEADERS([config.h:config.in])dnl Keep filename to 8.3 for MS-DOS.
|
|
|
|
AC_CONFIG_SRCDIR([main.c])
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
2017-12-08 06:05:50 +00:00
|
|
|
LO_DEV="lo0"
|
2017-02-02 11:34:37 +00:00
|
|
|
case $host in
|
2017-02-26 04:09:40 +00:00
|
|
|
*linux*)
|
|
|
|
OSDIR="unix"
|
|
|
|
OSCPPFLAGS="-DLINUX=1"
|
2017-09-06 06:02:43 +00:00
|
|
|
IPFW_CPPFLAGS="-DNEED_SYSCTLBYNAME -DNEED_SIN_LEN"
|
2017-12-08 06:05:50 +00:00
|
|
|
LO_DEV="lo"
|
2017-02-26 04:09:40 +00:00
|
|
|
;;
|
|
|
|
*-apple-darwin*)
|
|
|
|
OSDIR="unix"
|
2017-10-14 15:45:49 +00:00
|
|
|
OSCPPFLAGS="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK"
|
2017-02-26 04:09:40 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
OSDIR="unix"
|
|
|
|
;;
|
2017-02-02 11:34:37 +00:00
|
|
|
esac
|
2017-02-26 04:12:06 +00:00
|
|
|
AC_SUBST(OSCPPFLAGS)
|
2017-02-02 11:34:37 +00:00
|
|
|
AC_SUBST(OSDIR)
|
2017-09-06 06:02:43 +00:00
|
|
|
AC_SUBST(IPFW_CPPFLAGS)
|
2017-12-08 06:05:50 +00:00
|
|
|
AC_SUBST(LO_DEV)
|
2017-02-02 11:34:37 +00:00
|
|
|
|
|
|
|
AH_TOP([
|
2017-07-10 05:33:46 +00:00
|
|
|
#ifndef __NEXTEPC_CONFIG_H__
|
|
|
|
#define __NEXTEPC_CONFIG_H__
|
2017-02-02 11:34:37 +00:00
|
|
|
/* need this, because some autoconf tests rely on this (e.g. stpcpy)
|
|
|
|
* and it should be used for new programs */
|
2017-09-29 10:12:42 +00:00
|
|
|
#define _DEFAULT_SOURCE 1
|
2017-09-29 12:22:03 +00:00
|
|
|
#define _BSD_SOURCE 1
|
2017-02-02 11:34:37 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
AH_BOTTOM([
|
2017-07-10 05:33:46 +00:00
|
|
|
#endif /* __NEXTEPC_CONFIG_H__ */
|
2017-02-02 11:34:37 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
AH_VERBATIM([_REENTRANT],
|
|
|
|
[/* To allow the use of core in multithreaded programs we have to use
|
|
|
|
special features from the library. */
|
|
|
|
#ifndef _REENTRANT
|
|
|
|
# define _REENTRANT 1
|
|
|
|
#endif
|
|
|
|
])
|
|
|
|
|
2017-10-27 03:15:14 +00:00
|
|
|
dnl kernel style compile messages
|
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|
|
|
|
2017-07-20 14:07:37 +00:00
|
|
|
dnl Checks CC and freinds
|
2017-10-27 03:15:14 +00:00
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_MKDIR_P
|
2017-02-02 11:34:37 +00:00
|
|
|
AC_PROG_CC
|
2018-02-11 12:07:09 +00:00
|
|
|
AM_PROG_CC_C_O
|
2017-02-02 11:34:37 +00:00
|
|
|
AC_PROG_INSTALL
|
|
|
|
AM_PROG_AR
|
2017-11-07 15:00:57 +00:00
|
|
|
LT_INIT([pic-only disable-static])
|
2017-02-02 11:34:37 +00:00
|
|
|
|
2017-10-27 03:15:14 +00:00
|
|
|
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
|
|
|
if test "x$PKG_CONFIG" = "xno"; then
|
|
|
|
AC_MSG_ERROR([You need to install pkg-config])
|
|
|
|
fi
|
|
|
|
PKG_PROG_PKG_CONFIG([0.20])
|
|
|
|
|
2017-02-08 03:48:35 +00:00
|
|
|
dnl Checks for compile flag
|
2017-03-02 02:43:26 +00:00
|
|
|
AX_CHECK_COMPILE_FLAG([-Wno-unused-result], [CFLAGS="$CFLAGS -Wno-unused-result"])
|
2017-02-08 03:48:35 +00:00
|
|
|
|
2017-02-02 11:34:37 +00:00
|
|
|
dnl Checks for pointer size
|
|
|
|
AC_CHECK_SIZEOF(void*, 4)
|
|
|
|
|
|
|
|
dnl Checks for integer size
|
|
|
|
AC_CHECK_SIZEOF(char, 1)
|
|
|
|
AC_CHECK_SIZEOF(int, 4)
|
|
|
|
AC_CHECK_SIZEOF(long, 4)
|
|
|
|
AC_CHECK_SIZEOF(short, 2)
|
|
|
|
AC_CHECK_SIZEOF(long long, 8)
|
|
|
|
|
|
|
|
if test "$ac_cv_sizeof_short" = "2"; then
|
|
|
|
short_value=short
|
|
|
|
fi
|
|
|
|
if test "$ac_cv_sizeof_int" = "4"; then
|
|
|
|
int_value=int
|
|
|
|
fi
|
|
|
|
# Now we need to find what c_int64_t (sizeof == 8) will be.
|
|
|
|
# The first match is our preference.
|
|
|
|
if test "$ac_cv_sizeof_int" = "8"; then
|
|
|
|
int64_literal='#define C_INT64_C(val) (val)'
|
|
|
|
uint64_literal='#define C_UINT64_C(val) (val##U)'
|
|
|
|
int64_t_fmt='#define C_INT64_T_FMT "d"'
|
|
|
|
uint64_t_fmt='#define C_UINT64_T_FMT "u"'
|
|
|
|
uint64_t_hex_fmt='#define C_UINT64_T_HEX_FMT "x"'
|
|
|
|
int64_value="int"
|
|
|
|
long_value=int
|
|
|
|
int64_strfn="strtoi"
|
|
|
|
elif test "$ac_cv_sizeof_long" = "8"; then
|
|
|
|
int64_literal='#define C_INT64_C(val) (val##L)'
|
|
|
|
uint64_literal='#define C_UINT64_C(val) (val##UL)'
|
|
|
|
int64_t_fmt='#define C_INT64_T_FMT "ld"'
|
|
|
|
uint64_t_fmt='#define C_UINT64_T_FMT "lu"'
|
|
|
|
uint64_t_hex_fmt='#define C_UINT64_T_HEX_FMT "lx"'
|
|
|
|
int64_value="long"
|
|
|
|
long_value=long
|
|
|
|
int64_strfn="strtol"
|
|
|
|
elif test "$ac_cv_sizeof_long_long" = "8"; then
|
|
|
|
int64_literal='#define C_INT64_C(val) (val##LL)'
|
|
|
|
uint64_literal='#define C_UINT64_C(val) (val##ULL)'
|
|
|
|
# Linux, Solaris, FreeBSD all support ll with printf.
|
|
|
|
# BSD 4.4 originated 'q'. Solaris is more popular and
|
|
|
|
# doesn't support 'q'. Solaris wins. Exceptions can
|
|
|
|
# go to the OS-dependent section.
|
|
|
|
int64_t_fmt='#define C_INT64_T_FMT "lld"'
|
|
|
|
uint64_t_fmt='#define C_UINT64_T_FMT "llu"'
|
|
|
|
uint64_t_hex_fmt='#define C_UINT64_T_HEX_FMT "llx"'
|
|
|
|
int64_value="long long"
|
|
|
|
long_value="long long"
|
|
|
|
int64_strfn="strtoll"
|
|
|
|
elif test "$ac_cv_sizeof_longlong" = "8"; then
|
|
|
|
int64_literal='#define C_INT64_C(val) (val##LL)'
|
|
|
|
uint64_literal='#define C_UINT64_C(val) (val##ULL)'
|
|
|
|
int64_t_fmt='#define C_INT64_T_FMT "qd"'
|
|
|
|
uint64_t_fmt='#define C_UINT64_T_FMT "qu"'
|
|
|
|
uint64_t_hex_fmt='#define C_UINT64_T_HEX_FMT "qx"'
|
|
|
|
int64_value="__int64"
|
|
|
|
long_value="__int64"
|
|
|
|
int64_strfn="strtoll"
|
|
|
|
else
|
|
|
|
# int64_literal may be overriden if your compiler thinks you have
|
|
|
|
# a 64-bit value but CORE does not agree.
|
|
|
|
AC_ERROR([could not detect a 64-bit integer type])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(short_value)
|
|
|
|
AC_SUBST(int_value)
|
|
|
|
AC_SUBST(long_value)
|
|
|
|
AC_SUBST(int64_value)
|
|
|
|
AC_SUBST(int64_t_fmt)
|
|
|
|
AC_SUBST(uint64_t_fmt)
|
|
|
|
AC_SUBST(uint64_t_hex_fmt)
|
|
|
|
AC_SUBST(int64_literal)
|
|
|
|
AC_SUBST(uint64_literal)
|
|
|
|
|
2017-10-24 06:55:28 +00:00
|
|
|
AC_CHECK_SIZEOF(pid_t, 8)
|
|
|
|
|
|
|
|
if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then
|
|
|
|
pid_t_fmt='#define C_PID_T_FMT "hd"'
|
|
|
|
elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_int"; then
|
|
|
|
pid_t_fmt='#define C_PID_T_FMT "d"'
|
|
|
|
elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_long"; then
|
|
|
|
pid_t_fmt='#define C_PID_T_FMT "ld"'
|
|
|
|
elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_long_long"; then
|
|
|
|
pid_t_fmt='#define C_PID_T_FMT APR_INT64_T_FMT'
|
|
|
|
else
|
|
|
|
pid_t_fmt='#error Can not determine the proper size for pid_t'
|
|
|
|
fi
|
|
|
|
|
|
|
|
case $host in
|
|
|
|
*-solaris*)
|
|
|
|
if test "$ac_cv_sizeof_long" = "8"; then
|
|
|
|
pid_t_fmt='#define C_PID_T_FMT "d"'
|
|
|
|
else
|
|
|
|
pid_t_fmt='#define C_PID_T_FMT "ld"'
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
AC_SUBST(pid_t_fmt)
|
|
|
|
|
2017-02-02 11:34:37 +00:00
|
|
|
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
|
2017-09-28 08:00:27 +00:00
|
|
|
[`echo $PACKAGE_VERSION | $SED 's/^\([[^\.]]\+\)\.\([[^\.]]\+\)\.\([[^\.]]\+\).*/\1/'`],
|
2017-02-02 11:34:37 +00:00
|
|
|
[Major version of this package])
|
|
|
|
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
|
2017-09-28 08:00:27 +00:00
|
|
|
[`echo $PACKAGE_VERSION | $SED 's/^\([[^\.]]\+\)\.\([[^\.]]\+\)\.\([[^\.]]\+\).*/\2/'`],
|
2017-02-02 11:34:37 +00:00
|
|
|
[Minor version of this package])
|
|
|
|
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
|
2017-09-28 08:00:27 +00:00
|
|
|
[`echo $PACKAGE_VERSION | $SED 's/^\([[^\.]]\+\)\.\([[^\.]]\+\)\.\([[^\.]]\+\).*/\3/'`],
|
2017-02-02 11:34:37 +00:00
|
|
|
[Patch version of this package])
|
|
|
|
|
2017-10-24 10:14:09 +00:00
|
|
|
##################################
|
|
|
|
#### Checks for Directories. #####
|
|
|
|
##################################
|
2017-10-17 20:51:28 +00:00
|
|
|
|
2017-10-27 03:15:14 +00:00
|
|
|
adl_RECURSIVE_EVAL(["${bindir}"], [BIN_DIR])
|
2017-10-17 20:51:28 +00:00
|
|
|
adl_RECURSIVE_EVAL(["${libdir}"], [LIB_DIR])
|
|
|
|
adl_RECURSIVE_EVAL(["${sysconfdir}"], [SYSCONF_DIR])
|
2017-10-23 06:00:07 +00:00
|
|
|
adl_RECURSIVE_EVAL(["${localstatedir}"], [LOCALSTATE_DIR])
|
2017-10-27 03:15:14 +00:00
|
|
|
AC_SUBST(BIN_DIR)
|
2017-10-17 20:51:28 +00:00
|
|
|
AC_SUBST(LIB_DIR)
|
|
|
|
AC_SUBST(SYSCONF_DIR)
|
2017-10-23 06:00:07 +00:00
|
|
|
AC_SUBST(LOCALSTATE_DIR)
|
2017-10-17 20:51:28 +00:00
|
|
|
|
2017-02-02 11:34:37 +00:00
|
|
|
##################################
|
|
|
|
#### Checks for header files. ####
|
|
|
|
##################################
|
|
|
|
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS( \
|
|
|
|
arpa/inet.h \
|
|
|
|
ctype.h \
|
|
|
|
errno.h \
|
|
|
|
fcntl.h \
|
|
|
|
ifaddrs.h \
|
|
|
|
limits.h \
|
|
|
|
netdb.h \
|
|
|
|
pthread.h \
|
|
|
|
regex.h \
|
|
|
|
semaphore.h \
|
|
|
|
signal.h \
|
|
|
|
stdarg.h \
|
|
|
|
stdio.h \
|
|
|
|
stdint.h \
|
|
|
|
stdlib.h \
|
|
|
|
string.h \
|
|
|
|
strings.h \
|
|
|
|
time.h \
|
|
|
|
unistd.h \
|
|
|
|
net/if_dl.h \
|
2017-04-18 05:01:43 +00:00
|
|
|
net/if.h \
|
2017-02-02 11:34:37 +00:00
|
|
|
netinet/ether.h \
|
|
|
|
netinet/in.h \
|
2017-10-12 14:01:51 +00:00
|
|
|
netinet/in_systm.h \
|
2017-09-29 12:22:03 +00:00
|
|
|
netinet/udp.h \
|
|
|
|
netinet/tcp.h \
|
2017-02-02 11:34:37 +00:00
|
|
|
netinet/sctp.h \
|
2017-10-17 11:44:05 +00:00
|
|
|
usrsctp.h \
|
2017-02-02 11:34:37 +00:00
|
|
|
sys/ioctl.h \
|
|
|
|
sys/param.h \
|
|
|
|
sys/socket.h \
|
|
|
|
sys/stat.h \
|
|
|
|
sys/syslimits.h \
|
|
|
|
sys/types.h \
|
|
|
|
sys/time.h \
|
|
|
|
sys/wait.h \
|
|
|
|
sys/uio.h \
|
|
|
|
)
|
|
|
|
|
2017-12-17 02:22:12 +00:00
|
|
|
AC_CHECK_HEADERS(netinet/ip.h netinet/ip6.h net/route.h,,,[[
|
2017-10-12 14:01:51 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
#if HAVE_SYS_SOCKET_H
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#endif
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#if HAVE_NETINET_IN_SYSTM_H
|
|
|
|
#include <netinet/in_systm.h>
|
|
|
|
#endif
|
|
|
|
]])
|
|
|
|
|
2017-12-16 09:06:34 +00:00
|
|
|
AC_CHECK_HEADERS(netinet/ip_icmp.h netinet/icmp6.h,,,[[
|
2017-12-16 05:53:30 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
#if HAVE_SYS_SOCKET_H
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#endif
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#if HAVE_NETINET_IN_SYSTM_H
|
|
|
|
#include <netinet/in_systm.h>
|
|
|
|
#endif
|
|
|
|
#include <netinet/ip.h>
|
|
|
|
]])
|
2017-10-19 03:50:39 +00:00
|
|
|
|
2017-02-02 11:34:37 +00:00
|
|
|
##########################################
|
|
|
|
#### Checks for typedefs, structures, ####
|
|
|
|
#### and compiler characteristics. ####
|
|
|
|
##########################################
|
|
|
|
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
|
|
|
|
AC_CHECK_MEMBERS([struct tm.tm_gmtoff, struct tm.__tm_gmtoff],,,[
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <time.h>])
|
|
|
|
|
2017-10-19 03:50:39 +00:00
|
|
|
AC_CHECK_MEMBER(struct sockaddr.sa_len,
|
|
|
|
AC_DEFINE(HAVE_SA_LEN, 1, [Define this if your stack has sa_len in sockaddr struct.]),,
|
|
|
|
[#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
#include <sys/socket.h>])
|
|
|
|
|
|
|
|
AC_CHECK_MEMBER(struct sockaddr_in.sin_len,
|
|
|
|
AC_DEFINE(HAVE_SIN_LEN, 1, [Define this if your IPv4 has sin_len in sockaddr_in struct.]),,
|
|
|
|
[#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
#include <netinet/in.h>])
|
|
|
|
|
|
|
|
AC_CHECK_MEMBER(struct sockaddr_in6.sin6_len,
|
|
|
|
AC_DEFINE(HAVE_SIN6_LEN, 1, [Define this if your IPv6 has sin6_len in sockaddr_in6 struct.]),,
|
|
|
|
[#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
#include <netinet/in.h>])
|
|
|
|
|
|
|
|
AC_CHECK_MEMBER(struct sockaddr_conn.sconn_len,
|
|
|
|
AC_DEFINE(HAVE_SCONN_LEN, 1, [Define this if your userland stack has sconn_len in sockaddr_conn struct.]),,
|
|
|
|
[#include "usrsctplib/usrsctp.h"])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for socklen_t)
|
|
|
|
AC_TRY_COMPILE([#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
#include <sys/socket.h>],
|
|
|
|
[socklen_t x; x = 1; return ((int)x);],
|
|
|
|
[AC_MSG_RESULT(yes)],
|
|
|
|
[AC_MSG_RESULT(int)
|
|
|
|
AC_DEFINE(socklen_t, int, [Define a type for socklen_t.])])
|
|
|
|
|
2017-02-02 11:34:37 +00:00
|
|
|
AC_CHECK_FILE(/dev/random,
|
|
|
|
AC_DEFINE([HAVE_DEV_RANDOM], [1],
|
|
|
|
[Define to 1 if you have the /dev/random file.]))
|
|
|
|
|
2017-03-19 12:50:43 +00:00
|
|
|
AC_CACHE_CHECK([whether the compiler provides atomic builtins], [ap_cv_atomic_builtins],
|
|
|
|
[AC_TRY_RUN([
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
unsigned long val = 1010, tmp, *mem = &val;
|
|
|
|
|
|
|
|
if (__sync_fetch_and_add(&val, 1010) != 1010 || val != 2020)
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
tmp = val;
|
|
|
|
|
|
|
|
if (__sync_fetch_and_sub(mem, 1010) != tmp || val != 1010)
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (__sync_sub_and_fetch(&val, 1010) != 0 || val != 0)
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
tmp = 3030;
|
|
|
|
|
|
|
|
if (__sync_val_compare_and_swap(mem, 0, tmp) != 0 || val != tmp)
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (__sync_lock_test_and_set(&val, 4040) != 3030)
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
mem = &tmp;
|
|
|
|
|
|
|
|
if (__sync_val_compare_and_swap(&mem, &tmp, &val) != &tmp)
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
__sync_synchronize();
|
|
|
|
|
|
|
|
if (mem != &val)
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}], [ap_cv_atomic_builtins=yes], [ap_cv_atomic_builtins=no], [ap_cv_atomic_builtins=no])])
|
|
|
|
|
|
|
|
if test "$ap_cv_atomic_builtins" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_ATOMIC_BUILTINS, 1, [Define if compiler provides atomic builtins])
|
|
|
|
fi
|
|
|
|
|
2017-02-02 11:34:37 +00:00
|
|
|
#######################################
|
|
|
|
#### Checks for library functions. ####
|
|
|
|
#######################################
|
|
|
|
|
|
|
|
AC_FUNC_VPRINTF
|
|
|
|
AC_CHECK_FUNCS(\
|
|
|
|
atexit \
|
|
|
|
gettimeofday \
|
|
|
|
memmove \
|
|
|
|
strerror \
|
2018-02-21 03:25:48 +00:00
|
|
|
inet_ntop inet_pton inet_aton \
|
|
|
|
sigaction sigwait sigsuspend \
|
|
|
|
stpcpy strcasecmp strtoul stricmp \
|
2017-02-02 11:34:37 +00:00
|
|
|
writev \
|
2018-02-21 03:25:48 +00:00
|
|
|
utime utimes sem_timedwait \
|
|
|
|
pthread_yield sched_yield \
|
|
|
|
getenv putenv setenv unsetenv \
|
2017-02-02 11:34:37 +00:00
|
|
|
)
|
|
|
|
|
2017-11-03 12:55:20 +00:00
|
|
|
AC_SEARCH_LIBS(gethostbyname, nsl)
|
|
|
|
AC_SEARCH_LIBS(gethostname, nsl)
|
|
|
|
AC_SEARCH_LIBS(socket, socket)
|
2017-11-04 01:23:07 +00:00
|
|
|
AC_SEARCH_LIBS(pthread_barrier_wait, pthread)
|
2017-11-05 14:57:19 +00:00
|
|
|
AC_SEARCH_LIBS(gnutls_global_set_log_level, gnutls)
|
2017-11-03 12:55:20 +00:00
|
|
|
|
|
|
|
AC_SEARCH_LIBS([sctp_sendmsg], [sctp], [have_sctp_lib=yes], [have_sctp_lib=no])
|
|
|
|
if test x$have_sctp_lib == xno; then
|
|
|
|
AC_SEARCH_LIBS([usrsctp_init], [usrsctp], [have_usrsctp_lib=yes], [have_usrsctp_lib=no])
|
|
|
|
if test x$have_usrsctp_lib == xno; then
|
|
|
|
AC_MSG_ERROR([You must install the SCTP libraries and development headers to enable SCTP support.])
|
|
|
|
else
|
2017-10-17 11:44:05 +00:00
|
|
|
AC_DEFINE([USE_USRSCTP], [1], [Define to 1 if you have the usrsctp library.])
|
|
|
|
fi
|
|
|
|
fi
|
2017-10-18 16:09:06 +00:00
|
|
|
AM_CONDITIONAL([USRSCTP], [test x$have_usrsctp_lib = xyes])
|
2017-02-02 11:34:37 +00:00
|
|
|
|
2017-12-18 11:54:57 +00:00
|
|
|
PKG_CHECK_MODULES([YAML], yaml-0.1 >= 0.1.4)
|
2017-09-26 00:19:22 +00:00
|
|
|
PKG_CHECK_MODULES([MONGOC], libmongoc-1.0 >= 1.3.1)
|
2017-09-29 01:10:55 +00:00
|
|
|
FREEDIAMETER_DIR=freeDiameter-1.2.1
|
|
|
|
AC_SUBST(FREEDIAMETER_DIR)
|
2017-07-20 14:07:37 +00:00
|
|
|
|
2017-02-02 11:34:37 +00:00
|
|
|
#####################
|
|
|
|
#### Conclusion. ####
|
|
|
|
#####################
|
|
|
|
|
2017-09-29 01:10:55 +00:00
|
|
|
AC_CONFIG_SUBDIRS([lib/freeDiameter-1.2.1])
|
|
|
|
|
2017-02-02 11:34:37 +00:00
|
|
|
AC_CONFIG_FILES([lib/core/include/core.h])
|
|
|
|
AC_CONFIG_FILES([lib/core/src/Makefile])
|
|
|
|
AC_CONFIG_FILES([lib/core/test/Makefile])
|
2017-02-02 14:00:21 +00:00
|
|
|
AC_CONFIG_FILES([lib/core/Makefile])
|
2017-02-28 01:20:02 +00:00
|
|
|
AC_CONFIG_FILES([lib/s1ap/asn1c/Makefile])
|
|
|
|
AC_CONFIG_FILES([lib/s1ap/Makefile])
|
|
|
|
AC_CONFIG_FILES([lib/nas/Makefile])
|
2017-08-05 05:23:37 +00:00
|
|
|
AC_CONFIG_FILES([lib/fd/Makefile])
|
2017-03-12 01:23:49 +00:00
|
|
|
AC_CONFIG_FILES([lib/gtp/Makefile])
|
2017-09-06 06:02:43 +00:00
|
|
|
AC_CONFIG_FILES([lib/ipfw/Makefile])
|
2017-02-04 06:26:55 +00:00
|
|
|
AC_CONFIG_FILES([lib/Makefile])
|
2018-08-14 08:28:22 +00:00
|
|
|
AC_CONFIG_FILES([src/common/Makefile])
|
2017-03-04 14:26:22 +00:00
|
|
|
AC_CONFIG_FILES([src/mme/Makefile])
|
2017-03-04 15:20:09 +00:00
|
|
|
AC_CONFIG_FILES([src/hss/Makefile])
|
2017-03-24 09:47:05 +00:00
|
|
|
AC_CONFIG_FILES([src/sgw/Makefile])
|
2017-03-30 15:15:13 +00:00
|
|
|
AC_CONFIG_FILES([src/pgw/Makefile])
|
2017-08-17 05:15:08 +00:00
|
|
|
AC_CONFIG_FILES([src/pcrf/Makefile])
|
2017-02-02 14:00:21 +00:00
|
|
|
AC_CONFIG_FILES([src/Makefile])
|
2017-10-27 03:15:14 +00:00
|
|
|
AC_CONFIG_FILES([support/config/nextepc.conf])
|
2017-10-27 16:15:14 +00:00
|
|
|
AC_CONFIG_FILES([support/config/mme.conf])
|
|
|
|
AC_CONFIG_FILES([support/config/sgw.conf])
|
|
|
|
AC_CONFIG_FILES([support/config/pgw.conf])
|
|
|
|
AC_CONFIG_FILES([support/config/hss.conf])
|
|
|
|
AC_CONFIG_FILES([support/config/pcrf.conf])
|
2017-10-27 03:15:14 +00:00
|
|
|
AC_CONFIG_FILES([support/config/Makefile])
|
2017-08-03 05:09:14 +00:00
|
|
|
AC_CONFIG_FILES([support/freeDiameter/mme.conf])
|
2017-08-16 13:58:12 +00:00
|
|
|
AC_CONFIG_FILES([support/freeDiameter/pgw.conf])
|
2017-10-27 16:15:14 +00:00
|
|
|
AC_CONFIG_FILES([support/freeDiameter/hss.conf])
|
2017-08-16 13:58:12 +00:00
|
|
|
AC_CONFIG_FILES([support/freeDiameter/pcrf.conf])
|
2017-10-24 10:14:09 +00:00
|
|
|
AC_CONFIG_FILES([support/freeDiameter/Makefile])
|
2017-10-27 03:15:14 +00:00
|
|
|
AC_CONFIG_FILES([support/systemd/nextepc-mmed.service])
|
|
|
|
AC_CONFIG_FILES([support/systemd/nextepc-sgwd.service])
|
|
|
|
AC_CONFIG_FILES([support/systemd/nextepc-pgwd.service])
|
|
|
|
AC_CONFIG_FILES([support/systemd/nextepc-hssd.service])
|
|
|
|
AC_CONFIG_FILES([support/systemd/nextepc-pcrfd.service])
|
2017-10-29 11:16:18 +00:00
|
|
|
AC_CONFIG_FILES([support/systemd/Makefile])
|
2017-10-24 10:14:09 +00:00
|
|
|
AC_CONFIG_FILES([support/logrotate/nextepc])
|
2017-10-29 11:16:18 +00:00
|
|
|
AC_CONFIG_FILES([support/logrotate/Makefile])
|
2017-10-24 13:46:09 +00:00
|
|
|
AC_CONFIG_FILES([support/newsyslog/nextepc.conf])
|
2017-10-29 11:16:18 +00:00
|
|
|
AC_CONFIG_FILES([support/newsyslog/Makefile])
|
2017-10-24 10:14:09 +00:00
|
|
|
AC_CONFIG_FILES([support/Makefile])
|
2018-02-05 13:45:14 +00:00
|
|
|
AC_CONFIG_FILES([test/sample.conf])
|
|
|
|
AC_CONFIG_FILES([test/sample-volte.conf])
|
2017-10-24 10:14:09 +00:00
|
|
|
AC_CONFIG_FILES([test/Makefile])
|
2017-02-02 14:00:21 +00:00
|
|
|
AC_CONFIG_FILES([Makefile])
|
2017-02-02 11:34:37 +00:00
|
|
|
AC_OUTPUT
|
|
|
|
|
|
|
|
echo "
|
2017-07-10 05:33:46 +00:00
|
|
|
NextEPC configuration
|
2017-02-02 11:34:37 +00:00
|
|
|
--------------------
|
|
|
|
version : ${PACKAGE_VERSION}
|
|
|
|
host : ${host}
|
|
|
|
source code location : ${srcdir}
|
|
|
|
compiler : ${CC}
|
2017-11-27 01:35:08 +00:00
|
|
|
compiler flags : ${CFLAGS} ${YAML_CFLAGS} ${MONGOC_CFLAGS}
|
|
|
|
linker flags : ${LDFLAGS} ${LIBS} ${YAML_LIBS} ${MONGOC_LIBS}
|
2017-10-27 16:15:14 +00:00
|
|
|
bin directory : ${BIN_DIR}
|
|
|
|
lib directory : ${LIB_DIR}/nextepc
|
2017-10-27 03:15:14 +00:00
|
|
|
config directory : ${SYSCONF_DIR}/nextepc
|
|
|
|
log directory : ${LOCALSTATE_DIR}/log/nextepc
|
2017-02-02 11:34:37 +00:00
|
|
|
"
|