forked from chan-sccp/chan-sccp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
184 lines (154 loc) · 5.92 KB
/
configure.ac
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
dnl COPYRIGHT: chan-sccp-b.sourceforge.net group 2009
dnl CREATED BY: Created by Diederik de Groot
dnl LICENSE: This program is free software and may be modified and distributed under the terms of the GNU Public License.
dnl See the LICENSE file at the top of the source tree.
dnl NOTE: Process this file with autoconf to produce a configure script.
AC_PREREQ([2.64])
AC_INIT([Chan_SCCP],m4_esyscmd([cat .version |tr -d '\n']),[https://sourceforge.net/projects/chan-sccp-b/],[Chan_SCCP])
MIN_ASTERISK_VERSION=106
MAX_ASTERISK_VERSION=113
AC_CONFIG_AUX_DIR([autoconf])
CFLAGS_saved="${CFLAGS}"
CPPFLAGS_saved="${CPPFLAGS}"
LDFLAGS_saved="${LDFLAGS}"
dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run
dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors.
AC_USE_SYSTEM_EXTENSIONS
AC_CONFIG_MACRO_DIR([autoconf])
dnl cross-compile macros
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AC_CONFIG_HEADER(src/config.h)
AH_TOP([
/*!
* \file config.h
* \brief SCCP Config File
* \author Diederik de Groot <dkgroot [at] talon.nl>
* \note This file is automatically generated by configure
* \note Do not change this file. Change will be lost when running configure
*/
#pragma once
#include "pbx_impl/ast/include_asterisk_autoconfig.h"
])
CONFIGURE_PART([Checking AutoMake:])
AM_MAINTAINER_MODE([disable]) dnl Switches off auto-regeneration on configure.ac / Makefile.am changes
dnl make sure to run tool/bootstrap.sh before checking in configure changes to svn
dnl AM_INIT_AUTOMAKE([1.14 -Wno-portability check-news dist-bzip2 nostdinc subdir-objects])
AM_INIT_AUTOMAKE([1.10 -Wno-portability check-news dist-bzip2 nostdinc subdir-objects])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_DISABLE_STATIC([])
dnl Silence warning: ar: 'u' modifier ignored since 'D' is the default
AC_SUBST(AR_FLAGS, [cr])
AC_CONFIG_SRCDIR([src/chan_sccp.c])
AC_COPYRIGHT("Chan_SCCP")
AC_REVISION($Revision$)
CONFIGURE_PART([Checking build environment:])
CS_SETUP_BUILD
CS_SETUP_DEFAULTS
CS_CHECK_RAII
CS_ENABLE_OPTIMIZATION
AX_CHECK_ALIGNED_ACCESS_REQUIRED dnl sparc64 alignment required
AX_CHECK_UNALIGNED_BUSERROR dnl sparc64 unaligned access
CS_GET_VERSION([.])
AC_PROG_CXX
CONFIGURE_PART([Checking host platform:])
CS_SETUP_HOST_PLATFORM
CS_SETUP_ENVIRONMENT
CONFIGURE_PART([Checking Atomic Functions:])
SCCP_CHECK_ATOMICS
SCCP_CHECK_ATOMIC_OPS
CONFIGURE_PART([Checking for standard programs:])
CS_FIND_PROGRAMS
dnl AC_PROG_CXX([clang++ llvm-g++ g++])
ACX_PTHREAD
PATCH_LIBTOOL_TO_ADD_HOST_CC
CS_CHECK_CROSSCOMPILE
CS_WITH_CCACHE
CS_SETUP_LIBTOOL
CONFIGURE_PART([Checking for Required Libraries:])
CS_FIND_LIBRARIES
CS_CHECK_TYPES
CONFIGURE_PART([Checking Configure Options:])
CS_WITH_PBX
CS_SETUP_DOXYGEN
CS_ENABLE_EXPERIMENTAL_XML
CONFIGURE_PART([Checking Enable/Disable:])
CS_PARSE_WITH_LIBEV
CS_PARSE_WITH_AND_ENABLE
AC_SUBST([SUPPORTED_CFLAGS])
AC_SUBST([SUPPORTED_LDFLAGS])
dnl Return CFLAGS / CPPFLAGS
CFLAGS=${CFLAGS_saved}
CPPFLAGS=${CPPFLAGS_saved}
LDFLAGS=${LDFLAGS_saved}
CS_SETUP_MODULE_DIR
dnl set substitutes
AC_SUBST(CPU_OPTIONS)
AC_SUBST(prefix)
CONFIGURE_PART([Generating Configuration and Makefiles])
AC_CONFIG_COMMANDS([.revision],
output=`cd ${ac_abs_top_builddir};${ac_abs_top_srcdir}/tools/autorevision -t h -o ${ac_abs_top_srcdir}/.revision > ${ac_abs_top_builddir}/src/revision.h 2>/dev/null`
)
AC_CONFIG_COMMANDS([src/sccp_enum.h],
output=`cd ${ac_abs_top_builddir}/src/;awk -f "${ac_abs_top_srcdir}/tools/gen_sccp_enum.awk" < ${ac_abs_top_srcdir}/src/sccp_enum.in &>/dev/null`
)
AC_CONFIG_FILES([Makefile README doc/Makefile src/Makefile src/pbx_impl/Makefile src/pbx_impl/ast/Makefile src/pbx_impl/ast_announce/Makefile src/pbx_impl/ast${ASTERISK_VER_GROUP}/Makefile contrib/gen_sccpconf/Makefile])
AST_SET_PBX_AMCONDITIONALS
VERSION="`echo ${SCCP_VERSION}_${SCCP_BRANCH}`"
PACKAGE_STRING="`echo Chan_SCCP_${VERSION}`"
PACKAGE_TARNAME="`echo Chan_SCCP_${VERSION}`"
AC_SUBST([VERSION])
AC_SUBST([PACKAGE_STRING])
AC_SUBST([PACKAGE_TARNAME])
AH_BOTTOM([
])
AC_OUTPUT
touch src/stamp-h1
echo
echo "Operating System : ${BUILD_OS}"
echo " Kernel : ${BUILD_KERNEL}"
echo " Architecture : ${BUILD_MACHINE}"
echo "Asterisk Version : ${ASTERISK_VERSION_NUMBER} / ${ASTERISK_VER_GROUP}"
echo " Asterisk Repos : ${ASTERISK_REPOS_LOCATION}"
echo " Build user : ${BUILD_USER}"
echo " Version : ${SCCP_VERSION}_${SCCP_BRANCH}_r${SCCP_REVISION}"
echo "Compiler Version : `${CC} -dumpversion`"
echo " CC : ${CC}"
echo " CPP : ${CPP}"
if test -n "$HOST_CC" ; then
echo " HOST_CC : ${CC}"
fi
echo " CFLAGS : ${CFLAGS} ${AM_CFLAGS} ${PBX_CFLAGS} ${GDB_FLAGS} ${PTHREAD_CFLAGS} ${COVERAGE_CFLAGS} ${EVENT_CFLAGS} ${LIBEXSLT_CFLAGS} ${LIBCURL_CFLAGS}"
dnl ${SUPPORTED_CFLAGS}
echo " CPPFLAGS : ${CPPFLAGS} ${AM_CPPFLAGS} ${PBX_CPPFLAGS} ${SANITIZE_CFLAGS} ${GDB_FLAGS} ${PTHREAD_CPPFLAGS} ${COVERAGE_CPPFLAGS} ${EVENT_CPPFLAGS} ${LIBEXSLT_CPPFLAGS} ${LIBCURL_CPPFLAGS}"
echo " LDFLAGS : ${LDFLAGS} ${SANITIZE_LDFLAGS} ${SUPPORTED_LDFLAGS} ${PBX_LDFLAGS} ${PTHREAD_LIBS} ${EVENT_LIBS} ${LIBEXSLT_LIBS} ${LIBCURL_LIBS} ${AST_CLANG_BLOCKS_LIBS} ${LIBBFD} ${LIBEXECINFO} ${LIBICONV}"
echo " PBX_TYPE : ${PBX_TYPE}"
echo " PBX_PREFIX : ${PBX_PREFIX}"
echo " PBX_ETC : ${PBX_ETC}"
echo " PBX_LIB : ${PBX_LIB}"
echo " PBX_VARLIB : ${PBX_VARLIB}"
echo " PBX_INCLUDE : ${PBX_INCLUDE}"
echo "Module Directory : ${PBX_MODDIR}"
if test -n "$ASTERISK_INCOMPATIBLE"; then
tput setab 1
tput setaf 3
tput bold
tput smso
echo ""
echo -e "WARNING: The provided asterisk version is not compatible to current sources. Expects trouble !!"
echo ""
tput sgr0
echo ""
fi
if test CC_works = 0; then
tput setab 1
tput setaf 3
tput bold
tput smso
echo ""
echo -e "DEPRECATION WARNING: The compiler you are using is not compatible, you need at least gcc > 4.3 / llvm-gcc > 4.3 / clang > 3.3 + libblocksruntime-dev]"
echo ""
tput sgr0
echo ""
fi