-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.in
119 lines (103 loc) · 3.75 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# -*- Autoconf -*-A
# Process this file with autoconf to produce a configure script.
AC_INIT(OpenDiameter, 1.0.7-i, [email protected])
AM_INIT_AUTOMAKE([subdir-objects])
# Program Defaults
AC_DISABLE_SHARED
# Use of libtool
AC_PROG_LIBTOOL
# Checks for build environment
# AC_CANONICAL_HOST
# Checks for environment
AC_MSG_CHECKING([existence of ACE_ROOT variable])
if test -z "$ACE_ROOT"; then
AC_MSG_RESULT(fail)
AC_MSG_ERROR([ACE_ROOT not defined, you MUST install ACE or set ACE_ROOT if already installed]);
else
AC_MSG_RESULT(yes)
fi
AC_MSG_CHECKING([existence of BOOST_ROOT variable])
if test -z "$BOOST_ROOT"; then
AC_MSG_RESULT(fail)
AC_MSG_ERROR([BOOST_ROOT not defined, you MUST install spirit 1.6.1 or greater or set BOOST_ROOT if already installed]);
else
AC_MSG_RESULT(yes)
fi
# Checks for ODBC support
AC_ARG_ENABLE(odbc, AC_HELP_STRING([--enable-odbc], [Compiles Open Diameter Accounting with unixODBC support]))
if test "$enable_odbc" = "yes"; then
AC_SUBST(L_ODBCFLAGS, ["-DAAA_ODBC_XFORMER"])
fi
# Checks for MPA support
AC_ARG_ENABLE(mpa, AC_HELP_STRING([--enable-mpa], [Compiles with MPA support]))
if test "$enable_mpa" = "yes"; then
AC_SUBST(L_MPAFLAGS, ["-DPANA_MPA_SUPPORT"])
fi
# Checks for EAP-Archie inclusion
AC_ARG_ENABLE(eap-archie, AC_HELP_STRING([--enable-eap-archie], [Compiles the EAP-Archie library]))
AM_CONDITIONAL([OPT_EAP_ARCHIE], [test "$enable_eap_archie" = "yes"])
if test "$enable_eap_archie" = "yes"; then
AC_MSG_CHECKING([existence of EAP_ARCHIE_ROOT variable])
if test -z "$EAP_ARCHIE_ROOT"; then
AC_MSG_RESULT(fail)
AC_MSG_ERROR([EAP_ARCHIE_ROOT not defined, you MUST install eap-archie and make sure EAP_ARCHIE_ROOT points to the source tree]);
else
AC_MSG_RESULT(yes)
fi
fi
# Checks whether --with-eap-tls was given.
AC_ARG_WITH(eap-tls, [ --with-eap-tls compile the EAP-TLS library])
AM_CONDITIONAL(compile_EAPTLS, [test "$with_eap_tls" = "yes"])
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AM_PROG_CC_C_O
# Checks for libraries.
# Checks for headers
AC_CHECK_HEADERS(ifaddrs.h)
AC_CHECK_HEADERS(net/if_dl.h)
AC_CHECK_HEADERS(shadow.h)
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
# Checs for functions
AC_CHECK_FUNCS(getifaddrs)
# Substitutions
AC_SUBST(LIBTOOL_DEPS)
case $host in
*-*-freebsd*)
AC_SUBST(L_CPPFLAGS, ["-Wall -I$ACE_ROOT -I$BOOST_ROOT -pthread -fno-strict-aliasing"])
AC_SUBST(L_CXXFLAGS, ["-Wall -I$ACE_ROOT -I$BOOST_ROOT -pthread -fno-strict-aliasing"])
AC_SUBST(L_LDFLAGS, ["-L$ACE_ROOT/ace -pthread"])
AC_SUBST(L_LIBS, ["-lc_r -lssl -lcrypto -lACE_SSL -lACE -lACEXML -lACEXML_Parser"])
AC_SUBST(HOST_OS, [OS_FREEBSD])
;;
*-*-linux*)
AC_SUBST(L_CPPFLAGS, ["-Wall -I$ACE_ROOT -I$BOOST_ROOT -g -fno-strict-aliasing"])
AC_SUBST(L_CXXFLAGS, ["-Wall -I$ACE_ROOT -I$BOOST_ROOT -g -fno-strict-aliasing"])
AC_SUBST(L_LDFLAGS, ["-L$ACE_ROOT/ace"])
AC_SUBST(L_LIBS, ["-lssl -lcrypto -lACE_SSL -lACE -lACEXML -lACEXML_Parser"])
AC_SUBST(HOST_OS, [OS_LINUX])
;;
*)
AC_MSG_ERROR([Unsupported OS]);
esac
# Standard libraries for distribution
AC_CONFIG_FILES([Makefile
libodutl/Makefile
libdiameter/Makefile
libdiamparser/Makefile
libeap/Makefile
libpana/Makefile
libdiametereap/Makefile
libdiametermip4/Makefile
libdiameternasreq/Makefile
applications/Makefile
applications/nas/Makefile
applications/aaa/Makefile
applications/pana/Makefile])
# Generate output
AC_OUTPUT