]> git.ipfire.org Git - thirdparty/freeswitch.git/blame - configure.ac
first 1/2 of automake for esl phpmod
[thirdparty/freeswitch.git] / configure.ac
CommitLineData
4da77ea5
AM
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
8ef2aa54
MJ
4# Must change all of the below together
5# For a release, set revision for that tagged release as well and uncomment
674a9984 6AC_INIT([freeswitch], [1.5.12b], bugs@freeswitch.org)
8ef2aa54 7AC_SUBST(SWITCH_VERSION_MAJOR, [1])
308a8396 8AC_SUBST(SWITCH_VERSION_MINOR, [5])
674a9984 9AC_SUBST(SWITCH_VERSION_MICRO, [12b])
a330febb
KR
10AC_SUBST(SWITCH_VERSION_REVISION, [])
11AC_SUBST(SWITCH_VERSION_REVISION_HUMAN, [])
8ef2aa54
MJ
12
13AC_CONFIG_FILES([src/include/switch_version.h.in:src/include/switch_version.h.template])
7a5bc3b7 14
e8b9a4f7 15AC_CONFIG_AUX_DIR(build/config)
2513388d 16AM_INIT_AUTOMAKE
b324e263 17m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
4da77ea5 18AC_CONFIG_SRCDIR([src/switch.c])
42e78242 19AC_CONFIG_HEADER([src/include/switch_private.h])
4062b636 20AC_CONFIG_HEADER([libs/xmlrpc-c/xmlrpc_amconfig.h])
42e78242 21
a642381f 22AC_PREFIX_DEFAULT(/usr/local/freeswitch)
94206d80
MJ
23# AC_PREFIX_DEFAULT does not get expanded until too late so we need to do this to use prefix in this script
24if test "x$prefix" = "xNONE" ; then
25 prefix='/usr/local/freeswitch'
26fi
55b3e6cb 27
31d1e20f
BW
28AC_CANONICAL_HOST
29
55b3e6cb
MJ
30# Absolute source/build directory
31switch_srcdir=`(cd $srcdir && pwd)`
32switch_builddir=`pwd`
33AC_SUBST(switch_srcdir)
34AC_SUBST(switch_builddir)
35
6452f12b
BW
36#
37# --enable-64 has been moved up higher prior to AC_PROG_CC so that we can tuck in the -m64 flag
38# so devs on with Solaris wanting to build 64bit can not bother with adding any additional
39# flags on the ./configure line. User friendly.
40#
41
42# Enable 64 bit build
43AC_ARG_ENABLE(64,
44[AC_HELP_STRING([--enable-64],[build with 64 bit support])],[enable_64="$enable_64"],[enable_64="no"])
45
46if test "${enable_64}" = "yes"; then
47 case "$host" in
48 *-solaris2*)
49 # All three have to have -m64 for AC_PROG_CC to pick the right libtool
50 CFLAGS="$CFLAGS -m64"
51 LDFLAGS="$LDFLAGS -m64"
52 CXXFLAGS="$CXXFLAGS -m64"
53 ;;
54 *)
55 ;;
56 esac
57fi
58
f5ecbc84
TC
59# Whether to follow FHS
60AC_ARG_ENABLE([fhs],
61 [AS_HELP_STRING([--enable-fhs],
62 [Follow the FHS when placing files and directories])],,
63 [enable_fhs="no"])
64AM_CONDITIONAL([ENABLE_FHS],[test "${enable_fhs}" = "yes"])
1481d37f 65
88aa159b
MJ
66if test "$localstatedir" = "\${prefix}/var" ; then
67 rundir="$prefix/run"
7ae3f5b7 68 logdir="${prefix}/log"
88aa159b
MJ
69else
70 rundir="$localstatedir/run/freeswitch"
7ae3f5b7 71 logdir="$localstatedir/log/freeswitch"
88aa159b 72fi
f5ecbc84
TC
73
74default_certsdir="$prefix/certs"
75default_dbdir="$prefix/db"
76default_grammardir="$prefix/grammar"
77default_htdocsdir="$prefix/htdocs"
78default_logfiledir="$logdir"
79default_modulesdir="$prefix/mod"
80default_pkgconfigdir="$libdir/pkgconfig"
81default_recordingsdir="$prefix/recordings"
82default_runtimedir="$rundir"
83default_scriptdir="$prefix/scripts"
84default_soundsdir="$prefix/sounds"
85default_storagedir="$prefix/storage"
86
87if test "$enable_fhs" = yes; then
b04bbc6c
TC
88 prefix="/usr" exec_prefix="$prefix"
89 libdir="$(eval echo "$libdir")"
ab350968 90 sysconfdir="/etc/freeswitch"
f5ecbc84
TC
91 localstatedir="/var"
92 default_certsdir="/etc/freeswitch/tls"
93 default_dbdir="/var/lib/freeswitch/db"
94 default_grammardir="/usr/share/freeswitch/grammar"
95 default_htdocsdir="/usr/share/freeswitch/htdocs"
96 default_logfiledir="/var/log/freeswitch"
97 default_modulesdir="$libdir/freeswitch/mod"
98 default_pkgconfigdir="$libdir/pkgconfig"
99 default_recordingsdir="/var/lib/freeswitch/recordings"
100 default_runtimedir="/var/run/freeswitch"
101 default_scriptdir="/usr/share/freeswitch/scripts"
102 default_soundsdir="/usr/share/freeswitch/sounds"
103 default_storagedir="/var/lib/freeswitch/storage"
104fi
105
106# Where to install the modules
107AC_ARG_WITH([modinstdir],
108 [AS_HELP_STRING([--with-modinstdir=DIR], [Install modules into this location (default: $prefix/mod)])], [modulesdir="$withval"], [modulesdir="${default_modulesdir}"])
109AC_SUBST(modulesdir)
110AC_DEFINE_UNQUOTED([SWITCH_MOD_DIR],"${modulesdir}",[where to install the modules to])
111
107f9135
MJ
112# Where to put pidfile
113AC_ARG_WITH([rundir],
f5ecbc84 114 [AS_HELP_STRING([--with-rundir=DIR], [Put pidfile into this location (default: $prefix/run)])], [runtimedir="$withval"], [runtimedir="${default_runtimedir}"])
5ccac21d
MJ
115AC_SUBST(runtimedir)
116AC_DEFINE_UNQUOTED([SWITCH_RUN_DIR],"${runtimedir}",[where to put pidfile to])
117
7ae3f5b7 118AC_ARG_WITH([logfiledir],
f5ecbc84 119 [AS_HELP_STRING([--with-logfiledir=DIR], [Put logfiles into this location (default: $localstatedir/log)])], [logfiledir="$withval"], [logfiledir="${default_logfiledir}"])
5ccac21d
MJ
120AC_SUBST(logfiledir)
121AC_DEFINE_UNQUOTED([SWITCH_LOG_DIR],"${logfiledir}",[where to put log files])
107f9135 122
7ae3f5b7 123AC_ARG_WITH([dbdir],
f5ecbc84 124 [AS_HELP_STRING([--with-dbdir=DIR], [Put database files into this location (default: $prefix/db)])], [dbdir="$withval"], [dbdir="${default_dbdir}"])
5ccac21d
MJ
125AC_SUBST(dbdir)
126AC_DEFINE_UNQUOTED([SWITCH_DB_DIR],"${dbdir}",[where to put db files])
127
7ae3f5b7 128AC_ARG_WITH([htdocsdir],
f5ecbc84 129 [AS_HELP_STRING([--with-htdocsdir=DIR], [Put html files into this location (default: $prefix/htdocs)])], [htdocsdir="$withval"], [htdocsdir="${default_htdocsdir}"])
89ae5f47
MJ
130AC_SUBST(htdocsdir)
131AC_DEFINE_UNQUOTED([SWITCH_HTDOCS_DIR],"${htdocsdir}",[where to put htdocs files])
132
7ae3f5b7 133AC_ARG_WITH([soundsdir],
f5ecbc84 134 [AS_HELP_STRING([--with-soundsdir=DIR], [Put sound files into this location (default: $prefix/sounds)])], [soundsdir="$withval"], [soundsdir="${default_soundsdir}"])
d1c60899
MJ
135AC_SUBST(soundsdir)
136AC_DEFINE_UNQUOTED([SWITCH_SOUNDS_DIR],"${soundsdir}",[where to put sounds files])
137
7ae3f5b7 138AC_ARG_WITH([grammardir],
f5ecbc84 139 [AS_HELP_STRING([--with-grammardir=DIR], [Put grammar files into this location (default: $prefix/grammar)])], [grammardir="$withval"], [grammardir="${default_grammardir}"])
89ae5f47
MJ
140AC_SUBST(grammardir)
141AC_DEFINE_UNQUOTED([SWITCH_GRAMMAR_DIR],"${grammardir}",[where to put grammar files])
142
dabb85c3 143AC_ARG_WITH([certsdir],
f5ecbc84 144 [AS_HELP_STRING([--with-certsdir=DIR], [Put certs files into this location (default: $prefix/certs)])], [certsdir="$withval"], [certsdir="${default_certsdir}"])
dabb85c3
AM
145AC_SUBST(certsdir)
146AC_DEFINE_UNQUOTED([SWITCH_CERTS_DIR],"${certsdir}",[where to put certs files])
147
7ae3f5b7 148AC_ARG_WITH([scriptdir],
f5ecbc84 149 [AS_HELP_STRING([--with-scriptdir=DIR], [Put script files into this location (default: $prefix/scripts)])], [scriptdir="$withval"], [scriptdir="${default_scriptdir}"])
5ccac21d
MJ
150AC_SUBST(scriptdir)
151AC_DEFINE_UNQUOTED([SWITCH_SCRIPT_DIR],"${scriptdir}",[where to put script files])
107f9135 152
7ae3f5b7 153AC_ARG_WITH([recordingsdir],
f5ecbc84 154 [AS_HELP_STRING([--with-recordingsdir=DIR], [Put recordings files into this location (default: $prefix/recordings)])], [recordingsdir="$withval"], [recordingsdir="${default_recordingsdir}"])
c064a2a5
MJ
155AC_SUBST(recordingsdir)
156AC_DEFINE_UNQUOTED([SWITCH_RECORDINGS_DIR],"${recordingsdir}",[where to put recording files])
157
f3d851d1 158AC_ARG_WITH([storagedir],
f5ecbc84 159 [AS_HELP_STRING([--with-storagedir=DIR], [Put storage files into this location (default: $prefix/storage)])], [storagedir="$withval"], [storagedir="${default_storagedir}"])
f3d851d1
TC
160AC_SUBST(storagedir)
161AC_DEFINE_UNQUOTED([SWITCH_STORAGE_DIR],"${storagedir}",[where to put storage files])
162
911e4a09
MJ
163if test "$sysconfdir" = "\${prefix}/etc" ; then
164 confdir="$prefix/conf"
165else
166 confdir="$sysconfdir"
167fi
168
5ccac21d
MJ
169sysconfdir="$confdir"
170
911e4a09 171AC_SUBST(confdir)
7da7790b 172AC_DEFINE_UNQUOTED([SWITCH_CONF_DIR],"${confdir}",[directory for configuration files])
911e4a09 173
8b3f71cc
MJ
174AC_SUBST(libdir)
175AC_SUBST(bindir)
176AC_SUBST(includedir)
177
f20ba4d1 178AC_ARG_WITH([pkgconfigdir],
78472897 179 [AS_HELP_STRING([--with-pkgconfigdir=DIR], [Installation directory for pkgconfig file (default: ${libdir}/pkgconfig)])],
f20ba4d1
SK
180 [case "${withval}" in
181 yes|no) AC_MSG_ERROR([Invalid value ${withval} for option --with-pkgconfigdir]) ;;
182 *) pkgconfigdir="${withval}" ;;
183 esac
184 ],
f5ecbc84 185 [pkgconfigdir="${default_pkgconfigdir}"]
f20ba4d1
SK
186)
187AC_SUBST([pkgconfigdir])
188
6bc48b70
MJ
189#Set default language
190AC_LANG_C
4da77ea5
AM
191# Checks for programs.
192AC_PROG_CC
80eec6e5 193AC_PROG_CXX
40f18d30
MJ
194
195#check if the g++ compiler works
196AC_CACHE_CHECK([whether the C++ compiler works], [ac_cv_sys_cxx_works], [
197 AC_LANG_PUSH([C++])
3dd36873 198 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() { }])], [ac_cv_sys_cxx_works=yes],
40f18d30
MJ
199 [ac_cv_sys_cxx_works=no])
200 AC_LANG_POP([C++])
201 ])
202[ if [ "x$ac_cv_sys_cxx_works" = "xno" ]; then ]
203 AC_MSG_FAILURE([The C++ compiler does not work. Please (re)install the C++ compiler])
204[ fi ]
205
bac1e3fd 206AC_PROG_AWK
4da77ea5 207AC_PROG_MAKE_SET
4da77ea5 208AC_PROG_INSTALL
3de6a7e9
MJ
209
210#override some default libtool behavior and invoke AC_PROG_LIBTOOL (see http://lists.gnu.org/archive/html/libtool/2007-03/msg00000.html)
211m4_defun([_LT_AC_LANG_F77_CONFIG], [:])
212m4_defun([_LT_AC_LANG_GCJ_CONFIG], [:])
213m4_defun([_LT_AC_LANG_RC_CONFIG], [:])
5b3f19fb 214AM_PROG_CC_C_O
bac1e3fd 215AC_PROG_LIBTOOL
4da77ea5 216
6bc48b70
MJ
217#Check for compiler vendor
218AX_COMPILER_VENDOR
219
220# Optimize
221AC_ARG_ENABLE(optimization,
222[AC_HELP_STRING([--enable-optimization],[Set if you want us to add max optimising compiler flags])],[enable_optimizer="$enableval"],[enable_optimizer="no"])
223
224if test "${enable_optimizer}" = "yes" ; then
225 AC_DEFINE([OPTIMZER],[],[Enable Optimization.])
226 AX_CC_MAXOPT
227fi
228
55b3e6cb 229# set defaults for use on all platforms
1c5e6144
MJ
230SWITCH_AM_CFLAGS="-I${switch_srcdir}/src/include -I${switch_builddir}/src/include -I${switch_srcdir}/libs/libteletone/src"
231SWITCH_AM_CXXFLAGS="-I${switch_srcdir}/src/include -I${switch_builddir}/src/include -I${switch_srcdir}/libs/libteletone/src"
1953ac5c 232SWITCH_AM_LDFLAGS="-lm"
55b3e6cb
MJ
233
234#set SOLINK variable based on compiler and host
235if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
236 SOLINK="-Bdynamic -dy -G"
44d5d43b 237elif test "x${ax_cv_c_compiler_vendor}" = "xclang" ; then
55b3e6cb 238 case "$host" in
44d5d43b 239 *darwin*)
5e7986bf
MJ
240 SOLINK="-dynamic -force-flat-namespace"
241 ;;
44d5d43b 242 *)
7549be4b 243 SOLINK="-shared -Xlinker -x"
44d5d43b
MJ
244 ;;
245
246 esac
247elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
248 case "$host" in
249# older Xcode test for darwin, Xcode 4/5 use clang above
6ae16d15 250 *darwin*)
55b3e6cb
MJ
251 SOLINK="-dynamic -bundle -force-flat-namespace"
252 ;;
872c349f
MB
253 *-solaris2*)
254 SOLINK="-shared -Xlinker"
255 ;;
55b3e6cb
MJ
256 *)
257 SOLINK="-shared -Xlinker -x"
258 ;;
259 esac
b8f1a177
BW
260elif test "x${ax_cv_c_compiler_vendor}" = "xintel" ; then
261 case "$host" in
262 *)
263 SOLINK="-shared -Xlinker -x"
264 ;;
265 esac
55b3e6cb
MJ
266else
267 AC_ERROR([Please update configure.in with SOLINK values for your compiler])
268fi
55b3e6cb 269
4a77854b
SK
270##
271# detect libtool major version,
272# set libtool library extension based on this
273# to work around some brokeness when using 'la' with libtool-1.5
274#
275AC_MSG_CHECKING([libtool major version])
276libtool="${switch_builddir}/libtool"
df33a43a 277LIBTOOL_MAJOR_VERSION="`$libtool --version 2>/dev/null| sed -e 's/([[^)]]*)//g;s/^[[^0-9]]*//;s/[[- ]].*//g;q'| awk 'BEGIN { FS = "." } { print $1 }' `"
0c0a4a53 278if test -z "$LIBTOOL_MAJOR_VERSION" ; then
751c2894 279 LIBTOOL_MAJOR_VERSION="`sed -n -e '/^VERSION/{s/^.*=\"\{0,1\}\([[0-9]]\{1,\}\)\..*/\1/;p;}' ${switch_srcdir}/build/config/ltmain.sh`"
0c0a4a53
SK
280fi
281if test -z "$LIBTOOL_MAJOR_VERSION" ; then
282 AC_MSG_ERROR([Failed to detect your libtool version, please open a bug report on http://jira.freeswitch.org/])
283fi
4a77854b 284AC_MSG_RESULT([${LIBTOOL_MAJOR_VERSION}])
02141e30 285
4216e3e0 286LIBTOOL_LIB_EXTEN=so
02141e30 287
4a77854b 288if test "${LIBTOOL_MAJOR_VERSION}" = "2" ; then
02141e30
MJ
289 LIBTOOL_LIB_EXTEN="la"
290fi
4a77854b
SK
291AC_MSG_RESULT([using libtool library extension... ${LIBTOOL_LIB_EXTEN}])
292
02141e30 293
55b3e6cb
MJ
294# tweak compiler specific flags
295if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
296 APR_ADDTO(SWITCH_AM_CFLAGS, -KPIC)
297 APR_ADDTO(SWITCH_AM_CFLAGS, -DPIC)
99913ce3
MJ
298 APR_ADDTO(SWITCH_AM_CFLAGS, -erroff=E_END_OF_LOOP_CODE_NOT_REACHED)
299 APR_ADDTO(SWITCH_AM_CFLAGS, -errtags=yes)
2343708a 300 APR_ADDTO(SWITCH_AM_CFLAGS, -D__FUNCTION__=__func__ )
301 APR_ADDTO(SWITCH_AM_CFLAGS, -mt)
99913ce3 302 APR_ADDTO(SWITCH_AM_CXXFLAGS, -errtags=yes)
514bde18
MJ
303 APR_ADDTO(SWITCH_AM_CXXFLAGS, -KPIC)
304 APR_ADDTO(SWITCH_AM_CXXFLAGS, -DPIC)
f32f6f24 305 APR_ADDTO(SWITCH_AM_CXXFLAGS, "-features=extensions")
2343708a 306 APR_ADDTO(SWITCH_AM_CXXFLAGS, -D__FUNCTION__=__func__)
307 APR_ADDTO(SWITCH_AM_CXXFLAGS, -mt)
f32f6f24 308
55b3e6cb 309 APR_ADDTO(SWITCH_AM_LDFLAGS, -R${prefix}/lib)
6d45f5f5
MJ
310 if test "${enable_64}" = "yes"; then
311 APR_ADDTO(SWITCH_AM_CFLAGS, -m64)
5b2d20bf
MJ
312 APR_ADDTO(SWITCH_AM_CXXFLAGS, -m64)
313 APR_ADDTO(SWITCH_AM_LDFLAGS, -m64)
1953ac5c 314 LIBS="$LIBS -m64"
6d45f5f5 315 fi
d755b340
BW
316elif test "x${ax_cv_c_compiler_vendor}" = "xclang" ; then
317 APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC)
318 APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC)
55b3e6cb
MJ
319elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
320 APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC)
514bde18 321 APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC)
44ef8650 322 APR_ADDTO(SWITCH_AM_CFLAGS, -Werror)
1953ac5c 323 if test "${enable_64}" = "yes"; then
5e7986bf 324 case "$host" in
851db97a 325 *darwin12.*|*darwin11.*|*darwin10.*|*darwin9.*|*darwin8.*)
5e7986bf 326 APR_ADDTO(CFLAGS, -arch x86_64)
148f67e0
BW
327 APR_ADDTO(LDFLAGS, -arch x86_64)
328 APR_ADDTO(CXXFLAGS, -arch x86_64)
5e7986bf 329 ;;
148f67e0
BW
330 *-solaris2*)
331 APR_ADDTO(CFLAGS, -m64)
148f67e0
BW
332 APR_ADDTO(LDFLAGS, -m64)
333 APR_ADDTO(CXXFLAGS, -m64)
334 ;;
7803a752
MJ
335 *)
336 LIBS="$LIBS -m64"
337 ;;
5e7986bf 338 esac
1953ac5c 339 fi
55b3e6cb
MJ
340fi
341
ffe2ad4b
MJ
342#
343# gcc visibility cflag checks
344#
345AC_ARG_ENABLE([visibility],
346 [AS_HELP_STRING([--disable-visibility], [Disable or enable API visibility support (default: use if available)])],
347 [enable_visibility="${enableval}"],
348 [enable_visibility="detect"]
349)
350HAVE_VISIBILITY="no"
351
352if test "x${enable_visibility}" != "xno" ; then
353
354 case "${ax_cv_c_compiler_vendor}" in
355 gnu)
356 save_CFLAGS="${CFLAGS}"
357 CFLAGS="${CFLAGS} -fvisibility=hidden"
358 AC_MSG_CHECKING([whether the compiler supports -fvisibility=hidden])
359 AC_COMPILE_IFELSE(
360 [AC_LANG_PROGRAM(
361 [int foo __attribute__ ((visibility("default")));],
362 [;]
363 )],
364
365 [AC_MSG_RESULT([yes])
366 APR_ADDTO([SWITCH_AM_CFLAGS], [-fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1])
367 APR_ADDTO([SWITCH_AM_CXXFLAGS], [-fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1])
368 HAVE_VISIBILITY="yes"],
369
370 [AC_MSG_RESULT([no])]
371 )
372 CFLAGS="${save_CFLAGS}"
373 ;;
374
900907a2 375 sun)
96114867
SK
376 # save_CFLAGS="${CFLAGS}"
377 # CFLAGS="${CFLAGS} -xldscope=hidden"
378 # AC_MSG_CHECKING([whether the compiler supports -xldscope=hidden])
379 # AC_COMPILE_IFELSE(
380 # [AC_LANG_PROGRAM(
381 # [int foo __attribute__ ((visibility("default")));],
382 # [;]
383 # )],
384 #
385 # [AC_MSG_RESULT([yes])
386 # APR_ADDTO([SWITCH_AM_CFLAGS], [-xldscope=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1])
387 # APR_ADDTO([SWITCH_AM_CXXFLAGS], [-xldscope=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1])
388 # HAVE_VISIBILITY="yes"],
389 #
390 # [AC_MSG_RESULT([no])]
391 # )
392 # CFLAGS="${save_CFLAGS}"
900907a2
MJ
393 ;;
394
ffe2ad4b
MJ
395 *)
396 if test "x${enable_visibility}" = "xyes" ; then
900907a2 397 AC_MSG_ERROR([Non-GNU / SUN compilers are currently unsupported])
ffe2ad4b 398 else
900907a2 399 AC_MSG_WARN([Non-GNU / SUN compilers are currently unsupported])
ffe2ad4b
MJ
400 fi
401 ;;
402 esac
403
404 #
405 # visibility explicitly requested but not supported by this compiler => error
406 #
407 if test "x${enable_visibility}" = "xyes" -a "x${HAVE_VISIBILITY}" = "xno" ; then
408 AC_MSG_ERROR([API visibility not supported by this compiler])
409 fi
410fi
411
fcd2a7b0
SK
412# Enable debugging (default: on)
413# (rename option if the default is changed)
2faabff7 414AC_ARG_ENABLE(debug,
fcd2a7b0 415[AC_HELP_STRING([--disable-debug],[build without debug information])],[enable_debug="$enableval"],[enable_debug="yes"])
2faabff7
AM
416
417if test "${enable_debug}" = "yes"; then
418 AC_DEFINE([DEBUG],[],[Enable extra debugging.])
554f476c 419 saved_CFLAGS="$CFLAGS"
44ea66c2 420 CFLAGS=
2faabff7 421 AX_CFLAGS_WARN_ALL_ANSI
02c7a3ac 422 SWITCH_ANSI_CFLAGS=$CFLAGS
554f476c 423 CFLAGS="$saved_CFLAGS"
2faabff7
AM
424
425 if test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
426 APR_ADDTO(SWITCH_AM_CFLAGS, -g -ggdb)
37845b42 427 export DEBUG_CFLAGS="-g -ggdb"
2faabff7
AM
428 fi
429
430fi
431
59ba5a15
MJ
432AC_ARG_ENABLE(cpp,
433[AC_HELP_STRING([--disable-cpp],[build without cpp code])],[enable_cpp="$enableval"],[enable_cpp="yes"])
434
435AM_CONDITIONAL([ENABLE_CPP],[test "${enable_cpp}" = "yes"])
436
714e3133
MJ
437AC_ARG_ENABLE([system-xmlrpc-c],
438 [AS_HELP_STRING([--enable-system-xmlrpc-c],
439 [use system lib for xmlrpc-c])],,
440 [enable_xmlrpcc="no"])
441
442if test "${enable_xmlrpcc}" = "yes" ; then
443SYS_XMLRPC_CFLAGS=`xmlrpc-c-config --cflags`
444SYS_XMLRPC_LDFLAGS=`xmlrpc-c-config --libs`
445fi
446AC_SUBST(SYS_XMLRPC_CFLAGS)
447AC_SUBST(SYS_XMLRPC_LDFLAGS)
448AM_CONDITIONAL([SYSTEM_XMLRPCC],[test "${enable_xmlrpcc}" = "yes"])
449
a8b87ffe
AM
450AC_ARG_ENABLE(srtp,
451[AC_HELP_STRING([--disable-srtp],[build without srtp support])],[enable_srtp="$enableval"],[enable_srtp="yes"])
452
453AM_CONDITIONAL([ENABLE_SRTP],[test "${enable_srtp}" = "yes"])
454
861bd209
BW
455AC_ARG_ENABLE(zrtp,
456 [AS_HELP_STRING([--enable-zrtp], [Compile with zrtp Support])],,[enable_zrtp="no"])
457if test "x$enable_zrtp" = "xyes" ; then
393b63b7 458 LIBS="-lpthread $LIBS"
861bd209
BW
459 APR_ADDTO(SWITCH_AM_CFLAGS, -DENABLE_ZRTP)
460fi
ae67ecce 461
c4d13331
MJ
462PA_LIBS=
463
464PKG_CHECK_MODULES(JACK, jack, have_jack=yes, have_jack=no)
465if test "x$have_jack" = "xyes" ; then
466PA_LIBS+=$JACK_LIBS
467fi
468
ae67ecce 469AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
1911a262 470if test "x$have_alsa" = "xyes" ; then
c4d13331 471PA_LIBS+=-lasound
ae67ecce 472fi
c4d13331
MJ
473
474AC_SUBST(PA_LIBS)
ae67ecce 475
861bd209
BW
476AM_CONDITIONAL([ENABLE_ZRTP],[test "x$enable_zrtp" != "xno"])
477
a4a52620
SK
478AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"])
479
ab2bc7c6
TC
480AC_ARG_ENABLE(core-odbc-support,
481 [AS_HELP_STRING([--enable-core-odbc-support], [Compile with ODBC Support (default is optional)])],,[enable_core_odbc_support="optional"])
482if ! test "$enable_core_odbc_support" = "no"; then
483 AX_LIB_ODBC
484 if test "$ac_cv_found_odbc" = "yes" ; then
485 enable_core_odbc_support="yes"
486 elif test "$enable_core_odbc_support" = "yes"; then
487 AC_MSG_ERROR([no usable libodbc; please install unixodbc devel package or equivalent])
488 else
489 enable_core_odbc_support="no"
490 fi
ffc8e81b
TC
491fi
492
6e9fa3ba
AM
493CHECK_LIBUUID
494SWITCH_AM_LDFLAGS="$LIBUUID_LIBS $SWITCH_AM_LDFLAGS"
495SWITCH_AM_CFLAGS="$LIBUUID_CFLAGS $SWITCH_AM_CFLAGS"
496
5cb354dd
EG
497AC_ARG_ENABLE(core-pgsql-support,
498 [AS_HELP_STRING([--enable-core-pgsql-support], [Compile with PGSQL Support])],,[enable_core_pgsql_support="no"])
ba052c22 499AC_ARG_ENABLE(core-pgsql-pkgconfig,
299081ed 500 [AS_HELP_STRING([--disable-core-pgsql-pkgconfig], [Use pg_config to get PGQSL build options])],[enable_core_pgsql_pkgconfig="$enableval"],[enable_core_pgsql_pkgconfig="yes"])
5cb354dd
EG
501
502if test x"$enable_core_pgsql_support" = x"yes" ; then
ba052c22
TC
503 AC_PATH_PROG([PG_CONFIG], [pg_config], [no])
504 AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
ba052c22
TC
505 if test "$PKG_CONFIG" = "no" \
506 || test x"$enable_core_pgsql_pkgconfig" = x"no" \
507 || ! pkg-config libpq; then
81185aa9
KR
508 if test "$PG_CONFIG" != "no"; then
509 AC_MSG_CHECKING([for PostgreSQL libraries via pg_config])
510 POSTGRESQL_CFLAGS="-I`$PG_CONFIG --includedir`"
511 POSTGRESQL_LIBDIR="-L`$PG_CONFIG --libdir`"
512 POSTGRESQL_LDFLAGS="-L`$PG_CONFIG --libdir` -lpq"
513 POSTGRESQL_VERSION=`$PG_CONFIG --version | sed -e 's#PostgreSQL ##'`
514 POSTGRESQL_MAJOR_VERSION=`$PG_CONFIG --version | sed -e 's/devel//' | sed -re 's#PostgreSQL ([0-9]+).[0-9]+.?[0-9]+?#\1#'`
515 POSTGRESQL_MINOR_VERSION=`$PG_CONFIG --version | sed -e 's/devel//' | sed -re 's#PostgreSQL [0-9]+.([0-9]+).?[0-9]+?#\1#'`
516 POSTGRESQL_PATCH_VERSION=`$PG_CONFIG --version | sed -e 's/devel//' | sed -re 's#PostgreSQL [0-9]+.[0-9]+.?([0-9]+)?#\1#'`
517 else
518 AC_MSG_ERROR([no usable pkg-config or pg_config; please install libpq devel package or equivalent])
519 fi
ba052c22 520 else
81185aa9
KR
521 AC_MSG_CHECKING([for PostgreSQL libraries via pkg_config])
522 POSTGRESQL_CFLAGS="`$PKG_CONFIG --cflags libpq`"
523 POSTGRESQL_LIBDIR="`$PKG_CONFIG libpq --libs-only-L`"
ba052c22
TC
524 POSTGRESQL_LDFLAGS="`$PKG_CONFIG --libs libpq`"
525 POSTGRESQL_VERSION="`$PKG_CONFIG --modversion libpq`"
526 POSTGRESQL_MAJOR_VERSION="`echo $POSTGRESQL_VERSION | cut -d. -f1`"
527 POSTGRESQL_MINOR_VERSION="`echo $POSTGRESQL_VERSION | cut -d. -f2`"
528 POSTGRESQL_PATCH_VERSION="`echo $POSTGRESQL_VERSION | cut -d. -f3`"
529 fi
81185aa9
KR
530 save_LIBS="$LIBS"
531 LIBS="$POSTGRESQL_LIBDIR $LIBS"
532 AC_MSG_RESULT([$POSTGRESQL_LIBDIR])
533
ba052c22
TC
534 AC_DEFINE([SWITCH_HAVE_PGSQL], [1], [Define to 1 if PostgreSQL libraries are available])
535 AC_DEFINE_UNQUOTED([POSTGRESQL_VERSION], "${POSTGRESQL_VERSION}", [Specifies the version of PostgreSQL we are linking against])
536 AC_DEFINE_UNQUOTED([POSTGRESQL_MAJOR_VERSION], ${POSTGRESQL_MAJOR_VERSION}, [Specifies the version of PostgreSQL we are linking against])
537 AC_DEFINE_UNQUOTED([POSTGRESQL_MINOR_VERSION], ${POSTGRESQL_MINOR_VERSION}, [Specifies the version of PostgreSQL we are linking against])
538 AC_DEFINE_UNQUOTED([POSTGRESQL_PATCH_VERSION], ${POSTGRESQL_PATCH_VERSION}, [Specifies the version of PostgreSQL we are linking against])
81185aa9 539
ba052c22
TC
540 AC_CHECK_LIB([pq], [PQgetvalue],, AC_MSG_ERROR([no usable libpq; please install PostgreSQL devel package or equivalent]))
541 AC_MSG_RESULT([yes])
81185aa9 542 SWITCH_AM_CXXFLAGS="$POSTGRESQL_CFLAGS $SWITCH_AM_CXXFLAGS"
ba052c22 543 SWITCH_AM_LDFLAGS="$POSTGRESQL_LDFLAGS $SWITCH_AM_LDFLAGS"
81185aa9
KR
544
545 LIBS="$save_LIBS"
5cb354dd 546fi
25c725c2 547
603f3eff
MJ
548AC_ARG_ENABLE(deprecated-core-db-events,
549 [AS_HELP_STRING([--enable-deprecated-core-db-events], [Keep deprecated core db events])],,[enable_deprecated_core_db_events="no"])
550
551if test x"$enable_deprecated_core_db_events" = x"yes" ; then
552 AC_DEFINE([SWITCH_DEPRECATED_CORE_DB], [1], [Define to 1 to enable deprecated core db events])
553fi
554
25c725c2
AM
555AC_ARG_ENABLE(timerfd-wrapper,
556[AC_HELP_STRING([--enable-timerfd-wrapper],[timerfd is in the kernel but not in your libc])],[enable_timer_fd_wrapper="$enableval"],[enable_timer_fd_wrapper="no"])
d28b2391
AM
557AM_CONDITIONAL([ENABLE_TIMERFD_WRAPPER],[test "x$enable_timer_fd_wrapper" != "xno"])
558
f2067001
BW
559ESL_LDFLAGS=
560PLATFORM_CORE_LDFLAGS=
561PLATFORM_CORE_LIBS=
d28b2391 562
3b1278a3
TC
563path_remove () {
564 echo "$1" | sed 's/:/\n/g' | grep -Fxv "$2" | tr '\n' ':' | sed 's/:$/\n/'
565}
566path_push_unique () {
567 x="$(eval echo \$$1)"
568 x="$(path_remove "$x" "$2")"
03132e3f 569 eval export $1="$2:$x"
3b1278a3
TC
570}
571
55b3e6cb
MJ
572# tweak platform specific flags
573case "$host" in
c9bdf3b4 574 *darwin13.*|*darwin12.*|*darwin11.*)
0952a99a 575 APR_ADDTO(SWITCH_AM_CFLAGS, -DMACOSX)
85d6b9af
MJ
576 APR_ADDTO(CFLAGS, -pipe -no-cpp-precomp -Wno-deprecated-declarations -I/usr/local/opt/openssl/include)
577 APR_ADDTO(LDFLAGS, -pipe -bind_at_load -L/usr/local/opt/openssl/lib)
0952a99a
MJ
578 APR_ADDTO(CXXFLAGS, -pipe)
579 APR_REMOVEFROM(SWITCH_AM_CFLAGS, -fPIC)
580 if test "x$enable_core_odbc_support" != "xno"; then
581 APR_ADDTO([PLATFORM_CORE_LDFLAGS], [--framework CoreFoundation])
582 fi
583 APR_ADDTO([PLATFORM_CORE_LIBS], [-ldl])
584 ;;
5e7986bf
MJ
585 *darwin10.*)
586 APR_ADDTO(SWITCH_AM_CFLAGS, -DMACOSX)
85d6b9af
MJ
587 APR_ADDTO(CFLAGS, -pipe -no-cpp-precomp -I/usr/local/opt/openssl/include)
588 APR_ADDTO(LDFLAGS, -pipe -bind_at_load -L/usr/local/opt/openssl/lib)
5e7986bf
MJ
589 APR_ADDTO(CXXFLAGS, -pipe)
590 APR_REMOVEFROM(SWITCH_AM_CFLAGS, -fPIC)
591 if test "x$enable_core_odbc_support" != "xno"; then
a48da3b4 592 APR_ADDTO([PLATFORM_CORE_LDFLAGS], [--framework CoreFoundation])
5e7986bf 593 fi
cdabd564 594 APR_ADDTO([PLATFORM_CORE_LIBS], [-ldl])
5e7986bf 595 ;;
6ae16d15 596 *darwin*)
85d6b9af
MJ
597 APR_ADDTO(CFLAGS, -I/usr/local/opt/openssl/include)
598 APR_ADDTO(LDFLAGS, -L/usr/local/opt/openssl/lib)
55b3e6cb
MJ
599 APR_ADDTO(SWITCH_AM_CFLAGS, -DMACOSX)
600 APR_REMOVEFROM(SWITCH_AM_CFLAGS, -fPIC)
9a9ba4c3 601 if test "x$enable_core_odbc_support" != "xno"; then
a48da3b4 602 APR_ADDTO([PLATFORM_CORE_LDFLAGS], [--framework CoreFoundation])
9a9ba4c3 603 fi
cdabd564 604 APR_ADDTO([PLATFORM_CORE_LIBS], [-ldl])
55b3e6cb
MJ
605 ;;
606 *-solaris2*)
148f67e0
BW
607 if test "${enable_64}" = "yes"; then
608 APR_ADDTO(CFLAGS, [-I/opt/64/include])
148f67e0
BW
609 APR_ADDTO(CXXFLAGS, [-I/opt/64/include])
610 APR_ADDTO(LDFLAGS, [-L/opt/64/lib -Wl,-rpath,/opt/64/lib])
4dddcafc
BW
611 APR_ADDTO(SWITCH_AM_CFLAGS, [-I/opt/64/include])
612 APR_ADDTO(SWITCH_AM_LDFLAGS, [-L/opt/64/lib -Wl,-rpath,/opt/64/lib])
148f67e0
BW
613 else
614 APR_ADDTO(CFLAGS, [-I/opt/include])
148f67e0
BW
615 APR_ADDTO(CXXFLAGS, -I/opt/include)
616 APR_ADDTO(LDFLAGS, [-L/opt/lib -Wl,-rpath,/opt/lib])
617 APR_ADDTO(SWITCH_AM_CFLAGS, [-I/opt/include])
618 APR_ADDTO(SWITCH_AM_LDFLAGS, [-L/opt/lib -Wl,-rpath,/opt/lib])
619 fi
cb1cb69e 620 APR_ADDTO(SWITCH_AM_CFLAGS, -DPATH_MAX=2048 -D__EXTENSIONS__)
54a9eba4 621 APR_ADDTO(SWITCH_AM_LDFLAGS, -lsendfile -lresolv -lsocket -lnsl -luuid)
bb33c4e7 622 APR_ADDTO(ESL_LDFLAGS, -lnsl -lsocket)
a48da3b4 623 APR_ADDTO([PLATFORM_CORE_LIBS], [-ldl -lcrypt -lrt -lsendfile -lresolv -lsocket -lnsl -luuid])
55b3e6cb 624 ;;
4f2e0f19
MJ
625 *dragonfly*)
626 APR_ADDTO(CFLAGS, -I/usr/local/include)
627 APR_ADDTO(LDFLAGS, -L/usr/local/lib)
628 APR_ADDTO(SWITCH_AM_CFLAGS, -I/usr/local/include)
629 ;;
eab96981
MJ
630 *openbsd*)
631 APR_ADDTO(CFLAGS, -I/usr/local/include)
632 APR_ADDTO(LDFLAGS, -L/usr/local/lib)
633 APR_ADDTO(SWITCH_AM_CFLAGS, -I/usr/local/include)
634 ;;
a91ba93d
BW
635 *netbsd*)
636 APR_ADDTO(CFLAGS, -I/usr/pkg/include)
783a4083 637 APR_ADDTO(LDFLAGS, [-L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib])
a91ba93d
BW
638 APR_ADDTO(SWITCH_AM_CFLAGS, -I/usr/pkg/include)
639 ;;
f0b58efb 640 *bsd*)
ec718814
MJ
641 APR_ADDTO(CFLAGS, -I/usr/local/include)
642 APR_ADDTO(LDFLAGS, -L/usr/local/lib)
f0b58efb 643 APR_ADDTO(SWITCH_AM_CFLAGS, -I/usr/local/include)
041e3bf0 644 APR_ADDTO([PLATFORM_CORE_LIBS], [-lcrypt -lrt])
a48da3b4
SK
645 ;;
646 *linux*)
647 APR_ADDTO([PLATFORM_CORE_LIBS], [-ldl -lcrypt -lrt])
f0b58efb 648 ;;
55b3e6cb
MJ
649esac
650
514bde18
MJ
651APR_REMOVEFROM(SWITCH_AM_CXXFLAGS, -std=c99)
652
9b85b9c9
MJ
653AC_CHECK_LIB(z, inflateReset, have_libz=yes, AC_MSG_ERROR([no usable zlib; please install zlib devel package or equivalent]))
654if test "x$have_libz" = "xyes" ; then
655APR_ADDTO([PLATFORM_CORE_LIBS], [-lz])
656fi
657
658AC_CHECK_LIB(jpeg, jpeg_std_error,, AC_MSG_ERROR([no usable libjpeg; please install libjpeg devel package or equivalent]))
659
660AC_CHECK_LIB(jbig, jbg_enc_out, have_libjbig=yes, have_libjbig=no)
661if test "x$have_libjbig" = "xyes" ; then
662SPANDSP_LA_JBIG="-ljbig"
663AC_SUBST(SPANDSP_LA_JBIG)
664fi
665
666AC_CHECK_LIB(lzma, lzma_code, have_liblzma=yes, have_liblzma=no)
667if test "x$have_liblzma" = "xyes" ; then
668SPANDSP_LA_LZMA="-llzma"
669AC_SUBST(SPANDSP_LA_LZMA)
670fi
671
672AC_CHECK_LIB(resolv, res_init, have_libresolv=yes, have_libresolv=no)
673if test "x$have_libresolv" = "xyes" ; then
674APR_ADDTO(SWITCH_AM_LDFLAGS, -lresolv)
675fi
676
55b3e6cb 677AC_SUBST(SWITCH_AM_CFLAGS)
02c7a3ac 678AC_SUBST(SWITCH_ANSI_CFLAGS)
514bde18 679AC_SUBST(SWITCH_AM_CXXFLAGS)
55b3e6cb 680AC_SUBST(SWITCH_AM_LDFLAGS)
3ec59cdb 681AC_SUBST(ESL_LDFLAGS)
a48da3b4
SK
682AC_SUBST(PLATFORM_CORE_LDFLAGS)
683AC_SUBST(PLATFORM_CORE_LIBS)
6bc48b70 684AC_SUBST(SOLINK)
02141e30 685AC_SUBST(LIBTOOL_LIB_EXTEN)
6bc48b70 686
4da77ea5
AM
687# Checks for header files.
688AC_HEADER_DIRENT
689AC_HEADER_STDC
6b6c83a7 690AC_CHECK_HEADERS([sys/types.h sys/resource.h sched.h wchar.h sys/filio.h sys/ioctl.h sys/select.h netdb.h execinfo.h])
56008e2b 691
56008e2b
AM
692if test x"$ac_cv_header_wchar_h" = xyes; then
693 HAVE_WCHAR_H_DEFINE=1
694else
695 HAVE_WCHAR_H_DEFINE=0
696fi
697AC_SUBST(HAVE_WCHAR_H_DEFINE)
4da77ea5 698
6b6c83a7
JL
699# Needed by Abyss on Solaris:
700
701if test x"$ac_cv_header_sys_filio_h" = xyes; then
702 HAVE_SYS_FILIO_H_DEFINE=1
703else
704 HAVE_SYS_FILIO_H_DEFINE=0
705fi
706AC_SUBST(HAVE_SYS_FILIO_H_DEFINE)
707
708# Needed by Abyss on Solaris:
709
710if test x"$ac_cv_header_sys_ioctl_h" = xyes; then
711 HAVE_SYS_IOCTL_H_DEFINE=1
712else
713 HAVE_SYS_IOCTL_H_DEFINE=0
714fi
715AC_SUBST(HAVE_SYS_IOCTL_H_DEFINE)
716
717if test x"$ac_cv_header_sys_select_h" = xyes; then
718 HAVE_SYS_SELECT_H_DEFINE=1
719else
720 HAVE_SYS_SELECT_H_DEFINE=0
721fi
722AC_SUBST(HAVE_SYS_SELECT_H_DEFINE)
723
4da77ea5
AM
724# Checks for typedefs, structures, and compiler characteristics.
725AC_C_CONST
726AC_C_INLINE
727AC_TYPE_SIZE_T
728AC_HEADER_TIME
729AC_STRUCT_TM
730
731# Checks for library functions.
732AC_PROG_GCC_TRADITIONAL
a7bf6f8d 733AC_FUNC_MALLOC
4da77ea5
AM
734AC_TYPE_SIGNAL
735AC_FUNC_STRFTIME
d91f67d0 736AC_CHECK_FUNCS([gethostname vasprintf mmap mlock mlockall usleep getifaddrs timerfd_create getdtablesize posix_openpt])
ea5c0c21 737AC_CHECK_FUNCS([sched_setscheduler setpriority setrlimit setgroups initgroups])
4062b636 738AC_CHECK_FUNCS([wcsncmp setgroups asprintf setenv pselect gettimeofday localtime_r gmtime_r strcasecmp stricmp _stricmp])
b382c0a4 739
8bcf3b4f
SK
740# Check availability and return type of strerror_r
741# (NOTE: apr-1-config sets -D_GNU_SOURCE at build-time, need to run the check with it too)
742save_CPPFLAGS="$CPPFLAGS"
743CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
744AC_FUNC_STRERROR_R
745CPPFLAGS="$save_CPPFLAGS"
746
ea5c0c21
MJ
747AX_HAVE_CPU_SET
748
eb9f9fb2 749AC_CHECK_LIB(rt, clock_gettime, [AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if you have clock_gettime()])])
d314f254 750AC_CHECK_LIB(rt, clock_getres, [AC_DEFINE(HAVE_CLOCK_GETRES, 1, [Define if you have clock_getres()])])
eb9f9fb2 751AC_CHECK_LIB(rt, clock_nanosleep, [AC_DEFINE(HAVE_CLOCK_NANOSLEEP, 1, [Define if you have clock_nanosleep()])])
6627dc86 752AC_CHECK_LIB(pthread, pthread_setschedparam, [AC_DEFINE(HAVE_PTHREAD_SETSCHEDPARAM, 1, [Define if you have pthread_setschedparam()])])
5f469ad2 753
4062b636 754AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket))
eb9f9fb2 755
d91f67d0
AM
756AC_CHECK_FILE(/dev/ptmx, [AC_DEFINE(HAVE_DEV_PTMX, 1, [Define if you have /dev/ptmx])])
757AC_CHECK_LIB(util, openpty, [AC_DEFINE(HAVE_OPENPTY, 1, [Define if you have openpty()])])
758
bf988471 759AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[
21159328
MJ
760#include <sys/types.h>
761#include <time.h>])
762
bf988471 763AC_CHECK_MEMBERS([struct tm.tm_zone],,,[
21159328
MJ
764#include <sys/types.h>
765#include <time.h>])
766
b382c0a4
MJ
767AC_CHECK_DECL([RLIMIT_MEMLOCK],
768 [AC_DEFINE([HAVE_RLIMIT_MEMLOCK],[1],[RLIMIT_MEMLOCK constant for setrlimit])],,
769 [#ifdef HAVE_SYS_RESOURCE_H
770 #include <sys/resource.h>
771 #endif])
772
773AC_CHECK_DECL([SCHED_RR],
774 [AC_DEFINE([HAVE_SCHED_RR],[1],[SCHED_RR constant for sched_setscheduler])],,
775 [#ifdef HAVE_SCHED_H
776 #include <sched.h>
777 #endif])
778
817439d7
AM
779AC_CHECK_DECL([SCHED_FIFO],
780 [AC_DEFINE([HAVE_SCHED_FIFO],[1],[SCHED_FIFO constant for sched_setscheduler])],,
781 [#ifdef HAVE_SCHED_H
782 #include <sched.h>
783 #endif])
784
b382c0a4
MJ
785#
786# use mlockall only on linux (for now; if available)
787#
788if test "x${ac_cv_func_mlockall}" = "xyes"; then
789 AC_MSG_CHECKING([whether to use mlockall])
790 case "$host" in
791 *-linux-*)
792 AC_DEFINE([USE_MLOCKALL],[1],[Enable mlockall support])
793 AC_MSG_RESULT([yes])
794 USE_MLOCKALL=yes
795 ;;
796 *-freebsd*)
883de14f
JL
797 APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC)
798 APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC)
b382c0a4
MJ
799 AC_MSG_RESULT([no, broken for non-root users])
800 ;;
801 *)
802 AC_MSG_RESULT([no])
803 ;;
804 esac
805
806 #
807 # setrlimit prerequisites
808 #
809 if test "x${USE_MLOCKALL}" = "xyes" -a \
810 "x${ac_cv_func_setrlimit}" = "xyes" -a \
811 "x${ac_cv_have_decl_RLIMIT_MEMLOCK}" = "xyes"
812 then
813 AC_DEFINE([USE_SETRLIMIT],[1],[Use setrlimit to disable mlock limit for non-root users])
814 fi
815fi
816
817#
818# sched_setcheduler + round-robin scheduler prerequisites
819#
820if test "x${ac_cv_func_sched_setscheduler}" = "xyes" -a \
821 "x${ac_cv_have_decl_SCHED_RR}" = "xyes"
822then
823 AC_DEFINE([USE_SCHED_SETSCHEDULER],[1],[Enable round-robin scheduler using sched_setscheduler])
824fi
4062b636
AM
825#
826# xmlrpc-c checks
827#
828
6b6c83a7 829AC_CHECK_FUNCS(setenv strtoll strtoull strtoq strtouq __strtoll __strtoull)
4062b636
AM
830
831HAVE_LIBWWW_SSL_DEFINE=0
832AC_SUBST(HAVE_LIBWWW_SSL_DEFINE)
833
834DIRECTORY_SEPARATOR="/"
835AC_SUBST(DIRECTORY_SEPARATOR)
836
837va_list_is_array=no
838AC_MSG_CHECKING(whether va_list is an array)
839AC_TRY_COMPILE([
840#include <stdarg.h>
841], [va_list list1, list2; list1 = list2;], ,
842va_list_is_array=yes)
843AC_MSG_RESULT($va_list_is_array)
844if test x"$va_list_is_array" = xyes; then
845 VA_LIST_IS_ARRAY_DEFINE=1
846else
847 VA_LIST_IS_ARRAY_DEFINE=0
848fi
849AC_SUBST(VA_LIST_IS_ARRAY_DEFINE)
850
554f476c 851
4062b636
AM
852AC_MSG_CHECKING(whether compiler has __attribute__)
853AC_TRY_COMPILE(, [int x __attribute__((__unused__));],
854compiler_has_attribute=yes,
855compiler_has_attribute=no)
856AC_MSG_RESULT($compiler_has_attribute)
857if test x"$compiler_has_attribute" = xyes; then
858 ATTR_UNUSED="__attribute__((__unused__))"
859else
860 ATTR_UNUSED=
861fi
862AC_SUBST(ATTR_UNUSED)
863
864
554f476c
MJ
865saved_CFLAGS="$CFLAGS"
866AC_CACHE_CHECK([whether compiler supports -Wdeclaration-after-statement], [ac_cv_gcc_declaration_after_statement], [
867CFLAGS="$CFLAGS -Wdeclaration-after-statement"
868AC_TRY_COMPILE([],[return 0;],[ac_cv_gcc_declaration_after_statement=yes],[ac_cv_gcc_declaration_after_statement=no])
869])
870AC_MSG_RESULT($ac_cv_gcc_declaration_after_statement)
871if test x"$ac_cv_gcc_declaration_after_statement" = xyes; then
872 APR_ADDTO(SWITCH_ANSI_CFLAGS, -Wdeclaration-after-statement)
873fi
874CFLAGS="$saved_CFLAGS"
4da77ea5 875
c7ccf84a
MJ
876if test "x${ax_cv_c_compiler_vendor}" = "xclang" ; then
877 # Next check added for Xcode 5 and systems with clang 5 llvm 3.3 or above, extended offset must be off
878 AC_CACHE_CHECK([whether compiler supports -Wextended-offsetof], [ac_cv_clang_extended_offsetof], [
879 AC_TRY_COMPILE([],[return 0;],[ac_cv_clang_extended_offsetof=yes],[ac_cv_clang_extended_offsetof=no])
880 ])
881 AC_MSG_RESULT($ac_cv_clang_extended_offsetof)
882 if test x"$ac_cv_clang_extended_offsetof" = xyes; then
883 APR_ADDTO(CFLAGS, -Wno-extended-offsetof)
884 fi
44d5d43b
MJ
885fi
886
eb8ff5a0
MOC
887# Tested and fixed lot of modules, but some are untested. Will be added back when the core team decide it ready
888# Untested modules : mod_osp mod_soundtouch mod_sangoma_codec mod_dingaling mod_opal mod_skypopen mod_h323 mod_khomp
889# mod_unimrcp mod_cepstral mod_erlang_event mod_snmp mod_perl mod_java mod_managed
890#
891#saved_CFLAGS="$CFLAGS"
892#AC_CACHE_CHECK([whether compiler supports -Wunused-but-set-variable], [ac_cv_gcc_unused_but_set_variable], [
893#CFLAGS="$CFLAGS -Wunused-but-set-variable"
894#AC_TRY_COMPILE([],[return 0;],[ac_cv_gcc_unused_but_set_variable=yes],[ac_cv_gcc_unused_but_set_variable=no])
895#])
896#AC_MSG_RESULT($ac_cv_gcc_unused_but_set_variable)
897#if test x"$ac_cv_gcc_unused_but_set_variable" = xyes; then
898# APR_ADDTO(SWITCH_ANSI_CFLAGS, -Wunused-but-set-variable)
899#fi
900#CFLAGS="$saved_CFLAGS"
f952719e 901
44cc7d5c 902AC_C_BIGENDIAN(AC_DEFINE([SWITCH_BYTE_ORDER],__BIG_ENDIAN,[Big Endian]),AC_DEFINE([SWITCH_BYTE_ORDER],__LITTLE_ENDIAN,[Little Endian]))
49a0eb29 903
42e78242
MJ
904# Checks for integer size
905AC_CHECK_SIZEOF(char, 1)
906AC_CHECK_SIZEOF(int, 4)
907AC_CHECK_SIZEOF(long, 4)
908AC_CHECK_SIZEOF(short, 2)
909AC_CHECK_SIZEOF(long long, 8)
910AC_TYPE_SIZE_T
911AC_CHECK_TYPE(ssize_t, int)
912
913# Checks for pointer size
914AC_CHECK_SIZEOF(void*, 4)
915
916if test "x$ac_cv_sizeof_voidp" != "x"; then
917 voidp_size=$ac_cv_sizeof_voidp
918else
919 AC_ERROR([Cannot determine size of void*])
920fi
921
922if test "$ac_cv_sizeof_short" = "2"; then
923 short_value=short
924fi
925if test "$ac_cv_sizeof_int" = "4"; then
926 int_value=int
927fi
928
929if test "$ac_cv_sizeof_int" = "8"; then
930 int64_t_fmt='#define SWITCH_INT64_T_FMT "d"'
931 uint64_t_fmt='#define SWITCH_UINT64_T_FMT "u"'
932 int64_value="int"
933 long_value=int
934elif test "$ac_cv_sizeof_long" = "8"; then
935 int64_t_fmt='#define SWITCH_INT64_T_FMT "ld"'
936 uint64_t_fmt='#define SWITCH_UINT64_T_FMT "lu"'
937 int64_value="long"
938 long_value=long
764b7958 939 case "$host" in
44410b71
BW
940 *pc-solaris2*)
941 ;;
f6fe2667 942 *-solaris2*|*apple-darwin*|*-openbsd*)
764b7958
MJ
943 if test "$ac_cv_sizeof_long_long" = "8"; then
944 int64_t_fmt='#define SWITCH_INT64_T_FMT "lld"'
945 uint64_t_fmt='#define SWITCH_UINT64_T_FMT "llu"'
946 int64_value="long long"
947 long_value="long long"
948 fi
949 ;;
950 esac
42e78242
MJ
951elif test "$ac_cv_sizeof_long_long" = "8"; then
952 int64_t_fmt='#define SWITCH_INT64_T_FMT "lld"'
953 uint64_t_fmt='#define SWITCH_UINT64_T_FMT "llu"'
954 int64_value="long long"
955 long_value="long long"
956elif test "$ac_cv_sizeof_longlong" = "8"; then
957 int64_t_fmt='#define SWITCH_INT64_T_FMT "qd"'
958 uint64_t_fmt='#define SWITCH_UINT64_T_FMT "qu"'
959 int64_value="__int64"
960 long_value="__int64"
961else
962 AC_ERROR([could not detect a 64-bit integer type])
963fi
964
965if test "$ac_cv_type_size_t" = "yes"; then
966 size_t_value="size_t"
967else
968 size_t_value="switch_int32_t"
969fi
970
971if test "$ac_cv_type_ssize_t" = "yes"; then
972 ssize_t_value="ssize_t"
973else
974 ssize_t_value="switch_int32_t"
975fi
976
977APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
978
979if test "$ac_cv_sizeof_ssize_t" = "$ac_cv_sizeof_int"; then
980 ssize_t_fmt='#define SWITCH_SSIZE_T_FMT "d"'
981elif test "$ac_cv_sizeof_ssize_t" = "$ac_cv_sizeof_long"; then
982 ssize_t_fmt='#define SWITCH_SSIZE_T_FMT "ld"'
983else
984 ssize_t_fmt='#error Can not determine the proper size for ssize_t'
985fi
986
987APR_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8)
988
989if test "$ac_cv_sizeof_size_t" = "$ac_cv_sizeof_int"; then
990 size_t_fmt='#define SWITCH_SIZE_T_FMT "d"'
991elif test "$ac_cv_sizeof_size_t" = "$ac_cv_sizeof_long"; then
992 size_t_fmt='#define SWITCH_SIZE_T_FMT "ld"'
993else
d90bac38 994 size_t_fmt='#define SWITCH_SIZE_T_FMT "zu"'
42e78242
MJ
995fi
996
997# Basically, we have tried to figure out the correct format strings
998# for SWITCH types which vary between platforms, but we don't always get
999# it right. If you find that we don't get it right for your platform,
1000# you can override our decision below.
1001# NOTE: borrowed much of this logic from apr.
1002case $host in
1003 s390*linux*)
1004 # uniquely, the 31-bit Linux/s390 uses "unsigned long int"
1005 # for size_t rather than "unsigned int":
1006 size_t_fmt='#define SWITCH_SIZE_T_FMT "lu"'
1007 ssize_t_fmt='#define SWITCH_SSIZE_T_FMT "ld"'
1008 ;;
1009 *-os2*)
1010 size_t_fmt='#define SWITCH_SIZE_T_FMT "lu"'
1011 ;;
6d66ecfd
MJ
1012 *-openbsd*)
1013 size_t_fmt='#define SWITCH_SIZE_T_FMT "ld"'
1014 ;;
42e78242
MJ
1015 *aix4*|*aix5*)
1016 ssize_t_fmt='#define SWITCH_SSIZE_T_FMT "ld"'
1017 size_t_fmt='#define SWITCH_SIZE_T_FMT "ld"'
1018 ;;
1019 *beos*)
1020 ssize_t_fmt='#define SWITCH_SSIZE_T_FMT "ld"'
1021 size_t_fmt='#define SWITCH_SIZE_T_FMT "ld"'
1022 ;;
1023 *apple-darwin*)
1024 osver=`uname -r`
1025 case $osver in
1026 [0-7].*)
1027 ssize_t_fmt='#define SWITCH_SSIZE_T_FMT "d"'
1028 ;;
1029 *)
1030 ssize_t_fmt='#define SWITCH_SSIZE_T_FMT "ld"'
1031 ;;
1032 esac
1033 size_t_fmt='#define SWITCH_SIZE_T_FMT "lu"'
1034 ;;
1035esac
1036
1037AC_SUBST(voidp_size)
1038AC_SUBST(short_value)
1039AC_SUBST(int_value)
1040AC_SUBST(long_value)
1041AC_SUBST(int64_value)
1042AC_SUBST(size_t_value)
1043AC_SUBST(ssize_t_value)
1044AC_SUBST(int64_t_fmt)
1045AC_SUBST(uint64_t_fmt)
1046AC_SUBST(ssize_t_fmt)
1047AC_SUBST(size_t_fmt)
42e78242 1048
f6fe2667
MJ
1049case $host in
1050 *-openbsd*)
1051 # OpenBSD's gunzip and friends don't like -d because its redundant, only gzip does
1052 AC_PATH_PROGS(ZCAT, gzip)
1053 ;;
1054 *)
1055 AC_PATH_PROGS(ZCAT, gunzip gzcat gzip zcat)
1056 ;;
1057esac
1058
50328a66
TC
1059AC_PATH_PROGS(BZIP, bzip2)
1060AC_PATH_PROGS(XZ, xz)
bc34fb76
MJ
1061AC_PATH_PROGS(TAR, gtar tar)
1062AC_PATH_PROGS(WGET, wget)
1063AC_PATH_PROGS(CURL, curl)
d2cf7f86 1064GETLIB="cd $switch_srcdir/libs && ${SHELL} $switch_builddir/build/getlib.sh"
c99d8c9b 1065AC_SUBST(GETLIB)
17d52112
MJ
1066GETG729="cd $switch_srcdir/libs && ${SHELL} $switch_builddir/build/getg729.sh"
1067AC_SUBST(GETG729)
d2cf7f86 1068GETSOUNDS="${SHELL} $switch_builddir/build/getsounds.sh"
3d5fcabe 1069AC_SUBST(GETSOUNDS)
c99d8c9b 1070
d1045b12
MJ
1071case $host in
1072 *-darwin*)
1073 path_push_unique PKG_CONFIG_PATH /usr/local/opt/curl/lib/pkgconfig
1074 ;;
1075esac
1076
ad094b7a 1077PKG_CHECK_MODULES([CURL], [libcurl >= 7.19])
74da7aaf 1078PKG_CHECK_MODULES([PCRE], [libpcre >= 7.8])
b283db63 1079PKG_CHECK_MODULES([SPEEX], [speex >= 1.2rc1 speexdsp >= 1.2rc1])
4d62a1ad 1080
c5c13c26 1081AC_ARG_ENABLE(core-libedit-support,
2bcd991b 1082 [AS_HELP_STRING([--disable-core-libedit-support], [Compile without libedit Support])], [enable_core_libedit_support="$enableval"], [enable_core_libedit_support="yes"])
c5c13c26 1083
28213aad 1084if test "$enable_core_libedit_support" = "yes" ; then
58e7db0c
MJ
1085 AC_CHECK_LIB(tinfo, tgetent, [have_libtinfo="yes"], [have_libtinfo="no"])
1086 if test "$have_libtinfo" == "yes" ; then
1087 TINFO_LIBS="-ltinfo"
1088 else
1089 TINFO_LIBS=""
1090 AC_CHECK_LIB(ncurses, tgetent,,
1091 [AC_CHECK_LIB(curses, tgetent,,
1092 [AC_MSG_ERROR([libtermcap, libcurses or libncurses are required!])] )] )
1093 fi
1094 AC_SUBST(TINFO_LIBS)
28213aad
AM
1095fi
1096
219a2ecc
AT
1097SAC_OPENSSL
1098
9d6d8a1c
AT
1099if test x$HAVE_OPENSSL = x1; then
1100 openssl_CFLAGS="$openssl_CFLAGS -DHAVE_OPENSSL";
1d18b58b 1101 APR_ADDTO(SWITCH_AM_CFLAGS, -DHAVE_OPENSSL)
2fe3ef03 1102 AC_CHECK_LIB(ssl, SSL_CTX_set_tlsext_use_srtp, AC_DEFINE_UNQUOTED(HAVE_OPENSSL_DTLS_SRTP, 1, HAVE_OPENSSL_DTLS_SRTP), AC_MSG_ERROR([OpenSSL >= 1.0.1e and associated developement headers required]))
85d6b9af 1103 AC_CHECK_LIB(ssl, DTLSv1_method, AC_DEFINE_UNQUOTED(HAVE_OPENSSL_DTLS, 1, HAVE_OPENSSL_DTLS), AC_MSG_ERROR([OpenSSL >= 1.0.1e and associaed developement headers required]))
15f219ea 1104else
f2331de6 1105 AC_MSG_ERROR([OpenSSL >= 1.0.1e and associated developement headers required])
9d6d8a1c
AT
1106fi
1107
e69fe7e3 1108AX_CHECK_JAVA
7df787b7 1109
2e32d105
PO
1110# Option to enable static linking of Google's V8 inside mod_v8
1111AC_ARG_ENABLE(static-v8,
1112[AS_HELP_STRING([--enable-static-v8], [Statically link V8 into mod_v8])], [enable_static_v8="$enableval"], [enable_static_v8="no"])
1113AM_CONDITIONAL([ENABLE_STATIC_V8],[test "x$enable_static_v8" != "xno"])
753fa8fb 1114
31b743d6
MJ
1115AM_CONDITIONAL([HAVE_ODBC],[test "x$enable_core_odbc_support" != "xno"])
1116AM_CONDITIONAL([HAVE_LIBEDIT],[test "x$enable_core_libedit_support" != "xno"])
778a82cc 1117AM_CONDITIONAL([HAVE_MYSQL],[test "$found_mysql" = "yes"])
49a0eb29 1118
719d37db
BW
1119#
1120# perl checks
1121#
1122
5014b80d
BW
1123AC_CHECK_PROG(PERL,perl,[ac_cv_have_perl=yes],[ac_cv_have_perl=no])
1124AM_CONDITIONAL([HAVE_PERL],[test "x$ac_cv_have_perl" != "xno"])
1125
1126if test "x$ac_cv_have_perl" != "xno" ; then
1127 PERL_SITEDIR="`$PERL -MConfig -e 'print $Config{sitelibexp}'`"
1128 PERL_LIBDIR="-L`$PERL -MConfig -e 'print $Config{archlib}'`/CORE"
1129 PERL_LIBS="`$PERL -MConfig -e 'print $Config{libs}'`"
1130 PERL_CFLAGS="-w -DMULTIPLICITY `$PERL -MExtUtils::Embed -e ccopts` -DEMBED_PERL"
1131 PERL_LDFLAGS="`$PERL -MExtUtils::Embed -e ldopts` `$PERL -MConfig -e 'print $Config{libs}'`"
1132 PERL_INC="`$PERL -MExtUtils::Embed -e perl_inc`"
1133 AC_SUBST(PERL_SITEDIR)
1134 AC_SUBST(PERL_LIBDIR)
1135 AC_SUBST(PERL_LIBS)
1136 AC_SUBST(PERL_CFLAGS)
1137 AC_SUBST(PERL_LDFLAGS)
1138 AC_SUBST(PERL_INC)
1139fi
1140
719d37db
BW
1141#
1142# php checks
1143#
1144
1145AC_CHECK_PROG(PHP,php,[ac_cv_have_php=yes],[ac_cv_have_php=no])
1146AC_CHECK_PROG(PHP_CONFIG,php-config,[ac_cv_have_php_config=yes],[ac_cv_have_php_config=no])
1147AM_CONDITIONAL([HAVE_PHP],[test "x$ac_cv_have_php" != "xno" -a "x$ac_cv_have_php_config" != "xno"])
1148
1149if test "x$ac_cv_have_php" != "xno" -a "x$ac_cv_have_php_config" != "xno"; then
1150 PHP=php
1151 PHP_CONFIG=php-config
1152 PHP_LDFLAGS="`$PHP_CONFIG --ldflags`"
1153 PHP_LIBS="`$PHP_CONFIG --libs | sed -r 's/ ?-l(bz2|pcre|xml2|gssapi_krb5|krb5|k5crypto|com_err|history|z|readline|gmp|ssl|crypto)//g'`"
1154 PHP_EXT_DIR="`$PHP_CONFIG --extension-dir`"
1155 PHP_INC_DIR="`$PHP -r 'echo ini_get("include_path");' | cut -d: -f2`"
1156 PHP_INI_DIR="`$PHP_CONFIG --configure-options | tr " " "\n" | grep -- --with-config-file-scan-dir | cut -f2 -d=`"
1157 PHP_CFLAGS="`$PHP_CONFIG --includes`"
1158 AC_SUBST(PHP_LDFLAGS)
1159 AC_SUBST(PHP_LIBS)
1160 AC_SUBST(PHP_EXT_DIR)
1161 AC_SUBST(PHP_INC_DIR)
1162 AC_SUBST(PHP_INI_DIR)
1163 AC_SUBST(PHP_CFLAGS)
1164fi
1165
e8c88aa1
SK
1166#
1167# Python checks for mod_python
1168#
1169AC_ARG_WITH(
1170 [python],
1171 [AS_HELP_STRING([--with-python], [Use system provided version of python (default: try)])],
1172 [with_python="$withval"],
1173 [with_python="try"]
1174)
1175
e8c88aa1
SK
1176if test "$with_python" != "no"
1177then
2d14539e
SK
1178 save_CFLAGS="$CFLAGS"
1179 save_LIBS="$LIBS"
1180
e8c88aa1
SK
1181 if test "$with_python" != "yes" -a "$with_python" != "try" ; then
1182 AC_MSG_CHECKING([for python])
1183 if test ! -x "$with_python" ; then
1184 AC_MSG_ERROR([Specified python does not exist or is not executable: $with_python])
1185 fi
1186 AC_MSG_RESULT([$with_python])
1187 AC_SUBST([PYTHON], ["$with_python"])
1188 else
1189 AC_PATH_PROG([PYTHON], ["python"], ["no"], ["$PATH:/usr/bin:/usr/local/bin"])
1190 fi
1191
1192 if test "$PYTHON" != "no" ; then
1193 AC_MSG_CHECKING([python version])
1194 PYTHON_VER="`$PYTHON -V 2>&1 | cut -d' ' -f2`"
1195
1196 if test -z "$PYTHON_VER" ; then
1197 AC_MSG_ERROR([Unable to detect python version])
1198 fi
1199 AC_MSG_RESULT([$PYTHON_VER])
1200
2d14539e 1201 AC_MSG_CHECKING([for python distutils])
baf944eb
SK
1202 python_result="`$PYTHON -c 'import distutils;' 2>&1`"
1203 if test -z "$python_result" ; then
2d14539e 1204 python_has_distutils="yes"
baf944eb
SK
1205 else
1206 python_has_distutils="no"
2d14539e
SK
1207 fi
1208 AC_MSG_RESULT([$python_has_distutils])
1209
baf944eb 1210 if test "$python_has_distutils" != "no" ; then
f08ac862
SK
1211 AC_MSG_CHECKING([location of site-packages])
1212
83680470 1213 PYTHON_SITE_DIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`"
f08ac862
SK
1214
1215 if test -z "$PYTHON_SITE_DIR" ; then
1216 AC_MSG_ERROR([Unable to detect python site-packages path])
1217 elif test ! -d "$PYTHON_SITE_DIR" ; then
1218 AC_MSG_ERROR([Path $PYTHON_SITE_DIR returned by python does not exist!])
1219 fi
1220 AC_MSG_RESULT([$PYTHON_SITE_DIR])
1221 AC_SUBST([PYTHON_SITE_DIR], [$PYTHON_SITE_DIR])
1222
2d14539e
SK
1223 #
1224 # python distutils found, get settings from python directly
1225 #
93129e32 1226 PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print(\" \".join(flags));' | sed -e 's/-arch i386//g;s/-arch x86_64//g'`"
83680470
SK
1227 PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print(\" \".join(libs));'`"
1228 PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print(\"python\" + sysconfig.get_config_var(\"VERSION\"));'`"
1229 PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_config_var(\"LIBDIR\"));'`"
ba892c27
SK
1230
1231 # handle python being installed into /usr/local
1232 AC_MSG_CHECKING([python libdir])
1233 if test -z "`echo $PYTHON_LIBDIR | grep "/usr/lib"`" ; then
1234 PYTHON_LDFLAGS="-L$PYTHON_LIBDIR $PYTHON_LDFLAGS"
1235 LIBS="-L$PYTHON_LIBDIR $LIBS"
1236 fi
1237 AC_MSG_RESULT([$PYTHON_LIBDIR])
e8c88aa1 1238
2d14539e
SK
1239 # check libpython
1240 AC_CHECK_LIB([$PYTHON_LIB], [main], [has_libpython="yes"], [has_libpython="no"])
1241
1242 if test "$has_libpython" = "no" ; then
1243 AS_IF([test "$with_python" = "try"],
1244 [AC_MSG_WARN([$PYTHON_LIB is unusable])],
1245 [AC_MSG_ERROR([$PYTHON_LIB is unusable])]
1246 )
1247 fi
e8c88aa1
SK
1248
1249 # check whether system libpython is usable and has threads support
2d14539e 1250 CFLAGS="$PYTHON_CFLAGS"
e8c88aa1
SK
1251 LIBS="$PYTHON_LDFLAGS"
1252 AC_CHECK_FUNC([PyThread_init_thread], [python_has_threads="yes"], [python_has_threads="no"])
e8c88aa1 1253
2d14539e
SK
1254 if test "$python_has_threads" = "no"; then
1255 AS_IF([test "$with_python" = "try"],
1256 [AC_MSG_WARN([Your python lacks threads support, can not build mod_python])],
1257 [AC_MSG_ERROR([Your python lacks threads support, can not build mod_python])]
1258 )
e8c88aa1
SK
1259 else
1260 AC_MSG_NOTICE([Your python seems OK, do not forget to enable mod_python in modules.conf])
2d14539e 1261 AC_SUBST([PYTHON_CFLAGS], [$PYTHON_CFLAGS])
e8c88aa1
SK
1262 AC_SUBST([PYTHON_LDFLAGS], [$PYTHON_LDFLAGS])
1263 fi
1264 else
2d14539e 1265 AS_IF([test "$with_python" = "try"],
baf944eb
SK
1266 [AC_MSG_WARN([Could not find or use python distutils module: $python_result])],
1267 [AC_MSG_ERROR([Could not find or use python distutils module: $python_result])]
2d14539e 1268 )
e8c88aa1
SK
1269 fi
1270
2d14539e
SK
1271 LIBS="$save_LIBS"
1272 CFLAGS="$save_CFLAGS"
1273
1274 unset python_has_threads
1275 unset python_has_distutils
baf944eb 1276 unset python_result
2d14539e
SK
1277 else
1278 AS_IF([test "$with_python" = "try"],
1279 [AC_MSG_WARN([Could not find python, mod_python will not build, use --with-python to specify the location])],
1280 [AC_MSG_ERROR([Could not find python, use --with-python to specify the location])]
1281 )
e8c88aa1
SK
1282 fi
1283else
1284 AC_MSG_WARN([python support disabled, building mod_python will fail!])
1285fi
1286
ea0316b8
AT
1287CHECK_ERLANG
1288
42e78242 1289AC_CONFIG_FILES([Makefile
7b3d3f7e
AM
1290 build/Makefile
1291 src/Makefile
1292 src/mod/Makefile
bcd9f49f
MJ
1293 src/mod/applications/mod_abstraction/Makefile
1294 src/mod/applications/mod_avmd/Makefile
1295 src/mod/applications/mod_blacklist/Makefile
1296 src/mod/applications/mod_callcenter/Makefile
1297 src/mod/applications/mod_cidlookup/Makefile
1298 src/mod/applications/mod_cluechoo/Makefile
1299 src/mod/applications/mod_commands/Makefile
1300 src/mod/applications/mod_conference/Makefile
1301 src/mod/applications/mod_curl/Makefile
1302 src/mod/applications/mod_db/Makefile
1303 src/mod/applications/mod_directory/Makefile
1304 src/mod/applications/mod_distributor/Makefile
1305 src/mod/applications/mod_dptools/Makefile
1306 src/mod/applications/mod_easyroute/Makefile
1307 src/mod/applications/mod_enum/Makefile
1308 src/mod/applications/mod_esf/Makefile
1309 src/mod/applications/mod_esl/Makefile
aad61cad 1310 src/mod/applications/mod_expr/Makefile
bcd9f49f
MJ
1311 src/mod/applications/mod_fifo/Makefile
1312 src/mod/applications/mod_fsk/Makefile
1313 src/mod/applications/mod_fsv/Makefile
1314 src/mod/applications/mod_hash/Makefile
1315 src/mod/applications/mod_httapi/Makefile
1316 src/mod/applications/mod_http_cache/Makefile
1317 src/mod/applications/mod_ladspa/Makefile
1318 src/mod/applications/mod_lcr/Makefile
1319 src/mod/applications/mod_limit/Makefile
1320 src/mod/applications/mod_memcache/Makefile
1321 src/mod/applications/mod_mongo/Makefile
1322 src/mod/applications/mod_mp4/Makefile
1323 src/mod/applications/mod_nibblebill/Makefile
1324 src/mod/applications/mod_oreka/Makefile
dc06a039 1325 src/mod/applications/mod_osp/Makefile
bcd9f49f
MJ
1326 src/mod/applications/mod_rad_auth/Makefile
1327 src/mod/applications/mod_random/Makefile
1328 src/mod/applications/mod_redis/Makefile
1329 src/mod/applications/mod_rss/Makefile
1330 src/mod/applications/mod_skel/Makefile
1331 src/mod/applications/mod_sms/Makefile
1332 src/mod/applications/mod_snapshot/Makefile
1333 src/mod/applications/mod_snipe_hunt/Makefile
1334 src/mod/applications/mod_snom/Makefile
1335 src/mod/applications/mod_sonar/Makefile
1336 src/mod/applications/mod_soundtouch/Makefile
1337 src/mod/applications/mod_spandsp/Makefile
1338 src/mod/applications/mod_spy/Makefile
ea181ca4 1339 src/mod/applications/mod_stress/Makefile
bcd9f49f
MJ
1340 src/mod/applications/mod_translate/Makefile
1341 src/mod/applications/mod_valet_parking/Makefile
1342 src/mod/applications/mod_vmd/Makefile
1343 src/mod/applications/mod_voicemail/Makefile
1344 src/mod/applications/mod_voicemail_ivr/Makefile
1345 src/mod/asr_tts/mod_cepstral/Makefile
1346 src/mod/asr_tts/mod_flite/Makefile
1347 src/mod/asr_tts/mod_pocketsphinx/Makefile
1348 src/mod/asr_tts/mod_tts_commandline/Makefile
1349 src/mod/asr_tts/mod_unimrcp/Makefile
1350 src/mod/codecs/mod_amr/Makefile
1351 src/mod/codecs/mod_amrwb/Makefile
1352 src/mod/codecs/mod_b64/Makefile
1353 src/mod/codecs/mod_bv/Makefile
1354 src/mod/codecs/mod_celt/Makefile
1355 src/mod/codecs/mod_codec2/Makefile
17d52112 1356 src/mod/codecs/mod_com_g729/Makefile
bcd9f49f
MJ
1357 src/mod/codecs/mod_dahdi_codec/Makefile
1358 src/mod/codecs/mod_g723_1/Makefile
1359 src/mod/codecs/mod_g729/Makefile
1360 src/mod/codecs/mod_h26x/Makefile
1361 src/mod/codecs/mod_ilbc/Makefile
1362 src/mod/codecs/mod_isac/Makefile
1363 src/mod/codecs/mod_mp4v/Makefile
1364 src/mod/codecs/mod_opus/Makefile
1365 src/mod/codecs/mod_sangoma_codec/Makefile
1366 src/mod/codecs/mod_silk/Makefile
1367 src/mod/codecs/mod_siren/Makefile
1368 src/mod/codecs/mod_skel_codec/Makefile
1369 src/mod/codecs/mod_theora/Makefile
1370 src/mod/codecs/mod_vp8/Makefile
1371 src/mod/dialplans/mod_dialplan_asterisk/Makefile
1372 src/mod/dialplans/mod_dialplan_directory/Makefile
1373 src/mod/dialplans/mod_dialplan_xml/Makefile
1374 src/mod/directories/mod_ldap/Makefile
1375 src/mod/endpoints/mod_alsa/Makefile
1376 src/mod/endpoints/mod_dingaling/Makefile
524c566e 1377 src/mod/endpoints/mod_gsmopen/Makefile
bcd9f49f
MJ
1378 src/mod/endpoints/mod_h323/Makefile
1379 src/mod/endpoints/mod_khomp/Makefile
1380 src/mod/endpoints/mod_loopback/Makefile
1381 src/mod/endpoints/mod_opal/Makefile
59472c23 1382 src/mod/endpoints/mod_portaudio/Makefile
bcd9f49f
MJ
1383 src/mod/endpoints/mod_reference/Makefile
1384 src/mod/endpoints/mod_rtmp/Makefile
ad4eb5e0 1385 src/mod/endpoints/mod_skinny/Makefile
99e55ae0 1386 src/mod/endpoints/mod_skypopen/Makefile
7b3d3f7e 1387 src/mod/endpoints/mod_sofia/Makefile
bcd9f49f
MJ
1388 src/mod/endpoints/mod_unicall/Makefile
1389 src/mod/event_handlers/mod_cdr_csv/Makefile
1390 src/mod/event_handlers/mod_cdr_mongodb/Makefile
1391 src/mod/event_handlers/mod_cdr_pg_csv/Makefile
1392 src/mod/event_handlers/mod_cdr_sqlite/Makefile
1393 src/mod/event_handlers/mod_erlang_event/Makefile
1394 src/mod/event_handlers/mod_event_multicast/Makefile
1395 src/mod/event_handlers/mod_event_socket/Makefile
1396 src/mod/event_handlers/mod_event_test/Makefile
1397 src/mod/event_handlers/mod_format_cdr/Makefile
1398 src/mod/event_handlers/mod_json_cdr/Makefile
1399 src/mod/event_handlers/mod_radius_cdr/Makefile
1400 src/mod/event_handlers/mod_rayo/Makefile
1401 src/mod/event_handlers/mod_snmp/Makefile
c19bb4d1 1402 src/mod/event_handlers/mod_event_zmq/Makefile
bcd9f49f
MJ
1403 src/mod/formats/mod_local_stream/Makefile
1404 src/mod/formats/mod_native_file/Makefile
1405 src/mod/formats/mod_shell_stream/Makefile
1406 src/mod/formats/mod_shout/Makefile
1407 src/mod/formats/mod_sndfile/Makefile
1408 src/mod/formats/mod_ssml/Makefile
1409 src/mod/formats/mod_tone_stream/Makefile
1410 src/mod/formats/mod_vlc/Makefile
59472c23 1411 src/mod/formats/mod_portaudio_stream/Makefile
7b3d3f7e 1412 src/mod/languages/mod_java/Makefile
9b8392bc 1413 src/mod/languages/mod_lua/Makefile
bcd9f49f
MJ
1414 src/mod/languages/mod_managed/Makefile
1415 src/mod/languages/mod_perl/Makefile
7b3d3f7e 1416 src/mod/languages/mod_python/Makefile
0c1ae13d 1417 src/mod/languages/mod_spidermonkey/Makefile
b7623326 1418 src/mod/languages/mod_v8/Makefile
bcd9f49f
MJ
1419 src/mod/languages/mod_yaml/Makefile
1420 src/mod/legacy/languages/mod_lua/Makefile
1421 src/mod/loggers/mod_console/Makefile
1422 src/mod/loggers/mod_logfile/Makefile
1423 src/mod/loggers/mod_syslog/Makefile
1424 src/mod/say/mod_say_de/Makefile
1425 src/mod/say/mod_say_en/Makefile
1426 src/mod/say/mod_say_es/Makefile
1427 src/mod/say/mod_say_fa/Makefile
1428 src/mod/say/mod_say_fr/Makefile
1429 src/mod/say/mod_say_he/Makefile
1430 src/mod/say/mod_say_hr/Makefile
1431 src/mod/say/mod_say_hu/Makefile
1432 src/mod/say/mod_say_it/Makefile
1433 src/mod/say/mod_say_ja/Makefile
1434 src/mod/say/mod_say_nl/Makefile
1435 src/mod/say/mod_say_pl/Makefile
1436 src/mod/say/mod_say_pt/Makefile
1437 src/mod/say/mod_say_ru/Makefile
1438 src/mod/say/mod_say_sv/Makefile
1439 src/mod/say/mod_say_th/Makefile
1440 src/mod/say/mod_say_zh/Makefile
1441 src/mod/timers/mod_posix_timer/Makefile
1442 src/mod/timers/mod_timerfd/Makefile
1443 src/mod/xml_int/mod_xml_cdr/Makefile
1444 src/mod/xml_int/mod_xml_curl/Makefile
1445 src/mod/xml_int/mod_xml_ldap/Makefile
1446 src/mod/xml_int/mod_xml_radius/Makefile
1447 src/mod/xml_int/mod_xml_rpc/Makefile
1448 src/mod/xml_int/mod_xml_scgi/Makefile
7b3d3f7e
AM
1449 src/include/switch_am_config.h
1450 build/getsounds.sh
1451 build/getlib.sh
17d52112 1452 build/getg729.sh
68b58406 1453 build/freeswitch.pc
7b3d3f7e 1454 build/modmake.rules
3ec53f0b 1455 libs/esl/Makefile
4e734db2 1456 libs/esl/perl/Makefile
719d37db 1457 libs/esl/php/Makefile
af192a2e 1458 libs/xmlrpc-c/include/xmlrpc-c/config.h
7b3d3f7e 1459 libs/xmlrpc-c/xmlrpc_config.h
6b6c83a7
JL
1460 libs/xmlrpc-c/config.mk
1461 libs/xmlrpc-c/srcdir.mk
1462 libs/xmlrpc-c/stamp-h
7b3d3f7e 1463 scripts/gentls_cert])
4da77ea5 1464
a6e9f279 1465AM_CONDITIONAL(ISLINUX, [test `uname -s` = Linux])
db399276 1466AM_CONDITIONAL(ISMAC, [test `uname -s` = Darwin])
fba1c2bf 1467AM_CONDITIONAL(ISFREEBSD, [test `uname -s` = FreeBSD])
a092a55a 1468AM_CONDITIONAL(IS64BITLINUX, [test `uname -m` = x86_64])
a6e9f279 1469
bcd9f49f
MJ
1470AM_CONDITIONAL(HAVE_AMR, [ test -d ${switch_srcdir}/libs/amr ])
1471AM_CONDITIONAL(HAVE_AMRWB, [ test -d ${switch_srcdir}/libs/amrwb ])
1472AM_CONDITIONAL(HAVE_G723_1, [ test -d ${switch_srcdir}/libs/libg723_1 ])
1473AM_CONDITIONAL(HAVE_G729, [ test -d ${switch_srcdir}/libs/libg729 ])
1474
c7753b06
MJ
1475#some vars to sub into the Makefile.am's
1476#LIBS+=> core.log || error="yes";if test -n "$(VERBOSE)" -o "$$error" = "yes";then cat core.log;fi;if test "$$error" = "yes";then exit 1;fi
1a2a79d0 1477LIBTOOL='$(SHELL) $(switch_builddir)/libtool'
c7753b06 1478TOUCH_TARGET='if test -f "$@";then touch "$@";fi;'
afe7d97f 1479CONF_MODULES='$$(grep -v "\#" $(switch_builddir)/modules.conf | sed -e "s|^.*/||" | sort | uniq )'
b9f2bdfb 1480CONF_DISABLED_MODULES='$$(grep "\#" $(switch_builddir)/modules.conf | grep -v "\#\#" | sed -e "s|^.*/||" | sort | uniq )'
afe7d97f
MJ
1481OUR_MODS='$$(if test -z "$(MODULES)" ; then tmp_mods="$(CONF_MODULES)"; else tmp_mods="$(MODULES)" ; fi ; mods="$$(for i in $$tmp_mods ; do echo $$i-all ; done )"; echo $$mods )'
1482OUR_CLEAN_MODS='$$(if test -z "$(MODULES)" ; then tmp_mods="$(CONF_MODULES)"; else tmp_mods="$(MODULES)" ; fi ; mods="$$(for i in $$tmp_mods ; do echo $$i-clean ; done )"; echo $$mods )'
1483OUR_INSTALL_MODS='$$(if test -z "$(MODULES)" ; then tmp_mods="$(CONF_MODULES)"; else tmp_mods="$(MODULES)" ; fi ; mods="$$(for i in $$tmp_mods ; do echo $$i-install ; done)"; echo $$mods )'
1484OUR_UNINSTALL_MODS='$$(if test -z "$(MODULES)" ; then tmp_mods="$(CONF_MODULES)"; else tmp_mods="$(MODULES)" ; fi ; mods="$$(for i in $$tmp_mods ; do echo $$i-uninstall ; done)"; echo $$mods )'
1485OUR_DISABLED_MODS='$$(tmp_mods="$(CONF_DISABLED_MODULES)"; mods="$$(for i in $$tmp_mods ; do echo $$i-all ; done )"; echo $$mods )'
1486OUR_DISABLED_CLEAN_MODS='$$(tmp_mods="$(CONF_DISABLED_MODULES)"; mods="$$(for i in $$tmp_mods ; do echo $$i-clean ; done )"; echo $$mods )'
1487OUR_DISABLED_INSTALL_MODS='$$(tmp_mods="$(CONF_DISABLED_MODULES)"; mods="$$(for i in $$tmp_mods ; do echo $$i-install ; done)"; echo $$mods )'
1488OUR_DISABLED_UNINSTALL_MODS='$$(tmp_mods="$(CONF_DISABLED_MODULES)"; mods="$$(for i in $$tmp_mods ; do echo $$i-uninstall ; done)"; echo $$mods )'
ed960392
AM
1489
1490AM_MAKEFLAGS='"OUR_MODULES=$(OUR_MODS)" "OUR_CLEAN_MODULES=$(OUR_CLEAN_MODS)" "OUR_INSTALL_MODULES=$(OUR_INSTALL_MODS)" "OUR_UNINSTALL_MODULES=$(OUR_UNINSTALL_MODS)" "OUR_DISABLED_MODULES=$(OUR_DISABLED_MODS)" "OUR_DISABLED_CLEAN_MODULES=$(OUR_DISABLED_CLEAN_MODS)" "OUR_DISABLED_INSTALL_MODULES=$(OUR_DISABLED_INSTALL_MODS)" "OUR_DISABLED_UNINSTALL_MODULES=$(OUR_DISABLED_UNINSTALL_MODS)" `test -n "$(VERBOSE)" || echo -s`'
5f053e18 1491#AM_MAKEFLAGS='`test -n "$(VERBOSE)" || echo -s`'
c7753b06
MJ
1492AC_SUBST(LIBTOOL)
1493AC_SUBST(TOUCH_TARGET)
ed960392 1494AC_SUBST(CONF_DISABLED_MODULES)
5f053e18 1495AC_SUBST(CONF_MODULES)
ed960392 1496
5f053e18
MJ
1497AC_SUBST(OUR_MODS)
1498AC_SUBST(OUR_CLEAN_MODS)
1499AC_SUBST(OUR_INSTALL_MODS)
1500AC_SUBST(OUR_UNINSTALL_MODS)
ed960392
AM
1501AC_SUBST(OUR_DISABLED_MODS)
1502AC_SUBST(OUR_DISABLED_CLEAN_MODS)
1503AC_SUBST(OUR_DISABLED_INSTALL_MODS)
1504AC_SUBST(OUR_DISABLED_UNINSTALL_MODS)
c7753b06
MJ
1505AC_SUBST(AM_MAKEFLAGS)
1506
74fd6fb6 1507ac_configure_args="$ac_configure_args CONFIGURE_CFLAGS='$CFLAGS' CONFIGURE_CXXFLAGS='$CXXFLAGS' CONFIGURE_LDFLAGS='$LDFLAGS' "
452b0bde 1508
40ff9a41
MJ
1509# --prefix='$prefix' --exec_prefix='$exec_prefix' --libdir='$libdir' --libexecdir='$libexecdir' --bindir='$bindir' --sbindir='$sbindir' \
1510# --localstatedir='$localstatedir' --datadir='$datadir'"
8f9ab613 1511
46f6981d 1512# Run configure in all the subdirs
236bfeea
MJ
1513AC_CONFIG_SUBDIRS([libs/srtp])
1514AC_CONFIG_SUBDIRS([libs/sqlite])
1515if test "$enable_core_libedit_support" = "yes" ; then
1516 AC_CONFIG_SUBDIRS([libs/libedit])
1517fi
1518
236bfeea
MJ
1519AC_CONFIG_SUBDIRS([libs/apr])
1520AC_CONFIG_SUBDIRS([libs/apr-util])
1521AC_CONFIG_SUBDIRS([libs/ilbc])
236bfeea
MJ
1522AC_CONFIG_SUBDIRS([libs/iksemel])
1523AC_CONFIG_SUBDIRS([libs/js/nsprpub])
1524AC_CONFIG_SUBDIRS([libs/js])
1525AC_CONFIG_SUBDIRS([libs/libdingaling])
1526AC_CONFIG_SUBDIRS([libs/libsndfile])
1527AC_CONFIG_SUBDIRS([libs/sofia-sip])
236bfeea
MJ
1528AC_CONFIG_SUBDIRS([libs/portaudio])
1529AC_CONFIG_SUBDIRS([libs/openzap])
1530AC_CONFIG_SUBDIRS([libs/freetdm])
1531AC_CONFIG_SUBDIRS([libs/unimrcp])
1532AC_CONFIG_SUBDIRS([libs/tiff-4.0.2])
1533AC_CONFIG_SUBDIRS([libs/spandsp])
1534AC_CONFIG_SUBDIRS([libs/broadvoice])
1535AC_CONFIG_SUBDIRS([libs/libg722_1])
1536AC_CONFIG_SUBDIRS([libs/silk])
1537AC_CONFIG_SUBDIRS([libs/libcodec2])
1538if test "x${enable_zrtp}" = "xyes"; then
e5a1b54e 1539 AC_CONFIG_SUBDIRS([libs/libzrtp])
393b63b7 1540fi
ee3fc89f 1541
f6fe2667 1542case $host in
fb41b0f6
BW
1543 *-openbsd*|*-netbsd*)
1544 # libtool won't link static libs against shared ones on NetBSD/OpenBSD unless we tell it not to be stupid
f6fe2667
MJ
1545 AC_CONFIG_COMMANDS([hacklibtool], [cp libtool libtool.orig && sed -e "s/deplibs_check_method=.*/deplibs_check_method=pass_all/g" libtool.orig > libtool])
1546 ;;
1547esac
1548
1549
6e81dda1 1550AC_OUTPUT
5ccac21d 1551
1ed00b4d
BW
1552##
1553## Registering for ClueCon
1554##
4ff9b2f1 1555if ! test -f noreg ; then
1ed00b4d
BW
1556echo ""
1557echo ""
1558echo $ECHO_N "Registering you for ClueCon http://www.cluecon.com $ECHO_C" 1>&6
82f77413 1559sleep 1
1ed00b4d 1560echo $ECHO_N ".$ECHO_C" 1>&6
82f77413 1561sleep 1
1ed00b4d 1562echo $ECHO_N ".$ECHO_C" 1>&6
82f77413 1563sleep 1
1ed00b4d 1564AC_MSG_RESULT([ See you in August. ;-)])
1ed00b4d 1565echo ""
17d52112 1566fi
1ed00b4d 1567
5ccac21d
MJ
1568##
1569## Configuration summary
1570##
1571
1572echo
8912b80e 1573echo "-------------------------- FreeSWITCH configuration --------------------------"
5ccac21d
MJ
1574echo ""
1575echo " Locations:"
fd1b0279 1576echo " FHS enabled: ${enable_fhs}"
5ccac21d
MJ
1577echo ""
1578echo " prefix: ${prefix}"
1579echo " exec_prefix: ${exec_prefix}"
1580echo " bindir: ${bindir}"
fd1b0279 1581echo " sysconfdir: ${sysconfdir}"
5ccac21d 1582echo " libdir: ${libdir}"
fd1b0279
TC
1583echo ""
1584echo " certsdir: ${certsdir}"
1585echo " dbdir: ${dbdir}"
1586echo " grammardir: ${grammardir}"
1587echo " htdocsdir: ${htdocsdir}"
1588echo " logfiledir: ${logfiledir}"
5ccac21d 1589echo " modulesdir: ${modulesdir}"
fd1b0279
TC
1590echo " pkgconfigdir: ${pkgconfigdir}"
1591echo " recordingsdir: ${recordingsdir}"
5ccac21d 1592echo " runtimedir: ${runtimedir}"
fd1b0279
TC
1593echo " scriptdir: ${scriptdir}"
1594echo " soundsdir: ${soundsdir}"
1595echo " storagedir: ${storagedir}"
5ccac21d 1596echo ""
8912b80e 1597echo "------------------------------------------------------------------------------"