-
Notifications
You must be signed in to change notification settings - Fork 36
/
configure.ac
140 lines (108 loc) · 3.71 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
dnl
dnl Autoconf configuration file for the UniMRCP modules for Asterisk.
dnl
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([asterisk-unimrcp],[1.10.0])
AC_CONFIG_AUX_DIR([build])
AC_CONFIG_MACRO_DIR([build/acmacros])
dnl Set ac_macro_dir variable manually for autoconf 2.61 and above.
ac_macro_dir="build/acmacros"
AC_SUBST(ac_aux_dir)
AC_SUBST(ac_macro_dir)
dnl Generate ./config.nice to reuse ./configure command-line.
APR_CONFIG_NICE(config.nice)
dnl Include m4 macros for libtool.
sinclude(build/acmacros/libtool.m4)
sinclude(build/acmacros/ltoptions.m4)
sinclude(build/acmacros/ltsugar.m4)
sinclude(build/acmacros/ltversion.m4)
sinclude(build/acmacros/lt~obsolete.m4)
AM_INIT_AUTOMAKE([no-define nostdinc foreign])
dnl Enable silent build rules available since automake 1.11.
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl Set default language.
AC_LANG_C
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
dnl Skip detection of Fortran.
m4_undefine([AC_PROG_F77])
m4_defun([AC_PROG_F77],[])
dnl Turn off static libraries.
AC_DISABLE_STATIC
dnl Add libtool support.
AC_PROG_LIBTOOL
dnl Do not use autoconf generated compiler DEFS.
rm confdefs.h
touch confdefs.h
dnl Check for C compiler vendor.
AX_COMPILER_VENDOR
dnl Search for pkg-config.
AC_PATH_PROG(PKG_CONFIG, pkg-config)
FIND_UNIMRCP
FIND_ASTERISK
if test "x$prefix" = "xNONE"; then
prefix="${asterisk_mod_dir}"
fi
moddir="${prefix}"
AC_SUBST(moddir)
dnl Enable maintainer mode.
AC_ARG_ENABLE(maintainer-mode,
[AC_HELP_STRING([--enable-maintainer-mode ],[turn on debugging and compile time warnings])],
[enable_maintainer_mode="$enableval"],
[enable_maintainer_mode="no"])
AC_MSG_NOTICE([enable maintainer mode: $enable_maintainer_mode])
if test "${enable_maintainer_mode}" != "no"; then
APR_ADDTO(CFLAGS,-g)
if test "x${ax_cv_c_compiler_vendor}" = "xgnu"; then
APR_ADDTO(CFLAGS,-Wall -Werror)
fi
fi
dnl Enable speech resource module (res-speech-unimrcp)
AC_ARG_ENABLE(res-speech-unimrcp,
[AC_HELP_STRING([--disable-res-speech-unimrcp ],[exclude UniMRCP speech resource module from build])],
[enable_res_speech_unimrcp="$enableval"],
[enable_res_speech_unimrcp="yes"])
case $asterisk_version in
SVN-1.2*)
enable_res_speech_unimrcp="no"
;;
1.2*)
enable_res_speech_unimrcp="no"
;;
esac
AM_CONDITIONAL([RES_SPEECH_UNIMRCP],[test "${enable_res_speech_unimrcp}" = "yes"])
dnl Enable application module (app-unimrcp)
AC_ARG_ENABLE(app-unimrcp,
[AC_HELP_STRING([--disable-app-unimrcp ],[exclude UniMRCP application module from build])],
[enable_app_unimrcp="$enableval"],
[enable_app_unimrcp="yes"])
AM_CONDITIONAL([APP_UNIMRCP],[test "${enable_app_unimrcp}" = "yes"])
AM_CONDITIONAL(ISMAC, [test `uname -s` = Darwin])
AC_CONFIG_FILES([
Makefile
res-speech-unimrcp/Makefile
app-unimrcp/Makefile
])
AC_OUTPUT
echo
echo '****************************** REPORT ******************************'
echo
echo Asterisk version.............. : $asterisk_version
echo UniMRCP version............... : $uni_version
echo UniMRCP modules version....... : $PACKAGE_VERSION
echo
echo Compiler...................... : $CC
echo Compiler flags................ : $CFLAGS
echo Preprocessor definitions...... : $CPPFLAGS
echo Linker flags.................. : $LDFLAGS
echo
echo Modules install path...........: $prefix
echo Configuration install path.....: $asterisk_conf_dir
echo XML doc install path...........: $asterisk_xmldoc_dir
echo
echo Speech resource module.........: $enable_res_speech_unimrcp
echo Application module.............: $enable_app_unimrcp
echo
echo '********************************************************************'