1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857 |
- AC_PREREQ(2.60a)
- AC_INIT([asterisk], [trunk], [https://issues.asterisk.org])
- # cross-compile macros
- AC_CANONICAL_BUILD
- AC_CANONICAL_HOST
- # check existence of the package
- AC_CONFIG_SRCDIR([main/asterisk.c])
- AC_COPYRIGHT("Asterisk")
- # preserve any CFLAGS or LDFLAGS that may be set
- # NOTE: This must be done before calling any macros that end up
- # calling AC_PROG_CC or the like, since they will set a default
- # set of CFLAGS ("-g -O2") if the user did not supply any, and
- # we don't want those default flags to be carried over into the
- # rest of the build system since we have other means of controlling
- # debugging symbol generation and optimization.
- CONFIG_CFLAGS="${CFLAGS}"
- CONFIG_LDFLAGS="${LDFLAGS}"
- AC_SUBST(CONFIG_CFLAGS)
- AC_SUBST(CONFIG_LDFLAGS)
- # specify output header file
- AC_CONFIG_HEADER(include/asterisk/autoconfig.h)
- # Note: AC_PROG_CC *must* be specified before AC_USE_SYSTEM_EXTENSIONS or any
- # other macro that uses the C compiler, or the default order will be used.
- AC_PROG_CC([gcc cc])
- AC_USE_SYSTEM_EXTENSIONS dnl note- does not work on FreeBSD
- # System default paths
- AC_SUBST([astsbindir], ['${sbindir}'])dnl
- AC_SUBST([astetcdir], ['${sysconfdir}/asterisk'])dnl
- AC_SUBST([astheaderdir], ['${includedir}/asterisk'])dnl
- AC_SUBST([astlibdir], ['${libdir}'])dnl
- AC_SUBST([astmoddir], ['${libdir}/asterisk/modules'])dnl
- AC_SUBST([astmandir], ['${mandir}'])dnl
- AC_SUBST([astvarlibdir], ['${localstatedir}/lib/asterisk'])dnl
- AC_SUBST([astdatadir], ['${astvarlibdir}'])dnl
- AC_SUBST([astdbdir], ['${astvarlibdir}'])dnl
- AC_SUBST([astkeydir], ['${astvarlibdir}'])dnl
- AC_SUBST([astspooldir], ['${localstatedir}/spool/asterisk'])dnl
- AC_SUBST([astlogdir], ['${localstatedir}/log/asterisk'])dnl
- AC_SUBST([astvarrundir], ['${localstatedir}/run/asterisk'])dnl
- case "${host_os}" in
- *bsd*)
- if test ${prefix} != 'NONE'; then
- astvarlibdir='${prefix}/share/asterisk'
- astdbdir='${localstatedir}/db/asterisk'
- fi
- ;;
- darwin*)
- if test ${prefix} = 'NONE'; then
- astvarrundir='/Library/Application Support/Asterisk/Run'
- fi
- ;;
- esac
- case "${host_os}" in
- netbsd*)
- ac_default_prefix=/usr/pkg
- CPPFLAGS=-I/usr/pkg/include
- LDFLAGS=-L/usr/pkg/lib
- ;;
- dragonfly*|freebsd*)
- ac_default_prefix=/usr/local
- CPPFLAGS=-I/usr/local/include
- LDFLAGS=-L/usr/local/lib
- ;;
- openbsd*)
- ac_default_prefix=/usr/local
- if test ${prefix} = '/usr/local' || test ${prefix} = 'NONE'; then
- if test ${sysconfdir} = '${prefix}/etc'; then
- astetcdir=/etc/asterisk
- fi
- if test ${mandir} = '${prefix}/man'; then
- astmandir=/usr/share/man
- fi
- fi
- CPPFLAGS=-I/usr/local/include
- LDFLAGS=-L/usr/local/lib
- ;;
- darwin*)
- ac_default_prefix=/usr/local
- if test ${prefix} = 'NONE'; then
- astmoddir='/Library/Application Support/Asterisk/Modules'
- astvarlibdir='/Library/Application Support/Asterisk'
- astlogdir=/Library/Logs/Asterisk
- astvarrundir='/Library/Application Support/Asterisk/Run'
- fi
- AC_DEFINE([AST_POLL_COMPAT], 1, [Define to 1 if internal poll should be used.])
- AC_DEFINE([_DARWIN_UNLIMITED_SELECT], 1, [Define to 1 if running on Darwin.])
- ;;
- solaris*)
- if test ${prefix} = 'NONE'; then
- astetcdir=/var/etc/asterisk
- astsbindir=/opt/asterisk/sbin
- astlibdir=/opt/asterisk/lib
- astmoddir=/opt/asterisk/lib/modules
- astheaderdir=/opt/asterisk/include
- astmandir=/opt/asterisk/man
- astvarlibdir=/var/opt/asterisk
- astspooldir=/var/spool/asterisk
- astlogdir=/var/log/asterisk
- astvarrundir=/var/run/asterisk
- fi
- ;;
- *)
- ac_default_prefix=/usr
- if test ${prefix} = '/usr' || test ${prefix} = 'NONE'; then
- if test ${sysconfdir} = '${prefix}/etc'; then
- sysconfdir=/etc
- fi
- if test ${mandir} = '${prefix}/man'; then
- mandir=/usr/share/man
- fi
- fi
- ;;
- esac
- if test ${prefix} = ${ac_default_prefix} || test ${prefix} = 'NONE'; then
- if test ${localstatedir} = '${prefix}/var'; then
- localstatedir=/var
- fi
- fi
- BUILD_PLATFORM=${build}
- BUILD_CPU=${build_cpu}
- BUILD_VENDOR=${build_vendor}
- BUILD_OS=${build_os}
- AC_SUBST(BUILD_PLATFORM)
- AC_SUBST(BUILD_CPU)
- AC_SUBST(BUILD_VENDOR)
- AC_SUBST(BUILD_OS)
- HOST_PLATFORM=${host}
- HOST_CPU=${host_cpu}
- HOST_VENDOR=${host_vendor}
- HOST_OS=${host_os}
- AC_SUBST(HOST_PLATFORM)
- AC_SUBST(HOST_CPU)
- AC_SUBST(HOST_VENDOR)
- AC_SUBST(HOST_OS)
- PBX_WINARCH=0
- case "${host_os}" in
- dragonfly*|freebsd*)
- OSARCH=FreeBSD
- ;;
- netbsd*)
- OSARCH=NetBSD
- ;;
- openbsd*)
- OSARCH=OpenBSD
- ;;
- solaris*)
- OSARCH=SunOS
- ;;
- mingw32)
- OSARCH=mingw32
- PBX_WINARCH=1
- ;;
- cygwin)
- OSARCH=cygwin
- PBX_WINARCH=1
- ;;
- linux-gnu*)
- OSARCH=linux-gnu
- ;;
- kfreebsd*-gnu)
- OSARCH=kfreebsd-gnu
- ;;
- *)
- OSARCH=${host_os}
- ;;
- esac
- AC_SUBST(OSARCH)
- AC_SUBST(PBX_WINARCH)
- AC_MSG_CHECKING(whether char is unsigned)
- AC_COMPILE_IFELSE(
- [
- AC_LANG_SOURCE(
- #include <limits.h>
- #if CHAR_MIN == 0
- #error
- #endif
- )
- ],[
- AC_MSG_RESULT(no)
- CONFIG_SIGNED_CHAR=""
- ],[
- AC_MSG_RESULT(yes)
- CONFIG_SIGNED_CHAR="-fsigned-char"
- ]
- )
- AC_SUBST(CONFIG_SIGNED_CHAR)
- # check for uname
- AC_PATH_TOOL([UNAME], [uname], No)
- if test ! x"${UNAME}" = xNo; then
- PBX_OSREV=$(${UNAME} -r)
- fi
- AC_SUBST(PBX_OSREV)
- AH_TOP(
- #ifndef ASTERISK_AUTOCONFIG_H
- #define ASTERISK_AUTOCONFIG_H
- #include "asterisk/buildopts.h"
- )
- AH_BOTTOM(
- #endif
- )
- # cross-compile checks
- if test "${cross_compiling}" = "yes";
- then
- AC_CHECK_TOOL(CC, gcc, :)
- AC_CHECK_TOOL(CXX, g++, :)
- AC_CHECK_TOOL(LD, ld, :)
- AC_CHECK_TOOL(RANLIB, ranlib, :)
- fi
- # Checks for programs.
- AC_PROG_CXX
- AC_PROG_CPP
- AC_PROG_CXXCPP
- # This macro is just copied into our local acinclude.m4 from libtool.m4 so that
- # the developers regenerating the configure script don't have to install libtool.
- AST_PROG_LD # note, does not work on FreeBSD
- AC_PROG_AWK
- AC_PROG_INSTALL
- AC_PROG_LN_S
- AC_PROG_RANLIB
- AST_CHECK_GNU_MAKE
- AC_PROG_EGREP
- AC_CHECK_TOOLS([STRIP], [strip gstrip], :)
- AC_CHECK_TOOLS([AR], [ar gar], :)
- GNU_LD=0
- if test "x$with_gnu_ld" = "xyes" ; then
- GNU_LD=1
- fi
- AC_SUBST(GNU_LD)
- AC_PATH_PROG([BISON], [bison], :)
- AC_PATH_PROG([CMP], [cmp], :)
- AC_PATH_PROG([CAT], [cat], :)
- AC_PATH_PROG([CUT], [cut], :)
- AC_PATH_PROG([FLEX], [flex], :)
- AC_PATH_PROG([GREP], [grep], :)
- AC_PATH_PROG([PYTHON], [python], :)
- AC_PATH_PROG([FIND], [find], :)
- AC_PATH_PROG([COMPRESS], [compress], :)
- AC_PATH_PROG([BASENAME], [basename], :)
- AC_PATH_PROG([DIRNAME], [dirname], :)
- AC_PATH_PROG([SHELL], [sh], :)
- AC_PATH_PROG([LN], [ln], :)
- AC_PATH_PROG([DOXYGEN], [doxygen], :)
- AC_PATH_PROG([DOT], [dot], :)
- AC_PATH_PROG([WGET], [wget], :)
- AC_PATH_PROG([CURL], [curl], :)
- AC_PATH_PROG([RUBBER], [rubber], :)
- AC_PATH_PROG([CATDVI], [catdvi], :)
- AC_PATH_PROG([KPATHSEA], [kpsewhich], :)
- AC_PATH_PROG([XMLLINT], [xmllint], :)
- AC_PATH_PROGS([XMLSTARLET], [xmlstarlet xml], :)
- AC_PATH_PROG([BASH], [bash], :)
- AC_PATH_PROG([GIT], [git], :)
- AC_PATH_PROG([ALEMBIC], [alembic], :)
- AC_PATH_PROG([BZIP2], [bzip2], :)
- AC_PATH_PROG([TAR], [tar], :)
- AC_PATH_PROG([PATCH], [patch], :)
- AC_PATH_PROG([SED], [sed], :)
- AC_PATH_PROG([NM], [nm], :)
- DOWNLOAD=":"
- DOWNLOAD_TO_STDOUT=
- DOWNLOAD_TIMEOUT=
- if test "${WGET}" != ":" ; then
- DOWNLOAD=${WGET}
- DOWNLOAD_TO_STDOUT="${WGET} -q -O-"
- DOWNLOAD_TIMEOUT='--timeout=$1'
- elif test "${CURL}" != ":" ; then
- DOWNLOAD="${CURL} -O --progress-bar -w \"%{url_effective}\n\""
- DOWNLOAD_TO_STDOUT="${CURL} -Ls"
- DOWNLOAD_TIMEOUT='--max-time $(or $2,$1)'
- else
- AC_PATH_PROG([FETCH], [fetch], :)
- if test "${FETCH}" != ":" ; then
- DOWNLOAD=${FETCH}
- DOWNLOAD_TO_STDOUT="${FETCH} -o-"
- DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)'
- fi
- fi
- AC_SUBST(DOWNLOAD)
- AC_SUBST(DOWNLOAD_TO_STDOUT)
- AC_SUBST(DOWNLOAD_TIMEOUT)
- AC_PATH_PROG([LDCONFIG], [ldconfig], :)
- AC_PATH_PROG([SHA1SUM], [sha1sum], $ac_aux_dir/build_tools/sha1sum-sh)
- AC_PATH_PROG([OPENSSL], [openssl], :)
- AC_CACHE_CHECK([for bison that supports parse-param], [ac_cv_path_BISON2], [
- if test "x$BISON" != "x:" ; then
- # Create a temporary directory $tmp in $TMPDIR (default /tmp).
- # Use mktemp if possible; otherwise fall back on mkdir,
- # with $RANDOM to make collisions less likely.
- : ${TMPDIR=/tmp}
- {
- tmp=`
- (umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null
- ` &&
- test -n "$tmp" && test -d "$tmp"
- } || {
- tmp=$TMPDIR/foo$$-$RANDOM
- (umask 077 && mkdir "$tmp")
- } || exit $?
- cat >$tmp/test.y <<__EOL__
- %parse-param {struct parse_io *parseio}
- %%
- file : { \$\$ = parseio->pval = 1; }
- ;
- %%
- __EOL__
- ${BISON} -o ${tmp}/test.tab.c ${tmp}/test.y >/dev/null 2>&1
- if test -e "${tmp}/test.tab.c"; then
- ac_cv_path_BISON2=${BISON}
- fi
- rm -rf ${tmp}
- fi
- ])
- if test "x${ac_cv_path_BISON2}" = "x" ; then
- BISON=:
- PBX_BISON=0
- else
- PBX_BISON=1
- fi
- AC_SUBST(PBX_BISON)
- if test "x${FLEX}" = "x:" ; then
- PBX_FLEX=0
- else
- PBX_FLEX=1
- fi
- AC_SUBST(PBX_FLEX)
- if test "x${XMLSTARLET}" = "x:" ; then
- PBX_XMLSTARLET=0
- else
- PBX_XMLSTARLET=1
- fi
- AC_SUBST(PBX_XMLSTARLET)
- if test "x${BASH}" = "x:" ; then
- PBX_BASH=0
- else
- PBX_BASH=1
- fi
- AC_SUBST(PBX_BASH)
- AC_CHECK_TOOL([SOXMIX], [soxmix], [:])
- if test "${SOXMIX}" != ":" ; then
- AC_DEFINE([HAVE_SOXMIX], 1, [Define to 1 if your system has soxmix application.])
- fi
- AC_CHECK_PROGS([MD5], [md5 md5sum gmd5sum digest])
- if test "${MD5}" = "digest" ; then
- MD5="${MD5} -a md5"
- fi
- AX_PTHREAD
- AC_LANG(C)
- PBX_NO_BINARY_MODULES=0
- AC_ARG_ENABLE([binary-modules],
- [AS_HELP_STRING([--disable-binary-modules],
- [Block installation of binary modules.])],
- [case "${enableval}" in
- y|ye|yes) PBX_NO_BINARY_MODULES=0 ;;
- n|no) PBX_NO_BINARY_MODULES=1 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --disable-binary-modules) ;;
- esac])
- AC_SUBST(PBX_NO_BINARY_MODULES)
- AC_ARG_ENABLE([dev-mode],
- [AS_HELP_STRING([--enable-dev-mode],
- [Turn on developer mode])],
- [case "${enableval}" in
- y|ye|yes) AST_DEVMODE=yes ;;
- n|no) AST_DEVMODE=no ;;
- noisy)
- AST_DEVMODE=yes
- NOISY_BUILD=yes
- ;;
- strict)
- AST_DEVMODE=yes
- AST_DEVMODE_STRICT=yes
- ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-dev-mode) ;;
- esac])
- AC_SUBST(NOISY_BUILD)
- AC_SUBST(AST_DEVMODE)
- AC_SUBST(AST_DEVMODE_STRICT)
- AST_OPTION_ONLY([download-cache], [AST_DOWNLOAD_CACHE], [cached sound AND external module tarfiles], [])
- AST_OPTION_ONLY([sounds-cache], [SOUNDS_CACHE_DIR], [cached sound tarfiles], [])
- AST_OPTION_ONLY([externals-cache], [EXTERNALS_CACHE_DIR], [cached external module tarfiles], [])
- AST_CODE_COVERAGE=no
- AC_ARG_ENABLE([coverage],
- [AS_HELP_STRING([--enable-coverage],
- [Turn on code coverage tracking (for gcov)])],
- [case "${enableval}" in
- y|ye|yes) AST_CODE_COVERAGE=yes ;;
- n|no) AST_CODE_COVERAGE=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-coverage) ;;
- esac])
- AC_SUBST(AST_CODE_COVERAGE)
- AST_CHECK_RAII()
- AST_CHECK_STRSEP_ARRAY_BOUNDS()
- JANSSON_BUNDLED=no
- AC_ARG_WITH([jansson-bundled],
- [AS_HELP_STRING([--with-jansson-bundled],
- [Use bundled jansson library])],
- [case "${withval}" in
- y|yes) JANSSON_BUNDLED=yes ;;
- *) JANSSON_BUNDLED=no ;;
- esac])
- PJPROJECT_BUNDLED=no
- AH_TEMPLATE(m4_bpatsubst([[HAVE_PJPROJECT_BUNDLED]], [(.*)]), [Define to 1 when using the bundled pjproject.])
- AC_ARG_WITH([pjproject-bundled],
- [AS_HELP_STRING([--with-pjproject-bundled],
- [Use bundled pjproject libraries])],
- [case "${withval}" in
- n|no) PJPROJECT_BUNDLED=no ;;
- *) PJPROJECT_BUNDLED=yes ;;
- esac])
- THIRD_PARTY_CONFIGURE()
- # AST_EXT_LIB_SETUP is used to tell configure to handle variables for
- # various packages.
- # $1 is the prefix for the variables in makeopts and autoconfig.h
- # $2 is the short comment, $4 is the long comment
- # $3 is the name used in --with- or --without- flags for configure.
- #
- # Package option names should be in alphabetical order
- # by the --with option name (the third field),
- # to make things easier for the users.
- AST_EXT_LIB_SETUP([ALSA], [Advanced Linux Sound Architecture], [asound])
- AST_EXT_LIB_SETUP([BFD], [Debug symbol decoding], [bfd])
- # BKTR is used for backtrace support on platforms that do not
- # have it natively.
- AST_EXT_LIB_SETUP([BKTR], [Stack Backtrace], [execinfo])
- AST_EXT_LIB_SETUP([BLUETOOTH], [Bluetooth], [bluetooth])
- AST_EXT_LIB_SETUP([CAP], [POSIX 1.e capabilities], [cap])
- AST_EXT_LIB_SETUP([COROSYNC], [Corosync], [cpg])
- AST_EXT_LIB_SETUP_OPTIONAL([COROSYNC_CFG_STATE_TRACK], [A callback only in corosync 1.x], [COROSYNC], [cfg])
- AST_EXT_LIB_SETUP([CURSES], [curses], [curses])
- AST_EXT_LIB_SETUP([CRYPT], [password and data encryption], [crypt])
- AST_EXT_LIB_SETUP([CRYPTO], [OpenSSL Cryptography], [crypto])
- AST_EXT_LIB_SETUP_OPTIONAL([OPENSSL_SRTP], [OpenSSL SRTP Extension Support], [CRYPTO], [crypto])
- AST_EXT_LIB_SETUP([DAHDI], [DAHDI], [dahdi])
- AST_EXT_LIB_SETUP([FFMPEG], [Ffmpeg and avcodec], [avcodec])
- AST_EXT_LIB_SETUP([GSM], [External GSM], [gsm], [, use 'internal' GSM otherwise])
- AST_EXT_LIB_SETUP([ILBC], [System iLBC], [ilbc], [, use 'internal' iLBC otherwise])
- AST_EXT_LIB_SETUP([GTK2], [gtk2], [gtk2])
- AST_EXT_LIB_SETUP([GMIME], [GMime], [gmime])
- AST_EXT_LIB_SETUP([HOARD], [Hoard Memory Allocator], [hoard])
- AST_EXT_LIB_SETUP([ICAL], [iCal], [ical])
- AST_EXT_LIB_SETUP([ICONV], [Iconv], [iconv])
- AST_EXT_LIB_SETUP([IKSEMEL], [Iksemel Jabber], [iksemel])
- AST_EXT_LIB_SETUP([IMAP_TK], [UW IMAP Toolkit], [imap])
- AST_EXT_LIB_SETUP([INOTIFY], [inotify support], [inotify])
- AST_EXT_LIB_SETUP([IODBC], [iODBC], [iodbc])
- AST_EXT_LIB_SETUP([ISDNNET], [ISDN4Linux], [isdnnet])
- AST_EXT_LIB_SETUP([JACK], [Jack Audio Connection Kit], [jack])
- AST_EXT_LIB_SETUP([JANSSON], [Jansson JSON library], [jansson])
- AST_EXT_LIB_SETUP([URIPARSER], [uriparser library], [uriparser])
- AST_EXT_LIB_SETUP([KQUEUE], [kqueue support], [kqueue])
- AST_EXT_LIB_SETUP([LDAP], [OpenLDAP], [ldap])
- AST_LIBCURL_CHECK_CONFIG([], [7.10.1])
- AST_EXT_LIB_SETUP([LIBEDIT], [NetBSD Editline library], [libedit], [, use 'internal' Editline otherwise])
- AST_EXT_LIB_SETUP_OPTIONAL([LIBEDIT_IS_UNICODE], [Libedit compiled for unicode], [LIBEDIT], [libedit])
- AST_EXT_LIB_SETUP([LIBXML2], [LibXML2], [libxml2])
- AST_EXT_LIB_SETUP([LIBXSLT], [LibXSLT], [libxslt])
- AST_EXT_LIB_SETUP_OPTIONAL([LIBXSLT_CLEANUP], [LibXSLT Library Cleanup Function], [LIBXSLT], [libxslt])
- AST_EXT_LIB_SETUP([LUA], [Lua], [lua])
- AST_EXT_LIB_SETUP([MISDN], [mISDN user], [misdn])
- AST_EXT_LIB_SETUP([MYSQLCLIENT], [MySQL client], [mysqlclient])
- AST_EXT_LIB_SETUP([NBS], [Network Broadcast Sound], [nbs])
- AST_EXT_LIB_SETUP([NCURSES], [ncurses], [ncurses])
- AST_EXT_LIB_SETUP([NEON], [neon], [neon])
- AST_EXT_LIB_SETUP([NEON29], [neon29], [neon29])
- AST_EXT_LIB_SETUP([NETSNMP], [Net-SNMP], [netsnmp])
- AST_EXT_LIB_SETUP([NEWT], [newt], [newt])
- AST_EXT_LIB_SETUP([OGG], [OGG], [ogg])
- AST_EXT_LIB_SETUP([OPENR2], [MFR2], [openr2])
- AST_EXT_LIB_SETUP([OPUS], [Opus], [opus])
- AST_EXT_LIB_SETUP([OPUSFILE], [Opusfile], [opusfile])
- AST_EXT_LIB_SETUP([OSPTK], [OSP Toolkit], [osptk])
- AST_EXT_LIB_SETUP([OSS], [Open Sound System], [oss])
- AST_EXT_LIB_SETUP([PGSQL], [PostgreSQL], [postgres])
- if test "x${PBX_PJPROJECT}" != "x1" ; then
- AST_EXT_LIB_SETUP([PJPROJECT], [PJPROJECT], [pjproject])
- AST_EXT_LIB_SETUP_OPTIONAL([PJSIP_DLG_CREATE_UAS_AND_INC_LOCK], [PJSIP Dialog Create UAS with Incremented Lock], [PJPROJECT], [pjsip])
- AST_EXT_LIB_SETUP_OPTIONAL([PJ_TRANSACTION_GRP_LOCK], [PJSIP Transaction Group Lock Support], [PJPROJECT], [pjsip])
- AST_EXT_LIB_SETUP_OPTIONAL([PJSIP_REPLACE_MEDIA_STREAM], [PJSIP Media Stream Replacement Support], [PJPROJECT], [pjsip])
- AST_EXT_LIB_SETUP_OPTIONAL([PJSIP_GET_DEST_INFO], [pjsip_get_dest_info support], [PJPROJECT], [pjsip])
- AST_EXT_LIB_SETUP_OPTIONAL([PJ_SSL_CERT_LOAD_FROM_FILES2], [pj_ssl_cert_load_from_files2 support], [PJPROJECT], [pjsip])
- AST_EXT_LIB_SETUP_OPTIONAL([PJSIP_EXTERNAL_RESOLVER], [PJSIP External Resolver Support], [PJPROJECT], [pjsip])
- AST_EXT_LIB_SETUP_OPTIONAL([PJSIP_TLS_TRANSPORT_PROTO], [PJSIP TLS Transport proto field support], [PJPROJECT], [pjsip])
- AST_EXT_LIB_SETUP_OPTIONAL([PJSIP_EVSUB_GRP_LOCK], [PJSIP EVSUB Group Lock support], [PJPROJECT], [pjsip])
- AST_EXT_LIB_SETUP_OPTIONAL([PJSIP_INV_SESSION_REF], [PJSIP INVITE Session Reference Count support], [PJPROJECT], [pjsip])
- AST_EXT_LIB_SETUP_OPTIONAL([PJSIP_AUTH_CLT_DEINIT], [pjsip_auth_clt_deinit support], [PJPROJECT], [pjsip])
- AST_EXT_LIB_SETUP_OPTIONAL([PJSIP_TSX_LAYER_FIND_TSX2], [pjsip_tsx_layer_find_tsx2 support], [PJPROJECT], [pjsip])
- AST_EXT_LIB_SETUP_OPTIONAL([PJSIP_INV_ACCEPT_MULTIPLE_SDP_ANSWERS], [PJSIP INVITE Accept Multiple SDP Answers], [PJPROJECT], [pjsip])
- AST_EXT_LIB_SETUP_OPTIONAL([PJSIP_ENDPOINT_COMPACT_FORM], [PJSIP Compact Form Support on Endpoint], [PJPROJECT], [pjsip])
- fi
- AST_EXT_LIB_SETUP([POPT], [popt], [popt])
- AST_EXT_LIB_SETUP([PORTAUDIO], [PortAudio], [portaudio])
- AST_EXT_LIB_SETUP([PRI], [ISDN PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_SETUP_ACK_INBAND], [ISDN PRI progress inband ie in SETUP ACK], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_L2_PERSISTENCE], [ISDN Layer 2 persistence option], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_DATETIME_SEND], [ISDN PRI Date/time ie send policy], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_MWI_V2], [ISDN PRI Message Waiting Indication (Fixed)], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_DISPLAY_TEXT], [ISDN PRI user display text IE contents during call], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_MWI], [ISDN PRI Message Waiting Indication], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_MCID], [ISDN PRI Malicious Call ID], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_CALL_WAITING], [ISDN PRI call waiting supplementary service], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_AOC_EVENTS], [ISDN PRI advice of charge supplementary service events], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_TRANSFER], [ISDN PRI call transfer supplementary service], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_CCSS], [ISDN PRI call completion supplementary service], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_HANGUP_FIX], [ISDN PRI hangup fix], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_SUBADDR], [ISDN PRI subaddressing], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_CALL_HOLD], [ISDN PRI call hold], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_CALL_REROUTING], [ISDN PRI call rerouting and call deflection], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_SETUP_KEYPAD], [ISDN PRI keypad facility in SETUP], [PRI], [pri])
- # ------------------------------------v
- # TODO: The code can be changed to always include these features now.
- # These features will always be present if pri_connected_line_update is available.
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_INBANDDISCONNECT], [ISDN PRI set_inbanddisconnect], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_PROG_W_CAUSE], [ISDN progress with cause], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_SERVICE_MESSAGES], [ISDN service messages], [PRI], [pri])
- AST_EXT_LIB_SETUP_OPTIONAL([PRI_REVERSE_CHARGE], [ISDN reverse charge], [PRI], [pri])
- # ------------------------------------^
- AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])
- AST_EXT_LIB_SETUP([RESAMPLE], [LIBRESAMPLE], [resample])
- AST_EXT_LIB_SETUP([SDL], [Sdl], [sdl])
- AST_EXT_LIB_SETUP([SDL_IMAGE], [Sdl Image], [SDL_image])
- AST_EXT_LIB_SETUP([SPANDSP], [SPANDSP], [spandsp])
- AST_EXT_LIB_SETUP([SS7], [ISDN SS7], [ss7])
- AST_EXT_LIB_SETUP([SPEEX], [Speex], [speex])
- AST_EXT_LIB_SETUP([SPEEX_PREPROCESS], [Speex preprocess routines], [speex])
- AST_EXT_LIB_SETUP([SPEEXDSP], [SpeexDSP], [speexdsp])
- AST_EXT_LIB_SETUP_DEPENDENT([SPEEX_PREPROCESS], [speex_preprocess_ctl], [], [speex])
- AST_EXT_LIB_SETUP([SQLITE], [SQLite], [sqlite])
- AST_EXT_LIB_SETUP([SQLITE3], [SQLite], [sqlite3])
- AST_EXT_LIB_SETUP([SRTP], [Secure RTP], [srtp])
- AST_EXT_LIB_SETUP_OPTIONAL([SRTP_SHUTDOWN], [SRTP Library Shutdown Function], [SRTP], [srtp])
- AST_EXT_LIB_SETUP_OPTIONAL([SRTP_GET_VERSION], [SRTP Library Version Function], [SRTP], [srtp])
- AST_EXT_LIB_SETUP([OPENSSL], [OpenSSL Secure Sockets Layer], [ssl])
- AST_EXT_LIB_SETUP_OPTIONAL([RT], [Realtime functions], [rt])
- AST_EXT_LIB_SETUP([SUPPSERV], [mISDN Supplemental Services], [suppserv])
- AST_EXT_LIB_SETUP([FREETDS], [FreeTDS], [tds])
- AST_EXT_LIB_SETUP([TERMCAP], [Termcap], [termcap])
- AST_EXT_LIB_SETUP([TIMERFD], [timerfd], [timerfd])
- AST_EXT_LIB_SETUP([TINFO], [Term Info], [tinfo])
- AST_EXT_LIB_SETUP([TONEZONE], [tonezone], [tonezone])
- AST_EXT_LIB_SETUP([UNIXODBC], [unixODBC], [unixodbc])
- AST_EXT_LIB_SETUP([VORBIS], [Vorbis], [vorbis])
- AST_EXT_LIB_SETUP([VPB], [Voicetronix API], [vpb])
- AST_EXT_LIB_SETUP([X11], [X11], [x11])
- AST_EXT_LIB_SETUP([ZLIB], [zlib compression], [z])
- # check for basic system features and functionality before
- # checking for package libraries
- AC_FUNC_ALLOCA
- AC_HEADER_DIRENT
- AC_HEADER_STDC
- AC_HEADER_SYS_WAIT
- AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/event.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/types.h syslog.h termios.h unistd.h utime.h arpa/nameser.h sys/io.h])
- PKG_PROG_PKG_CONFIG()
- # Find required NetBSD Editline library (libedit).
- EDITLINE_LIB=""
- LIBEDIT_INTERNAL="yes"
- AC_SUBST(LIBEDIT_INTERNAL)
- LIBEDIT_SYSTEM="yes"
- if test "${USE_LIBEDIT}" != "no"; then
- if test "${LIBEDIT_DIR}" = "internal"; then
- LIBEDIT_SYSTEM="no"
- elif test "${LIBEDIT_DIR}" != ""; then
- LIBEDIT_INTERNAL="no"
- fi
- if test "${LIBEDIT_SYSTEM}" = "yes"; then
- AST_PKG_CONFIG_CHECK(LIBEDIT, libedit)
- # some platforms do not list libedit via pkg-config, for example OpenBSD 6.2
- AST_EXT_LIB_CHECK([LIBEDIT], [edit], [history_init], [histedit.h], [-ltermcap])
- if test "$PBX_LIBEDIT" = "1"; then
- LIBEDIT_INTERNAL="no"
- fi
- fi
- if test "${LIBEDIT_INTERNAL}" = "yes"; then
- PBX_LIBEDIT=1
- LIBEDIT_IS_UNICODE=no
- else
- AST_C_COMPILE_CHECK([LIBEDIT_IS_UNICODE], [el_rfunc_t *callback;], [histedit.h], [], [Testing for libedit unicode support])
- fi
- fi
- # If the Asterisk internal copy should be build (user said so) or
- # must be build (system does not have it), either -ltermcap,
- # -ltinfo, or -l{n}curses must be available.
- if test "${LIBEDIT_INTERNAL}" = "yes"; then
- AST_EXT_LIB_CHECK([TERMCAP], [termcap], [tgetent], [])
- if test "x$TERMCAP_LIB" != "x" ; then
- EDITLINE_LIB="$TERMCAP_LIB"
- else
- AST_EXT_LIB_CHECK([TINFO], [tinfo], [tgetent], [])
- if test "x$TINFO_LIB" != "x" ; then
- EDITLINE_LIB="$TINFO_LIB"
- else
- AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h])
- if test "x$CURSES_LIB" != "x" ; then
- EDITLINE_LIB="$CURSES_LIB"
- else
- AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [ncurses.h])
- if test "x$NCURSES_LIB" != "x" ; then
- EDITLINE_LIB="$NCURSES_LIB"
- else
- AC_MSG_ERROR([*** termcap support not found (on modern systems, this typically means the ncurses development package is missing)])
- fi
- fi
- fi
- fi
- fi
- AC_SUBST(EDITLINE_LIB)
- # Find required UUID support.
- # * -luuid on Linux
- # * -le2fs-uuid on OpenBSD
- # * in libsystem on OS X
- AST_EXT_LIB_CHECK([LIBUUID], [uuid], [uuid_generate_random], [uuid/uuid.h])
- if test "x$LIBUUID_LIB" != "x" ; then
- UUID_INCLUDE="$LIBUUID_INCLUDE"
- UUID_LIB="$LIBUUID_LIB"
- else
- AST_EXT_LIB_CHECK([E2FSUUID], [e2fs-uuid], [uuid_generate_random], [uuid/uuid.h])
- if test "x$E2FSUUID_LIB" != "x" ; then
- UUID_INCLUDE="$E2FSUUID_INCLUDE"
- UUID_LIB="$E2FSUUID_LIB"
- else
- AC_CHECK_FUNCS([uuid_generate_random], [SYSUUID=true], [SYSUUID=""])
- if test "x$SYSUUID" != "x" ; then
- UUID_INCLUDE=""
- UUID_LIB=""
- else
- AC_MSG_ERROR([*** uuid support not found (this typically means the uuid development package is missing)])
- fi
- fi
- fi
- AC_SUBST(UUID_INCLUDE)
- AC_SUBST(UUID_LIB)
- # Find required JSON support if bundled is not enabled.
- if test "$JANSSON_BUNDLED" = "no" ; then
- AST_PKG_CONFIG_CHECK([JANSSON], [jansson])
- AST_EXT_LIB_CHECK([JANSSON], [jansson], [json_dumps], [jansson.h])
- if test "${PBX_JANSSON}" != 1; then
- AC_MSG_NOTICE(*** Asterisk requires libjansson and no system copy was found.)
- AC_MSG_NOTICE(*** Please install the 'libjansson' development package or)
- AC_MSG_NOTICE(*** use './configure --with-jansson-bundled')
- exit 1
- fi
- JANSSON_DEFINE_JSON_INT()
- else
- PBX_JANSSON=1
- fi
- # See if clock_gettime is in librt
- AST_EXT_LIB_CHECK([RT], [rt], [clock_gettime], [])
- AST_EXT_TOOL_CHECK([LIBXML2], [xml2-config], , ,
- [#include <libxml/tree.h>
- #include <libxml/parser.h>],
- [LIBXML_TEST_VERSION])
- if test "${PBX_LIBXML2}" != 1; then
- AC_MSG_NOTICE(*** The Asterisk menuselect tool requires the 'libxml2' development package.)
- AC_MSG_NOTICE(*** Please install the 'libxml2' development package.)
- exit 1
- fi
- AST_EXT_LIB_CHECK([URIPARSER], [uriparser], [uriParseUriA], [uriparser/Uri.h])
- # Another mandatory item (unless it's explicitly disabled)
- AC_ARG_ENABLE([xmldoc],
- [AS_HELP_STRING([--disable-xmldoc],
- [Explicitly disable XML documentation])],
- [case "${enableval}" in
- y|ye|yes) DISABLE_XMLDOC=no ;;
- n|no) DISABLE_XMLDOC=yes ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --disable-xmldoc) ;;
- esac], [DISABLE_XMLDOC=no])
- AC_SUBST([DISABLE_XMLDOC])
- if test "${DISABLE_XMLDOC}" != "yes"; then
- AC_DEFINE([AST_XML_DOCS], 1, [Define to enable XML documentation.])
- AST_EXT_LIB_CHECK([LIBXSLT], [xslt], [xsltLoadStylesheetPI], [libxslt/xsltInternals.h], [${LIBXML2_LIB}], [${LIBXML2_INCLUDE}])
- AST_EXT_LIB_CHECK([LIBXSLT_CLEANUP], [xslt], [xsltCleanupGlobals], [libxslt/xsltInternals.h], [${LIBXML2_LIB}], [${LIBXML2_INCLUDE}])
- fi
- # some embedded systems omit internationalization (locale) support
- AC_CHECK_HEADERS([xlocale.h])
- AC_CHECK_HEADERS([winsock.h winsock2.h])
- AC_CHECK_HEADER([sys/poll.h],
- [],
- AC_DEFINE([AST_POLL_COMPAT], 1, [Define to 1 if internal poll should be used.]))
- AC_SYS_LARGEFILE
- # Checks for typedefs, structures, and compiler characteristics.
- AC_HEADER_STDBOOL
- AC_C_CONST
- AC_TYPE_UID_T
- AC_C_INLINE
- AC_TYPE_LONG_DOUBLE_WIDER
- AC_TYPE_MODE_T
- AC_TYPE_OFF_T
- AC_TYPE_PID_T
- AC_TYPE_SIZE_T
- AC_CHECK_MEMBERS([struct stat.st_blksize])
- AC_CHECK_MEMBERS([struct ucred.uid, struct ucred.cr_uid, struct sockpeercred.uid], [], [], [#include <sys/types.h>
- #include <sys/socket.h> ])
- AC_CHECK_MEMBERS([struct ifreq.ifr_ifru.ifru_hwaddr], [], [], [#include <net/if.h>])
- AC_HEADER_TIME
- AC_STRUCT_TM
- AC_C_VOLATILE
- AC_CHECK_TYPES([ptrdiff_t])
- stat_nsec_found=no
- AC_CHECK_MEMBERS([struct stat.st_mtim, struct stat.st_mtimensec, struct stat.st_mtimespec], [stat_nsec_found=yes], [], [[#include <sys/stat.h>]])
- if test "${stat_nsec_found}" != yes; then
- AC_MSG_WARN(Cannot determine nanosecond field of struct stat)
- fi
- # Checks for library functions.
- AC_FUNC_CHOWN
- AC_FUNC_CLOSEDIR_VOID
- AC_FUNC_ERROR_AT_LINE
- AST_FUNC_FORK
- AC_FUNC_FSEEKO
- AC_PROG_GCC_TRADITIONAL
- # XXX: these are commented out until we determine whether it matters if our malloc()
- # acts exactly like glibc's or not
- # AC_FUNC_MALLOC
- # AC_FUNC_REALLOC
- AC_FUNC_MEMCMP
- AC_FUNC_MMAP
- AC_FUNC_SELECT_ARGTYPES
- AC_FUNC_STAT
- AC_FUNC_STRCOLL
- AC_FUNC_STRFTIME
- AC_FUNC_STRNLEN
- AC_FUNC_STRTOD
- AC_FUNC_UTIME_NULL
- AC_FUNC_VPRINTF
- AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap newlocale pipe2 ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv uselocale utime vasprintf getpeereid sysctl swapctl malloc_trim])
- AC_MSG_CHECKING(for htonll)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <arpa/inet.h>],
- [return htonll(0);])],
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_HTONLL, 1, [Define to 1 if arpa/inet.h includes a htonll definition.]),
- AC_MSG_RESULT(no)
- )
- AC_MSG_CHECKING(for ntohll)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <arpa/inet.h>],
- [return ntohll(0);])],
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_NTOHLL, 1, [Define to 1 if arpa/inet.h includes a ntohll definition.]),
- AC_MSG_RESULT(no)
- )
- # NOTE: we use AC_CHECK_LIB to get -lm into the arguments for later checks,
- # so that AC_CHECK_FUNCS can detect functions in that library.
- AC_CHECK_LIB([m], [sqrt])
- # BSD might not have exp2, and/or log2
- AC_CHECK_FUNCS([exp2 log2 exp10 log10 sin cos tan asin acos atan atan2 pow rint exp log remainder fmod round roundf trunc floor ceil])
- # Certain architectures don't really have long double, even though
- # AC_CHECK_FUNCS would otherwise find the following functions.
- if test "x${ac_cv_type_long_double_wider}" = "xyes" ; then
- AC_CHECK_FUNCS([exp2l log2l exp10l log10l sinl cosl tanl asinl acosl atanl atan2l powl sqrtl rintl expl logl remainderl fmodl roundl truncl floorl ceill])
- fi
- AC_MSG_CHECKING(for LLONG_MAX in limits.h)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <limits.h>],
- [long long foo = LLONG_MAX])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_LLONG_MAX], 1, [Define to 1 if limits.h includes a LLONG_MAX definition.]),
- AC_MSG_RESULT(no)
- )
- AC_MSG_CHECKING(for timersub in time.h)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <sys/time.h>],
- [struct timeval *a; timersub(a, a, a);])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_TIMERSUB], 1, [Define to 1 if your system defines timersub.]),
- AC_MSG_RESULT(no)
- )
- AC_MSG_CHECKING(for a version of GNU ld that supports the --dynamic-list flag)
- old_LDFLAGS=${LDFLAGS}
- cat >conftest.dynamics <<_ACEOF
- {
- *ast_*;
- };
- _ACEOF
- LDFLAGS="${LDFLAGS} -Wl,--dynamic-list,conftest.dynamics"
- PBX_DYNAMIC_LIST=0
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([], [])],
- PBX_DYNAMIC_LIST=1
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no)
- )
- AC_SUBST(PBX_DYNAMIC_LIST)
- LDFLAGS=${old_LDFLAGS}
- rm -f conftest.dynamics
- AC_CHECK_HEADER([sys/poll.h],
- [HAS_POLL=1]
- AC_DEFINE([HAVE_SYS_POLL_H], 1, [Define to 1 if your system has working sys/poll.h]),
- )
- AC_ARG_ENABLE([internal-poll],
- [AS_HELP_STRING([--enable-internal-poll],
- [Use Asterisk's poll implementation])],
- [case "${enableval}" in
- y|ye|yes) HAS_POLL="";;
- n|no) HAS_POLL="${HAS_POLL}" ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-internal-poll) ;;
- esac])
- AC_SUBST(HAS_POLL)
- AC_ARG_ENABLE([asteriskssl],
- [AS_HELP_STRING([--disable-asteriskssl],
- [Disable Asterisk's SSL wrapper library])],
- [case "${enableval}" in
- y|ye|yes) AST_ASTERISKSSL=yes ;;
- n|no) AST_ASTERISKSSL=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --disable-asteriskssl) ;;
- esac], [AST_ASTERISKSSL=yes])
- AC_SUBST(AST_ASTERISKSSL)
- # https support (in main/http.c) uses funopen on BSD systems,
- # fopencookie on linux
- AC_CHECK_FUNCS([funopen fopencookie])
- AC_CHECK_FUNCS([inet_aton])
- # check if we have IP_PKTINFO constant defined
- AC_MSG_CHECKING(for IP_PKTINFO)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <netinet/in.h>],
- [int pi = IP_PKTINFO;])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_PKTINFO], 1, [Define to 1 if your system defines IP_PKTINFO.]),
- AC_MSG_RESULT(no)
- )
- # some systems already have gethostbyname_r so we don't need to build ours in main/utils.c
- AC_SEARCH_LIBS(gethostbyname_r, [socket nsl])
- AC_MSG_CHECKING(for gethostbyname_r with 6 arguments)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <stdlib.h>
- #include <netdb.h>],
- [struct hostent *he = gethostbyname_r((const char *)NULL, (struct hostent *)NULL, (char *)NULL, (int)0, (struct hostent **)NULL, (int *)NULL);])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_GETHOSTBYNAME_R_6], 1, [Define to 1 if your system has gethostbyname_r with 6 arguments.]),
- AC_MSG_RESULT(no)
- )
- AC_MSG_CHECKING(for gethostbyname_r with 5 arguments)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <stdlib.h>
- #include <netdb.h>],
- [struct hostent *he = gethostbyname_r((const char *)NULL, (struct hostent *)NULL, (char *)NULL, (int)0, (int *)NULL);])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_GETHOSTBYNAME_R_5], 1, [Define to 1 if your system has gethostbyname_r with 5 arguments.]),
- AC_MSG_RESULT(no)
- )
- AC_CHECK_HEADER([byteswap.h], [AC_DEFINE_UNQUOTED([HAVE_BYTESWAP_H], 1, [Define to 1 if byteswap.h macros are available.])])
- AC_MSG_CHECKING(for __swap16 variant of <sys/endian.h> byteswapping macros)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <sys/endian.h>], [int a = 1; int b = __swap16(a);])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_SYS_ENDIAN_SWAP16], 1, [Define to 1 if your sys/endian.h header file provides the __swap16 macro.]),
- AC_MSG_RESULT(no)
- )
- AC_MSG_CHECKING(for bswap16 variant of <sys/endian.h> byteswapping macros)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <sys/endian.h>], [int a = 1; int b = bswap16(a);])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_SYS_ENDIAN_BSWAP16], 1, [Define to 1 if your sys/endian.h header file provides the bswap16 macro.]),
- AC_MSG_RESULT(no)
- )
- AC_MSG_CHECKING(for locale_t in locale.h)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <locale.h>], [locale_t lt = NULL])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_LOCALE_T_IN_LOCALE_H], 1, [Define to 1 if your system defines the locale_t type in locale.h]),
- AC_MSG_RESULT(no)
- AC_MSG_CHECKING(for locale_t in xlocale.h)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <xlocale.h>], [locale_t lt = NULL])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_LOCALE_T_IN_XLOCALE_H], 1, [Define to 1 if your system defines the locale_t type in xlocale.h]),
- AC_MSG_RESULT(no)
- )
- )
- AC_MSG_CHECKING(for O_EVTONLY in fcntl.h)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <fcntl.h>], [int a = O_EVTONLY;])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_O_EVTONLY], 1, [Define to 1 if your system defines the file flag O_EVTONLY in fcntl.h]),
- AC_MSG_RESULT(no)
- )
- AC_MSG_CHECKING(for O_SYMLINK in fcntl.h)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <fcntl.h>], [int a = O_SYMLINK;])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_O_SYMLINK], 1, [Define to 1 if your system defines the file flag O_SYMLINK in fcntl.h]),
- AC_MSG_RESULT(no)
- )
- AST_C_DEFINE_CHECK([PTHREAD_RWLOCK_INITIALIZER], [PTHREAD_RWLOCK_INITIALIZER], [pthread.h])
- AC_MSG_CHECKING(for PTHREAD_RWLOCK_PREFER_WRITER_NP in pthread.h)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <pthread.h>], [int a = PTHREAD_RWLOCK_PREFER_WRITER_NP;])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NP], 1, [Define to 1 if your system defines PTHREAD_RWLOCK_PREFER_WRITER_NP in pthread.h]),
- AC_MSG_RESULT(no)
- )
- AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE_NP in pthread.h)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <pthread.h>], [int a = PTHREAD_MUTEX_RECURSIVE_NP;])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE_NP], 1, [Define to 1 if your system defines PTHREAD_MUTEX_RECURSIVE_NP in pthread.h]),
- AC_MSG_RESULT(no)
- )
- AC_MSG_CHECKING(for PTHREAD_MUTEX_ADAPTIVE_NP in pthread.h)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <pthread.h>], [int a = PTHREAD_MUTEX_ADAPTIVE_NP;])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_PTHREAD_MUTEX_ADAPTIVE_NP], 1, [Define to 1 if your system defines PTHREAD_MUTEX_ADAPTIVE_NP in pthread.h]),
- AC_MSG_RESULT(no)
- )
- AC_MSG_CHECKING(for pthread_spinlock_t in pthread.h)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <pthread.h>], [pthread_spinlock_t spin;])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_PTHREAD_SPINLOCK], 1, [Define to 1 if your system has pthread_spinlock_t in pthread.h]),
- AC_MSG_RESULT(no)
- )
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- AC_MSG_CHECKING(for pthread_rwlock_timedwrlock() in pthread.h)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [#include <pthread.h>
- #include <time.h>],
- [pthread_rwlock_t foo; struct timespec bar; pthread_rwlock_timedwrlock(&foo, &bar)])
- ],[
- AC_MSG_RESULT(yes)
- ac_cv_pthread_rwlock_timedwrlock="yes"
- ],[
- AC_MSG_RESULT(no)
- ac_cv_pthread_rwlock_timedwrlock="no"
- ]
- )
- # Some platforms define sem_init(), but only support sem_open(). joyous.
- AC_MSG_CHECKING(for working unnamed semaphores)
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([#include <semaphore.h>],
- [sem_t sem; return sem_init(&sem, 0, 0);])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAS_WORKING_SEMAPHORE], 1, [Define to 1 if anonymous semaphores work.]),
- AC_MSG_RESULT(no),
- AC_MSG_RESULT(cross-compile)
- AC_MSG_NOTICE([WARNING: result yes guessed because of cross compilation])
- AC_DEFINE([HAS_WORKING_SEMAPHORE], 1, [Define to 1 if anonymous semaphores work.])
- )
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
- if test "${ac_cv_pthread_rwlock_timedwrlock}" = "yes"; then
- AC_DEFINE([HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK], 1, [Define if your system has pthread_rwlock_timedwrlock()])
- fi
- AC_MSG_CHECKING(if PTHREAD_ONCE_INIT needs braces)
- saved_CFLAGS="${CFLAGS}"
- CFLAGS="${CFLAGS} -Werror -Wmissing-braces"
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [#include <pthread.h>
- void empty(){}],
- [pthread_once_t once = PTHREAD_ONCE_INIT; pthread_once(&once, empty);])
- ],[
- AC_MSG_RESULT(no)
- ac_cv_pthread_once_needsbraces="no"
- ],[
- AC_MSG_RESULT(yes)
- ac_cv_pthread_once_needsbraces="yes"
- ]
- )
- CFLAGS="${saved_CFLAGS}"
- if test "${ac_cv_pthread_once_needsbraces}" = "yes"; then
- AC_DEFINE([PTHREAD_ONCE_INIT_NEEDS_BRACES], 1, [Define if your system needs braces around PTHREAD_ONCE_INIT])
- fi
- AST_C_DEFINE_CHECK([PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], [PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], [pthread.h])
- # Can we compare a mutex to its initial value?
- # Generally yes on OpenBSD/FreeBSD and no on Mac OS X.
- AC_MSG_CHECKING(whether we can compare a mutex to its initial value)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <pthread.h>], [pthread_mutex_t lock;
- if ((lock) != ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
- return 0;
- }
- return 0])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([CAN_COMPARE_MUTEX_TO_INIT_VALUE], 1, [Define to 1 if your system's implementation of mutexes supports comparison of a mutex to its initializer.]),
- AC_MSG_RESULT(no)
- )
- #if test "${cross_compiling}" = "no";
- #then
- #AC_MSG_CHECKING(for working epoll support)
- #AC_LINK_IFELSE(
- #AC_LANG_PROGRAM([#include <sys/epoll.h>], [int res = epoll_create(10);
- # if (res < 0)
- # return 1;
- # close (res);
- # return 0;]),
- #AC_MSG_RESULT(yes)
- #AC_DEFINE([HAVE_EPOLL], 1, [Define to 1 if your system has working epoll support.]),
- #AC_MSG_RESULT(no)
- #)
- #fi
- # for FreeBSD thr_self
- AC_CHECK_HEADERS([sys/thr.h])
- AC_MSG_CHECKING(for compiler atomic operations)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([], [int foo1; int foo2 = __sync_fetch_and_add(&foo1, 1);])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_GCC_ATOMICS], 1, [Define to 1 if your GCC C compiler provides atomic operations.]),
- AC_MSG_RESULT(no)
- )
- # glibc, AFAIK, is the only C library that makes printing a NULL to a string safe.
- AC_MSG_CHECKING([if your system printf is NULL-safe.])
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([#include <stdio.h>],
- [printf("%s", NULL)])],
- AC_DEFINE([HAVE_NULLSAFE_PRINTF], 1, [Define to 1 if your C library can safely print NULL to string formats.])
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no),
- # It's unlikely an embedded system will have this.
- AC_MSG_RESULT(unknown)
- )
- AC_MSG_CHECKING([if socket() accepts SOCK_NONBLOCK])
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- ], [
- if (socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0) < 0) {
- return 1;
- }
- return 0;
- ])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_SOCK_NONBLOCK], 1, [Define to 1 if your socket() implementation can accept SOCK_NONBLOCK.]),
- AC_MSG_RESULT(no),
- AC_MSG_RESULT(cross-compile)
- )
- AC_MSG_CHECKING(if we can increase the maximum select-able file descriptor)
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([
- #include <stdio.h>
- #include <sys/select.h>
- #include <sys/time.h>
- #include <sys/resource.h>
- #include <string.h>
- #include <errno.h>
- #include <stdlib.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <unistd.h>
- ], [[
- struct rlimit rlim = { FD_SETSIZE * 2, FD_SETSIZE * 2 };
- int fd0, fd1;
- struct timeval tv = { 0, };
- struct ast_fdset { long fds_bits[[1024]]; } fds = { { 0, } };
- if (setrlimit(RLIMIT_NOFILE, &rlim)) { exit(1); }
- if ((fd0 = open("/dev/null", O_RDONLY)) < 0) { exit(1); }
- if (dup2(fd0, (fd1 = FD_SETSIZE + 1)) < 0) { exit(1); }
- FD_SET(fd0, (fd_set *) &fds);
- FD_SET(fd1, (fd_set *) &fds);
- if (select(FD_SETSIZE + 2, (fd_set *) &fds, NULL, NULL, &tv) < 0) { exit(1); }
- exit(0)]])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_VARIABLE_FDSET], 1, [Define to 1 if your system can support larger than default select bitmasks.]),
- AC_MSG_RESULT(no),
- AC_MSG_RESULT(cross-compile)
- )
- if test "${ac_cv_have_variable_fdset}x" = "0x"; then
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([
- #include <unistd.h>
- #include <sys/types.h>
- #include <stdlib.h>
- ], [if (getuid() != 0) { exit(1); }])],
- AC_DEFINE([CONFIGURE_RAN_AS_ROOT], 1, [Some configure tests will unexpectedly fail if configure is run by a non-root user. These may be able to be tested at runtime.]))
- fi
- AC_MSG_CHECKING([if we have usable eventfd support])
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([#include <sys/eventfd.h>],
- [return eventfd(0, EFD_NONBLOCK | EFD_SEMAPHORE) == -1;])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_EVENTFD], 1, [Define to 1 if your system supports eventfd and the EFD_NONBLOCK and EFD_SEMAPHORE flags.]),
- AC_MSG_RESULT(no),
- AC_MSG_RESULT(cross-compile)
- )
- AST_GCC_ATTRIBUTE(pure)
- AST_GCC_ATTRIBUTE(malloc)
- AST_GCC_ATTRIBUTE(const)
- AST_GCC_ATTRIBUTE(unused)
- AST_GCC_ATTRIBUTE(always_inline)
- AST_GCC_ATTRIBUTE(deprecated)
- AST_GCC_ATTRIBUTE(sentinel)
- AST_GCC_ATTRIBUTE(warn_unused_result)
- AST_GCC_ATTRIBUTE(may_alias)
- AST_GCC_ATTRIBUTE(constructor)
- if test "$ax_cv_have_func_attribute_constructor" != "1"; then
- AC_MSG_ERROR([*** Function constructor attribute is not supported by your compiler.])
- fi
- AST_GCC_ATTRIBUTE(destructor)
- if test "$ax_cv_have_func_attribute_destructor" != "1"; then
- AC_MSG_ERROR([*** Function destructor attribute is not supported by your compiler.])
- fi
- AST_GCC_ATTRIBUTE(noreturn,noreturn)
- AC_MSG_CHECKING(for -fsanitize=address support)
- saved_sanitize_CFLAGS="${CFLAGS}"
- saved_sanitize_LDFLAGS="${LDFLAGS}"
- CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
- LDFLAGS="-fsanitize=address"
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([], [int x = 1;])],
- AC_MSG_RESULT(yes)
- [AST_ADDRESS_SANITIZER=1],
- [AST_ADDRESS_SANITIZER=0]
- AC_MSG_RESULT(no)
- )
- CFLAGS="${saved_sanitize_CFLAGS}"
- LDFLAGS="${saved_sanitize_LDFLAGS}"
- AC_SUBST(AST_ADDRESS_SANITIZER)
- AC_MSG_CHECKING(for -fsanitize=thread support)
- saved_sanitize_CFLAGS="${CFLAGS}"
- saved_sanitize_LDFLAGS="${LDFLAGS}"
- CFLAGS="-fno-omit-frame-pointer -pie -fPIE -fsanitize=thread"
- LDFLAGS="-fsanitize=thread -pie -fPIE"
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([], [int x = 1;])],
- AC_MSG_RESULT(yes)
- [AST_THREAD_SANITIZER=1],
- [AST_THREAD_SANITIZER=0]
- AC_MSG_RESULT(no)
- )
- CFLAGS="${saved_sanitize_CFLAGS}"
- LDFLAGS="${saved_sanitize_LDFLAGS}"
- AC_SUBST(AST_THREAD_SANITIZER)
- AC_MSG_CHECKING(for -fsanitize=leak support)
- saved_sanitize_CFLAGS="${CFLAGS}"
- saved_sanitize_LDFLAGS="${LDFLAGS}"
- CFLAGS="-fno-omit-frame-pointer -fsanitize=leak"
- LDFLAGS="-fsanitize=leak"
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([], [int x = 1;])],
- AC_MSG_RESULT(yes)
- [AST_LEAK_SANITIZER=1],
- [AST_LEAK_SANITIZER=0]
- AC_MSG_RESULT(no)
- )
- CFLAGS="${saved_sanitize_CFLAGS}"
- LDFLAGS="${saved_sanitize_LDFLAGS}"
- AC_SUBST(AST_LEAK_SANITIZER)
- AC_MSG_CHECKING(for -fsanitize=undefined support)
- saved_sanitize_CFLAGS="${CFLAGS}"
- saved_sanitize_LDFLAGS="${LDFLAGS}"
- CFLAGS="-fno-omit-frame-pointer -fsanitize=undefined"
- LDFLAGS="-fsanitize=undefined"
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([], [int x = 1;])],
- AC_MSG_RESULT(yes)
- [AST_UNDEFINED_SANITIZER=1],
- [AST_UNDEFINED_SANITIZER=0]
- AC_MSG_RESULT(no)
- )
- CFLAGS="${saved_sanitize_CFLAGS}"
- LDFLAGS="${saved_sanitize_LDFLAGS}"
- AC_SUBST(AST_UNDEFINED_SANITIZER)
- AC_MSG_CHECKING(for -Wdeclaration-after-statement support)
- if $(${CC} -Wdeclaration-after-statement -Werror -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
- AC_MSG_RESULT(yes)
- AST_DECLARATION_AFTER_STATEMENT=-Wdeclaration-after-statement
- else
- AC_MSG_RESULT(no)
- AST_DECLARATION_AFTER_STATEMENT=
- fi
- AC_SUBST(AST_DECLARATION_AFTER_STATEMENT)
- AC_MSG_CHECKING(for -Wtrampolines support)
- if $(${CC} -Wtrampolines -Werror -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
- AC_MSG_RESULT(yes)
- AST_TRAMPOLINES=-Wtrampolines
- else
- AC_MSG_RESULT(no)
- AST_TRAMPOLINES=
- fi
- AC_SUBST(AST_TRAMPOLINES)
- AC_MSG_CHECKING(for _FORTIFY_SOURCE support)
- if $(${CC} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
- AC_MSG_RESULT(yes)
- AST_FORTIFY_SOURCE="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
- else
- AC_MSG_RESULT(no)
- AST_FORTIFY_SOURCE=
- fi
- AC_SUBST(AST_FORTIFY_SOURCE)
- AC_MSG_CHECKING(for -fno-strict-overflow)
- if $(${CC} -O2 -fno-strict-overflow -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
- AC_MSG_RESULT(yes)
- AST_NO_STRICT_OVERFLOW=-fno-strict-overflow
- else
- AC_MSG_RESULT(no)
- AST_NO_STRICT_OVERFLOW=
- fi
- AC_SUBST(AST_NO_STRICT_OVERFLOW)
- AC_MSG_CHECKING(for -Wno-format-truncation)
- if $(${CC} -Wno-format-truncation -Werror -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
- AC_MSG_RESULT(yes)
- AST_NO_FORMAT_TRUNCATION=-Wno-format-truncation
- else
- AC_MSG_RESULT(no)
- AST_NO_FORMAT_TRUNCATION=
- fi
- AC_SUBST(AST_NO_FORMAT_TRUNCATION)
- AC_MSG_CHECKING(for -Wno-stringop-truncation)
- if $(${CC} -Wno-stringop-truncation -Werror -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
- AC_MSG_RESULT(yes)
- AST_NO_STRINGOP_TRUNCATION=-Wno-stringop-truncation
- else
- AC_MSG_RESULT(no)
- AST_NO_STRINGOP_TRUNCATION=
- fi
- AC_SUBST(AST_NO_STRINGOP_TRUNCATION)
- AC_MSG_CHECKING(for -Wshadow)
- if $(${CC} -Wshadow -Werror -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
- AC_MSG_RESULT(yes)
- AST_SHADOW_WARNINGS=-Wshadow
- else
- AC_MSG_RESULT(no)
- AST_SHADOW_WARNINGS=
- fi
- AC_SUBST(AST_SHADOW_WARNINGS)
- AC_MSG_CHECKING(for -march=native support)
- if $(${CC} -march=native -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
- AC_MSG_RESULT(yes)
- AST_NATIVE_ARCH=1
- else
- AC_MSG_RESULT(no)
- AST_NATIVE_ARCH=0
- fi
- AC_SUBST(AST_NATIVE_ARCH)
- dnl Check to see if rpath should be set in LDFLAGS
- AC_ARG_ENABLE(rpath,
- [AS_HELP_STRING([--disable-rpath],
- [Disables rpath linker option checking])],
- [case "${enableval}" in
- y|ye|yes) check_rpath=yes ;;
- n|no) check_rpath=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --disable-rpath) ;;
- esac], [check_rpath=yes])
- AC_MSG_CHECKING(whether to use rpath)
- AST_RPATH=
- if test "${OSARCH}" = "NetBSD"; then
- AST_RPATH="-Wl,-rpath,/usr/pkg/lib"
- fi
- if test "${check_rpath}" != yes; then
- AC_MSG_RESULT(skipped)
- elif test "${prefix}" = /usr || test "${prefix}" = NONE; then
- AC_MSG_RESULT(not needed)
- else
- AST_RPATH="-Wl,-rpath,${libdir}"
- fi
- AC_SUBST(AST_RPATH)
- AC_MSG_CHECKING(for sysinfo)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#include <sys/sysinfo.h>],
- [struct sysinfo sys_info; int uptime = sys_info.uptime])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_SYSINFO], 1, [Define to 1 if your system has sysinfo support]),
- AC_MSG_RESULT(no)
- )
- AC_SEARCH_LIBS(res_9_ninit, resolv)
- AC_MSG_CHECKING(for res_ninit)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([
- #ifdef HAVE_SYS_SOCKET_H
- #include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- #include <netinet/in.h>
- #endif
- #ifdef HAVE_ARPA_NAMESER_H
- #include <arpa/nameser.h>
- #endif
- #include <resolv.h>],
- [int foo = res_ninit(NULL);])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_RES_NINIT], 1, [Define to 1 if your system has the re-entrant resolver functions.])
- AC_SEARCH_LIBS(res_9_ndestroy, resolv)
- AC_MSG_CHECKING(for res_ndestroy)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([
- #ifdef HAVE_SYS_SOCKET_H
- #include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- #include <netinet/in.h>
- #endif
- #ifdef HAVE_ARPA_NAMESER_H
- #include <arpa/nameser.h>
- #endif
- #include <resolv.h>],
- [res_ndestroy(NULL);])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_RES_NDESTROY], 1, [Define to 1 if your system has the ndestroy resolver function.]),
- AC_MSG_RESULT(no)
- )
- AC_SEARCH_LIBS(res_9_close, resolv)
- AC_MSG_CHECKING(for res_close)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([
- #ifdef HAVE_SYS_SOCKET_H
- #include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- #include <netinet/in.h>
- #endif
- #ifdef HAVE_ARPA_NAMESER_H
- #include <arpa/nameser.h>
- #endif
- #include <resolv.h>],
- [res_close();])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_RES_CLOSE], 1, [Define to 1 if your system has the close resolver function.]),
- AC_MSG_RESULT(no)
- ),
- AC_MSG_RESULT(no)
- )
- AC_MSG_CHECKING(for BIND_8_COMPAT required)
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [[
- #undef BIND_8_COMPAT
- #include <arpa/nameser.h>
- ]],
- [[int x = NXDOMAIN]])],
- AC_MSG_RESULT(no),
- AC_MSG_RESULT(yes)
- [BIND8_CFLAGS=-DBIND_8_COMPAT])
- AC_SUBST(BIND8_CFLAGS)
- AST_C_DEFINE_CHECK([GLOB_NOMAGIC], [GLOB_NOMAGIC], [glob.h])
- AST_C_DEFINE_CHECK([GLOB_BRACE], [GLOB_BRACE], [glob.h])
- AST_C_DEFINE_CHECK([RTLD_NOLOAD], [RTLD_NOLOAD], [dlfcn.h])
- AST_C_DEFINE_CHECK([IP_MTU_DISCOVER], [IP_MTU_DISCOVER], [netinet/in.h])
- AC_CHECK_HEADER([libkern/OSAtomic.h],
- [AC_DEFINE_UNQUOTED([HAVE_OSX_ATOMICS], 1, [Define to 1 if OSX atomic operations are supported.])])
- AC_CHECK_SIZEOF([int])
- AC_CHECK_SIZEOF([long])
- AC_CHECK_SIZEOF([long long])
- AC_CHECK_SIZEOF([char *])
- AC_CHECK_SIZEOF(long)
- AC_CHECK_SIZEOF(long long)
- AC_COMPUTE_INT([ac_cv_sizeof_fd_set_fds_bits], [sizeof(foo.fds_bits[[0]])], [$ac_includes_default
- fd_set foo;])
- # This doesn't actually work; what it does is to use the variable set in the
- # previous test as a cached value to set the right output variables.
- AC_CHECK_SIZEOF(fd_set.fds_bits)
- # Set a type compatible with the previous. We cannot just use a generic type
- # for these bits, because on big-endian systems, the bits won't match up
- # correctly if the size is wrong.
- if test $ac_cv_sizeof_int = $ac_cv_sizeof_fd_set_fds_bits; then
- AC_DEFINE([TYPEOF_FD_SET_FDS_BITS], [int], [Define to a type of the same size as fd_set.fds_bits[[0]]])
- elif test $ac_cv_sizeof_long = $ac_cv_sizeof_fd_set_fds_bits; then
- AC_DEFINE([TYPEOF_FD_SET_FDS_BITS], [long], [Define to a type of the same size as fd_set.fds_bits[[0]]])
- elif test $ac_cv_sizeof_long_long = $ac_cv_sizeof_fd_set_fds_bits; then
- AC_DEFINE([TYPEOF_FD_SET_FDS_BITS], [long long], [Define to a type of the same size as fd_set.fds_bits[[0]]])
- fi
- AC_MSG_CHECKING(for dladdr in dlfcn.h)
- PBX_DLADDR=0
- old_LIBS=${LIBS}
- LIBS="${LIBS} -ldl"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#define _GNU_SOURCE 1
- #include <dlfcn.h>],
- [dladdr((void *)0, (void *)0)]
- )],
- AC_MSG_RESULT(yes)
- PBX_DLADDR=1
- AC_SUBST([PBX_DLADDR])
- AC_DEFINE([HAVE_DLADDR], 1, [Define to 1 if your system has the dladdr() GNU extension]),
- AC_MSG_RESULT(no)
- )
- LIBS=${old_LIBS}
- # re-check without -ldl
- # Non-Linux platforms like FreeBSD and NetBSD do not need a library libdl.so.
- if test "${PBX_DLADDR}" = "0"; then
- AC_MSG_CHECKING(for dladdr in dlfcn.h without -ldl)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([#define _GNU_SOURCE 1
- #include <dlfcn.h>],
- [dladdr((void *)0, (void *)0)]
- )],
- AC_MSG_RESULT(yes)
- PBX_DLADDR=1
- AC_SUBST([PBX_DLADDR])
- AC_DEFINE([HAVE_DLADDR], 1, [Define to 1 if your system has the dladdr() GNU extension]),
- AC_MSG_RESULT(no)
- )
- fi
- # do the package library checks now
- AST_EXT_LIB_CHECK([ALSA], [asound], [snd_pcm_open], [alsa/asoundlib.h])
- AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_openr], [bfd.h])
- # Fedora/RedHat/CentOS require extra libraries
- AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_openr], [bfd.h], [-ldl -liberty])
- # openSUSE requires -lz
- AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_openr], [bfd.h], [-ldl -liberty -lz])
- if test "x${OSARCH}" = "xlinux-gnu" ; then
- AST_EXT_LIB_CHECK([CAP], [cap], [cap_from_text], [sys/capability.h])
- fi
- AST_C_DEFINE_CHECK([DAHDI], [DAHDI_RESET_COUNTERS], [dahdi/user.h], [230])
- AST_C_DEFINE_CHECK([DAHDI], [DAHDI_DEFAULT_MTU_MRU], [dahdi/user.h], [220])
- AST_C_DEFINE_CHECK([DAHDI], [DAHDI_CODE], [dahdi/user.h], [200])
- AST_C_DEFINE_CHECK([DAHDI_HALF_FULL], [DAHDI_POLICY_HALF_FULL], [dahdi/user.h])
- AST_C_COMPILE_CHECK([DAHDI_LINEREVERSE_VMWI], [struct dahdi_vmwi_info booger], [dahdi/user.h], , [enhanced dahdi vmwi support])
- AST_C_COMPILE_CHECK([DAHDI_ECHOCANCEL_FAX_MODE], [int foo = DAHDI_ECHOCANCEL_FAX_MODE], [dahdi/user.h])
- AST_C_COMPILE_CHECK([GETIFADDRS], [struct ifaddrs *p; getifaddrs(&p)], [ifaddrs.h], , [getifaddrs() support])
- AST_C_COMPILE_CHECK([TIMERFD], [timerfd_create(0,0); timerfd_settime(0,0,NULL,NULL);], [sys/timerfd.h], , [timerfd support])
- GSM_INTERNAL="yes"
- AC_SUBST(GSM_INTERNAL)
- GSM_SYSTEM="yes"
- if test "${USE_GSM}" != "no"; then
- if test "${GSM_DIR}" = "internal"; then
- GSM_SYSTEM="no"
- elif test "${GSM_DIR}" != ""; then
- GSM_INTERNAL="no"
- fi
- if test "${GSM_SYSTEM}" = "yes"; then
- gsmlibdir=""
- if test "x${GSM_DIR}" != "x"; then
- if test -d ${GSM_DIR}/lib; then
- gsmlibdir="-L${GSM_DIR}/lib"
- else
- gsmlibdir="-L${GSM_DIR}"
- fi
- fi
- AC_CHECK_LIB([gsm], [gsm_create], AC_DEFINE_UNQUOTED([HAVE_GSM], 1,
- [Define to indicate the GSM library]), [], ${gsmlibdir})
- if test "${ac_cv_lib_gsm_gsm_create}" = "yes"; then
- if test "x${GSM_DIR}" != "x" ; then
- AC_CHECK_HEADER([${GSM_DIR}/include/gsm.h], [GSM_HEADER_FOUND=1], [GSM_HEADER_FOUND=0])
- AC_CHECK_HEADER([${GSM_DIR}/include/gsm/gsm.h], [GSM_GSM_HEADER_FOUND=1], [GSM_GSM_HEADER_FOUND=0])
- else
- AC_CHECK_HEADER([gsm.h], [GSM_HEADER_FOUND=1], [GSM_HEADER_FOUND=0])
- AC_CHECK_HEADER([gsm/gsm.h], [GSM_GSM_HEADER_FOUND=1], [GSM_GSM_HEADER_FOUND=0])
- fi
- if test "${GSM_HEADER_FOUND}" = "0" ; then
- if test "{GSM_GSM_HEADER_FOUND}" = "0" ; then
- if test "x${GSM_MANDATORY}" = "xyes" ; then
- AC_MSG_NOTICE([***])
- AC_MSG_NOTICE([*** It appears that you do not have the gsm development package installed.])
- AC_MSG_NOTICE([*** Please install it to include ${GSM_DESCRIP} support, or re-run configure])
- AC_MSG_NOTICE([*** without explicitly specifying --with-${GSM_OPTION}])
- exit 1
- fi
- fi
- fi
- GSM_OK=0
- if test "${GSM_HEADER_FOUND}" = "1" ; then
- AC_DEFINE_UNQUOTED([HAVE_GSM_HEADER], 1, [Define to indicate that gsm.h has no prefix for its location])
- GSM_OK=1
- elif test "${GSM_GSM_HEADER_FOUND}" = "1" ; then
- AC_DEFINE_UNQUOTED([HAVE_GSM_GSM_HEADER], 1, [Define to indicate that gsm.h is in gsm/gsm.h])
- GSM_OK=1
- fi
- if test "${GSM_OK}" = "1" ; then
- GSM_LIB="-lgsm"
- if test "x${GSM_DIR}" != "x"; then
- GSM_LIB="${gsmlibdir} ${GSM_LIB}"
- GSM_INCLUDE="-I${GSM_DIR}/include"
- fi
- PBX_GSM=1
- GSM_INTERNAL="no"
- fi
- fi
- fi
- if test "${GSM_INTERNAL}" = "yes"; then
- PBX_GSM=1
- AC_DEFINE_UNQUOTED([HAVE_GSM_HEADER], 1, [Define to indicate that gsm.h has no prefix for its location])
- fi
- fi
- ILBC_INTERNAL="yes"
- AC_SUBST(ILBC_INTERNAL)
- ILBC_SYSTEM="yes"
- if test "${USE_ILBC}" != "no"; then
- if test "${ILBC_DIR}" = "internal"; then
- ILBC_SYSTEM="no"
- elif test "${ILBC_DIR}" != ""; then
- ILBC_INTERNAL="no"
- fi
- if test "${ILBC_SYSTEM}" = "yes"; then
- AST_PKG_CONFIG_CHECK(ILBC, libilbc)
- if test "$PBX_ILBC" = "1"; then
- ILBC_INTERNAL="no"
- fi
- fi
- if test "${ILBC_INTERNAL}" = "yes"; then
- PBX_ILBC=1
- fi
- fi
- AST_EXT_LIB_CHECK([ICONV], [iconv], [iconv_open], [iconv.h])
- # GNU libiconv #define's iconv_open to libiconv_open, so we need to search for that symbol
- AST_EXT_LIB_CHECK([ICONV], [iconv], [libiconv_open], [iconv.h])
- # Some versions of Linux package iconv in glibc
- AST_EXT_LIB_CHECK([ICONV], [c], [iconv_close], [iconv.h])
- # If ical.h is NOT in the libical directory, then it is of a version insufficient for us.
- AST_EXT_LIB_CHECK([ICAL], [ical], [icaltimezone_get_utc_timezone], [libical/ical.h], [${PTHREAD_LIBS}], [${PTHREAD_CFLAGS}])
- AST_EXT_LIB_CHECK([IKSEMEL], [iksemel], [iks_start_sasl], [iksemel.h])
- if test "${USE_IMAP_TK}" != "no"; then
- saved_cppflags="${CPPFLAGS}"
- saved_libs="${LIBS}"
- switch_to_system_on_failure="no"
- if test "${IMAP_TK_DIR}" = ""; then
- IMAP_TK_DIR=`pwd`"/../imap-2004g"
- switch_to_system_on_failure="yes"
- fi
- if test "${IMAP_TK_DIR}" != "system"; then
- AC_MSG_CHECKING(for UW IMAP Toolkit c-client library)
- if test -f "${IMAP_TK_DIR}/c-client/LDFLAGS"; then
- imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS`
- fi
- imap_libs="${IMAP_TK_DIR}/c-client/c-client.a"
- imap_include="-I${IMAP_TK_DIR}/c-client"
- CPPFLAGS="${CPPFLAGS} ${imap_include}"
- LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [#include "c-client.h"
- void mm_searched (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_exists (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_expunged (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_flags (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_notify (MAILSTREAM *stream,char *string,long errflg)
- {
- }
- void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
- {
- }
- void mm_log (char *string,long errflg)
- {
- }
- void mm_dlog (char *string)
- {
- }
- void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
- {
- }
- void mm_critical (MAILSTREAM *stream)
- {
- }
- void mm_nocritical (MAILSTREAM *stream)
- {
- }
- long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
- {
- }
- void mm_fatal (char *string)
- {
- }],
- [
- MAILSTREAM *foo = mail_open(NULL, "", 0);
- ]
- )],
- [ac_cv_imap_tk="yes"],
- [ac_cv_imap_tk="no"]
- )
- if test "${ac_cv_imap_tk}" = "yes"; then
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [#include "c-client.h"
- void mm_searched (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_exists (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_expunged (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_flags (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_notify (MAILSTREAM *stream,char *string,long errflg)
- {
- }
- void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
- {
- }
- void mm_log (char *string,long errflg)
- {
- }
- void mm_dlog (char *string)
- {
- }
- void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
- {
- }
- void mm_critical (MAILSTREAM *stream)
- {
- }
- void mm_nocritical (MAILSTREAM *stream)
- {
- }
- long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
- {
- }
- void mm_fatal (char *string)
- {
- }],
- [
- long check = mail_expunge_full(NULL, "", 0);
- ]
- )],
- [ac_cv_imap_tk2006="yes"],
- [ac_cv_imap_tk2006="no"]
- )
- fi
- CPPFLAGS="${saved_cppflags}"
- LIBS="${saved_libs}"
- if test "${ac_cv_imap_tk}" = "no"; then
- AC_MSG_RESULT(no)
- if test "${switch_to_system_on_failure}" = "yes"; then
- IMAP_TK_DIR="system"
- else #This means they specified a directory. Search for a package installation there too
- AC_MSG_CHECKING([for system c-client library...])
- CPPFLAGS="${saved_cppflags}"
- LIBS="${saved_libs}"
- imap_include="-I${IMAP_TK_DIR}/include"
- imap_ldflags="-L${IMAP_TK_DIR}/lib"
- imap_libs="-lc-client"
- CPPFLAGS="${CPPFLAGS} ${imap_include}"
- LIBS="${LIBS} ${imap_libs} ${imap_ldflags}"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [#include "c-client.h"
- void mm_searched (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_exists (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_expunged (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_flags (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_notify (MAILSTREAM *stream,char *string,long errflg)
- {
- }
- void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
- {
- }
- void mm_log (char *string,long errflg)
- {
- }
- void mm_dlog (char *string)
- {
- }
- void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
- {
- }
- void mm_critical (MAILSTREAM *stream)
- {
- }
- void mm_nocritical (MAILSTREAM *stream)
- {
- }
- long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
- {
- }
- void mm_fatal (char *string)
- {
- }],
- [
- MAILSTREAM *foo = mail_open(NULL, "", 0);
- ]
- )],
- [ac_cv_imap_tk="yes"],
- [ac_cv_imap_tk="no"]
- )
- if test "${ac_cv_imap_tk}" = "yes"; then
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [#include "c-client.h"
- void mm_searched (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_exists (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_expunged (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_flags (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_notify (MAILSTREAM *stream,char *string,long errflg)
- {
- }
- void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
- {
- }
- void mm_log (char *string,long errflg)
- {
- }
- void mm_dlog (char *string)
- {
- }
- void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
- {
- }
- void mm_critical (MAILSTREAM *stream)
- {
- }
- void mm_nocritical (MAILSTREAM *stream)
- {
- }
- long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
- {
- }
- void mm_fatal (char *string)
- {
- }],
- [
- long check = mail_expunge_full(NULL, "", 0);
- ]
- )],
- [ac_cv_imap_tk2006="yes"],
- [ac_cv_imap_tk2006="no"]
- )
- fi
- fi
- fi
- fi
- if test "${IMAP_TK_DIR}" = "system"; then
- #We will enter here if user specified "system" or if any of above checks failed
- AC_MSG_CHECKING([for system c-client library...])
- CPPFLAGS="${saved_cppflags}"
- LIBS="${saved_libs}"
- imap_ldflags=""
- imap_libs="-lcrypto -lssl -lc-client"
- imap_include="-DUSE_SYSTEM_IMAP" #Try the imap directory first
- CPPFLAGS="${CPPFLAGS} ${imap_include}"
- LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [#include <stdio.h>
- #include <imap/c-client.h>
- void mm_searched (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_exists (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_expunged (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_flags (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_notify (MAILSTREAM *stream,char *string,long errflg)
- {
- }
- void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
- {
- }
- void mm_log (char *string,long errflg)
- {
- }
- void mm_dlog (char *string)
- {
- }
- void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
- {
- }
- void mm_critical (MAILSTREAM *stream)
- {
- }
- void mm_nocritical (MAILSTREAM *stream)
- {
- }
- long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
- {
- }
- void mm_fatal (char *string)
- {
- }],
- [
- MAILSTREAM *foo = mail_open(NULL, "", 0);
- ]
- )],
- [ac_cv_imap_tk="yes"],
- [ac_cv_imap_tk="no"]
- )
- if test "${ac_cv_imap_tk}" = "yes"; then
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [#include <stdio.h>
- #include <imap/c-client.h>
- void mm_searched (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_exists (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_expunged (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_flags (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_notify (MAILSTREAM *stream,char *string,long errflg)
- {
- }
- void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
- {
- }
- void mm_log (char *string,long errflg)
- {
- }
- void mm_dlog (char *string)
- {
- }
- void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
- {
- }
- void mm_critical (MAILSTREAM *stream)
- {
- }
- void mm_nocritical (MAILSTREAM *stream)
- {
- }
- long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
- {
- }
- void mm_fatal (char *string)
- {
- }],
- [
- long check = mail_expunge_full(NULL, "", 0);
- ]
- )],
- [ac_cv_imap_tk2006="yes"],
- [ac_cv_imap_tk2006="no"]
- )
- else #looking in imap directory didn't work, try c-client
- imap_ldflags=""
- imap_libs="-lcrypto -lssl -lc-client"
- imap_include="-DUSE_SYSTEM_CCLIENT"
- CPPFLAGS="${saved_cppflags}"
- LIBS="${saved_libs}"
- CPPFLAGS="${CPPFLAGS} ${imap_include}"
- LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [#include <stdio.h>
- #include <c-client/c-client.h>
- void mm_searched (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_exists (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_expunged (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_flags (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_notify (MAILSTREAM *stream,char *string,long errflg)
- {
- }
- void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
- {
- }
- void mm_log (char *string,long errflg)
- {
- }
- void mm_dlog (char *string)
- {
- }
- void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
- {
- }
- void mm_critical (MAILSTREAM *stream)
- {
- }
- void mm_nocritical (MAILSTREAM *stream)
- {
- }
- long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
- {
- }
- void mm_fatal (char *string)
- {
- }],
- [
- MAILSTREAM *foo = mail_open(NULL, "", 0);
- ]
- )],
- [ac_cv_imap_tk="yes"],
- [ac_cv_imap_tk="no"]
- )
- if test "${ac_cv_imap_tk}" = "no"; then
- imap_libs="-lcrypto -lssl -lc-client4"
- LIBS="${saved_libs} ${imap_libs} "`echo ${imap_ldflags}`
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [#include <stdio.h>
- #include <c-client/c-client.h>
- void mm_searched (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_exists (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_expunged (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_flags (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_notify (MAILSTREAM *stream,char *string,long errflg)
- {
- }
- void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
- {
- }
- void mm_log (char *string,long errflg)
- {
- }
- void mm_dlog (char *string)
- {
- }
- void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
- {
- }
- void mm_critical (MAILSTREAM *stream)
- {
- }
- void mm_nocritical (MAILSTREAM *stream)
- {
- }
- long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
- {
- }
- void mm_fatal (char *string)
- {
- }],
- [
- MAILSTREAM *foo = mail_open(NULL, "", 0);
- ]
- )],
- [ac_cv_imap_tk="yes"],
- [ac_cv_imap_tk="no"]
- )
- fi
- if test "${ac_cv_imap_tk}" = "yes"; then
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [#include <stdio.h>
- #include <c-client/c-client.h>
- void mm_searched (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_exists (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_expunged (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_flags (MAILSTREAM *stream,unsigned long number)
- {
- }
- void mm_notify (MAILSTREAM *stream,char *string,long errflg)
- {
- }
- void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
- {
- }
- void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
- {
- }
- void mm_log (char *string,long errflg)
- {
- }
- void mm_dlog (char *string)
- {
- }
- void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
- {
- }
- void mm_critical (MAILSTREAM *stream)
- {
- }
- void mm_nocritical (MAILSTREAM *stream)
- {
- }
- long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
- {
- }
- void mm_fatal (char *string)
- {
- }],
- [
- long check = mail_expunge_full(NULL, "", 0);
- ]
- )],
- [ac_cv_imap_tk2006="yes"],
- [ac_cv_imap_tk2006="no"]
- )
- fi
- fi
- fi
- if test "${ac_cv_imap_tk}" = "yes"; then
- AC_MSG_RESULT(yes)
- IMAP_TK_LIB="${imap_libs} "`echo ${imap_ldflags}`
- IMAP_TK_INCLUDE="${imap_include}"
- PBX_IMAP_TK=1
- AC_DEFINE([HAVE_IMAP_TK], 1, [Define if your system has the UW IMAP Toolkit c-client library.])
- if test "${ac_cv_imap_tk2006}" = "yes"; then
- AC_DEFINE([HAVE_IMAP_TK2006], 1, [Define if your system has the UW IMAP Toolkit c-client library version 2006 or greater.])
- fi
- else
- AC_MSG_RESULT(no)
- fi
- CPPFLAGS="${saved_cppflags}"
- LIBS="${saved_libs}"
- fi
- AST_EXT_LIB_CHECK([IODBC], [iodbc], [SQLConnect], [sql.h], [${PTHREAD_LIBS}], [${PTHREAD_CFLAGS}])
- AST_EXT_LIB_CHECK([INOTIFY], [c], [inotify_init], [sys/inotify.h])
- AST_EXT_LIB_CHECK([JACK], [jack], [jack_activate], [jack/jack.h])
- # BSD (and OS X) equivalent of inotify
- AST_EXT_LIB_CHECK([KQUEUE], [c], [kqueue], [sys/event.h])
- # 64-bit version of kevent (from kqueue) on OS X
- AC_CHECK_FUNCS([kevent64])
- AST_EXT_LIB_CHECK([LDAP], [ldap], [ldap_initialize], [ldap.h])
- AST_EXT_LIB_CHECK([MISDN], [mISDN], [mISDN_open], [mISDNuser/mISDNlib.h])
- if test "${PBX_MISDN}" = 1; then
- AST_EXT_LIB_CHECK([ISDNNET], [isdnnet], [init_manager], [mISDNuser/isdn_net.h], [-lmISDN -lpthread])
- AST_EXT_LIB_CHECK([SUPPSERV], [suppserv], [encodeFac], [mISDNuser/suppserv.h])
- AST_C_DEFINE_CHECK([MISDN_FAC_RESULT], [Fac_RESULT], [mISDNuser/suppserv.h])
- AST_C_DEFINE_CHECK([MISDN_FAC_ERROR], [Fac_ERROR], [mISDNuser/suppserv.h])
- AC_CHECK_HEADER([linux/mISDNdsp.h], [AC_DEFINE_UNQUOTED([MISDN_1_2], 1, [Build chan_misdn for mISDN 1.2 or later.])])
- AC_CHECK_MEMBER([Q931_info_t.redirect_dn], [], [PBX_MISDN=0], [#include <mISDNuser/mISDNlib.h>])
- fi
- AST_EXT_TOOL_CHECK([MYSQLCLIENT], [mysql_config])
- AST_EXT_LIB_CHECK([NBS], [nbs], [nbs_connect], [nbs.h])
- AST_EXT_TOOL_CHECK([NEON], [neon-config])
- AST_EXT_TOOL_CHECK([NEON29], [neon-config], , [--libs],
- [#include <ne_auth.h>],
- [#ifndef NE_AUTH_NTLM
- #error Need libneon >= 0.29.0
- #endif])
- AST_EXT_TOOL_CHECK([NETSNMP], [net-snmp-config], , [--agent-libs],
- [#include <net-snmp/net-snmp-config.h>
- #include <net-snmp/net-snmp-includes.h>
- #include <net-snmp/agent/net-snmp-agent-includes.h>],
- [int callback = snmp_register_callback(0, 0, NULL, NULL)])
- AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h])
- AST_EXT_LIB_CHECK([UNIXODBC], [odbc], [SQLConnect], [sql.h])
- AST_EXT_LIB_CHECK([OGG], [ogg], [ogg_stream_init], [ogg/ogg.h])
- # Non-glibc platforms require libexecinfo for backtrace support
- AST_EXT_LIB_CHECK([BKTR], [execinfo], [backtrace], [execinfo.h])
- # Linux, however, has backtrace directly in glibc
- AST_EXT_LIB_CHECK([BKTR], [c], [backtrace], [execinfo.h])
- AST_EXT_LIB_CHECK([BLUETOOTH], [bluetooth], [ba2str], [bluetooth/bluetooth.h])
- # possible places for oss definitions
- AST_EXT_LIB_CHECK([OSS], [ossaudio], [], [linux/soundcard.h])
- AST_EXT_LIB_CHECK([OSS], [ossaudio], [], [sys/soundcard.h])
- AST_EXT_LIB_CHECK([OSS], [ossaudio], [oss_ioctl_mixer], [soundcard.h])
- PG_CONFIG=No
- if test "${USE_PGSQL}" != "no"; then
- if test "x${PGSQL_DIR}" != "x"; then
- AC_PATH_TOOL([PG_CONFIG], [pg_config], No, [${PGSQL_DIR}/bin])
- if test x"${PG_CONFIG}" = xNo; then
- AC_MSG_NOTICE([***])
- AC_MSG_NOTICE([*** pg_config was not found in the path you specified:])
- AC_MSG_NOTICE([*** ${PGSQL_DIR}/bin])
- AC_MSG_NOTICE([*** Either correct the installation, or run configure])
- AC_MSG_NOTICE([*** including --without-postgres])
- exit 1
- fi
- else
- AC_PATH_TOOL([PG_CONFIG], [pg_config], No)
- fi
- fi
- if test "${PG_CONFIG}" != No; then
- PGSQL_libdir=`${PG_CONFIG} --libdir`
- PGSQL_includedir=`${PG_CONFIG} --includedir`
- if test "x$?" != "x0" ; then
- if test -n "${PGSQL_MANDATORY}" ; then
- AC_MSG_NOTICE([***])
- AC_MSG_NOTICE([*** The PostgreSQL installation on this system appears to be broken.])
- AC_MSG_NOTICE([*** Either correct the installation, or run configure])
- AC_MSG_NOTICE([*** including --without-postgres])
- exit 1
- fi
- else
- AC_CHECK_LIB([pq], [PQescapeStringConn], AC_DEFINE_UNQUOTED([HAVE_PGSQL], 1,
- [Define to indicate the PostgreSQL library]), [], -L${PGSQL_libdir} -lz)
- AC_MSG_CHECKING(for pg_encoding_to_char within Postgres headers)
- old_CFLAGS=${CFLAGS}
- CFLAGS="${CFLAGS} -I${PGSQL_includedir} -Werror"
- old_LDFLAGS=${LDFLAGS}
- LDFLAGS="${LDFLAGS} -L${PGSQL_libdir} -lpq -lz"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <libpq-fe.h>],
- [const char *foo = pg_encoding_to_char(1)])],
- [AC_MSG_RESULT(yes)
- AC_DEFINE_UNQUOTED([HAVE_PGSQL_pg_encoding_to_char], 1, [Define to indicate presence of the pg_encoding_to_char API.])],
- [AC_MSG_RESULT(no)])
- CFLAGS=${old_CFLAGS}
- LDFLAGS=${old_LDFLAGS}
- if test "${ac_cv_lib_pq_PQescapeStringConn}" = "yes"; then
- PGSQL_LIB="-L${PGSQL_libdir} -lpq -lz"
- PGSQL_INCLUDE="-I${PGSQL_includedir}"
- PBX_PGSQL=1
- elif test -n "${PGSQL_MANDATORY}";
- then
- AC_MSG_NOTICE([***])
- AC_MSG_NOTICE([*** The PostgreSQL installation on this system appears to be broken.])
- AC_MSG_NOTICE([*** Either correct the installation, or run configure])
- AC_MSG_NOTICE([*** including --without-postgres])
- exit 1
- fi
- fi
- fi
- if test "$USE_PJPROJECT" != "no" ; then
- if test "$PJPROJECT_BUNDLED" = "no" ; then
- AST_PKG_CONFIG_CHECK([PJPROJECT], [libpjproject])
- AST_EXT_LIB_CHECK([PJSIP_DLG_CREATE_UAS_AND_INC_LOCK], [pjsip], [pjsip_dlg_create_uas_and_inc_lock], [pjsip.h], [$PJPROJECT_LIB], [$PJPROJECT_CFLAGS])
- AST_EXT_LIB_CHECK([PJ_TRANSACTION_GRP_LOCK], [pjsip], [pjsip_tsx_create_uac2], [pjsip.h], [$PJPROJECT_LIB], [$PJPROJECT_CFLAGS])
- saved_cppflags="${CPPFLAGS}"
- saved_libs="${LIBS}"
- CPPFLAGS="${CPPFLAGS} ${PJPROJECT_CFLAGS}"
- LIBS="${LIBS} ${PJPROJECT_LIB}"
- AST_C_COMPILE_CHECK([PJSIP_REPLACE_MEDIA_STREAM], [pjmedia_mod_offer_flag flag = PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE], [pjmedia.h])
- LIBS="${saved_libs}"
- CPPFLAGS="${saved_cppflags}"
- AST_EXT_LIB_CHECK([PJSIP_GET_DEST_INFO], [pjsip], [pjsip_get_dest_info], [pjsip.h], [$PJPROJECT_LIB], [$PJPROJECT_CFLAGS])
- AST_EXT_LIB_CHECK([PJ_SSL_CERT_LOAD_FROM_FILES2], [pj], [pj_ssl_cert_load_from_files2], [pjlib.h], [$PJPROJECT_LIB], [$PJPROJECT_CFLAGS])
- AST_EXT_LIB_CHECK([PJSIP_EXTERNAL_RESOLVER], [pjsip], [pjsip_endpt_set_ext_resolver], [pjsip.h], [$PJPROJECT_LIB], [$PJPROJECT_CFLAGS])
- saved_cppflags="${CPPFLAGS}"
- saved_libs="${LIBS}"
- CPPFLAGS="${CPPFLAGS} ${PJPROJECT_CFLAGS}"
- LIBS="${LIBS} ${PJPROJECT_LIB}"
- AST_C_COMPILE_CHECK([PJSIP_TLS_TRANSPORT_PROTO], [struct pjsip_tls_setting setting; int proto; proto = setting.proto;], [pjsip.h])
- AST_C_COMPILE_CHECK([PJSIP_INV_ACCEPT_MULTIPLE_SDP_ANSWERS], [pjsip_cfg()->endpt.accept_multiple_sdp_answers = 0;], [pjsip.h])
- AST_C_COMPILE_CHECK([PJSIP_ENDPOINT_COMPACT_FORM], [pjsip_cfg()->endpt.use_compact_form = PJ_TRUE;], [pjsip.h])
- LIBS="${saved_libs}"
- CPPFLAGS="${saved_cppflags}"
- AST_EXT_LIB_CHECK([PJSIP_EVSUB_GRP_LOCK], [pjsip], [pjsip_evsub_add_ref], [pjsip.h], [$PJPROJECT_LIB], [$PJPROJECT_CFLAGS])
- AST_EXT_LIB_CHECK([PJSIP_INV_SESSION_REF], [pjsip], [pjsip_inv_add_ref], [pjsip.h], [$PJPROJECT_LIB], [$PJPROJECT_CFLAGS])
- AST_EXT_LIB_CHECK([PJSIP_AUTH_CLT_DEINIT], [pjsip], [pjsip_auth_clt_deinit], [pjsip.h], [$PJPROJECT_LIB], [$PJPROJECT_CFLAGS])
- AST_EXT_LIB_CHECK([PJSIP_TSX_LAYER_FIND_TSX2], [pjsip], [pjsip_tsx_layer_find_tsx2], [pjsip.h], [$PJPROJECT_LIB], [$PJPROJECT_CFLAGS])
- fi
- fi
- AC_SUBST([PYTHONDEV_LIB])
- AC_SUBST([PYTHONDEV_INCLUDE])
- AST_PKG_CONFIG_CHECK([PYTHONDEV], [python])
- AST_EXT_LIB_CHECK([POPT], [popt], [poptStrerror], [popt.h])
- AST_PKG_CONFIG_CHECK([PORTAUDIO], [portaudio-2.0])
- AST_EXT_LIB_CHECK([PORTAUDIO], [portaudio], [Pa_GetDeviceCount], [portaudio.h])
- AST_EXT_LIB_CHECK([PRI], [pri], [pri_connected_line_update], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_SETUP_ACK_INBAND], [pri], [pri_setup_ack], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_L2_PERSISTENCE], [pri], [pri_persistent_layer2_option], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_DATETIME_SEND], [pri], [pri_date_time_send_option], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_MWI_V2], [pri], [pri_mwi_indicate_v2], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_DISPLAY_TEXT], [pri], [pri_display_text], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_MWI], [pri], [pri_mwi_indicate], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_MCID], [pri], [pri_mcid_enable], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_CALL_WAITING], [pri], [pri_connect_ack_enable], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_AOC_EVENTS], [pri], [pri_aoc_events_enable], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_TRANSFER], [pri], [pri_transfer_enable], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_CCSS], [pri], [pri_cc_enable], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_HANGUP_FIX], [pri], [pri_hangup_fix_enable], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_SUBADDR], [pri], [pri_sr_set_called_subaddress], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_CALL_HOLD], [pri], [pri_hold_enable], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_CALL_REROUTING], [pri], [pri_reroute_enable], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_SETUP_KEYPAD], [pri], [pri_sr_set_keypad_digits], [libpri.h])
- # ------------------------------------v
- # TODO: The code can be changed to always include these features now.
- # These features will always be present if pri_connected_line_update is available.
- AST_EXT_LIB_CHECK([PRI_PROG_W_CAUSE], [pri], [pri_progress_with_cause], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_INBANDDISCONNECT], [pri], [pri_set_inbanddisconnect], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_SERVICE_MESSAGES], [pri], [pri_maintenance_service], [libpri.h])
- AST_EXT_LIB_CHECK([PRI_REVERSE_CHARGE], [pri], [pri_sr_set_reversecharge], [libpri.h])
- # ------------------------------------^
- AST_EXT_LIB_CHECK([RESAMPLE], [resample], [resample_open], [libresample.h], [-lm])
- AST_C_COMPILE_CHECK([SPANDSP], [
- #if SPANDSP_RELEASE_DATE < 20080516
- #error "spandsp 0.0.5 or greater is required"
- #endif
- ], [spandsp/version.h], , [minimum version of SpanDSP])
- if test "x${PBX_SPANDSP}" = "x1" ; then
- # We found the correct version in the header, now let's make sure it links
- # properly, and that libtiff is available
- PBX_SPANDSP=0
- AST_EXT_LIB_CHECK([SPANDSP], [spandsp], [span_set_message_handler], [spandsp.h], [-ltiff])
- fi
- if test "x${PBX_SPANDSP}" = "x1" ; then
- # We also need t38_terminal_init()
- PBX_SPANDSP=0
- AST_EXT_LIB_CHECK([SPANDSP], [spandsp], [t38_terminal_init], [spandsp.h], [-ltiff])
- fi
- # Check for libss7 v2.0 branch compatible version.
- AST_EXT_LIB_CHECK([SS7], [ss7], [ss7_set_isup_timer], [libss7.h])
- AST_EXT_LIB_CHECK([OPENR2], [openr2], [openr2_chan_new], [openr2.h])
- AST_EXT_LIB_CHECK([OPUS], [opus], [opus_encoder_create], [opus/opus.h])
- # opusfile.h includes <opus_multistream.h> so we need to make sure that
- # either $OPUS_INCLUDE or /usr/include/opus is added to the search path.
- __opus_include=${OPUS_INCLUDE}
- if test -z "$__opus_include" -o x"$__opus_include" = x" " ; then
- __opus_include=-I/usr/include/opus
- fi
- AST_EXT_LIB_CHECK([OPUSFILE], [opusfile], [op_open_callbacks], [opus/opusfile.h], [], [$__opus_include])
- for ver in 5.3 5.2 5.1; do
- AST_EXT_LIB_CHECK([LUA], lua${ver}, [luaL_newstate], lua${ver}/lua.h, [-lm])
- if test "x${PBX_LUA}" = "x1" ; then
- if test x"${LUA_DIR}" = x; then
- LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua${ver}"
- else
- LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua${ver}"
- fi
- break;
- fi
- done
- # Some distributions (like openSUSE and NetBSD) remove the 5.x suffix.
- AST_EXT_LIB_CHECK([LUA], [lua], [luaL_newstate], [lua.h], [-lm])
- # Accept either RADIUS client library, their APIs are fully compatible,
- # just different header filenames and different SONAMEs
- AST_EXT_LIB_CHECK([RADIUS], [freeradius-client], [rc_read_config], [freeradius-client.h])
- if test "x${PBX_RADIUS}" = "x1"; then
- AC_DEFINE(RADIUS_HEADER_STR, [<freeradius-client.h>], [Name of RADIUS library include header])
- else
- AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h])
- if test "x${PBX_RADIUS}" = "x1"; then
- AC_DEFINE(RADIUS_HEADER_STR, [<radiusclient-ng.h>], [Name of RADIUS library include header])
- else
- AST_EXT_LIB_CHECK([RADIUS], [radcli], [rc_read_config], [radcli/radcli.h])
- if test "x${PBX_RADIUS}" = "x1"; then
- AC_DEFINE(RADIUS_HEADER_STR, [<radcli/radcli.h>], [Name of RADIUS library include header])
- fi
- fi
- fi
- AST_EXT_LIB_CHECK([COROSYNC], [cpg], [cpg_join], [corosync/cpg.h], [-lcpg -lcfg])
- AST_EXT_LIB_CHECK([COROSYNC_CFG_STATE_TRACK], [cfg], [corosync_cfg_state_track], [corosync/cfg.h], [-lcfg])
- AST_EXT_LIB_CHECK([SPEEX], [speex], [speex_encode], [speex/speex.h], [-lm])
- # See if the main speex library contains the preprocess functions
- AST_EXT_LIB_CHECK([SPEEX_PREPROCESS], [speex], [speex_preprocess_ctl], [speex/speex.h], [-lm])
- if test "${PBX_SPEEX_PREPROCESS}" = 1; then
- PBX_SPEEX_PREPROCESS=1
- fi
- AST_EXT_LIB_CHECK([SPEEXDSP], [speexdsp], [speex_preprocess_ctl], [speex/speex.h], [-lm])
- if test "${PBX_SPEEXDSP}" = 1; then
- PBX_SPEEX_PREPROCESS=1
- fi
- AC_SUBST(PBX_SPEEX_PREPROCESS)
- AST_EXT_LIB_CHECK([SQLITE], [sqlite], [sqlite_exec], [sqlite.h])
- AST_EXT_LIB_CHECK([SQLITE3], [sqlite3], [sqlite3_open], [sqlite3.h], [${PTHREAD_LIBS}], [${PTHREAD_CFLAGS}])
- if test "${PBX_SQLITE3}" != 1; then
- AC_MSG_ERROR(*** Asterisk now uses SQLite3 for the internal Asterisk database.)
- AC_MSG_ERROR(*** Please install the SQLite3 development package.)
- exit 1
- fi
- # Find crypt support
- # * -lcrypt on *NIX
- # * in libsystem on OS X
- AST_EXT_LIB_CHECK([LIBCRYPT], [crypt], [crypt], [crypt.h])
- AC_CHECK_FUNC([crypt], [SYSCRYPT=true], [SYSCRYPT=""])
- if test "x$LIBCRYPT_LIB" != "x" ; then
- CRYPT_LIB="$LIBCRYPT_LIB"
- CRYPT_INCLUDE="$LIBCRYPT_INCLUDE"
- AC_DEFINE([HAVE_CRYPT], [1], [Define to 1 if you have the 'crypt' function.])
- elif test "x$SYSCRYPT" != "x" ; then
- CRYPT_LIB=""
- CRYPT_INCLUDE=""
- AC_DEFINE([HAVE_CRYPT], [1], [Define to 1 if you have the 'crypt' function.])
- fi
- AC_SUBST(CRYPT_LIB)
- AC_SUBST(CRYPT_INCLUDE)
- # Find crypt_r support
- AC_CHECK_LIB([crypt], [crypt_r],
- [AC_DEFINE([HAVE_CRYPT_R], [1], [Define to 1 if you have the 'crypt_r' function.])])
- AST_EXT_LIB_CHECK([CRYPTO], [crypto], [AES_encrypt], [openssl/aes.h])
- if test "$PBX_CRYPTO" = "1";
- then
- AST_EXT_LIB_CHECK([OPENSSL], [ssl], [SSL_connect], [openssl/ssl.h], [-lcrypto])
- fi
- if test "$PBX_OPENSSL" = "1";
- then
- AST_CHECK_OSPTK([4], [0], [0])
- fi
- AST_EXT_LIB_CHECK([SRTP], [srtp2], [srtp_init], [srtp2/srtp.h], [], [], [2])
- AST_EXT_LIB_CHECK_SHARED([SRTP], [srtp2], [srtp_init], [srtp2/srtp.h], [], [], [], [
- AC_MSG_WARN([***])
- AC_MSG_WARN([*** libsrtp2 could not be linked as a shared object.])
- AC_MSG_WARN([*** Try compiling libsrtp2 manually. Configure libsrtp2])
- AC_MSG_WARN([*** with ./configure --prefix=/usr replacing /usr with])
- AC_MSG_WARN([*** the prefix of your choice, and then make with])
- AC_MSG_WARN([*** 'make libsrtp2.so'])
- AC_MSG_WARN([***])
- AC_MSG_WARN([*** After re-installing libsrtp2, re-run the Asterisk])
- AC_MSG_WARN([*** configure script.])
- AC_MSG_WARN([***])
- AC_MSG_WARN([*** If you do not need SRTP support re-run configure])
- AC_MSG_WARN([*** with the --without-srtp option.])
- exit 1
- ])
- if test "x$PBX_SRTP" = x1;
- then
- AST_EXT_LIB_CHECK([SRTP_SHUTDOWN], [srtp2], [srtp_shutdown], [srtp2/srtp.h])
- AST_EXT_LIB_CHECK([SRTP_GET_VERSION], [srtp2], [srtp_get_version_string], [srtp2/srtp.h])
- # libsrtp2 removed support for PRNG, so we require OpenSSL
- if test "x$PBX_OPENSSL" != x1;
- then
- AC_MSG_WARN([***])
- AC_MSG_WARN([*** OpenSSL required when using libsrtp2, checking for libsrtp instead.])
- AC_MSG_WARN([***])
- PBX_SRTP=0
- fi
- fi
- if test "x$PBX_SRTP" != x1;
- then
- AST_EXT_LIB_CHECK([SRTP], [srtp], [srtp_init], [srtp/srtp.h], [], [], [1])
- AST_EXT_LIB_CHECK_SHARED([SRTP], [srtp], [srtp_init], [srtp/srtp.h], [], [], [], [
- AC_MSG_WARN([***])
- AC_MSG_WARN([*** libsrtp could not be linked as a shared object.])
- AC_MSG_WARN([*** Try compiling libsrtp manually. Configure libsrtp])
- AC_MSG_WARN([*** with ./configure CFLAGS=-fPIC --prefix=/usr])
- AC_MSG_WARN([*** replacing /usr with the prefix of your choice.])
- AC_MSG_WARN([*** After re-installing libsrtp, re-run the Asterisk])
- AC_MSG_WARN([*** configure script.])
- AC_MSG_WARN([***])
- AC_MSG_WARN([*** If you do not need SRTP support re-run configure])
- AC_MSG_WARN([*** with the --without-srtp option.])
- exit 1
- ])
- if test "x$PBX_SRTP" = x1;
- then
- AST_EXT_LIB_CHECK([SRTP_SHUTDOWN], [srtp], [srtp_shutdown], [srtp/srtp.h])
- AST_EXT_LIB_CHECK([SRTP_GET_VERSION], [srtp], [srtp_get_version_string], [srtp/srtp.h])
- fi
- fi
- for ver in 2.0 2.2 2.4 2.6 3.0; do
- AST_PKG_CONFIG_CHECK([GMIME], gmime-$ver)
- if test "$PBX_GMIME" = 1; then
- break;
- fi
- done
- AST_EXT_LIB_CHECK([HOARD], [hoard], [malloc], [])
- AST_EXT_LIB_CHECK([FREETDS], [sybdb], [dbinit], [sybdb.h])
- AC_CHECK_LIB([tonezone], [tone_zone_find_by_num], tonezone_does_not_need_lm=yes, tonezone_does_not_need_lm=no)
- if test "${tonezone_does_not_need_lm}" = "no" ; then
- tonezone_extra="-lm"
- fi
- AST_EXT_LIB_CHECK([TONEZONE], [tonezone], [tone_zone_find], [dahdi/tonezone.h], [${tonezone_extra} ${DAHDI_INCLUDE}])
- AST_EXT_LIB_CHECK([VORBIS], [vorbis], [vorbis_info_init], [vorbis/codec.h], [-lm -lvorbisenc -lvorbisfile])
- AST_C_DECLARE_CHECK([VORBIS_OPEN_CALLBACKS], [OV_CALLBACKS_NOCLOSE], [vorbis/vorbisfile.h])
- AC_LANG_PUSH(C++)
- if test "${USE_VPB}" != "no"; then
- AC_MSG_CHECKING(for vpb_open in -lvpb)
- saved_libs="${LIBS}"
- saved_cppflags="${CPPFLAGS}"
- if test "x${VPB_DIR}" != "x"; then
- if test -d ${VPB_DIR}/lib; then
- vpblibdir=${VPB_DIR}/lib
- else
- vpblibdir=${VPB_DIR}
- fi
- LIBS="${LIBS} -L${vpblibdir}"
- CPPFLAGS="${CPPFLAGS} -I${VPB_DIR}/include"
- fi
- LIBS="${PTHREAD_LIBS} ${LIBS} -lvpb"
- CPPFLAGS="${CPPFLAGS} ${PTHREAD_CFLAGS}"
- AC_LINK_IFELSE(
- [
- AC_LANG_PROGRAM(
- [#include <vpbapi.h>],
- [int q = vpb_open(0,0);])
- ],
- [ AC_MSG_RESULT(yes)
- ac_cv_lib_vpb_vpb_open="yes"
- ],
- [ AC_MSG_RESULT(no)
- ac_cv_lib_vpb_vpb_open="no"
- ]
- )
- LIBS="${saved_libs}"
- CPPFLAGS="${saved_cppflags}"
- if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then
- VPB_LIB="-lvpb"
- if test "${VPB_DIR}" != ""; then
- VPB_LIB="-L${vpblibdir} ${VPB_LIB}"
- VPB_INCLUDE="-I${VPB_DIR}/include"
- fi
- PBX_VPB=1
- AC_DEFINE([HAVE_VPB], 1, [Define if your system has the VoiceTronix API libraries.])
- fi
- fi
- AC_LANG_POP
- AST_EXT_LIB_CHECK([ZLIB], [z], [compress], [zlib.h])
- if test "x${PBX_UNIXODBC}" = "x1" -o "x${PBX_IODBC}" = "x1"; then
- # Does ODBC support wide characters?
- AC_MSG_CHECKING(whether ODBC has support for Unicode types)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [#include <sql.h>
- #include <sqlext.h>],
- [int foo = SQL_WCHAR])],
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_ODBC_WCHAR], [1], [Define to 1 if your ODBC library has wide (Unicode) types.]),
- AC_MSG_RESULT(no)
- )
- fi
- AC_CHECK_HEADER([linux/compiler.h],
- [AC_DEFINE_UNQUOTED([HAVE_LINUX_COMPILER_H], 1, [Define to 1 if your system has linux/compiler.h.])])
- AC_CHECK_HEADER([linux/ixjuser.h], [PBX_IXJUSER=1], [PBX_IXJUSER=0], [
- #include <linux/version.h>
- #ifdef HAVE_LINUX_COMPILER_H
- #include <linux/compiler.h>
- #endif
- ])
- AC_SUBST(PBX_IXJUSER)
- # Used in res/res_pktccops
- AST_C_DEFINE_CHECK([MSG_NOSIGNAL], [MSG_NOSIGNAL], [sys/socket.h])
- AST_C_DEFINE_CHECK([SO_NOSIGPIPE], [SO_NOSIGPIPE], [sys/socket.h])
- AST_EXT_TOOL_CHECK([SDL], [sdl-config])
- AST_EXT_LIB_CHECK([SDL_IMAGE], [SDL_image], [IMG_Load], [SDL_image.h], [${SDL_LIB}], [${SDL_INCLUDE}])
- AST_EXT_LIB_CHECK([FFMPEG], [avcodec], [sws_getContext], [ffmpeg/avcodec.h], [${PTHREAD_LIBS} -lz -lm], [${PTHREAD_CFLAGS}])
- # possible places for video4linux version 1
- AC_CHECK_HEADER([linux/videodev.h],
- [AC_DEFINE_UNQUOTED([HAVE_VIDEODEV_H], 1, [Define to 1 if your system has linux/videodev.h.])])
- # possible places for X11
- AST_EXT_LIB_CHECK([X11], [X11], [XOpenDisplay], [X11/Xlib.h],,, [standard_path])
- AST_EXT_LIB_CHECK([X11], [X11], [XOpenDisplay], [X11/Xlib.h],, [-I/usr/X11R6/include], [X11R6])
- PBX_LAUNCHD=0
- if test "${cross_compiling}" = "no";
- then
- AC_CHECK_FILE(/sbin/launchd,
- [PBX_LAUNCHD=1]
- AC_DEFINE([HAVE_SBIN_LAUNCHD], 1, [Define to 1 if your system has /sbin/launchd.]))
- fi
- AC_SUBST(PBX_LAUNCHD)
- AST_PKG_CONFIG_CHECK([GTK2], [gtk+-2.0])
- # build a GENERIC_ODBC result based on the presence of either UnixODBC (preferred)
- # or iODBC
- PBX_GENERIC_ODBC=0
- if test "${PBX_UNIXODBC}" = 1; then
- PBX_GENERIC_ODBC=1
- GENERIC_ODBC_LIB="${UNIXODBC_LIB}"
- GENERIC_ODBC_INCLUDE="${UNIXODBC_INCLUDE}"
- elif test "${PBX_IODBC}" = 1; then
- PBX_GENERIC_ODBC=1
- GENERIC_ODBC_LIB="${IODBC_LIB}"
- GENERIC_ODBC_INCLUDE="${IODBC_INCLUDE}"
- fi
- AC_SUBST([GENERIC_ODBC_LIB])
- AC_SUBST([GENERIC_ODBC_INCLUDE])
- AC_SUBST([PBX_GENERIC_ODBC])
- AC_SUBST([PBX_SYSTEMD])
- AC_SUBST([SYSTEMD_LIB])
- AC_SUBST([SYSTEMD_INCLUDE])
- AST_PKG_CONFIG_CHECK([SYSTEMD], [libsystemd])
- PBX_SYSLOG=0
- if test "${ac_cv_header_syslog_h}" = "yes"; then
- # syslog facilities
- AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_AUTH], [LOG_AUTH], [syslog.h])
- AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_AUTHPRIV], [LOG_AUTHPRIV], [syslog.h])
- AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_CRON], [LOG_CRON], [syslog.h])
- AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_DAEMON], [LOG_DAEMON], [syslog.h])
- AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_FTP], [LOG_FTP], [syslog.h])
- AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_KERN], [LOG_KERN], [syslog.h])
- AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_LPR], [LOG_LPR], [syslog.h])
- AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_MAIL], [LOG_MAIL], [syslog.h])
- AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_NEWS], [LOG_NEWS], [syslog.h])
- AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_SYSLOG], [LOG_SYSLOG], [syslog.h])
- AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_UUCP], [LOG_UUCP], [syslog.h])
- PBX_SYSLOG=1
- fi
- AC_SUBST([PBX_SYSLOG])
- if test -f makeopts; then
- ${ac_cv_path_EGREP} 'CURSES|GTK2|OSARCH|NEWT' makeopts > makeopts.acbak
- else
- touch makeopts.acbak
- fi
- AC_CONFIG_FILES([build_tools/menuselect-deps makeopts])
- AST_CHECK_MANDATORY
- if test -f build_tools/menuselect-deps; then
- # extract old values of all PBX_ variables from menuselect-deps
- # and preserve them so that menuselect can determine whether
- # any previously-met dependencies are no longer met and warn
- # the user appropriately
- while IFS="=:" read var val old_val; do
- eval "PBX_${var}=\${PBX_${var}}:${val}"
- done < build_tools/menuselect-deps
- fi
- AC_OUTPUT
- ${ac_cv_path_EGREP} 'CURSES|GTK2|OSARCH|NEWT' makeopts > makeopts.acbak2
- if test "x${ac_cv_path_CMP}" = "x:"; then
- ( cd `pwd`/menuselect && ./configure )
- elif ${ac_cv_path_CMP} -s makeopts.acbak makeopts.acbak2; then : ; else
- ( cd `pwd`/menuselect && ./configure )
- fi
- rm makeopts.acbak makeopts.acbak2
- if test "x${silent}" != "xyes" ; then
- echo
- echo " .\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$=.. "
- echo " .\$7\$7.. .7\$\$7:. "
- echo " .\$\$:. ,\$7.7 "
- echo " .\$7. 7\$\$\$\$ .\$\$77 "
- echo " ..\$\$. \$\$\$\$\$ .\$\$\$7 "
- echo " ..7\$ .?. \$\$\$\$\$ .?. 7\$\$\$."
- echo " \$.\$. .\$\$\$7. \$\$\$\$7 .7\$\$\$. .\$\$\$."
- echo " .777. .\$\$\$\$\$\$77\$\$\$77\$\$\$\$\$7. \$\$\$,"
- echo " \$\$\$~ .7\$\$\$\$\$\$\$\$\$\$\$\$\$7. .\$\$\$."
- echo ".\$\$7 .7\$\$\$\$\$\$\$7: ?\$\$\$."
- echo "\$\$\$ ?7\$\$\$\$\$\$\$\$\$\$I .\$\$\$7 "
- echo "\$\$\$ .7\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$ :\$\$\$. "
- echo "\$\$\$ \$\$\$\$\$\$7\$\$\$\$\$\$\$\$\$\$\$\$ .\$\$\$. "
- echo "\$\$\$ \$\$\$ 7\$\$\$7 .\$\$\$ .\$\$\$. "
- echo "\$\$\$\$ \$\$\$\$7 .\$\$\$. "
- echo "7\$\$\$7 7\$\$\$\$ 7\$\$\$ "
- echo " \$\$\$\$\$ \$\$\$ "
- echo " \$\$\$\$7. \$\$ (TM) "
- echo " \$\$\$\$\$\$\$. .7\$\$\$\$\$\$ \$\$ "
- echo " \$\$\$\$\$\$\$\$\$\$\$\$7\$\$\$\$\$\$\$\$\$.\$\$\$\$\$\$ "
- echo " \$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$. "
- echo
- fi
- if test "x${AST_IODBC_FOUND}" = "xyes"; then
- echo "WARNING: iodbc libs/headers found!"
- echo
- echo " If you plan to use ODBC functionality, you should consider"
- echo " switching to unixodbc instead."
- echo " See: https://issues.asterisk.org/jira/browse/ASTERISK-22459"
- echo
- fi
- AC_MSG_NOTICE(Package configured for: )
- AC_MSG_NOTICE( OS type : $host_os)
- AC_MSG_NOTICE( Host CPU : $host_cpu)
- AC_MSG_NOTICE( build-cpu:vendor:os: $build_cpu : $build_vendor : $build_os :)
- AC_MSG_NOTICE( host-cpu:vendor:os: $host_cpu : $host_vendor : $host_os :)
- if test "${cross_compiling}" = "yes"; then
- AC_MSG_NOTICE( Cross Compilation = YES)
- fi
|