configure 893 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089
  1. #! /bin/sh
  2. # From configure.ac Revision: 430709 .
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated by GNU Autoconf 2.69 for asterisk trunk.
  5. #
  6. # Report bugs to <https://issues.asterisk.org>.
  7. #
  8. #
  9. # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
  10. #
  11. #
  12. # This configure script is free software; the Free Software Foundation
  13. # gives unlimited permission to copy, distribute and modify it.
  14. #
  15. # "Asterisk"
  16. ## -------------------- ##
  17. ## M4sh Initialization. ##
  18. ## -------------------- ##
  19. # Be more Bourne compatible
  20. DUALCASE=1; export DUALCASE # for MKS sh
  21. if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  22. emulate sh
  23. NULLCMD=:
  24. # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  25. # is contrary to our usage. Disable this feature.
  26. alias -g '${1+"$@"}'='"$@"'
  27. setopt NO_GLOB_SUBST
  28. else
  29. case `(set -o) 2>/dev/null` in #(
  30. *posix*) :
  31. set -o posix ;; #(
  32. *) :
  33. ;;
  34. esac
  35. fi
  36. as_nl='
  37. '
  38. export as_nl
  39. # Printing a long string crashes Solaris 7 /usr/bin/printf.
  40. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  41. as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  42. as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  43. # Prefer a ksh shell builtin over an external printf program on Solaris,
  44. # but without wasting forks for bash or zsh.
  45. if test -z "$BASH_VERSION$ZSH_VERSION" \
  46. && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  47. as_echo='print -r --'
  48. as_echo_n='print -rn --'
  49. elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  50. as_echo='printf %s\n'
  51. as_echo_n='printf %s'
  52. else
  53. if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  54. as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  55. as_echo_n='/usr/ucb/echo -n'
  56. else
  57. as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  58. as_echo_n_body='eval
  59. arg=$1;
  60. case $arg in #(
  61. *"$as_nl"*)
  62. expr "X$arg" : "X\\(.*\\)$as_nl";
  63. arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  64. esac;
  65. expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  66. '
  67. export as_echo_n_body
  68. as_echo_n='sh -c $as_echo_n_body as_echo'
  69. fi
  70. export as_echo_body
  71. as_echo='sh -c $as_echo_body as_echo'
  72. fi
  73. # The user is always right.
  74. if test "${PATH_SEPARATOR+set}" != set; then
  75. PATH_SEPARATOR=:
  76. (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  77. (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  78. PATH_SEPARATOR=';'
  79. }
  80. fi
  81. # IFS
  82. # We need space, tab and new line, in precisely that order. Quoting is
  83. # there to prevent editors from complaining about space-tab.
  84. # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  85. # splitting by setting IFS to empty value.)
  86. IFS=" "" $as_nl"
  87. # Find who we are. Look in the path if we contain no directory separator.
  88. as_myself=
  89. case $0 in #((
  90. *[\\/]* ) as_myself=$0 ;;
  91. *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  92. for as_dir in $PATH
  93. do
  94. IFS=$as_save_IFS
  95. test -z "$as_dir" && as_dir=.
  96. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
  97. done
  98. IFS=$as_save_IFS
  99. ;;
  100. esac
  101. # We did not find ourselves, most probably we were run as `sh COMMAND'
  102. # in which case we are not to be found in the path.
  103. if test "x$as_myself" = x; then
  104. as_myself=$0
  105. fi
  106. if test ! -f "$as_myself"; then
  107. $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  108. exit 1
  109. fi
  110. # Unset variables that we do not need and which cause bugs (e.g. in
  111. # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
  112. # suppresses any "Segmentation fault" message there. '((' could
  113. # trigger a bug in pdksh 5.2.14.
  114. for as_var in BASH_ENV ENV MAIL MAILPATH
  115. do eval test x\${$as_var+set} = xset \
  116. && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
  117. done
  118. PS1='$ '
  119. PS2='> '
  120. PS4='+ '
  121. # NLS nuisances.
  122. LC_ALL=C
  123. export LC_ALL
  124. LANGUAGE=C
  125. export LANGUAGE
  126. # CDPATH.
  127. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  128. # Use a proper internal environment variable to ensure we don't fall
  129. # into an infinite loop, continuously re-executing ourselves.
  130. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
  131. _as_can_reexec=no; export _as_can_reexec;
  132. # We cannot yet assume a decent shell, so we have to provide a
  133. # neutralization value for shells without unset; and this also
  134. # works around shells that cannot unset nonexistent variables.
  135. # Preserve -v and -x to the replacement shell.
  136. BASH_ENV=/dev/null
  137. ENV=/dev/null
  138. (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
  139. case $- in # ((((
  140. *v*x* | *x*v* ) as_opts=-vx ;;
  141. *v* ) as_opts=-v ;;
  142. *x* ) as_opts=-x ;;
  143. * ) as_opts= ;;
  144. esac
  145. exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
  146. # Admittedly, this is quite paranoid, since all the known shells bail
  147. # out after a failed `exec'.
  148. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
  149. as_fn_exit 255
  150. fi
  151. # We don't want this to propagate to other subprocesses.
  152. { _as_can_reexec=; unset _as_can_reexec;}
  153. if test "x$CONFIG_SHELL" = x; then
  154. as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
  155. emulate sh
  156. NULLCMD=:
  157. # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
  158. # is contrary to our usage. Disable this feature.
  159. alias -g '\${1+\"\$@\"}'='\"\$@\"'
  160. setopt NO_GLOB_SUBST
  161. else
  162. case \`(set -o) 2>/dev/null\` in #(
  163. *posix*) :
  164. set -o posix ;; #(
  165. *) :
  166. ;;
  167. esac
  168. fi
  169. "
  170. as_required="as_fn_return () { (exit \$1); }
  171. as_fn_success () { as_fn_return 0; }
  172. as_fn_failure () { as_fn_return 1; }
  173. as_fn_ret_success () { return 0; }
  174. as_fn_ret_failure () { return 1; }
  175. exitcode=0
  176. as_fn_success || { exitcode=1; echo as_fn_success failed.; }
  177. as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
  178. as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
  179. as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
  180. if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
  181. else
  182. exitcode=1; echo positional parameters were not saved.
  183. fi
  184. test x\$exitcode = x0 || exit 1
  185. test -x / || exit 1"
  186. as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
  187. as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
  188. eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
  189. test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
  190. test \$(( 1 + 1 )) = 2 || exit 1"
  191. if (eval "$as_required") 2>/dev/null; then :
  192. as_have_required=yes
  193. else
  194. as_have_required=no
  195. fi
  196. if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
  197. else
  198. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  199. as_found=false
  200. for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
  201. do
  202. IFS=$as_save_IFS
  203. test -z "$as_dir" && as_dir=.
  204. as_found=:
  205. case $as_dir in #(
  206. /*)
  207. for as_base in sh bash ksh sh5; do
  208. # Try only shells that exist, to save several forks.
  209. as_shell=$as_dir/$as_base
  210. if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
  211. { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
  212. CONFIG_SHELL=$as_shell as_have_required=yes
  213. if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
  214. break 2
  215. fi
  216. fi
  217. done;;
  218. esac
  219. as_found=false
  220. done
  221. $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
  222. { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
  223. CONFIG_SHELL=$SHELL as_have_required=yes
  224. fi; }
  225. IFS=$as_save_IFS
  226. if test "x$CONFIG_SHELL" != x; then :
  227. export CONFIG_SHELL
  228. # We cannot yet assume a decent shell, so we have to provide a
  229. # neutralization value for shells without unset; and this also
  230. # works around shells that cannot unset nonexistent variables.
  231. # Preserve -v and -x to the replacement shell.
  232. BASH_ENV=/dev/null
  233. ENV=/dev/null
  234. (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
  235. case $- in # ((((
  236. *v*x* | *x*v* ) as_opts=-vx ;;
  237. *v* ) as_opts=-v ;;
  238. *x* ) as_opts=-x ;;
  239. * ) as_opts= ;;
  240. esac
  241. exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
  242. # Admittedly, this is quite paranoid, since all the known shells bail
  243. # out after a failed `exec'.
  244. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
  245. exit 255
  246. fi
  247. if test x$as_have_required = xno; then :
  248. $as_echo "$0: This script requires a shell more modern than all"
  249. $as_echo "$0: the shells that I found on your system."
  250. if test x${ZSH_VERSION+set} = xset ; then
  251. $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
  252. $as_echo "$0: be upgraded to zsh 4.3.4 or later."
  253. else
  254. $as_echo "$0: Please tell bug-autoconf@gnu.org and
  255. $0: https://issues.asterisk.org about your system,
  256. $0: including any error possibly output before this
  257. $0: message. Then install a modern shell, or manually run
  258. $0: the script under such a shell if you do have one."
  259. fi
  260. exit 1
  261. fi
  262. fi
  263. fi
  264. SHELL=${CONFIG_SHELL-/bin/sh}
  265. export SHELL
  266. # Unset more variables known to interfere with behavior of common tools.
  267. CLICOLOR_FORCE= GREP_OPTIONS=
  268. unset CLICOLOR_FORCE GREP_OPTIONS
  269. ## --------------------- ##
  270. ## M4sh Shell Functions. ##
  271. ## --------------------- ##
  272. # as_fn_unset VAR
  273. # ---------------
  274. # Portably unset VAR.
  275. as_fn_unset ()
  276. {
  277. { eval $1=; unset $1;}
  278. }
  279. as_unset=as_fn_unset
  280. # as_fn_set_status STATUS
  281. # -----------------------
  282. # Set $? to STATUS, without forking.
  283. as_fn_set_status ()
  284. {
  285. return $1
  286. } # as_fn_set_status
  287. # as_fn_exit STATUS
  288. # -----------------
  289. # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
  290. as_fn_exit ()
  291. {
  292. set +e
  293. as_fn_set_status $1
  294. exit $1
  295. } # as_fn_exit
  296. # as_fn_mkdir_p
  297. # -------------
  298. # Create "$as_dir" as a directory, including parents if necessary.
  299. as_fn_mkdir_p ()
  300. {
  301. case $as_dir in #(
  302. -*) as_dir=./$as_dir;;
  303. esac
  304. test -d "$as_dir" || eval $as_mkdir_p || {
  305. as_dirs=
  306. while :; do
  307. case $as_dir in #(
  308. *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
  309. *) as_qdir=$as_dir;;
  310. esac
  311. as_dirs="'$as_qdir' $as_dirs"
  312. as_dir=`$as_dirname -- "$as_dir" ||
  313. $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  314. X"$as_dir" : 'X\(//\)[^/]' \| \
  315. X"$as_dir" : 'X\(//\)$' \| \
  316. X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
  317. $as_echo X"$as_dir" |
  318. sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
  319. s//\1/
  320. q
  321. }
  322. /^X\(\/\/\)[^/].*/{
  323. s//\1/
  324. q
  325. }
  326. /^X\(\/\/\)$/{
  327. s//\1/
  328. q
  329. }
  330. /^X\(\/\).*/{
  331. s//\1/
  332. q
  333. }
  334. s/.*/./; q'`
  335. test -d "$as_dir" && break
  336. done
  337. test -z "$as_dirs" || eval "mkdir $as_dirs"
  338. } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
  339. } # as_fn_mkdir_p
  340. # as_fn_executable_p FILE
  341. # -----------------------
  342. # Test if FILE is an executable regular file.
  343. as_fn_executable_p ()
  344. {
  345. test -f "$1" && test -x "$1"
  346. } # as_fn_executable_p
  347. # as_fn_append VAR VALUE
  348. # ----------------------
  349. # Append the text in VALUE to the end of the definition contained in VAR. Take
  350. # advantage of any shell optimizations that allow amortized linear growth over
  351. # repeated appends, instead of the typical quadratic growth present in naive
  352. # implementations.
  353. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
  354. eval 'as_fn_append ()
  355. {
  356. eval $1+=\$2
  357. }'
  358. else
  359. as_fn_append ()
  360. {
  361. eval $1=\$$1\$2
  362. }
  363. fi # as_fn_append
  364. # as_fn_arith ARG...
  365. # ------------------
  366. # Perform arithmetic evaluation on the ARGs, and store the result in the
  367. # global $as_val. Take advantage of shells that can avoid forks. The arguments
  368. # must be portable across $(()) and expr.
  369. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
  370. eval 'as_fn_arith ()
  371. {
  372. as_val=$(( $* ))
  373. }'
  374. else
  375. as_fn_arith ()
  376. {
  377. as_val=`expr "$@" || test $? -eq 1`
  378. }
  379. fi # as_fn_arith
  380. # as_fn_error STATUS ERROR [LINENO LOG_FD]
  381. # ----------------------------------------
  382. # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
  383. # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
  384. # script with STATUS, using 1 if that was 0.
  385. as_fn_error ()
  386. {
  387. as_status=$1; test $as_status -eq 0 && as_status=1
  388. if test "$4"; then
  389. as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  390. $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  391. fi
  392. $as_echo "$as_me: error: $2" >&2
  393. as_fn_exit $as_status
  394. } # as_fn_error
  395. if expr a : '\(a\)' >/dev/null 2>&1 &&
  396. test "X`expr 00001 : '.*\(...\)'`" = X001; then
  397. as_expr=expr
  398. else
  399. as_expr=false
  400. fi
  401. if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  402. as_basename=basename
  403. else
  404. as_basename=false
  405. fi
  406. if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  407. as_dirname=dirname
  408. else
  409. as_dirname=false
  410. fi
  411. as_me=`$as_basename -- "$0" ||
  412. $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
  413. X"$0" : 'X\(//\)$' \| \
  414. X"$0" : 'X\(/\)' \| . 2>/dev/null ||
  415. $as_echo X/"$0" |
  416. sed '/^.*\/\([^/][^/]*\)\/*$/{
  417. s//\1/
  418. q
  419. }
  420. /^X\/\(\/\/\)$/{
  421. s//\1/
  422. q
  423. }
  424. /^X\/\(\/\).*/{
  425. s//\1/
  426. q
  427. }
  428. s/.*/./; q'`
  429. # Avoid depending upon Character Ranges.
  430. as_cr_letters='abcdefghijklmnopqrstuvwxyz'
  431. as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  432. as_cr_Letters=$as_cr_letters$as_cr_LETTERS
  433. as_cr_digits='0123456789'
  434. as_cr_alnum=$as_cr_Letters$as_cr_digits
  435. as_lineno_1=$LINENO as_lineno_1a=$LINENO
  436. as_lineno_2=$LINENO as_lineno_2a=$LINENO
  437. eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
  438. test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
  439. # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
  440. sed -n '
  441. p
  442. /[$]LINENO/=
  443. ' <$as_myself |
  444. sed '
  445. s/[$]LINENO.*/&-/
  446. t lineno
  447. b
  448. :lineno
  449. N
  450. :loop
  451. s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
  452. t loop
  453. s/-\n.*//
  454. ' >$as_me.lineno &&
  455. chmod +x "$as_me.lineno" ||
  456. { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
  457. # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
  458. # already done that, so ensure we don't try to do so again and fall
  459. # in an infinite loop. This has already happened in practice.
  460. _as_can_reexec=no; export _as_can_reexec
  461. # Don't try to exec as it changes $[0], causing all sort of problems
  462. # (the dirname of $[0] is not the place where we might find the
  463. # original and so on. Autoconf is especially sensitive to this).
  464. . "./$as_me.lineno"
  465. # Exit status is that of the last command.
  466. exit
  467. }
  468. ECHO_C= ECHO_N= ECHO_T=
  469. case `echo -n x` in #(((((
  470. -n*)
  471. case `echo 'xy\c'` in
  472. *c*) ECHO_T=' ';; # ECHO_T is single tab character.
  473. xy) ECHO_C='\c';;
  474. *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
  475. ECHO_T=' ';;
  476. esac;;
  477. *)
  478. ECHO_N='-n';;
  479. esac
  480. rm -f conf$$ conf$$.exe conf$$.file
  481. if test -d conf$$.dir; then
  482. rm -f conf$$.dir/conf$$.file
  483. else
  484. rm -f conf$$.dir
  485. mkdir conf$$.dir 2>/dev/null
  486. fi
  487. if (echo >conf$$.file) 2>/dev/null; then
  488. if ln -s conf$$.file conf$$ 2>/dev/null; then
  489. as_ln_s='ln -s'
  490. # ... but there are two gotchas:
  491. # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
  492. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
  493. # In both cases, we have to default to `cp -pR'.
  494. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
  495. as_ln_s='cp -pR'
  496. elif ln conf$$.file conf$$ 2>/dev/null; then
  497. as_ln_s=ln
  498. else
  499. as_ln_s='cp -pR'
  500. fi
  501. else
  502. as_ln_s='cp -pR'
  503. fi
  504. rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
  505. rmdir conf$$.dir 2>/dev/null
  506. if mkdir -p . 2>/dev/null; then
  507. as_mkdir_p='mkdir -p "$as_dir"'
  508. else
  509. test -d ./-p && rmdir ./-p
  510. as_mkdir_p=false
  511. fi
  512. as_test_x='test -x'
  513. as_executable_p=as_fn_executable_p
  514. # Sed expression to map a string onto a valid CPP name.
  515. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
  516. # Sed expression to map a string onto a valid variable name.
  517. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
  518. test -n "$DJDIR" || exec 7<&0 </dev/null
  519. exec 6>&1
  520. # Name of the host.
  521. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
  522. # so uname gets run too.
  523. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
  524. #
  525. # Initializations.
  526. #
  527. ac_default_prefix=/usr/local
  528. ac_clean_files=
  529. ac_config_libobj_dir=.
  530. LIBOBJS=
  531. cross_compiling=no
  532. subdirs=
  533. MFLAGS=
  534. MAKEFLAGS=
  535. # Identity of this package.
  536. PACKAGE_NAME='asterisk'
  537. PACKAGE_TARNAME='asterisk'
  538. PACKAGE_VERSION='trunk'
  539. PACKAGE_STRING='asterisk trunk'
  540. PACKAGE_BUGREPORT='https://issues.asterisk.org'
  541. PACKAGE_URL=''
  542. ac_unique_file="main/asterisk.c"
  543. # Factoring default headers for most tests.
  544. ac_includes_default="\
  545. #include <stdio.h>
  546. #ifdef HAVE_SYS_TYPES_H
  547. # include <sys/types.h>
  548. #endif
  549. #ifdef HAVE_SYS_STAT_H
  550. # include <sys/stat.h>
  551. #endif
  552. #ifdef STDC_HEADERS
  553. # include <stdlib.h>
  554. # include <stddef.h>
  555. #else
  556. # ifdef HAVE_STDLIB_H
  557. # include <stdlib.h>
  558. # endif
  559. #endif
  560. #ifdef HAVE_STRING_H
  561. # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
  562. # include <memory.h>
  563. # endif
  564. # include <string.h>
  565. #endif
  566. #ifdef HAVE_STRINGS_H
  567. # include <strings.h>
  568. #endif
  569. #ifdef HAVE_INTTYPES_H
  570. # include <inttypes.h>
  571. #endif
  572. #ifdef HAVE_STDINT_H
  573. # include <stdint.h>
  574. #endif
  575. #ifdef HAVE_UNISTD_H
  576. # include <unistd.h>
  577. #endif"
  578. ac_header_list=
  579. ac_subst_vars='LTLIBOBJS
  580. PBX_SYSLOG
  581. PBX_SYSLOG_FACILITY_LOG_UUCP
  582. PBX_SYSLOG_FACILITY_LOG_SYSLOG
  583. PBX_SYSLOG_FACILITY_LOG_NEWS
  584. PBX_SYSLOG_FACILITY_LOG_MAIL
  585. PBX_SYSLOG_FACILITY_LOG_LPR
  586. PBX_SYSLOG_FACILITY_LOG_KERN
  587. PBX_SYSLOG_FACILITY_LOG_FTP
  588. PBX_SYSLOG_FACILITY_LOG_DAEMON
  589. PBX_SYSLOG_FACILITY_LOG_CRON
  590. PBX_SYSLOG_FACILITY_LOG_AUTHPRIV
  591. PBX_SYSLOG_FACILITY_LOG_AUTH
  592. PBX_GENERIC_ODBC
  593. GENERIC_ODBC_INCLUDE
  594. GENERIC_ODBC_LIB
  595. GTK2_LIBS
  596. GTK2_CFLAGS
  597. PBX_LAUNCHD
  598. CONFIG_SDL
  599. PBX_SO_NOSIGPIPE
  600. PBX_MSG_NOSIGNAL
  601. PBX_IXJUSER
  602. GMIME_LIBS
  603. GMIME_CFLAGS
  604. OPENH323_BUILD
  605. OPENH323_SUFFIX
  606. OPENH323_LIBDIR
  607. OPENH323_INCDIR
  608. OPENH323DIR
  609. PWLIB_PLATFORM
  610. PWLIB_LIBDIR
  611. PWLIB_INCDIR
  612. PWLIBDIR
  613. PTLIB_CONFIG
  614. PJPROJECT_LIBS
  615. PJPROJECT_CFLAGS
  616. PG_CONFIG
  617. CONFIG_NETSNMP
  618. CONFIG_NEON29
  619. CONFIG_NEON
  620. CONFIG_MYSQLCLIENT
  621. PBX_MISDN_FAC_ERROR
  622. PBX_MISDN_FAC_RESULT
  623. LIBEDIT_LIBS
  624. LIBEDIT_CFLAGS
  625. LIBEDIT_INTERNAL
  626. ILBC_LIBS
  627. ILBC_CFLAGS
  628. ILBC_INTERNAL
  629. GSM_INTERNAL
  630. PBX_DAHDI_HALF_FULL
  631. PKG_CONFIG_LIBDIR
  632. PKG_CONFIG_PATH
  633. PKG_CONFIG
  634. PBX_DLADDR
  635. PBX_IP_MTU_DISCOVER
  636. PBX_RTLD_NOLOAD
  637. PBX_GLOB_BRACE
  638. PBX_GLOB_NOMAGIC
  639. AST_RPATH
  640. AST_NESTED_FUNCTIONS
  641. AST_NATIVE_ARCH
  642. AST_SHADOW_WARNINGS
  643. AST_NO_STRICT_OVERFLOW
  644. AST_FORTIFY_SOURCE
  645. AST_TRAMPOLINES
  646. AST_DECLARATION_AFTER_STATEMENT
  647. GC_LDFLAGS
  648. GC_CFLAGS
  649. PBX_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
  650. PBX_PTHREAD_RWLOCK_INITIALIZER
  651. AST_ASTERISKSSL
  652. HAS_POLL
  653. PBX_DYNAMIC_LIST
  654. POW_LIB
  655. PBX_WORKING_FORK
  656. LIBOBJS
  657. CONFIG_LIBXML2
  658. UUID_LIB
  659. UUID_INCLUDE
  660. EDITLINE_LIB
  661. ALLOCA
  662. PBX_ZLIB
  663. ZLIB_DIR
  664. ZLIB_INCLUDE
  665. ZLIB_LIB
  666. PBX_X11
  667. X11_DIR
  668. X11_INCLUDE
  669. X11_LIB
  670. PBX_VPB
  671. VPB_DIR
  672. VPB_INCLUDE
  673. VPB_LIB
  674. PBX_VORBIS
  675. VORBIS_DIR
  676. VORBIS_INCLUDE
  677. VORBIS_LIB
  678. PBX_UNIXODBC
  679. UNIXODBC_DIR
  680. UNIXODBC_INCLUDE
  681. UNIXODBC_LIB
  682. PBX_TONEZONE
  683. TONEZONE_DIR
  684. TONEZONE_INCLUDE
  685. TONEZONE_LIB
  686. PBX_TINFO
  687. TINFO_DIR
  688. TINFO_INCLUDE
  689. TINFO_LIB
  690. PBX_TIMERFD
  691. TIMERFD_DIR
  692. TIMERFD_INCLUDE
  693. TIMERFD_LIB
  694. PBX_TERMCAP
  695. TERMCAP_DIR
  696. TERMCAP_INCLUDE
  697. TERMCAP_LIB
  698. PBX_FREETDS
  699. FREETDS_DIR
  700. FREETDS_INCLUDE
  701. FREETDS_LIB
  702. PBX_SUPPSERV
  703. SUPPSERV_DIR
  704. SUPPSERV_INCLUDE
  705. SUPPSERV_LIB
  706. PBX_OPENSSL
  707. OPENSSL_DIR
  708. OPENSSL_INCLUDE
  709. OPENSSL_LIB
  710. PBX_SRTP_SHUTDOWN
  711. SRTP_SHUTDOWN_DIR
  712. SRTP_SHUTDOWN_INCLUDE
  713. SRTP_SHUTDOWN_LIB
  714. PBX_SRTP
  715. SRTP_DIR
  716. SRTP_INCLUDE
  717. SRTP_LIB
  718. PBX_SQLITE3
  719. SQLITE3_DIR
  720. SQLITE3_INCLUDE
  721. SQLITE3_LIB
  722. PBX_SQLITE
  723. SQLITE_DIR
  724. SQLITE_INCLUDE
  725. SQLITE_LIB
  726. PBX_SPEEXDSP
  727. SPEEXDSP_DIR
  728. SPEEXDSP_INCLUDE
  729. SPEEXDSP_LIB
  730. PBX_SPEEX_PREPROCESS
  731. SPEEX_PREPROCESS_DIR
  732. SPEEX_PREPROCESS_INCLUDE
  733. SPEEX_PREPROCESS_LIB
  734. PBX_SPEEX
  735. SPEEX_DIR
  736. SPEEX_INCLUDE
  737. SPEEX_LIB
  738. PBX_SS7
  739. SS7_DIR
  740. SS7_INCLUDE
  741. SS7_LIB
  742. PBX_SPANDSP
  743. SPANDSP_DIR
  744. SPANDSP_INCLUDE
  745. SPANDSP_LIB
  746. SOUNDS_CACHE_DIR
  747. PBX_SDL_IMAGE
  748. SDL_IMAGE_DIR
  749. SDL_IMAGE_INCLUDE
  750. SDL_IMAGE_LIB
  751. PBX_SDL
  752. SDL_DIR
  753. SDL_INCLUDE
  754. SDL_LIB
  755. PBX_RESAMPLE
  756. RESAMPLE_DIR
  757. RESAMPLE_INCLUDE
  758. RESAMPLE_LIB
  759. PBX_RADIUS
  760. RADIUS_DIR
  761. RADIUS_INCLUDE
  762. RADIUS_LIB
  763. PBX_PWLIB
  764. PWLIB_DIR
  765. PWLIB_INCLUDE
  766. PWLIB_LIB
  767. PBX_PRI_REVERSE_CHARGE
  768. PRI_REVERSE_CHARGE_DIR
  769. PRI_REVERSE_CHARGE_INCLUDE
  770. PRI_REVERSE_CHARGE_LIB
  771. PBX_PRI_SERVICE_MESSAGES
  772. PRI_SERVICE_MESSAGES_DIR
  773. PRI_SERVICE_MESSAGES_INCLUDE
  774. PRI_SERVICE_MESSAGES_LIB
  775. PBX_PRI_PROG_W_CAUSE
  776. PRI_PROG_W_CAUSE_DIR
  777. PRI_PROG_W_CAUSE_INCLUDE
  778. PRI_PROG_W_CAUSE_LIB
  779. PBX_PRI_INBANDDISCONNECT
  780. PRI_INBANDDISCONNECT_DIR
  781. PRI_INBANDDISCONNECT_INCLUDE
  782. PRI_INBANDDISCONNECT_LIB
  783. PBX_PRI_SETUP_KEYPAD
  784. PRI_SETUP_KEYPAD_DIR
  785. PRI_SETUP_KEYPAD_INCLUDE
  786. PRI_SETUP_KEYPAD_LIB
  787. PBX_PRI_CALL_REROUTING
  788. PRI_CALL_REROUTING_DIR
  789. PRI_CALL_REROUTING_INCLUDE
  790. PRI_CALL_REROUTING_LIB
  791. PBX_PRI_CALL_HOLD
  792. PRI_CALL_HOLD_DIR
  793. PRI_CALL_HOLD_INCLUDE
  794. PRI_CALL_HOLD_LIB
  795. PBX_PRI_SUBADDR
  796. PRI_SUBADDR_DIR
  797. PRI_SUBADDR_INCLUDE
  798. PRI_SUBADDR_LIB
  799. PBX_PRI_HANGUP_FIX
  800. PRI_HANGUP_FIX_DIR
  801. PRI_HANGUP_FIX_INCLUDE
  802. PRI_HANGUP_FIX_LIB
  803. PBX_PRI_CCSS
  804. PRI_CCSS_DIR
  805. PRI_CCSS_INCLUDE
  806. PRI_CCSS_LIB
  807. PBX_PRI_TRANSFER
  808. PRI_TRANSFER_DIR
  809. PRI_TRANSFER_INCLUDE
  810. PRI_TRANSFER_LIB
  811. PBX_PRI_AOC_EVENTS
  812. PRI_AOC_EVENTS_DIR
  813. PRI_AOC_EVENTS_INCLUDE
  814. PRI_AOC_EVENTS_LIB
  815. PBX_PRI_CALL_WAITING
  816. PRI_CALL_WAITING_DIR
  817. PRI_CALL_WAITING_INCLUDE
  818. PRI_CALL_WAITING_LIB
  819. PBX_PRI_MCID
  820. PRI_MCID_DIR
  821. PRI_MCID_INCLUDE
  822. PRI_MCID_LIB
  823. PBX_PRI_MWI
  824. PRI_MWI_DIR
  825. PRI_MWI_INCLUDE
  826. PRI_MWI_LIB
  827. PBX_PRI_DISPLAY_TEXT
  828. PRI_DISPLAY_TEXT_DIR
  829. PRI_DISPLAY_TEXT_INCLUDE
  830. PRI_DISPLAY_TEXT_LIB
  831. PBX_PRI_MWI_V2
  832. PRI_MWI_V2_DIR
  833. PRI_MWI_V2_INCLUDE
  834. PRI_MWI_V2_LIB
  835. PBX_PRI_DATETIME_SEND
  836. PRI_DATETIME_SEND_DIR
  837. PRI_DATETIME_SEND_INCLUDE
  838. PRI_DATETIME_SEND_LIB
  839. PBX_PRI_L2_PERSISTENCE
  840. PRI_L2_PERSISTENCE_DIR
  841. PRI_L2_PERSISTENCE_INCLUDE
  842. PRI_L2_PERSISTENCE_LIB
  843. PBX_PRI_SETUP_ACK_INBAND
  844. PRI_SETUP_ACK_INBAND_DIR
  845. PRI_SETUP_ACK_INBAND_INCLUDE
  846. PRI_SETUP_ACK_INBAND_LIB
  847. PBX_PRI
  848. PRI_DIR
  849. PRI_INCLUDE
  850. PRI_LIB
  851. PBX_PORTAUDIO
  852. PORTAUDIO_DIR
  853. PORTAUDIO_INCLUDE
  854. PORTAUDIO_LIB
  855. PBX_PJ_SSL_CERT_LOAD_FROM_FILES2
  856. PJ_SSL_CERT_LOAD_FROM_FILES2_DIR
  857. PJ_SSL_CERT_LOAD_FROM_FILES2_INCLUDE
  858. PJ_SSL_CERT_LOAD_FROM_FILES2_LIB
  859. PBX_PJSIP_GET_DEST_INFO
  860. PJSIP_GET_DEST_INFO_DIR
  861. PJSIP_GET_DEST_INFO_INCLUDE
  862. PJSIP_GET_DEST_INFO_LIB
  863. PBX_PJSIP_REPLACE_MEDIA_STREAM
  864. PJSIP_REPLACE_MEDIA_STREAM_DIR
  865. PJSIP_REPLACE_MEDIA_STREAM_INCLUDE
  866. PJSIP_REPLACE_MEDIA_STREAM_LIB
  867. PBX_PJ_TRANSACTION_GRP_LOCK
  868. PJ_TRANSACTION_GRP_LOCK_DIR
  869. PJ_TRANSACTION_GRP_LOCK_INCLUDE
  870. PJ_TRANSACTION_GRP_LOCK_LIB
  871. PBX_POPT
  872. POPT_DIR
  873. POPT_INCLUDE
  874. POPT_LIB
  875. PBX_PJPROJECT
  876. PJPROJECT_DIR
  877. PJPROJECT_INCLUDE
  878. PJPROJECT_LIB
  879. PBX_PGSQL
  880. PGSQL_DIR
  881. PGSQL_INCLUDE
  882. PGSQL_LIB
  883. PBX_OSS
  884. OSS_DIR
  885. OSS_INCLUDE
  886. OSS_LIB
  887. PBX_OSPTK
  888. OSPTK_DIR
  889. OSPTK_INCLUDE
  890. OSPTK_LIB
  891. PBX_OPUS
  892. OPUS_DIR
  893. OPUS_INCLUDE
  894. OPUS_LIB
  895. PBX_OPENR2
  896. OPENR2_DIR
  897. OPENR2_INCLUDE
  898. OPENR2_LIB
  899. PBX_OGG
  900. OGG_DIR
  901. OGG_INCLUDE
  902. OGG_LIB
  903. PBX_NEWT
  904. NEWT_DIR
  905. NEWT_INCLUDE
  906. NEWT_LIB
  907. PBX_NETSNMP
  908. NETSNMP_DIR
  909. NETSNMP_INCLUDE
  910. NETSNMP_LIB
  911. PBX_NEON29
  912. NEON29_DIR
  913. NEON29_INCLUDE
  914. NEON29_LIB
  915. PBX_NEON
  916. NEON_DIR
  917. NEON_INCLUDE
  918. NEON_LIB
  919. PBX_NCURSES
  920. NCURSES_DIR
  921. NCURSES_INCLUDE
  922. NCURSES_LIB
  923. PBX_NBS
  924. NBS_DIR
  925. NBS_INCLUDE
  926. NBS_LIB
  927. PBX_MYSQLCLIENT
  928. MYSQLCLIENT_DIR
  929. MYSQLCLIENT_INCLUDE
  930. MYSQLCLIENT_LIB
  931. PBX_MISDN
  932. MISDN_DIR
  933. MISDN_INCLUDE
  934. MISDN_LIB
  935. PBX_LUA
  936. LUA_DIR
  937. LUA_INCLUDE
  938. LUA_LIB
  939. PBX_LTDL
  940. LTDL_DIR
  941. LTDL_INCLUDE
  942. LTDL_LIB
  943. PBX_LIBXSLT_CLEANUP
  944. LIBXSLT_CLEANUP_DIR
  945. LIBXSLT_CLEANUP_INCLUDE
  946. LIBXSLT_CLEANUP_LIB
  947. PBX_LIBXSLT
  948. LIBXSLT_DIR
  949. LIBXSLT_INCLUDE
  950. LIBXSLT_LIB
  951. PBX_LIBXML2
  952. LIBXML2_DIR
  953. LIBXML2_INCLUDE
  954. LIBXML2_LIB
  955. PBX_LIBEDIT
  956. LIBEDIT_DIR
  957. LIBEDIT_INCLUDE
  958. LIBEDIT_LIB
  959. CURL_LIB
  960. CURL_INCLUDE
  961. _libcurl_config
  962. PBX_CURL
  963. PBX_LDAP
  964. LDAP_DIR
  965. LDAP_INCLUDE
  966. LDAP_LIB
  967. PBX_KQUEUE
  968. KQUEUE_DIR
  969. KQUEUE_INCLUDE
  970. KQUEUE_LIB
  971. PBX_URIPARSER
  972. URIPARSER_DIR
  973. URIPARSER_INCLUDE
  974. URIPARSER_LIB
  975. PBX_JANSSON
  976. JANSSON_DIR
  977. JANSSON_INCLUDE
  978. JANSSON_LIB
  979. PBX_JACK
  980. JACK_DIR
  981. JACK_INCLUDE
  982. JACK_LIB
  983. PBX_ISDNNET
  984. ISDNNET_DIR
  985. ISDNNET_INCLUDE
  986. ISDNNET_LIB
  987. PBX_IODBC
  988. IODBC_DIR
  989. IODBC_INCLUDE
  990. IODBC_LIB
  991. PBX_INOTIFY
  992. INOTIFY_DIR
  993. INOTIFY_INCLUDE
  994. INOTIFY_LIB
  995. PBX_IMAP_TK
  996. IMAP_TK_DIR
  997. IMAP_TK_INCLUDE
  998. IMAP_TK_LIB
  999. PBX_IKSEMEL
  1000. IKSEMEL_DIR
  1001. IKSEMEL_INCLUDE
  1002. IKSEMEL_LIB
  1003. PBX_ICONV
  1004. ICONV_DIR
  1005. ICONV_INCLUDE
  1006. ICONV_LIB
  1007. PBX_ICAL
  1008. ICAL_DIR
  1009. ICAL_INCLUDE
  1010. ICAL_LIB
  1011. PBX_HOARD
  1012. HOARD_DIR
  1013. HOARD_INCLUDE
  1014. HOARD_LIB
  1015. PBX_OPENH323
  1016. OPENH323_DIR
  1017. OPENH323_INCLUDE
  1018. OPENH323_LIB
  1019. PBX_GMIME
  1020. GMIME_DIR
  1021. GMIME_INCLUDE
  1022. GMIME_LIB
  1023. PBX_GTK2
  1024. GTK2_DIR
  1025. GTK2_INCLUDE
  1026. GTK2_LIB
  1027. PBX_ILBC
  1028. ILBC_DIR
  1029. ILBC_INCLUDE
  1030. ILBC_LIB
  1031. PBX_GSM
  1032. GSM_DIR
  1033. GSM_INCLUDE
  1034. GSM_LIB
  1035. PBX_FFMPEG
  1036. FFMPEG_DIR
  1037. FFMPEG_INCLUDE
  1038. FFMPEG_LIB
  1039. PBX_DAHDI
  1040. DAHDI_DIR
  1041. DAHDI_INCLUDE
  1042. DAHDI_LIB
  1043. PBX_OPENSSL_EC
  1044. OPENSSL_EC_DIR
  1045. OPENSSL_EC_INCLUDE
  1046. OPENSSL_EC_LIB
  1047. PBX_OPENSSL_SRTP
  1048. OPENSSL_SRTP_DIR
  1049. OPENSSL_SRTP_INCLUDE
  1050. OPENSSL_SRTP_LIB
  1051. PBX_CRYPTO
  1052. CRYPTO_DIR
  1053. CRYPTO_INCLUDE
  1054. CRYPTO_LIB
  1055. PBX_CRYPT
  1056. CRYPT_DIR
  1057. CRYPT_INCLUDE
  1058. CRYPT_LIB
  1059. PBX_CURSES
  1060. CURSES_DIR
  1061. CURSES_INCLUDE
  1062. CURSES_LIB
  1063. PBX_COROSYNC_CFG_STATE_TRACK
  1064. COROSYNC_CFG_STATE_TRACK_DIR
  1065. COROSYNC_CFG_STATE_TRACK_INCLUDE
  1066. COROSYNC_CFG_STATE_TRACK_LIB
  1067. PBX_COROSYNC
  1068. COROSYNC_DIR
  1069. COROSYNC_INCLUDE
  1070. COROSYNC_LIB
  1071. PBX_CAP
  1072. CAP_DIR
  1073. CAP_INCLUDE
  1074. CAP_LIB
  1075. PBX_BLUETOOTH
  1076. BLUETOOTH_DIR
  1077. BLUETOOTH_INCLUDE
  1078. BLUETOOTH_LIB
  1079. PBX_BKTR
  1080. BKTR_DIR
  1081. BKTR_INCLUDE
  1082. BKTR_LIB
  1083. PBX_BFD
  1084. BFD_DIR
  1085. BFD_INCLUDE
  1086. BFD_LIB
  1087. PBX_ALSA
  1088. ALSA_DIR
  1089. ALSA_INCLUDE
  1090. ALSA_LIB
  1091. AST_CODE_COVERAGE
  1092. AST_DEVMODE_STRICT
  1093. AST_DEVMODE
  1094. NOISY_BUILD
  1095. PTHREAD_CFLAGS
  1096. PTHREAD_LIBS
  1097. PTHREAD_CC
  1098. acx_pthread_config
  1099. MD5
  1100. SOXMIX
  1101. PBX_FLEX
  1102. PBX_BISON
  1103. OPENSSL
  1104. SHA1SUM
  1105. LDCONFIG
  1106. DOWNLOAD
  1107. FETCH
  1108. GIT
  1109. XMLSTARLET
  1110. XMLLINT
  1111. KPATHSEA
  1112. CATDVI
  1113. RUBBER
  1114. CURL
  1115. WGET
  1116. DOT
  1117. DOXYGEN
  1118. LN
  1119. DIRNAME
  1120. BASENAME
  1121. COMPRESS
  1122. FIND
  1123. PYTHON
  1124. FLEX
  1125. CMP
  1126. BISON
  1127. GNU_LD
  1128. ac_ct_AR
  1129. AR
  1130. ac_ct_STRIP
  1131. STRIP
  1132. GNU_MAKE
  1133. LN_S
  1134. INSTALL_DATA
  1135. INSTALL_SCRIPT
  1136. INSTALL_PROGRAM
  1137. AWK
  1138. SED
  1139. CXXCPP
  1140. ac_ct_CXX
  1141. CXXFLAGS
  1142. RANLIB
  1143. LD
  1144. CXX
  1145. PBX_OSREV
  1146. UNAME
  1147. CONFIG_SIGNED_CHAR
  1148. PBX_WINARCH
  1149. OSARCH
  1150. HOST_OS
  1151. HOST_VENDOR
  1152. HOST_CPU
  1153. HOST_PLATFORM
  1154. BUILD_OS
  1155. BUILD_VENDOR
  1156. BUILD_CPU
  1157. BUILD_PLATFORM
  1158. astvarrundir
  1159. astlogdir
  1160. astspooldir
  1161. astkeydir
  1162. astdbdir
  1163. astdatadir
  1164. astvarlibdir
  1165. astmandir
  1166. astmoddir
  1167. astlibdir
  1168. astheaderdir
  1169. astetcdir
  1170. astsbindir
  1171. EGREP
  1172. GREP
  1173. CPP
  1174. OBJEXT
  1175. EXEEXT
  1176. ac_ct_CC
  1177. CPPFLAGS
  1178. LDFLAGS
  1179. CFLAGS
  1180. CC
  1181. CONFIG_LDFLAGS
  1182. CONFIG_CFLAGS
  1183. host_os
  1184. host_vendor
  1185. host_cpu
  1186. host
  1187. build_os
  1188. build_vendor
  1189. build_cpu
  1190. build
  1191. target_alias
  1192. host_alias
  1193. build_alias
  1194. LIBS
  1195. ECHO_T
  1196. ECHO_N
  1197. ECHO_C
  1198. DEFS
  1199. mandir
  1200. localedir
  1201. libdir
  1202. psdir
  1203. pdfdir
  1204. dvidir
  1205. htmldir
  1206. infodir
  1207. docdir
  1208. oldincludedir
  1209. includedir
  1210. localstatedir
  1211. sharedstatedir
  1212. sysconfdir
  1213. datadir
  1214. datarootdir
  1215. libexecdir
  1216. sbindir
  1217. bindir
  1218. program_transform_name
  1219. prefix
  1220. exec_prefix
  1221. PACKAGE_URL
  1222. PACKAGE_BUGREPORT
  1223. PACKAGE_STRING
  1224. PACKAGE_VERSION
  1225. PACKAGE_TARNAME
  1226. PACKAGE_NAME
  1227. PATH_SEPARATOR
  1228. SHELL'
  1229. ac_subst_files=''
  1230. ac_user_opts='
  1231. enable_option_checking
  1232. with_gnu_ld
  1233. enable_dev_mode
  1234. enable_coverage
  1235. with_asound
  1236. with_bfd
  1237. with_execinfo
  1238. with_bluetooth
  1239. with_cap
  1240. with_cpg
  1241. with_curses
  1242. with_crypt
  1243. with_crypto
  1244. with_dahdi
  1245. with_avcodec
  1246. with_gsm
  1247. with_ilbc
  1248. with_gtk2
  1249. with_gmime
  1250. with_h323
  1251. with_hoard
  1252. with_ical
  1253. with_iconv
  1254. with_iksemel
  1255. with_imap
  1256. with_inotify
  1257. with_iodbc
  1258. with_isdnnet
  1259. with_jack
  1260. with_jansson
  1261. with_uriparser
  1262. with_kqueue
  1263. with_ldap
  1264. with_libcurl
  1265. with_libedit
  1266. with_libxml2
  1267. with_libxslt
  1268. with_ltdl
  1269. with_lua
  1270. with_misdn
  1271. with_mysqlclient
  1272. with_nbs
  1273. with_ncurses
  1274. with_neon
  1275. with_neon29
  1276. with_netsnmp
  1277. with_newt
  1278. with_ogg
  1279. with_openr2
  1280. with_opus
  1281. with_osptk
  1282. with_oss
  1283. with_postgres
  1284. with_pjproject
  1285. with_popt
  1286. with_portaudio
  1287. with_pri
  1288. with_pwlib
  1289. with_radius
  1290. with_resample
  1291. with_sdl
  1292. with_SDL_image
  1293. with_sounds_cache
  1294. with_spandsp
  1295. with_ss7
  1296. with_speex
  1297. with_speexdsp
  1298. with_sqlite
  1299. with_sqlite3
  1300. with_srtp
  1301. with_ssl
  1302. with_suppserv
  1303. with_tds
  1304. with_termcap
  1305. with_timerfd
  1306. with_tinfo
  1307. with_tonezone
  1308. with_unixodbc
  1309. with_vorbis
  1310. with_vpb
  1311. with_x11
  1312. with_z
  1313. enable_xmldoc
  1314. enable_largefile
  1315. enable_internal_poll
  1316. enable_asteriskssl
  1317. enable_rpath
  1318. '
  1319. ac_precious_vars='build_alias
  1320. host_alias
  1321. target_alias
  1322. CC
  1323. CFLAGS
  1324. LDFLAGS
  1325. LIBS
  1326. CPPFLAGS
  1327. CPP
  1328. CXX
  1329. CXXFLAGS
  1330. CCC
  1331. CXXCPP
  1332. PKG_CONFIG
  1333. PKG_CONFIG_PATH
  1334. PKG_CONFIG_LIBDIR
  1335. ILBC_CFLAGS
  1336. ILBC_LIBS
  1337. LIBEDIT_CFLAGS
  1338. LIBEDIT_LIBS
  1339. PJPROJECT_CFLAGS
  1340. PJPROJECT_LIBS
  1341. GMIME_CFLAGS
  1342. GMIME_LIBS
  1343. GTK2_CFLAGS
  1344. GTK2_LIBS'
  1345. # Initialize some variables set by options.
  1346. ac_init_help=
  1347. ac_init_version=false
  1348. ac_unrecognized_opts=
  1349. ac_unrecognized_sep=
  1350. # The variables have the same names as the options, with
  1351. # dashes changed to underlines.
  1352. cache_file=/dev/null
  1353. exec_prefix=NONE
  1354. no_create=
  1355. no_recursion=
  1356. prefix=NONE
  1357. program_prefix=NONE
  1358. program_suffix=NONE
  1359. program_transform_name=s,x,x,
  1360. silent=
  1361. site=
  1362. srcdir=
  1363. verbose=
  1364. x_includes=NONE
  1365. x_libraries=NONE
  1366. # Installation directory options.
  1367. # These are left unexpanded so users can "make install exec_prefix=/foo"
  1368. # and all the variables that are supposed to be based on exec_prefix
  1369. # by default will actually change.
  1370. # Use braces instead of parens because sh, perl, etc. also accept them.
  1371. # (The list follows the same order as the GNU Coding Standards.)
  1372. bindir='${exec_prefix}/bin'
  1373. sbindir='${exec_prefix}/sbin'
  1374. libexecdir='${exec_prefix}/libexec'
  1375. datarootdir='${prefix}/share'
  1376. datadir='${datarootdir}'
  1377. sysconfdir='${prefix}/etc'
  1378. sharedstatedir='${prefix}/com'
  1379. localstatedir='${prefix}/var'
  1380. includedir='${prefix}/include'
  1381. oldincludedir='/usr/include'
  1382. docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
  1383. infodir='${datarootdir}/info'
  1384. htmldir='${docdir}'
  1385. dvidir='${docdir}'
  1386. pdfdir='${docdir}'
  1387. psdir='${docdir}'
  1388. libdir='${exec_prefix}/lib'
  1389. localedir='${datarootdir}/locale'
  1390. mandir='${datarootdir}/man'
  1391. ac_prev=
  1392. ac_dashdash=
  1393. for ac_option
  1394. do
  1395. # If the previous option needs an argument, assign it.
  1396. if test -n "$ac_prev"; then
  1397. eval $ac_prev=\$ac_option
  1398. ac_prev=
  1399. continue
  1400. fi
  1401. case $ac_option in
  1402. *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
  1403. *=) ac_optarg= ;;
  1404. *) ac_optarg=yes ;;
  1405. esac
  1406. # Accept the important Cygnus configure options, so we can diagnose typos.
  1407. case $ac_dashdash$ac_option in
  1408. --)
  1409. ac_dashdash=yes ;;
  1410. -bindir | --bindir | --bindi | --bind | --bin | --bi)
  1411. ac_prev=bindir ;;
  1412. -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  1413. bindir=$ac_optarg ;;
  1414. -build | --build | --buil | --bui | --bu)
  1415. ac_prev=build_alias ;;
  1416. -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  1417. build_alias=$ac_optarg ;;
  1418. -cache-file | --cache-file | --cache-fil | --cache-fi \
  1419. | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  1420. ac_prev=cache_file ;;
  1421. -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  1422. | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  1423. cache_file=$ac_optarg ;;
  1424. --config-cache | -C)
  1425. cache_file=config.cache ;;
  1426. -datadir | --datadir | --datadi | --datad)
  1427. ac_prev=datadir ;;
  1428. -datadir=* | --datadir=* | --datadi=* | --datad=*)
  1429. datadir=$ac_optarg ;;
  1430. -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
  1431. | --dataroo | --dataro | --datar)
  1432. ac_prev=datarootdir ;;
  1433. -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
  1434. | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
  1435. datarootdir=$ac_optarg ;;
  1436. -disable-* | --disable-*)
  1437. ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
  1438. # Reject names that are not valid shell variable names.
  1439. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
  1440. as_fn_error $? "invalid feature name: $ac_useropt"
  1441. ac_useropt_orig=$ac_useropt
  1442. ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
  1443. case $ac_user_opts in
  1444. *"
  1445. "enable_$ac_useropt"
  1446. "*) ;;
  1447. *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
  1448. ac_unrecognized_sep=', ';;
  1449. esac
  1450. eval enable_$ac_useropt=no ;;
  1451. -docdir | --docdir | --docdi | --doc | --do)
  1452. ac_prev=docdir ;;
  1453. -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
  1454. docdir=$ac_optarg ;;
  1455. -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
  1456. ac_prev=dvidir ;;
  1457. -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
  1458. dvidir=$ac_optarg ;;
  1459. -enable-* | --enable-*)
  1460. ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
  1461. # Reject names that are not valid shell variable names.
  1462. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
  1463. as_fn_error $? "invalid feature name: $ac_useropt"
  1464. ac_useropt_orig=$ac_useropt
  1465. ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
  1466. case $ac_user_opts in
  1467. *"
  1468. "enable_$ac_useropt"
  1469. "*) ;;
  1470. *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
  1471. ac_unrecognized_sep=', ';;
  1472. esac
  1473. eval enable_$ac_useropt=\$ac_optarg ;;
  1474. -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  1475. | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  1476. | --exec | --exe | --ex)
  1477. ac_prev=exec_prefix ;;
  1478. -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  1479. | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  1480. | --exec=* | --exe=* | --ex=*)
  1481. exec_prefix=$ac_optarg ;;
  1482. -gas | --gas | --ga | --g)
  1483. # Obsolete; use --with-gas.
  1484. with_gas=yes ;;
  1485. -help | --help | --hel | --he | -h)
  1486. ac_init_help=long ;;
  1487. -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
  1488. ac_init_help=recursive ;;
  1489. -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
  1490. ac_init_help=short ;;
  1491. -host | --host | --hos | --ho)
  1492. ac_prev=host_alias ;;
  1493. -host=* | --host=* | --hos=* | --ho=*)
  1494. host_alias=$ac_optarg ;;
  1495. -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
  1496. ac_prev=htmldir ;;
  1497. -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
  1498. | --ht=*)
  1499. htmldir=$ac_optarg ;;
  1500. -includedir | --includedir | --includedi | --included | --include \
  1501. | --includ | --inclu | --incl | --inc)
  1502. ac_prev=includedir ;;
  1503. -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  1504. | --includ=* | --inclu=* | --incl=* | --inc=*)
  1505. includedir=$ac_optarg ;;
  1506. -infodir | --infodir | --infodi | --infod | --info | --inf)
  1507. ac_prev=infodir ;;
  1508. -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  1509. infodir=$ac_optarg ;;
  1510. -libdir | --libdir | --libdi | --libd)
  1511. ac_prev=libdir ;;
  1512. -libdir=* | --libdir=* | --libdi=* | --libd=*)
  1513. libdir=$ac_optarg ;;
  1514. -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  1515. | --libexe | --libex | --libe)
  1516. ac_prev=libexecdir ;;
  1517. -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  1518. | --libexe=* | --libex=* | --libe=*)
  1519. libexecdir=$ac_optarg ;;
  1520. -localedir | --localedir | --localedi | --localed | --locale)
  1521. ac_prev=localedir ;;
  1522. -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
  1523. localedir=$ac_optarg ;;
  1524. -localstatedir | --localstatedir | --localstatedi | --localstated \
  1525. | --localstate | --localstat | --localsta | --localst | --locals)
  1526. ac_prev=localstatedir ;;
  1527. -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  1528. | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
  1529. localstatedir=$ac_optarg ;;
  1530. -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  1531. ac_prev=mandir ;;
  1532. -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  1533. mandir=$ac_optarg ;;
  1534. -nfp | --nfp | --nf)
  1535. # Obsolete; use --without-fp.
  1536. with_fp=no ;;
  1537. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  1538. | --no-cr | --no-c | -n)
  1539. no_create=yes ;;
  1540. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  1541. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  1542. no_recursion=yes ;;
  1543. -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  1544. | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  1545. | --oldin | --oldi | --old | --ol | --o)
  1546. ac_prev=oldincludedir ;;
  1547. -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  1548. | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  1549. | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  1550. oldincludedir=$ac_optarg ;;
  1551. -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  1552. ac_prev=prefix ;;
  1553. -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  1554. prefix=$ac_optarg ;;
  1555. -program-prefix | --program-prefix | --program-prefi | --program-pref \
  1556. | --program-pre | --program-pr | --program-p)
  1557. ac_prev=program_prefix ;;
  1558. -program-prefix=* | --program-prefix=* | --program-prefi=* \
  1559. | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  1560. program_prefix=$ac_optarg ;;
  1561. -program-suffix | --program-suffix | --program-suffi | --program-suff \
  1562. | --program-suf | --program-su | --program-s)
  1563. ac_prev=program_suffix ;;
  1564. -program-suffix=* | --program-suffix=* | --program-suffi=* \
  1565. | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  1566. program_suffix=$ac_optarg ;;
  1567. -program-transform-name | --program-transform-name \
  1568. | --program-transform-nam | --program-transform-na \
  1569. | --program-transform-n | --program-transform- \
  1570. | --program-transform | --program-transfor \
  1571. | --program-transfo | --program-transf \
  1572. | --program-trans | --program-tran \
  1573. | --progr-tra | --program-tr | --program-t)
  1574. ac_prev=program_transform_name ;;
  1575. -program-transform-name=* | --program-transform-name=* \
  1576. | --program-transform-nam=* | --program-transform-na=* \
  1577. | --program-transform-n=* | --program-transform-=* \
  1578. | --program-transform=* | --program-transfor=* \
  1579. | --program-transfo=* | --program-transf=* \
  1580. | --program-trans=* | --program-tran=* \
  1581. | --progr-tra=* | --program-tr=* | --program-t=*)
  1582. program_transform_name=$ac_optarg ;;
  1583. -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
  1584. ac_prev=pdfdir ;;
  1585. -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
  1586. pdfdir=$ac_optarg ;;
  1587. -psdir | --psdir | --psdi | --psd | --ps)
  1588. ac_prev=psdir ;;
  1589. -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
  1590. psdir=$ac_optarg ;;
  1591. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  1592. | -silent | --silent | --silen | --sile | --sil)
  1593. silent=yes ;;
  1594. -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  1595. ac_prev=sbindir ;;
  1596. -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  1597. | --sbi=* | --sb=*)
  1598. sbindir=$ac_optarg ;;
  1599. -sharedstatedir | --sharedstatedir | --sharedstatedi \
  1600. | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  1601. | --sharedst | --shareds | --shared | --share | --shar \
  1602. | --sha | --sh)
  1603. ac_prev=sharedstatedir ;;
  1604. -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  1605. | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  1606. | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  1607. | --sha=* | --sh=*)
  1608. sharedstatedir=$ac_optarg ;;
  1609. -site | --site | --sit)
  1610. ac_prev=site ;;
  1611. -site=* | --site=* | --sit=*)
  1612. site=$ac_optarg ;;
  1613. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  1614. ac_prev=srcdir ;;
  1615. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  1616. srcdir=$ac_optarg ;;
  1617. -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  1618. | --syscon | --sysco | --sysc | --sys | --sy)
  1619. ac_prev=sysconfdir ;;
  1620. -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  1621. | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  1622. sysconfdir=$ac_optarg ;;
  1623. -target | --target | --targe | --targ | --tar | --ta | --t)
  1624. ac_prev=target_alias ;;
  1625. -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  1626. target_alias=$ac_optarg ;;
  1627. -v | -verbose | --verbose | --verbos | --verbo | --verb)
  1628. verbose=yes ;;
  1629. -version | --version | --versio | --versi | --vers | -V)
  1630. ac_init_version=: ;;
  1631. -with-* | --with-*)
  1632. ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
  1633. # Reject names that are not valid shell variable names.
  1634. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
  1635. as_fn_error $? "invalid package name: $ac_useropt"
  1636. ac_useropt_orig=$ac_useropt
  1637. ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
  1638. case $ac_user_opts in
  1639. *"
  1640. "with_$ac_useropt"
  1641. "*) ;;
  1642. *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
  1643. ac_unrecognized_sep=', ';;
  1644. esac
  1645. eval with_$ac_useropt=\$ac_optarg ;;
  1646. -without-* | --without-*)
  1647. ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
  1648. # Reject names that are not valid shell variable names.
  1649. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
  1650. as_fn_error $? "invalid package name: $ac_useropt"
  1651. ac_useropt_orig=$ac_useropt
  1652. ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
  1653. case $ac_user_opts in
  1654. *"
  1655. "with_$ac_useropt"
  1656. "*) ;;
  1657. *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
  1658. ac_unrecognized_sep=', ';;
  1659. esac
  1660. eval with_$ac_useropt=no ;;
  1661. --x)
  1662. # Obsolete; use --with-x.
  1663. with_x=yes ;;
  1664. -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  1665. | --x-incl | --x-inc | --x-in | --x-i)
  1666. ac_prev=x_includes ;;
  1667. -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  1668. | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  1669. x_includes=$ac_optarg ;;
  1670. -x-libraries | --x-libraries | --x-librarie | --x-librari \
  1671. | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  1672. ac_prev=x_libraries ;;
  1673. -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  1674. | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  1675. x_libraries=$ac_optarg ;;
  1676. -*) as_fn_error $? "unrecognized option: \`$ac_option'
  1677. Try \`$0 --help' for more information"
  1678. ;;
  1679. *=*)
  1680. ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
  1681. # Reject names that are not valid shell variable names.
  1682. case $ac_envvar in #(
  1683. '' | [0-9]* | *[!_$as_cr_alnum]* )
  1684. as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
  1685. esac
  1686. eval $ac_envvar=\$ac_optarg
  1687. export $ac_envvar ;;
  1688. *)
  1689. # FIXME: should be removed in autoconf 3.0.
  1690. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
  1691. expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
  1692. $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
  1693. : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
  1694. ;;
  1695. esac
  1696. done
  1697. if test -n "$ac_prev"; then
  1698. ac_option=--`echo $ac_prev | sed 's/_/-/g'`
  1699. as_fn_error $? "missing argument to $ac_option"
  1700. fi
  1701. if test -n "$ac_unrecognized_opts"; then
  1702. case $enable_option_checking in
  1703. no) ;;
  1704. fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
  1705. *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
  1706. esac
  1707. fi
  1708. # Check all directory arguments for consistency.
  1709. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
  1710. datadir sysconfdir sharedstatedir localstatedir includedir \
  1711. oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
  1712. libdir localedir mandir
  1713. do
  1714. eval ac_val=\$$ac_var
  1715. # Remove trailing slashes.
  1716. case $ac_val in
  1717. */ )
  1718. ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
  1719. eval $ac_var=\$ac_val;;
  1720. esac
  1721. # Be sure to have absolute directory names.
  1722. case $ac_val in
  1723. [\\/$]* | ?:[\\/]* ) continue;;
  1724. NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
  1725. esac
  1726. as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
  1727. done
  1728. # There might be people who depend on the old broken behavior: `$host'
  1729. # used to hold the argument of --host etc.
  1730. # FIXME: To remove some day.
  1731. build=$build_alias
  1732. host=$host_alias
  1733. target=$target_alias
  1734. # FIXME: To remove some day.
  1735. if test "x$host_alias" != x; then
  1736. if test "x$build_alias" = x; then
  1737. cross_compiling=maybe
  1738. elif test "x$build_alias" != "x$host_alias"; then
  1739. cross_compiling=yes
  1740. fi
  1741. fi
  1742. ac_tool_prefix=
  1743. test -n "$host_alias" && ac_tool_prefix=$host_alias-
  1744. test "$silent" = yes && exec 6>/dev/null
  1745. ac_pwd=`pwd` && test -n "$ac_pwd" &&
  1746. ac_ls_di=`ls -di .` &&
  1747. ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
  1748. as_fn_error $? "working directory cannot be determined"
  1749. test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
  1750. as_fn_error $? "pwd does not report name of working directory"
  1751. # Find the source files, if location was not specified.
  1752. if test -z "$srcdir"; then
  1753. ac_srcdir_defaulted=yes
  1754. # Try the directory containing this script, then the parent directory.
  1755. ac_confdir=`$as_dirname -- "$as_myself" ||
  1756. $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  1757. X"$as_myself" : 'X\(//\)[^/]' \| \
  1758. X"$as_myself" : 'X\(//\)$' \| \
  1759. X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
  1760. $as_echo X"$as_myself" |
  1761. sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
  1762. s//\1/
  1763. q
  1764. }
  1765. /^X\(\/\/\)[^/].*/{
  1766. s//\1/
  1767. q
  1768. }
  1769. /^X\(\/\/\)$/{
  1770. s//\1/
  1771. q
  1772. }
  1773. /^X\(\/\).*/{
  1774. s//\1/
  1775. q
  1776. }
  1777. s/.*/./; q'`
  1778. srcdir=$ac_confdir
  1779. if test ! -r "$srcdir/$ac_unique_file"; then
  1780. srcdir=..
  1781. fi
  1782. else
  1783. ac_srcdir_defaulted=no
  1784. fi
  1785. if test ! -r "$srcdir/$ac_unique_file"; then
  1786. test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
  1787. as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
  1788. fi
  1789. ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
  1790. ac_abs_confdir=`(
  1791. cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
  1792. pwd)`
  1793. # When building in place, set srcdir=.
  1794. if test "$ac_abs_confdir" = "$ac_pwd"; then
  1795. srcdir=.
  1796. fi
  1797. # Remove unnecessary trailing slashes from srcdir.
  1798. # Double slashes in file names in object file debugging info
  1799. # mess up M-x gdb in Emacs.
  1800. case $srcdir in
  1801. */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
  1802. esac
  1803. for ac_var in $ac_precious_vars; do
  1804. eval ac_env_${ac_var}_set=\${${ac_var}+set}
  1805. eval ac_env_${ac_var}_value=\$${ac_var}
  1806. eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
  1807. eval ac_cv_env_${ac_var}_value=\$${ac_var}
  1808. done
  1809. #
  1810. # Report the --help message.
  1811. #
  1812. if test "$ac_init_help" = "long"; then
  1813. # Omit some internal or obsolete options to make the list less imposing.
  1814. # This message is too long to be a string in the A/UX 3.1 sh.
  1815. cat <<_ACEOF
  1816. \`configure' configures asterisk trunk to adapt to many kinds of systems.
  1817. Usage: $0 [OPTION]... [VAR=VALUE]...
  1818. To assign environment variables (e.g., CC, CFLAGS...), specify them as
  1819. VAR=VALUE. See below for descriptions of some of the useful variables.
  1820. Defaults for the options are specified in brackets.
  1821. Configuration:
  1822. -h, --help display this help and exit
  1823. --help=short display options specific to this package
  1824. --help=recursive display the short help of all the included packages
  1825. -V, --version display version information and exit
  1826. -q, --quiet, --silent do not print \`checking ...' messages
  1827. --cache-file=FILE cache test results in FILE [disabled]
  1828. -C, --config-cache alias for \`--cache-file=config.cache'
  1829. -n, --no-create do not create output files
  1830. --srcdir=DIR find the sources in DIR [configure dir or \`..']
  1831. Installation directories:
  1832. --prefix=PREFIX install architecture-independent files in PREFIX
  1833. [$ac_default_prefix]
  1834. --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  1835. [PREFIX]
  1836. By default, \`make install' will install all the files in
  1837. \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
  1838. an installation prefix other than \`$ac_default_prefix' using \`--prefix',
  1839. for instance \`--prefix=\$HOME'.
  1840. For better control, use the options below.
  1841. Fine tuning of the installation directories:
  1842. --bindir=DIR user executables [EPREFIX/bin]
  1843. --sbindir=DIR system admin executables [EPREFIX/sbin]
  1844. --libexecdir=DIR program executables [EPREFIX/libexec]
  1845. --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
  1846. --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
  1847. --localstatedir=DIR modifiable single-machine data [PREFIX/var]
  1848. --libdir=DIR object code libraries [EPREFIX/lib]
  1849. --includedir=DIR C header files [PREFIX/include]
  1850. --oldincludedir=DIR C header files for non-gcc [/usr/include]
  1851. --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
  1852. --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
  1853. --infodir=DIR info documentation [DATAROOTDIR/info]
  1854. --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
  1855. --mandir=DIR man documentation [DATAROOTDIR/man]
  1856. --docdir=DIR documentation root [DATAROOTDIR/doc/asterisk]
  1857. --htmldir=DIR html documentation [DOCDIR]
  1858. --dvidir=DIR dvi documentation [DOCDIR]
  1859. --pdfdir=DIR pdf documentation [DOCDIR]
  1860. --psdir=DIR ps documentation [DOCDIR]
  1861. _ACEOF
  1862. cat <<\_ACEOF
  1863. System types:
  1864. --build=BUILD configure for building on BUILD [guessed]
  1865. --host=HOST cross-compile to build programs to run on HOST [BUILD]
  1866. _ACEOF
  1867. fi
  1868. if test -n "$ac_init_help"; then
  1869. case $ac_init_help in
  1870. short | recursive ) echo "Configuration of asterisk trunk:";;
  1871. esac
  1872. cat <<\_ACEOF
  1873. Optional Features:
  1874. --disable-option-checking ignore unrecognized --enable/--with options
  1875. --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  1876. --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  1877. --enable-dev-mode Turn on developer mode
  1878. --enable-coverage Turn on code coverage tracking (for gcov)
  1879. --disable-xmldoc Explicitly disable XML documentation
  1880. --disable-largefile omit support for large files
  1881. --enable-internal-poll Use Asterisk's poll implementation
  1882. --disable-asteriskssl Disable Asterisk's SSL wrapper library
  1883. --disable-rpath Disables rpath linker option checking
  1884. Optional Packages:
  1885. --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  1886. --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
  1887. --with-gnu-ld assume the C compiler uses GNU ld [default=no]
  1888. --with-asound=PATH use Advanced Linux Sound Architecture files in PATH
  1889. --with-bfd=PATH use Debug symbol decoding files in PATH
  1890. --with-execinfo=PATH use Stack Backtrace files in PATH
  1891. --with-bluetooth=PATH use Bluetooth files in PATH
  1892. --with-cap=PATH use POSIX 1.e capabilities files in PATH
  1893. --with-cpg=PATH use Corosync files in PATH
  1894. --with-curses=PATH use curses files in PATH
  1895. --with-crypt=PATH use password and data encryption files in PATH
  1896. --with-crypto=PATH use OpenSSL Cryptography files in PATH
  1897. --with-dahdi=PATH use DAHDI files in PATH
  1898. --with-avcodec=PATH use Ffmpeg and avcodec files in PATH
  1899. --with-gsm=PATH use External GSM files in PATH, use 'internal' GSM
  1900. otherwise
  1901. --with-ilbc=PATH use System iLBC files in PATH, use 'internal' iLBC
  1902. otherwise
  1903. --with-gtk2=PATH use gtk2 files in PATH
  1904. --with-gmime=PATH use GMime files in PATH
  1905. --with-h323=PATH use OpenH323 files in PATH
  1906. --with-hoard=PATH use Hoard Memory Allocator files in PATH
  1907. --with-ical=PATH use iCal files in PATH
  1908. --with-iconv=PATH use Iconv files in PATH
  1909. --with-iksemel=PATH use Iksemel Jabber files in PATH
  1910. --with-imap=PATH use UW IMAP Toolkit files in PATH
  1911. --with-inotify=PATH use inotify support files in PATH
  1912. --with-iodbc=PATH use iODBC files in PATH
  1913. --with-isdnnet=PATH use ISDN4Linux files in PATH
  1914. --with-jack=PATH use Jack Audio Connection Kit files in PATH
  1915. --with-jansson=PATH use Jansson JSON library files in PATH
  1916. --with-uriparser=PATH use uriparser library files in PATH
  1917. --with-kqueue=PATH use kqueue support files in PATH
  1918. --with-ldap=PATH use OpenLDAP files in PATH
  1919. --with-libcurl=DIR look for the curl library in DIR
  1920. --with-libedit=PATH use NetBSD Editline library files in PATH, use
  1921. 'internal' Editline otherwise
  1922. --with-libxml2=PATH use LibXML2 files in PATH
  1923. --with-libxslt=PATH use LibXSLT files in PATH
  1924. --with-ltdl=PATH use libtool files in PATH
  1925. --with-lua=PATH use Lua files in PATH
  1926. --with-misdn=PATH use mISDN user files in PATH
  1927. --with-mysqlclient=PATH use MySQL client files in PATH
  1928. --with-nbs=PATH use Network Broadcast Sound files in PATH
  1929. --with-ncurses=PATH use ncurses files in PATH
  1930. --with-neon=PATH use neon files in PATH
  1931. --with-neon29=PATH use neon29 files in PATH
  1932. --with-netsnmp=PATH use Net-SNMP files in PATH
  1933. --with-newt=PATH use newt files in PATH
  1934. --with-ogg=PATH use OGG files in PATH
  1935. --with-openr2=PATH use MFR2 files in PATH
  1936. --with-opus=PATH use Opus files in PATH
  1937. --with-osptk=PATH use OSP Toolkit files in PATH
  1938. --with-oss=PATH use Open Sound System files in PATH
  1939. --with-postgres=PATH use PostgreSQL files in PATH
  1940. --with-pjproject=PATH use PJPROJECT files in PATH
  1941. --with-popt=PATH use popt files in PATH
  1942. --with-portaudio=PATH use PortAudio files in PATH
  1943. --with-pri=PATH use ISDN PRI files in PATH
  1944. --with-pwlib=PATH use PWlib files in PATH
  1945. --with-radius=PATH use Radius Client files in PATH
  1946. --with-resample=PATH use LIBRESAMPLE files in PATH
  1947. --with-sdl=PATH use Sdl files in PATH
  1948. --with-SDL_image=PATH use Sdl Image files in PATH
  1949. --with-sounds-cache=PATH
  1950. use cached sound tarfiles in PATH
  1951. --with-spandsp=PATH use SPANDSP files in PATH
  1952. --with-ss7=PATH use ISDN SS7 files in PATH
  1953. --with-speex=PATH use Speex files in PATH
  1954. --with-speex=PATH use Speex preprocess routines files in PATH
  1955. --with-speexdsp=PATH use SpeexDSP files in PATH
  1956. --with-sqlite=PATH use SQLite files in PATH
  1957. --with-sqlite3=PATH use SQLite files in PATH
  1958. --with-srtp=PATH use Secure RTP files in PATH
  1959. --with-ssl=PATH use OpenSSL Secure Sockets Layer files in PATH
  1960. --with-suppserv=PATH use mISDN Supplemental Services files in PATH
  1961. --with-tds=PATH use FreeTDS files in PATH
  1962. --with-termcap=PATH use Termcap files in PATH
  1963. --with-timerfd=PATH use timerfd files in PATH
  1964. --with-tinfo=PATH use Term Info files in PATH
  1965. --with-tonezone=PATH use tonezone files in PATH
  1966. --with-unixodbc=PATH use unixODBC files in PATH
  1967. --with-vorbis=PATH use Vorbis files in PATH
  1968. --with-vpb=PATH use Voicetronix API files in PATH
  1969. --with-x11=PATH use X11 files in PATH
  1970. --with-z=PATH use zlib compression files in PATH
  1971. Some influential environment variables:
  1972. CC C compiler command
  1973. CFLAGS C compiler flags
  1974. LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
  1975. nonstandard directory <lib dir>
  1976. LIBS libraries to pass to the linker, e.g. -l<library>
  1977. CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
  1978. you have headers in a nonstandard directory <include dir>
  1979. CPP C preprocessor
  1980. CXX C++ compiler command
  1981. CXXFLAGS C++ compiler flags
  1982. CXXCPP C++ preprocessor
  1983. PKG_CONFIG path to pkg-config utility
  1984. PKG_CONFIG_PATH
  1985. directories to add to pkg-config's search path
  1986. PKG_CONFIG_LIBDIR
  1987. path overriding pkg-config's built-in search path
  1988. ILBC_CFLAGS C compiler flags for ILBC, overriding pkg-config
  1989. ILBC_LIBS linker flags for ILBC, overriding pkg-config
  1990. LIBEDIT_CFLAGS
  1991. C compiler flags for LIBEDIT, overriding pkg-config
  1992. LIBEDIT_LIBS
  1993. linker flags for LIBEDIT, overriding pkg-config
  1994. PJPROJECT_CFLAGS
  1995. C compiler flags for PJPROJECT, overriding pkg-config
  1996. PJPROJECT_LIBS
  1997. linker flags for PJPROJECT, overriding pkg-config
  1998. GMIME_CFLAGS
  1999. C compiler flags for GMIME, overriding pkg-config
  2000. GMIME_LIBS linker flags for GMIME, overriding pkg-config
  2001. GTK2_CFLAGS C compiler flags for GTK2, overriding pkg-config
  2002. GTK2_LIBS linker flags for GTK2, overriding pkg-config
  2003. Use these variables to override the choices made by `configure' or to help
  2004. it to find libraries and programs with nonstandard names/locations.
  2005. Report bugs to <https://issues.asterisk.org>.
  2006. _ACEOF
  2007. ac_status=$?
  2008. fi
  2009. if test "$ac_init_help" = "recursive"; then
  2010. # If there are subdirs, report their specific --help.
  2011. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
  2012. test -d "$ac_dir" ||
  2013. { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
  2014. continue
  2015. ac_builddir=.
  2016. case "$ac_dir" in
  2017. .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
  2018. *)
  2019. ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
  2020. # A ".." for each directory in $ac_dir_suffix.
  2021. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
  2022. case $ac_top_builddir_sub in
  2023. "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  2024. *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  2025. esac ;;
  2026. esac
  2027. ac_abs_top_builddir=$ac_pwd
  2028. ac_abs_builddir=$ac_pwd$ac_dir_suffix
  2029. # for backward compatibility:
  2030. ac_top_builddir=$ac_top_build_prefix
  2031. case $srcdir in
  2032. .) # We are building in place.
  2033. ac_srcdir=.
  2034. ac_top_srcdir=$ac_top_builddir_sub
  2035. ac_abs_top_srcdir=$ac_pwd ;;
  2036. [\\/]* | ?:[\\/]* ) # Absolute name.
  2037. ac_srcdir=$srcdir$ac_dir_suffix;
  2038. ac_top_srcdir=$srcdir
  2039. ac_abs_top_srcdir=$srcdir ;;
  2040. *) # Relative name.
  2041. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
  2042. ac_top_srcdir=$ac_top_build_prefix$srcdir
  2043. ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
  2044. esac
  2045. ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
  2046. cd "$ac_dir" || { ac_status=$?; continue; }
  2047. # Check for guested configure.
  2048. if test -f "$ac_srcdir/configure.gnu"; then
  2049. echo &&
  2050. $SHELL "$ac_srcdir/configure.gnu" --help=recursive
  2051. elif test -f "$ac_srcdir/configure"; then
  2052. echo &&
  2053. $SHELL "$ac_srcdir/configure" --help=recursive
  2054. else
  2055. $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
  2056. fi || ac_status=$?
  2057. cd "$ac_pwd" || { ac_status=$?; break; }
  2058. done
  2059. fi
  2060. test -n "$ac_init_help" && exit $ac_status
  2061. if $ac_init_version; then
  2062. cat <<\_ACEOF
  2063. asterisk configure trunk
  2064. generated by GNU Autoconf 2.69
  2065. Copyright (C) 2012 Free Software Foundation, Inc.
  2066. This configure script is free software; the Free Software Foundation
  2067. gives unlimited permission to copy, distribute and modify it.
  2068. "Asterisk"
  2069. _ACEOF
  2070. exit
  2071. fi
  2072. ## ------------------------ ##
  2073. ## Autoconf initialization. ##
  2074. ## ------------------------ ##
  2075. # ac_fn_c_try_compile LINENO
  2076. # --------------------------
  2077. # Try to compile conftest.$ac_ext, and return whether this succeeded.
  2078. ac_fn_c_try_compile ()
  2079. {
  2080. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2081. rm -f conftest.$ac_objext
  2082. if { { ac_try="$ac_compile"
  2083. case "(($ac_try" in
  2084. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2085. *) ac_try_echo=$ac_try;;
  2086. esac
  2087. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2088. $as_echo "$ac_try_echo"; } >&5
  2089. (eval "$ac_compile") 2>conftest.err
  2090. ac_status=$?
  2091. if test -s conftest.err; then
  2092. grep -v '^ *+' conftest.err >conftest.er1
  2093. cat conftest.er1 >&5
  2094. mv -f conftest.er1 conftest.err
  2095. fi
  2096. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2097. test $ac_status = 0; } && {
  2098. test -z "$ac_c_werror_flag" ||
  2099. test ! -s conftest.err
  2100. } && test -s conftest.$ac_objext; then :
  2101. ac_retval=0
  2102. else
  2103. $as_echo "$as_me: failed program was:" >&5
  2104. sed 's/^/| /' conftest.$ac_ext >&5
  2105. ac_retval=1
  2106. fi
  2107. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2108. as_fn_set_status $ac_retval
  2109. } # ac_fn_c_try_compile
  2110. # ac_fn_c_try_cpp LINENO
  2111. # ----------------------
  2112. # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
  2113. ac_fn_c_try_cpp ()
  2114. {
  2115. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2116. if { { ac_try="$ac_cpp conftest.$ac_ext"
  2117. case "(($ac_try" in
  2118. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2119. *) ac_try_echo=$ac_try;;
  2120. esac
  2121. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2122. $as_echo "$ac_try_echo"; } >&5
  2123. (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
  2124. ac_status=$?
  2125. if test -s conftest.err; then
  2126. grep -v '^ *+' conftest.err >conftest.er1
  2127. cat conftest.er1 >&5
  2128. mv -f conftest.er1 conftest.err
  2129. fi
  2130. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2131. test $ac_status = 0; } > conftest.i && {
  2132. test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
  2133. test ! -s conftest.err
  2134. }; then :
  2135. ac_retval=0
  2136. else
  2137. $as_echo "$as_me: failed program was:" >&5
  2138. sed 's/^/| /' conftest.$ac_ext >&5
  2139. ac_retval=1
  2140. fi
  2141. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2142. as_fn_set_status $ac_retval
  2143. } # ac_fn_c_try_cpp
  2144. # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
  2145. # -------------------------------------------------------
  2146. # Tests whether HEADER exists, giving a warning if it cannot be compiled using
  2147. # the include files in INCLUDES and setting the cache variable VAR
  2148. # accordingly.
  2149. ac_fn_c_check_header_mongrel ()
  2150. {
  2151. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2152. if eval \${$3+:} false; then :
  2153. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2154. $as_echo_n "checking for $2... " >&6; }
  2155. if eval \${$3+:} false; then :
  2156. $as_echo_n "(cached) " >&6
  2157. fi
  2158. eval ac_res=\$$3
  2159. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2160. $as_echo "$ac_res" >&6; }
  2161. else
  2162. # Is the header compilable?
  2163. { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
  2164. $as_echo_n "checking $2 usability... " >&6; }
  2165. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2166. /* end confdefs.h. */
  2167. $4
  2168. #include <$2>
  2169. _ACEOF
  2170. if ac_fn_c_try_compile "$LINENO"; then :
  2171. ac_header_compiler=yes
  2172. else
  2173. ac_header_compiler=no
  2174. fi
  2175. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2176. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
  2177. $as_echo "$ac_header_compiler" >&6; }
  2178. # Is the header present?
  2179. { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
  2180. $as_echo_n "checking $2 presence... " >&6; }
  2181. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2182. /* end confdefs.h. */
  2183. #include <$2>
  2184. _ACEOF
  2185. if ac_fn_c_try_cpp "$LINENO"; then :
  2186. ac_header_preproc=yes
  2187. else
  2188. ac_header_preproc=no
  2189. fi
  2190. rm -f conftest.err conftest.i conftest.$ac_ext
  2191. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
  2192. $as_echo "$ac_header_preproc" >&6; }
  2193. # So? What about this header?
  2194. case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
  2195. yes:no: )
  2196. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
  2197. $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
  2198. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
  2199. $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
  2200. ;;
  2201. no:yes:* )
  2202. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
  2203. $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
  2204. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
  2205. $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
  2206. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
  2207. $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
  2208. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
  2209. $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
  2210. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
  2211. $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
  2212. ( $as_echo "## ------------------------------------------ ##
  2213. ## Report this to https://issues.asterisk.org ##
  2214. ## ------------------------------------------ ##"
  2215. ) | sed "s/^/$as_me: WARNING: /" >&2
  2216. ;;
  2217. esac
  2218. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2219. $as_echo_n "checking for $2... " >&6; }
  2220. if eval \${$3+:} false; then :
  2221. $as_echo_n "(cached) " >&6
  2222. else
  2223. eval "$3=\$ac_header_compiler"
  2224. fi
  2225. eval ac_res=\$$3
  2226. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2227. $as_echo "$ac_res" >&6; }
  2228. fi
  2229. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2230. } # ac_fn_c_check_header_mongrel
  2231. # ac_fn_c_try_run LINENO
  2232. # ----------------------
  2233. # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
  2234. # that executables *can* be run.
  2235. ac_fn_c_try_run ()
  2236. {
  2237. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2238. if { { ac_try="$ac_link"
  2239. case "(($ac_try" in
  2240. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2241. *) ac_try_echo=$ac_try;;
  2242. esac
  2243. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2244. $as_echo "$ac_try_echo"; } >&5
  2245. (eval "$ac_link") 2>&5
  2246. ac_status=$?
  2247. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2248. test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
  2249. { { case "(($ac_try" in
  2250. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2251. *) ac_try_echo=$ac_try;;
  2252. esac
  2253. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2254. $as_echo "$ac_try_echo"; } >&5
  2255. (eval "$ac_try") 2>&5
  2256. ac_status=$?
  2257. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2258. test $ac_status = 0; }; }; then :
  2259. ac_retval=0
  2260. else
  2261. $as_echo "$as_me: program exited with status $ac_status" >&5
  2262. $as_echo "$as_me: failed program was:" >&5
  2263. sed 's/^/| /' conftest.$ac_ext >&5
  2264. ac_retval=$ac_status
  2265. fi
  2266. rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  2267. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2268. as_fn_set_status $ac_retval
  2269. } # ac_fn_c_try_run
  2270. # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
  2271. # -------------------------------------------------------
  2272. # Tests whether HEADER exists and can be compiled using the include files in
  2273. # INCLUDES, setting the cache variable VAR accordingly.
  2274. ac_fn_c_check_header_compile ()
  2275. {
  2276. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2277. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2278. $as_echo_n "checking for $2... " >&6; }
  2279. if eval \${$3+:} false; then :
  2280. $as_echo_n "(cached) " >&6
  2281. else
  2282. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2283. /* end confdefs.h. */
  2284. $4
  2285. #include <$2>
  2286. _ACEOF
  2287. if ac_fn_c_try_compile "$LINENO"; then :
  2288. eval "$3=yes"
  2289. else
  2290. eval "$3=no"
  2291. fi
  2292. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2293. fi
  2294. eval ac_res=\$$3
  2295. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2296. $as_echo "$ac_res" >&6; }
  2297. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2298. } # ac_fn_c_check_header_compile
  2299. # ac_fn_cxx_try_compile LINENO
  2300. # ----------------------------
  2301. # Try to compile conftest.$ac_ext, and return whether this succeeded.
  2302. ac_fn_cxx_try_compile ()
  2303. {
  2304. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2305. rm -f conftest.$ac_objext
  2306. if { { ac_try="$ac_compile"
  2307. case "(($ac_try" in
  2308. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2309. *) ac_try_echo=$ac_try;;
  2310. esac
  2311. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2312. $as_echo "$ac_try_echo"; } >&5
  2313. (eval "$ac_compile") 2>conftest.err
  2314. ac_status=$?
  2315. if test -s conftest.err; then
  2316. grep -v '^ *+' conftest.err >conftest.er1
  2317. cat conftest.er1 >&5
  2318. mv -f conftest.er1 conftest.err
  2319. fi
  2320. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2321. test $ac_status = 0; } && {
  2322. test -z "$ac_cxx_werror_flag" ||
  2323. test ! -s conftest.err
  2324. } && test -s conftest.$ac_objext; then :
  2325. ac_retval=0
  2326. else
  2327. $as_echo "$as_me: failed program was:" >&5
  2328. sed 's/^/| /' conftest.$ac_ext >&5
  2329. ac_retval=1
  2330. fi
  2331. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2332. as_fn_set_status $ac_retval
  2333. } # ac_fn_cxx_try_compile
  2334. # ac_fn_cxx_try_cpp LINENO
  2335. # ------------------------
  2336. # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
  2337. ac_fn_cxx_try_cpp ()
  2338. {
  2339. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2340. if { { ac_try="$ac_cpp conftest.$ac_ext"
  2341. case "(($ac_try" in
  2342. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2343. *) ac_try_echo=$ac_try;;
  2344. esac
  2345. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2346. $as_echo "$ac_try_echo"; } >&5
  2347. (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
  2348. ac_status=$?
  2349. if test -s conftest.err; then
  2350. grep -v '^ *+' conftest.err >conftest.er1
  2351. cat conftest.er1 >&5
  2352. mv -f conftest.er1 conftest.err
  2353. fi
  2354. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2355. test $ac_status = 0; } > conftest.i && {
  2356. test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
  2357. test ! -s conftest.err
  2358. }; then :
  2359. ac_retval=0
  2360. else
  2361. $as_echo "$as_me: failed program was:" >&5
  2362. sed 's/^/| /' conftest.$ac_ext >&5
  2363. ac_retval=1
  2364. fi
  2365. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2366. as_fn_set_status $ac_retval
  2367. } # ac_fn_cxx_try_cpp
  2368. # ac_fn_c_try_link LINENO
  2369. # -----------------------
  2370. # Try to link conftest.$ac_ext, and return whether this succeeded.
  2371. ac_fn_c_try_link ()
  2372. {
  2373. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2374. rm -f conftest.$ac_objext conftest$ac_exeext
  2375. if { { ac_try="$ac_link"
  2376. case "(($ac_try" in
  2377. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2378. *) ac_try_echo=$ac_try;;
  2379. esac
  2380. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2381. $as_echo "$ac_try_echo"; } >&5
  2382. (eval "$ac_link") 2>conftest.err
  2383. ac_status=$?
  2384. if test -s conftest.err; then
  2385. grep -v '^ *+' conftest.err >conftest.er1
  2386. cat conftest.er1 >&5
  2387. mv -f conftest.er1 conftest.err
  2388. fi
  2389. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2390. test $ac_status = 0; } && {
  2391. test -z "$ac_c_werror_flag" ||
  2392. test ! -s conftest.err
  2393. } && test -s conftest$ac_exeext && {
  2394. test "$cross_compiling" = yes ||
  2395. test -x conftest$ac_exeext
  2396. }; then :
  2397. ac_retval=0
  2398. else
  2399. $as_echo "$as_me: failed program was:" >&5
  2400. sed 's/^/| /' conftest.$ac_ext >&5
  2401. ac_retval=1
  2402. fi
  2403. # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  2404. # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  2405. # interfere with the next link command; also delete a directory that is
  2406. # left behind by Apple's compiler. We do this before executing the actions.
  2407. rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  2408. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2409. as_fn_set_status $ac_retval
  2410. } # ac_fn_c_try_link
  2411. # ac_fn_c_check_func LINENO FUNC VAR
  2412. # ----------------------------------
  2413. # Tests whether FUNC exists, setting the cache variable VAR accordingly
  2414. ac_fn_c_check_func ()
  2415. {
  2416. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2417. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2418. $as_echo_n "checking for $2... " >&6; }
  2419. if eval \${$3+:} false; then :
  2420. $as_echo_n "(cached) " >&6
  2421. else
  2422. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2423. /* end confdefs.h. */
  2424. /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
  2425. For example, HP-UX 11i <limits.h> declares gettimeofday. */
  2426. #define $2 innocuous_$2
  2427. /* System header to define __stub macros and hopefully few prototypes,
  2428. which can conflict with char $2 (); below.
  2429. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  2430. <limits.h> exists even on freestanding compilers. */
  2431. #ifdef __STDC__
  2432. # include <limits.h>
  2433. #else
  2434. # include <assert.h>
  2435. #endif
  2436. #undef $2
  2437. /* Override any GCC internal prototype to avoid an error.
  2438. Use char because int might match the return type of a GCC
  2439. builtin and then its argument prototype would still apply. */
  2440. #ifdef __cplusplus
  2441. extern "C"
  2442. #endif
  2443. char $2 ();
  2444. /* The GNU C library defines this for functions which it implements
  2445. to always fail with ENOSYS. Some functions are actually named
  2446. something starting with __ and the normal name is an alias. */
  2447. #if defined __stub_$2 || defined __stub___$2
  2448. choke me
  2449. #endif
  2450. int
  2451. main ()
  2452. {
  2453. return $2 ();
  2454. ;
  2455. return 0;
  2456. }
  2457. _ACEOF
  2458. if ac_fn_c_try_link "$LINENO"; then :
  2459. eval "$3=yes"
  2460. else
  2461. eval "$3=no"
  2462. fi
  2463. rm -f core conftest.err conftest.$ac_objext \
  2464. conftest$ac_exeext conftest.$ac_ext
  2465. fi
  2466. eval ac_res=\$$3
  2467. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2468. $as_echo "$ac_res" >&6; }
  2469. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2470. } # ac_fn_c_check_func
  2471. # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
  2472. # -------------------------------------------
  2473. # Tests whether TYPE exists after having included INCLUDES, setting cache
  2474. # variable VAR accordingly.
  2475. ac_fn_c_check_type ()
  2476. {
  2477. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2478. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2479. $as_echo_n "checking for $2... " >&6; }
  2480. if eval \${$3+:} false; then :
  2481. $as_echo_n "(cached) " >&6
  2482. else
  2483. eval "$3=no"
  2484. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2485. /* end confdefs.h. */
  2486. $4
  2487. int
  2488. main ()
  2489. {
  2490. if (sizeof ($2))
  2491. return 0;
  2492. ;
  2493. return 0;
  2494. }
  2495. _ACEOF
  2496. if ac_fn_c_try_compile "$LINENO"; then :
  2497. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2498. /* end confdefs.h. */
  2499. $4
  2500. int
  2501. main ()
  2502. {
  2503. if (sizeof (($2)))
  2504. return 0;
  2505. ;
  2506. return 0;
  2507. }
  2508. _ACEOF
  2509. if ac_fn_c_try_compile "$LINENO"; then :
  2510. else
  2511. eval "$3=yes"
  2512. fi
  2513. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2514. fi
  2515. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2516. fi
  2517. eval ac_res=\$$3
  2518. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2519. $as_echo "$ac_res" >&6; }
  2520. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2521. } # ac_fn_c_check_type
  2522. # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
  2523. # ----------------------------------------------------
  2524. # Tries to find if the field MEMBER exists in type AGGR, after including
  2525. # INCLUDES, setting cache variable VAR accordingly.
  2526. ac_fn_c_check_member ()
  2527. {
  2528. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2529. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
  2530. $as_echo_n "checking for $2.$3... " >&6; }
  2531. if eval \${$4+:} false; then :
  2532. $as_echo_n "(cached) " >&6
  2533. else
  2534. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2535. /* end confdefs.h. */
  2536. $5
  2537. int
  2538. main ()
  2539. {
  2540. static $2 ac_aggr;
  2541. if (ac_aggr.$3)
  2542. return 0;
  2543. ;
  2544. return 0;
  2545. }
  2546. _ACEOF
  2547. if ac_fn_c_try_compile "$LINENO"; then :
  2548. eval "$4=yes"
  2549. else
  2550. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2551. /* end confdefs.h. */
  2552. $5
  2553. int
  2554. main ()
  2555. {
  2556. static $2 ac_aggr;
  2557. if (sizeof ac_aggr.$3)
  2558. return 0;
  2559. ;
  2560. return 0;
  2561. }
  2562. _ACEOF
  2563. if ac_fn_c_try_compile "$LINENO"; then :
  2564. eval "$4=yes"
  2565. else
  2566. eval "$4=no"
  2567. fi
  2568. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2569. fi
  2570. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2571. fi
  2572. eval ac_res=\$$4
  2573. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2574. $as_echo "$ac_res" >&6; }
  2575. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2576. } # ac_fn_c_check_member
  2577. # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
  2578. # --------------------------------------------
  2579. # Tries to find the compile-time value of EXPR in a program that includes
  2580. # INCLUDES, setting VAR accordingly. Returns whether the value could be
  2581. # computed
  2582. ac_fn_c_compute_int ()
  2583. {
  2584. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2585. if test "$cross_compiling" = yes; then
  2586. # Depending upon the size, compute the lo and hi bounds.
  2587. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2588. /* end confdefs.h. */
  2589. $4
  2590. int
  2591. main ()
  2592. {
  2593. static int test_array [1 - 2 * !(($2) >= 0)];
  2594. test_array [0] = 0;
  2595. return test_array [0];
  2596. ;
  2597. return 0;
  2598. }
  2599. _ACEOF
  2600. if ac_fn_c_try_compile "$LINENO"; then :
  2601. ac_lo=0 ac_mid=0
  2602. while :; do
  2603. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2604. /* end confdefs.h. */
  2605. $4
  2606. int
  2607. main ()
  2608. {
  2609. static int test_array [1 - 2 * !(($2) <= $ac_mid)];
  2610. test_array [0] = 0;
  2611. return test_array [0];
  2612. ;
  2613. return 0;
  2614. }
  2615. _ACEOF
  2616. if ac_fn_c_try_compile "$LINENO"; then :
  2617. ac_hi=$ac_mid; break
  2618. else
  2619. as_fn_arith $ac_mid + 1 && ac_lo=$as_val
  2620. if test $ac_lo -le $ac_mid; then
  2621. ac_lo= ac_hi=
  2622. break
  2623. fi
  2624. as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
  2625. fi
  2626. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2627. done
  2628. else
  2629. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2630. /* end confdefs.h. */
  2631. $4
  2632. int
  2633. main ()
  2634. {
  2635. static int test_array [1 - 2 * !(($2) < 0)];
  2636. test_array [0] = 0;
  2637. return test_array [0];
  2638. ;
  2639. return 0;
  2640. }
  2641. _ACEOF
  2642. if ac_fn_c_try_compile "$LINENO"; then :
  2643. ac_hi=-1 ac_mid=-1
  2644. while :; do
  2645. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2646. /* end confdefs.h. */
  2647. $4
  2648. int
  2649. main ()
  2650. {
  2651. static int test_array [1 - 2 * !(($2) >= $ac_mid)];
  2652. test_array [0] = 0;
  2653. return test_array [0];
  2654. ;
  2655. return 0;
  2656. }
  2657. _ACEOF
  2658. if ac_fn_c_try_compile "$LINENO"; then :
  2659. ac_lo=$ac_mid; break
  2660. else
  2661. as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
  2662. if test $ac_mid -le $ac_hi; then
  2663. ac_lo= ac_hi=
  2664. break
  2665. fi
  2666. as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
  2667. fi
  2668. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2669. done
  2670. else
  2671. ac_lo= ac_hi=
  2672. fi
  2673. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2674. fi
  2675. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2676. # Binary search between lo and hi bounds.
  2677. while test "x$ac_lo" != "x$ac_hi"; do
  2678. as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
  2679. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2680. /* end confdefs.h. */
  2681. $4
  2682. int
  2683. main ()
  2684. {
  2685. static int test_array [1 - 2 * !(($2) <= $ac_mid)];
  2686. test_array [0] = 0;
  2687. return test_array [0];
  2688. ;
  2689. return 0;
  2690. }
  2691. _ACEOF
  2692. if ac_fn_c_try_compile "$LINENO"; then :
  2693. ac_hi=$ac_mid
  2694. else
  2695. as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
  2696. fi
  2697. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2698. done
  2699. case $ac_lo in #((
  2700. ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
  2701. '') ac_retval=1 ;;
  2702. esac
  2703. else
  2704. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2705. /* end confdefs.h. */
  2706. $4
  2707. static long int longval () { return $2; }
  2708. static unsigned long int ulongval () { return $2; }
  2709. #include <stdio.h>
  2710. #include <stdlib.h>
  2711. int
  2712. main ()
  2713. {
  2714. FILE *f = fopen ("conftest.val", "w");
  2715. if (! f)
  2716. return 1;
  2717. if (($2) < 0)
  2718. {
  2719. long int i = longval ();
  2720. if (i != ($2))
  2721. return 1;
  2722. fprintf (f, "%ld", i);
  2723. }
  2724. else
  2725. {
  2726. unsigned long int i = ulongval ();
  2727. if (i != ($2))
  2728. return 1;
  2729. fprintf (f, "%lu", i);
  2730. }
  2731. /* Do not output a trailing newline, as this causes \r\n confusion
  2732. on some platforms. */
  2733. return ferror (f) || fclose (f) != 0;
  2734. ;
  2735. return 0;
  2736. }
  2737. _ACEOF
  2738. if ac_fn_c_try_run "$LINENO"; then :
  2739. echo >>conftest.val; read $3 <conftest.val; ac_retval=0
  2740. else
  2741. ac_retval=1
  2742. fi
  2743. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  2744. conftest.$ac_objext conftest.beam conftest.$ac_ext
  2745. rm -f conftest.val
  2746. fi
  2747. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2748. as_fn_set_status $ac_retval
  2749. } # ac_fn_c_compute_int
  2750. # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
  2751. # ---------------------------------------------------------
  2752. # Tests whether HEADER exists, giving a warning if it cannot be compiled using
  2753. # the include files in INCLUDES and setting the cache variable VAR
  2754. # accordingly.
  2755. ac_fn_cxx_check_header_mongrel ()
  2756. {
  2757. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2758. if eval \${$3+:} false; then :
  2759. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2760. $as_echo_n "checking for $2... " >&6; }
  2761. if eval \${$3+:} false; then :
  2762. $as_echo_n "(cached) " >&6
  2763. fi
  2764. eval ac_res=\$$3
  2765. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2766. $as_echo "$ac_res" >&6; }
  2767. else
  2768. # Is the header compilable?
  2769. { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
  2770. $as_echo_n "checking $2 usability... " >&6; }
  2771. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2772. /* end confdefs.h. */
  2773. $4
  2774. #include <$2>
  2775. _ACEOF
  2776. if ac_fn_cxx_try_compile "$LINENO"; then :
  2777. ac_header_compiler=yes
  2778. else
  2779. ac_header_compiler=no
  2780. fi
  2781. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2782. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
  2783. $as_echo "$ac_header_compiler" >&6; }
  2784. # Is the header present?
  2785. { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
  2786. $as_echo_n "checking $2 presence... " >&6; }
  2787. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2788. /* end confdefs.h. */
  2789. #include <$2>
  2790. _ACEOF
  2791. if ac_fn_cxx_try_cpp "$LINENO"; then :
  2792. ac_header_preproc=yes
  2793. else
  2794. ac_header_preproc=no
  2795. fi
  2796. rm -f conftest.err conftest.i conftest.$ac_ext
  2797. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
  2798. $as_echo "$ac_header_preproc" >&6; }
  2799. # So? What about this header?
  2800. case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
  2801. yes:no: )
  2802. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
  2803. $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
  2804. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
  2805. $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
  2806. ;;
  2807. no:yes:* )
  2808. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
  2809. $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
  2810. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
  2811. $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
  2812. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
  2813. $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
  2814. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
  2815. $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
  2816. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
  2817. $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
  2818. ( $as_echo "## ------------------------------------------ ##
  2819. ## Report this to https://issues.asterisk.org ##
  2820. ## ------------------------------------------ ##"
  2821. ) | sed "s/^/$as_me: WARNING: /" >&2
  2822. ;;
  2823. esac
  2824. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2825. $as_echo_n "checking for $2... " >&6; }
  2826. if eval \${$3+:} false; then :
  2827. $as_echo_n "(cached) " >&6
  2828. else
  2829. eval "$3=\$ac_header_compiler"
  2830. fi
  2831. eval ac_res=\$$3
  2832. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2833. $as_echo "$ac_res" >&6; }
  2834. fi
  2835. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2836. } # ac_fn_cxx_check_header_mongrel
  2837. # ac_fn_cxx_try_link LINENO
  2838. # -------------------------
  2839. # Try to link conftest.$ac_ext, and return whether this succeeded.
  2840. ac_fn_cxx_try_link ()
  2841. {
  2842. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2843. rm -f conftest.$ac_objext conftest$ac_exeext
  2844. if { { ac_try="$ac_link"
  2845. case "(($ac_try" in
  2846. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2847. *) ac_try_echo=$ac_try;;
  2848. esac
  2849. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2850. $as_echo "$ac_try_echo"; } >&5
  2851. (eval "$ac_link") 2>conftest.err
  2852. ac_status=$?
  2853. if test -s conftest.err; then
  2854. grep -v '^ *+' conftest.err >conftest.er1
  2855. cat conftest.er1 >&5
  2856. mv -f conftest.er1 conftest.err
  2857. fi
  2858. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2859. test $ac_status = 0; } && {
  2860. test -z "$ac_cxx_werror_flag" ||
  2861. test ! -s conftest.err
  2862. } && test -s conftest$ac_exeext && {
  2863. test "$cross_compiling" = yes ||
  2864. test -x conftest$ac_exeext
  2865. }; then :
  2866. ac_retval=0
  2867. else
  2868. $as_echo "$as_me: failed program was:" >&5
  2869. sed 's/^/| /' conftest.$ac_ext >&5
  2870. ac_retval=1
  2871. fi
  2872. # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  2873. # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  2874. # interfere with the next link command; also delete a directory that is
  2875. # left behind by Apple's compiler. We do this before executing the actions.
  2876. rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  2877. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2878. as_fn_set_status $ac_retval
  2879. } # ac_fn_cxx_try_link
  2880. # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
  2881. # ---------------------------------------------------------
  2882. # Tests whether HEADER exists and can be compiled using the include files in
  2883. # INCLUDES, setting the cache variable VAR accordingly.
  2884. ac_fn_cxx_check_header_compile ()
  2885. {
  2886. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2887. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2888. $as_echo_n "checking for $2... " >&6; }
  2889. if eval \${$3+:} false; then :
  2890. $as_echo_n "(cached) " >&6
  2891. else
  2892. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2893. /* end confdefs.h. */
  2894. $4
  2895. #include <$2>
  2896. _ACEOF
  2897. if ac_fn_cxx_try_compile "$LINENO"; then :
  2898. eval "$3=yes"
  2899. else
  2900. eval "$3=no"
  2901. fi
  2902. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2903. fi
  2904. eval ac_res=\$$3
  2905. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2906. $as_echo "$ac_res" >&6; }
  2907. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2908. } # ac_fn_cxx_check_header_compile
  2909. cat >config.log <<_ACEOF
  2910. This file contains any messages produced by compilers while
  2911. running configure, to aid debugging if configure makes a mistake.
  2912. It was created by asterisk $as_me trunk, which was
  2913. generated by GNU Autoconf 2.69. Invocation command line was
  2914. $ $0 $@
  2915. _ACEOF
  2916. exec 5>>config.log
  2917. {
  2918. cat <<_ASUNAME
  2919. ## --------- ##
  2920. ## Platform. ##
  2921. ## --------- ##
  2922. hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
  2923. uname -m = `(uname -m) 2>/dev/null || echo unknown`
  2924. uname -r = `(uname -r) 2>/dev/null || echo unknown`
  2925. uname -s = `(uname -s) 2>/dev/null || echo unknown`
  2926. uname -v = `(uname -v) 2>/dev/null || echo unknown`
  2927. /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
  2928. /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
  2929. /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
  2930. /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
  2931. /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
  2932. /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
  2933. /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
  2934. /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
  2935. /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
  2936. _ASUNAME
  2937. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  2938. for as_dir in $PATH
  2939. do
  2940. IFS=$as_save_IFS
  2941. test -z "$as_dir" && as_dir=.
  2942. $as_echo "PATH: $as_dir"
  2943. done
  2944. IFS=$as_save_IFS
  2945. } >&5
  2946. cat >&5 <<_ACEOF
  2947. ## ----------- ##
  2948. ## Core tests. ##
  2949. ## ----------- ##
  2950. _ACEOF
  2951. # Keep a trace of the command line.
  2952. # Strip out --no-create and --no-recursion so they do not pile up.
  2953. # Strip out --silent because we don't want to record it for future runs.
  2954. # Also quote any args containing shell meta-characters.
  2955. # Make two passes to allow for proper duplicate-argument suppression.
  2956. ac_configure_args=
  2957. ac_configure_args0=
  2958. ac_configure_args1=
  2959. ac_must_keep_next=false
  2960. for ac_pass in 1 2
  2961. do
  2962. for ac_arg
  2963. do
  2964. case $ac_arg in
  2965. -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
  2966. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  2967. | -silent | --silent | --silen | --sile | --sil)
  2968. continue ;;
  2969. *\'*)
  2970. ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
  2971. esac
  2972. case $ac_pass in
  2973. 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
  2974. 2)
  2975. as_fn_append ac_configure_args1 " '$ac_arg'"
  2976. if test $ac_must_keep_next = true; then
  2977. ac_must_keep_next=false # Got value, back to normal.
  2978. else
  2979. case $ac_arg in
  2980. *=* | --config-cache | -C | -disable-* | --disable-* \
  2981. | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
  2982. | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
  2983. | -with-* | --with-* | -without-* | --without-* | --x)
  2984. case "$ac_configure_args0 " in
  2985. "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
  2986. esac
  2987. ;;
  2988. -* ) ac_must_keep_next=true ;;
  2989. esac
  2990. fi
  2991. as_fn_append ac_configure_args " '$ac_arg'"
  2992. ;;
  2993. esac
  2994. done
  2995. done
  2996. { ac_configure_args0=; unset ac_configure_args0;}
  2997. { ac_configure_args1=; unset ac_configure_args1;}
  2998. # When interrupted or exit'd, cleanup temporary files, and complete
  2999. # config.log. We remove comments because anyway the quotes in there
  3000. # would cause problems or look ugly.
  3001. # WARNING: Use '\'' to represent an apostrophe within the trap.
  3002. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
  3003. trap 'exit_status=$?
  3004. # Save into config.log some information that might help in debugging.
  3005. {
  3006. echo
  3007. $as_echo "## ---------------- ##
  3008. ## Cache variables. ##
  3009. ## ---------------- ##"
  3010. echo
  3011. # The following way of writing the cache mishandles newlines in values,
  3012. (
  3013. for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
  3014. eval ac_val=\$$ac_var
  3015. case $ac_val in #(
  3016. *${as_nl}*)
  3017. case $ac_var in #(
  3018. *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
  3019. $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
  3020. esac
  3021. case $ac_var in #(
  3022. _ | IFS | as_nl) ;; #(
  3023. BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
  3024. *) { eval $ac_var=; unset $ac_var;} ;;
  3025. esac ;;
  3026. esac
  3027. done
  3028. (set) 2>&1 |
  3029. case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
  3030. *${as_nl}ac_space=\ *)
  3031. sed -n \
  3032. "s/'\''/'\''\\\\'\'''\''/g;
  3033. s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
  3034. ;; #(
  3035. *)
  3036. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
  3037. ;;
  3038. esac |
  3039. sort
  3040. )
  3041. echo
  3042. $as_echo "## ----------------- ##
  3043. ## Output variables. ##
  3044. ## ----------------- ##"
  3045. echo
  3046. for ac_var in $ac_subst_vars
  3047. do
  3048. eval ac_val=\$$ac_var
  3049. case $ac_val in
  3050. *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
  3051. esac
  3052. $as_echo "$ac_var='\''$ac_val'\''"
  3053. done | sort
  3054. echo
  3055. if test -n "$ac_subst_files"; then
  3056. $as_echo "## ------------------- ##
  3057. ## File substitutions. ##
  3058. ## ------------------- ##"
  3059. echo
  3060. for ac_var in $ac_subst_files
  3061. do
  3062. eval ac_val=\$$ac_var
  3063. case $ac_val in
  3064. *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
  3065. esac
  3066. $as_echo "$ac_var='\''$ac_val'\''"
  3067. done | sort
  3068. echo
  3069. fi
  3070. if test -s confdefs.h; then
  3071. $as_echo "## ----------- ##
  3072. ## confdefs.h. ##
  3073. ## ----------- ##"
  3074. echo
  3075. cat confdefs.h
  3076. echo
  3077. fi
  3078. test "$ac_signal" != 0 &&
  3079. $as_echo "$as_me: caught signal $ac_signal"
  3080. $as_echo "$as_me: exit $exit_status"
  3081. } >&5
  3082. rm -f core *.core core.conftest.* &&
  3083. rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
  3084. exit $exit_status
  3085. ' 0
  3086. for ac_signal in 1 2 13 15; do
  3087. trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
  3088. done
  3089. ac_signal=0
  3090. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  3091. rm -f -r conftest* confdefs.h
  3092. $as_echo "/* confdefs.h */" > confdefs.h
  3093. # Predefined preprocessor variables.
  3094. cat >>confdefs.h <<_ACEOF
  3095. #define PACKAGE_NAME "$PACKAGE_NAME"
  3096. _ACEOF
  3097. cat >>confdefs.h <<_ACEOF
  3098. #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
  3099. _ACEOF
  3100. cat >>confdefs.h <<_ACEOF
  3101. #define PACKAGE_VERSION "$PACKAGE_VERSION"
  3102. _ACEOF
  3103. cat >>confdefs.h <<_ACEOF
  3104. #define PACKAGE_STRING "$PACKAGE_STRING"
  3105. _ACEOF
  3106. cat >>confdefs.h <<_ACEOF
  3107. #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
  3108. _ACEOF
  3109. cat >>confdefs.h <<_ACEOF
  3110. #define PACKAGE_URL "$PACKAGE_URL"
  3111. _ACEOF
  3112. # Let the site file select an alternate cache file if it wants to.
  3113. # Prefer an explicitly selected file to automatically selected ones.
  3114. ac_site_file1=NONE
  3115. ac_site_file2=NONE
  3116. if test -n "$CONFIG_SITE"; then
  3117. # We do not want a PATH search for config.site.
  3118. case $CONFIG_SITE in #((
  3119. -*) ac_site_file1=./$CONFIG_SITE;;
  3120. */*) ac_site_file1=$CONFIG_SITE;;
  3121. *) ac_site_file1=./$CONFIG_SITE;;
  3122. esac
  3123. elif test "x$prefix" != xNONE; then
  3124. ac_site_file1=$prefix/share/config.site
  3125. ac_site_file2=$prefix/etc/config.site
  3126. else
  3127. ac_site_file1=$ac_default_prefix/share/config.site
  3128. ac_site_file2=$ac_default_prefix/etc/config.site
  3129. fi
  3130. for ac_site_file in "$ac_site_file1" "$ac_site_file2"
  3131. do
  3132. test "x$ac_site_file" = xNONE && continue
  3133. if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
  3134. { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
  3135. $as_echo "$as_me: loading site script $ac_site_file" >&6;}
  3136. sed 's/^/| /' "$ac_site_file" >&5
  3137. . "$ac_site_file" \
  3138. || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  3139. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  3140. as_fn_error $? "failed to load site script $ac_site_file
  3141. See \`config.log' for more details" "$LINENO" 5; }
  3142. fi
  3143. done
  3144. if test -r "$cache_file"; then
  3145. # Some versions of bash will fail to source /dev/null (special files
  3146. # actually), so we avoid doing that. DJGPP emulates it as a regular file.
  3147. if test /dev/null != "$cache_file" && test -f "$cache_file"; then
  3148. { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
  3149. $as_echo "$as_me: loading cache $cache_file" >&6;}
  3150. case $cache_file in
  3151. [\\/]* | ?:[\\/]* ) . "$cache_file";;
  3152. *) . "./$cache_file";;
  3153. esac
  3154. fi
  3155. else
  3156. { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
  3157. $as_echo "$as_me: creating cache $cache_file" >&6;}
  3158. >$cache_file
  3159. fi
  3160. as_fn_append ac_header_list " stdlib.h"
  3161. as_fn_append ac_header_list " unistd.h"
  3162. as_fn_append ac_header_list " sys/param.h"
  3163. as_fn_append ac_header_list " utime.h"
  3164. # Check that the precious variables saved in the cache have kept the same
  3165. # value.
  3166. ac_cache_corrupted=false
  3167. for ac_var in $ac_precious_vars; do
  3168. eval ac_old_set=\$ac_cv_env_${ac_var}_set
  3169. eval ac_new_set=\$ac_env_${ac_var}_set
  3170. eval ac_old_val=\$ac_cv_env_${ac_var}_value
  3171. eval ac_new_val=\$ac_env_${ac_var}_value
  3172. case $ac_old_set,$ac_new_set in
  3173. set,)
  3174. { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
  3175. $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
  3176. ac_cache_corrupted=: ;;
  3177. ,set)
  3178. { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
  3179. $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
  3180. ac_cache_corrupted=: ;;
  3181. ,);;
  3182. *)
  3183. if test "x$ac_old_val" != "x$ac_new_val"; then
  3184. # differences in whitespace do not lead to failure.
  3185. ac_old_val_w=`echo x $ac_old_val`
  3186. ac_new_val_w=`echo x $ac_new_val`
  3187. if test "$ac_old_val_w" != "$ac_new_val_w"; then
  3188. { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
  3189. $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
  3190. ac_cache_corrupted=:
  3191. else
  3192. { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
  3193. $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
  3194. eval $ac_var=\$ac_old_val
  3195. fi
  3196. { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
  3197. $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
  3198. { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
  3199. $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
  3200. fi;;
  3201. esac
  3202. # Pass precious variables to config.status.
  3203. if test "$ac_new_set" = set; then
  3204. case $ac_new_val in
  3205. *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
  3206. *) ac_arg=$ac_var=$ac_new_val ;;
  3207. esac
  3208. case " $ac_configure_args " in
  3209. *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
  3210. *) as_fn_append ac_configure_args " '$ac_arg'" ;;
  3211. esac
  3212. fi
  3213. done
  3214. if $ac_cache_corrupted; then
  3215. { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  3216. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  3217. { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
  3218. $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
  3219. as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
  3220. fi
  3221. ## -------------------- ##
  3222. ## Main body of script. ##
  3223. ## -------------------- ##
  3224. ac_ext=c
  3225. ac_cpp='$CPP $CPPFLAGS'
  3226. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  3227. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  3228. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  3229. # cross-compile macros
  3230. ac_aux_dir=
  3231. for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
  3232. if test -f "$ac_dir/install-sh"; then
  3233. ac_aux_dir=$ac_dir
  3234. ac_install_sh="$ac_aux_dir/install-sh -c"
  3235. break
  3236. elif test -f "$ac_dir/install.sh"; then
  3237. ac_aux_dir=$ac_dir
  3238. ac_install_sh="$ac_aux_dir/install.sh -c"
  3239. break
  3240. elif test -f "$ac_dir/shtool"; then
  3241. ac_aux_dir=$ac_dir
  3242. ac_install_sh="$ac_aux_dir/shtool install -c"
  3243. break
  3244. fi
  3245. done
  3246. if test -z "$ac_aux_dir"; then
  3247. as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
  3248. fi
  3249. # These three variables are undocumented and unsupported,
  3250. # and are intended to be withdrawn in a future Autoconf release.
  3251. # They can cause serious problems if a builder's source tree is in a directory
  3252. # whose full name contains unusual characters.
  3253. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
  3254. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
  3255. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
  3256. # Make sure we can run config.sub.
  3257. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
  3258. as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
  3259. { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
  3260. $as_echo_n "checking build system type... " >&6; }
  3261. if ${ac_cv_build+:} false; then :
  3262. $as_echo_n "(cached) " >&6
  3263. else
  3264. ac_build_alias=$build_alias
  3265. test "x$ac_build_alias" = x &&
  3266. ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
  3267. test "x$ac_build_alias" = x &&
  3268. as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
  3269. ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
  3270. as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
  3271. fi
  3272. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
  3273. $as_echo "$ac_cv_build" >&6; }
  3274. case $ac_cv_build in
  3275. *-*-*) ;;
  3276. *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
  3277. esac
  3278. build=$ac_cv_build
  3279. ac_save_IFS=$IFS; IFS='-'
  3280. set x $ac_cv_build
  3281. shift
  3282. build_cpu=$1
  3283. build_vendor=$2
  3284. shift; shift
  3285. # Remember, the first character of IFS is used to create $*,
  3286. # except with old shells:
  3287. build_os=$*
  3288. IFS=$ac_save_IFS
  3289. case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
  3290. { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
  3291. $as_echo_n "checking host system type... " >&6; }
  3292. if ${ac_cv_host+:} false; then :
  3293. $as_echo_n "(cached) " >&6
  3294. else
  3295. if test "x$host_alias" = x; then
  3296. ac_cv_host=$ac_cv_build
  3297. else
  3298. ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
  3299. as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
  3300. fi
  3301. fi
  3302. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
  3303. $as_echo "$ac_cv_host" >&6; }
  3304. case $ac_cv_host in
  3305. *-*-*) ;;
  3306. *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
  3307. esac
  3308. host=$ac_cv_host
  3309. ac_save_IFS=$IFS; IFS='-'
  3310. set x $ac_cv_host
  3311. shift
  3312. host_cpu=$1
  3313. host_vendor=$2
  3314. shift; shift
  3315. # Remember, the first character of IFS is used to create $*,
  3316. # except with old shells:
  3317. host_os=$*
  3318. IFS=$ac_save_IFS
  3319. case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
  3320. # check existence of the package
  3321. ac_aux_dir=
  3322. for ac_dir in `pwd` "$srcdir"/`pwd`; do
  3323. if test -f "$ac_dir/install-sh"; then
  3324. ac_aux_dir=$ac_dir
  3325. ac_install_sh="$ac_aux_dir/install-sh -c"
  3326. break
  3327. elif test -f "$ac_dir/install.sh"; then
  3328. ac_aux_dir=$ac_dir
  3329. ac_install_sh="$ac_aux_dir/install.sh -c"
  3330. break
  3331. elif test -f "$ac_dir/shtool"; then
  3332. ac_aux_dir=$ac_dir
  3333. ac_install_sh="$ac_aux_dir/shtool install -c"
  3334. break
  3335. fi
  3336. done
  3337. if test -z "$ac_aux_dir"; then
  3338. as_fn_error $? "cannot find install-sh, install.sh, or shtool in \`pwd\` \"$srcdir\"/\`pwd\`" "$LINENO" 5
  3339. fi
  3340. # These three variables are undocumented and unsupported,
  3341. # and are intended to be withdrawn in a future Autoconf release.
  3342. # They can cause serious problems if a builder's source tree is in a directory
  3343. # whose full name contains unusual characters.
  3344. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
  3345. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
  3346. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
  3347. # preserve any CFLAGS or LDFLAGS that may be set
  3348. # NOTE: This must be done before calling any macros that end up
  3349. # calling AC_PROG_CC or the like, since they will set a default
  3350. # set of CFLAGS ("-g -O2") if the user did not supply any, and
  3351. # we don't want those default flags to be carried over into the
  3352. # rest of the build system since we have other means of controlling
  3353. # debugging symbol generation and optimization.
  3354. CONFIG_CFLAGS="${CFLAGS}"
  3355. CONFIG_LDFLAGS="${LDFLAGS}"
  3356. # specify output header file
  3357. ac_config_headers="$ac_config_headers include/asterisk/autoconfig.h"
  3358. # Note: AC_PROG_CC *must* be specified before AC_USE_SYSTEM_EXTENSIONS or any
  3359. # other macro that uses the C compiler, or the default order will be used.
  3360. ac_ext=c
  3361. ac_cpp='$CPP $CPPFLAGS'
  3362. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  3363. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  3364. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  3365. if test -n "$ac_tool_prefix"; then
  3366. for ac_prog in gcc cc
  3367. do
  3368. # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
  3369. set dummy $ac_tool_prefix$ac_prog; ac_word=$2
  3370. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  3371. $as_echo_n "checking for $ac_word... " >&6; }
  3372. if ${ac_cv_prog_CC+:} false; then :
  3373. $as_echo_n "(cached) " >&6
  3374. else
  3375. if test -n "$CC"; then
  3376. ac_cv_prog_CC="$CC" # Let the user override the test.
  3377. else
  3378. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3379. for as_dir in $PATH
  3380. do
  3381. IFS=$as_save_IFS
  3382. test -z "$as_dir" && as_dir=.
  3383. for ac_exec_ext in '' $ac_executable_extensions; do
  3384. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3385. ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
  3386. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  3387. break 2
  3388. fi
  3389. done
  3390. done
  3391. IFS=$as_save_IFS
  3392. fi
  3393. fi
  3394. CC=$ac_cv_prog_CC
  3395. if test -n "$CC"; then
  3396. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
  3397. $as_echo "$CC" >&6; }
  3398. else
  3399. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  3400. $as_echo "no" >&6; }
  3401. fi
  3402. test -n "$CC" && break
  3403. done
  3404. fi
  3405. if test -z "$CC"; then
  3406. ac_ct_CC=$CC
  3407. for ac_prog in gcc cc
  3408. do
  3409. # Extract the first word of "$ac_prog", so it can be a program name with args.
  3410. set dummy $ac_prog; ac_word=$2
  3411. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  3412. $as_echo_n "checking for $ac_word... " >&6; }
  3413. if ${ac_cv_prog_ac_ct_CC+:} false; then :
  3414. $as_echo_n "(cached) " >&6
  3415. else
  3416. if test -n "$ac_ct_CC"; then
  3417. ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
  3418. else
  3419. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3420. for as_dir in $PATH
  3421. do
  3422. IFS=$as_save_IFS
  3423. test -z "$as_dir" && as_dir=.
  3424. for ac_exec_ext in '' $ac_executable_extensions; do
  3425. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3426. ac_cv_prog_ac_ct_CC="$ac_prog"
  3427. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  3428. break 2
  3429. fi
  3430. done
  3431. done
  3432. IFS=$as_save_IFS
  3433. fi
  3434. fi
  3435. ac_ct_CC=$ac_cv_prog_ac_ct_CC
  3436. if test -n "$ac_ct_CC"; then
  3437. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
  3438. $as_echo "$ac_ct_CC" >&6; }
  3439. else
  3440. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  3441. $as_echo "no" >&6; }
  3442. fi
  3443. test -n "$ac_ct_CC" && break
  3444. done
  3445. if test "x$ac_ct_CC" = x; then
  3446. CC=""
  3447. else
  3448. case $cross_compiling:$ac_tool_warned in
  3449. yes:)
  3450. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  3451. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  3452. ac_tool_warned=yes ;;
  3453. esac
  3454. CC=$ac_ct_CC
  3455. fi
  3456. fi
  3457. test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  3458. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  3459. as_fn_error $? "no acceptable C compiler found in \$PATH
  3460. See \`config.log' for more details" "$LINENO" 5; }
  3461. # Provide some information about the compiler.
  3462. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
  3463. set X $ac_compile
  3464. ac_compiler=$2
  3465. for ac_option in --version -v -V -qversion; do
  3466. { { ac_try="$ac_compiler $ac_option >&5"
  3467. case "(($ac_try" in
  3468. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  3469. *) ac_try_echo=$ac_try;;
  3470. esac
  3471. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  3472. $as_echo "$ac_try_echo"; } >&5
  3473. (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  3474. ac_status=$?
  3475. if test -s conftest.err; then
  3476. sed '10a\
  3477. ... rest of stderr output deleted ...
  3478. 10q' conftest.err >conftest.er1
  3479. cat conftest.er1 >&5
  3480. fi
  3481. rm -f conftest.er1 conftest.err
  3482. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  3483. test $ac_status = 0; }
  3484. done
  3485. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3486. /* end confdefs.h. */
  3487. int
  3488. main ()
  3489. {
  3490. ;
  3491. return 0;
  3492. }
  3493. _ACEOF
  3494. ac_clean_files_save=$ac_clean_files
  3495. ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
  3496. # Try to create an executable without -o first, disregard a.out.
  3497. # It will help us diagnose broken compilers, and finding out an intuition
  3498. # of exeext.
  3499. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
  3500. $as_echo_n "checking whether the C compiler works... " >&6; }
  3501. ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
  3502. # The possible output files:
  3503. ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
  3504. ac_rmfiles=
  3505. for ac_file in $ac_files
  3506. do
  3507. case $ac_file in
  3508. *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
  3509. * ) ac_rmfiles="$ac_rmfiles $ac_file";;
  3510. esac
  3511. done
  3512. rm -f $ac_rmfiles
  3513. if { { ac_try="$ac_link_default"
  3514. case "(($ac_try" in
  3515. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  3516. *) ac_try_echo=$ac_try;;
  3517. esac
  3518. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  3519. $as_echo "$ac_try_echo"; } >&5
  3520. (eval "$ac_link_default") 2>&5
  3521. ac_status=$?
  3522. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  3523. test $ac_status = 0; }; then :
  3524. # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
  3525. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
  3526. # in a Makefile. We should not override ac_cv_exeext if it was cached,
  3527. # so that the user can short-circuit this test for compilers unknown to
  3528. # Autoconf.
  3529. for ac_file in $ac_files ''
  3530. do
  3531. test -f "$ac_file" || continue
  3532. case $ac_file in
  3533. *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
  3534. ;;
  3535. [ab].out )
  3536. # We found the default executable, but exeext='' is most
  3537. # certainly right.
  3538. break;;
  3539. *.* )
  3540. if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
  3541. then :; else
  3542. ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
  3543. fi
  3544. # We set ac_cv_exeext here because the later test for it is not
  3545. # safe: cross compilers may not add the suffix if given an `-o'
  3546. # argument, so we may need to know it at that point already.
  3547. # Even if this section looks crufty: it has the advantage of
  3548. # actually working.
  3549. break;;
  3550. * )
  3551. break;;
  3552. esac
  3553. done
  3554. test "$ac_cv_exeext" = no && ac_cv_exeext=
  3555. else
  3556. ac_file=''
  3557. fi
  3558. if test -z "$ac_file"; then :
  3559. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  3560. $as_echo "no" >&6; }
  3561. $as_echo "$as_me: failed program was:" >&5
  3562. sed 's/^/| /' conftest.$ac_ext >&5
  3563. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  3564. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  3565. as_fn_error 77 "C compiler cannot create executables
  3566. See \`config.log' for more details" "$LINENO" 5; }
  3567. else
  3568. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  3569. $as_echo "yes" >&6; }
  3570. fi
  3571. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
  3572. $as_echo_n "checking for C compiler default output file name... " >&6; }
  3573. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
  3574. $as_echo "$ac_file" >&6; }
  3575. ac_exeext=$ac_cv_exeext
  3576. rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
  3577. ac_clean_files=$ac_clean_files_save
  3578. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
  3579. $as_echo_n "checking for suffix of executables... " >&6; }
  3580. if { { ac_try="$ac_link"
  3581. case "(($ac_try" in
  3582. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  3583. *) ac_try_echo=$ac_try;;
  3584. esac
  3585. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  3586. $as_echo "$ac_try_echo"; } >&5
  3587. (eval "$ac_link") 2>&5
  3588. ac_status=$?
  3589. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  3590. test $ac_status = 0; }; then :
  3591. # If both `conftest.exe' and `conftest' are `present' (well, observable)
  3592. # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
  3593. # work properly (i.e., refer to `conftest.exe'), while it won't with
  3594. # `rm'.
  3595. for ac_file in conftest.exe conftest conftest.*; do
  3596. test -f "$ac_file" || continue
  3597. case $ac_file in
  3598. *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
  3599. *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
  3600. break;;
  3601. * ) break;;
  3602. esac
  3603. done
  3604. else
  3605. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  3606. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  3607. as_fn_error $? "cannot compute suffix of executables: cannot compile and link
  3608. See \`config.log' for more details" "$LINENO" 5; }
  3609. fi
  3610. rm -f conftest conftest$ac_cv_exeext
  3611. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
  3612. $as_echo "$ac_cv_exeext" >&6; }
  3613. rm -f conftest.$ac_ext
  3614. EXEEXT=$ac_cv_exeext
  3615. ac_exeext=$EXEEXT
  3616. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3617. /* end confdefs.h. */
  3618. #include <stdio.h>
  3619. int
  3620. main ()
  3621. {
  3622. FILE *f = fopen ("conftest.out", "w");
  3623. return ferror (f) || fclose (f) != 0;
  3624. ;
  3625. return 0;
  3626. }
  3627. _ACEOF
  3628. ac_clean_files="$ac_clean_files conftest.out"
  3629. # Check that the compiler produces executables we can run. If not, either
  3630. # the compiler is broken, or we cross compile.
  3631. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
  3632. $as_echo_n "checking whether we are cross compiling... " >&6; }
  3633. if test "$cross_compiling" != yes; then
  3634. { { ac_try="$ac_link"
  3635. case "(($ac_try" in
  3636. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  3637. *) ac_try_echo=$ac_try;;
  3638. esac
  3639. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  3640. $as_echo "$ac_try_echo"; } >&5
  3641. (eval "$ac_link") 2>&5
  3642. ac_status=$?
  3643. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  3644. test $ac_status = 0; }
  3645. if { ac_try='./conftest$ac_cv_exeext'
  3646. { { case "(($ac_try" in
  3647. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  3648. *) ac_try_echo=$ac_try;;
  3649. esac
  3650. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  3651. $as_echo "$ac_try_echo"; } >&5
  3652. (eval "$ac_try") 2>&5
  3653. ac_status=$?
  3654. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  3655. test $ac_status = 0; }; }; then
  3656. cross_compiling=no
  3657. else
  3658. if test "$cross_compiling" = maybe; then
  3659. cross_compiling=yes
  3660. else
  3661. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  3662. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  3663. as_fn_error $? "cannot run C compiled programs.
  3664. If you meant to cross compile, use \`--host'.
  3665. See \`config.log' for more details" "$LINENO" 5; }
  3666. fi
  3667. fi
  3668. fi
  3669. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
  3670. $as_echo "$cross_compiling" >&6; }
  3671. rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
  3672. ac_clean_files=$ac_clean_files_save
  3673. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
  3674. $as_echo_n "checking for suffix of object files... " >&6; }
  3675. if ${ac_cv_objext+:} false; then :
  3676. $as_echo_n "(cached) " >&6
  3677. else
  3678. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3679. /* end confdefs.h. */
  3680. int
  3681. main ()
  3682. {
  3683. ;
  3684. return 0;
  3685. }
  3686. _ACEOF
  3687. rm -f conftest.o conftest.obj
  3688. if { { ac_try="$ac_compile"
  3689. case "(($ac_try" in
  3690. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  3691. *) ac_try_echo=$ac_try;;
  3692. esac
  3693. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  3694. $as_echo "$ac_try_echo"; } >&5
  3695. (eval "$ac_compile") 2>&5
  3696. ac_status=$?
  3697. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  3698. test $ac_status = 0; }; then :
  3699. for ac_file in conftest.o conftest.obj conftest.*; do
  3700. test -f "$ac_file" || continue;
  3701. case $ac_file in
  3702. *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
  3703. *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
  3704. break;;
  3705. esac
  3706. done
  3707. else
  3708. $as_echo "$as_me: failed program was:" >&5
  3709. sed 's/^/| /' conftest.$ac_ext >&5
  3710. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  3711. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  3712. as_fn_error $? "cannot compute suffix of object files: cannot compile
  3713. See \`config.log' for more details" "$LINENO" 5; }
  3714. fi
  3715. rm -f conftest.$ac_cv_objext conftest.$ac_ext
  3716. fi
  3717. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
  3718. $as_echo "$ac_cv_objext" >&6; }
  3719. OBJEXT=$ac_cv_objext
  3720. ac_objext=$OBJEXT
  3721. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
  3722. $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
  3723. if ${ac_cv_c_compiler_gnu+:} false; then :
  3724. $as_echo_n "(cached) " >&6
  3725. else
  3726. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3727. /* end confdefs.h. */
  3728. int
  3729. main ()
  3730. {
  3731. #ifndef __GNUC__
  3732. choke me
  3733. #endif
  3734. ;
  3735. return 0;
  3736. }
  3737. _ACEOF
  3738. if ac_fn_c_try_compile "$LINENO"; then :
  3739. ac_compiler_gnu=yes
  3740. else
  3741. ac_compiler_gnu=no
  3742. fi
  3743. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  3744. ac_cv_c_compiler_gnu=$ac_compiler_gnu
  3745. fi
  3746. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
  3747. $as_echo "$ac_cv_c_compiler_gnu" >&6; }
  3748. if test $ac_compiler_gnu = yes; then
  3749. GCC=yes
  3750. else
  3751. GCC=
  3752. fi
  3753. ac_test_CFLAGS=${CFLAGS+set}
  3754. ac_save_CFLAGS=$CFLAGS
  3755. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
  3756. $as_echo_n "checking whether $CC accepts -g... " >&6; }
  3757. if ${ac_cv_prog_cc_g+:} false; then :
  3758. $as_echo_n "(cached) " >&6
  3759. else
  3760. ac_save_c_werror_flag=$ac_c_werror_flag
  3761. ac_c_werror_flag=yes
  3762. ac_cv_prog_cc_g=no
  3763. CFLAGS="-g"
  3764. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3765. /* end confdefs.h. */
  3766. int
  3767. main ()
  3768. {
  3769. ;
  3770. return 0;
  3771. }
  3772. _ACEOF
  3773. if ac_fn_c_try_compile "$LINENO"; then :
  3774. ac_cv_prog_cc_g=yes
  3775. else
  3776. CFLAGS=""
  3777. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3778. /* end confdefs.h. */
  3779. int
  3780. main ()
  3781. {
  3782. ;
  3783. return 0;
  3784. }
  3785. _ACEOF
  3786. if ac_fn_c_try_compile "$LINENO"; then :
  3787. else
  3788. ac_c_werror_flag=$ac_save_c_werror_flag
  3789. CFLAGS="-g"
  3790. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3791. /* end confdefs.h. */
  3792. int
  3793. main ()
  3794. {
  3795. ;
  3796. return 0;
  3797. }
  3798. _ACEOF
  3799. if ac_fn_c_try_compile "$LINENO"; then :
  3800. ac_cv_prog_cc_g=yes
  3801. fi
  3802. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  3803. fi
  3804. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  3805. fi
  3806. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  3807. ac_c_werror_flag=$ac_save_c_werror_flag
  3808. fi
  3809. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
  3810. $as_echo "$ac_cv_prog_cc_g" >&6; }
  3811. if test "$ac_test_CFLAGS" = set; then
  3812. CFLAGS=$ac_save_CFLAGS
  3813. elif test $ac_cv_prog_cc_g = yes; then
  3814. if test "$GCC" = yes; then
  3815. CFLAGS="-g -O2"
  3816. else
  3817. CFLAGS="-g"
  3818. fi
  3819. else
  3820. if test "$GCC" = yes; then
  3821. CFLAGS="-O2"
  3822. else
  3823. CFLAGS=
  3824. fi
  3825. fi
  3826. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
  3827. $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
  3828. if ${ac_cv_prog_cc_c89+:} false; then :
  3829. $as_echo_n "(cached) " >&6
  3830. else
  3831. ac_cv_prog_cc_c89=no
  3832. ac_save_CC=$CC
  3833. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3834. /* end confdefs.h. */
  3835. #include <stdarg.h>
  3836. #include <stdio.h>
  3837. struct stat;
  3838. /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
  3839. struct buf { int x; };
  3840. FILE * (*rcsopen) (struct buf *, struct stat *, int);
  3841. static char *e (p, i)
  3842. char **p;
  3843. int i;
  3844. {
  3845. return p[i];
  3846. }
  3847. static char *f (char * (*g) (char **, int), char **p, ...)
  3848. {
  3849. char *s;
  3850. va_list v;
  3851. va_start (v,p);
  3852. s = g (p, va_arg (v,int));
  3853. va_end (v);
  3854. return s;
  3855. }
  3856. /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
  3857. function prototypes and stuff, but not '\xHH' hex character constants.
  3858. These don't provoke an error unfortunately, instead are silently treated
  3859. as 'x'. The following induces an error, until -std is added to get
  3860. proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
  3861. array size at least. It's necessary to write '\x00'==0 to get something
  3862. that's true only with -std. */
  3863. int osf4_cc_array ['\x00' == 0 ? 1 : -1];
  3864. /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
  3865. inside strings and character constants. */
  3866. #define FOO(x) 'x'
  3867. int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
  3868. int test (int i, double x);
  3869. struct s1 {int (*f) (int a);};
  3870. struct s2 {int (*f) (double a);};
  3871. int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
  3872. int argc;
  3873. char **argv;
  3874. int
  3875. main ()
  3876. {
  3877. return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
  3878. ;
  3879. return 0;
  3880. }
  3881. _ACEOF
  3882. for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
  3883. -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
  3884. do
  3885. CC="$ac_save_CC $ac_arg"
  3886. if ac_fn_c_try_compile "$LINENO"; then :
  3887. ac_cv_prog_cc_c89=$ac_arg
  3888. fi
  3889. rm -f core conftest.err conftest.$ac_objext
  3890. test "x$ac_cv_prog_cc_c89" != "xno" && break
  3891. done
  3892. rm -f conftest.$ac_ext
  3893. CC=$ac_save_CC
  3894. fi
  3895. # AC_CACHE_VAL
  3896. case "x$ac_cv_prog_cc_c89" in
  3897. x)
  3898. { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
  3899. $as_echo "none needed" >&6; } ;;
  3900. xno)
  3901. { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
  3902. $as_echo "unsupported" >&6; } ;;
  3903. *)
  3904. CC="$CC $ac_cv_prog_cc_c89"
  3905. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
  3906. $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
  3907. esac
  3908. if test "x$ac_cv_prog_cc_c89" != xno; then :
  3909. fi
  3910. ac_ext=c
  3911. ac_cpp='$CPP $CPPFLAGS'
  3912. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  3913. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  3914. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  3915. ac_ext=c
  3916. ac_cpp='$CPP $CPPFLAGS'
  3917. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  3918. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  3919. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  3920. { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
  3921. $as_echo_n "checking how to run the C preprocessor... " >&6; }
  3922. # On Suns, sometimes $CPP names a directory.
  3923. if test -n "$CPP" && test -d "$CPP"; then
  3924. CPP=
  3925. fi
  3926. if test -z "$CPP"; then
  3927. if ${ac_cv_prog_CPP+:} false; then :
  3928. $as_echo_n "(cached) " >&6
  3929. else
  3930. # Double quotes because CPP needs to be expanded
  3931. for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
  3932. do
  3933. ac_preproc_ok=false
  3934. for ac_c_preproc_warn_flag in '' yes
  3935. do
  3936. # Use a header file that comes with gcc, so configuring glibc
  3937. # with a fresh cross-compiler works.
  3938. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  3939. # <limits.h> exists even on freestanding compilers.
  3940. # On the NeXT, cc -E runs the code through the compiler's parser,
  3941. # not just through cpp. "Syntax error" is here to catch this case.
  3942. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3943. /* end confdefs.h. */
  3944. #ifdef __STDC__
  3945. # include <limits.h>
  3946. #else
  3947. # include <assert.h>
  3948. #endif
  3949. Syntax error
  3950. _ACEOF
  3951. if ac_fn_c_try_cpp "$LINENO"; then :
  3952. else
  3953. # Broken: fails on valid input.
  3954. continue
  3955. fi
  3956. rm -f conftest.err conftest.i conftest.$ac_ext
  3957. # OK, works on sane cases. Now check whether nonexistent headers
  3958. # can be detected and how.
  3959. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3960. /* end confdefs.h. */
  3961. #include <ac_nonexistent.h>
  3962. _ACEOF
  3963. if ac_fn_c_try_cpp "$LINENO"; then :
  3964. # Broken: success on invalid input.
  3965. continue
  3966. else
  3967. # Passes both tests.
  3968. ac_preproc_ok=:
  3969. break
  3970. fi
  3971. rm -f conftest.err conftest.i conftest.$ac_ext
  3972. done
  3973. # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
  3974. rm -f conftest.i conftest.err conftest.$ac_ext
  3975. if $ac_preproc_ok; then :
  3976. break
  3977. fi
  3978. done
  3979. ac_cv_prog_CPP=$CPP
  3980. fi
  3981. CPP=$ac_cv_prog_CPP
  3982. else
  3983. ac_cv_prog_CPP=$CPP
  3984. fi
  3985. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
  3986. $as_echo "$CPP" >&6; }
  3987. ac_preproc_ok=false
  3988. for ac_c_preproc_warn_flag in '' yes
  3989. do
  3990. # Use a header file that comes with gcc, so configuring glibc
  3991. # with a fresh cross-compiler works.
  3992. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  3993. # <limits.h> exists even on freestanding compilers.
  3994. # On the NeXT, cc -E runs the code through the compiler's parser,
  3995. # not just through cpp. "Syntax error" is here to catch this case.
  3996. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3997. /* end confdefs.h. */
  3998. #ifdef __STDC__
  3999. # include <limits.h>
  4000. #else
  4001. # include <assert.h>
  4002. #endif
  4003. Syntax error
  4004. _ACEOF
  4005. if ac_fn_c_try_cpp "$LINENO"; then :
  4006. else
  4007. # Broken: fails on valid input.
  4008. continue
  4009. fi
  4010. rm -f conftest.err conftest.i conftest.$ac_ext
  4011. # OK, works on sane cases. Now check whether nonexistent headers
  4012. # can be detected and how.
  4013. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4014. /* end confdefs.h. */
  4015. #include <ac_nonexistent.h>
  4016. _ACEOF
  4017. if ac_fn_c_try_cpp "$LINENO"; then :
  4018. # Broken: success on invalid input.
  4019. continue
  4020. else
  4021. # Passes both tests.
  4022. ac_preproc_ok=:
  4023. break
  4024. fi
  4025. rm -f conftest.err conftest.i conftest.$ac_ext
  4026. done
  4027. # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
  4028. rm -f conftest.i conftest.err conftest.$ac_ext
  4029. if $ac_preproc_ok; then :
  4030. else
  4031. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  4032. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  4033. as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
  4034. See \`config.log' for more details" "$LINENO" 5; }
  4035. fi
  4036. ac_ext=c
  4037. ac_cpp='$CPP $CPPFLAGS'
  4038. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  4039. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  4040. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  4041. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
  4042. $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
  4043. if ${ac_cv_path_GREP+:} false; then :
  4044. $as_echo_n "(cached) " >&6
  4045. else
  4046. if test -z "$GREP"; then
  4047. ac_path_GREP_found=false
  4048. # Loop through the user's path and test for each of PROGNAME-LIST
  4049. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4050. for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
  4051. do
  4052. IFS=$as_save_IFS
  4053. test -z "$as_dir" && as_dir=.
  4054. for ac_prog in grep ggrep; do
  4055. for ac_exec_ext in '' $ac_executable_extensions; do
  4056. ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
  4057. as_fn_executable_p "$ac_path_GREP" || continue
  4058. # Check for GNU ac_path_GREP and select it if it is found.
  4059. # Check for GNU $ac_path_GREP
  4060. case `"$ac_path_GREP" --version 2>&1` in
  4061. *GNU*)
  4062. ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
  4063. *)
  4064. ac_count=0
  4065. $as_echo_n 0123456789 >"conftest.in"
  4066. while :
  4067. do
  4068. cat "conftest.in" "conftest.in" >"conftest.tmp"
  4069. mv "conftest.tmp" "conftest.in"
  4070. cp "conftest.in" "conftest.nl"
  4071. $as_echo 'GREP' >> "conftest.nl"
  4072. "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
  4073. diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
  4074. as_fn_arith $ac_count + 1 && ac_count=$as_val
  4075. if test $ac_count -gt ${ac_path_GREP_max-0}; then
  4076. # Best one so far, save it but keep looking for a better one
  4077. ac_cv_path_GREP="$ac_path_GREP"
  4078. ac_path_GREP_max=$ac_count
  4079. fi
  4080. # 10*(2^10) chars as input seems more than enough
  4081. test $ac_count -gt 10 && break
  4082. done
  4083. rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
  4084. esac
  4085. $ac_path_GREP_found && break 3
  4086. done
  4087. done
  4088. done
  4089. IFS=$as_save_IFS
  4090. if test -z "$ac_cv_path_GREP"; then
  4091. as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  4092. fi
  4093. else
  4094. ac_cv_path_GREP=$GREP
  4095. fi
  4096. fi
  4097. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
  4098. $as_echo "$ac_cv_path_GREP" >&6; }
  4099. GREP="$ac_cv_path_GREP"
  4100. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
  4101. $as_echo_n "checking for egrep... " >&6; }
  4102. if ${ac_cv_path_EGREP+:} false; then :
  4103. $as_echo_n "(cached) " >&6
  4104. else
  4105. if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
  4106. then ac_cv_path_EGREP="$GREP -E"
  4107. else
  4108. if test -z "$EGREP"; then
  4109. ac_path_EGREP_found=false
  4110. # Loop through the user's path and test for each of PROGNAME-LIST
  4111. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4112. for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
  4113. do
  4114. IFS=$as_save_IFS
  4115. test -z "$as_dir" && as_dir=.
  4116. for ac_prog in egrep; do
  4117. for ac_exec_ext in '' $ac_executable_extensions; do
  4118. ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
  4119. as_fn_executable_p "$ac_path_EGREP" || continue
  4120. # Check for GNU ac_path_EGREP and select it if it is found.
  4121. # Check for GNU $ac_path_EGREP
  4122. case `"$ac_path_EGREP" --version 2>&1` in
  4123. *GNU*)
  4124. ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
  4125. *)
  4126. ac_count=0
  4127. $as_echo_n 0123456789 >"conftest.in"
  4128. while :
  4129. do
  4130. cat "conftest.in" "conftest.in" >"conftest.tmp"
  4131. mv "conftest.tmp" "conftest.in"
  4132. cp "conftest.in" "conftest.nl"
  4133. $as_echo 'EGREP' >> "conftest.nl"
  4134. "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
  4135. diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
  4136. as_fn_arith $ac_count + 1 && ac_count=$as_val
  4137. if test $ac_count -gt ${ac_path_EGREP_max-0}; then
  4138. # Best one so far, save it but keep looking for a better one
  4139. ac_cv_path_EGREP="$ac_path_EGREP"
  4140. ac_path_EGREP_max=$ac_count
  4141. fi
  4142. # 10*(2^10) chars as input seems more than enough
  4143. test $ac_count -gt 10 && break
  4144. done
  4145. rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
  4146. esac
  4147. $ac_path_EGREP_found && break 3
  4148. done
  4149. done
  4150. done
  4151. IFS=$as_save_IFS
  4152. if test -z "$ac_cv_path_EGREP"; then
  4153. as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  4154. fi
  4155. else
  4156. ac_cv_path_EGREP=$EGREP
  4157. fi
  4158. fi
  4159. fi
  4160. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
  4161. $as_echo "$ac_cv_path_EGREP" >&6; }
  4162. EGREP="$ac_cv_path_EGREP"
  4163. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
  4164. $as_echo_n "checking for ANSI C header files... " >&6; }
  4165. if ${ac_cv_header_stdc+:} false; then :
  4166. $as_echo_n "(cached) " >&6
  4167. else
  4168. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4169. /* end confdefs.h. */
  4170. #include <stdlib.h>
  4171. #include <stdarg.h>
  4172. #include <string.h>
  4173. #include <float.h>
  4174. int
  4175. main ()
  4176. {
  4177. ;
  4178. return 0;
  4179. }
  4180. _ACEOF
  4181. if ac_fn_c_try_compile "$LINENO"; then :
  4182. ac_cv_header_stdc=yes
  4183. else
  4184. ac_cv_header_stdc=no
  4185. fi
  4186. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  4187. if test $ac_cv_header_stdc = yes; then
  4188. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  4189. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4190. /* end confdefs.h. */
  4191. #include <string.h>
  4192. _ACEOF
  4193. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  4194. $EGREP "memchr" >/dev/null 2>&1; then :
  4195. else
  4196. ac_cv_header_stdc=no
  4197. fi
  4198. rm -f conftest*
  4199. fi
  4200. if test $ac_cv_header_stdc = yes; then
  4201. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  4202. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4203. /* end confdefs.h. */
  4204. #include <stdlib.h>
  4205. _ACEOF
  4206. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  4207. $EGREP "free" >/dev/null 2>&1; then :
  4208. else
  4209. ac_cv_header_stdc=no
  4210. fi
  4211. rm -f conftest*
  4212. fi
  4213. if test $ac_cv_header_stdc = yes; then
  4214. # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  4215. if test "$cross_compiling" = yes; then :
  4216. :
  4217. else
  4218. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4219. /* end confdefs.h. */
  4220. #include <ctype.h>
  4221. #include <stdlib.h>
  4222. #if ((' ' & 0x0FF) == 0x020)
  4223. # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  4224. # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  4225. #else
  4226. # define ISLOWER(c) \
  4227. (('a' <= (c) && (c) <= 'i') \
  4228. || ('j' <= (c) && (c) <= 'r') \
  4229. || ('s' <= (c) && (c) <= 'z'))
  4230. # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
  4231. #endif
  4232. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  4233. int
  4234. main ()
  4235. {
  4236. int i;
  4237. for (i = 0; i < 256; i++)
  4238. if (XOR (islower (i), ISLOWER (i))
  4239. || toupper (i) != TOUPPER (i))
  4240. return 2;
  4241. return 0;
  4242. }
  4243. _ACEOF
  4244. if ac_fn_c_try_run "$LINENO"; then :
  4245. else
  4246. ac_cv_header_stdc=no
  4247. fi
  4248. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  4249. conftest.$ac_objext conftest.beam conftest.$ac_ext
  4250. fi
  4251. fi
  4252. fi
  4253. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
  4254. $as_echo "$ac_cv_header_stdc" >&6; }
  4255. if test $ac_cv_header_stdc = yes; then
  4256. $as_echo "#define STDC_HEADERS 1" >>confdefs.h
  4257. fi
  4258. # On IRIX 5.3, sys/types and inttypes.h are conflicting.
  4259. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
  4260. inttypes.h stdint.h unistd.h
  4261. do :
  4262. as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  4263. ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
  4264. "
  4265. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  4266. cat >>confdefs.h <<_ACEOF
  4267. #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  4268. _ACEOF
  4269. fi
  4270. done
  4271. ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
  4272. if test "x$ac_cv_header_minix_config_h" = xyes; then :
  4273. MINIX=yes
  4274. else
  4275. MINIX=
  4276. fi
  4277. if test "$MINIX" = yes; then
  4278. $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
  4279. $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
  4280. $as_echo "#define _MINIX 1" >>confdefs.h
  4281. fi
  4282. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
  4283. $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
  4284. if ${ac_cv_safe_to_define___extensions__+:} false; then :
  4285. $as_echo_n "(cached) " >&6
  4286. else
  4287. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4288. /* end confdefs.h. */
  4289. # define __EXTENSIONS__ 1
  4290. $ac_includes_default
  4291. int
  4292. main ()
  4293. {
  4294. ;
  4295. return 0;
  4296. }
  4297. _ACEOF
  4298. if ac_fn_c_try_compile "$LINENO"; then :
  4299. ac_cv_safe_to_define___extensions__=yes
  4300. else
  4301. ac_cv_safe_to_define___extensions__=no
  4302. fi
  4303. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  4304. fi
  4305. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
  4306. $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
  4307. test $ac_cv_safe_to_define___extensions__ = yes &&
  4308. $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
  4309. $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
  4310. $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
  4311. $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
  4312. $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
  4313. # System default paths
  4314. astsbindir='${sbindir}'
  4315. astetcdir='${sysconfdir}/asterisk'
  4316. astheaderdir='${includedir}/asterisk'
  4317. astlibdir='${libdir}'
  4318. astmoddir='${libdir}/asterisk/modules'
  4319. astmandir='${mandir}'
  4320. astvarlibdir='${localstatedir}/lib/asterisk'
  4321. astdatadir='${astvarlibdir}'
  4322. astdbdir='${astvarlibdir}'
  4323. astkeydir='${astvarlibdir}'
  4324. astspooldir='${localstatedir}/spool/asterisk'
  4325. astlogdir='${localstatedir}/log/asterisk'
  4326. astvarrundir='${localstatedir}/run/asterisk'
  4327. case "${host_os}" in
  4328. *bsd*)
  4329. if test ${prefix} = 'NONE'; then
  4330. astvarlibdir='${prefix}/share/asterisk'
  4331. astdbdir='${localstatedir}/db/asterisk'
  4332. fi
  4333. ;;
  4334. darwin*)
  4335. if test ${prefix} = 'NONE'; then
  4336. astvarrundir='/Library/Application Support/Asterisk/Run'
  4337. fi
  4338. ;;
  4339. esac
  4340. case "${host_os}" in
  4341. freebsd*)
  4342. ac_default_prefix=/usr/local
  4343. CPPFLAGS=-I/usr/local/include
  4344. LDFLAGS=-L/usr/local/lib
  4345. ;;
  4346. openbsd*)
  4347. ac_default_prefix=/usr/local
  4348. if test ${prefix} = '/usr/local' || test ${prefix} = 'NONE'; then
  4349. if test ${sysconfdir} = '${prefix}/etc'; then
  4350. astetcdir=/etc/asterisk
  4351. fi
  4352. if test ${mandir} = '${prefix}/man'; then
  4353. astmandir=/usr/share/man
  4354. fi
  4355. fi
  4356. CPPFLAGS=-I/usr/local/include
  4357. LDFLAGS=-L/usr/local/lib
  4358. ;;
  4359. darwin*)
  4360. ac_default_prefix=/usr/local
  4361. if test ${prefix} = 'NONE'; then
  4362. astmoddir='/Library/Application Support/Asterisk/Modules'
  4363. astvarlibdir='/Library/Application Support/Asterisk'
  4364. astlogdir=/Library/Logs/Asterisk
  4365. astvarrundir='/Library/Application Support/Asterisk/Run'
  4366. fi
  4367. $as_echo "#define AST_POLL_COMPAT 1" >>confdefs.h
  4368. $as_echo "#define _DARWIN_UNLIMITED_SELECT 1" >>confdefs.h
  4369. ;;
  4370. solaris*)
  4371. if test ${prefix} = 'NONE'; then
  4372. astetcdir=/var/etc/asterisk
  4373. astsbindir=/opt/asterisk/sbin
  4374. astlibdir=/opt/asterisk/lib
  4375. astmoddir=/opt/asterisk/lib/modules
  4376. astheaderdir=/opt/asterisk/include
  4377. astmandir=/opt/asterisk/man
  4378. astvarlibdir=/var/opt/asterisk
  4379. astspooldir=/var/spool/asterisk
  4380. astlogdir=/var/log/asterisk
  4381. astvarrundir=/var/run/asterisk
  4382. fi
  4383. ;;
  4384. *)
  4385. ac_default_prefix=/usr
  4386. if test ${prefix} = '/usr' || test ${prefix} = 'NONE'; then
  4387. if test ${sysconfdir} = '${prefix}/etc'; then
  4388. sysconfdir=/etc
  4389. fi
  4390. if test ${mandir} = '${prefix}/man'; then
  4391. mandir=/usr/share/man
  4392. fi
  4393. fi
  4394. ;;
  4395. esac
  4396. if test ${prefix} = ${ac_default_prefix} || test ${prefix} = 'NONE'; then
  4397. if test ${localstatedir} = '${prefix}/var'; then
  4398. localstatedir=/var
  4399. fi
  4400. fi
  4401. BUILD_PLATFORM=${build}
  4402. BUILD_CPU=${build_cpu}
  4403. BUILD_VENDOR=${build_vendor}
  4404. BUILD_OS=${build_os}
  4405. HOST_PLATFORM=${host}
  4406. HOST_CPU=${host_cpu}
  4407. HOST_VENDOR=${host_vendor}
  4408. HOST_OS=${host_os}
  4409. PBX_WINARCH=0
  4410. case "${host_os}" in
  4411. freebsd*)
  4412. OSARCH=FreeBSD
  4413. ;;
  4414. netbsd*)
  4415. OSARCH=NetBSD
  4416. ;;
  4417. openbsd*)
  4418. OSARCH=OpenBSD
  4419. ;;
  4420. solaris*)
  4421. OSARCH=SunOS
  4422. ;;
  4423. mingw32)
  4424. OSARCH=mingw32
  4425. PBX_WINARCH=1
  4426. ;;
  4427. cygwin)
  4428. OSARCH=cygwin
  4429. PBX_WINARCH=1
  4430. ;;
  4431. linux-gnueabi* | linux-gnuspe)
  4432. OSARCH=linux-gnu
  4433. ;;
  4434. kfreebsd*-gnu)
  4435. OSARCH=kfreebsd-gnu
  4436. ;;
  4437. *)
  4438. OSARCH=${host_os}
  4439. ;;
  4440. esac
  4441. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
  4442. $as_echo_n "checking whether char is unsigned... " >&6; }
  4443. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4444. /* end confdefs.h. */
  4445. #include <limits.h>
  4446. #if CHAR_MIN == 0
  4447. #error
  4448. #endif
  4449. _ACEOF
  4450. if ac_fn_c_try_compile "$LINENO"; then :
  4451. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  4452. $as_echo "no" >&6; }
  4453. CONFIG_SIGNED_CHAR=""
  4454. else
  4455. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  4456. $as_echo "yes" >&6; }
  4457. CONFIG_SIGNED_CHAR="-fsigned-char"
  4458. fi
  4459. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  4460. # check for uname
  4461. if test -n "$ac_tool_prefix"; then
  4462. # Extract the first word of "${ac_tool_prefix}uname", so it can be a program name with args.
  4463. set dummy ${ac_tool_prefix}uname; ac_word=$2
  4464. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  4465. $as_echo_n "checking for $ac_word... " >&6; }
  4466. if ${ac_cv_path_UNAME+:} false; then :
  4467. $as_echo_n "(cached) " >&6
  4468. else
  4469. case $UNAME in
  4470. [\\/]* | ?:[\\/]*)
  4471. ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
  4472. ;;
  4473. *)
  4474. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4475. for as_dir in $PATH
  4476. do
  4477. IFS=$as_save_IFS
  4478. test -z "$as_dir" && as_dir=.
  4479. for ac_exec_ext in '' $ac_executable_extensions; do
  4480. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  4481. ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
  4482. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  4483. break 2
  4484. fi
  4485. done
  4486. done
  4487. IFS=$as_save_IFS
  4488. ;;
  4489. esac
  4490. fi
  4491. UNAME=$ac_cv_path_UNAME
  4492. if test -n "$UNAME"; then
  4493. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
  4494. $as_echo "$UNAME" >&6; }
  4495. else
  4496. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  4497. $as_echo "no" >&6; }
  4498. fi
  4499. fi
  4500. if test -z "$ac_cv_path_UNAME"; then
  4501. ac_pt_UNAME=$UNAME
  4502. # Extract the first word of "uname", so it can be a program name with args.
  4503. set dummy uname; ac_word=$2
  4504. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  4505. $as_echo_n "checking for $ac_word... " >&6; }
  4506. if ${ac_cv_path_ac_pt_UNAME+:} false; then :
  4507. $as_echo_n "(cached) " >&6
  4508. else
  4509. case $ac_pt_UNAME in
  4510. [\\/]* | ?:[\\/]*)
  4511. ac_cv_path_ac_pt_UNAME="$ac_pt_UNAME" # Let the user override the test with a path.
  4512. ;;
  4513. *)
  4514. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4515. for as_dir in $PATH
  4516. do
  4517. IFS=$as_save_IFS
  4518. test -z "$as_dir" && as_dir=.
  4519. for ac_exec_ext in '' $ac_executable_extensions; do
  4520. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  4521. ac_cv_path_ac_pt_UNAME="$as_dir/$ac_word$ac_exec_ext"
  4522. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  4523. break 2
  4524. fi
  4525. done
  4526. done
  4527. IFS=$as_save_IFS
  4528. ;;
  4529. esac
  4530. fi
  4531. ac_pt_UNAME=$ac_cv_path_ac_pt_UNAME
  4532. if test -n "$ac_pt_UNAME"; then
  4533. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_UNAME" >&5
  4534. $as_echo "$ac_pt_UNAME" >&6; }
  4535. else
  4536. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  4537. $as_echo "no" >&6; }
  4538. fi
  4539. if test "x$ac_pt_UNAME" = x; then
  4540. UNAME="No"
  4541. else
  4542. case $cross_compiling:$ac_tool_warned in
  4543. yes:)
  4544. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  4545. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  4546. ac_tool_warned=yes ;;
  4547. esac
  4548. UNAME=$ac_pt_UNAME
  4549. fi
  4550. else
  4551. UNAME="$ac_cv_path_UNAME"
  4552. fi
  4553. if test ! x"${UNAME}" = xNo; then
  4554. PBX_OSREV=$(${UNAME} -r)
  4555. fi
  4556. # cross-compile checks
  4557. if test "${cross_compiling}" = "yes";
  4558. then
  4559. if test -n "$ac_tool_prefix"; then
  4560. # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
  4561. set dummy ${ac_tool_prefix}gcc; ac_word=$2
  4562. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  4563. $as_echo_n "checking for $ac_word... " >&6; }
  4564. if ${ac_cv_prog_CC+:} false; then :
  4565. $as_echo_n "(cached) " >&6
  4566. else
  4567. if test -n "$CC"; then
  4568. ac_cv_prog_CC="$CC" # Let the user override the test.
  4569. else
  4570. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4571. for as_dir in $PATH
  4572. do
  4573. IFS=$as_save_IFS
  4574. test -z "$as_dir" && as_dir=.
  4575. for ac_exec_ext in '' $ac_executable_extensions; do
  4576. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  4577. ac_cv_prog_CC="${ac_tool_prefix}gcc"
  4578. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  4579. break 2
  4580. fi
  4581. done
  4582. done
  4583. IFS=$as_save_IFS
  4584. fi
  4585. fi
  4586. CC=$ac_cv_prog_CC
  4587. if test -n "$CC"; then
  4588. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
  4589. $as_echo "$CC" >&6; }
  4590. else
  4591. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  4592. $as_echo "no" >&6; }
  4593. fi
  4594. fi
  4595. if test -z "$ac_cv_prog_CC"; then
  4596. ac_ct_CC=$CC
  4597. # Extract the first word of "gcc", so it can be a program name with args.
  4598. set dummy gcc; ac_word=$2
  4599. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  4600. $as_echo_n "checking for $ac_word... " >&6; }
  4601. if ${ac_cv_prog_ac_ct_CC+:} false; then :
  4602. $as_echo_n "(cached) " >&6
  4603. else
  4604. if test -n "$ac_ct_CC"; then
  4605. ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
  4606. else
  4607. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4608. for as_dir in $PATH
  4609. do
  4610. IFS=$as_save_IFS
  4611. test -z "$as_dir" && as_dir=.
  4612. for ac_exec_ext in '' $ac_executable_extensions; do
  4613. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  4614. ac_cv_prog_ac_ct_CC="gcc"
  4615. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  4616. break 2
  4617. fi
  4618. done
  4619. done
  4620. IFS=$as_save_IFS
  4621. fi
  4622. fi
  4623. ac_ct_CC=$ac_cv_prog_ac_ct_CC
  4624. if test -n "$ac_ct_CC"; then
  4625. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
  4626. $as_echo "$ac_ct_CC" >&6; }
  4627. else
  4628. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  4629. $as_echo "no" >&6; }
  4630. fi
  4631. if test "x$ac_ct_CC" = x; then
  4632. CC=":"
  4633. else
  4634. case $cross_compiling:$ac_tool_warned in
  4635. yes:)
  4636. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  4637. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  4638. ac_tool_warned=yes ;;
  4639. esac
  4640. CC=$ac_ct_CC
  4641. fi
  4642. else
  4643. CC="$ac_cv_prog_CC"
  4644. fi
  4645. if test -n "$ac_tool_prefix"; then
  4646. # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
  4647. set dummy ${ac_tool_prefix}g++; ac_word=$2
  4648. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  4649. $as_echo_n "checking for $ac_word... " >&6; }
  4650. if ${ac_cv_prog_CXX+:} false; then :
  4651. $as_echo_n "(cached) " >&6
  4652. else
  4653. if test -n "$CXX"; then
  4654. ac_cv_prog_CXX="$CXX" # Let the user override the test.
  4655. else
  4656. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4657. for as_dir in $PATH
  4658. do
  4659. IFS=$as_save_IFS
  4660. test -z "$as_dir" && as_dir=.
  4661. for ac_exec_ext in '' $ac_executable_extensions; do
  4662. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  4663. ac_cv_prog_CXX="${ac_tool_prefix}g++"
  4664. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  4665. break 2
  4666. fi
  4667. done
  4668. done
  4669. IFS=$as_save_IFS
  4670. fi
  4671. fi
  4672. CXX=$ac_cv_prog_CXX
  4673. if test -n "$CXX"; then
  4674. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
  4675. $as_echo "$CXX" >&6; }
  4676. else
  4677. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  4678. $as_echo "no" >&6; }
  4679. fi
  4680. fi
  4681. if test -z "$ac_cv_prog_CXX"; then
  4682. ac_ct_CXX=$CXX
  4683. # Extract the first word of "g++", so it can be a program name with args.
  4684. set dummy g++; ac_word=$2
  4685. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  4686. $as_echo_n "checking for $ac_word... " >&6; }
  4687. if ${ac_cv_prog_ac_ct_CXX+:} false; then :
  4688. $as_echo_n "(cached) " >&6
  4689. else
  4690. if test -n "$ac_ct_CXX"; then
  4691. ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
  4692. else
  4693. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4694. for as_dir in $PATH
  4695. do
  4696. IFS=$as_save_IFS
  4697. test -z "$as_dir" && as_dir=.
  4698. for ac_exec_ext in '' $ac_executable_extensions; do
  4699. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  4700. ac_cv_prog_ac_ct_CXX="g++"
  4701. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  4702. break 2
  4703. fi
  4704. done
  4705. done
  4706. IFS=$as_save_IFS
  4707. fi
  4708. fi
  4709. ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
  4710. if test -n "$ac_ct_CXX"; then
  4711. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
  4712. $as_echo "$ac_ct_CXX" >&6; }
  4713. else
  4714. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  4715. $as_echo "no" >&6; }
  4716. fi
  4717. if test "x$ac_ct_CXX" = x; then
  4718. CXX=":"
  4719. else
  4720. case $cross_compiling:$ac_tool_warned in
  4721. yes:)
  4722. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  4723. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  4724. ac_tool_warned=yes ;;
  4725. esac
  4726. CXX=$ac_ct_CXX
  4727. fi
  4728. else
  4729. CXX="$ac_cv_prog_CXX"
  4730. fi
  4731. if test -n "$ac_tool_prefix"; then
  4732. # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
  4733. set dummy ${ac_tool_prefix}ld; ac_word=$2
  4734. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  4735. $as_echo_n "checking for $ac_word... " >&6; }
  4736. if ${ac_cv_prog_LD+:} false; then :
  4737. $as_echo_n "(cached) " >&6
  4738. else
  4739. if test -n "$LD"; then
  4740. ac_cv_prog_LD="$LD" # Let the user override the test.
  4741. else
  4742. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4743. for as_dir in $PATH
  4744. do
  4745. IFS=$as_save_IFS
  4746. test -z "$as_dir" && as_dir=.
  4747. for ac_exec_ext in '' $ac_executable_extensions; do
  4748. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  4749. ac_cv_prog_LD="${ac_tool_prefix}ld"
  4750. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  4751. break 2
  4752. fi
  4753. done
  4754. done
  4755. IFS=$as_save_IFS
  4756. fi
  4757. fi
  4758. LD=$ac_cv_prog_LD
  4759. if test -n "$LD"; then
  4760. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
  4761. $as_echo "$LD" >&6; }
  4762. else
  4763. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  4764. $as_echo "no" >&6; }
  4765. fi
  4766. fi
  4767. if test -z "$ac_cv_prog_LD"; then
  4768. ac_ct_LD=$LD
  4769. # Extract the first word of "ld", so it can be a program name with args.
  4770. set dummy ld; ac_word=$2
  4771. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  4772. $as_echo_n "checking for $ac_word... " >&6; }
  4773. if ${ac_cv_prog_ac_ct_LD+:} false; then :
  4774. $as_echo_n "(cached) " >&6
  4775. else
  4776. if test -n "$ac_ct_LD"; then
  4777. ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
  4778. else
  4779. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4780. for as_dir in $PATH
  4781. do
  4782. IFS=$as_save_IFS
  4783. test -z "$as_dir" && as_dir=.
  4784. for ac_exec_ext in '' $ac_executable_extensions; do
  4785. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  4786. ac_cv_prog_ac_ct_LD="ld"
  4787. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  4788. break 2
  4789. fi
  4790. done
  4791. done
  4792. IFS=$as_save_IFS
  4793. fi
  4794. fi
  4795. ac_ct_LD=$ac_cv_prog_ac_ct_LD
  4796. if test -n "$ac_ct_LD"; then
  4797. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LD" >&5
  4798. $as_echo "$ac_ct_LD" >&6; }
  4799. else
  4800. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  4801. $as_echo "no" >&6; }
  4802. fi
  4803. if test "x$ac_ct_LD" = x; then
  4804. LD=":"
  4805. else
  4806. case $cross_compiling:$ac_tool_warned in
  4807. yes:)
  4808. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  4809. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  4810. ac_tool_warned=yes ;;
  4811. esac
  4812. LD=$ac_ct_LD
  4813. fi
  4814. else
  4815. LD="$ac_cv_prog_LD"
  4816. fi
  4817. if test -n "$ac_tool_prefix"; then
  4818. # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
  4819. set dummy ${ac_tool_prefix}ranlib; ac_word=$2
  4820. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  4821. $as_echo_n "checking for $ac_word... " >&6; }
  4822. if ${ac_cv_prog_RANLIB+:} false; then :
  4823. $as_echo_n "(cached) " >&6
  4824. else
  4825. if test -n "$RANLIB"; then
  4826. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  4827. else
  4828. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4829. for as_dir in $PATH
  4830. do
  4831. IFS=$as_save_IFS
  4832. test -z "$as_dir" && as_dir=.
  4833. for ac_exec_ext in '' $ac_executable_extensions; do
  4834. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  4835. ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
  4836. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  4837. break 2
  4838. fi
  4839. done
  4840. done
  4841. IFS=$as_save_IFS
  4842. fi
  4843. fi
  4844. RANLIB=$ac_cv_prog_RANLIB
  4845. if test -n "$RANLIB"; then
  4846. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
  4847. $as_echo "$RANLIB" >&6; }
  4848. else
  4849. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  4850. $as_echo "no" >&6; }
  4851. fi
  4852. fi
  4853. if test -z "$ac_cv_prog_RANLIB"; then
  4854. ac_ct_RANLIB=$RANLIB
  4855. # Extract the first word of "ranlib", so it can be a program name with args.
  4856. set dummy ranlib; ac_word=$2
  4857. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  4858. $as_echo_n "checking for $ac_word... " >&6; }
  4859. if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
  4860. $as_echo_n "(cached) " >&6
  4861. else
  4862. if test -n "$ac_ct_RANLIB"; then
  4863. ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
  4864. else
  4865. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4866. for as_dir in $PATH
  4867. do
  4868. IFS=$as_save_IFS
  4869. test -z "$as_dir" && as_dir=.
  4870. for ac_exec_ext in '' $ac_executable_extensions; do
  4871. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  4872. ac_cv_prog_ac_ct_RANLIB="ranlib"
  4873. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  4874. break 2
  4875. fi
  4876. done
  4877. done
  4878. IFS=$as_save_IFS
  4879. fi
  4880. fi
  4881. ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
  4882. if test -n "$ac_ct_RANLIB"; then
  4883. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
  4884. $as_echo "$ac_ct_RANLIB" >&6; }
  4885. else
  4886. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  4887. $as_echo "no" >&6; }
  4888. fi
  4889. if test "x$ac_ct_RANLIB" = x; then
  4890. RANLIB=":"
  4891. else
  4892. case $cross_compiling:$ac_tool_warned in
  4893. yes:)
  4894. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  4895. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  4896. ac_tool_warned=yes ;;
  4897. esac
  4898. RANLIB=$ac_ct_RANLIB
  4899. fi
  4900. else
  4901. RANLIB="$ac_cv_prog_RANLIB"
  4902. fi
  4903. fi
  4904. # Checks for programs.
  4905. ac_ext=cpp
  4906. ac_cpp='$CXXCPP $CPPFLAGS'
  4907. ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  4908. ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  4909. ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  4910. if test -z "$CXX"; then
  4911. if test -n "$CCC"; then
  4912. CXX=$CCC
  4913. else
  4914. if test -n "$ac_tool_prefix"; then
  4915. for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
  4916. do
  4917. # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
  4918. set dummy $ac_tool_prefix$ac_prog; ac_word=$2
  4919. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  4920. $as_echo_n "checking for $ac_word... " >&6; }
  4921. if ${ac_cv_prog_CXX+:} false; then :
  4922. $as_echo_n "(cached) " >&6
  4923. else
  4924. if test -n "$CXX"; then
  4925. ac_cv_prog_CXX="$CXX" # Let the user override the test.
  4926. else
  4927. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4928. for as_dir in $PATH
  4929. do
  4930. IFS=$as_save_IFS
  4931. test -z "$as_dir" && as_dir=.
  4932. for ac_exec_ext in '' $ac_executable_extensions; do
  4933. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  4934. ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
  4935. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  4936. break 2
  4937. fi
  4938. done
  4939. done
  4940. IFS=$as_save_IFS
  4941. fi
  4942. fi
  4943. CXX=$ac_cv_prog_CXX
  4944. if test -n "$CXX"; then
  4945. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
  4946. $as_echo "$CXX" >&6; }
  4947. else
  4948. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  4949. $as_echo "no" >&6; }
  4950. fi
  4951. test -n "$CXX" && break
  4952. done
  4953. fi
  4954. if test -z "$CXX"; then
  4955. ac_ct_CXX=$CXX
  4956. for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
  4957. do
  4958. # Extract the first word of "$ac_prog", so it can be a program name with args.
  4959. set dummy $ac_prog; ac_word=$2
  4960. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  4961. $as_echo_n "checking for $ac_word... " >&6; }
  4962. if ${ac_cv_prog_ac_ct_CXX+:} false; then :
  4963. $as_echo_n "(cached) " >&6
  4964. else
  4965. if test -n "$ac_ct_CXX"; then
  4966. ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
  4967. else
  4968. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4969. for as_dir in $PATH
  4970. do
  4971. IFS=$as_save_IFS
  4972. test -z "$as_dir" && as_dir=.
  4973. for ac_exec_ext in '' $ac_executable_extensions; do
  4974. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  4975. ac_cv_prog_ac_ct_CXX="$ac_prog"
  4976. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  4977. break 2
  4978. fi
  4979. done
  4980. done
  4981. IFS=$as_save_IFS
  4982. fi
  4983. fi
  4984. ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
  4985. if test -n "$ac_ct_CXX"; then
  4986. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
  4987. $as_echo "$ac_ct_CXX" >&6; }
  4988. else
  4989. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  4990. $as_echo "no" >&6; }
  4991. fi
  4992. test -n "$ac_ct_CXX" && break
  4993. done
  4994. if test "x$ac_ct_CXX" = x; then
  4995. CXX="g++"
  4996. else
  4997. case $cross_compiling:$ac_tool_warned in
  4998. yes:)
  4999. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  5000. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  5001. ac_tool_warned=yes ;;
  5002. esac
  5003. CXX=$ac_ct_CXX
  5004. fi
  5005. fi
  5006. fi
  5007. fi
  5008. # Provide some information about the compiler.
  5009. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
  5010. set X $ac_compile
  5011. ac_compiler=$2
  5012. for ac_option in --version -v -V -qversion; do
  5013. { { ac_try="$ac_compiler $ac_option >&5"
  5014. case "(($ac_try" in
  5015. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  5016. *) ac_try_echo=$ac_try;;
  5017. esac
  5018. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  5019. $as_echo "$ac_try_echo"; } >&5
  5020. (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  5021. ac_status=$?
  5022. if test -s conftest.err; then
  5023. sed '10a\
  5024. ... rest of stderr output deleted ...
  5025. 10q' conftest.err >conftest.er1
  5026. cat conftest.er1 >&5
  5027. fi
  5028. rm -f conftest.er1 conftest.err
  5029. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  5030. test $ac_status = 0; }
  5031. done
  5032. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
  5033. $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
  5034. if ${ac_cv_cxx_compiler_gnu+:} false; then :
  5035. $as_echo_n "(cached) " >&6
  5036. else
  5037. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5038. /* end confdefs.h. */
  5039. int
  5040. main ()
  5041. {
  5042. #ifndef __GNUC__
  5043. choke me
  5044. #endif
  5045. ;
  5046. return 0;
  5047. }
  5048. _ACEOF
  5049. if ac_fn_cxx_try_compile "$LINENO"; then :
  5050. ac_compiler_gnu=yes
  5051. else
  5052. ac_compiler_gnu=no
  5053. fi
  5054. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  5055. ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
  5056. fi
  5057. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
  5058. $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
  5059. if test $ac_compiler_gnu = yes; then
  5060. GXX=yes
  5061. else
  5062. GXX=
  5063. fi
  5064. ac_test_CXXFLAGS=${CXXFLAGS+set}
  5065. ac_save_CXXFLAGS=$CXXFLAGS
  5066. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
  5067. $as_echo_n "checking whether $CXX accepts -g... " >&6; }
  5068. if ${ac_cv_prog_cxx_g+:} false; then :
  5069. $as_echo_n "(cached) " >&6
  5070. else
  5071. ac_save_cxx_werror_flag=$ac_cxx_werror_flag
  5072. ac_cxx_werror_flag=yes
  5073. ac_cv_prog_cxx_g=no
  5074. CXXFLAGS="-g"
  5075. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5076. /* end confdefs.h. */
  5077. int
  5078. main ()
  5079. {
  5080. ;
  5081. return 0;
  5082. }
  5083. _ACEOF
  5084. if ac_fn_cxx_try_compile "$LINENO"; then :
  5085. ac_cv_prog_cxx_g=yes
  5086. else
  5087. CXXFLAGS=""
  5088. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5089. /* end confdefs.h. */
  5090. int
  5091. main ()
  5092. {
  5093. ;
  5094. return 0;
  5095. }
  5096. _ACEOF
  5097. if ac_fn_cxx_try_compile "$LINENO"; then :
  5098. else
  5099. ac_cxx_werror_flag=$ac_save_cxx_werror_flag
  5100. CXXFLAGS="-g"
  5101. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5102. /* end confdefs.h. */
  5103. int
  5104. main ()
  5105. {
  5106. ;
  5107. return 0;
  5108. }
  5109. _ACEOF
  5110. if ac_fn_cxx_try_compile "$LINENO"; then :
  5111. ac_cv_prog_cxx_g=yes
  5112. fi
  5113. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  5114. fi
  5115. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  5116. fi
  5117. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  5118. ac_cxx_werror_flag=$ac_save_cxx_werror_flag
  5119. fi
  5120. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
  5121. $as_echo "$ac_cv_prog_cxx_g" >&6; }
  5122. if test "$ac_test_CXXFLAGS" = set; then
  5123. CXXFLAGS=$ac_save_CXXFLAGS
  5124. elif test $ac_cv_prog_cxx_g = yes; then
  5125. if test "$GXX" = yes; then
  5126. CXXFLAGS="-g -O2"
  5127. else
  5128. CXXFLAGS="-g"
  5129. fi
  5130. else
  5131. if test "$GXX" = yes; then
  5132. CXXFLAGS="-O2"
  5133. else
  5134. CXXFLAGS=
  5135. fi
  5136. fi
  5137. ac_ext=c
  5138. ac_cpp='$CPP $CPPFLAGS'
  5139. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  5140. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  5141. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  5142. ac_ext=c
  5143. ac_cpp='$CPP $CPPFLAGS'
  5144. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  5145. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  5146. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  5147. { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
  5148. $as_echo_n "checking how to run the C preprocessor... " >&6; }
  5149. # On Suns, sometimes $CPP names a directory.
  5150. if test -n "$CPP" && test -d "$CPP"; then
  5151. CPP=
  5152. fi
  5153. if test -z "$CPP"; then
  5154. if ${ac_cv_prog_CPP+:} false; then :
  5155. $as_echo_n "(cached) " >&6
  5156. else
  5157. # Double quotes because CPP needs to be expanded
  5158. for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
  5159. do
  5160. ac_preproc_ok=false
  5161. for ac_c_preproc_warn_flag in '' yes
  5162. do
  5163. # Use a header file that comes with gcc, so configuring glibc
  5164. # with a fresh cross-compiler works.
  5165. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  5166. # <limits.h> exists even on freestanding compilers.
  5167. # On the NeXT, cc -E runs the code through the compiler's parser,
  5168. # not just through cpp. "Syntax error" is here to catch this case.
  5169. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5170. /* end confdefs.h. */
  5171. #ifdef __STDC__
  5172. # include <limits.h>
  5173. #else
  5174. # include <assert.h>
  5175. #endif
  5176. Syntax error
  5177. _ACEOF
  5178. if ac_fn_c_try_cpp "$LINENO"; then :
  5179. else
  5180. # Broken: fails on valid input.
  5181. continue
  5182. fi
  5183. rm -f conftest.err conftest.i conftest.$ac_ext
  5184. # OK, works on sane cases. Now check whether nonexistent headers
  5185. # can be detected and how.
  5186. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5187. /* end confdefs.h. */
  5188. #include <ac_nonexistent.h>
  5189. _ACEOF
  5190. if ac_fn_c_try_cpp "$LINENO"; then :
  5191. # Broken: success on invalid input.
  5192. continue
  5193. else
  5194. # Passes both tests.
  5195. ac_preproc_ok=:
  5196. break
  5197. fi
  5198. rm -f conftest.err conftest.i conftest.$ac_ext
  5199. done
  5200. # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
  5201. rm -f conftest.i conftest.err conftest.$ac_ext
  5202. if $ac_preproc_ok; then :
  5203. break
  5204. fi
  5205. done
  5206. ac_cv_prog_CPP=$CPP
  5207. fi
  5208. CPP=$ac_cv_prog_CPP
  5209. else
  5210. ac_cv_prog_CPP=$CPP
  5211. fi
  5212. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
  5213. $as_echo "$CPP" >&6; }
  5214. ac_preproc_ok=false
  5215. for ac_c_preproc_warn_flag in '' yes
  5216. do
  5217. # Use a header file that comes with gcc, so configuring glibc
  5218. # with a fresh cross-compiler works.
  5219. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  5220. # <limits.h> exists even on freestanding compilers.
  5221. # On the NeXT, cc -E runs the code through the compiler's parser,
  5222. # not just through cpp. "Syntax error" is here to catch this case.
  5223. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5224. /* end confdefs.h. */
  5225. #ifdef __STDC__
  5226. # include <limits.h>
  5227. #else
  5228. # include <assert.h>
  5229. #endif
  5230. Syntax error
  5231. _ACEOF
  5232. if ac_fn_c_try_cpp "$LINENO"; then :
  5233. else
  5234. # Broken: fails on valid input.
  5235. continue
  5236. fi
  5237. rm -f conftest.err conftest.i conftest.$ac_ext
  5238. # OK, works on sane cases. Now check whether nonexistent headers
  5239. # can be detected and how.
  5240. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5241. /* end confdefs.h. */
  5242. #include <ac_nonexistent.h>
  5243. _ACEOF
  5244. if ac_fn_c_try_cpp "$LINENO"; then :
  5245. # Broken: success on invalid input.
  5246. continue
  5247. else
  5248. # Passes both tests.
  5249. ac_preproc_ok=:
  5250. break
  5251. fi
  5252. rm -f conftest.err conftest.i conftest.$ac_ext
  5253. done
  5254. # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
  5255. rm -f conftest.i conftest.err conftest.$ac_ext
  5256. if $ac_preproc_ok; then :
  5257. else
  5258. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  5259. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  5260. as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
  5261. See \`config.log' for more details" "$LINENO" 5; }
  5262. fi
  5263. ac_ext=c
  5264. ac_cpp='$CPP $CPPFLAGS'
  5265. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  5266. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  5267. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  5268. ac_ext=cpp
  5269. ac_cpp='$CXXCPP $CPPFLAGS'
  5270. ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  5271. ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  5272. ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  5273. { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
  5274. $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
  5275. if test -z "$CXXCPP"; then
  5276. if ${ac_cv_prog_CXXCPP+:} false; then :
  5277. $as_echo_n "(cached) " >&6
  5278. else
  5279. # Double quotes because CXXCPP needs to be expanded
  5280. for CXXCPP in "$CXX -E" "/lib/cpp"
  5281. do
  5282. ac_preproc_ok=false
  5283. for ac_cxx_preproc_warn_flag in '' yes
  5284. do
  5285. # Use a header file that comes with gcc, so configuring glibc
  5286. # with a fresh cross-compiler works.
  5287. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  5288. # <limits.h> exists even on freestanding compilers.
  5289. # On the NeXT, cc -E runs the code through the compiler's parser,
  5290. # not just through cpp. "Syntax error" is here to catch this case.
  5291. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5292. /* end confdefs.h. */
  5293. #ifdef __STDC__
  5294. # include <limits.h>
  5295. #else
  5296. # include <assert.h>
  5297. #endif
  5298. Syntax error
  5299. _ACEOF
  5300. if ac_fn_cxx_try_cpp "$LINENO"; then :
  5301. else
  5302. # Broken: fails on valid input.
  5303. continue
  5304. fi
  5305. rm -f conftest.err conftest.i conftest.$ac_ext
  5306. # OK, works on sane cases. Now check whether nonexistent headers
  5307. # can be detected and how.
  5308. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5309. /* end confdefs.h. */
  5310. #include <ac_nonexistent.h>
  5311. _ACEOF
  5312. if ac_fn_cxx_try_cpp "$LINENO"; then :
  5313. # Broken: success on invalid input.
  5314. continue
  5315. else
  5316. # Passes both tests.
  5317. ac_preproc_ok=:
  5318. break
  5319. fi
  5320. rm -f conftest.err conftest.i conftest.$ac_ext
  5321. done
  5322. # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
  5323. rm -f conftest.i conftest.err conftest.$ac_ext
  5324. if $ac_preproc_ok; then :
  5325. break
  5326. fi
  5327. done
  5328. ac_cv_prog_CXXCPP=$CXXCPP
  5329. fi
  5330. CXXCPP=$ac_cv_prog_CXXCPP
  5331. else
  5332. ac_cv_prog_CXXCPP=$CXXCPP
  5333. fi
  5334. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
  5335. $as_echo "$CXXCPP" >&6; }
  5336. ac_preproc_ok=false
  5337. for ac_cxx_preproc_warn_flag in '' yes
  5338. do
  5339. # Use a header file that comes with gcc, so configuring glibc
  5340. # with a fresh cross-compiler works.
  5341. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  5342. # <limits.h> exists even on freestanding compilers.
  5343. # On the NeXT, cc -E runs the code through the compiler's parser,
  5344. # not just through cpp. "Syntax error" is here to catch this case.
  5345. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5346. /* end confdefs.h. */
  5347. #ifdef __STDC__
  5348. # include <limits.h>
  5349. #else
  5350. # include <assert.h>
  5351. #endif
  5352. Syntax error
  5353. _ACEOF
  5354. if ac_fn_cxx_try_cpp "$LINENO"; then :
  5355. else
  5356. # Broken: fails on valid input.
  5357. continue
  5358. fi
  5359. rm -f conftest.err conftest.i conftest.$ac_ext
  5360. # OK, works on sane cases. Now check whether nonexistent headers
  5361. # can be detected and how.
  5362. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5363. /* end confdefs.h. */
  5364. #include <ac_nonexistent.h>
  5365. _ACEOF
  5366. if ac_fn_cxx_try_cpp "$LINENO"; then :
  5367. # Broken: success on invalid input.
  5368. continue
  5369. else
  5370. # Passes both tests.
  5371. ac_preproc_ok=:
  5372. break
  5373. fi
  5374. rm -f conftest.err conftest.i conftest.$ac_ext
  5375. done
  5376. # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
  5377. rm -f conftest.i conftest.err conftest.$ac_ext
  5378. if $ac_preproc_ok; then :
  5379. else
  5380. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  5381. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  5382. as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
  5383. See \`config.log' for more details" "$LINENO" 5; }
  5384. fi
  5385. ac_ext=c
  5386. ac_cpp='$CPP $CPPFLAGS'
  5387. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  5388. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  5389. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  5390. # This macro is just copied into our local acinclude.m4 from libtool.m4 so that
  5391. # the developers regenerating the configure script don't have to install libtool.
  5392. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
  5393. $as_echo_n "checking for a sed that does not truncate output... " >&6; }
  5394. if ${ac_cv_path_SED+:} false; then :
  5395. $as_echo_n "(cached) " >&6
  5396. else
  5397. ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
  5398. for ac_i in 1 2 3 4 5 6 7; do
  5399. ac_script="$ac_script$as_nl$ac_script"
  5400. done
  5401. echo "$ac_script" | sed 99q >conftest.sed
  5402. $as_unset ac_script || ac_script=
  5403. if test -z "$SED"; then
  5404. ac_path_SED_found=false
  5405. # Loop through the user's path and test for each of PROGNAME-LIST
  5406. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5407. for as_dir in $PATH
  5408. do
  5409. IFS=$as_save_IFS
  5410. test -z "$as_dir" && as_dir=.
  5411. for ac_prog in sed gsed; do
  5412. for ac_exec_ext in '' $ac_executable_extensions; do
  5413. ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
  5414. as_fn_executable_p "$ac_path_SED" || continue
  5415. # Check for GNU ac_path_SED and select it if it is found.
  5416. # Check for GNU $ac_path_SED
  5417. case `"$ac_path_SED" --version 2>&1` in
  5418. *GNU*)
  5419. ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
  5420. *)
  5421. ac_count=0
  5422. $as_echo_n 0123456789 >"conftest.in"
  5423. while :
  5424. do
  5425. cat "conftest.in" "conftest.in" >"conftest.tmp"
  5426. mv "conftest.tmp" "conftest.in"
  5427. cp "conftest.in" "conftest.nl"
  5428. $as_echo '' >> "conftest.nl"
  5429. "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
  5430. diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
  5431. as_fn_arith $ac_count + 1 && ac_count=$as_val
  5432. if test $ac_count -gt ${ac_path_SED_max-0}; then
  5433. # Best one so far, save it but keep looking for a better one
  5434. ac_cv_path_SED="$ac_path_SED"
  5435. ac_path_SED_max=$ac_count
  5436. fi
  5437. # 10*(2^10) chars as input seems more than enough
  5438. test $ac_count -gt 10 && break
  5439. done
  5440. rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
  5441. esac
  5442. $ac_path_SED_found && break 3
  5443. done
  5444. done
  5445. done
  5446. IFS=$as_save_IFS
  5447. if test -z "$ac_cv_path_SED"; then
  5448. as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
  5449. fi
  5450. else
  5451. ac_cv_path_SED=$SED
  5452. fi
  5453. fi
  5454. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
  5455. $as_echo "$ac_cv_path_SED" >&6; }
  5456. SED="$ac_cv_path_SED"
  5457. rm -f conftest.sed
  5458. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
  5459. $as_echo_n "checking for egrep... " >&6; }
  5460. if ${ac_cv_prog_egrep+:} false; then :
  5461. $as_echo_n "(cached) " >&6
  5462. else
  5463. if echo a | (grep -E '(a|b)') >/dev/null 2>&1
  5464. then ac_cv_prog_egrep='grep -E'
  5465. else ac_cv_prog_egrep='egrep'
  5466. fi
  5467. fi
  5468. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_egrep" >&5
  5469. $as_echo "$ac_cv_prog_egrep" >&6; }
  5470. EGREP=$ac_cv_prog_egrep
  5471. # Check whether --with-gnu-ld was given.
  5472. if test "${with_gnu_ld+set}" = set; then :
  5473. withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
  5474. else
  5475. with_gnu_ld=no
  5476. fi
  5477. ac_prog=ld
  5478. if test "$GCC" = yes; then
  5479. # Check if gcc -print-prog-name=ld gives a path.
  5480. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
  5481. $as_echo_n "checking for ld used by $CC... " >&6; }
  5482. case $host in
  5483. *-*-mingw*)
  5484. # gcc leaves a trailing carriage return which upsets mingw
  5485. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  5486. *)
  5487. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  5488. esac
  5489. case $ac_prog in
  5490. # Accept absolute paths.
  5491. [\\/]* | ?:[\\/]*)
  5492. re_direlt='/[^/][^/]*/\.\./'
  5493. # Canonicalize the pathname of ld
  5494. ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
  5495. while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
  5496. ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
  5497. done
  5498. test -z "$LD" && LD="$ac_prog"
  5499. ;;
  5500. "")
  5501. # If it fails, then pretend we aren't using GCC.
  5502. ac_prog=ld
  5503. ;;
  5504. *)
  5505. # If it is relative, then search for the first ld in PATH.
  5506. with_gnu_ld=unknown
  5507. ;;
  5508. esac
  5509. elif test "$with_gnu_ld" = yes; then
  5510. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
  5511. $as_echo_n "checking for GNU ld... " >&6; }
  5512. else
  5513. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
  5514. $as_echo_n "checking for non-GNU ld... " >&6; }
  5515. fi
  5516. if ${lt_cv_path_LD+:} false; then :
  5517. $as_echo_n "(cached) " >&6
  5518. else
  5519. if test -z "$LD"; then
  5520. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  5521. for ac_dir in $PATH; do
  5522. IFS="$lt_save_ifs"
  5523. test -z "$ac_dir" && ac_dir=.
  5524. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  5525. lt_cv_path_LD="$ac_dir/$ac_prog"
  5526. # Check to see if the program is GNU ld. I'd rather use --version,
  5527. # but apparently some variants of GNU ld only accept -v.
  5528. # Break only if it was the GNU/non-GNU ld that we prefer.
  5529. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  5530. *GNU* | *'with BFD'*)
  5531. test "$with_gnu_ld" != no && break
  5532. ;;
  5533. *)
  5534. test "$with_gnu_ld" != yes && break
  5535. ;;
  5536. esac
  5537. fi
  5538. done
  5539. IFS="$lt_save_ifs"
  5540. else
  5541. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  5542. fi
  5543. fi
  5544. LD="$lt_cv_path_LD"
  5545. if test -n "$LD"; then
  5546. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
  5547. $as_echo "$LD" >&6; }
  5548. else
  5549. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  5550. $as_echo "no" >&6; }
  5551. fi
  5552. test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
  5553. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
  5554. $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
  5555. if ${lt_cv_prog_gnu_ld+:} false; then :
  5556. $as_echo_n "(cached) " >&6
  5557. else
  5558. # I'd rather use --version here, but apparently some GNU lds only accept -v.
  5559. case `$LD -v 2>&1 </dev/null` in
  5560. *GNU* | *'with BFD'*)
  5561. lt_cv_prog_gnu_ld=yes
  5562. ;;
  5563. *)
  5564. lt_cv_prog_gnu_ld=no
  5565. ;;
  5566. esac
  5567. fi
  5568. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
  5569. $as_echo "$lt_cv_prog_gnu_ld" >&6; }
  5570. with_gnu_ld=$lt_cv_prog_gnu_ld
  5571. # note, does not work on FreeBSD
  5572. for ac_prog in gawk mawk nawk awk
  5573. do
  5574. # Extract the first word of "$ac_prog", so it can be a program name with args.
  5575. set dummy $ac_prog; ac_word=$2
  5576. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  5577. $as_echo_n "checking for $ac_word... " >&6; }
  5578. if ${ac_cv_prog_AWK+:} false; then :
  5579. $as_echo_n "(cached) " >&6
  5580. else
  5581. if test -n "$AWK"; then
  5582. ac_cv_prog_AWK="$AWK" # Let the user override the test.
  5583. else
  5584. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5585. for as_dir in $PATH
  5586. do
  5587. IFS=$as_save_IFS
  5588. test -z "$as_dir" && as_dir=.
  5589. for ac_exec_ext in '' $ac_executable_extensions; do
  5590. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  5591. ac_cv_prog_AWK="$ac_prog"
  5592. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  5593. break 2
  5594. fi
  5595. done
  5596. done
  5597. IFS=$as_save_IFS
  5598. fi
  5599. fi
  5600. AWK=$ac_cv_prog_AWK
  5601. if test -n "$AWK"; then
  5602. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
  5603. $as_echo "$AWK" >&6; }
  5604. else
  5605. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  5606. $as_echo "no" >&6; }
  5607. fi
  5608. test -n "$AWK" && break
  5609. done
  5610. # Find a good install program. We prefer a C program (faster),
  5611. # so one script is as good as another. But avoid the broken or
  5612. # incompatible versions:
  5613. # SysV /etc/install, /usr/sbin/install
  5614. # SunOS /usr/etc/install
  5615. # IRIX /sbin/install
  5616. # AIX /bin/install
  5617. # AmigaOS /C/install, which installs bootblocks on floppy discs
  5618. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  5619. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  5620. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  5621. # OS/2's system install, which has a completely different semantic
  5622. # ./install, which can be erroneously created by make from ./install.sh.
  5623. # Reject install programs that cannot install multiple files.
  5624. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
  5625. $as_echo_n "checking for a BSD-compatible install... " >&6; }
  5626. if test -z "$INSTALL"; then
  5627. if ${ac_cv_path_install+:} false; then :
  5628. $as_echo_n "(cached) " >&6
  5629. else
  5630. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5631. for as_dir in $PATH
  5632. do
  5633. IFS=$as_save_IFS
  5634. test -z "$as_dir" && as_dir=.
  5635. # Account for people who put trailing slashes in PATH elements.
  5636. case $as_dir/ in #((
  5637. ./ | .// | /[cC]/* | \
  5638. /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
  5639. ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
  5640. /usr/ucb/* ) ;;
  5641. *)
  5642. # OSF1 and SCO ODT 3.0 have their own names for install.
  5643. # Don't use installbsd from OSF since it installs stuff as root
  5644. # by default.
  5645. for ac_prog in ginstall scoinst install; do
  5646. for ac_exec_ext in '' $ac_executable_extensions; do
  5647. if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
  5648. if test $ac_prog = install &&
  5649. grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
  5650. # AIX install. It has an incompatible calling convention.
  5651. :
  5652. elif test $ac_prog = install &&
  5653. grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
  5654. # program-specific install script used by HP pwplus--don't use.
  5655. :
  5656. else
  5657. rm -rf conftest.one conftest.two conftest.dir
  5658. echo one > conftest.one
  5659. echo two > conftest.two
  5660. mkdir conftest.dir
  5661. if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
  5662. test -s conftest.one && test -s conftest.two &&
  5663. test -s conftest.dir/conftest.one &&
  5664. test -s conftest.dir/conftest.two
  5665. then
  5666. ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
  5667. break 3
  5668. fi
  5669. fi
  5670. fi
  5671. done
  5672. done
  5673. ;;
  5674. esac
  5675. done
  5676. IFS=$as_save_IFS
  5677. rm -rf conftest.one conftest.two conftest.dir
  5678. fi
  5679. if test "${ac_cv_path_install+set}" = set; then
  5680. INSTALL=$ac_cv_path_install
  5681. else
  5682. # As a last resort, use the slow shell script. Don't cache a
  5683. # value for INSTALL within a source directory, because that will
  5684. # break other packages using the cache if that directory is
  5685. # removed, or if the value is a relative name.
  5686. INSTALL=$ac_install_sh
  5687. fi
  5688. fi
  5689. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
  5690. $as_echo "$INSTALL" >&6; }
  5691. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  5692. # It thinks the first close brace ends the variable substitution.
  5693. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  5694. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
  5695. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  5696. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
  5697. $as_echo_n "checking whether ln -s works... " >&6; }
  5698. LN_S=$as_ln_s
  5699. if test "$LN_S" = "ln -s"; then
  5700. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  5701. $as_echo "yes" >&6; }
  5702. else
  5703. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
  5704. $as_echo "no, using $LN_S" >&6; }
  5705. fi
  5706. if test -n "$ac_tool_prefix"; then
  5707. # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
  5708. set dummy ${ac_tool_prefix}ranlib; ac_word=$2
  5709. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  5710. $as_echo_n "checking for $ac_word... " >&6; }
  5711. if ${ac_cv_prog_RANLIB+:} false; then :
  5712. $as_echo_n "(cached) " >&6
  5713. else
  5714. if test -n "$RANLIB"; then
  5715. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  5716. else
  5717. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5718. for as_dir in $PATH
  5719. do
  5720. IFS=$as_save_IFS
  5721. test -z "$as_dir" && as_dir=.
  5722. for ac_exec_ext in '' $ac_executable_extensions; do
  5723. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  5724. ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
  5725. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  5726. break 2
  5727. fi
  5728. done
  5729. done
  5730. IFS=$as_save_IFS
  5731. fi
  5732. fi
  5733. RANLIB=$ac_cv_prog_RANLIB
  5734. if test -n "$RANLIB"; then
  5735. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
  5736. $as_echo "$RANLIB" >&6; }
  5737. else
  5738. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  5739. $as_echo "no" >&6; }
  5740. fi
  5741. fi
  5742. if test -z "$ac_cv_prog_RANLIB"; then
  5743. ac_ct_RANLIB=$RANLIB
  5744. # Extract the first word of "ranlib", so it can be a program name with args.
  5745. set dummy ranlib; ac_word=$2
  5746. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  5747. $as_echo_n "checking for $ac_word... " >&6; }
  5748. if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
  5749. $as_echo_n "(cached) " >&6
  5750. else
  5751. if test -n "$ac_ct_RANLIB"; then
  5752. ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
  5753. else
  5754. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5755. for as_dir in $PATH
  5756. do
  5757. IFS=$as_save_IFS
  5758. test -z "$as_dir" && as_dir=.
  5759. for ac_exec_ext in '' $ac_executable_extensions; do
  5760. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  5761. ac_cv_prog_ac_ct_RANLIB="ranlib"
  5762. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  5763. break 2
  5764. fi
  5765. done
  5766. done
  5767. IFS=$as_save_IFS
  5768. fi
  5769. fi
  5770. ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
  5771. if test -n "$ac_ct_RANLIB"; then
  5772. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
  5773. $as_echo "$ac_ct_RANLIB" >&6; }
  5774. else
  5775. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  5776. $as_echo "no" >&6; }
  5777. fi
  5778. if test "x$ac_ct_RANLIB" = x; then
  5779. RANLIB=":"
  5780. else
  5781. case $cross_compiling:$ac_tool_warned in
  5782. yes:)
  5783. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  5784. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  5785. ac_tool_warned=yes ;;
  5786. esac
  5787. RANLIB=$ac_ct_RANLIB
  5788. fi
  5789. else
  5790. RANLIB="$ac_cv_prog_RANLIB"
  5791. fi
  5792. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5
  5793. $as_echo_n "checking for GNU make... " >&6; }
  5794. if ${ac_cv_GNU_MAKE+:} false; then :
  5795. $as_echo_n "(cached) " >&6
  5796. else
  5797. ac_cv_GNU_MAKE='Not Found' ;
  5798. ac_cv_GNU_MAKE_VERSION_MAJOR=0 ;
  5799. ac_cv_GNU_MAKE_VERSION_MINOR=0 ;
  5800. for a in make gmake gnumake ; do
  5801. if test -z "$a" ; then continue ; fi ;
  5802. if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
  5803. ac_cv_GNU_MAKE=$a ;
  5804. ac_cv_GNU_MAKE_VERSION_MAJOR=`$ac_cv_GNU_MAKE --version | grep "GNU Make" | cut -f3 -d' ' | cut -f1 -d'.'`
  5805. ac_cv_GNU_MAKE_VERSION_MINOR=`$ac_cv_GNU_MAKE --version | grep "GNU Make" | cut -f2 -d'.' | cut -c1-2`
  5806. break;
  5807. fi
  5808. done ;
  5809. fi
  5810. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_GNU_MAKE" >&5
  5811. $as_echo "$ac_cv_GNU_MAKE" >&6; } ;
  5812. if test "x$ac_cv_GNU_MAKE" = "xNot Found" ; then
  5813. as_fn_error $? "*** Please install GNU make. It is required to build Asterisk!" "$LINENO" 5
  5814. exit 1
  5815. fi
  5816. GNU_MAKE=$ac_cv_GNU_MAKE
  5817. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
  5818. $as_echo_n "checking for egrep... " >&6; }
  5819. if ${ac_cv_path_EGREP+:} false; then :
  5820. $as_echo_n "(cached) " >&6
  5821. else
  5822. if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
  5823. then ac_cv_path_EGREP="$GREP -E"
  5824. else
  5825. if test -z "$EGREP"; then
  5826. ac_path_EGREP_found=false
  5827. # Loop through the user's path and test for each of PROGNAME-LIST
  5828. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5829. for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
  5830. do
  5831. IFS=$as_save_IFS
  5832. test -z "$as_dir" && as_dir=.
  5833. for ac_prog in egrep; do
  5834. for ac_exec_ext in '' $ac_executable_extensions; do
  5835. ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
  5836. as_fn_executable_p "$ac_path_EGREP" || continue
  5837. # Check for GNU ac_path_EGREP and select it if it is found.
  5838. # Check for GNU $ac_path_EGREP
  5839. case `"$ac_path_EGREP" --version 2>&1` in
  5840. *GNU*)
  5841. ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
  5842. *)
  5843. ac_count=0
  5844. $as_echo_n 0123456789 >"conftest.in"
  5845. while :
  5846. do
  5847. cat "conftest.in" "conftest.in" >"conftest.tmp"
  5848. mv "conftest.tmp" "conftest.in"
  5849. cp "conftest.in" "conftest.nl"
  5850. $as_echo 'EGREP' >> "conftest.nl"
  5851. "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
  5852. diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
  5853. as_fn_arith $ac_count + 1 && ac_count=$as_val
  5854. if test $ac_count -gt ${ac_path_EGREP_max-0}; then
  5855. # Best one so far, save it but keep looking for a better one
  5856. ac_cv_path_EGREP="$ac_path_EGREP"
  5857. ac_path_EGREP_max=$ac_count
  5858. fi
  5859. # 10*(2^10) chars as input seems more than enough
  5860. test $ac_count -gt 10 && break
  5861. done
  5862. rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
  5863. esac
  5864. $ac_path_EGREP_found && break 3
  5865. done
  5866. done
  5867. done
  5868. IFS=$as_save_IFS
  5869. if test -z "$ac_cv_path_EGREP"; then
  5870. as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  5871. fi
  5872. else
  5873. ac_cv_path_EGREP=$EGREP
  5874. fi
  5875. fi
  5876. fi
  5877. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
  5878. $as_echo "$ac_cv_path_EGREP" >&6; }
  5879. EGREP="$ac_cv_path_EGREP"
  5880. if test -n "$ac_tool_prefix"; then
  5881. for ac_prog in strip gstrip
  5882. do
  5883. # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
  5884. set dummy $ac_tool_prefix$ac_prog; ac_word=$2
  5885. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  5886. $as_echo_n "checking for $ac_word... " >&6; }
  5887. if ${ac_cv_prog_STRIP+:} false; then :
  5888. $as_echo_n "(cached) " >&6
  5889. else
  5890. if test -n "$STRIP"; then
  5891. ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
  5892. else
  5893. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5894. for as_dir in $PATH
  5895. do
  5896. IFS=$as_save_IFS
  5897. test -z "$as_dir" && as_dir=.
  5898. for ac_exec_ext in '' $ac_executable_extensions; do
  5899. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  5900. ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
  5901. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  5902. break 2
  5903. fi
  5904. done
  5905. done
  5906. IFS=$as_save_IFS
  5907. fi
  5908. fi
  5909. STRIP=$ac_cv_prog_STRIP
  5910. if test -n "$STRIP"; then
  5911. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
  5912. $as_echo "$STRIP" >&6; }
  5913. else
  5914. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  5915. $as_echo "no" >&6; }
  5916. fi
  5917. test -n "$STRIP" && break
  5918. done
  5919. fi
  5920. if test -z "$STRIP"; then
  5921. ac_ct_STRIP=$STRIP
  5922. for ac_prog in strip gstrip
  5923. do
  5924. # Extract the first word of "$ac_prog", so it can be a program name with args.
  5925. set dummy $ac_prog; ac_word=$2
  5926. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  5927. $as_echo_n "checking for $ac_word... " >&6; }
  5928. if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
  5929. $as_echo_n "(cached) " >&6
  5930. else
  5931. if test -n "$ac_ct_STRIP"; then
  5932. ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
  5933. else
  5934. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5935. for as_dir in $PATH
  5936. do
  5937. IFS=$as_save_IFS
  5938. test -z "$as_dir" && as_dir=.
  5939. for ac_exec_ext in '' $ac_executable_extensions; do
  5940. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  5941. ac_cv_prog_ac_ct_STRIP="$ac_prog"
  5942. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  5943. break 2
  5944. fi
  5945. done
  5946. done
  5947. IFS=$as_save_IFS
  5948. fi
  5949. fi
  5950. ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
  5951. if test -n "$ac_ct_STRIP"; then
  5952. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
  5953. $as_echo "$ac_ct_STRIP" >&6; }
  5954. else
  5955. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  5956. $as_echo "no" >&6; }
  5957. fi
  5958. test -n "$ac_ct_STRIP" && break
  5959. done
  5960. if test "x$ac_ct_STRIP" = x; then
  5961. STRIP=":"
  5962. else
  5963. case $cross_compiling:$ac_tool_warned in
  5964. yes:)
  5965. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  5966. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  5967. ac_tool_warned=yes ;;
  5968. esac
  5969. STRIP=$ac_ct_STRIP
  5970. fi
  5971. fi
  5972. if test -n "$ac_tool_prefix"; then
  5973. for ac_prog in ar gar
  5974. do
  5975. # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
  5976. set dummy $ac_tool_prefix$ac_prog; ac_word=$2
  5977. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  5978. $as_echo_n "checking for $ac_word... " >&6; }
  5979. if ${ac_cv_prog_AR+:} false; then :
  5980. $as_echo_n "(cached) " >&6
  5981. else
  5982. if test -n "$AR"; then
  5983. ac_cv_prog_AR="$AR" # Let the user override the test.
  5984. else
  5985. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5986. for as_dir in $PATH
  5987. do
  5988. IFS=$as_save_IFS
  5989. test -z "$as_dir" && as_dir=.
  5990. for ac_exec_ext in '' $ac_executable_extensions; do
  5991. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  5992. ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
  5993. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  5994. break 2
  5995. fi
  5996. done
  5997. done
  5998. IFS=$as_save_IFS
  5999. fi
  6000. fi
  6001. AR=$ac_cv_prog_AR
  6002. if test -n "$AR"; then
  6003. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
  6004. $as_echo "$AR" >&6; }
  6005. else
  6006. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6007. $as_echo "no" >&6; }
  6008. fi
  6009. test -n "$AR" && break
  6010. done
  6011. fi
  6012. if test -z "$AR"; then
  6013. ac_ct_AR=$AR
  6014. for ac_prog in ar gar
  6015. do
  6016. # Extract the first word of "$ac_prog", so it can be a program name with args.
  6017. set dummy $ac_prog; ac_word=$2
  6018. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6019. $as_echo_n "checking for $ac_word... " >&6; }
  6020. if ${ac_cv_prog_ac_ct_AR+:} false; then :
  6021. $as_echo_n "(cached) " >&6
  6022. else
  6023. if test -n "$ac_ct_AR"; then
  6024. ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
  6025. else
  6026. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6027. for as_dir in $PATH
  6028. do
  6029. IFS=$as_save_IFS
  6030. test -z "$as_dir" && as_dir=.
  6031. for ac_exec_ext in '' $ac_executable_extensions; do
  6032. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6033. ac_cv_prog_ac_ct_AR="$ac_prog"
  6034. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6035. break 2
  6036. fi
  6037. done
  6038. done
  6039. IFS=$as_save_IFS
  6040. fi
  6041. fi
  6042. ac_ct_AR=$ac_cv_prog_ac_ct_AR
  6043. if test -n "$ac_ct_AR"; then
  6044. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
  6045. $as_echo "$ac_ct_AR" >&6; }
  6046. else
  6047. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6048. $as_echo "no" >&6; }
  6049. fi
  6050. test -n "$ac_ct_AR" && break
  6051. done
  6052. if test "x$ac_ct_AR" = x; then
  6053. AR=":"
  6054. else
  6055. case $cross_compiling:$ac_tool_warned in
  6056. yes:)
  6057. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  6058. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  6059. ac_tool_warned=yes ;;
  6060. esac
  6061. AR=$ac_ct_AR
  6062. fi
  6063. fi
  6064. GNU_LD=0
  6065. if test "x$with_gnu_ld" = "xyes" ; then
  6066. GNU_LD=1
  6067. fi
  6068. # Extract the first word of "bison", so it can be a program name with args.
  6069. set dummy bison; ac_word=$2
  6070. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6071. $as_echo_n "checking for $ac_word... " >&6; }
  6072. if ${ac_cv_path_BISON+:} false; then :
  6073. $as_echo_n "(cached) " >&6
  6074. else
  6075. case $BISON in
  6076. [\\/]* | ?:[\\/]*)
  6077. ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
  6078. ;;
  6079. *)
  6080. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6081. for as_dir in $PATH
  6082. do
  6083. IFS=$as_save_IFS
  6084. test -z "$as_dir" && as_dir=.
  6085. for ac_exec_ext in '' $ac_executable_extensions; do
  6086. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6087. ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
  6088. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6089. break 2
  6090. fi
  6091. done
  6092. done
  6093. IFS=$as_save_IFS
  6094. test -z "$ac_cv_path_BISON" && ac_cv_path_BISON=":"
  6095. ;;
  6096. esac
  6097. fi
  6098. BISON=$ac_cv_path_BISON
  6099. if test -n "$BISON"; then
  6100. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
  6101. $as_echo "$BISON" >&6; }
  6102. else
  6103. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6104. $as_echo "no" >&6; }
  6105. fi
  6106. # Extract the first word of "cmp", so it can be a program name with args.
  6107. set dummy cmp; ac_word=$2
  6108. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6109. $as_echo_n "checking for $ac_word... " >&6; }
  6110. if ${ac_cv_path_CMP+:} false; then :
  6111. $as_echo_n "(cached) " >&6
  6112. else
  6113. case $CMP in
  6114. [\\/]* | ?:[\\/]*)
  6115. ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
  6116. ;;
  6117. *)
  6118. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6119. for as_dir in $PATH
  6120. do
  6121. IFS=$as_save_IFS
  6122. test -z "$as_dir" && as_dir=.
  6123. for ac_exec_ext in '' $ac_executable_extensions; do
  6124. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6125. ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
  6126. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6127. break 2
  6128. fi
  6129. done
  6130. done
  6131. IFS=$as_save_IFS
  6132. test -z "$ac_cv_path_CMP" && ac_cv_path_CMP=":"
  6133. ;;
  6134. esac
  6135. fi
  6136. CMP=$ac_cv_path_CMP
  6137. if test -n "$CMP"; then
  6138. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
  6139. $as_echo "$CMP" >&6; }
  6140. else
  6141. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6142. $as_echo "no" >&6; }
  6143. fi
  6144. # Extract the first word of "flex", so it can be a program name with args.
  6145. set dummy flex; ac_word=$2
  6146. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6147. $as_echo_n "checking for $ac_word... " >&6; }
  6148. if ${ac_cv_path_FLEX+:} false; then :
  6149. $as_echo_n "(cached) " >&6
  6150. else
  6151. case $FLEX in
  6152. [\\/]* | ?:[\\/]*)
  6153. ac_cv_path_FLEX="$FLEX" # Let the user override the test with a path.
  6154. ;;
  6155. *)
  6156. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6157. for as_dir in $PATH
  6158. do
  6159. IFS=$as_save_IFS
  6160. test -z "$as_dir" && as_dir=.
  6161. for ac_exec_ext in '' $ac_executable_extensions; do
  6162. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6163. ac_cv_path_FLEX="$as_dir/$ac_word$ac_exec_ext"
  6164. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6165. break 2
  6166. fi
  6167. done
  6168. done
  6169. IFS=$as_save_IFS
  6170. test -z "$ac_cv_path_FLEX" && ac_cv_path_FLEX=":"
  6171. ;;
  6172. esac
  6173. fi
  6174. FLEX=$ac_cv_path_FLEX
  6175. if test -n "$FLEX"; then
  6176. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX" >&5
  6177. $as_echo "$FLEX" >&6; }
  6178. else
  6179. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6180. $as_echo "no" >&6; }
  6181. fi
  6182. # Extract the first word of "grep", so it can be a program name with args.
  6183. set dummy grep; ac_word=$2
  6184. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6185. $as_echo_n "checking for $ac_word... " >&6; }
  6186. if ${ac_cv_path_GREP+:} false; then :
  6187. $as_echo_n "(cached) " >&6
  6188. else
  6189. case $GREP in
  6190. [\\/]* | ?:[\\/]*)
  6191. ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
  6192. ;;
  6193. *)
  6194. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6195. for as_dir in $PATH
  6196. do
  6197. IFS=$as_save_IFS
  6198. test -z "$as_dir" && as_dir=.
  6199. for ac_exec_ext in '' $ac_executable_extensions; do
  6200. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6201. ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
  6202. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6203. break 2
  6204. fi
  6205. done
  6206. done
  6207. IFS=$as_save_IFS
  6208. test -z "$ac_cv_path_GREP" && ac_cv_path_GREP=":"
  6209. ;;
  6210. esac
  6211. fi
  6212. GREP=$ac_cv_path_GREP
  6213. if test -n "$GREP"; then
  6214. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
  6215. $as_echo "$GREP" >&6; }
  6216. else
  6217. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6218. $as_echo "no" >&6; }
  6219. fi
  6220. # Extract the first word of "python", so it can be a program name with args.
  6221. set dummy python; ac_word=$2
  6222. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6223. $as_echo_n "checking for $ac_word... " >&6; }
  6224. if ${ac_cv_path_PYTHON+:} false; then :
  6225. $as_echo_n "(cached) " >&6
  6226. else
  6227. case $PYTHON in
  6228. [\\/]* | ?:[\\/]*)
  6229. ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
  6230. ;;
  6231. *)
  6232. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6233. for as_dir in $PATH
  6234. do
  6235. IFS=$as_save_IFS
  6236. test -z "$as_dir" && as_dir=.
  6237. for ac_exec_ext in '' $ac_executable_extensions; do
  6238. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6239. ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
  6240. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6241. break 2
  6242. fi
  6243. done
  6244. done
  6245. IFS=$as_save_IFS
  6246. test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON=":"
  6247. ;;
  6248. esac
  6249. fi
  6250. PYTHON=$ac_cv_path_PYTHON
  6251. if test -n "$PYTHON"; then
  6252. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
  6253. $as_echo "$PYTHON" >&6; }
  6254. else
  6255. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6256. $as_echo "no" >&6; }
  6257. fi
  6258. # Extract the first word of "find", so it can be a program name with args.
  6259. set dummy find; ac_word=$2
  6260. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6261. $as_echo_n "checking for $ac_word... " >&6; }
  6262. if ${ac_cv_path_FIND+:} false; then :
  6263. $as_echo_n "(cached) " >&6
  6264. else
  6265. case $FIND in
  6266. [\\/]* | ?:[\\/]*)
  6267. ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
  6268. ;;
  6269. *)
  6270. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6271. for as_dir in $PATH
  6272. do
  6273. IFS=$as_save_IFS
  6274. test -z "$as_dir" && as_dir=.
  6275. for ac_exec_ext in '' $ac_executable_extensions; do
  6276. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6277. ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
  6278. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6279. break 2
  6280. fi
  6281. done
  6282. done
  6283. IFS=$as_save_IFS
  6284. test -z "$ac_cv_path_FIND" && ac_cv_path_FIND=":"
  6285. ;;
  6286. esac
  6287. fi
  6288. FIND=$ac_cv_path_FIND
  6289. if test -n "$FIND"; then
  6290. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
  6291. $as_echo "$FIND" >&6; }
  6292. else
  6293. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6294. $as_echo "no" >&6; }
  6295. fi
  6296. # Extract the first word of "compress", so it can be a program name with args.
  6297. set dummy compress; ac_word=$2
  6298. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6299. $as_echo_n "checking for $ac_word... " >&6; }
  6300. if ${ac_cv_path_COMPRESS+:} false; then :
  6301. $as_echo_n "(cached) " >&6
  6302. else
  6303. case $COMPRESS in
  6304. [\\/]* | ?:[\\/]*)
  6305. ac_cv_path_COMPRESS="$COMPRESS" # Let the user override the test with a path.
  6306. ;;
  6307. *)
  6308. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6309. for as_dir in $PATH
  6310. do
  6311. IFS=$as_save_IFS
  6312. test -z "$as_dir" && as_dir=.
  6313. for ac_exec_ext in '' $ac_executable_extensions; do
  6314. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6315. ac_cv_path_COMPRESS="$as_dir/$ac_word$ac_exec_ext"
  6316. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6317. break 2
  6318. fi
  6319. done
  6320. done
  6321. IFS=$as_save_IFS
  6322. test -z "$ac_cv_path_COMPRESS" && ac_cv_path_COMPRESS=":"
  6323. ;;
  6324. esac
  6325. fi
  6326. COMPRESS=$ac_cv_path_COMPRESS
  6327. if test -n "$COMPRESS"; then
  6328. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPRESS" >&5
  6329. $as_echo "$COMPRESS" >&6; }
  6330. else
  6331. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6332. $as_echo "no" >&6; }
  6333. fi
  6334. # Extract the first word of "basename", so it can be a program name with args.
  6335. set dummy basename; ac_word=$2
  6336. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6337. $as_echo_n "checking for $ac_word... " >&6; }
  6338. if ${ac_cv_path_BASENAME+:} false; then :
  6339. $as_echo_n "(cached) " >&6
  6340. else
  6341. case $BASENAME in
  6342. [\\/]* | ?:[\\/]*)
  6343. ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
  6344. ;;
  6345. *)
  6346. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6347. for as_dir in $PATH
  6348. do
  6349. IFS=$as_save_IFS
  6350. test -z "$as_dir" && as_dir=.
  6351. for ac_exec_ext in '' $ac_executable_extensions; do
  6352. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6353. ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
  6354. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6355. break 2
  6356. fi
  6357. done
  6358. done
  6359. IFS=$as_save_IFS
  6360. test -z "$ac_cv_path_BASENAME" && ac_cv_path_BASENAME=":"
  6361. ;;
  6362. esac
  6363. fi
  6364. BASENAME=$ac_cv_path_BASENAME
  6365. if test -n "$BASENAME"; then
  6366. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
  6367. $as_echo "$BASENAME" >&6; }
  6368. else
  6369. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6370. $as_echo "no" >&6; }
  6371. fi
  6372. # Extract the first word of "dirname", so it can be a program name with args.
  6373. set dummy dirname; ac_word=$2
  6374. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6375. $as_echo_n "checking for $ac_word... " >&6; }
  6376. if ${ac_cv_path_DIRNAME+:} false; then :
  6377. $as_echo_n "(cached) " >&6
  6378. else
  6379. case $DIRNAME in
  6380. [\\/]* | ?:[\\/]*)
  6381. ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
  6382. ;;
  6383. *)
  6384. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6385. for as_dir in $PATH
  6386. do
  6387. IFS=$as_save_IFS
  6388. test -z "$as_dir" && as_dir=.
  6389. for ac_exec_ext in '' $ac_executable_extensions; do
  6390. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6391. ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
  6392. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6393. break 2
  6394. fi
  6395. done
  6396. done
  6397. IFS=$as_save_IFS
  6398. test -z "$ac_cv_path_DIRNAME" && ac_cv_path_DIRNAME=":"
  6399. ;;
  6400. esac
  6401. fi
  6402. DIRNAME=$ac_cv_path_DIRNAME
  6403. if test -n "$DIRNAME"; then
  6404. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
  6405. $as_echo "$DIRNAME" >&6; }
  6406. else
  6407. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6408. $as_echo "no" >&6; }
  6409. fi
  6410. # Extract the first word of "sh", so it can be a program name with args.
  6411. set dummy sh; ac_word=$2
  6412. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6413. $as_echo_n "checking for $ac_word... " >&6; }
  6414. if ${ac_cv_path_SHELL+:} false; then :
  6415. $as_echo_n "(cached) " >&6
  6416. else
  6417. case $SHELL in
  6418. [\\/]* | ?:[\\/]*)
  6419. ac_cv_path_SHELL="$SHELL" # Let the user override the test with a path.
  6420. ;;
  6421. *)
  6422. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6423. for as_dir in $PATH
  6424. do
  6425. IFS=$as_save_IFS
  6426. test -z "$as_dir" && as_dir=.
  6427. for ac_exec_ext in '' $ac_executable_extensions; do
  6428. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6429. ac_cv_path_SHELL="$as_dir/$ac_word$ac_exec_ext"
  6430. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6431. break 2
  6432. fi
  6433. done
  6434. done
  6435. IFS=$as_save_IFS
  6436. test -z "$ac_cv_path_SHELL" && ac_cv_path_SHELL=":"
  6437. ;;
  6438. esac
  6439. fi
  6440. SHELL=$ac_cv_path_SHELL
  6441. if test -n "$SHELL"; then
  6442. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHELL" >&5
  6443. $as_echo "$SHELL" >&6; }
  6444. else
  6445. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6446. $as_echo "no" >&6; }
  6447. fi
  6448. # Extract the first word of "ln", so it can be a program name with args.
  6449. set dummy ln; ac_word=$2
  6450. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6451. $as_echo_n "checking for $ac_word... " >&6; }
  6452. if ${ac_cv_path_LN+:} false; then :
  6453. $as_echo_n "(cached) " >&6
  6454. else
  6455. case $LN in
  6456. [\\/]* | ?:[\\/]*)
  6457. ac_cv_path_LN="$LN" # Let the user override the test with a path.
  6458. ;;
  6459. *)
  6460. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6461. for as_dir in $PATH
  6462. do
  6463. IFS=$as_save_IFS
  6464. test -z "$as_dir" && as_dir=.
  6465. for ac_exec_ext in '' $ac_executable_extensions; do
  6466. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6467. ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
  6468. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6469. break 2
  6470. fi
  6471. done
  6472. done
  6473. IFS=$as_save_IFS
  6474. test -z "$ac_cv_path_LN" && ac_cv_path_LN=":"
  6475. ;;
  6476. esac
  6477. fi
  6478. LN=$ac_cv_path_LN
  6479. if test -n "$LN"; then
  6480. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
  6481. $as_echo "$LN" >&6; }
  6482. else
  6483. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6484. $as_echo "no" >&6; }
  6485. fi
  6486. # Extract the first word of "doxygen", so it can be a program name with args.
  6487. set dummy doxygen; ac_word=$2
  6488. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6489. $as_echo_n "checking for $ac_word... " >&6; }
  6490. if ${ac_cv_path_DOXYGEN+:} false; then :
  6491. $as_echo_n "(cached) " >&6
  6492. else
  6493. case $DOXYGEN in
  6494. [\\/]* | ?:[\\/]*)
  6495. ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path.
  6496. ;;
  6497. *)
  6498. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6499. for as_dir in $PATH
  6500. do
  6501. IFS=$as_save_IFS
  6502. test -z "$as_dir" && as_dir=.
  6503. for ac_exec_ext in '' $ac_executable_extensions; do
  6504. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6505. ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext"
  6506. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6507. break 2
  6508. fi
  6509. done
  6510. done
  6511. IFS=$as_save_IFS
  6512. test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN=":"
  6513. ;;
  6514. esac
  6515. fi
  6516. DOXYGEN=$ac_cv_path_DOXYGEN
  6517. if test -n "$DOXYGEN"; then
  6518. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5
  6519. $as_echo "$DOXYGEN" >&6; }
  6520. else
  6521. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6522. $as_echo "no" >&6; }
  6523. fi
  6524. # Extract the first word of "dot", so it can be a program name with args.
  6525. set dummy dot; ac_word=$2
  6526. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6527. $as_echo_n "checking for $ac_word... " >&6; }
  6528. if ${ac_cv_path_DOT+:} false; then :
  6529. $as_echo_n "(cached) " >&6
  6530. else
  6531. case $DOT in
  6532. [\\/]* | ?:[\\/]*)
  6533. ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
  6534. ;;
  6535. *)
  6536. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6537. for as_dir in $PATH
  6538. do
  6539. IFS=$as_save_IFS
  6540. test -z "$as_dir" && as_dir=.
  6541. for ac_exec_ext in '' $ac_executable_extensions; do
  6542. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6543. ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
  6544. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6545. break 2
  6546. fi
  6547. done
  6548. done
  6549. IFS=$as_save_IFS
  6550. test -z "$ac_cv_path_DOT" && ac_cv_path_DOT=":"
  6551. ;;
  6552. esac
  6553. fi
  6554. DOT=$ac_cv_path_DOT
  6555. if test -n "$DOT"; then
  6556. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
  6557. $as_echo "$DOT" >&6; }
  6558. else
  6559. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6560. $as_echo "no" >&6; }
  6561. fi
  6562. # Extract the first word of "wget", so it can be a program name with args.
  6563. set dummy wget; ac_word=$2
  6564. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6565. $as_echo_n "checking for $ac_word... " >&6; }
  6566. if ${ac_cv_path_WGET+:} false; then :
  6567. $as_echo_n "(cached) " >&6
  6568. else
  6569. case $WGET in
  6570. [\\/]* | ?:[\\/]*)
  6571. ac_cv_path_WGET="$WGET" # Let the user override the test with a path.
  6572. ;;
  6573. *)
  6574. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6575. for as_dir in $PATH
  6576. do
  6577. IFS=$as_save_IFS
  6578. test -z "$as_dir" && as_dir=.
  6579. for ac_exec_ext in '' $ac_executable_extensions; do
  6580. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6581. ac_cv_path_WGET="$as_dir/$ac_word$ac_exec_ext"
  6582. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6583. break 2
  6584. fi
  6585. done
  6586. done
  6587. IFS=$as_save_IFS
  6588. test -z "$ac_cv_path_WGET" && ac_cv_path_WGET=":"
  6589. ;;
  6590. esac
  6591. fi
  6592. WGET=$ac_cv_path_WGET
  6593. if test -n "$WGET"; then
  6594. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WGET" >&5
  6595. $as_echo "$WGET" >&6; }
  6596. else
  6597. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6598. $as_echo "no" >&6; }
  6599. fi
  6600. # Extract the first word of "curl", so it can be a program name with args.
  6601. set dummy curl; ac_word=$2
  6602. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6603. $as_echo_n "checking for $ac_word... " >&6; }
  6604. if ${ac_cv_path_CURL+:} false; then :
  6605. $as_echo_n "(cached) " >&6
  6606. else
  6607. case $CURL in
  6608. [\\/]* | ?:[\\/]*)
  6609. ac_cv_path_CURL="$CURL" # Let the user override the test with a path.
  6610. ;;
  6611. *)
  6612. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6613. for as_dir in $PATH
  6614. do
  6615. IFS=$as_save_IFS
  6616. test -z "$as_dir" && as_dir=.
  6617. for ac_exec_ext in '' $ac_executable_extensions; do
  6618. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6619. ac_cv_path_CURL="$as_dir/$ac_word$ac_exec_ext"
  6620. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6621. break 2
  6622. fi
  6623. done
  6624. done
  6625. IFS=$as_save_IFS
  6626. test -z "$ac_cv_path_CURL" && ac_cv_path_CURL=":"
  6627. ;;
  6628. esac
  6629. fi
  6630. CURL=$ac_cv_path_CURL
  6631. if test -n "$CURL"; then
  6632. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL" >&5
  6633. $as_echo "$CURL" >&6; }
  6634. else
  6635. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6636. $as_echo "no" >&6; }
  6637. fi
  6638. # Extract the first word of "rubber", so it can be a program name with args.
  6639. set dummy rubber; ac_word=$2
  6640. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6641. $as_echo_n "checking for $ac_word... " >&6; }
  6642. if ${ac_cv_path_RUBBER+:} false; then :
  6643. $as_echo_n "(cached) " >&6
  6644. else
  6645. case $RUBBER in
  6646. [\\/]* | ?:[\\/]*)
  6647. ac_cv_path_RUBBER="$RUBBER" # Let the user override the test with a path.
  6648. ;;
  6649. *)
  6650. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6651. for as_dir in $PATH
  6652. do
  6653. IFS=$as_save_IFS
  6654. test -z "$as_dir" && as_dir=.
  6655. for ac_exec_ext in '' $ac_executable_extensions; do
  6656. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6657. ac_cv_path_RUBBER="$as_dir/$ac_word$ac_exec_ext"
  6658. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6659. break 2
  6660. fi
  6661. done
  6662. done
  6663. IFS=$as_save_IFS
  6664. test -z "$ac_cv_path_RUBBER" && ac_cv_path_RUBBER=":"
  6665. ;;
  6666. esac
  6667. fi
  6668. RUBBER=$ac_cv_path_RUBBER
  6669. if test -n "$RUBBER"; then
  6670. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBBER" >&5
  6671. $as_echo "$RUBBER" >&6; }
  6672. else
  6673. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6674. $as_echo "no" >&6; }
  6675. fi
  6676. # Extract the first word of "catdvi", so it can be a program name with args.
  6677. set dummy catdvi; ac_word=$2
  6678. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6679. $as_echo_n "checking for $ac_word... " >&6; }
  6680. if ${ac_cv_path_CATDVI+:} false; then :
  6681. $as_echo_n "(cached) " >&6
  6682. else
  6683. case $CATDVI in
  6684. [\\/]* | ?:[\\/]*)
  6685. ac_cv_path_CATDVI="$CATDVI" # Let the user override the test with a path.
  6686. ;;
  6687. *)
  6688. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6689. for as_dir in $PATH
  6690. do
  6691. IFS=$as_save_IFS
  6692. test -z "$as_dir" && as_dir=.
  6693. for ac_exec_ext in '' $ac_executable_extensions; do
  6694. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6695. ac_cv_path_CATDVI="$as_dir/$ac_word$ac_exec_ext"
  6696. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6697. break 2
  6698. fi
  6699. done
  6700. done
  6701. IFS=$as_save_IFS
  6702. test -z "$ac_cv_path_CATDVI" && ac_cv_path_CATDVI=":"
  6703. ;;
  6704. esac
  6705. fi
  6706. CATDVI=$ac_cv_path_CATDVI
  6707. if test -n "$CATDVI"; then
  6708. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CATDVI" >&5
  6709. $as_echo "$CATDVI" >&6; }
  6710. else
  6711. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6712. $as_echo "no" >&6; }
  6713. fi
  6714. # Extract the first word of "kpsewhich", so it can be a program name with args.
  6715. set dummy kpsewhich; ac_word=$2
  6716. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6717. $as_echo_n "checking for $ac_word... " >&6; }
  6718. if ${ac_cv_path_KPATHSEA+:} false; then :
  6719. $as_echo_n "(cached) " >&6
  6720. else
  6721. case $KPATHSEA in
  6722. [\\/]* | ?:[\\/]*)
  6723. ac_cv_path_KPATHSEA="$KPATHSEA" # Let the user override the test with a path.
  6724. ;;
  6725. *)
  6726. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6727. for as_dir in $PATH
  6728. do
  6729. IFS=$as_save_IFS
  6730. test -z "$as_dir" && as_dir=.
  6731. for ac_exec_ext in '' $ac_executable_extensions; do
  6732. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6733. ac_cv_path_KPATHSEA="$as_dir/$ac_word$ac_exec_ext"
  6734. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6735. break 2
  6736. fi
  6737. done
  6738. done
  6739. IFS=$as_save_IFS
  6740. test -z "$ac_cv_path_KPATHSEA" && ac_cv_path_KPATHSEA=":"
  6741. ;;
  6742. esac
  6743. fi
  6744. KPATHSEA=$ac_cv_path_KPATHSEA
  6745. if test -n "$KPATHSEA"; then
  6746. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KPATHSEA" >&5
  6747. $as_echo "$KPATHSEA" >&6; }
  6748. else
  6749. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6750. $as_echo "no" >&6; }
  6751. fi
  6752. # Extract the first word of "xmllint", so it can be a program name with args.
  6753. set dummy xmllint; ac_word=$2
  6754. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6755. $as_echo_n "checking for $ac_word... " >&6; }
  6756. if ${ac_cv_path_XMLLINT+:} false; then :
  6757. $as_echo_n "(cached) " >&6
  6758. else
  6759. case $XMLLINT in
  6760. [\\/]* | ?:[\\/]*)
  6761. ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
  6762. ;;
  6763. *)
  6764. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6765. for as_dir in $PATH
  6766. do
  6767. IFS=$as_save_IFS
  6768. test -z "$as_dir" && as_dir=.
  6769. for ac_exec_ext in '' $ac_executable_extensions; do
  6770. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6771. ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
  6772. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6773. break 2
  6774. fi
  6775. done
  6776. done
  6777. IFS=$as_save_IFS
  6778. test -z "$ac_cv_path_XMLLINT" && ac_cv_path_XMLLINT=":"
  6779. ;;
  6780. esac
  6781. fi
  6782. XMLLINT=$ac_cv_path_XMLLINT
  6783. if test -n "$XMLLINT"; then
  6784. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
  6785. $as_echo "$XMLLINT" >&6; }
  6786. else
  6787. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6788. $as_echo "no" >&6; }
  6789. fi
  6790. # Extract the first word of "xmlstarlet", so it can be a program name with args.
  6791. set dummy xmlstarlet; ac_word=$2
  6792. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6793. $as_echo_n "checking for $ac_word... " >&6; }
  6794. if ${ac_cv_path_XMLSTARLET+:} false; then :
  6795. $as_echo_n "(cached) " >&6
  6796. else
  6797. case $XMLSTARLET in
  6798. [\\/]* | ?:[\\/]*)
  6799. ac_cv_path_XMLSTARLET="$XMLSTARLET" # Let the user override the test with a path.
  6800. ;;
  6801. *)
  6802. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6803. for as_dir in $PATH
  6804. do
  6805. IFS=$as_save_IFS
  6806. test -z "$as_dir" && as_dir=.
  6807. for ac_exec_ext in '' $ac_executable_extensions; do
  6808. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6809. ac_cv_path_XMLSTARLET="$as_dir/$ac_word$ac_exec_ext"
  6810. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6811. break 2
  6812. fi
  6813. done
  6814. done
  6815. IFS=$as_save_IFS
  6816. test -z "$ac_cv_path_XMLSTARLET" && ac_cv_path_XMLSTARLET=":"
  6817. ;;
  6818. esac
  6819. fi
  6820. XMLSTARLET=$ac_cv_path_XMLSTARLET
  6821. if test -n "$XMLSTARLET"; then
  6822. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLSTARLET" >&5
  6823. $as_echo "$XMLSTARLET" >&6; }
  6824. else
  6825. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6826. $as_echo "no" >&6; }
  6827. fi
  6828. # Extract the first word of "git", so it can be a program name with args.
  6829. set dummy git; ac_word=$2
  6830. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6831. $as_echo_n "checking for $ac_word... " >&6; }
  6832. if ${ac_cv_path_GIT+:} false; then :
  6833. $as_echo_n "(cached) " >&6
  6834. else
  6835. case $GIT in
  6836. [\\/]* | ?:[\\/]*)
  6837. ac_cv_path_GIT="$GIT" # Let the user override the test with a path.
  6838. ;;
  6839. *)
  6840. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6841. for as_dir in $PATH
  6842. do
  6843. IFS=$as_save_IFS
  6844. test -z "$as_dir" && as_dir=.
  6845. for ac_exec_ext in '' $ac_executable_extensions; do
  6846. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6847. ac_cv_path_GIT="$as_dir/$ac_word$ac_exec_ext"
  6848. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6849. break 2
  6850. fi
  6851. done
  6852. done
  6853. IFS=$as_save_IFS
  6854. test -z "$ac_cv_path_GIT" && ac_cv_path_GIT=":"
  6855. ;;
  6856. esac
  6857. fi
  6858. GIT=$ac_cv_path_GIT
  6859. if test -n "$GIT"; then
  6860. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5
  6861. $as_echo "$GIT" >&6; }
  6862. else
  6863. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6864. $as_echo "no" >&6; }
  6865. fi
  6866. if test "${WGET}" != ":" ; then
  6867. DOWNLOAD=${WGET}
  6868. else if test "${CURL}" != ":" ; then
  6869. DOWNLOAD="${CURL} -O --progress-bar -w \"%{url_effective}\n\""
  6870. else
  6871. # Extract the first word of "fetch", so it can be a program name with args.
  6872. set dummy fetch; ac_word=$2
  6873. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6874. $as_echo_n "checking for $ac_word... " >&6; }
  6875. if ${ac_cv_path_FETCH+:} false; then :
  6876. $as_echo_n "(cached) " >&6
  6877. else
  6878. case $FETCH in
  6879. [\\/]* | ?:[\\/]*)
  6880. ac_cv_path_FETCH="$FETCH" # Let the user override the test with a path.
  6881. ;;
  6882. *)
  6883. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6884. for as_dir in $PATH
  6885. do
  6886. IFS=$as_save_IFS
  6887. test -z "$as_dir" && as_dir=.
  6888. for ac_exec_ext in '' $ac_executable_extensions; do
  6889. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6890. ac_cv_path_FETCH="$as_dir/$ac_word$ac_exec_ext"
  6891. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6892. break 2
  6893. fi
  6894. done
  6895. done
  6896. IFS=$as_save_IFS
  6897. test -z "$ac_cv_path_FETCH" && ac_cv_path_FETCH=":"
  6898. ;;
  6899. esac
  6900. fi
  6901. FETCH=$ac_cv_path_FETCH
  6902. if test -n "$FETCH"; then
  6903. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FETCH" >&5
  6904. $as_echo "$FETCH" >&6; }
  6905. else
  6906. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6907. $as_echo "no" >&6; }
  6908. fi
  6909. DOWNLOAD=${FETCH}
  6910. fi
  6911. fi
  6912. # Extract the first word of "ldconfig", so it can be a program name with args.
  6913. set dummy ldconfig; ac_word=$2
  6914. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6915. $as_echo_n "checking for $ac_word... " >&6; }
  6916. if ${ac_cv_path_LDCONFIG+:} false; then :
  6917. $as_echo_n "(cached) " >&6
  6918. else
  6919. case $LDCONFIG in
  6920. [\\/]* | ?:[\\/]*)
  6921. ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
  6922. ;;
  6923. *)
  6924. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6925. for as_dir in $PATH
  6926. do
  6927. IFS=$as_save_IFS
  6928. test -z "$as_dir" && as_dir=.
  6929. for ac_exec_ext in '' $ac_executable_extensions; do
  6930. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6931. ac_cv_path_LDCONFIG="$as_dir/$ac_word$ac_exec_ext"
  6932. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6933. break 2
  6934. fi
  6935. done
  6936. done
  6937. IFS=$as_save_IFS
  6938. test -z "$ac_cv_path_LDCONFIG" && ac_cv_path_LDCONFIG=":"
  6939. ;;
  6940. esac
  6941. fi
  6942. LDCONFIG=$ac_cv_path_LDCONFIG
  6943. if test -n "$LDCONFIG"; then
  6944. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDCONFIG" >&5
  6945. $as_echo "$LDCONFIG" >&6; }
  6946. else
  6947. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6948. $as_echo "no" >&6; }
  6949. fi
  6950. # Extract the first word of "sha1sum", so it can be a program name with args.
  6951. set dummy sha1sum; ac_word=$2
  6952. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6953. $as_echo_n "checking for $ac_word... " >&6; }
  6954. if ${ac_cv_path_SHA1SUM+:} false; then :
  6955. $as_echo_n "(cached) " >&6
  6956. else
  6957. case $SHA1SUM in
  6958. [\\/]* | ?:[\\/]*)
  6959. ac_cv_path_SHA1SUM="$SHA1SUM" # Let the user override the test with a path.
  6960. ;;
  6961. *)
  6962. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6963. for as_dir in $PATH
  6964. do
  6965. IFS=$as_save_IFS
  6966. test -z "$as_dir" && as_dir=.
  6967. for ac_exec_ext in '' $ac_executable_extensions; do
  6968. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6969. ac_cv_path_SHA1SUM="$as_dir/$ac_word$ac_exec_ext"
  6970. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6971. break 2
  6972. fi
  6973. done
  6974. done
  6975. IFS=$as_save_IFS
  6976. test -z "$ac_cv_path_SHA1SUM" && ac_cv_path_SHA1SUM="$ac_aux_dir/build_tools/sha1sum-sh"
  6977. ;;
  6978. esac
  6979. fi
  6980. SHA1SUM=$ac_cv_path_SHA1SUM
  6981. if test -n "$SHA1SUM"; then
  6982. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHA1SUM" >&5
  6983. $as_echo "$SHA1SUM" >&6; }
  6984. else
  6985. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6986. $as_echo "no" >&6; }
  6987. fi
  6988. # Extract the first word of "openssl", so it can be a program name with args.
  6989. set dummy openssl; ac_word=$2
  6990. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6991. $as_echo_n "checking for $ac_word... " >&6; }
  6992. if ${ac_cv_path_OPENSSL+:} false; then :
  6993. $as_echo_n "(cached) " >&6
  6994. else
  6995. case $OPENSSL in
  6996. [\\/]* | ?:[\\/]*)
  6997. ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path.
  6998. ;;
  6999. *)
  7000. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7001. for as_dir in $PATH
  7002. do
  7003. IFS=$as_save_IFS
  7004. test -z "$as_dir" && as_dir=.
  7005. for ac_exec_ext in '' $ac_executable_extensions; do
  7006. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  7007. ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext"
  7008. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  7009. break 2
  7010. fi
  7011. done
  7012. done
  7013. IFS=$as_save_IFS
  7014. test -z "$ac_cv_path_OPENSSL" && ac_cv_path_OPENSSL=":"
  7015. ;;
  7016. esac
  7017. fi
  7018. OPENSSL=$ac_cv_path_OPENSSL
  7019. if test -n "$OPENSSL"; then
  7020. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
  7021. $as_echo "$OPENSSL" >&6; }
  7022. else
  7023. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  7024. $as_echo "no" >&6; }
  7025. fi
  7026. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bison that supports parse-param" >&5
  7027. $as_echo_n "checking for bison that supports parse-param... " >&6; }
  7028. if ${ac_cv_path_BISON2+:} false; then :
  7029. $as_echo_n "(cached) " >&6
  7030. else
  7031. if test "x$BISON" != "x:" ; then
  7032. # Create a temporary directory $tmp in $TMPDIR (default /tmp).
  7033. # Use mktemp if possible; otherwise fall back on mkdir,
  7034. # with $RANDOM to make collisions less likely.
  7035. : ${TMPDIR=/tmp}
  7036. {
  7037. tmp=`
  7038. (umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null
  7039. ` &&
  7040. test -n "$tmp" && test -d "$tmp"
  7041. } || {
  7042. tmp=$TMPDIR/foo$$-$RANDOM
  7043. (umask 077 && mkdir "$tmp")
  7044. } || exit $?
  7045. cat >$tmp/test.y <<__EOL__
  7046. %parse-param {struct parse_io *parseio}
  7047. %%
  7048. file : { \$\$ = parseio->pval = 1; }
  7049. ;
  7050. %%
  7051. __EOL__
  7052. ${BISON} -o ${tmp}/test.tab.c ${tmp}/test.y >/dev/null 2>&1
  7053. if test -e "${tmp}/test.tab.c"; then
  7054. ac_cv_path_BISON2=${BISON}
  7055. fi
  7056. rm -rf ${tmp}
  7057. fi
  7058. fi
  7059. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_BISON2" >&5
  7060. $as_echo "$ac_cv_path_BISON2" >&6; }
  7061. if test "x${ac_cv_path_BISON2}" = "x" ; then
  7062. BISON=:
  7063. PBX_BISON=0
  7064. else
  7065. PBX_BISON=1
  7066. fi
  7067. if test "x${FLEX}" = "x:" ; then
  7068. PBX_FLEX=0
  7069. else
  7070. PBX_FLEX=1
  7071. fi
  7072. if test -n "$ac_tool_prefix"; then
  7073. # Extract the first word of "${ac_tool_prefix}soxmix", so it can be a program name with args.
  7074. set dummy ${ac_tool_prefix}soxmix; ac_word=$2
  7075. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  7076. $as_echo_n "checking for $ac_word... " >&6; }
  7077. if ${ac_cv_prog_SOXMIX+:} false; then :
  7078. $as_echo_n "(cached) " >&6
  7079. else
  7080. if test -n "$SOXMIX"; then
  7081. ac_cv_prog_SOXMIX="$SOXMIX" # Let the user override the test.
  7082. else
  7083. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7084. for as_dir in $PATH
  7085. do
  7086. IFS=$as_save_IFS
  7087. test -z "$as_dir" && as_dir=.
  7088. for ac_exec_ext in '' $ac_executable_extensions; do
  7089. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  7090. ac_cv_prog_SOXMIX="${ac_tool_prefix}soxmix"
  7091. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  7092. break 2
  7093. fi
  7094. done
  7095. done
  7096. IFS=$as_save_IFS
  7097. fi
  7098. fi
  7099. SOXMIX=$ac_cv_prog_SOXMIX
  7100. if test -n "$SOXMIX"; then
  7101. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOXMIX" >&5
  7102. $as_echo "$SOXMIX" >&6; }
  7103. else
  7104. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  7105. $as_echo "no" >&6; }
  7106. fi
  7107. fi
  7108. if test -z "$ac_cv_prog_SOXMIX"; then
  7109. ac_ct_SOXMIX=$SOXMIX
  7110. # Extract the first word of "soxmix", so it can be a program name with args.
  7111. set dummy soxmix; ac_word=$2
  7112. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  7113. $as_echo_n "checking for $ac_word... " >&6; }
  7114. if ${ac_cv_prog_ac_ct_SOXMIX+:} false; then :
  7115. $as_echo_n "(cached) " >&6
  7116. else
  7117. if test -n "$ac_ct_SOXMIX"; then
  7118. ac_cv_prog_ac_ct_SOXMIX="$ac_ct_SOXMIX" # Let the user override the test.
  7119. else
  7120. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7121. for as_dir in $PATH
  7122. do
  7123. IFS=$as_save_IFS
  7124. test -z "$as_dir" && as_dir=.
  7125. for ac_exec_ext in '' $ac_executable_extensions; do
  7126. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  7127. ac_cv_prog_ac_ct_SOXMIX="soxmix"
  7128. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  7129. break 2
  7130. fi
  7131. done
  7132. done
  7133. IFS=$as_save_IFS
  7134. fi
  7135. fi
  7136. ac_ct_SOXMIX=$ac_cv_prog_ac_ct_SOXMIX
  7137. if test -n "$ac_ct_SOXMIX"; then
  7138. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_SOXMIX" >&5
  7139. $as_echo "$ac_ct_SOXMIX" >&6; }
  7140. else
  7141. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  7142. $as_echo "no" >&6; }
  7143. fi
  7144. if test "x$ac_ct_SOXMIX" = x; then
  7145. SOXMIX=":"
  7146. else
  7147. case $cross_compiling:$ac_tool_warned in
  7148. yes:)
  7149. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  7150. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  7151. ac_tool_warned=yes ;;
  7152. esac
  7153. SOXMIX=$ac_ct_SOXMIX
  7154. fi
  7155. else
  7156. SOXMIX="$ac_cv_prog_SOXMIX"
  7157. fi
  7158. if test "${SOXMIX}" != ":" ; then
  7159. $as_echo "#define HAVE_SOXMIX 1" >>confdefs.h
  7160. fi
  7161. for ac_prog in md5 md5sum gmd5sum digest
  7162. do
  7163. # Extract the first word of "$ac_prog", so it can be a program name with args.
  7164. set dummy $ac_prog; ac_word=$2
  7165. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  7166. $as_echo_n "checking for $ac_word... " >&6; }
  7167. if ${ac_cv_prog_MD5+:} false; then :
  7168. $as_echo_n "(cached) " >&6
  7169. else
  7170. if test -n "$MD5"; then
  7171. ac_cv_prog_MD5="$MD5" # Let the user override the test.
  7172. else
  7173. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7174. for as_dir in $PATH
  7175. do
  7176. IFS=$as_save_IFS
  7177. test -z "$as_dir" && as_dir=.
  7178. for ac_exec_ext in '' $ac_executable_extensions; do
  7179. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  7180. ac_cv_prog_MD5="$ac_prog"
  7181. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  7182. break 2
  7183. fi
  7184. done
  7185. done
  7186. IFS=$as_save_IFS
  7187. fi
  7188. fi
  7189. MD5=$ac_cv_prog_MD5
  7190. if test -n "$MD5"; then
  7191. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MD5" >&5
  7192. $as_echo "$MD5" >&6; }
  7193. else
  7194. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  7195. $as_echo "no" >&6; }
  7196. fi
  7197. test -n "$MD5" && break
  7198. done
  7199. if test "${MD5}" = "digest" ; then
  7200. MD5="${MD5} -a md5"
  7201. fi
  7202. ac_ext=c
  7203. ac_cpp='$CPP $CPPFLAGS'
  7204. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  7205. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  7206. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  7207. acx_pthread_ok=no
  7208. # We used to check for pthread.h first, but this fails if pthread.h
  7209. # requires special compiler flags (e.g. on True64 or Sequent).
  7210. # It gets checked for in the link test anyway.
  7211. # First of all, check if the user has set any of the PTHREAD_LIBS,
  7212. # etcetera environment variables, and if threads linking works using
  7213. # them:
  7214. if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
  7215. save_CFLAGS="$CFLAGS"
  7216. CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
  7217. save_LIBS="$LIBS"
  7218. LIBS="$PTHREAD_LIBS $LIBS"
  7219. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
  7220. $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
  7221. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  7222. /* end confdefs.h. */
  7223. /* Override any GCC internal prototype to avoid an error.
  7224. Use char because int might match the return type of a GCC
  7225. builtin and then its argument prototype would still apply. */
  7226. #ifdef __cplusplus
  7227. extern "C"
  7228. #endif
  7229. char pthread_join ();
  7230. int
  7231. main ()
  7232. {
  7233. return pthread_join ();
  7234. ;
  7235. return 0;
  7236. }
  7237. _ACEOF
  7238. if ac_fn_c_try_link "$LINENO"; then :
  7239. acx_pthread_ok=yes
  7240. fi
  7241. rm -f core conftest.err conftest.$ac_objext \
  7242. conftest$ac_exeext conftest.$ac_ext
  7243. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
  7244. $as_echo "$acx_pthread_ok" >&6; }
  7245. if test x"$acx_pthread_ok" = xno; then
  7246. PTHREAD_LIBS=""
  7247. PTHREAD_CFLAGS=""
  7248. fi
  7249. LIBS="$save_LIBS"
  7250. CFLAGS="$save_CFLAGS"
  7251. fi
  7252. # We must check for the threads library under a number of different
  7253. # names; the ordering is very important because some systems
  7254. # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
  7255. # libraries is broken (non-POSIX).
  7256. # Create a list of thread flags to try. Items starting with a "-" are
  7257. # C compiler flags, and other items are library names, except for "none"
  7258. # which indicates that we try without any flags at all, and "pthread-config"
  7259. # which is a program returning the flags for the Pth emulation library.
  7260. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
  7261. # The ordering *is* (sometimes) important. Some notes on the
  7262. # individual items follow:
  7263. # pthreads: AIX (must check this before -lpthread)
  7264. # none: in case threads are in libc; should be tried before -Kthread and
  7265. # other compiler flags to prevent continual compiler warnings
  7266. # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
  7267. # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
  7268. # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
  7269. # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
  7270. # -pthreads: Solaris/gcc
  7271. # -mthreads: Mingw32/gcc, Lynx/gcc
  7272. # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
  7273. # doesn't hurt to check since this sometimes defines pthreads too;
  7274. # also defines -D_REENTRANT)
  7275. # ... -mt is also the pthreads flag for HP/aCC
  7276. # pthread: Linux, etcetera
  7277. # --thread-safe: KAI C++
  7278. # pthread-config: use pthread-config program (for GNU Pth library)
  7279. case "${host_cpu}-${host_os}" in
  7280. *solaris*)
  7281. # On Solaris (at least, for some versions), libc contains stubbed
  7282. # (non-functional) versions of the pthreads routines, so link-based
  7283. # tests will erroneously succeed. (We need to link with -pthreads/-mt/
  7284. # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
  7285. # a function called by this macro, so we could check for that, but
  7286. # who knows whether they'll stub that too in a future libc.) So,
  7287. # we'll just look for -pthreads and -lpthread first:
  7288. acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
  7289. ;;
  7290. esac
  7291. if test x"$acx_pthread_ok" = xno; then
  7292. for flag in $acx_pthread_flags; do
  7293. case $flag in
  7294. none)
  7295. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
  7296. $as_echo_n "checking whether pthreads work without any flags... " >&6; }
  7297. ;;
  7298. -*)
  7299. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
  7300. $as_echo_n "checking whether pthreads work with $flag... " >&6; }
  7301. PTHREAD_CFLAGS="$flag"
  7302. ;;
  7303. pthread-config)
  7304. # Extract the first word of "pthread-config", so it can be a program name with args.
  7305. set dummy pthread-config; ac_word=$2
  7306. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  7307. $as_echo_n "checking for $ac_word... " >&6; }
  7308. if ${ac_cv_prog_acx_pthread_config+:} false; then :
  7309. $as_echo_n "(cached) " >&6
  7310. else
  7311. if test -n "$acx_pthread_config"; then
  7312. ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
  7313. else
  7314. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7315. for as_dir in $PATH
  7316. do
  7317. IFS=$as_save_IFS
  7318. test -z "$as_dir" && as_dir=.
  7319. for ac_exec_ext in '' $ac_executable_extensions; do
  7320. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  7321. ac_cv_prog_acx_pthread_config="yes"
  7322. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  7323. break 2
  7324. fi
  7325. done
  7326. done
  7327. IFS=$as_save_IFS
  7328. test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
  7329. fi
  7330. fi
  7331. acx_pthread_config=$ac_cv_prog_acx_pthread_config
  7332. if test -n "$acx_pthread_config"; then
  7333. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
  7334. $as_echo "$acx_pthread_config" >&6; }
  7335. else
  7336. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  7337. $as_echo "no" >&6; }
  7338. fi
  7339. if test x"$acx_pthread_config" = xno; then continue; fi
  7340. PTHREAD_CFLAGS="`pthread-config --cflags`"
  7341. PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
  7342. ;;
  7343. *)
  7344. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
  7345. $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
  7346. PTHREAD_LIBS="-l$flag"
  7347. ;;
  7348. esac
  7349. save_LIBS="$LIBS"
  7350. save_CFLAGS="$CFLAGS"
  7351. LIBS="$PTHREAD_LIBS $LIBS"
  7352. CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
  7353. # Check for various functions. We must include pthread.h,
  7354. # since some functions may be macros. (On the Sequent, we
  7355. # need a special flag -Kthread to make this header compile.)
  7356. # We check for pthread_join because it is in -lpthread on IRIX
  7357. # while pthread_create is in libc. We check for pthread_attr_init
  7358. # due to DEC craziness with -lpthreads. We check for
  7359. # pthread_cleanup_push because it is one of the few pthread
  7360. # functions on Solaris that doesn't have a non-functional libc stub.
  7361. # We try pthread_create on general principles.
  7362. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  7363. /* end confdefs.h. */
  7364. #include <pthread.h>
  7365. int
  7366. main ()
  7367. {
  7368. pthread_t th; pthread_join(th, 0);
  7369. pthread_attr_init(0); pthread_cleanup_push(0, 0);
  7370. pthread_create(0,0,0,0); pthread_cleanup_pop(0);
  7371. ;
  7372. return 0;
  7373. }
  7374. _ACEOF
  7375. if ac_fn_c_try_link "$LINENO"; then :
  7376. acx_pthread_ok=yes
  7377. fi
  7378. rm -f core conftest.err conftest.$ac_objext \
  7379. conftest$ac_exeext conftest.$ac_ext
  7380. LIBS="$save_LIBS"
  7381. CFLAGS="$save_CFLAGS"
  7382. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
  7383. $as_echo "$acx_pthread_ok" >&6; }
  7384. if test "x$acx_pthread_ok" = xyes; then
  7385. break;
  7386. fi
  7387. PTHREAD_LIBS=""
  7388. PTHREAD_CFLAGS=""
  7389. done
  7390. fi
  7391. # Various other checks:
  7392. if test "x$acx_pthread_ok" = xyes; then
  7393. save_LIBS="$LIBS"
  7394. LIBS="$PTHREAD_LIBS $LIBS"
  7395. save_CFLAGS="$CFLAGS"
  7396. CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
  7397. # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
  7398. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
  7399. $as_echo_n "checking for joinable pthread attribute... " >&6; }
  7400. attr_name=unknown
  7401. for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
  7402. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  7403. /* end confdefs.h. */
  7404. #include <pthread.h>
  7405. int
  7406. main ()
  7407. {
  7408. int attr=$attr; return attr;
  7409. ;
  7410. return 0;
  7411. }
  7412. _ACEOF
  7413. if ac_fn_c_try_link "$LINENO"; then :
  7414. attr_name=$attr; break
  7415. fi
  7416. rm -f core conftest.err conftest.$ac_objext \
  7417. conftest$ac_exeext conftest.$ac_ext
  7418. done
  7419. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
  7420. $as_echo "$attr_name" >&6; }
  7421. if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
  7422. cat >>confdefs.h <<_ACEOF
  7423. #define PTHREAD_CREATE_JOINABLE $attr_name
  7424. _ACEOF
  7425. fi
  7426. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
  7427. $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
  7428. flag=no
  7429. case "${host_cpu}-${host_os}" in
  7430. *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
  7431. *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
  7432. esac
  7433. { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
  7434. $as_echo "${flag}" >&6; }
  7435. if test "x$flag" != xno; then
  7436. PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
  7437. fi
  7438. LIBS="$save_LIBS"
  7439. CFLAGS="$save_CFLAGS"
  7440. # More AIX lossage: must compile with xlc_r or cc_r
  7441. if test x"$GCC" != xyes; then
  7442. for ac_prog in xlc_r cc_r
  7443. do
  7444. # Extract the first word of "$ac_prog", so it can be a program name with args.
  7445. set dummy $ac_prog; ac_word=$2
  7446. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  7447. $as_echo_n "checking for $ac_word... " >&6; }
  7448. if ${ac_cv_prog_PTHREAD_CC+:} false; then :
  7449. $as_echo_n "(cached) " >&6
  7450. else
  7451. if test -n "$PTHREAD_CC"; then
  7452. ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
  7453. else
  7454. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7455. for as_dir in $PATH
  7456. do
  7457. IFS=$as_save_IFS
  7458. test -z "$as_dir" && as_dir=.
  7459. for ac_exec_ext in '' $ac_executable_extensions; do
  7460. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  7461. ac_cv_prog_PTHREAD_CC="$ac_prog"
  7462. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  7463. break 2
  7464. fi
  7465. done
  7466. done
  7467. IFS=$as_save_IFS
  7468. fi
  7469. fi
  7470. PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
  7471. if test -n "$PTHREAD_CC"; then
  7472. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
  7473. $as_echo "$PTHREAD_CC" >&6; }
  7474. else
  7475. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  7476. $as_echo "no" >&6; }
  7477. fi
  7478. test -n "$PTHREAD_CC" && break
  7479. done
  7480. test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}"
  7481. else
  7482. PTHREAD_CC=$CC
  7483. fi
  7484. else
  7485. PTHREAD_CC="$CC"
  7486. fi
  7487. # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
  7488. if test x"$acx_pthread_ok" = xyes; then
  7489. $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
  7490. :
  7491. else
  7492. acx_pthread_ok=no
  7493. fi
  7494. ac_ext=c
  7495. ac_cpp='$CPP $CPPFLAGS'
  7496. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  7497. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  7498. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  7499. ac_ext=c
  7500. ac_cpp='$CPP $CPPFLAGS'
  7501. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  7502. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  7503. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  7504. # Check whether --enable-dev-mode was given.
  7505. if test "${enable_dev_mode+set}" = set; then :
  7506. enableval=$enable_dev_mode; case "${enableval}" in
  7507. y|ye|yes) AST_DEVMODE=yes ;;
  7508. n|no) AST_DEVMODE=no ;;
  7509. noisy)
  7510. AST_DEVMODE=yes
  7511. NOISY_BUILD=yes
  7512. ;;
  7513. strict)
  7514. AST_DEVMODE=yes
  7515. AST_DEVMODE_STRICT=yes
  7516. ;;
  7517. *) as_fn_error $? "bad value ${enableval} for --enable-dev-mode" "$LINENO" 5 ;;
  7518. esac
  7519. fi
  7520. AST_CODE_COVERAGE=no
  7521. # Check whether --enable-coverage was given.
  7522. if test "${enable_coverage+set}" = set; then :
  7523. enableval=$enable_coverage; case "${enableval}" in
  7524. y|ye|yes) AST_CODE_COVERAGE=yes ;;
  7525. n|no) AST_CODE_COVERAGE=no ;;
  7526. *) as_fn_error $? "bad value ${enableval} for --enable-coverage" "$LINENO" 5 ;;
  7527. esac
  7528. fi
  7529. # AST_EXT_LIB_SETUP is used to tell configure to handle variables for
  7530. # various packages.
  7531. # $1 is the prefix for the variables in makeopts and autoconfig.h
  7532. # $2 is the short comment, $4 is the long comment
  7533. # $3 is the name used in --with- or --without- flags for configure.
  7534. #
  7535. # Package option names should be in alphabetical order
  7536. # by the --with option name (the third field),
  7537. # to make things easier for the users.
  7538. ALSA_DESCRIP="Advanced Linux Sound Architecture"
  7539. ALSA_OPTION="asound"
  7540. PBX_ALSA=0
  7541. # Check whether --with-asound was given.
  7542. if test "${with_asound+set}" = set; then :
  7543. withval=$with_asound;
  7544. case ${withval} in
  7545. n|no)
  7546. USE_ALSA=no
  7547. # -1 is a magic value used by menuselect to know that the package
  7548. # was disabled, other than 'not found'
  7549. PBX_ALSA=-1
  7550. ;;
  7551. y|ye|yes)
  7552. ac_mandatory_list="${ac_mandatory_list} ALSA"
  7553. ;;
  7554. *)
  7555. ALSA_DIR="${withval}"
  7556. ac_mandatory_list="${ac_mandatory_list} ALSA"
  7557. ;;
  7558. esac
  7559. fi
  7560. BFD_DESCRIP="Debug symbol decoding"
  7561. BFD_OPTION="bfd"
  7562. PBX_BFD=0
  7563. # Check whether --with-bfd was given.
  7564. if test "${with_bfd+set}" = set; then :
  7565. withval=$with_bfd;
  7566. case ${withval} in
  7567. n|no)
  7568. USE_BFD=no
  7569. # -1 is a magic value used by menuselect to know that the package
  7570. # was disabled, other than 'not found'
  7571. PBX_BFD=-1
  7572. ;;
  7573. y|ye|yes)
  7574. ac_mandatory_list="${ac_mandatory_list} BFD"
  7575. ;;
  7576. *)
  7577. BFD_DIR="${withval}"
  7578. ac_mandatory_list="${ac_mandatory_list} BFD"
  7579. ;;
  7580. esac
  7581. fi
  7582. # BKTR is used for backtrace support on platforms that do not
  7583. # have it natively.
  7584. BKTR_DESCRIP="Stack Backtrace"
  7585. BKTR_OPTION="execinfo"
  7586. PBX_BKTR=0
  7587. # Check whether --with-execinfo was given.
  7588. if test "${with_execinfo+set}" = set; then :
  7589. withval=$with_execinfo;
  7590. case ${withval} in
  7591. n|no)
  7592. USE_BKTR=no
  7593. # -1 is a magic value used by menuselect to know that the package
  7594. # was disabled, other than 'not found'
  7595. PBX_BKTR=-1
  7596. ;;
  7597. y|ye|yes)
  7598. ac_mandatory_list="${ac_mandatory_list} BKTR"
  7599. ;;
  7600. *)
  7601. BKTR_DIR="${withval}"
  7602. ac_mandatory_list="${ac_mandatory_list} BKTR"
  7603. ;;
  7604. esac
  7605. fi
  7606. BLUETOOTH_DESCRIP="Bluetooth"
  7607. BLUETOOTH_OPTION="bluetooth"
  7608. PBX_BLUETOOTH=0
  7609. # Check whether --with-bluetooth was given.
  7610. if test "${with_bluetooth+set}" = set; then :
  7611. withval=$with_bluetooth;
  7612. case ${withval} in
  7613. n|no)
  7614. USE_BLUETOOTH=no
  7615. # -1 is a magic value used by menuselect to know that the package
  7616. # was disabled, other than 'not found'
  7617. PBX_BLUETOOTH=-1
  7618. ;;
  7619. y|ye|yes)
  7620. ac_mandatory_list="${ac_mandatory_list} BLUETOOTH"
  7621. ;;
  7622. *)
  7623. BLUETOOTH_DIR="${withval}"
  7624. ac_mandatory_list="${ac_mandatory_list} BLUETOOTH"
  7625. ;;
  7626. esac
  7627. fi
  7628. CAP_DESCRIP="POSIX 1.e capabilities"
  7629. CAP_OPTION="cap"
  7630. PBX_CAP=0
  7631. # Check whether --with-cap was given.
  7632. if test "${with_cap+set}" = set; then :
  7633. withval=$with_cap;
  7634. case ${withval} in
  7635. n|no)
  7636. USE_CAP=no
  7637. # -1 is a magic value used by menuselect to know that the package
  7638. # was disabled, other than 'not found'
  7639. PBX_CAP=-1
  7640. ;;
  7641. y|ye|yes)
  7642. ac_mandatory_list="${ac_mandatory_list} CAP"
  7643. ;;
  7644. *)
  7645. CAP_DIR="${withval}"
  7646. ac_mandatory_list="${ac_mandatory_list} CAP"
  7647. ;;
  7648. esac
  7649. fi
  7650. COROSYNC_DESCRIP="Corosync"
  7651. COROSYNC_OPTION="cpg"
  7652. PBX_COROSYNC=0
  7653. # Check whether --with-cpg was given.
  7654. if test "${with_cpg+set}" = set; then :
  7655. withval=$with_cpg;
  7656. case ${withval} in
  7657. n|no)
  7658. USE_COROSYNC=no
  7659. # -1 is a magic value used by menuselect to know that the package
  7660. # was disabled, other than 'not found'
  7661. PBX_COROSYNC=-1
  7662. ;;
  7663. y|ye|yes)
  7664. ac_mandatory_list="${ac_mandatory_list} COROSYNC"
  7665. ;;
  7666. *)
  7667. COROSYNC_DIR="${withval}"
  7668. ac_mandatory_list="${ac_mandatory_list} COROSYNC"
  7669. ;;
  7670. esac
  7671. fi
  7672. COROSYNC_CFG_STATE_TRACK_DESCRIP="A callback only in corosync 1.x"
  7673. COROSYNC_CFG_STATE_TRACK_OPTION=cfg
  7674. COROSYNC_CFG_STATE_TRACK_DIR=${COROSYNC_DIR}
  7675. PBX_COROSYNC_CFG_STATE_TRACK=0
  7676. CURSES_DESCRIP="curses"
  7677. CURSES_OPTION="curses"
  7678. PBX_CURSES=0
  7679. # Check whether --with-curses was given.
  7680. if test "${with_curses+set}" = set; then :
  7681. withval=$with_curses;
  7682. case ${withval} in
  7683. n|no)
  7684. USE_CURSES=no
  7685. # -1 is a magic value used by menuselect to know that the package
  7686. # was disabled, other than 'not found'
  7687. PBX_CURSES=-1
  7688. ;;
  7689. y|ye|yes)
  7690. ac_mandatory_list="${ac_mandatory_list} CURSES"
  7691. ;;
  7692. *)
  7693. CURSES_DIR="${withval}"
  7694. ac_mandatory_list="${ac_mandatory_list} CURSES"
  7695. ;;
  7696. esac
  7697. fi
  7698. CRYPT_DESCRIP="password and data encryption"
  7699. CRYPT_OPTION="crypt"
  7700. PBX_CRYPT=0
  7701. # Check whether --with-crypt was given.
  7702. if test "${with_crypt+set}" = set; then :
  7703. withval=$with_crypt;
  7704. case ${withval} in
  7705. n|no)
  7706. USE_CRYPT=no
  7707. # -1 is a magic value used by menuselect to know that the package
  7708. # was disabled, other than 'not found'
  7709. PBX_CRYPT=-1
  7710. ;;
  7711. y|ye|yes)
  7712. ac_mandatory_list="${ac_mandatory_list} CRYPT"
  7713. ;;
  7714. *)
  7715. CRYPT_DIR="${withval}"
  7716. ac_mandatory_list="${ac_mandatory_list} CRYPT"
  7717. ;;
  7718. esac
  7719. fi
  7720. CRYPTO_DESCRIP="OpenSSL Cryptography"
  7721. CRYPTO_OPTION="crypto"
  7722. PBX_CRYPTO=0
  7723. # Check whether --with-crypto was given.
  7724. if test "${with_crypto+set}" = set; then :
  7725. withval=$with_crypto;
  7726. case ${withval} in
  7727. n|no)
  7728. USE_CRYPTO=no
  7729. # -1 is a magic value used by menuselect to know that the package
  7730. # was disabled, other than 'not found'
  7731. PBX_CRYPTO=-1
  7732. ;;
  7733. y|ye|yes)
  7734. ac_mandatory_list="${ac_mandatory_list} CRYPTO"
  7735. ;;
  7736. *)
  7737. CRYPTO_DIR="${withval}"
  7738. ac_mandatory_list="${ac_mandatory_list} CRYPTO"
  7739. ;;
  7740. esac
  7741. fi
  7742. OPENSSL_SRTP_DESCRIP="OpenSSL SRTP Extension Support"
  7743. OPENSSL_SRTP_OPTION=crypto
  7744. OPENSSL_SRTP_DIR=${CRYPTO_DIR}
  7745. PBX_OPENSSL_SRTP=0
  7746. OPENSSL_EC_DESCRIP="OpenSSL Elliptic Curve Support"
  7747. OPENSSL_EC_OPTION=crypto
  7748. OPENSSL_EC_DIR=${CRYPTO_DIR}
  7749. PBX_OPENSSL_EC=0
  7750. DAHDI_DESCRIP="DAHDI"
  7751. DAHDI_OPTION="dahdi"
  7752. PBX_DAHDI=0
  7753. # Check whether --with-dahdi was given.
  7754. if test "${with_dahdi+set}" = set; then :
  7755. withval=$with_dahdi;
  7756. case ${withval} in
  7757. n|no)
  7758. USE_DAHDI=no
  7759. # -1 is a magic value used by menuselect to know that the package
  7760. # was disabled, other than 'not found'
  7761. PBX_DAHDI=-1
  7762. ;;
  7763. y|ye|yes)
  7764. ac_mandatory_list="${ac_mandatory_list} DAHDI"
  7765. ;;
  7766. *)
  7767. DAHDI_DIR="${withval}"
  7768. ac_mandatory_list="${ac_mandatory_list} DAHDI"
  7769. ;;
  7770. esac
  7771. fi
  7772. FFMPEG_DESCRIP="Ffmpeg and avcodec"
  7773. FFMPEG_OPTION="avcodec"
  7774. PBX_FFMPEG=0
  7775. # Check whether --with-avcodec was given.
  7776. if test "${with_avcodec+set}" = set; then :
  7777. withval=$with_avcodec;
  7778. case ${withval} in
  7779. n|no)
  7780. USE_FFMPEG=no
  7781. # -1 is a magic value used by menuselect to know that the package
  7782. # was disabled, other than 'not found'
  7783. PBX_FFMPEG=-1
  7784. ;;
  7785. y|ye|yes)
  7786. ac_mandatory_list="${ac_mandatory_list} FFMPEG"
  7787. ;;
  7788. *)
  7789. FFMPEG_DIR="${withval}"
  7790. ac_mandatory_list="${ac_mandatory_list} FFMPEG"
  7791. ;;
  7792. esac
  7793. fi
  7794. GSM_DESCRIP="External GSM"
  7795. GSM_OPTION="gsm"
  7796. PBX_GSM=0
  7797. # Check whether --with-gsm was given.
  7798. if test "${with_gsm+set}" = set; then :
  7799. withval=$with_gsm;
  7800. case ${withval} in
  7801. n|no)
  7802. USE_GSM=no
  7803. # -1 is a magic value used by menuselect to know that the package
  7804. # was disabled, other than 'not found'
  7805. PBX_GSM=-1
  7806. ;;
  7807. y|ye|yes)
  7808. ac_mandatory_list="${ac_mandatory_list} GSM"
  7809. ;;
  7810. *)
  7811. GSM_DIR="${withval}"
  7812. ac_mandatory_list="${ac_mandatory_list} GSM"
  7813. ;;
  7814. esac
  7815. fi
  7816. ILBC_DESCRIP="System iLBC"
  7817. ILBC_OPTION="ilbc"
  7818. PBX_ILBC=0
  7819. # Check whether --with-ilbc was given.
  7820. if test "${with_ilbc+set}" = set; then :
  7821. withval=$with_ilbc;
  7822. case ${withval} in
  7823. n|no)
  7824. USE_ILBC=no
  7825. # -1 is a magic value used by menuselect to know that the package
  7826. # was disabled, other than 'not found'
  7827. PBX_ILBC=-1
  7828. ;;
  7829. y|ye|yes)
  7830. ac_mandatory_list="${ac_mandatory_list} ILBC"
  7831. ;;
  7832. *)
  7833. ILBC_DIR="${withval}"
  7834. ac_mandatory_list="${ac_mandatory_list} ILBC"
  7835. ;;
  7836. esac
  7837. fi
  7838. GTK2_DESCRIP="gtk2"
  7839. GTK2_OPTION="gtk2"
  7840. PBX_GTK2=0
  7841. # Check whether --with-gtk2 was given.
  7842. if test "${with_gtk2+set}" = set; then :
  7843. withval=$with_gtk2;
  7844. case ${withval} in
  7845. n|no)
  7846. USE_GTK2=no
  7847. # -1 is a magic value used by menuselect to know that the package
  7848. # was disabled, other than 'not found'
  7849. PBX_GTK2=-1
  7850. ;;
  7851. y|ye|yes)
  7852. ac_mandatory_list="${ac_mandatory_list} GTK2"
  7853. ;;
  7854. *)
  7855. GTK2_DIR="${withval}"
  7856. ac_mandatory_list="${ac_mandatory_list} GTK2"
  7857. ;;
  7858. esac
  7859. fi
  7860. GMIME_DESCRIP="GMime"
  7861. GMIME_OPTION="gmime"
  7862. PBX_GMIME=0
  7863. # Check whether --with-gmime was given.
  7864. if test "${with_gmime+set}" = set; then :
  7865. withval=$with_gmime;
  7866. case ${withval} in
  7867. n|no)
  7868. USE_GMIME=no
  7869. # -1 is a magic value used by menuselect to know that the package
  7870. # was disabled, other than 'not found'
  7871. PBX_GMIME=-1
  7872. ;;
  7873. y|ye|yes)
  7874. ac_mandatory_list="${ac_mandatory_list} GMIME"
  7875. ;;
  7876. *)
  7877. GMIME_DIR="${withval}"
  7878. ac_mandatory_list="${ac_mandatory_list} GMIME"
  7879. ;;
  7880. esac
  7881. fi
  7882. OPENH323_DESCRIP="OpenH323"
  7883. OPENH323_OPTION="h323"
  7884. PBX_OPENH323=0
  7885. # Check whether --with-h323 was given.
  7886. if test "${with_h323+set}" = set; then :
  7887. withval=$with_h323;
  7888. case ${withval} in
  7889. n|no)
  7890. USE_OPENH323=no
  7891. # -1 is a magic value used by menuselect to know that the package
  7892. # was disabled, other than 'not found'
  7893. PBX_OPENH323=-1
  7894. ;;
  7895. y|ye|yes)
  7896. ac_mandatory_list="${ac_mandatory_list} OPENH323"
  7897. ;;
  7898. *)
  7899. OPENH323_DIR="${withval}"
  7900. ac_mandatory_list="${ac_mandatory_list} OPENH323"
  7901. ;;
  7902. esac
  7903. fi
  7904. HOARD_DESCRIP="Hoard Memory Allocator"
  7905. HOARD_OPTION="hoard"
  7906. PBX_HOARD=0
  7907. # Check whether --with-hoard was given.
  7908. if test "${with_hoard+set}" = set; then :
  7909. withval=$with_hoard;
  7910. case ${withval} in
  7911. n|no)
  7912. USE_HOARD=no
  7913. # -1 is a magic value used by menuselect to know that the package
  7914. # was disabled, other than 'not found'
  7915. PBX_HOARD=-1
  7916. ;;
  7917. y|ye|yes)
  7918. ac_mandatory_list="${ac_mandatory_list} HOARD"
  7919. ;;
  7920. *)
  7921. HOARD_DIR="${withval}"
  7922. ac_mandatory_list="${ac_mandatory_list} HOARD"
  7923. ;;
  7924. esac
  7925. fi
  7926. ICAL_DESCRIP="iCal"
  7927. ICAL_OPTION="ical"
  7928. PBX_ICAL=0
  7929. # Check whether --with-ical was given.
  7930. if test "${with_ical+set}" = set; then :
  7931. withval=$with_ical;
  7932. case ${withval} in
  7933. n|no)
  7934. USE_ICAL=no
  7935. # -1 is a magic value used by menuselect to know that the package
  7936. # was disabled, other than 'not found'
  7937. PBX_ICAL=-1
  7938. ;;
  7939. y|ye|yes)
  7940. ac_mandatory_list="${ac_mandatory_list} ICAL"
  7941. ;;
  7942. *)
  7943. ICAL_DIR="${withval}"
  7944. ac_mandatory_list="${ac_mandatory_list} ICAL"
  7945. ;;
  7946. esac
  7947. fi
  7948. ICONV_DESCRIP="Iconv"
  7949. ICONV_OPTION="iconv"
  7950. PBX_ICONV=0
  7951. # Check whether --with-iconv was given.
  7952. if test "${with_iconv+set}" = set; then :
  7953. withval=$with_iconv;
  7954. case ${withval} in
  7955. n|no)
  7956. USE_ICONV=no
  7957. # -1 is a magic value used by menuselect to know that the package
  7958. # was disabled, other than 'not found'
  7959. PBX_ICONV=-1
  7960. ;;
  7961. y|ye|yes)
  7962. ac_mandatory_list="${ac_mandatory_list} ICONV"
  7963. ;;
  7964. *)
  7965. ICONV_DIR="${withval}"
  7966. ac_mandatory_list="${ac_mandatory_list} ICONV"
  7967. ;;
  7968. esac
  7969. fi
  7970. IKSEMEL_DESCRIP="Iksemel Jabber"
  7971. IKSEMEL_OPTION="iksemel"
  7972. PBX_IKSEMEL=0
  7973. # Check whether --with-iksemel was given.
  7974. if test "${with_iksemel+set}" = set; then :
  7975. withval=$with_iksemel;
  7976. case ${withval} in
  7977. n|no)
  7978. USE_IKSEMEL=no
  7979. # -1 is a magic value used by menuselect to know that the package
  7980. # was disabled, other than 'not found'
  7981. PBX_IKSEMEL=-1
  7982. ;;
  7983. y|ye|yes)
  7984. ac_mandatory_list="${ac_mandatory_list} IKSEMEL"
  7985. ;;
  7986. *)
  7987. IKSEMEL_DIR="${withval}"
  7988. ac_mandatory_list="${ac_mandatory_list} IKSEMEL"
  7989. ;;
  7990. esac
  7991. fi
  7992. IMAP_TK_DESCRIP="UW IMAP Toolkit"
  7993. IMAP_TK_OPTION="imap"
  7994. PBX_IMAP_TK=0
  7995. # Check whether --with-imap was given.
  7996. if test "${with_imap+set}" = set; then :
  7997. withval=$with_imap;
  7998. case ${withval} in
  7999. n|no)
  8000. USE_IMAP_TK=no
  8001. # -1 is a magic value used by menuselect to know that the package
  8002. # was disabled, other than 'not found'
  8003. PBX_IMAP_TK=-1
  8004. ;;
  8005. y|ye|yes)
  8006. ac_mandatory_list="${ac_mandatory_list} IMAP_TK"
  8007. ;;
  8008. *)
  8009. IMAP_TK_DIR="${withval}"
  8010. ac_mandatory_list="${ac_mandatory_list} IMAP_TK"
  8011. ;;
  8012. esac
  8013. fi
  8014. INOTIFY_DESCRIP="inotify support"
  8015. INOTIFY_OPTION="inotify"
  8016. PBX_INOTIFY=0
  8017. # Check whether --with-inotify was given.
  8018. if test "${with_inotify+set}" = set; then :
  8019. withval=$with_inotify;
  8020. case ${withval} in
  8021. n|no)
  8022. USE_INOTIFY=no
  8023. # -1 is a magic value used by menuselect to know that the package
  8024. # was disabled, other than 'not found'
  8025. PBX_INOTIFY=-1
  8026. ;;
  8027. y|ye|yes)
  8028. ac_mandatory_list="${ac_mandatory_list} INOTIFY"
  8029. ;;
  8030. *)
  8031. INOTIFY_DIR="${withval}"
  8032. ac_mandatory_list="${ac_mandatory_list} INOTIFY"
  8033. ;;
  8034. esac
  8035. fi
  8036. IODBC_DESCRIP="iODBC"
  8037. IODBC_OPTION="iodbc"
  8038. PBX_IODBC=0
  8039. # Check whether --with-iodbc was given.
  8040. if test "${with_iodbc+set}" = set; then :
  8041. withval=$with_iodbc;
  8042. case ${withval} in
  8043. n|no)
  8044. USE_IODBC=no
  8045. # -1 is a magic value used by menuselect to know that the package
  8046. # was disabled, other than 'not found'
  8047. PBX_IODBC=-1
  8048. ;;
  8049. y|ye|yes)
  8050. ac_mandatory_list="${ac_mandatory_list} IODBC"
  8051. ;;
  8052. *)
  8053. IODBC_DIR="${withval}"
  8054. ac_mandatory_list="${ac_mandatory_list} IODBC"
  8055. ;;
  8056. esac
  8057. fi
  8058. ISDNNET_DESCRIP="ISDN4Linux"
  8059. ISDNNET_OPTION="isdnnet"
  8060. PBX_ISDNNET=0
  8061. # Check whether --with-isdnnet was given.
  8062. if test "${with_isdnnet+set}" = set; then :
  8063. withval=$with_isdnnet;
  8064. case ${withval} in
  8065. n|no)
  8066. USE_ISDNNET=no
  8067. # -1 is a magic value used by menuselect to know that the package
  8068. # was disabled, other than 'not found'
  8069. PBX_ISDNNET=-1
  8070. ;;
  8071. y|ye|yes)
  8072. ac_mandatory_list="${ac_mandatory_list} ISDNNET"
  8073. ;;
  8074. *)
  8075. ISDNNET_DIR="${withval}"
  8076. ac_mandatory_list="${ac_mandatory_list} ISDNNET"
  8077. ;;
  8078. esac
  8079. fi
  8080. JACK_DESCRIP="Jack Audio Connection Kit"
  8081. JACK_OPTION="jack"
  8082. PBX_JACK=0
  8083. # Check whether --with-jack was given.
  8084. if test "${with_jack+set}" = set; then :
  8085. withval=$with_jack;
  8086. case ${withval} in
  8087. n|no)
  8088. USE_JACK=no
  8089. # -1 is a magic value used by menuselect to know that the package
  8090. # was disabled, other than 'not found'
  8091. PBX_JACK=-1
  8092. ;;
  8093. y|ye|yes)
  8094. ac_mandatory_list="${ac_mandatory_list} JACK"
  8095. ;;
  8096. *)
  8097. JACK_DIR="${withval}"
  8098. ac_mandatory_list="${ac_mandatory_list} JACK"
  8099. ;;
  8100. esac
  8101. fi
  8102. JANSSON_DESCRIP="Jansson JSON library"
  8103. JANSSON_OPTION="jansson"
  8104. PBX_JANSSON=0
  8105. # Check whether --with-jansson was given.
  8106. if test "${with_jansson+set}" = set; then :
  8107. withval=$with_jansson;
  8108. case ${withval} in
  8109. n|no)
  8110. USE_JANSSON=no
  8111. # -1 is a magic value used by menuselect to know that the package
  8112. # was disabled, other than 'not found'
  8113. PBX_JANSSON=-1
  8114. ;;
  8115. y|ye|yes)
  8116. ac_mandatory_list="${ac_mandatory_list} JANSSON"
  8117. ;;
  8118. *)
  8119. JANSSON_DIR="${withval}"
  8120. ac_mandatory_list="${ac_mandatory_list} JANSSON"
  8121. ;;
  8122. esac
  8123. fi
  8124. URIPARSER_DESCRIP="uriparser library"
  8125. URIPARSER_OPTION="uriparser"
  8126. PBX_URIPARSER=0
  8127. # Check whether --with-uriparser was given.
  8128. if test "${with_uriparser+set}" = set; then :
  8129. withval=$with_uriparser;
  8130. case ${withval} in
  8131. n|no)
  8132. USE_URIPARSER=no
  8133. # -1 is a magic value used by menuselect to know that the package
  8134. # was disabled, other than 'not found'
  8135. PBX_URIPARSER=-1
  8136. ;;
  8137. y|ye|yes)
  8138. ac_mandatory_list="${ac_mandatory_list} URIPARSER"
  8139. ;;
  8140. *)
  8141. URIPARSER_DIR="${withval}"
  8142. ac_mandatory_list="${ac_mandatory_list} URIPARSER"
  8143. ;;
  8144. esac
  8145. fi
  8146. KQUEUE_DESCRIP="kqueue support"
  8147. KQUEUE_OPTION="kqueue"
  8148. PBX_KQUEUE=0
  8149. # Check whether --with-kqueue was given.
  8150. if test "${with_kqueue+set}" = set; then :
  8151. withval=$with_kqueue;
  8152. case ${withval} in
  8153. n|no)
  8154. USE_KQUEUE=no
  8155. # -1 is a magic value used by menuselect to know that the package
  8156. # was disabled, other than 'not found'
  8157. PBX_KQUEUE=-1
  8158. ;;
  8159. y|ye|yes)
  8160. ac_mandatory_list="${ac_mandatory_list} KQUEUE"
  8161. ;;
  8162. *)
  8163. KQUEUE_DIR="${withval}"
  8164. ac_mandatory_list="${ac_mandatory_list} KQUEUE"
  8165. ;;
  8166. esac
  8167. fi
  8168. LDAP_DESCRIP="OpenLDAP"
  8169. LDAP_OPTION="ldap"
  8170. PBX_LDAP=0
  8171. # Check whether --with-ldap was given.
  8172. if test "${with_ldap+set}" = set; then :
  8173. withval=$with_ldap;
  8174. case ${withval} in
  8175. n|no)
  8176. USE_LDAP=no
  8177. # -1 is a magic value used by menuselect to know that the package
  8178. # was disabled, other than 'not found'
  8179. PBX_LDAP=-1
  8180. ;;
  8181. y|ye|yes)
  8182. ac_mandatory_list="${ac_mandatory_list} LDAP"
  8183. ;;
  8184. *)
  8185. LDAP_DIR="${withval}"
  8186. ac_mandatory_list="${ac_mandatory_list} LDAP"
  8187. ;;
  8188. esac
  8189. fi
  8190. # Check whether --with-libcurl was given.
  8191. if test "${with_libcurl+set}" = set; then :
  8192. withval=$with_libcurl; _libcurl_with=$withval
  8193. else
  8194. _libcurl_with=yes
  8195. fi
  8196. if test "$_libcurl_with" != "no" ; then
  8197. for ac_prog in gawk mawk nawk awk
  8198. do
  8199. # Extract the first word of "$ac_prog", so it can be a program name with args.
  8200. set dummy $ac_prog; ac_word=$2
  8201. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  8202. $as_echo_n "checking for $ac_word... " >&6; }
  8203. if ${ac_cv_prog_AWK+:} false; then :
  8204. $as_echo_n "(cached) " >&6
  8205. else
  8206. if test -n "$AWK"; then
  8207. ac_cv_prog_AWK="$AWK" # Let the user override the test.
  8208. else
  8209. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  8210. for as_dir in $PATH
  8211. do
  8212. IFS=$as_save_IFS
  8213. test -z "$as_dir" && as_dir=.
  8214. for ac_exec_ext in '' $ac_executable_extensions; do
  8215. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  8216. ac_cv_prog_AWK="$ac_prog"
  8217. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  8218. break 2
  8219. fi
  8220. done
  8221. done
  8222. IFS=$as_save_IFS
  8223. fi
  8224. fi
  8225. AWK=$ac_cv_prog_AWK
  8226. if test -n "$AWK"; then
  8227. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
  8228. $as_echo "$AWK" >&6; }
  8229. else
  8230. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  8231. $as_echo "no" >&6; }
  8232. fi
  8233. test -n "$AWK" && break
  8234. done
  8235. _libcurl_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[1]+256*A[2]+A[3]; print X;}'"
  8236. _libcurl_try_link=yes
  8237. if test -d "$_libcurl_with" ; then
  8238. CURL_INCLUDE="-I$withval/include"
  8239. _libcurl_ldflags="-L$withval/lib"
  8240. # Extract the first word of "curl-config", so it can be a program name with args.
  8241. set dummy curl-config; ac_word=$2
  8242. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  8243. $as_echo_n "checking for $ac_word... " >&6; }
  8244. if ${ac_cv_path__libcurl_config+:} false; then :
  8245. $as_echo_n "(cached) " >&6
  8246. else
  8247. case $_libcurl_config in
  8248. [\\/]* | ?:[\\/]*)
  8249. ac_cv_path__libcurl_config="$_libcurl_config" # Let the user override the test with a path.
  8250. ;;
  8251. *)
  8252. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  8253. for as_dir in "$withval/bin"
  8254. do
  8255. IFS=$as_save_IFS
  8256. test -z "$as_dir" && as_dir=.
  8257. for ac_exec_ext in '' $ac_executable_extensions; do
  8258. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  8259. ac_cv_path__libcurl_config="$as_dir/$ac_word$ac_exec_ext"
  8260. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  8261. break 2
  8262. fi
  8263. done
  8264. done
  8265. IFS=$as_save_IFS
  8266. test -z "$ac_cv_path__libcurl_config" && ac_cv_path__libcurl_config=""$withval/bin""
  8267. ;;
  8268. esac
  8269. fi
  8270. _libcurl_config=$ac_cv_path__libcurl_config
  8271. if test -n "$_libcurl_config"; then
  8272. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_libcurl_config" >&5
  8273. $as_echo "$_libcurl_config" >&6; }
  8274. else
  8275. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  8276. $as_echo "no" >&6; }
  8277. fi
  8278. else
  8279. # Extract the first word of "curl-config", so it can be a program name with args.
  8280. set dummy curl-config; ac_word=$2
  8281. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  8282. $as_echo_n "checking for $ac_word... " >&6; }
  8283. if ${ac_cv_path__libcurl_config+:} false; then :
  8284. $as_echo_n "(cached) " >&6
  8285. else
  8286. case $_libcurl_config in
  8287. [\\/]* | ?:[\\/]*)
  8288. ac_cv_path__libcurl_config="$_libcurl_config" # Let the user override the test with a path.
  8289. ;;
  8290. *)
  8291. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  8292. for as_dir in $PATH
  8293. do
  8294. IFS=$as_save_IFS
  8295. test -z "$as_dir" && as_dir=.
  8296. for ac_exec_ext in '' $ac_executable_extensions; do
  8297. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  8298. ac_cv_path__libcurl_config="$as_dir/$ac_word$ac_exec_ext"
  8299. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  8300. break 2
  8301. fi
  8302. done
  8303. done
  8304. IFS=$as_save_IFS
  8305. ;;
  8306. esac
  8307. fi
  8308. _libcurl_config=$ac_cv_path__libcurl_config
  8309. if test -n "$_libcurl_config"; then
  8310. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_libcurl_config" >&5
  8311. $as_echo "$_libcurl_config" >&6; }
  8312. else
  8313. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  8314. $as_echo "no" >&6; }
  8315. fi
  8316. fi
  8317. if test x$_libcurl_config != "x" ; then
  8318. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the version of libcurl" >&5
  8319. $as_echo_n "checking for the version of libcurl... " >&6; }
  8320. if ${libcurl_cv_lib_curl_version+:} false; then :
  8321. $as_echo_n "(cached) " >&6
  8322. else
  8323. libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $2}'`
  8324. fi
  8325. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libcurl_cv_lib_curl_version" >&5
  8326. $as_echo "$libcurl_cv_lib_curl_version" >&6; }
  8327. _libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse`
  8328. _libcurl_wanted=`echo 7.10.1 | $_libcurl_version_parse`
  8329. if test $_libcurl_wanted -gt 0 ; then
  8330. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl >= version 7.10.1" >&5
  8331. $as_echo_n "checking for libcurl >= version 7.10.1... " >&6; }
  8332. if ${libcurl_cv_lib_version_ok+:} false; then :
  8333. $as_echo_n "(cached) " >&6
  8334. else
  8335. if test $_libcurl_version -ge $_libcurl_wanted ; then
  8336. libcurl_cv_lib_version_ok=yes
  8337. else
  8338. libcurl_cv_lib_version_ok=no
  8339. fi
  8340. fi
  8341. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libcurl_cv_lib_version_ok" >&5
  8342. $as_echo "$libcurl_cv_lib_version_ok" >&6; }
  8343. fi
  8344. if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = xyes ; then
  8345. if test x"$CURL_INCLUDE" = "x" ; then
  8346. CURL_INCLUDE=`$_libcurl_config --cflags`
  8347. fi
  8348. if test x"$CURL_LIB" = "x" ; then
  8349. CURL_LIB=`$_libcurl_config --libs`
  8350. # This is so silly, but Apple actually has a bug in their
  8351. # curl-config script. Fixed in Tiger, but there are still
  8352. # lots of Panther installs around.
  8353. case "${host}" in
  8354. powerpc-apple-darwin7*)
  8355. CURL_LIB=`echo $CURL_LIB | sed -e 's|-arch i386||g'`
  8356. ;;
  8357. esac
  8358. fi
  8359. # All curl-config scripts support --feature
  8360. _libcurl_features=`$_libcurl_config --feature`
  8361. # Is it modern enough to have --protocols? (7.12.4)
  8362. if test $_libcurl_version -ge 461828 ; then
  8363. _libcurl_protocols=`$_libcurl_config --protocols`
  8364. fi
  8365. else
  8366. _libcurl_try_link=no
  8367. fi
  8368. unset _libcurl_wanted
  8369. fi
  8370. if test $_libcurl_try_link = yes ; then
  8371. # we didn't find curl-config, so let's see if the user-supplied
  8372. # link line (or failing that, "-lcurl") is enough.
  8373. CURL_LIB=${CURL_LIB-"$_libcurl_ldflags -lcurl"}
  8374. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libcurl is usable" >&5
  8375. $as_echo_n "checking whether libcurl is usable... " >&6; }
  8376. if ${libcurl_cv_lib_curl_usable+:} false; then :
  8377. $as_echo_n "(cached) " >&6
  8378. else
  8379. _libcurl_save_cppflags=$CPPFLAGS
  8380. CPPFLAGS="$CURL_INCLUDE $CPPFLAGS"
  8381. _libcurl_save_libs=$LIBS
  8382. LIBS="$CURL_LIB $LIBS"
  8383. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8384. /* end confdefs.h. */
  8385. #include <curl/curl.h>
  8386. int
  8387. main ()
  8388. {
  8389. /* Try and use a few common options to force a failure if we are
  8390. missing symbols or can't link. */
  8391. int x;
  8392. curl_easy_setopt(NULL,CURLOPT_URL,NULL);
  8393. x=CURL_ERROR_SIZE;
  8394. x=CURLOPT_WRITEFUNCTION;
  8395. x=CURLOPT_FILE;
  8396. x=CURLOPT_ERRORBUFFER;
  8397. x=CURLOPT_STDERR;
  8398. x=CURLOPT_VERBOSE;
  8399. ;
  8400. return 0;
  8401. }
  8402. _ACEOF
  8403. if ac_fn_c_try_link "$LINENO"; then :
  8404. libcurl_cv_lib_curl_usable=yes
  8405. else
  8406. libcurl_cv_lib_curl_usable=no
  8407. fi
  8408. rm -f core conftest.err conftest.$ac_objext \
  8409. conftest$ac_exeext conftest.$ac_ext
  8410. CPPFLAGS=$_libcurl_save_cppflags
  8411. LIBS=$_libcurl_save_libs
  8412. unset _libcurl_save_cppflags
  8413. unset _libcurl_save_libs
  8414. fi
  8415. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libcurl_cv_lib_curl_usable" >&5
  8416. $as_echo "$libcurl_cv_lib_curl_usable" >&6; }
  8417. if test $libcurl_cv_lib_curl_usable = yes ; then
  8418. # Does curl_free() exist in this version of libcurl?
  8419. # If not, fake it with free()
  8420. _libcurl_save_cppflags=$CPPFLAGS
  8421. CPPFLAGS="$CPPFLAGS $CURL_INCLUDE"
  8422. _libcurl_save_libs=$LIBS
  8423. LIBS="$LIBS $CURL_LIB"
  8424. ac_fn_c_check_func "$LINENO" "curl_free" "ac_cv_func_curl_free"
  8425. if test "x$ac_cv_func_curl_free" = xyes; then :
  8426. else
  8427. $as_echo "#define curl_free free" >>confdefs.h
  8428. fi
  8429. CPPFLAGS=$_libcurl_save_cppflags
  8430. LIBS=$_libcurl_save_libs
  8431. unset _libcurl_save_cppflags
  8432. unset _libcurl_save_libs
  8433. $as_echo "#define HAVE_CURL 1" >>confdefs.h
  8434. PBX_CURL=1
  8435. for _libcurl_feature in $_libcurl_features ; do
  8436. cat >>confdefs.h <<_ACEOF
  8437. #define `$as_echo "libcurl_feature_$_libcurl_feature" | $as_tr_cpp` 1
  8438. _ACEOF
  8439. eval `$as_echo "libcurl_feature_$_libcurl_feature" | $as_tr_sh`=yes
  8440. done
  8441. if test "x$_libcurl_protocols" = "x" ; then
  8442. # We don't have --protocols, so just assume that all
  8443. # protocols are available
  8444. _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT"
  8445. if test x$libcurl_feature_SSL = xyes ; then
  8446. _libcurl_protocols="$_libcurl_protocols HTTPS"
  8447. # FTPS wasn't standards-compliant until version
  8448. # 7.11.0
  8449. if test $_libcurl_version -ge 461568; then
  8450. _libcurl_protocols="$_libcurl_protocols FTPS"
  8451. fi
  8452. fi
  8453. fi
  8454. for _libcurl_protocol in $_libcurl_protocols ; do
  8455. cat >>confdefs.h <<_ACEOF
  8456. #define `$as_echo "libcurl_protocol_$_libcurl_protocol" | $as_tr_cpp` 1
  8457. _ACEOF
  8458. eval `$as_echo "libcurl_protocol_$_libcurl_protocol" | $as_tr_sh`=yes
  8459. done
  8460. else
  8461. unset CURL_LIB
  8462. unset CURL_INCLUDE
  8463. PBX_CURL=0
  8464. fi
  8465. fi
  8466. unset _libcurl_try_link
  8467. unset _libcurl_version_parse
  8468. unset _libcurl_config
  8469. unset _libcurl_feature
  8470. unset _libcurl_features
  8471. unset _libcurl_protocol
  8472. unset _libcurl_protocols
  8473. unset _libcurl_version
  8474. unset _libcurl_ldflags
  8475. fi
  8476. if test x$_libcurl_with = xno || test x$libcurl_cv_lib_curl_usable != xyes ; then
  8477. # This is the IF-NO path
  8478. :
  8479. else
  8480. # This is the IF-YES path
  8481. :
  8482. fi
  8483. unset _libcurl_with
  8484. LIBEDIT_DESCRIP="NetBSD Editline library"
  8485. LIBEDIT_OPTION="libedit"
  8486. PBX_LIBEDIT=0
  8487. # Check whether --with-libedit was given.
  8488. if test "${with_libedit+set}" = set; then :
  8489. withval=$with_libedit;
  8490. case ${withval} in
  8491. n|no)
  8492. USE_LIBEDIT=no
  8493. # -1 is a magic value used by menuselect to know that the package
  8494. # was disabled, other than 'not found'
  8495. PBX_LIBEDIT=-1
  8496. ;;
  8497. y|ye|yes)
  8498. ac_mandatory_list="${ac_mandatory_list} LIBEDIT"
  8499. ;;
  8500. *)
  8501. LIBEDIT_DIR="${withval}"
  8502. ac_mandatory_list="${ac_mandatory_list} LIBEDIT"
  8503. ;;
  8504. esac
  8505. fi
  8506. LIBXML2_DESCRIP="LibXML2"
  8507. LIBXML2_OPTION="libxml2"
  8508. PBX_LIBXML2=0
  8509. # Check whether --with-libxml2 was given.
  8510. if test "${with_libxml2+set}" = set; then :
  8511. withval=$with_libxml2;
  8512. case ${withval} in
  8513. n|no)
  8514. USE_LIBXML2=no
  8515. # -1 is a magic value used by menuselect to know that the package
  8516. # was disabled, other than 'not found'
  8517. PBX_LIBXML2=-1
  8518. ;;
  8519. y|ye|yes)
  8520. ac_mandatory_list="${ac_mandatory_list} LIBXML2"
  8521. ;;
  8522. *)
  8523. LIBXML2_DIR="${withval}"
  8524. ac_mandatory_list="${ac_mandatory_list} LIBXML2"
  8525. ;;
  8526. esac
  8527. fi
  8528. LIBXSLT_DESCRIP="LibXSLT"
  8529. LIBXSLT_OPTION="libxslt"
  8530. PBX_LIBXSLT=0
  8531. # Check whether --with-libxslt was given.
  8532. if test "${with_libxslt+set}" = set; then :
  8533. withval=$with_libxslt;
  8534. case ${withval} in
  8535. n|no)
  8536. USE_LIBXSLT=no
  8537. # -1 is a magic value used by menuselect to know that the package
  8538. # was disabled, other than 'not found'
  8539. PBX_LIBXSLT=-1
  8540. ;;
  8541. y|ye|yes)
  8542. ac_mandatory_list="${ac_mandatory_list} LIBXSLT"
  8543. ;;
  8544. *)
  8545. LIBXSLT_DIR="${withval}"
  8546. ac_mandatory_list="${ac_mandatory_list} LIBXSLT"
  8547. ;;
  8548. esac
  8549. fi
  8550. LIBXSLT_CLEANUP_DESCRIP="LibXSLT Library Cleanup Function"
  8551. LIBXSLT_CLEANUP_OPTION=libxslt
  8552. LIBXSLT_CLEANUP_DIR=${LIBXSLT_DIR}
  8553. PBX_LIBXSLT_CLEANUP=0
  8554. LTDL_DESCRIP="libtool"
  8555. LTDL_OPTION="ltdl"
  8556. PBX_LTDL=0
  8557. # Check whether --with-ltdl was given.
  8558. if test "${with_ltdl+set}" = set; then :
  8559. withval=$with_ltdl;
  8560. case ${withval} in
  8561. n|no)
  8562. USE_LTDL=no
  8563. # -1 is a magic value used by menuselect to know that the package
  8564. # was disabled, other than 'not found'
  8565. PBX_LTDL=-1
  8566. ;;
  8567. y|ye|yes)
  8568. ac_mandatory_list="${ac_mandatory_list} LTDL"
  8569. ;;
  8570. *)
  8571. LTDL_DIR="${withval}"
  8572. ac_mandatory_list="${ac_mandatory_list} LTDL"
  8573. ;;
  8574. esac
  8575. fi
  8576. LUA_DESCRIP="Lua"
  8577. LUA_OPTION="lua"
  8578. PBX_LUA=0
  8579. # Check whether --with-lua was given.
  8580. if test "${with_lua+set}" = set; then :
  8581. withval=$with_lua;
  8582. case ${withval} in
  8583. n|no)
  8584. USE_LUA=no
  8585. # -1 is a magic value used by menuselect to know that the package
  8586. # was disabled, other than 'not found'
  8587. PBX_LUA=-1
  8588. ;;
  8589. y|ye|yes)
  8590. ac_mandatory_list="${ac_mandatory_list} LUA"
  8591. ;;
  8592. *)
  8593. LUA_DIR="${withval}"
  8594. ac_mandatory_list="${ac_mandatory_list} LUA"
  8595. ;;
  8596. esac
  8597. fi
  8598. MISDN_DESCRIP="mISDN user"
  8599. MISDN_OPTION="misdn"
  8600. PBX_MISDN=0
  8601. # Check whether --with-misdn was given.
  8602. if test "${with_misdn+set}" = set; then :
  8603. withval=$with_misdn;
  8604. case ${withval} in
  8605. n|no)
  8606. USE_MISDN=no
  8607. # -1 is a magic value used by menuselect to know that the package
  8608. # was disabled, other than 'not found'
  8609. PBX_MISDN=-1
  8610. ;;
  8611. y|ye|yes)
  8612. ac_mandatory_list="${ac_mandatory_list} MISDN"
  8613. ;;
  8614. *)
  8615. MISDN_DIR="${withval}"
  8616. ac_mandatory_list="${ac_mandatory_list} MISDN"
  8617. ;;
  8618. esac
  8619. fi
  8620. MYSQLCLIENT_DESCRIP="MySQL client"
  8621. MYSQLCLIENT_OPTION="mysqlclient"
  8622. PBX_MYSQLCLIENT=0
  8623. # Check whether --with-mysqlclient was given.
  8624. if test "${with_mysqlclient+set}" = set; then :
  8625. withval=$with_mysqlclient;
  8626. case ${withval} in
  8627. n|no)
  8628. USE_MYSQLCLIENT=no
  8629. # -1 is a magic value used by menuselect to know that the package
  8630. # was disabled, other than 'not found'
  8631. PBX_MYSQLCLIENT=-1
  8632. ;;
  8633. y|ye|yes)
  8634. ac_mandatory_list="${ac_mandatory_list} MYSQLCLIENT"
  8635. ;;
  8636. *)
  8637. MYSQLCLIENT_DIR="${withval}"
  8638. ac_mandatory_list="${ac_mandatory_list} MYSQLCLIENT"
  8639. ;;
  8640. esac
  8641. fi
  8642. NBS_DESCRIP="Network Broadcast Sound"
  8643. NBS_OPTION="nbs"
  8644. PBX_NBS=0
  8645. # Check whether --with-nbs was given.
  8646. if test "${with_nbs+set}" = set; then :
  8647. withval=$with_nbs;
  8648. case ${withval} in
  8649. n|no)
  8650. USE_NBS=no
  8651. # -1 is a magic value used by menuselect to know that the package
  8652. # was disabled, other than 'not found'
  8653. PBX_NBS=-1
  8654. ;;
  8655. y|ye|yes)
  8656. ac_mandatory_list="${ac_mandatory_list} NBS"
  8657. ;;
  8658. *)
  8659. NBS_DIR="${withval}"
  8660. ac_mandatory_list="${ac_mandatory_list} NBS"
  8661. ;;
  8662. esac
  8663. fi
  8664. NCURSES_DESCRIP="ncurses"
  8665. NCURSES_OPTION="ncurses"
  8666. PBX_NCURSES=0
  8667. # Check whether --with-ncurses was given.
  8668. if test "${with_ncurses+set}" = set; then :
  8669. withval=$with_ncurses;
  8670. case ${withval} in
  8671. n|no)
  8672. USE_NCURSES=no
  8673. # -1 is a magic value used by menuselect to know that the package
  8674. # was disabled, other than 'not found'
  8675. PBX_NCURSES=-1
  8676. ;;
  8677. y|ye|yes)
  8678. ac_mandatory_list="${ac_mandatory_list} NCURSES"
  8679. ;;
  8680. *)
  8681. NCURSES_DIR="${withval}"
  8682. ac_mandatory_list="${ac_mandatory_list} NCURSES"
  8683. ;;
  8684. esac
  8685. fi
  8686. NEON_DESCRIP="neon"
  8687. NEON_OPTION="neon"
  8688. PBX_NEON=0
  8689. # Check whether --with-neon was given.
  8690. if test "${with_neon+set}" = set; then :
  8691. withval=$with_neon;
  8692. case ${withval} in
  8693. n|no)
  8694. USE_NEON=no
  8695. # -1 is a magic value used by menuselect to know that the package
  8696. # was disabled, other than 'not found'
  8697. PBX_NEON=-1
  8698. ;;
  8699. y|ye|yes)
  8700. ac_mandatory_list="${ac_mandatory_list} NEON"
  8701. ;;
  8702. *)
  8703. NEON_DIR="${withval}"
  8704. ac_mandatory_list="${ac_mandatory_list} NEON"
  8705. ;;
  8706. esac
  8707. fi
  8708. NEON29_DESCRIP="neon29"
  8709. NEON29_OPTION="neon29"
  8710. PBX_NEON29=0
  8711. # Check whether --with-neon29 was given.
  8712. if test "${with_neon29+set}" = set; then :
  8713. withval=$with_neon29;
  8714. case ${withval} in
  8715. n|no)
  8716. USE_NEON29=no
  8717. # -1 is a magic value used by menuselect to know that the package
  8718. # was disabled, other than 'not found'
  8719. PBX_NEON29=-1
  8720. ;;
  8721. y|ye|yes)
  8722. ac_mandatory_list="${ac_mandatory_list} NEON29"
  8723. ;;
  8724. *)
  8725. NEON29_DIR="${withval}"
  8726. ac_mandatory_list="${ac_mandatory_list} NEON29"
  8727. ;;
  8728. esac
  8729. fi
  8730. NETSNMP_DESCRIP="Net-SNMP"
  8731. NETSNMP_OPTION="netsnmp"
  8732. PBX_NETSNMP=0
  8733. # Check whether --with-netsnmp was given.
  8734. if test "${with_netsnmp+set}" = set; then :
  8735. withval=$with_netsnmp;
  8736. case ${withval} in
  8737. n|no)
  8738. USE_NETSNMP=no
  8739. # -1 is a magic value used by menuselect to know that the package
  8740. # was disabled, other than 'not found'
  8741. PBX_NETSNMP=-1
  8742. ;;
  8743. y|ye|yes)
  8744. ac_mandatory_list="${ac_mandatory_list} NETSNMP"
  8745. ;;
  8746. *)
  8747. NETSNMP_DIR="${withval}"
  8748. ac_mandatory_list="${ac_mandatory_list} NETSNMP"
  8749. ;;
  8750. esac
  8751. fi
  8752. NEWT_DESCRIP="newt"
  8753. NEWT_OPTION="newt"
  8754. PBX_NEWT=0
  8755. # Check whether --with-newt was given.
  8756. if test "${with_newt+set}" = set; then :
  8757. withval=$with_newt;
  8758. case ${withval} in
  8759. n|no)
  8760. USE_NEWT=no
  8761. # -1 is a magic value used by menuselect to know that the package
  8762. # was disabled, other than 'not found'
  8763. PBX_NEWT=-1
  8764. ;;
  8765. y|ye|yes)
  8766. ac_mandatory_list="${ac_mandatory_list} NEWT"
  8767. ;;
  8768. *)
  8769. NEWT_DIR="${withval}"
  8770. ac_mandatory_list="${ac_mandatory_list} NEWT"
  8771. ;;
  8772. esac
  8773. fi
  8774. OGG_DESCRIP="OGG"
  8775. OGG_OPTION="ogg"
  8776. PBX_OGG=0
  8777. # Check whether --with-ogg was given.
  8778. if test "${with_ogg+set}" = set; then :
  8779. withval=$with_ogg;
  8780. case ${withval} in
  8781. n|no)
  8782. USE_OGG=no
  8783. # -1 is a magic value used by menuselect to know that the package
  8784. # was disabled, other than 'not found'
  8785. PBX_OGG=-1
  8786. ;;
  8787. y|ye|yes)
  8788. ac_mandatory_list="${ac_mandatory_list} OGG"
  8789. ;;
  8790. *)
  8791. OGG_DIR="${withval}"
  8792. ac_mandatory_list="${ac_mandatory_list} OGG"
  8793. ;;
  8794. esac
  8795. fi
  8796. OPENR2_DESCRIP="MFR2"
  8797. OPENR2_OPTION="openr2"
  8798. PBX_OPENR2=0
  8799. # Check whether --with-openr2 was given.
  8800. if test "${with_openr2+set}" = set; then :
  8801. withval=$with_openr2;
  8802. case ${withval} in
  8803. n|no)
  8804. USE_OPENR2=no
  8805. # -1 is a magic value used by menuselect to know that the package
  8806. # was disabled, other than 'not found'
  8807. PBX_OPENR2=-1
  8808. ;;
  8809. y|ye|yes)
  8810. ac_mandatory_list="${ac_mandatory_list} OPENR2"
  8811. ;;
  8812. *)
  8813. OPENR2_DIR="${withval}"
  8814. ac_mandatory_list="${ac_mandatory_list} OPENR2"
  8815. ;;
  8816. esac
  8817. fi
  8818. OPUS_DESCRIP="Opus"
  8819. OPUS_OPTION="opus"
  8820. PBX_OPUS=0
  8821. # Check whether --with-opus was given.
  8822. if test "${with_opus+set}" = set; then :
  8823. withval=$with_opus;
  8824. case ${withval} in
  8825. n|no)
  8826. USE_OPUS=no
  8827. # -1 is a magic value used by menuselect to know that the package
  8828. # was disabled, other than 'not found'
  8829. PBX_OPUS=-1
  8830. ;;
  8831. y|ye|yes)
  8832. ac_mandatory_list="${ac_mandatory_list} OPUS"
  8833. ;;
  8834. *)
  8835. OPUS_DIR="${withval}"
  8836. ac_mandatory_list="${ac_mandatory_list} OPUS"
  8837. ;;
  8838. esac
  8839. fi
  8840. OSPTK_DESCRIP="OSP Toolkit"
  8841. OSPTK_OPTION="osptk"
  8842. PBX_OSPTK=0
  8843. # Check whether --with-osptk was given.
  8844. if test "${with_osptk+set}" = set; then :
  8845. withval=$with_osptk;
  8846. case ${withval} in
  8847. n|no)
  8848. USE_OSPTK=no
  8849. # -1 is a magic value used by menuselect to know that the package
  8850. # was disabled, other than 'not found'
  8851. PBX_OSPTK=-1
  8852. ;;
  8853. y|ye|yes)
  8854. ac_mandatory_list="${ac_mandatory_list} OSPTK"
  8855. ;;
  8856. *)
  8857. OSPTK_DIR="${withval}"
  8858. ac_mandatory_list="${ac_mandatory_list} OSPTK"
  8859. ;;
  8860. esac
  8861. fi
  8862. OSS_DESCRIP="Open Sound System"
  8863. OSS_OPTION="oss"
  8864. PBX_OSS=0
  8865. # Check whether --with-oss was given.
  8866. if test "${with_oss+set}" = set; then :
  8867. withval=$with_oss;
  8868. case ${withval} in
  8869. n|no)
  8870. USE_OSS=no
  8871. # -1 is a magic value used by menuselect to know that the package
  8872. # was disabled, other than 'not found'
  8873. PBX_OSS=-1
  8874. ;;
  8875. y|ye|yes)
  8876. ac_mandatory_list="${ac_mandatory_list} OSS"
  8877. ;;
  8878. *)
  8879. OSS_DIR="${withval}"
  8880. ac_mandatory_list="${ac_mandatory_list} OSS"
  8881. ;;
  8882. esac
  8883. fi
  8884. PGSQL_DESCRIP="PostgreSQL"
  8885. PGSQL_OPTION="postgres"
  8886. PBX_PGSQL=0
  8887. # Check whether --with-postgres was given.
  8888. if test "${with_postgres+set}" = set; then :
  8889. withval=$with_postgres;
  8890. case ${withval} in
  8891. n|no)
  8892. USE_PGSQL=no
  8893. # -1 is a magic value used by menuselect to know that the package
  8894. # was disabled, other than 'not found'
  8895. PBX_PGSQL=-1
  8896. ;;
  8897. y|ye|yes)
  8898. ac_mandatory_list="${ac_mandatory_list} PGSQL"
  8899. ;;
  8900. *)
  8901. PGSQL_DIR="${withval}"
  8902. ac_mandatory_list="${ac_mandatory_list} PGSQL"
  8903. ;;
  8904. esac
  8905. fi
  8906. PJPROJECT_DESCRIP="PJPROJECT"
  8907. PJPROJECT_OPTION="pjproject"
  8908. PBX_PJPROJECT=0
  8909. # Check whether --with-pjproject was given.
  8910. if test "${with_pjproject+set}" = set; then :
  8911. withval=$with_pjproject;
  8912. case ${withval} in
  8913. n|no)
  8914. USE_PJPROJECT=no
  8915. # -1 is a magic value used by menuselect to know that the package
  8916. # was disabled, other than 'not found'
  8917. PBX_PJPROJECT=-1
  8918. ;;
  8919. y|ye|yes)
  8920. ac_mandatory_list="${ac_mandatory_list} PJPROJECT"
  8921. ;;
  8922. *)
  8923. PJPROJECT_DIR="${withval}"
  8924. ac_mandatory_list="${ac_mandatory_list} PJPROJECT"
  8925. ;;
  8926. esac
  8927. fi
  8928. POPT_DESCRIP="popt"
  8929. POPT_OPTION="popt"
  8930. PBX_POPT=0
  8931. # Check whether --with-popt was given.
  8932. if test "${with_popt+set}" = set; then :
  8933. withval=$with_popt;
  8934. case ${withval} in
  8935. n|no)
  8936. USE_POPT=no
  8937. # -1 is a magic value used by menuselect to know that the package
  8938. # was disabled, other than 'not found'
  8939. PBX_POPT=-1
  8940. ;;
  8941. y|ye|yes)
  8942. ac_mandatory_list="${ac_mandatory_list} POPT"
  8943. ;;
  8944. *)
  8945. POPT_DIR="${withval}"
  8946. ac_mandatory_list="${ac_mandatory_list} POPT"
  8947. ;;
  8948. esac
  8949. fi
  8950. PJ_TRANSACTION_GRP_LOCK_DESCRIP="PJSIP Transaction Group Lock Support"
  8951. PJ_TRANSACTION_GRP_LOCK_OPTION=pjsip
  8952. PJ_TRANSACTION_GRP_LOCK_DIR=${PJPROJECT_DIR}
  8953. PBX_PJ_TRANSACTION_GRP_LOCK=0
  8954. PJSIP_REPLACE_MEDIA_STREAM_DESCRIP="PJSIP Media Stream Replacement Support"
  8955. PJSIP_REPLACE_MEDIA_STREAM_OPTION=pjsip
  8956. PJSIP_REPLACE_MEDIA_STREAM_DIR=${PJPROJECT_DIR}
  8957. PBX_PJSIP_REPLACE_MEDIA_STREAM=0
  8958. PJSIP_GET_DEST_INFO_DESCRIP="pjsip_get_dest_info support"
  8959. PJSIP_GET_DEST_INFO_OPTION=pjsip
  8960. PJSIP_GET_DEST_INFO_DIR=${PJPROJECT_DIR}
  8961. PBX_PJSIP_GET_DEST_INFO=0
  8962. PJ_SSL_CERT_LOAD_FROM_FILES2_DESCRIP="pj_ssl_cert_load_from_files2 support"
  8963. PJ_SSL_CERT_LOAD_FROM_FILES2_OPTION=pjsip
  8964. PJ_SSL_CERT_LOAD_FROM_FILES2_DIR=${PJPROJECT_DIR}
  8965. PBX_PJ_SSL_CERT_LOAD_FROM_FILES2=0
  8966. PORTAUDIO_DESCRIP="PortAudio"
  8967. PORTAUDIO_OPTION="portaudio"
  8968. PBX_PORTAUDIO=0
  8969. # Check whether --with-portaudio was given.
  8970. if test "${with_portaudio+set}" = set; then :
  8971. withval=$with_portaudio;
  8972. case ${withval} in
  8973. n|no)
  8974. USE_PORTAUDIO=no
  8975. # -1 is a magic value used by menuselect to know that the package
  8976. # was disabled, other than 'not found'
  8977. PBX_PORTAUDIO=-1
  8978. ;;
  8979. y|ye|yes)
  8980. ac_mandatory_list="${ac_mandatory_list} PORTAUDIO"
  8981. ;;
  8982. *)
  8983. PORTAUDIO_DIR="${withval}"
  8984. ac_mandatory_list="${ac_mandatory_list} PORTAUDIO"
  8985. ;;
  8986. esac
  8987. fi
  8988. PRI_DESCRIP="ISDN PRI"
  8989. PRI_OPTION="pri"
  8990. PBX_PRI=0
  8991. # Check whether --with-pri was given.
  8992. if test "${with_pri+set}" = set; then :
  8993. withval=$with_pri;
  8994. case ${withval} in
  8995. n|no)
  8996. USE_PRI=no
  8997. # -1 is a magic value used by menuselect to know that the package
  8998. # was disabled, other than 'not found'
  8999. PBX_PRI=-1
  9000. ;;
  9001. y|ye|yes)
  9002. ac_mandatory_list="${ac_mandatory_list} PRI"
  9003. ;;
  9004. *)
  9005. PRI_DIR="${withval}"
  9006. ac_mandatory_list="${ac_mandatory_list} PRI"
  9007. ;;
  9008. esac
  9009. fi
  9010. PRI_SETUP_ACK_INBAND_DESCRIP="ISDN PRI progress inband ie in SETUP ACK"
  9011. PRI_SETUP_ACK_INBAND_OPTION=pri
  9012. PRI_SETUP_ACK_INBAND_DIR=${PRI_DIR}
  9013. PBX_PRI_SETUP_ACK_INBAND=0
  9014. PRI_L2_PERSISTENCE_DESCRIP="ISDN Layer 2 persistence option"
  9015. PRI_L2_PERSISTENCE_OPTION=pri
  9016. PRI_L2_PERSISTENCE_DIR=${PRI_DIR}
  9017. PBX_PRI_L2_PERSISTENCE=0
  9018. PRI_DATETIME_SEND_DESCRIP="ISDN PRI Date/time ie send policy"
  9019. PRI_DATETIME_SEND_OPTION=pri
  9020. PRI_DATETIME_SEND_DIR=${PRI_DIR}
  9021. PBX_PRI_DATETIME_SEND=0
  9022. PRI_MWI_V2_DESCRIP="ISDN PRI Message Waiting Indication (Fixed)"
  9023. PRI_MWI_V2_OPTION=pri
  9024. PRI_MWI_V2_DIR=${PRI_DIR}
  9025. PBX_PRI_MWI_V2=0
  9026. PRI_DISPLAY_TEXT_DESCRIP="ISDN PRI user display text IE contents during call"
  9027. PRI_DISPLAY_TEXT_OPTION=pri
  9028. PRI_DISPLAY_TEXT_DIR=${PRI_DIR}
  9029. PBX_PRI_DISPLAY_TEXT=0
  9030. PRI_MWI_DESCRIP="ISDN PRI Message Waiting Indication"
  9031. PRI_MWI_OPTION=pri
  9032. PRI_MWI_DIR=${PRI_DIR}
  9033. PBX_PRI_MWI=0
  9034. PRI_MCID_DESCRIP="ISDN PRI Malicious Call ID"
  9035. PRI_MCID_OPTION=pri
  9036. PRI_MCID_DIR=${PRI_DIR}
  9037. PBX_PRI_MCID=0
  9038. PRI_CALL_WAITING_DESCRIP="ISDN PRI call waiting supplementary service"
  9039. PRI_CALL_WAITING_OPTION=pri
  9040. PRI_CALL_WAITING_DIR=${PRI_DIR}
  9041. PBX_PRI_CALL_WAITING=0
  9042. PRI_AOC_EVENTS_DESCRIP="ISDN PRI advice of charge supplementary service events"
  9043. PRI_AOC_EVENTS_OPTION=pri
  9044. PRI_AOC_EVENTS_DIR=${PRI_DIR}
  9045. PBX_PRI_AOC_EVENTS=0
  9046. PRI_TRANSFER_DESCRIP="ISDN PRI call transfer supplementary service"
  9047. PRI_TRANSFER_OPTION=pri
  9048. PRI_TRANSFER_DIR=${PRI_DIR}
  9049. PBX_PRI_TRANSFER=0
  9050. PRI_CCSS_DESCRIP="ISDN PRI call completion supplementary service"
  9051. PRI_CCSS_OPTION=pri
  9052. PRI_CCSS_DIR=${PRI_DIR}
  9053. PBX_PRI_CCSS=0
  9054. PRI_HANGUP_FIX_DESCRIP="ISDN PRI hangup fix"
  9055. PRI_HANGUP_FIX_OPTION=pri
  9056. PRI_HANGUP_FIX_DIR=${PRI_DIR}
  9057. PBX_PRI_HANGUP_FIX=0
  9058. PRI_SUBADDR_DESCRIP="ISDN PRI subaddressing"
  9059. PRI_SUBADDR_OPTION=pri
  9060. PRI_SUBADDR_DIR=${PRI_DIR}
  9061. PBX_PRI_SUBADDR=0
  9062. PRI_CALL_HOLD_DESCRIP="ISDN PRI call hold"
  9063. PRI_CALL_HOLD_OPTION=pri
  9064. PRI_CALL_HOLD_DIR=${PRI_DIR}
  9065. PBX_PRI_CALL_HOLD=0
  9066. PRI_CALL_REROUTING_DESCRIP="ISDN PRI call rerouting and call deflection"
  9067. PRI_CALL_REROUTING_OPTION=pri
  9068. PRI_CALL_REROUTING_DIR=${PRI_DIR}
  9069. PBX_PRI_CALL_REROUTING=0
  9070. PRI_SETUP_KEYPAD_DESCRIP="ISDN PRI keypad facility in SETUP"
  9071. PRI_SETUP_KEYPAD_OPTION=pri
  9072. PRI_SETUP_KEYPAD_DIR=${PRI_DIR}
  9073. PBX_PRI_SETUP_KEYPAD=0
  9074. # ------------------------------------v
  9075. # TODO: The code can be changed to always include these features now.
  9076. # These features will always be present if pri_connected_line_update is available.
  9077. PRI_INBANDDISCONNECT_DESCRIP="ISDN PRI set_inbanddisconnect"
  9078. PRI_INBANDDISCONNECT_OPTION=pri
  9079. PRI_INBANDDISCONNECT_DIR=${PRI_DIR}
  9080. PBX_PRI_INBANDDISCONNECT=0
  9081. PRI_PROG_W_CAUSE_DESCRIP="ISDN progress with cause"
  9082. PRI_PROG_W_CAUSE_OPTION=pri
  9083. PRI_PROG_W_CAUSE_DIR=${PRI_DIR}
  9084. PBX_PRI_PROG_W_CAUSE=0
  9085. PRI_SERVICE_MESSAGES_DESCRIP="ISDN service messages"
  9086. PRI_SERVICE_MESSAGES_OPTION=pri
  9087. PRI_SERVICE_MESSAGES_DIR=${PRI_DIR}
  9088. PBX_PRI_SERVICE_MESSAGES=0
  9089. PRI_REVERSE_CHARGE_DESCRIP="ISDN reverse charge"
  9090. PRI_REVERSE_CHARGE_OPTION=pri
  9091. PRI_REVERSE_CHARGE_DIR=${PRI_DIR}
  9092. PBX_PRI_REVERSE_CHARGE=0
  9093. # ------------------------------------^
  9094. PWLIB_DESCRIP="PWlib"
  9095. PWLIB_OPTION="pwlib"
  9096. PBX_PWLIB=0
  9097. # Check whether --with-pwlib was given.
  9098. if test "${with_pwlib+set}" = set; then :
  9099. withval=$with_pwlib;
  9100. case ${withval} in
  9101. n|no)
  9102. USE_PWLIB=no
  9103. # -1 is a magic value used by menuselect to know that the package
  9104. # was disabled, other than 'not found'
  9105. PBX_PWLIB=-1
  9106. ;;
  9107. y|ye|yes)
  9108. ac_mandatory_list="${ac_mandatory_list} PWLIB"
  9109. ;;
  9110. *)
  9111. PWLIB_DIR="${withval}"
  9112. ac_mandatory_list="${ac_mandatory_list} PWLIB"
  9113. ;;
  9114. esac
  9115. fi
  9116. RADIUS_DESCRIP="Radius Client"
  9117. RADIUS_OPTION="radius"
  9118. PBX_RADIUS=0
  9119. # Check whether --with-radius was given.
  9120. if test "${with_radius+set}" = set; then :
  9121. withval=$with_radius;
  9122. case ${withval} in
  9123. n|no)
  9124. USE_RADIUS=no
  9125. # -1 is a magic value used by menuselect to know that the package
  9126. # was disabled, other than 'not found'
  9127. PBX_RADIUS=-1
  9128. ;;
  9129. y|ye|yes)
  9130. ac_mandatory_list="${ac_mandatory_list} RADIUS"
  9131. ;;
  9132. *)
  9133. RADIUS_DIR="${withval}"
  9134. ac_mandatory_list="${ac_mandatory_list} RADIUS"
  9135. ;;
  9136. esac
  9137. fi
  9138. RESAMPLE_DESCRIP="LIBRESAMPLE"
  9139. RESAMPLE_OPTION="resample"
  9140. PBX_RESAMPLE=0
  9141. # Check whether --with-resample was given.
  9142. if test "${with_resample+set}" = set; then :
  9143. withval=$with_resample;
  9144. case ${withval} in
  9145. n|no)
  9146. USE_RESAMPLE=no
  9147. # -1 is a magic value used by menuselect to know that the package
  9148. # was disabled, other than 'not found'
  9149. PBX_RESAMPLE=-1
  9150. ;;
  9151. y|ye|yes)
  9152. ac_mandatory_list="${ac_mandatory_list} RESAMPLE"
  9153. ;;
  9154. *)
  9155. RESAMPLE_DIR="${withval}"
  9156. ac_mandatory_list="${ac_mandatory_list} RESAMPLE"
  9157. ;;
  9158. esac
  9159. fi
  9160. SDL_DESCRIP="Sdl"
  9161. SDL_OPTION="sdl"
  9162. PBX_SDL=0
  9163. # Check whether --with-sdl was given.
  9164. if test "${with_sdl+set}" = set; then :
  9165. withval=$with_sdl;
  9166. case ${withval} in
  9167. n|no)
  9168. USE_SDL=no
  9169. # -1 is a magic value used by menuselect to know that the package
  9170. # was disabled, other than 'not found'
  9171. PBX_SDL=-1
  9172. ;;
  9173. y|ye|yes)
  9174. ac_mandatory_list="${ac_mandatory_list} SDL"
  9175. ;;
  9176. *)
  9177. SDL_DIR="${withval}"
  9178. ac_mandatory_list="${ac_mandatory_list} SDL"
  9179. ;;
  9180. esac
  9181. fi
  9182. SDL_IMAGE_DESCRIP="Sdl Image"
  9183. SDL_IMAGE_OPTION="SDL_image"
  9184. PBX_SDL_IMAGE=0
  9185. # Check whether --with-SDL_image was given.
  9186. if test "${with_SDL_image+set}" = set; then :
  9187. withval=$with_SDL_image;
  9188. case ${withval} in
  9189. n|no)
  9190. USE_SDL_IMAGE=no
  9191. # -1 is a magic value used by menuselect to know that the package
  9192. # was disabled, other than 'not found'
  9193. PBX_SDL_IMAGE=-1
  9194. ;;
  9195. y|ye|yes)
  9196. ac_mandatory_list="${ac_mandatory_list} SDL_IMAGE"
  9197. ;;
  9198. *)
  9199. SDL_IMAGE_DIR="${withval}"
  9200. ac_mandatory_list="${ac_mandatory_list} SDL_IMAGE"
  9201. ;;
  9202. esac
  9203. fi
  9204. # Check whether --with-sounds-cache was given.
  9205. if test "${with_sounds_cache+set}" = set; then :
  9206. withval=$with_sounds_cache;
  9207. case ${withval} in
  9208. n|no)
  9209. unset SOUNDS_CACHE_DIR
  9210. ;;
  9211. *)
  9212. if test "x${withval}" = "x"; then
  9213. :
  9214. else
  9215. SOUNDS_CACHE_DIR="${withval}"
  9216. fi
  9217. ;;
  9218. esac
  9219. else
  9220. :
  9221. fi
  9222. SPANDSP_DESCRIP="SPANDSP"
  9223. SPANDSP_OPTION="spandsp"
  9224. PBX_SPANDSP=0
  9225. # Check whether --with-spandsp was given.
  9226. if test "${with_spandsp+set}" = set; then :
  9227. withval=$with_spandsp;
  9228. case ${withval} in
  9229. n|no)
  9230. USE_SPANDSP=no
  9231. # -1 is a magic value used by menuselect to know that the package
  9232. # was disabled, other than 'not found'
  9233. PBX_SPANDSP=-1
  9234. ;;
  9235. y|ye|yes)
  9236. ac_mandatory_list="${ac_mandatory_list} SPANDSP"
  9237. ;;
  9238. *)
  9239. SPANDSP_DIR="${withval}"
  9240. ac_mandatory_list="${ac_mandatory_list} SPANDSP"
  9241. ;;
  9242. esac
  9243. fi
  9244. SS7_DESCRIP="ISDN SS7"
  9245. SS7_OPTION="ss7"
  9246. PBX_SS7=0
  9247. # Check whether --with-ss7 was given.
  9248. if test "${with_ss7+set}" = set; then :
  9249. withval=$with_ss7;
  9250. case ${withval} in
  9251. n|no)
  9252. USE_SS7=no
  9253. # -1 is a magic value used by menuselect to know that the package
  9254. # was disabled, other than 'not found'
  9255. PBX_SS7=-1
  9256. ;;
  9257. y|ye|yes)
  9258. ac_mandatory_list="${ac_mandatory_list} SS7"
  9259. ;;
  9260. *)
  9261. SS7_DIR="${withval}"
  9262. ac_mandatory_list="${ac_mandatory_list} SS7"
  9263. ;;
  9264. esac
  9265. fi
  9266. SPEEX_DESCRIP="Speex"
  9267. SPEEX_OPTION="speex"
  9268. PBX_SPEEX=0
  9269. # Check whether --with-speex was given.
  9270. if test "${with_speex+set}" = set; then :
  9271. withval=$with_speex;
  9272. case ${withval} in
  9273. n|no)
  9274. USE_SPEEX=no
  9275. # -1 is a magic value used by menuselect to know that the package
  9276. # was disabled, other than 'not found'
  9277. PBX_SPEEX=-1
  9278. ;;
  9279. y|ye|yes)
  9280. ac_mandatory_list="${ac_mandatory_list} SPEEX"
  9281. ;;
  9282. *)
  9283. SPEEX_DIR="${withval}"
  9284. ac_mandatory_list="${ac_mandatory_list} SPEEX"
  9285. ;;
  9286. esac
  9287. fi
  9288. SPEEX_PREPROCESS_DESCRIP="Speex preprocess routines"
  9289. SPEEX_PREPROCESS_OPTION="speex"
  9290. PBX_SPEEX_PREPROCESS=0
  9291. # Check whether --with-speex was given.
  9292. if test "${with_speex+set}" = set; then :
  9293. withval=$with_speex;
  9294. case ${withval} in
  9295. n|no)
  9296. USE_SPEEX_PREPROCESS=no
  9297. # -1 is a magic value used by menuselect to know that the package
  9298. # was disabled, other than 'not found'
  9299. PBX_SPEEX_PREPROCESS=-1
  9300. ;;
  9301. y|ye|yes)
  9302. ac_mandatory_list="${ac_mandatory_list} SPEEX_PREPROCESS"
  9303. ;;
  9304. *)
  9305. SPEEX_PREPROCESS_DIR="${withval}"
  9306. ac_mandatory_list="${ac_mandatory_list} SPEEX_PREPROCESS"
  9307. ;;
  9308. esac
  9309. fi
  9310. SPEEXDSP_DESCRIP="SpeexDSP"
  9311. SPEEXDSP_OPTION="speexdsp"
  9312. PBX_SPEEXDSP=0
  9313. # Check whether --with-speexdsp was given.
  9314. if test "${with_speexdsp+set}" = set; then :
  9315. withval=$with_speexdsp;
  9316. case ${withval} in
  9317. n|no)
  9318. USE_SPEEXDSP=no
  9319. # -1 is a magic value used by menuselect to know that the package
  9320. # was disabled, other than 'not found'
  9321. PBX_SPEEXDSP=-1
  9322. ;;
  9323. y|ye|yes)
  9324. ac_mandatory_list="${ac_mandatory_list} SPEEXDSP"
  9325. ;;
  9326. *)
  9327. SPEEXDSP_DIR="${withval}"
  9328. ac_mandatory_list="${ac_mandatory_list} SPEEXDSP"
  9329. ;;
  9330. esac
  9331. fi
  9332. SPEEX_PREPROCESS_DESCRIP="speex_preprocess_ctl"
  9333. SPEEX_PREPROCESS_OPTION=speex
  9334. PBX_SPEEX_PREPROCESS=0
  9335. SQLITE_DESCRIP="SQLite"
  9336. SQLITE_OPTION="sqlite"
  9337. PBX_SQLITE=0
  9338. # Check whether --with-sqlite was given.
  9339. if test "${with_sqlite+set}" = set; then :
  9340. withval=$with_sqlite;
  9341. case ${withval} in
  9342. n|no)
  9343. USE_SQLITE=no
  9344. # -1 is a magic value used by menuselect to know that the package
  9345. # was disabled, other than 'not found'
  9346. PBX_SQLITE=-1
  9347. ;;
  9348. y|ye|yes)
  9349. ac_mandatory_list="${ac_mandatory_list} SQLITE"
  9350. ;;
  9351. *)
  9352. SQLITE_DIR="${withval}"
  9353. ac_mandatory_list="${ac_mandatory_list} SQLITE"
  9354. ;;
  9355. esac
  9356. fi
  9357. SQLITE3_DESCRIP="SQLite"
  9358. SQLITE3_OPTION="sqlite3"
  9359. PBX_SQLITE3=0
  9360. # Check whether --with-sqlite3 was given.
  9361. if test "${with_sqlite3+set}" = set; then :
  9362. withval=$with_sqlite3;
  9363. case ${withval} in
  9364. n|no)
  9365. USE_SQLITE3=no
  9366. # -1 is a magic value used by menuselect to know that the package
  9367. # was disabled, other than 'not found'
  9368. PBX_SQLITE3=-1
  9369. ;;
  9370. y|ye|yes)
  9371. ac_mandatory_list="${ac_mandatory_list} SQLITE3"
  9372. ;;
  9373. *)
  9374. SQLITE3_DIR="${withval}"
  9375. ac_mandatory_list="${ac_mandatory_list} SQLITE3"
  9376. ;;
  9377. esac
  9378. fi
  9379. SRTP_DESCRIP="Secure RTP"
  9380. SRTP_OPTION="srtp"
  9381. PBX_SRTP=0
  9382. # Check whether --with-srtp was given.
  9383. if test "${with_srtp+set}" = set; then :
  9384. withval=$with_srtp;
  9385. case ${withval} in
  9386. n|no)
  9387. USE_SRTP=no
  9388. # -1 is a magic value used by menuselect to know that the package
  9389. # was disabled, other than 'not found'
  9390. PBX_SRTP=-1
  9391. ;;
  9392. y|ye|yes)
  9393. ac_mandatory_list="${ac_mandatory_list} SRTP"
  9394. ;;
  9395. *)
  9396. SRTP_DIR="${withval}"
  9397. ac_mandatory_list="${ac_mandatory_list} SRTP"
  9398. ;;
  9399. esac
  9400. fi
  9401. SRTP_SHUTDOWN_DESCRIP="SRTP Library Shutdown Function"
  9402. SRTP_SHUTDOWN_OPTION=srtp
  9403. SRTP_SHUTDOWN_DIR=${SRTP_DIR}
  9404. PBX_SRTP_SHUTDOWN=0
  9405. OPENSSL_DESCRIP="OpenSSL Secure Sockets Layer"
  9406. OPENSSL_OPTION="ssl"
  9407. PBX_OPENSSL=0
  9408. # Check whether --with-ssl was given.
  9409. if test "${with_ssl+set}" = set; then :
  9410. withval=$with_ssl;
  9411. case ${withval} in
  9412. n|no)
  9413. USE_OPENSSL=no
  9414. # -1 is a magic value used by menuselect to know that the package
  9415. # was disabled, other than 'not found'
  9416. PBX_OPENSSL=-1
  9417. ;;
  9418. y|ye|yes)
  9419. ac_mandatory_list="${ac_mandatory_list} OPENSSL"
  9420. ;;
  9421. *)
  9422. OPENSSL_DIR="${withval}"
  9423. ac_mandatory_list="${ac_mandatory_list} OPENSSL"
  9424. ;;
  9425. esac
  9426. fi
  9427. SUPPSERV_DESCRIP="mISDN Supplemental Services"
  9428. SUPPSERV_OPTION="suppserv"
  9429. PBX_SUPPSERV=0
  9430. # Check whether --with-suppserv was given.
  9431. if test "${with_suppserv+set}" = set; then :
  9432. withval=$with_suppserv;
  9433. case ${withval} in
  9434. n|no)
  9435. USE_SUPPSERV=no
  9436. # -1 is a magic value used by menuselect to know that the package
  9437. # was disabled, other than 'not found'
  9438. PBX_SUPPSERV=-1
  9439. ;;
  9440. y|ye|yes)
  9441. ac_mandatory_list="${ac_mandatory_list} SUPPSERV"
  9442. ;;
  9443. *)
  9444. SUPPSERV_DIR="${withval}"
  9445. ac_mandatory_list="${ac_mandatory_list} SUPPSERV"
  9446. ;;
  9447. esac
  9448. fi
  9449. FREETDS_DESCRIP="FreeTDS"
  9450. FREETDS_OPTION="tds"
  9451. PBX_FREETDS=0
  9452. # Check whether --with-tds was given.
  9453. if test "${with_tds+set}" = set; then :
  9454. withval=$with_tds;
  9455. case ${withval} in
  9456. n|no)
  9457. USE_FREETDS=no
  9458. # -1 is a magic value used by menuselect to know that the package
  9459. # was disabled, other than 'not found'
  9460. PBX_FREETDS=-1
  9461. ;;
  9462. y|ye|yes)
  9463. ac_mandatory_list="${ac_mandatory_list} FREETDS"
  9464. ;;
  9465. *)
  9466. FREETDS_DIR="${withval}"
  9467. ac_mandatory_list="${ac_mandatory_list} FREETDS"
  9468. ;;
  9469. esac
  9470. fi
  9471. TERMCAP_DESCRIP="Termcap"
  9472. TERMCAP_OPTION="termcap"
  9473. PBX_TERMCAP=0
  9474. # Check whether --with-termcap was given.
  9475. if test "${with_termcap+set}" = set; then :
  9476. withval=$with_termcap;
  9477. case ${withval} in
  9478. n|no)
  9479. USE_TERMCAP=no
  9480. # -1 is a magic value used by menuselect to know that the package
  9481. # was disabled, other than 'not found'
  9482. PBX_TERMCAP=-1
  9483. ;;
  9484. y|ye|yes)
  9485. ac_mandatory_list="${ac_mandatory_list} TERMCAP"
  9486. ;;
  9487. *)
  9488. TERMCAP_DIR="${withval}"
  9489. ac_mandatory_list="${ac_mandatory_list} TERMCAP"
  9490. ;;
  9491. esac
  9492. fi
  9493. TIMERFD_DESCRIP="timerfd"
  9494. TIMERFD_OPTION="timerfd"
  9495. PBX_TIMERFD=0
  9496. # Check whether --with-timerfd was given.
  9497. if test "${with_timerfd+set}" = set; then :
  9498. withval=$with_timerfd;
  9499. case ${withval} in
  9500. n|no)
  9501. USE_TIMERFD=no
  9502. # -1 is a magic value used by menuselect to know that the package
  9503. # was disabled, other than 'not found'
  9504. PBX_TIMERFD=-1
  9505. ;;
  9506. y|ye|yes)
  9507. ac_mandatory_list="${ac_mandatory_list} TIMERFD"
  9508. ;;
  9509. *)
  9510. TIMERFD_DIR="${withval}"
  9511. ac_mandatory_list="${ac_mandatory_list} TIMERFD"
  9512. ;;
  9513. esac
  9514. fi
  9515. TINFO_DESCRIP="Term Info"
  9516. TINFO_OPTION="tinfo"
  9517. PBX_TINFO=0
  9518. # Check whether --with-tinfo was given.
  9519. if test "${with_tinfo+set}" = set; then :
  9520. withval=$with_tinfo;
  9521. case ${withval} in
  9522. n|no)
  9523. USE_TINFO=no
  9524. # -1 is a magic value used by menuselect to know that the package
  9525. # was disabled, other than 'not found'
  9526. PBX_TINFO=-1
  9527. ;;
  9528. y|ye|yes)
  9529. ac_mandatory_list="${ac_mandatory_list} TINFO"
  9530. ;;
  9531. *)
  9532. TINFO_DIR="${withval}"
  9533. ac_mandatory_list="${ac_mandatory_list} TINFO"
  9534. ;;
  9535. esac
  9536. fi
  9537. TONEZONE_DESCRIP="tonezone"
  9538. TONEZONE_OPTION="tonezone"
  9539. PBX_TONEZONE=0
  9540. # Check whether --with-tonezone was given.
  9541. if test "${with_tonezone+set}" = set; then :
  9542. withval=$with_tonezone;
  9543. case ${withval} in
  9544. n|no)
  9545. USE_TONEZONE=no
  9546. # -1 is a magic value used by menuselect to know that the package
  9547. # was disabled, other than 'not found'
  9548. PBX_TONEZONE=-1
  9549. ;;
  9550. y|ye|yes)
  9551. ac_mandatory_list="${ac_mandatory_list} TONEZONE"
  9552. ;;
  9553. *)
  9554. TONEZONE_DIR="${withval}"
  9555. ac_mandatory_list="${ac_mandatory_list} TONEZONE"
  9556. ;;
  9557. esac
  9558. fi
  9559. UNIXODBC_DESCRIP="unixODBC"
  9560. UNIXODBC_OPTION="unixodbc"
  9561. PBX_UNIXODBC=0
  9562. # Check whether --with-unixodbc was given.
  9563. if test "${with_unixodbc+set}" = set; then :
  9564. withval=$with_unixodbc;
  9565. case ${withval} in
  9566. n|no)
  9567. USE_UNIXODBC=no
  9568. # -1 is a magic value used by menuselect to know that the package
  9569. # was disabled, other than 'not found'
  9570. PBX_UNIXODBC=-1
  9571. ;;
  9572. y|ye|yes)
  9573. ac_mandatory_list="${ac_mandatory_list} UNIXODBC"
  9574. ;;
  9575. *)
  9576. UNIXODBC_DIR="${withval}"
  9577. ac_mandatory_list="${ac_mandatory_list} UNIXODBC"
  9578. ;;
  9579. esac
  9580. fi
  9581. VORBIS_DESCRIP="Vorbis"
  9582. VORBIS_OPTION="vorbis"
  9583. PBX_VORBIS=0
  9584. # Check whether --with-vorbis was given.
  9585. if test "${with_vorbis+set}" = set; then :
  9586. withval=$with_vorbis;
  9587. case ${withval} in
  9588. n|no)
  9589. USE_VORBIS=no
  9590. # -1 is a magic value used by menuselect to know that the package
  9591. # was disabled, other than 'not found'
  9592. PBX_VORBIS=-1
  9593. ;;
  9594. y|ye|yes)
  9595. ac_mandatory_list="${ac_mandatory_list} VORBIS"
  9596. ;;
  9597. *)
  9598. VORBIS_DIR="${withval}"
  9599. ac_mandatory_list="${ac_mandatory_list} VORBIS"
  9600. ;;
  9601. esac
  9602. fi
  9603. VPB_DESCRIP="Voicetronix API"
  9604. VPB_OPTION="vpb"
  9605. PBX_VPB=0
  9606. # Check whether --with-vpb was given.
  9607. if test "${with_vpb+set}" = set; then :
  9608. withval=$with_vpb;
  9609. case ${withval} in
  9610. n|no)
  9611. USE_VPB=no
  9612. # -1 is a magic value used by menuselect to know that the package
  9613. # was disabled, other than 'not found'
  9614. PBX_VPB=-1
  9615. ;;
  9616. y|ye|yes)
  9617. ac_mandatory_list="${ac_mandatory_list} VPB"
  9618. ;;
  9619. *)
  9620. VPB_DIR="${withval}"
  9621. ac_mandatory_list="${ac_mandatory_list} VPB"
  9622. ;;
  9623. esac
  9624. fi
  9625. X11_DESCRIP="X11"
  9626. X11_OPTION="x11"
  9627. PBX_X11=0
  9628. # Check whether --with-x11 was given.
  9629. if test "${with_x11+set}" = set; then :
  9630. withval=$with_x11;
  9631. case ${withval} in
  9632. n|no)
  9633. USE_X11=no
  9634. # -1 is a magic value used by menuselect to know that the package
  9635. # was disabled, other than 'not found'
  9636. PBX_X11=-1
  9637. ;;
  9638. y|ye|yes)
  9639. ac_mandatory_list="${ac_mandatory_list} X11"
  9640. ;;
  9641. *)
  9642. X11_DIR="${withval}"
  9643. ac_mandatory_list="${ac_mandatory_list} X11"
  9644. ;;
  9645. esac
  9646. fi
  9647. ZLIB_DESCRIP="zlib compression"
  9648. ZLIB_OPTION="z"
  9649. PBX_ZLIB=0
  9650. # Check whether --with-z was given.
  9651. if test "${with_z+set}" = set; then :
  9652. withval=$with_z;
  9653. case ${withval} in
  9654. n|no)
  9655. USE_ZLIB=no
  9656. # -1 is a magic value used by menuselect to know that the package
  9657. # was disabled, other than 'not found'
  9658. PBX_ZLIB=-1
  9659. ;;
  9660. y|ye|yes)
  9661. ac_mandatory_list="${ac_mandatory_list} ZLIB"
  9662. ;;
  9663. *)
  9664. ZLIB_DIR="${withval}"
  9665. ac_mandatory_list="${ac_mandatory_list} ZLIB"
  9666. ;;
  9667. esac
  9668. fi
  9669. # check for basic system features and functionality before
  9670. # checking for package libraries
  9671. ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
  9672. if test "x$ac_cv_type_size_t" = xyes; then :
  9673. else
  9674. cat >>confdefs.h <<_ACEOF
  9675. #define size_t unsigned int
  9676. _ACEOF
  9677. fi
  9678. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  9679. # for constant arguments. Useless!
  9680. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
  9681. $as_echo_n "checking for working alloca.h... " >&6; }
  9682. if ${ac_cv_working_alloca_h+:} false; then :
  9683. $as_echo_n "(cached) " >&6
  9684. else
  9685. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9686. /* end confdefs.h. */
  9687. #include <alloca.h>
  9688. int
  9689. main ()
  9690. {
  9691. char *p = (char *) alloca (2 * sizeof (int));
  9692. if (p) return 0;
  9693. ;
  9694. return 0;
  9695. }
  9696. _ACEOF
  9697. if ac_fn_c_try_link "$LINENO"; then :
  9698. ac_cv_working_alloca_h=yes
  9699. else
  9700. ac_cv_working_alloca_h=no
  9701. fi
  9702. rm -f core conftest.err conftest.$ac_objext \
  9703. conftest$ac_exeext conftest.$ac_ext
  9704. fi
  9705. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
  9706. $as_echo "$ac_cv_working_alloca_h" >&6; }
  9707. if test $ac_cv_working_alloca_h = yes; then
  9708. $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
  9709. fi
  9710. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
  9711. $as_echo_n "checking for alloca... " >&6; }
  9712. if ${ac_cv_func_alloca_works+:} false; then :
  9713. $as_echo_n "(cached) " >&6
  9714. else
  9715. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9716. /* end confdefs.h. */
  9717. #ifdef __GNUC__
  9718. # define alloca __builtin_alloca
  9719. #else
  9720. # ifdef _MSC_VER
  9721. # include <malloc.h>
  9722. # define alloca _alloca
  9723. # else
  9724. # ifdef HAVE_ALLOCA_H
  9725. # include <alloca.h>
  9726. # else
  9727. # ifdef _AIX
  9728. #pragma alloca
  9729. # else
  9730. # ifndef alloca /* predefined by HP cc +Olibcalls */
  9731. void *alloca (size_t);
  9732. # endif
  9733. # endif
  9734. # endif
  9735. # endif
  9736. #endif
  9737. int
  9738. main ()
  9739. {
  9740. char *p = (char *) alloca (1);
  9741. if (p) return 0;
  9742. ;
  9743. return 0;
  9744. }
  9745. _ACEOF
  9746. if ac_fn_c_try_link "$LINENO"; then :
  9747. ac_cv_func_alloca_works=yes
  9748. else
  9749. ac_cv_func_alloca_works=no
  9750. fi
  9751. rm -f core conftest.err conftest.$ac_objext \
  9752. conftest$ac_exeext conftest.$ac_ext
  9753. fi
  9754. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
  9755. $as_echo "$ac_cv_func_alloca_works" >&6; }
  9756. if test $ac_cv_func_alloca_works = yes; then
  9757. $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
  9758. else
  9759. # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  9760. # that cause trouble. Some versions do not even contain alloca or
  9761. # contain a buggy version. If you still want to use their alloca,
  9762. # use ar to extract alloca.o from them instead of compiling alloca.c.
  9763. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
  9764. $as_echo "#define C_ALLOCA 1" >>confdefs.h
  9765. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
  9766. $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
  9767. if ${ac_cv_os_cray+:} false; then :
  9768. $as_echo_n "(cached) " >&6
  9769. else
  9770. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9771. /* end confdefs.h. */
  9772. #if defined CRAY && ! defined CRAY2
  9773. webecray
  9774. #else
  9775. wenotbecray
  9776. #endif
  9777. _ACEOF
  9778. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  9779. $EGREP "webecray" >/dev/null 2>&1; then :
  9780. ac_cv_os_cray=yes
  9781. else
  9782. ac_cv_os_cray=no
  9783. fi
  9784. rm -f conftest*
  9785. fi
  9786. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
  9787. $as_echo "$ac_cv_os_cray" >&6; }
  9788. if test $ac_cv_os_cray = yes; then
  9789. for ac_func in _getb67 GETB67 getb67; do
  9790. as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  9791. ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
  9792. if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  9793. cat >>confdefs.h <<_ACEOF
  9794. #define CRAY_STACKSEG_END $ac_func
  9795. _ACEOF
  9796. break
  9797. fi
  9798. done
  9799. fi
  9800. { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
  9801. $as_echo_n "checking stack direction for C alloca... " >&6; }
  9802. if ${ac_cv_c_stack_direction+:} false; then :
  9803. $as_echo_n "(cached) " >&6
  9804. else
  9805. if test "$cross_compiling" = yes; then :
  9806. ac_cv_c_stack_direction=0
  9807. else
  9808. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9809. /* end confdefs.h. */
  9810. $ac_includes_default
  9811. int
  9812. find_stack_direction (int *addr, int depth)
  9813. {
  9814. int dir, dummy = 0;
  9815. if (! addr)
  9816. addr = &dummy;
  9817. *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
  9818. dir = depth ? find_stack_direction (addr, depth - 1) : 0;
  9819. return dir + dummy;
  9820. }
  9821. int
  9822. main (int argc, char **argv)
  9823. {
  9824. return find_stack_direction (0, argc + !argv + 20) < 0;
  9825. }
  9826. _ACEOF
  9827. if ac_fn_c_try_run "$LINENO"; then :
  9828. ac_cv_c_stack_direction=1
  9829. else
  9830. ac_cv_c_stack_direction=-1
  9831. fi
  9832. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  9833. conftest.$ac_objext conftest.beam conftest.$ac_ext
  9834. fi
  9835. fi
  9836. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
  9837. $as_echo "$ac_cv_c_stack_direction" >&6; }
  9838. cat >>confdefs.h <<_ACEOF
  9839. #define STACK_DIRECTION $ac_cv_c_stack_direction
  9840. _ACEOF
  9841. fi
  9842. ac_header_dirent=no
  9843. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
  9844. as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
  9845. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
  9846. $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
  9847. if eval \${$as_ac_Header+:} false; then :
  9848. $as_echo_n "(cached) " >&6
  9849. else
  9850. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9851. /* end confdefs.h. */
  9852. #include <sys/types.h>
  9853. #include <$ac_hdr>
  9854. int
  9855. main ()
  9856. {
  9857. if ((DIR *) 0)
  9858. return 0;
  9859. ;
  9860. return 0;
  9861. }
  9862. _ACEOF
  9863. if ac_fn_c_try_compile "$LINENO"; then :
  9864. eval "$as_ac_Header=yes"
  9865. else
  9866. eval "$as_ac_Header=no"
  9867. fi
  9868. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  9869. fi
  9870. eval ac_res=\$$as_ac_Header
  9871. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  9872. $as_echo "$ac_res" >&6; }
  9873. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  9874. cat >>confdefs.h <<_ACEOF
  9875. #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
  9876. _ACEOF
  9877. ac_header_dirent=$ac_hdr; break
  9878. fi
  9879. done
  9880. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  9881. if test $ac_header_dirent = dirent.h; then
  9882. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
  9883. $as_echo_n "checking for library containing opendir... " >&6; }
  9884. if ${ac_cv_search_opendir+:} false; then :
  9885. $as_echo_n "(cached) " >&6
  9886. else
  9887. ac_func_search_save_LIBS=$LIBS
  9888. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9889. /* end confdefs.h. */
  9890. /* Override any GCC internal prototype to avoid an error.
  9891. Use char because int might match the return type of a GCC
  9892. builtin and then its argument prototype would still apply. */
  9893. #ifdef __cplusplus
  9894. extern "C"
  9895. #endif
  9896. char opendir ();
  9897. int
  9898. main ()
  9899. {
  9900. return opendir ();
  9901. ;
  9902. return 0;
  9903. }
  9904. _ACEOF
  9905. for ac_lib in '' dir; do
  9906. if test -z "$ac_lib"; then
  9907. ac_res="none required"
  9908. else
  9909. ac_res=-l$ac_lib
  9910. LIBS="-l$ac_lib $ac_func_search_save_LIBS"
  9911. fi
  9912. if ac_fn_c_try_link "$LINENO"; then :
  9913. ac_cv_search_opendir=$ac_res
  9914. fi
  9915. rm -f core conftest.err conftest.$ac_objext \
  9916. conftest$ac_exeext
  9917. if ${ac_cv_search_opendir+:} false; then :
  9918. break
  9919. fi
  9920. done
  9921. if ${ac_cv_search_opendir+:} false; then :
  9922. else
  9923. ac_cv_search_opendir=no
  9924. fi
  9925. rm conftest.$ac_ext
  9926. LIBS=$ac_func_search_save_LIBS
  9927. fi
  9928. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
  9929. $as_echo "$ac_cv_search_opendir" >&6; }
  9930. ac_res=$ac_cv_search_opendir
  9931. if test "$ac_res" != no; then :
  9932. test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  9933. fi
  9934. else
  9935. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
  9936. $as_echo_n "checking for library containing opendir... " >&6; }
  9937. if ${ac_cv_search_opendir+:} false; then :
  9938. $as_echo_n "(cached) " >&6
  9939. else
  9940. ac_func_search_save_LIBS=$LIBS
  9941. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9942. /* end confdefs.h. */
  9943. /* Override any GCC internal prototype to avoid an error.
  9944. Use char because int might match the return type of a GCC
  9945. builtin and then its argument prototype would still apply. */
  9946. #ifdef __cplusplus
  9947. extern "C"
  9948. #endif
  9949. char opendir ();
  9950. int
  9951. main ()
  9952. {
  9953. return opendir ();
  9954. ;
  9955. return 0;
  9956. }
  9957. _ACEOF
  9958. for ac_lib in '' x; do
  9959. if test -z "$ac_lib"; then
  9960. ac_res="none required"
  9961. else
  9962. ac_res=-l$ac_lib
  9963. LIBS="-l$ac_lib $ac_func_search_save_LIBS"
  9964. fi
  9965. if ac_fn_c_try_link "$LINENO"; then :
  9966. ac_cv_search_opendir=$ac_res
  9967. fi
  9968. rm -f core conftest.err conftest.$ac_objext \
  9969. conftest$ac_exeext
  9970. if ${ac_cv_search_opendir+:} false; then :
  9971. break
  9972. fi
  9973. done
  9974. if ${ac_cv_search_opendir+:} false; then :
  9975. else
  9976. ac_cv_search_opendir=no
  9977. fi
  9978. rm conftest.$ac_ext
  9979. LIBS=$ac_func_search_save_LIBS
  9980. fi
  9981. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
  9982. $as_echo "$ac_cv_search_opendir" >&6; }
  9983. ac_res=$ac_cv_search_opendir
  9984. if test "$ac_res" != no; then :
  9985. test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  9986. fi
  9987. fi
  9988. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
  9989. $as_echo_n "checking for ANSI C header files... " >&6; }
  9990. if ${ac_cv_header_stdc+:} false; then :
  9991. $as_echo_n "(cached) " >&6
  9992. else
  9993. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9994. /* end confdefs.h. */
  9995. #include <stdlib.h>
  9996. #include <stdarg.h>
  9997. #include <string.h>
  9998. #include <float.h>
  9999. int
  10000. main ()
  10001. {
  10002. ;
  10003. return 0;
  10004. }
  10005. _ACEOF
  10006. if ac_fn_c_try_compile "$LINENO"; then :
  10007. ac_cv_header_stdc=yes
  10008. else
  10009. ac_cv_header_stdc=no
  10010. fi
  10011. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  10012. if test $ac_cv_header_stdc = yes; then
  10013. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  10014. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10015. /* end confdefs.h. */
  10016. #include <string.h>
  10017. _ACEOF
  10018. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  10019. $EGREP "memchr" >/dev/null 2>&1; then :
  10020. else
  10021. ac_cv_header_stdc=no
  10022. fi
  10023. rm -f conftest*
  10024. fi
  10025. if test $ac_cv_header_stdc = yes; then
  10026. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  10027. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10028. /* end confdefs.h. */
  10029. #include <stdlib.h>
  10030. _ACEOF
  10031. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  10032. $EGREP "free" >/dev/null 2>&1; then :
  10033. else
  10034. ac_cv_header_stdc=no
  10035. fi
  10036. rm -f conftest*
  10037. fi
  10038. if test $ac_cv_header_stdc = yes; then
  10039. # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  10040. if test "$cross_compiling" = yes; then :
  10041. :
  10042. else
  10043. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10044. /* end confdefs.h. */
  10045. #include <ctype.h>
  10046. #include <stdlib.h>
  10047. #if ((' ' & 0x0FF) == 0x020)
  10048. # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  10049. # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  10050. #else
  10051. # define ISLOWER(c) \
  10052. (('a' <= (c) && (c) <= 'i') \
  10053. || ('j' <= (c) && (c) <= 'r') \
  10054. || ('s' <= (c) && (c) <= 'z'))
  10055. # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
  10056. #endif
  10057. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  10058. int
  10059. main ()
  10060. {
  10061. int i;
  10062. for (i = 0; i < 256; i++)
  10063. if (XOR (islower (i), ISLOWER (i))
  10064. || toupper (i) != TOUPPER (i))
  10065. return 2;
  10066. return 0;
  10067. }
  10068. _ACEOF
  10069. if ac_fn_c_try_run "$LINENO"; then :
  10070. else
  10071. ac_cv_header_stdc=no
  10072. fi
  10073. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  10074. conftest.$ac_objext conftest.beam conftest.$ac_ext
  10075. fi
  10076. fi
  10077. fi
  10078. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
  10079. $as_echo "$ac_cv_header_stdc" >&6; }
  10080. if test $ac_cv_header_stdc = yes; then
  10081. $as_echo "#define STDC_HEADERS 1" >>confdefs.h
  10082. fi
  10083. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
  10084. $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
  10085. if ${ac_cv_header_sys_wait_h+:} false; then :
  10086. $as_echo_n "(cached) " >&6
  10087. else
  10088. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10089. /* end confdefs.h. */
  10090. #include <sys/types.h>
  10091. #include <sys/wait.h>
  10092. #ifndef WEXITSTATUS
  10093. # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
  10094. #endif
  10095. #ifndef WIFEXITED
  10096. # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
  10097. #endif
  10098. int
  10099. main ()
  10100. {
  10101. int s;
  10102. wait (&s);
  10103. s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  10104. ;
  10105. return 0;
  10106. }
  10107. _ACEOF
  10108. if ac_fn_c_try_compile "$LINENO"; then :
  10109. ac_cv_header_sys_wait_h=yes
  10110. else
  10111. ac_cv_header_sys_wait_h=no
  10112. fi
  10113. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  10114. fi
  10115. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
  10116. $as_echo "$ac_cv_header_sys_wait_h" >&6; }
  10117. if test $ac_cv_header_sys_wait_h = yes; then
  10118. $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
  10119. fi
  10120. for ac_header in 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 syslog.h termios.h unistd.h utime.h arpa/nameser.h sys/io.h
  10121. do :
  10122. as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  10123. ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
  10124. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  10125. cat >>confdefs.h <<_ACEOF
  10126. #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  10127. _ACEOF
  10128. fi
  10129. done
  10130. # Any one of these packages support a mandatory requirement, so we want to check on them as early as possible.
  10131. if test "x${PBX_TERMCAP}" != "x1" -a "${USE_TERMCAP}" != "no"; then
  10132. pbxlibdir=""
  10133. # if --with-TERMCAP=DIR has been specified, use it.
  10134. if test "x${TERMCAP_DIR}" != "x"; then
  10135. if test -d ${TERMCAP_DIR}/lib; then
  10136. pbxlibdir="-L${TERMCAP_DIR}/lib"
  10137. else
  10138. pbxlibdir="-L${TERMCAP_DIR}"
  10139. fi
  10140. fi
  10141. pbxfuncname="tgetent"
  10142. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  10143. AST_TERMCAP_FOUND=yes
  10144. else
  10145. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  10146. CFLAGS="${CFLAGS} "
  10147. as_ac_Lib=`$as_echo "ac_cv_lib_termcap_${pbxfuncname}" | $as_tr_sh`
  10148. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -ltermcap" >&5
  10149. $as_echo_n "checking for ${pbxfuncname} in -ltermcap... " >&6; }
  10150. if eval \${$as_ac_Lib+:} false; then :
  10151. $as_echo_n "(cached) " >&6
  10152. else
  10153. ac_check_lib_save_LIBS=$LIBS
  10154. LIBS="-ltermcap ${pbxlibdir} $LIBS"
  10155. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10156. /* end confdefs.h. */
  10157. /* Override any GCC internal prototype to avoid an error.
  10158. Use char because int might match the return type of a GCC
  10159. builtin and then its argument prototype would still apply. */
  10160. #ifdef __cplusplus
  10161. extern "C"
  10162. #endif
  10163. char ${pbxfuncname} ();
  10164. int
  10165. main ()
  10166. {
  10167. return ${pbxfuncname} ();
  10168. ;
  10169. return 0;
  10170. }
  10171. _ACEOF
  10172. if ac_fn_c_try_link "$LINENO"; then :
  10173. eval "$as_ac_Lib=yes"
  10174. else
  10175. eval "$as_ac_Lib=no"
  10176. fi
  10177. rm -f core conftest.err conftest.$ac_objext \
  10178. conftest$ac_exeext conftest.$ac_ext
  10179. LIBS=$ac_check_lib_save_LIBS
  10180. fi
  10181. eval ac_res=\$$as_ac_Lib
  10182. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  10183. $as_echo "$ac_res" >&6; }
  10184. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  10185. AST_TERMCAP_FOUND=yes
  10186. else
  10187. AST_TERMCAP_FOUND=no
  10188. fi
  10189. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  10190. fi
  10191. # now check for the header.
  10192. if test "${AST_TERMCAP_FOUND}" = "yes"; then
  10193. TERMCAP_LIB="${pbxlibdir} -ltermcap "
  10194. # if --with-TERMCAP=DIR has been specified, use it.
  10195. if test "x${TERMCAP_DIR}" != "x"; then
  10196. TERMCAP_INCLUDE="-I${TERMCAP_DIR}/include"
  10197. fi
  10198. TERMCAP_INCLUDE="${TERMCAP_INCLUDE} "
  10199. if test "x" = "x" ; then # no header, assume found
  10200. TERMCAP_HEADER_FOUND="1"
  10201. else # check for the header
  10202. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  10203. CPPFLAGS="${CPPFLAGS} ${TERMCAP_INCLUDE}"
  10204. ac_fn_c_check_header_mongrel "$LINENO" "" "ac_cv_header_" "$ac_includes_default"
  10205. if test "x$ac_cv_header_" = xyes; then :
  10206. TERMCAP_HEADER_FOUND=1
  10207. else
  10208. TERMCAP_HEADER_FOUND=0
  10209. fi
  10210. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  10211. fi
  10212. if test "x${TERMCAP_HEADER_FOUND}" = "x0" ; then
  10213. TERMCAP_LIB=""
  10214. TERMCAP_INCLUDE=""
  10215. else
  10216. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  10217. TERMCAP_LIB=""
  10218. fi
  10219. PBX_TERMCAP=1
  10220. cat >>confdefs.h <<_ACEOF
  10221. #define HAVE_TERMCAP 1
  10222. _ACEOF
  10223. fi
  10224. fi
  10225. fi
  10226. if test "x${PBX_TINFO}" != "x1" -a "${USE_TINFO}" != "no"; then
  10227. pbxlibdir=""
  10228. # if --with-TINFO=DIR has been specified, use it.
  10229. if test "x${TINFO_DIR}" != "x"; then
  10230. if test -d ${TINFO_DIR}/lib; then
  10231. pbxlibdir="-L${TINFO_DIR}/lib"
  10232. else
  10233. pbxlibdir="-L${TINFO_DIR}"
  10234. fi
  10235. fi
  10236. pbxfuncname="tgetent"
  10237. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  10238. AST_TINFO_FOUND=yes
  10239. else
  10240. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  10241. CFLAGS="${CFLAGS} "
  10242. as_ac_Lib=`$as_echo "ac_cv_lib_tinfo_${pbxfuncname}" | $as_tr_sh`
  10243. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -ltinfo" >&5
  10244. $as_echo_n "checking for ${pbxfuncname} in -ltinfo... " >&6; }
  10245. if eval \${$as_ac_Lib+:} false; then :
  10246. $as_echo_n "(cached) " >&6
  10247. else
  10248. ac_check_lib_save_LIBS=$LIBS
  10249. LIBS="-ltinfo ${pbxlibdir} $LIBS"
  10250. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10251. /* end confdefs.h. */
  10252. /* Override any GCC internal prototype to avoid an error.
  10253. Use char because int might match the return type of a GCC
  10254. builtin and then its argument prototype would still apply. */
  10255. #ifdef __cplusplus
  10256. extern "C"
  10257. #endif
  10258. char ${pbxfuncname} ();
  10259. int
  10260. main ()
  10261. {
  10262. return ${pbxfuncname} ();
  10263. ;
  10264. return 0;
  10265. }
  10266. _ACEOF
  10267. if ac_fn_c_try_link "$LINENO"; then :
  10268. eval "$as_ac_Lib=yes"
  10269. else
  10270. eval "$as_ac_Lib=no"
  10271. fi
  10272. rm -f core conftest.err conftest.$ac_objext \
  10273. conftest$ac_exeext conftest.$ac_ext
  10274. LIBS=$ac_check_lib_save_LIBS
  10275. fi
  10276. eval ac_res=\$$as_ac_Lib
  10277. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  10278. $as_echo "$ac_res" >&6; }
  10279. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  10280. AST_TINFO_FOUND=yes
  10281. else
  10282. AST_TINFO_FOUND=no
  10283. fi
  10284. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  10285. fi
  10286. # now check for the header.
  10287. if test "${AST_TINFO_FOUND}" = "yes"; then
  10288. TINFO_LIB="${pbxlibdir} -ltinfo "
  10289. # if --with-TINFO=DIR has been specified, use it.
  10290. if test "x${TINFO_DIR}" != "x"; then
  10291. TINFO_INCLUDE="-I${TINFO_DIR}/include"
  10292. fi
  10293. TINFO_INCLUDE="${TINFO_INCLUDE} "
  10294. if test "x" = "x" ; then # no header, assume found
  10295. TINFO_HEADER_FOUND="1"
  10296. else # check for the header
  10297. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  10298. CPPFLAGS="${CPPFLAGS} ${TINFO_INCLUDE}"
  10299. ac_fn_c_check_header_mongrel "$LINENO" "" "ac_cv_header_" "$ac_includes_default"
  10300. if test "x$ac_cv_header_" = xyes; then :
  10301. TINFO_HEADER_FOUND=1
  10302. else
  10303. TINFO_HEADER_FOUND=0
  10304. fi
  10305. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  10306. fi
  10307. if test "x${TINFO_HEADER_FOUND}" = "x0" ; then
  10308. TINFO_LIB=""
  10309. TINFO_INCLUDE=""
  10310. else
  10311. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  10312. TINFO_LIB=""
  10313. fi
  10314. PBX_TINFO=1
  10315. cat >>confdefs.h <<_ACEOF
  10316. #define HAVE_TINFO 1
  10317. _ACEOF
  10318. fi
  10319. fi
  10320. fi
  10321. if test "x${PBX_CURSES}" != "x1" -a "${USE_CURSES}" != "no"; then
  10322. pbxlibdir=""
  10323. # if --with-CURSES=DIR has been specified, use it.
  10324. if test "x${CURSES_DIR}" != "x"; then
  10325. if test -d ${CURSES_DIR}/lib; then
  10326. pbxlibdir="-L${CURSES_DIR}/lib"
  10327. else
  10328. pbxlibdir="-L${CURSES_DIR}"
  10329. fi
  10330. fi
  10331. pbxfuncname="initscr"
  10332. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  10333. AST_CURSES_FOUND=yes
  10334. else
  10335. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  10336. CFLAGS="${CFLAGS} "
  10337. as_ac_Lib=`$as_echo "ac_cv_lib_curses_${pbxfuncname}" | $as_tr_sh`
  10338. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lcurses" >&5
  10339. $as_echo_n "checking for ${pbxfuncname} in -lcurses... " >&6; }
  10340. if eval \${$as_ac_Lib+:} false; then :
  10341. $as_echo_n "(cached) " >&6
  10342. else
  10343. ac_check_lib_save_LIBS=$LIBS
  10344. LIBS="-lcurses ${pbxlibdir} $LIBS"
  10345. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10346. /* end confdefs.h. */
  10347. /* Override any GCC internal prototype to avoid an error.
  10348. Use char because int might match the return type of a GCC
  10349. builtin and then its argument prototype would still apply. */
  10350. #ifdef __cplusplus
  10351. extern "C"
  10352. #endif
  10353. char ${pbxfuncname} ();
  10354. int
  10355. main ()
  10356. {
  10357. return ${pbxfuncname} ();
  10358. ;
  10359. return 0;
  10360. }
  10361. _ACEOF
  10362. if ac_fn_c_try_link "$LINENO"; then :
  10363. eval "$as_ac_Lib=yes"
  10364. else
  10365. eval "$as_ac_Lib=no"
  10366. fi
  10367. rm -f core conftest.err conftest.$ac_objext \
  10368. conftest$ac_exeext conftest.$ac_ext
  10369. LIBS=$ac_check_lib_save_LIBS
  10370. fi
  10371. eval ac_res=\$$as_ac_Lib
  10372. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  10373. $as_echo "$ac_res" >&6; }
  10374. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  10375. AST_CURSES_FOUND=yes
  10376. else
  10377. AST_CURSES_FOUND=no
  10378. fi
  10379. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  10380. fi
  10381. # now check for the header.
  10382. if test "${AST_CURSES_FOUND}" = "yes"; then
  10383. CURSES_LIB="${pbxlibdir} -lcurses "
  10384. # if --with-CURSES=DIR has been specified, use it.
  10385. if test "x${CURSES_DIR}" != "x"; then
  10386. CURSES_INCLUDE="-I${CURSES_DIR}/include"
  10387. fi
  10388. CURSES_INCLUDE="${CURSES_INCLUDE} "
  10389. if test "xcurses.h" = "x" ; then # no header, assume found
  10390. CURSES_HEADER_FOUND="1"
  10391. else # check for the header
  10392. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  10393. CPPFLAGS="${CPPFLAGS} ${CURSES_INCLUDE}"
  10394. ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default"
  10395. if test "x$ac_cv_header_curses_h" = xyes; then :
  10396. CURSES_HEADER_FOUND=1
  10397. else
  10398. CURSES_HEADER_FOUND=0
  10399. fi
  10400. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  10401. fi
  10402. if test "x${CURSES_HEADER_FOUND}" = "x0" ; then
  10403. CURSES_LIB=""
  10404. CURSES_INCLUDE=""
  10405. else
  10406. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  10407. CURSES_LIB=""
  10408. fi
  10409. PBX_CURSES=1
  10410. cat >>confdefs.h <<_ACEOF
  10411. #define HAVE_CURSES 1
  10412. _ACEOF
  10413. fi
  10414. fi
  10415. fi
  10416. if test "x${PBX_NCURSES}" != "x1" -a "${USE_NCURSES}" != "no"; then
  10417. pbxlibdir=""
  10418. # if --with-NCURSES=DIR has been specified, use it.
  10419. if test "x${NCURSES_DIR}" != "x"; then
  10420. if test -d ${NCURSES_DIR}/lib; then
  10421. pbxlibdir="-L${NCURSES_DIR}/lib"
  10422. else
  10423. pbxlibdir="-L${NCURSES_DIR}"
  10424. fi
  10425. fi
  10426. pbxfuncname="initscr"
  10427. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  10428. AST_NCURSES_FOUND=yes
  10429. else
  10430. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  10431. CFLAGS="${CFLAGS} "
  10432. as_ac_Lib=`$as_echo "ac_cv_lib_ncurses_${pbxfuncname}" | $as_tr_sh`
  10433. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lncurses" >&5
  10434. $as_echo_n "checking for ${pbxfuncname} in -lncurses... " >&6; }
  10435. if eval \${$as_ac_Lib+:} false; then :
  10436. $as_echo_n "(cached) " >&6
  10437. else
  10438. ac_check_lib_save_LIBS=$LIBS
  10439. LIBS="-lncurses ${pbxlibdir} $LIBS"
  10440. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10441. /* end confdefs.h. */
  10442. /* Override any GCC internal prototype to avoid an error.
  10443. Use char because int might match the return type of a GCC
  10444. builtin and then its argument prototype would still apply. */
  10445. #ifdef __cplusplus
  10446. extern "C"
  10447. #endif
  10448. char ${pbxfuncname} ();
  10449. int
  10450. main ()
  10451. {
  10452. return ${pbxfuncname} ();
  10453. ;
  10454. return 0;
  10455. }
  10456. _ACEOF
  10457. if ac_fn_c_try_link "$LINENO"; then :
  10458. eval "$as_ac_Lib=yes"
  10459. else
  10460. eval "$as_ac_Lib=no"
  10461. fi
  10462. rm -f core conftest.err conftest.$ac_objext \
  10463. conftest$ac_exeext conftest.$ac_ext
  10464. LIBS=$ac_check_lib_save_LIBS
  10465. fi
  10466. eval ac_res=\$$as_ac_Lib
  10467. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  10468. $as_echo "$ac_res" >&6; }
  10469. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  10470. AST_NCURSES_FOUND=yes
  10471. else
  10472. AST_NCURSES_FOUND=no
  10473. fi
  10474. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  10475. fi
  10476. # now check for the header.
  10477. if test "${AST_NCURSES_FOUND}" = "yes"; then
  10478. NCURSES_LIB="${pbxlibdir} -lncurses "
  10479. # if --with-NCURSES=DIR has been specified, use it.
  10480. if test "x${NCURSES_DIR}" != "x"; then
  10481. NCURSES_INCLUDE="-I${NCURSES_DIR}/include"
  10482. fi
  10483. NCURSES_INCLUDE="${NCURSES_INCLUDE} "
  10484. if test "xcurses.h" = "x" ; then # no header, assume found
  10485. NCURSES_HEADER_FOUND="1"
  10486. else # check for the header
  10487. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  10488. CPPFLAGS="${CPPFLAGS} ${NCURSES_INCLUDE}"
  10489. ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default"
  10490. if test "x$ac_cv_header_curses_h" = xyes; then :
  10491. NCURSES_HEADER_FOUND=1
  10492. else
  10493. NCURSES_HEADER_FOUND=0
  10494. fi
  10495. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  10496. fi
  10497. if test "x${NCURSES_HEADER_FOUND}" = "x0" ; then
  10498. NCURSES_LIB=""
  10499. NCURSES_INCLUDE=""
  10500. else
  10501. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  10502. NCURSES_LIB=""
  10503. fi
  10504. PBX_NCURSES=1
  10505. cat >>confdefs.h <<_ACEOF
  10506. #define HAVE_NCURSES 1
  10507. _ACEOF
  10508. fi
  10509. fi
  10510. fi
  10511. EDITLINE_LIB=""
  10512. if test "x$TERMCAP_LIB" != "x" ; then
  10513. EDITLINE_LIB="$TERMCAP_LIB"
  10514. elif test "x$TINFO_LIB" != "x" ; then
  10515. EDITLINE_LIB="$TINFO_LIB"
  10516. elif test "x$CURSES_LIB" != "x" ; then
  10517. EDITLINE_LIB="$CURSES_LIB"
  10518. elif test "x$NCURSES_LIB" != "x" ; then
  10519. EDITLINE_LIB="$NCURSES_LIB"
  10520. else
  10521. as_fn_error $? "*** termcap support not found (on modern systems, this typically means the ncurses development package is missing)" "$LINENO" 5
  10522. fi
  10523. # Find required UUID support.
  10524. # * -luuid on Linux
  10525. # * -le2fs-uuid on OpenBSD
  10526. # * in libsystem on OS X
  10527. if test "x${PBX_LIBUUID}" != "x1" -a "${USE_LIBUUID}" != "no"; then
  10528. pbxlibdir=""
  10529. # if --with-LIBUUID=DIR has been specified, use it.
  10530. if test "x${LIBUUID_DIR}" != "x"; then
  10531. if test -d ${LIBUUID_DIR}/lib; then
  10532. pbxlibdir="-L${LIBUUID_DIR}/lib"
  10533. else
  10534. pbxlibdir="-L${LIBUUID_DIR}"
  10535. fi
  10536. fi
  10537. pbxfuncname="uuid_generate_random"
  10538. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  10539. AST_LIBUUID_FOUND=yes
  10540. else
  10541. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  10542. CFLAGS="${CFLAGS} "
  10543. as_ac_Lib=`$as_echo "ac_cv_lib_uuid_${pbxfuncname}" | $as_tr_sh`
  10544. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -luuid" >&5
  10545. $as_echo_n "checking for ${pbxfuncname} in -luuid... " >&6; }
  10546. if eval \${$as_ac_Lib+:} false; then :
  10547. $as_echo_n "(cached) " >&6
  10548. else
  10549. ac_check_lib_save_LIBS=$LIBS
  10550. LIBS="-luuid ${pbxlibdir} $LIBS"
  10551. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10552. /* end confdefs.h. */
  10553. /* Override any GCC internal prototype to avoid an error.
  10554. Use char because int might match the return type of a GCC
  10555. builtin and then its argument prototype would still apply. */
  10556. #ifdef __cplusplus
  10557. extern "C"
  10558. #endif
  10559. char ${pbxfuncname} ();
  10560. int
  10561. main ()
  10562. {
  10563. return ${pbxfuncname} ();
  10564. ;
  10565. return 0;
  10566. }
  10567. _ACEOF
  10568. if ac_fn_c_try_link "$LINENO"; then :
  10569. eval "$as_ac_Lib=yes"
  10570. else
  10571. eval "$as_ac_Lib=no"
  10572. fi
  10573. rm -f core conftest.err conftest.$ac_objext \
  10574. conftest$ac_exeext conftest.$ac_ext
  10575. LIBS=$ac_check_lib_save_LIBS
  10576. fi
  10577. eval ac_res=\$$as_ac_Lib
  10578. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  10579. $as_echo "$ac_res" >&6; }
  10580. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  10581. AST_LIBUUID_FOUND=yes
  10582. else
  10583. AST_LIBUUID_FOUND=no
  10584. fi
  10585. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  10586. fi
  10587. # now check for the header.
  10588. if test "${AST_LIBUUID_FOUND}" = "yes"; then
  10589. LIBUUID_LIB="${pbxlibdir} -luuid "
  10590. # if --with-LIBUUID=DIR has been specified, use it.
  10591. if test "x${LIBUUID_DIR}" != "x"; then
  10592. LIBUUID_INCLUDE="-I${LIBUUID_DIR}/include"
  10593. fi
  10594. LIBUUID_INCLUDE="${LIBUUID_INCLUDE} "
  10595. if test "xuuid/uuid.h" = "x" ; then # no header, assume found
  10596. LIBUUID_HEADER_FOUND="1"
  10597. else # check for the header
  10598. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  10599. CPPFLAGS="${CPPFLAGS} ${LIBUUID_INCLUDE}"
  10600. ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
  10601. if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
  10602. LIBUUID_HEADER_FOUND=1
  10603. else
  10604. LIBUUID_HEADER_FOUND=0
  10605. fi
  10606. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  10607. fi
  10608. if test "x${LIBUUID_HEADER_FOUND}" = "x0" ; then
  10609. LIBUUID_LIB=""
  10610. LIBUUID_INCLUDE=""
  10611. else
  10612. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  10613. LIBUUID_LIB=""
  10614. fi
  10615. PBX_LIBUUID=1
  10616. cat >>confdefs.h <<_ACEOF
  10617. #define HAVE_LIBUUID 1
  10618. _ACEOF
  10619. fi
  10620. fi
  10621. fi
  10622. if test "x${PBX_E2FSUUID}" != "x1" -a "${USE_E2FSUUID}" != "no"; then
  10623. pbxlibdir=""
  10624. # if --with-E2FSUUID=DIR has been specified, use it.
  10625. if test "x${E2FSUUID_DIR}" != "x"; then
  10626. if test -d ${E2FSUUID_DIR}/lib; then
  10627. pbxlibdir="-L${E2FSUUID_DIR}/lib"
  10628. else
  10629. pbxlibdir="-L${E2FSUUID_DIR}"
  10630. fi
  10631. fi
  10632. pbxfuncname="uuid_generate_random"
  10633. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  10634. AST_E2FSUUID_FOUND=yes
  10635. else
  10636. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  10637. CFLAGS="${CFLAGS} "
  10638. as_ac_Lib=`$as_echo "ac_cv_lib_e2fs-uuid_${pbxfuncname}" | $as_tr_sh`
  10639. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -le2fs-uuid" >&5
  10640. $as_echo_n "checking for ${pbxfuncname} in -le2fs-uuid... " >&6; }
  10641. if eval \${$as_ac_Lib+:} false; then :
  10642. $as_echo_n "(cached) " >&6
  10643. else
  10644. ac_check_lib_save_LIBS=$LIBS
  10645. LIBS="-le2fs-uuid ${pbxlibdir} $LIBS"
  10646. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10647. /* end confdefs.h. */
  10648. /* Override any GCC internal prototype to avoid an error.
  10649. Use char because int might match the return type of a GCC
  10650. builtin and then its argument prototype would still apply. */
  10651. #ifdef __cplusplus
  10652. extern "C"
  10653. #endif
  10654. char ${pbxfuncname} ();
  10655. int
  10656. main ()
  10657. {
  10658. return ${pbxfuncname} ();
  10659. ;
  10660. return 0;
  10661. }
  10662. _ACEOF
  10663. if ac_fn_c_try_link "$LINENO"; then :
  10664. eval "$as_ac_Lib=yes"
  10665. else
  10666. eval "$as_ac_Lib=no"
  10667. fi
  10668. rm -f core conftest.err conftest.$ac_objext \
  10669. conftest$ac_exeext conftest.$ac_ext
  10670. LIBS=$ac_check_lib_save_LIBS
  10671. fi
  10672. eval ac_res=\$$as_ac_Lib
  10673. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  10674. $as_echo "$ac_res" >&6; }
  10675. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  10676. AST_E2FSUUID_FOUND=yes
  10677. else
  10678. AST_E2FSUUID_FOUND=no
  10679. fi
  10680. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  10681. fi
  10682. # now check for the header.
  10683. if test "${AST_E2FSUUID_FOUND}" = "yes"; then
  10684. E2FSUUID_LIB="${pbxlibdir} -le2fs-uuid "
  10685. # if --with-E2FSUUID=DIR has been specified, use it.
  10686. if test "x${E2FSUUID_DIR}" != "x"; then
  10687. E2FSUUID_INCLUDE="-I${E2FSUUID_DIR}/include"
  10688. fi
  10689. E2FSUUID_INCLUDE="${E2FSUUID_INCLUDE} "
  10690. if test "xuuid/uuid.h" = "x" ; then # no header, assume found
  10691. E2FSUUID_HEADER_FOUND="1"
  10692. else # check for the header
  10693. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  10694. CPPFLAGS="${CPPFLAGS} ${E2FSUUID_INCLUDE}"
  10695. ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
  10696. if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
  10697. E2FSUUID_HEADER_FOUND=1
  10698. else
  10699. E2FSUUID_HEADER_FOUND=0
  10700. fi
  10701. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  10702. fi
  10703. if test "x${E2FSUUID_HEADER_FOUND}" = "x0" ; then
  10704. E2FSUUID_LIB=""
  10705. E2FSUUID_INCLUDE=""
  10706. else
  10707. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  10708. E2FSUUID_LIB=""
  10709. fi
  10710. PBX_E2FSUUID=1
  10711. cat >>confdefs.h <<_ACEOF
  10712. #define HAVE_E2FSUUID 1
  10713. _ACEOF
  10714. fi
  10715. fi
  10716. fi
  10717. for ac_func in uuid_generate_random
  10718. do :
  10719. ac_fn_c_check_func "$LINENO" "uuid_generate_random" "ac_cv_func_uuid_generate_random"
  10720. if test "x$ac_cv_func_uuid_generate_random" = xyes; then :
  10721. cat >>confdefs.h <<_ACEOF
  10722. #define HAVE_UUID_GENERATE_RANDOM 1
  10723. _ACEOF
  10724. SYSUUID=true
  10725. else
  10726. SYSUUID=""
  10727. fi
  10728. done
  10729. if test "x$LIBUUID_LIB" != "x" ; then
  10730. UUID_INCLUDE="$LIBUUID_INCLUDE"
  10731. UUID_LIB="$LIBUUID_LIB"
  10732. elif test "x$E2FSUUID_LIB" != "x" ; then
  10733. UUID_INCLUDE="$E2FSUUID_INCLUDE"
  10734. UUID_LIB="$E2FSUUID_LIB"
  10735. elif test "x$SYSUUID" != "x" ; then
  10736. UUID_INCLUDE=""
  10737. UUID_LIB=""
  10738. else
  10739. as_fn_error $? "*** uuid support not found (this typically means the uuid development package is missing)" "$LINENO" 5
  10740. fi
  10741. # Find required JSON support.
  10742. if test "x${PBX_JANSSON}" != "x1" -a "${USE_JANSSON}" != "no"; then
  10743. pbxlibdir=""
  10744. # if --with-JANSSON=DIR has been specified, use it.
  10745. if test "x${JANSSON_DIR}" != "x"; then
  10746. if test -d ${JANSSON_DIR}/lib; then
  10747. pbxlibdir="-L${JANSSON_DIR}/lib"
  10748. else
  10749. pbxlibdir="-L${JANSSON_DIR}"
  10750. fi
  10751. fi
  10752. pbxfuncname="json_dumps"
  10753. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  10754. AST_JANSSON_FOUND=yes
  10755. else
  10756. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  10757. CFLAGS="${CFLAGS} "
  10758. as_ac_Lib=`$as_echo "ac_cv_lib_jansson_${pbxfuncname}" | $as_tr_sh`
  10759. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -ljansson" >&5
  10760. $as_echo_n "checking for ${pbxfuncname} in -ljansson... " >&6; }
  10761. if eval \${$as_ac_Lib+:} false; then :
  10762. $as_echo_n "(cached) " >&6
  10763. else
  10764. ac_check_lib_save_LIBS=$LIBS
  10765. LIBS="-ljansson ${pbxlibdir} $LIBS"
  10766. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10767. /* end confdefs.h. */
  10768. /* Override any GCC internal prototype to avoid an error.
  10769. Use char because int might match the return type of a GCC
  10770. builtin and then its argument prototype would still apply. */
  10771. #ifdef __cplusplus
  10772. extern "C"
  10773. #endif
  10774. char ${pbxfuncname} ();
  10775. int
  10776. main ()
  10777. {
  10778. return ${pbxfuncname} ();
  10779. ;
  10780. return 0;
  10781. }
  10782. _ACEOF
  10783. if ac_fn_c_try_link "$LINENO"; then :
  10784. eval "$as_ac_Lib=yes"
  10785. else
  10786. eval "$as_ac_Lib=no"
  10787. fi
  10788. rm -f core conftest.err conftest.$ac_objext \
  10789. conftest$ac_exeext conftest.$ac_ext
  10790. LIBS=$ac_check_lib_save_LIBS
  10791. fi
  10792. eval ac_res=\$$as_ac_Lib
  10793. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  10794. $as_echo "$ac_res" >&6; }
  10795. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  10796. AST_JANSSON_FOUND=yes
  10797. else
  10798. AST_JANSSON_FOUND=no
  10799. fi
  10800. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  10801. fi
  10802. # now check for the header.
  10803. if test "${AST_JANSSON_FOUND}" = "yes"; then
  10804. JANSSON_LIB="${pbxlibdir} -ljansson "
  10805. # if --with-JANSSON=DIR has been specified, use it.
  10806. if test "x${JANSSON_DIR}" != "x"; then
  10807. JANSSON_INCLUDE="-I${JANSSON_DIR}/include"
  10808. fi
  10809. JANSSON_INCLUDE="${JANSSON_INCLUDE} "
  10810. if test "xjansson.h" = "x" ; then # no header, assume found
  10811. JANSSON_HEADER_FOUND="1"
  10812. else # check for the header
  10813. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  10814. CPPFLAGS="${CPPFLAGS} ${JANSSON_INCLUDE}"
  10815. ac_fn_c_check_header_mongrel "$LINENO" "jansson.h" "ac_cv_header_jansson_h" "$ac_includes_default"
  10816. if test "x$ac_cv_header_jansson_h" = xyes; then :
  10817. JANSSON_HEADER_FOUND=1
  10818. else
  10819. JANSSON_HEADER_FOUND=0
  10820. fi
  10821. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  10822. fi
  10823. if test "x${JANSSON_HEADER_FOUND}" = "x0" ; then
  10824. JANSSON_LIB=""
  10825. JANSSON_INCLUDE=""
  10826. else
  10827. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  10828. JANSSON_LIB=""
  10829. fi
  10830. PBX_JANSSON=1
  10831. cat >>confdefs.h <<_ACEOF
  10832. #define HAVE_JANSSON 1
  10833. _ACEOF
  10834. fi
  10835. fi
  10836. fi
  10837. if test "x$JANSSON_LIB" == "x"; then
  10838. as_fn_error $? "*** JSON support not found (this typically means the libjansson development package is missing)" "$LINENO" 5
  10839. fi
  10840. if test "x${PBX_LIBXML2}" != "x1" -a "${USE_LIBXML2}" != "no"; then
  10841. PBX_LIBXML2=0
  10842. if test -n "$ac_tool_prefix"; then
  10843. # Extract the first word of "${ac_tool_prefix}xml2-config", so it can be a program name with args.
  10844. set dummy ${ac_tool_prefix}xml2-config; ac_word=$2
  10845. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  10846. $as_echo_n "checking for $ac_word... " >&6; }
  10847. if ${ac_cv_path_CONFIG_LIBXML2+:} false; then :
  10848. $as_echo_n "(cached) " >&6
  10849. else
  10850. case $CONFIG_LIBXML2 in
  10851. [\\/]* | ?:[\\/]*)
  10852. ac_cv_path_CONFIG_LIBXML2="$CONFIG_LIBXML2" # Let the user override the test with a path.
  10853. ;;
  10854. *)
  10855. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  10856. as_dummy="${LIBXML2_DIR}/bin:$PATH"
  10857. for as_dir in $as_dummy
  10858. do
  10859. IFS=$as_save_IFS
  10860. test -z "$as_dir" && as_dir=.
  10861. for ac_exec_ext in '' $ac_executable_extensions; do
  10862. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  10863. ac_cv_path_CONFIG_LIBXML2="$as_dir/$ac_word$ac_exec_ext"
  10864. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  10865. break 2
  10866. fi
  10867. done
  10868. done
  10869. IFS=$as_save_IFS
  10870. ;;
  10871. esac
  10872. fi
  10873. CONFIG_LIBXML2=$ac_cv_path_CONFIG_LIBXML2
  10874. if test -n "$CONFIG_LIBXML2"; then
  10875. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONFIG_LIBXML2" >&5
  10876. $as_echo "$CONFIG_LIBXML2" >&6; }
  10877. else
  10878. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  10879. $as_echo "no" >&6; }
  10880. fi
  10881. fi
  10882. if test -z "$ac_cv_path_CONFIG_LIBXML2"; then
  10883. ac_pt_CONFIG_LIBXML2=$CONFIG_LIBXML2
  10884. # Extract the first word of "xml2-config", so it can be a program name with args.
  10885. set dummy xml2-config; ac_word=$2
  10886. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  10887. $as_echo_n "checking for $ac_word... " >&6; }
  10888. if ${ac_cv_path_ac_pt_CONFIG_LIBXML2+:} false; then :
  10889. $as_echo_n "(cached) " >&6
  10890. else
  10891. case $ac_pt_CONFIG_LIBXML2 in
  10892. [\\/]* | ?:[\\/]*)
  10893. ac_cv_path_ac_pt_CONFIG_LIBXML2="$ac_pt_CONFIG_LIBXML2" # Let the user override the test with a path.
  10894. ;;
  10895. *)
  10896. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  10897. as_dummy="${LIBXML2_DIR}/bin:$PATH"
  10898. for as_dir in $as_dummy
  10899. do
  10900. IFS=$as_save_IFS
  10901. test -z "$as_dir" && as_dir=.
  10902. for ac_exec_ext in '' $ac_executable_extensions; do
  10903. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  10904. ac_cv_path_ac_pt_CONFIG_LIBXML2="$as_dir/$ac_word$ac_exec_ext"
  10905. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  10906. break 2
  10907. fi
  10908. done
  10909. done
  10910. IFS=$as_save_IFS
  10911. ;;
  10912. esac
  10913. fi
  10914. ac_pt_CONFIG_LIBXML2=$ac_cv_path_ac_pt_CONFIG_LIBXML2
  10915. if test -n "$ac_pt_CONFIG_LIBXML2"; then
  10916. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CONFIG_LIBXML2" >&5
  10917. $as_echo "$ac_pt_CONFIG_LIBXML2" >&6; }
  10918. else
  10919. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  10920. $as_echo "no" >&6; }
  10921. fi
  10922. if test "x$ac_pt_CONFIG_LIBXML2" = x; then
  10923. CONFIG_LIBXML2="No"
  10924. else
  10925. case $cross_compiling:$ac_tool_warned in
  10926. yes:)
  10927. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  10928. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  10929. ac_tool_warned=yes ;;
  10930. esac
  10931. CONFIG_LIBXML2=$ac_pt_CONFIG_LIBXML2
  10932. fi
  10933. else
  10934. CONFIG_LIBXML2="$ac_cv_path_CONFIG_LIBXML2"
  10935. fi
  10936. if test ! "x${CONFIG_LIBXML2}" = xNo; then
  10937. if test x"" = x ; then A=--cflags ; else A="" ; fi
  10938. LIBXML2_INCLUDE=$(${CONFIG_LIBXML2} $A)
  10939. LIBXML2_INCLUDE=$(echo ${LIBXML2_INCLUDE} | $SED -e "s|-I|-I${LIBXML2_DIR}|g")
  10940. if test x"" = x ; then A=--libs ; else A="" ; fi
  10941. LIBXML2_LIB=$(${CONFIG_LIBXML2} $A)
  10942. LIBXML2_LIB=$(echo ${LIBXML2_LIB} | $SED -e "s|-L|-L${LIBXML2_DIR}|g")
  10943. if test x"#include <libxml/tree.h>
  10944. #include <libxml/parser.h>" != x ; then
  10945. saved_cppflags="${CPPFLAGS}"
  10946. CPPFLAGS="${CPPFLAGS} ${LIBXML2_INCLUDE}"
  10947. saved_libs="${LIBS}"
  10948. LIBS=${LIBXML2_LIB}
  10949. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10950. /* end confdefs.h. */
  10951. #include <libxml/tree.h>
  10952. #include <libxml/parser.h>
  10953. int
  10954. main ()
  10955. {
  10956. LIBXML_TEST_VERSION;
  10957. ;
  10958. return 0;
  10959. }
  10960. _ACEOF
  10961. if ac_fn_c_try_link "$LINENO"; then :
  10962. PBX_LIBXML2=1
  10963. $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
  10964. fi
  10965. rm -f core conftest.err conftest.$ac_objext \
  10966. conftest$ac_exeext conftest.$ac_ext
  10967. CPPFLAGS="${saved_cppflags}"
  10968. LIBS="${saved_libs}"
  10969. else
  10970. PBX_LIBXML2=1
  10971. $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
  10972. fi
  10973. fi
  10974. fi
  10975. if test "${PBX_LIBXML2}" != 1; then
  10976. { $as_echo "$as_me:${as_lineno-$LINENO}: *** The Asterisk menuselect tool requires the 'libxml2' development package." >&5
  10977. $as_echo "$as_me: *** The Asterisk menuselect tool requires the 'libxml2' development package." >&6;}
  10978. { $as_echo "$as_me:${as_lineno-$LINENO}: *** Please install the 'libxml2' development package." >&5
  10979. $as_echo "$as_me: *** Please install the 'libxml2' development package." >&6;}
  10980. exit 1
  10981. fi
  10982. if test "x${PBX_URIPARSER}" != "x1" -a "${USE_URIPARSER}" != "no"; then
  10983. pbxlibdir=""
  10984. # if --with-URIPARSER=DIR has been specified, use it.
  10985. if test "x${URIPARSER_DIR}" != "x"; then
  10986. if test -d ${URIPARSER_DIR}/lib; then
  10987. pbxlibdir="-L${URIPARSER_DIR}/lib"
  10988. else
  10989. pbxlibdir="-L${URIPARSER_DIR}"
  10990. fi
  10991. fi
  10992. pbxfuncname="uriParseUriA"
  10993. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  10994. AST_URIPARSER_FOUND=yes
  10995. else
  10996. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  10997. CFLAGS="${CFLAGS} "
  10998. as_ac_Lib=`$as_echo "ac_cv_lib_uriparser_${pbxfuncname}" | $as_tr_sh`
  10999. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -luriparser" >&5
  11000. $as_echo_n "checking for ${pbxfuncname} in -luriparser... " >&6; }
  11001. if eval \${$as_ac_Lib+:} false; then :
  11002. $as_echo_n "(cached) " >&6
  11003. else
  11004. ac_check_lib_save_LIBS=$LIBS
  11005. LIBS="-luriparser ${pbxlibdir} $LIBS"
  11006. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11007. /* end confdefs.h. */
  11008. /* Override any GCC internal prototype to avoid an error.
  11009. Use char because int might match the return type of a GCC
  11010. builtin and then its argument prototype would still apply. */
  11011. #ifdef __cplusplus
  11012. extern "C"
  11013. #endif
  11014. char ${pbxfuncname} ();
  11015. int
  11016. main ()
  11017. {
  11018. return ${pbxfuncname} ();
  11019. ;
  11020. return 0;
  11021. }
  11022. _ACEOF
  11023. if ac_fn_c_try_link "$LINENO"; then :
  11024. eval "$as_ac_Lib=yes"
  11025. else
  11026. eval "$as_ac_Lib=no"
  11027. fi
  11028. rm -f core conftest.err conftest.$ac_objext \
  11029. conftest$ac_exeext conftest.$ac_ext
  11030. LIBS=$ac_check_lib_save_LIBS
  11031. fi
  11032. eval ac_res=\$$as_ac_Lib
  11033. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  11034. $as_echo "$ac_res" >&6; }
  11035. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  11036. AST_URIPARSER_FOUND=yes
  11037. else
  11038. AST_URIPARSER_FOUND=no
  11039. fi
  11040. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  11041. fi
  11042. # now check for the header.
  11043. if test "${AST_URIPARSER_FOUND}" = "yes"; then
  11044. URIPARSER_LIB="${pbxlibdir} -luriparser "
  11045. # if --with-URIPARSER=DIR has been specified, use it.
  11046. if test "x${URIPARSER_DIR}" != "x"; then
  11047. URIPARSER_INCLUDE="-I${URIPARSER_DIR}/include"
  11048. fi
  11049. URIPARSER_INCLUDE="${URIPARSER_INCLUDE} "
  11050. if test "xuriparser/Uri.h" = "x" ; then # no header, assume found
  11051. URIPARSER_HEADER_FOUND="1"
  11052. else # check for the header
  11053. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  11054. CPPFLAGS="${CPPFLAGS} ${URIPARSER_INCLUDE}"
  11055. ac_fn_c_check_header_mongrel "$LINENO" "uriparser/Uri.h" "ac_cv_header_uriparser_Uri_h" "$ac_includes_default"
  11056. if test "x$ac_cv_header_uriparser_Uri_h" = xyes; then :
  11057. URIPARSER_HEADER_FOUND=1
  11058. else
  11059. URIPARSER_HEADER_FOUND=0
  11060. fi
  11061. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  11062. fi
  11063. if test "x${URIPARSER_HEADER_FOUND}" = "x0" ; then
  11064. URIPARSER_LIB=""
  11065. URIPARSER_INCLUDE=""
  11066. else
  11067. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  11068. URIPARSER_LIB=""
  11069. fi
  11070. PBX_URIPARSER=1
  11071. cat >>confdefs.h <<_ACEOF
  11072. #define HAVE_URIPARSER 1
  11073. _ACEOF
  11074. fi
  11075. fi
  11076. fi
  11077. # Another mandatory item (unless it's explicitly disabled)
  11078. # Check whether --enable-xmldoc was given.
  11079. if test "${enable_xmldoc+set}" = set; then :
  11080. enableval=$enable_xmldoc; case "${enableval}" in
  11081. y|ye|yes) disable_xmldoc=no ;;
  11082. n|no) disable_xmldoc=yes ;;
  11083. *) as_fn_error $? "bad value ${enableval} for --disable-xmldoc" "$LINENO" 5 ;;
  11084. esac
  11085. else
  11086. disable_xmldoc=no
  11087. fi
  11088. if test "${disable_xmldoc}" != "yes"; then
  11089. if test "x${PBX_LIBXSLT}" != "x1" -a "${USE_LIBXSLT}" != "no"; then
  11090. pbxlibdir=""
  11091. # if --with-LIBXSLT=DIR has been specified, use it.
  11092. if test "x${LIBXSLT_DIR}" != "x"; then
  11093. if test -d ${LIBXSLT_DIR}/lib; then
  11094. pbxlibdir="-L${LIBXSLT_DIR}/lib"
  11095. else
  11096. pbxlibdir="-L${LIBXSLT_DIR}"
  11097. fi
  11098. fi
  11099. pbxfuncname="xsltLoadStylesheetPI"
  11100. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  11101. AST_LIBXSLT_FOUND=yes
  11102. else
  11103. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  11104. CFLAGS="${CFLAGS} ${LIBXML2_INCLUDE}"
  11105. as_ac_Lib=`$as_echo "ac_cv_lib_xslt_${pbxfuncname}" | $as_tr_sh`
  11106. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lxslt" >&5
  11107. $as_echo_n "checking for ${pbxfuncname} in -lxslt... " >&6; }
  11108. if eval \${$as_ac_Lib+:} false; then :
  11109. $as_echo_n "(cached) " >&6
  11110. else
  11111. ac_check_lib_save_LIBS=$LIBS
  11112. LIBS="-lxslt ${pbxlibdir} ${LIBXML2_LIB} $LIBS"
  11113. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11114. /* end confdefs.h. */
  11115. /* Override any GCC internal prototype to avoid an error.
  11116. Use char because int might match the return type of a GCC
  11117. builtin and then its argument prototype would still apply. */
  11118. #ifdef __cplusplus
  11119. extern "C"
  11120. #endif
  11121. char ${pbxfuncname} ();
  11122. int
  11123. main ()
  11124. {
  11125. return ${pbxfuncname} ();
  11126. ;
  11127. return 0;
  11128. }
  11129. _ACEOF
  11130. if ac_fn_c_try_link "$LINENO"; then :
  11131. eval "$as_ac_Lib=yes"
  11132. else
  11133. eval "$as_ac_Lib=no"
  11134. fi
  11135. rm -f core conftest.err conftest.$ac_objext \
  11136. conftest$ac_exeext conftest.$ac_ext
  11137. LIBS=$ac_check_lib_save_LIBS
  11138. fi
  11139. eval ac_res=\$$as_ac_Lib
  11140. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  11141. $as_echo "$ac_res" >&6; }
  11142. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  11143. AST_LIBXSLT_FOUND=yes
  11144. else
  11145. AST_LIBXSLT_FOUND=no
  11146. fi
  11147. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  11148. fi
  11149. # now check for the header.
  11150. if test "${AST_LIBXSLT_FOUND}" = "yes"; then
  11151. LIBXSLT_LIB="${pbxlibdir} -lxslt ${LIBXML2_LIB}"
  11152. # if --with-LIBXSLT=DIR has been specified, use it.
  11153. if test "x${LIBXSLT_DIR}" != "x"; then
  11154. LIBXSLT_INCLUDE="-I${LIBXSLT_DIR}/include"
  11155. fi
  11156. LIBXSLT_INCLUDE="${LIBXSLT_INCLUDE} ${LIBXML2_INCLUDE}"
  11157. if test "xlibxslt/xsltInternals.h" = "x" ; then # no header, assume found
  11158. LIBXSLT_HEADER_FOUND="1"
  11159. else # check for the header
  11160. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  11161. CPPFLAGS="${CPPFLAGS} ${LIBXSLT_INCLUDE}"
  11162. ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xsltInternals.h" "ac_cv_header_libxslt_xsltInternals_h" "$ac_includes_default"
  11163. if test "x$ac_cv_header_libxslt_xsltInternals_h" = xyes; then :
  11164. LIBXSLT_HEADER_FOUND=1
  11165. else
  11166. LIBXSLT_HEADER_FOUND=0
  11167. fi
  11168. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  11169. fi
  11170. if test "x${LIBXSLT_HEADER_FOUND}" = "x0" ; then
  11171. LIBXSLT_LIB=""
  11172. LIBXSLT_INCLUDE=""
  11173. else
  11174. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  11175. LIBXSLT_LIB=""
  11176. fi
  11177. PBX_LIBXSLT=1
  11178. cat >>confdefs.h <<_ACEOF
  11179. #define HAVE_LIBXSLT 1
  11180. _ACEOF
  11181. fi
  11182. fi
  11183. fi
  11184. if test "x${PBX_LIBXSLT_CLEANUP}" != "x1" -a "${USE_LIBXSLT_CLEANUP}" != "no"; then
  11185. pbxlibdir=""
  11186. # if --with-LIBXSLT_CLEANUP=DIR has been specified, use it.
  11187. if test "x${LIBXSLT_CLEANUP_DIR}" != "x"; then
  11188. if test -d ${LIBXSLT_CLEANUP_DIR}/lib; then
  11189. pbxlibdir="-L${LIBXSLT_CLEANUP_DIR}/lib"
  11190. else
  11191. pbxlibdir="-L${LIBXSLT_CLEANUP_DIR}"
  11192. fi
  11193. fi
  11194. pbxfuncname="xsltCleanupGlobals"
  11195. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  11196. AST_LIBXSLT_CLEANUP_FOUND=yes
  11197. else
  11198. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  11199. CFLAGS="${CFLAGS} ${LIBXML2_INCLUDE}"
  11200. as_ac_Lib=`$as_echo "ac_cv_lib_xslt_${pbxfuncname}" | $as_tr_sh`
  11201. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lxslt" >&5
  11202. $as_echo_n "checking for ${pbxfuncname} in -lxslt... " >&6; }
  11203. if eval \${$as_ac_Lib+:} false; then :
  11204. $as_echo_n "(cached) " >&6
  11205. else
  11206. ac_check_lib_save_LIBS=$LIBS
  11207. LIBS="-lxslt ${pbxlibdir} ${LIBXML2_LIB} $LIBS"
  11208. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11209. /* end confdefs.h. */
  11210. /* Override any GCC internal prototype to avoid an error.
  11211. Use char because int might match the return type of a GCC
  11212. builtin and then its argument prototype would still apply. */
  11213. #ifdef __cplusplus
  11214. extern "C"
  11215. #endif
  11216. char ${pbxfuncname} ();
  11217. int
  11218. main ()
  11219. {
  11220. return ${pbxfuncname} ();
  11221. ;
  11222. return 0;
  11223. }
  11224. _ACEOF
  11225. if ac_fn_c_try_link "$LINENO"; then :
  11226. eval "$as_ac_Lib=yes"
  11227. else
  11228. eval "$as_ac_Lib=no"
  11229. fi
  11230. rm -f core conftest.err conftest.$ac_objext \
  11231. conftest$ac_exeext conftest.$ac_ext
  11232. LIBS=$ac_check_lib_save_LIBS
  11233. fi
  11234. eval ac_res=\$$as_ac_Lib
  11235. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  11236. $as_echo "$ac_res" >&6; }
  11237. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  11238. AST_LIBXSLT_CLEANUP_FOUND=yes
  11239. else
  11240. AST_LIBXSLT_CLEANUP_FOUND=no
  11241. fi
  11242. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  11243. fi
  11244. # now check for the header.
  11245. if test "${AST_LIBXSLT_CLEANUP_FOUND}" = "yes"; then
  11246. LIBXSLT_CLEANUP_LIB="${pbxlibdir} -lxslt ${LIBXML2_LIB}"
  11247. # if --with-LIBXSLT_CLEANUP=DIR has been specified, use it.
  11248. if test "x${LIBXSLT_CLEANUP_DIR}" != "x"; then
  11249. LIBXSLT_CLEANUP_INCLUDE="-I${LIBXSLT_CLEANUP_DIR}/include"
  11250. fi
  11251. LIBXSLT_CLEANUP_INCLUDE="${LIBXSLT_CLEANUP_INCLUDE} ${LIBXML2_INCLUDE}"
  11252. if test "xlibxslt/xsltInternals.h" = "x" ; then # no header, assume found
  11253. LIBXSLT_CLEANUP_HEADER_FOUND="1"
  11254. else # check for the header
  11255. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  11256. CPPFLAGS="${CPPFLAGS} ${LIBXSLT_CLEANUP_INCLUDE}"
  11257. ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xsltInternals.h" "ac_cv_header_libxslt_xsltInternals_h" "$ac_includes_default"
  11258. if test "x$ac_cv_header_libxslt_xsltInternals_h" = xyes; then :
  11259. LIBXSLT_CLEANUP_HEADER_FOUND=1
  11260. else
  11261. LIBXSLT_CLEANUP_HEADER_FOUND=0
  11262. fi
  11263. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  11264. fi
  11265. if test "x${LIBXSLT_CLEANUP_HEADER_FOUND}" = "x0" ; then
  11266. LIBXSLT_CLEANUP_LIB=""
  11267. LIBXSLT_CLEANUP_INCLUDE=""
  11268. else
  11269. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  11270. LIBXSLT_CLEANUP_LIB=""
  11271. fi
  11272. PBX_LIBXSLT_CLEANUP=1
  11273. cat >>confdefs.h <<_ACEOF
  11274. #define HAVE_LIBXSLT_CLEANUP 1
  11275. _ACEOF
  11276. fi
  11277. fi
  11278. fi
  11279. fi
  11280. # some embedded systems omit internationalization (locale) support
  11281. for ac_header in xlocale.h
  11282. do :
  11283. ac_fn_c_check_header_mongrel "$LINENO" "xlocale.h" "ac_cv_header_xlocale_h" "$ac_includes_default"
  11284. if test "x$ac_cv_header_xlocale_h" = xyes; then :
  11285. cat >>confdefs.h <<_ACEOF
  11286. #define HAVE_XLOCALE_H 1
  11287. _ACEOF
  11288. fi
  11289. done
  11290. for ac_header in winsock.h winsock2.h
  11291. do :
  11292. as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  11293. ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
  11294. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  11295. cat >>confdefs.h <<_ACEOF
  11296. #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  11297. _ACEOF
  11298. fi
  11299. done
  11300. ac_fn_c_check_header_mongrel "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
  11301. if test "x$ac_cv_header_sys_poll_h" = xyes; then :
  11302. else
  11303. $as_echo "#define AST_POLL_COMPAT 1" >>confdefs.h
  11304. fi
  11305. # Check whether --enable-largefile was given.
  11306. if test "${enable_largefile+set}" = set; then :
  11307. enableval=$enable_largefile;
  11308. fi
  11309. if test "$enable_largefile" != no; then
  11310. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
  11311. $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
  11312. if ${ac_cv_sys_largefile_CC+:} false; then :
  11313. $as_echo_n "(cached) " >&6
  11314. else
  11315. ac_cv_sys_largefile_CC=no
  11316. if test "$GCC" != yes; then
  11317. ac_save_CC=$CC
  11318. while :; do
  11319. # IRIX 6.2 and later do not support large files by default,
  11320. # so use the C compiler's -n32 option if that helps.
  11321. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11322. /* end confdefs.h. */
  11323. #include <sys/types.h>
  11324. /* Check that off_t can represent 2**63 - 1 correctly.
  11325. We can't simply define LARGE_OFF_T to be 9223372036854775807,
  11326. since some C++ compilers masquerading as C compilers
  11327. incorrectly reject 9223372036854775807. */
  11328. #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11329. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11330. && LARGE_OFF_T % 2147483647 == 1)
  11331. ? 1 : -1];
  11332. int
  11333. main ()
  11334. {
  11335. ;
  11336. return 0;
  11337. }
  11338. _ACEOF
  11339. if ac_fn_c_try_compile "$LINENO"; then :
  11340. break
  11341. fi
  11342. rm -f core conftest.err conftest.$ac_objext
  11343. CC="$CC -n32"
  11344. if ac_fn_c_try_compile "$LINENO"; then :
  11345. ac_cv_sys_largefile_CC=' -n32'; break
  11346. fi
  11347. rm -f core conftest.err conftest.$ac_objext
  11348. break
  11349. done
  11350. CC=$ac_save_CC
  11351. rm -f conftest.$ac_ext
  11352. fi
  11353. fi
  11354. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
  11355. $as_echo "$ac_cv_sys_largefile_CC" >&6; }
  11356. if test "$ac_cv_sys_largefile_CC" != no; then
  11357. CC=$CC$ac_cv_sys_largefile_CC
  11358. fi
  11359. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
  11360. $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
  11361. if ${ac_cv_sys_file_offset_bits+:} false; then :
  11362. $as_echo_n "(cached) " >&6
  11363. else
  11364. while :; do
  11365. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11366. /* end confdefs.h. */
  11367. #include <sys/types.h>
  11368. /* Check that off_t can represent 2**63 - 1 correctly.
  11369. We can't simply define LARGE_OFF_T to be 9223372036854775807,
  11370. since some C++ compilers masquerading as C compilers
  11371. incorrectly reject 9223372036854775807. */
  11372. #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11373. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11374. && LARGE_OFF_T % 2147483647 == 1)
  11375. ? 1 : -1];
  11376. int
  11377. main ()
  11378. {
  11379. ;
  11380. return 0;
  11381. }
  11382. _ACEOF
  11383. if ac_fn_c_try_compile "$LINENO"; then :
  11384. ac_cv_sys_file_offset_bits=no; break
  11385. fi
  11386. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11387. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11388. /* end confdefs.h. */
  11389. #define _FILE_OFFSET_BITS 64
  11390. #include <sys/types.h>
  11391. /* Check that off_t can represent 2**63 - 1 correctly.
  11392. We can't simply define LARGE_OFF_T to be 9223372036854775807,
  11393. since some C++ compilers masquerading as C compilers
  11394. incorrectly reject 9223372036854775807. */
  11395. #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11396. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11397. && LARGE_OFF_T % 2147483647 == 1)
  11398. ? 1 : -1];
  11399. int
  11400. main ()
  11401. {
  11402. ;
  11403. return 0;
  11404. }
  11405. _ACEOF
  11406. if ac_fn_c_try_compile "$LINENO"; then :
  11407. ac_cv_sys_file_offset_bits=64; break
  11408. fi
  11409. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11410. ac_cv_sys_file_offset_bits=unknown
  11411. break
  11412. done
  11413. fi
  11414. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
  11415. $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
  11416. case $ac_cv_sys_file_offset_bits in #(
  11417. no | unknown) ;;
  11418. *)
  11419. cat >>confdefs.h <<_ACEOF
  11420. #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
  11421. _ACEOF
  11422. ;;
  11423. esac
  11424. rm -rf conftest*
  11425. if test $ac_cv_sys_file_offset_bits = unknown; then
  11426. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
  11427. $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
  11428. if ${ac_cv_sys_large_files+:} false; then :
  11429. $as_echo_n "(cached) " >&6
  11430. else
  11431. while :; do
  11432. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11433. /* end confdefs.h. */
  11434. #include <sys/types.h>
  11435. /* Check that off_t can represent 2**63 - 1 correctly.
  11436. We can't simply define LARGE_OFF_T to be 9223372036854775807,
  11437. since some C++ compilers masquerading as C compilers
  11438. incorrectly reject 9223372036854775807. */
  11439. #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11440. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11441. && LARGE_OFF_T % 2147483647 == 1)
  11442. ? 1 : -1];
  11443. int
  11444. main ()
  11445. {
  11446. ;
  11447. return 0;
  11448. }
  11449. _ACEOF
  11450. if ac_fn_c_try_compile "$LINENO"; then :
  11451. ac_cv_sys_large_files=no; break
  11452. fi
  11453. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11454. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11455. /* end confdefs.h. */
  11456. #define _LARGE_FILES 1
  11457. #include <sys/types.h>
  11458. /* Check that off_t can represent 2**63 - 1 correctly.
  11459. We can't simply define LARGE_OFF_T to be 9223372036854775807,
  11460. since some C++ compilers masquerading as C compilers
  11461. incorrectly reject 9223372036854775807. */
  11462. #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11463. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11464. && LARGE_OFF_T % 2147483647 == 1)
  11465. ? 1 : -1];
  11466. int
  11467. main ()
  11468. {
  11469. ;
  11470. return 0;
  11471. }
  11472. _ACEOF
  11473. if ac_fn_c_try_compile "$LINENO"; then :
  11474. ac_cv_sys_large_files=1; break
  11475. fi
  11476. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11477. ac_cv_sys_large_files=unknown
  11478. break
  11479. done
  11480. fi
  11481. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
  11482. $as_echo "$ac_cv_sys_large_files" >&6; }
  11483. case $ac_cv_sys_large_files in #(
  11484. no | unknown) ;;
  11485. *)
  11486. cat >>confdefs.h <<_ACEOF
  11487. #define _LARGE_FILES $ac_cv_sys_large_files
  11488. _ACEOF
  11489. ;;
  11490. esac
  11491. rm -rf conftest*
  11492. fi
  11493. fi
  11494. # Checks for typedefs, structures, and compiler characteristics.
  11495. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
  11496. $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
  11497. if ${ac_cv_header_stdbool_h+:} false; then :
  11498. $as_echo_n "(cached) " >&6
  11499. else
  11500. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11501. /* end confdefs.h. */
  11502. #include <stdbool.h>
  11503. #ifndef bool
  11504. "error: bool is not defined"
  11505. #endif
  11506. #ifndef false
  11507. "error: false is not defined"
  11508. #endif
  11509. #if false
  11510. "error: false is not 0"
  11511. #endif
  11512. #ifndef true
  11513. "error: true is not defined"
  11514. #endif
  11515. #if true != 1
  11516. "error: true is not 1"
  11517. #endif
  11518. #ifndef __bool_true_false_are_defined
  11519. "error: __bool_true_false_are_defined is not defined"
  11520. #endif
  11521. struct s { _Bool s: 1; _Bool t; } s;
  11522. char a[true == 1 ? 1 : -1];
  11523. char b[false == 0 ? 1 : -1];
  11524. char c[__bool_true_false_are_defined == 1 ? 1 : -1];
  11525. char d[(bool) 0.5 == true ? 1 : -1];
  11526. /* See body of main program for 'e'. */
  11527. char f[(_Bool) 0.0 == false ? 1 : -1];
  11528. char g[true];
  11529. char h[sizeof (_Bool)];
  11530. char i[sizeof s.t];
  11531. enum { j = false, k = true, l = false * true, m = true * 256 };
  11532. /* The following fails for
  11533. HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
  11534. _Bool n[m];
  11535. char o[sizeof n == m * sizeof n[0] ? 1 : -1];
  11536. char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
  11537. /* Catch a bug in an HP-UX C compiler. See
  11538. http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
  11539. http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
  11540. */
  11541. _Bool q = true;
  11542. _Bool *pq = &q;
  11543. int
  11544. main ()
  11545. {
  11546. bool e = &s;
  11547. *pq |= q;
  11548. *pq |= ! q;
  11549. /* Refer to every declared value, to avoid compiler optimizations. */
  11550. return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
  11551. + !m + !n + !o + !p + !q + !pq);
  11552. ;
  11553. return 0;
  11554. }
  11555. _ACEOF
  11556. if ac_fn_c_try_compile "$LINENO"; then :
  11557. ac_cv_header_stdbool_h=yes
  11558. else
  11559. ac_cv_header_stdbool_h=no
  11560. fi
  11561. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11562. fi
  11563. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
  11564. $as_echo "$ac_cv_header_stdbool_h" >&6; }
  11565. ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
  11566. if test "x$ac_cv_type__Bool" = xyes; then :
  11567. cat >>confdefs.h <<_ACEOF
  11568. #define HAVE__BOOL 1
  11569. _ACEOF
  11570. fi
  11571. if test $ac_cv_header_stdbool_h = yes; then
  11572. $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
  11573. fi
  11574. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
  11575. $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
  11576. if ${ac_cv_c_const+:} false; then :
  11577. $as_echo_n "(cached) " >&6
  11578. else
  11579. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11580. /* end confdefs.h. */
  11581. int
  11582. main ()
  11583. {
  11584. #ifndef __cplusplus
  11585. /* Ultrix mips cc rejects this sort of thing. */
  11586. typedef int charset[2];
  11587. const charset cs = { 0, 0 };
  11588. /* SunOS 4.1.1 cc rejects this. */
  11589. char const *const *pcpcc;
  11590. char **ppc;
  11591. /* NEC SVR4.0.2 mips cc rejects this. */
  11592. struct point {int x, y;};
  11593. static struct point const zero = {0,0};
  11594. /* AIX XL C 1.02.0.0 rejects this.
  11595. It does not let you subtract one const X* pointer from another in
  11596. an arm of an if-expression whose if-part is not a constant
  11597. expression */
  11598. const char *g = "string";
  11599. pcpcc = &g + (g ? g-g : 0);
  11600. /* HPUX 7.0 cc rejects these. */
  11601. ++pcpcc;
  11602. ppc = (char**) pcpcc;
  11603. pcpcc = (char const *const *) ppc;
  11604. { /* SCO 3.2v4 cc rejects this sort of thing. */
  11605. char tx;
  11606. char *t = &tx;
  11607. char const *s = 0 ? (char *) 0 : (char const *) 0;
  11608. *t++ = 0;
  11609. if (s) return 0;
  11610. }
  11611. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
  11612. int x[] = {25, 17};
  11613. const int *foo = &x[0];
  11614. ++foo;
  11615. }
  11616. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  11617. typedef const int *iptr;
  11618. iptr p = 0;
  11619. ++p;
  11620. }
  11621. { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
  11622. "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  11623. struct s { int j; const int *ap[3]; } bx;
  11624. struct s *b = &bx; b->j = 5;
  11625. }
  11626. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  11627. const int foo = 10;
  11628. if (!foo) return 0;
  11629. }
  11630. return !cs[0] && !zero.x;
  11631. #endif
  11632. ;
  11633. return 0;
  11634. }
  11635. _ACEOF
  11636. if ac_fn_c_try_compile "$LINENO"; then :
  11637. ac_cv_c_const=yes
  11638. else
  11639. ac_cv_c_const=no
  11640. fi
  11641. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11642. fi
  11643. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
  11644. $as_echo "$ac_cv_c_const" >&6; }
  11645. if test $ac_cv_c_const = no; then
  11646. $as_echo "#define const /**/" >>confdefs.h
  11647. fi
  11648. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
  11649. $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
  11650. if ${ac_cv_type_uid_t+:} false; then :
  11651. $as_echo_n "(cached) " >&6
  11652. else
  11653. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11654. /* end confdefs.h. */
  11655. #include <sys/types.h>
  11656. _ACEOF
  11657. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  11658. $EGREP "uid_t" >/dev/null 2>&1; then :
  11659. ac_cv_type_uid_t=yes
  11660. else
  11661. ac_cv_type_uid_t=no
  11662. fi
  11663. rm -f conftest*
  11664. fi
  11665. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
  11666. $as_echo "$ac_cv_type_uid_t" >&6; }
  11667. if test $ac_cv_type_uid_t = no; then
  11668. $as_echo "#define uid_t int" >>confdefs.h
  11669. $as_echo "#define gid_t int" >>confdefs.h
  11670. fi
  11671. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
  11672. $as_echo_n "checking for inline... " >&6; }
  11673. if ${ac_cv_c_inline+:} false; then :
  11674. $as_echo_n "(cached) " >&6
  11675. else
  11676. ac_cv_c_inline=no
  11677. for ac_kw in inline __inline__ __inline; do
  11678. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11679. /* end confdefs.h. */
  11680. #ifndef __cplusplus
  11681. typedef int foo_t;
  11682. static $ac_kw foo_t static_foo () {return 0; }
  11683. $ac_kw foo_t foo () {return 0; }
  11684. #endif
  11685. _ACEOF
  11686. if ac_fn_c_try_compile "$LINENO"; then :
  11687. ac_cv_c_inline=$ac_kw
  11688. fi
  11689. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11690. test "$ac_cv_c_inline" != no && break
  11691. done
  11692. fi
  11693. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
  11694. $as_echo "$ac_cv_c_inline" >&6; }
  11695. case $ac_cv_c_inline in
  11696. inline | yes) ;;
  11697. *)
  11698. case $ac_cv_c_inline in
  11699. no) ac_val=;;
  11700. *) ac_val=$ac_cv_c_inline;;
  11701. esac
  11702. cat >>confdefs.h <<_ACEOF
  11703. #ifndef __cplusplus
  11704. #define inline $ac_val
  11705. #endif
  11706. _ACEOF
  11707. ;;
  11708. esac
  11709. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double with more range or precision than double" >&5
  11710. $as_echo_n "checking for long double with more range or precision than double... " >&6; }
  11711. if ${ac_cv_type_long_double_wider+:} false; then :
  11712. $as_echo_n "(cached) " >&6
  11713. else
  11714. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11715. /* end confdefs.h. */
  11716. #include <float.h>
  11717. long double const a[] =
  11718. {
  11719. 0.0L, DBL_MIN, DBL_MAX, DBL_EPSILON,
  11720. LDBL_MIN, LDBL_MAX, LDBL_EPSILON
  11721. };
  11722. long double
  11723. f (long double x)
  11724. {
  11725. return ((x + (unsigned long int) 10) * (-1 / x) + a[0]
  11726. + (x ? f (x) : 'c'));
  11727. }
  11728. int
  11729. main ()
  11730. {
  11731. static int test_array [1 - 2 * !((0 < ((DBL_MAX_EXP < LDBL_MAX_EXP)
  11732. + (DBL_MANT_DIG < LDBL_MANT_DIG)
  11733. - (LDBL_MAX_EXP < DBL_MAX_EXP)
  11734. - (LDBL_MANT_DIG < DBL_MANT_DIG)))
  11735. && (int) LDBL_EPSILON == 0
  11736. )];
  11737. test_array [0] = 0;
  11738. return test_array [0];
  11739. ;
  11740. return 0;
  11741. }
  11742. _ACEOF
  11743. if ac_fn_c_try_compile "$LINENO"; then :
  11744. ac_cv_type_long_double_wider=yes
  11745. else
  11746. ac_cv_type_long_double_wider=no
  11747. fi
  11748. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11749. fi
  11750. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double_wider" >&5
  11751. $as_echo "$ac_cv_type_long_double_wider" >&6; }
  11752. if test $ac_cv_type_long_double_wider = yes; then
  11753. $as_echo "#define HAVE_LONG_DOUBLE_WIDER 1" >>confdefs.h
  11754. fi
  11755. ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
  11756. if test "x$ac_cv_type_mode_t" = xyes; then :
  11757. else
  11758. cat >>confdefs.h <<_ACEOF
  11759. #define mode_t int
  11760. _ACEOF
  11761. fi
  11762. ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
  11763. if test "x$ac_cv_type_off_t" = xyes; then :
  11764. else
  11765. cat >>confdefs.h <<_ACEOF
  11766. #define off_t long int
  11767. _ACEOF
  11768. fi
  11769. ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
  11770. if test "x$ac_cv_type_pid_t" = xyes; then :
  11771. else
  11772. cat >>confdefs.h <<_ACEOF
  11773. #define pid_t int
  11774. _ACEOF
  11775. fi
  11776. ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
  11777. if test "x$ac_cv_type_size_t" = xyes; then :
  11778. else
  11779. cat >>confdefs.h <<_ACEOF
  11780. #define size_t unsigned int
  11781. _ACEOF
  11782. fi
  11783. ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
  11784. if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
  11785. cat >>confdefs.h <<_ACEOF
  11786. #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
  11787. _ACEOF
  11788. fi
  11789. ac_fn_c_check_member "$LINENO" "struct ucred" "uid" "ac_cv_member_struct_ucred_uid" "#include <sys/types.h>
  11790. #include <sys/socket.h>
  11791. "
  11792. if test "x$ac_cv_member_struct_ucred_uid" = xyes; then :
  11793. cat >>confdefs.h <<_ACEOF
  11794. #define HAVE_STRUCT_UCRED_UID 1
  11795. _ACEOF
  11796. fi
  11797. ac_fn_c_check_member "$LINENO" "struct ucred" "cr_uid" "ac_cv_member_struct_ucred_cr_uid" "#include <sys/types.h>
  11798. #include <sys/socket.h>
  11799. "
  11800. if test "x$ac_cv_member_struct_ucred_cr_uid" = xyes; then :
  11801. cat >>confdefs.h <<_ACEOF
  11802. #define HAVE_STRUCT_UCRED_CR_UID 1
  11803. _ACEOF
  11804. fi
  11805. ac_fn_c_check_member "$LINENO" "struct sockpeercred" "uid" "ac_cv_member_struct_sockpeercred_uid" "#include <sys/types.h>
  11806. #include <sys/socket.h>
  11807. "
  11808. if test "x$ac_cv_member_struct_sockpeercred_uid" = xyes; then :
  11809. cat >>confdefs.h <<_ACEOF
  11810. #define HAVE_STRUCT_SOCKPEERCRED_UID 1
  11811. _ACEOF
  11812. fi
  11813. ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_ifru.ifru_hwaddr" "ac_cv_member_struct_ifreq_ifr_ifru_ifru_hwaddr" "#include <net/if.h>
  11814. "
  11815. if test "x$ac_cv_member_struct_ifreq_ifr_ifru_ifru_hwaddr" = xyes; then :
  11816. cat >>confdefs.h <<_ACEOF
  11817. #define HAVE_STRUCT_IFREQ_IFR_IFRU_IFRU_HWADDR 1
  11818. _ACEOF
  11819. fi
  11820. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
  11821. $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
  11822. if ${ac_cv_header_time+:} false; then :
  11823. $as_echo_n "(cached) " >&6
  11824. else
  11825. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11826. /* end confdefs.h. */
  11827. #include <sys/types.h>
  11828. #include <sys/time.h>
  11829. #include <time.h>
  11830. int
  11831. main ()
  11832. {
  11833. if ((struct tm *) 0)
  11834. return 0;
  11835. ;
  11836. return 0;
  11837. }
  11838. _ACEOF
  11839. if ac_fn_c_try_compile "$LINENO"; then :
  11840. ac_cv_header_time=yes
  11841. else
  11842. ac_cv_header_time=no
  11843. fi
  11844. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11845. fi
  11846. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
  11847. $as_echo "$ac_cv_header_time" >&6; }
  11848. if test $ac_cv_header_time = yes; then
  11849. $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
  11850. fi
  11851. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
  11852. $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
  11853. if ${ac_cv_struct_tm+:} false; then :
  11854. $as_echo_n "(cached) " >&6
  11855. else
  11856. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11857. /* end confdefs.h. */
  11858. #include <sys/types.h>
  11859. #include <time.h>
  11860. int
  11861. main ()
  11862. {
  11863. struct tm tm;
  11864. int *p = &tm.tm_sec;
  11865. return !p;
  11866. ;
  11867. return 0;
  11868. }
  11869. _ACEOF
  11870. if ac_fn_c_try_compile "$LINENO"; then :
  11871. ac_cv_struct_tm=time.h
  11872. else
  11873. ac_cv_struct_tm=sys/time.h
  11874. fi
  11875. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11876. fi
  11877. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
  11878. $as_echo "$ac_cv_struct_tm" >&6; }
  11879. if test $ac_cv_struct_tm = sys/time.h; then
  11880. $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
  11881. fi
  11882. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
  11883. $as_echo_n "checking for working volatile... " >&6; }
  11884. if ${ac_cv_c_volatile+:} false; then :
  11885. $as_echo_n "(cached) " >&6
  11886. else
  11887. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11888. /* end confdefs.h. */
  11889. int
  11890. main ()
  11891. {
  11892. volatile int x;
  11893. int * volatile y = (int *) 0;
  11894. return !x && !y;
  11895. ;
  11896. return 0;
  11897. }
  11898. _ACEOF
  11899. if ac_fn_c_try_compile "$LINENO"; then :
  11900. ac_cv_c_volatile=yes
  11901. else
  11902. ac_cv_c_volatile=no
  11903. fi
  11904. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11905. fi
  11906. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
  11907. $as_echo "$ac_cv_c_volatile" >&6; }
  11908. if test $ac_cv_c_volatile = no; then
  11909. $as_echo "#define volatile /**/" >>confdefs.h
  11910. fi
  11911. ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
  11912. if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
  11913. cat >>confdefs.h <<_ACEOF
  11914. #define HAVE_PTRDIFF_T 1
  11915. _ACEOF
  11916. fi
  11917. stat_nsec_found=no
  11918. ac_fn_c_check_member "$LINENO" "struct stat" "st_mtim" "ac_cv_member_struct_stat_st_mtim" "#include <sys/stat.h>
  11919. "
  11920. if test "x$ac_cv_member_struct_stat_st_mtim" = xyes; then :
  11921. cat >>confdefs.h <<_ACEOF
  11922. #define HAVE_STRUCT_STAT_ST_MTIM 1
  11923. _ACEOF
  11924. stat_nsec_found=yes
  11925. fi
  11926. ac_fn_c_check_member "$LINENO" "struct stat" "st_mtimensec" "ac_cv_member_struct_stat_st_mtimensec" "#include <sys/stat.h>
  11927. "
  11928. if test "x$ac_cv_member_struct_stat_st_mtimensec" = xyes; then :
  11929. cat >>confdefs.h <<_ACEOF
  11930. #define HAVE_STRUCT_STAT_ST_MTIMENSEC 1
  11931. _ACEOF
  11932. stat_nsec_found=yes
  11933. fi
  11934. ac_fn_c_check_member "$LINENO" "struct stat" "st_mtimespec" "ac_cv_member_struct_stat_st_mtimespec" "#include <sys/stat.h>
  11935. "
  11936. if test "x$ac_cv_member_struct_stat_st_mtimespec" = xyes; then :
  11937. cat >>confdefs.h <<_ACEOF
  11938. #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
  11939. _ACEOF
  11940. stat_nsec_found=yes
  11941. fi
  11942. if test "${stat_nsec_found}" != yes; then
  11943. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot determine nanosecond field of struct stat" >&5
  11944. $as_echo "$as_me: WARNING: Cannot determine nanosecond field of struct stat" >&2;}
  11945. fi
  11946. # Checks for library functions.
  11947. for ac_header in unistd.h
  11948. do :
  11949. ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
  11950. if test "x$ac_cv_header_unistd_h" = xyes; then :
  11951. cat >>confdefs.h <<_ACEOF
  11952. #define HAVE_UNISTD_H 1
  11953. _ACEOF
  11954. fi
  11955. done
  11956. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
  11957. $as_echo_n "checking for working chown... " >&6; }
  11958. if ${ac_cv_func_chown_works+:} false; then :
  11959. $as_echo_n "(cached) " >&6
  11960. else
  11961. if test "$cross_compiling" = yes; then :
  11962. ac_cv_func_chown_works=no
  11963. else
  11964. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11965. /* end confdefs.h. */
  11966. $ac_includes_default
  11967. #include <fcntl.h>
  11968. int
  11969. main ()
  11970. {
  11971. char *f = "conftest.chown";
  11972. struct stat before, after;
  11973. if (creat (f, 0600) < 0)
  11974. return 1;
  11975. if (stat (f, &before) < 0)
  11976. return 1;
  11977. if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
  11978. return 1;
  11979. if (stat (f, &after) < 0)
  11980. return 1;
  11981. return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
  11982. ;
  11983. return 0;
  11984. }
  11985. _ACEOF
  11986. if ac_fn_c_try_run "$LINENO"; then :
  11987. ac_cv_func_chown_works=yes
  11988. else
  11989. ac_cv_func_chown_works=no
  11990. fi
  11991. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  11992. conftest.$ac_objext conftest.beam conftest.$ac_ext
  11993. fi
  11994. rm -f conftest.chown
  11995. fi
  11996. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
  11997. $as_echo "$ac_cv_func_chown_works" >&6; }
  11998. if test $ac_cv_func_chown_works = yes; then
  11999. $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
  12000. fi
  12001. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
  12002. $as_echo_n "checking whether closedir returns void... " >&6; }
  12003. if ${ac_cv_func_closedir_void+:} false; then :
  12004. $as_echo_n "(cached) " >&6
  12005. else
  12006. if test "$cross_compiling" = yes; then :
  12007. ac_cv_func_closedir_void=yes
  12008. else
  12009. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12010. /* end confdefs.h. */
  12011. $ac_includes_default
  12012. #include <$ac_header_dirent>
  12013. #ifndef __cplusplus
  12014. int closedir ();
  12015. #endif
  12016. int
  12017. main ()
  12018. {
  12019. return closedir (opendir (".")) != 0;
  12020. ;
  12021. return 0;
  12022. }
  12023. _ACEOF
  12024. if ac_fn_c_try_run "$LINENO"; then :
  12025. ac_cv_func_closedir_void=no
  12026. else
  12027. ac_cv_func_closedir_void=yes
  12028. fi
  12029. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  12030. conftest.$ac_objext conftest.beam conftest.$ac_ext
  12031. fi
  12032. fi
  12033. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
  12034. $as_echo "$ac_cv_func_closedir_void" >&6; }
  12035. if test $ac_cv_func_closedir_void = yes; then
  12036. $as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h
  12037. fi
  12038. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
  12039. $as_echo_n "checking for error_at_line... " >&6; }
  12040. if ${ac_cv_lib_error_at_line+:} false; then :
  12041. $as_echo_n "(cached) " >&6
  12042. else
  12043. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12044. /* end confdefs.h. */
  12045. #include <error.h>
  12046. int
  12047. main ()
  12048. {
  12049. error_at_line (0, 0, "", 0, "an error occurred");
  12050. ;
  12051. return 0;
  12052. }
  12053. _ACEOF
  12054. if ac_fn_c_try_link "$LINENO"; then :
  12055. ac_cv_lib_error_at_line=yes
  12056. else
  12057. ac_cv_lib_error_at_line=no
  12058. fi
  12059. rm -f core conftest.err conftest.$ac_objext \
  12060. conftest$ac_exeext conftest.$ac_ext
  12061. fi
  12062. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
  12063. $as_echo "$ac_cv_lib_error_at_line" >&6; }
  12064. if test $ac_cv_lib_error_at_line = no; then
  12065. case " $LIBOBJS " in
  12066. *" error.$ac_objext "* ) ;;
  12067. *) LIBOBJS="$LIBOBJS error.$ac_objext"
  12068. ;;
  12069. esac
  12070. fi
  12071. for ac_header in vfork.h
  12072. do :
  12073. ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
  12074. if test "x$ac_cv_header_vfork_h" = xyes; then :
  12075. cat >>confdefs.h <<_ACEOF
  12076. #define HAVE_VFORK_H 1
  12077. _ACEOF
  12078. fi
  12079. done
  12080. for ac_func in fork vfork
  12081. do :
  12082. as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  12083. ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
  12084. if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  12085. cat >>confdefs.h <<_ACEOF
  12086. #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  12087. _ACEOF
  12088. fi
  12089. done
  12090. if test "x$ac_cv_func_fork" = xyes; then
  12091. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
  12092. $as_echo_n "checking for working fork... " >&6; }
  12093. if ${ac_cv_func_fork_works+:} false; then :
  12094. $as_echo_n "(cached) " >&6
  12095. else
  12096. if test "$cross_compiling" = yes; then :
  12097. ac_cv_func_fork_works=cross
  12098. else
  12099. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12100. /* end confdefs.h. */
  12101. $ac_includes_default
  12102. int
  12103. main ()
  12104. {
  12105. /* By Ruediger Kuhlmann. */
  12106. return fork () < 0;
  12107. ;
  12108. return 0;
  12109. }
  12110. _ACEOF
  12111. if ac_fn_c_try_run "$LINENO"; then :
  12112. ac_cv_func_fork_works=yes
  12113. else
  12114. ac_cv_func_fork_works=no
  12115. fi
  12116. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  12117. conftest.$ac_objext conftest.beam conftest.$ac_ext
  12118. fi
  12119. fi
  12120. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
  12121. $as_echo "$ac_cv_func_fork_works" >&6; }
  12122. else
  12123. ac_cv_func_fork_works=$ac_cv_func_fork
  12124. fi
  12125. if test "x$ac_cv_func_fork_works" = xcross; then
  12126. case $host in
  12127. *-*-amigaos* | *-*-msdosdjgpp* | *-*-uclinux* )
  12128. # Override, as these systems have only a dummy fork() stub
  12129. ac_cv_func_fork_works=no
  12130. ;;
  12131. *)
  12132. ac_cv_func_fork_works=yes
  12133. ;;
  12134. esac
  12135. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
  12136. $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
  12137. fi
  12138. ac_cv_func_vfork_works=$ac_cv_func_vfork
  12139. if test "x$ac_cv_func_vfork" = xyes; then
  12140. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
  12141. $as_echo_n "checking for working vfork... " >&6; }
  12142. if ${ac_cv_func_vfork_works+:} false; then :
  12143. $as_echo_n "(cached) " >&6
  12144. else
  12145. if test "$cross_compiling" = yes; then :
  12146. ac_cv_func_vfork_works=cross
  12147. else
  12148. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12149. /* end confdefs.h. */
  12150. /* Thanks to Paul Eggert for this test. */
  12151. $ac_includes_default
  12152. #include <sys/wait.h>
  12153. #ifdef HAVE_VFORK_H
  12154. # include <vfork.h>
  12155. #endif
  12156. /* On some sparc systems, changes by the child to local and incoming
  12157. argument registers are propagated back to the parent. The compiler
  12158. is told about this with #include <vfork.h>, but some compilers
  12159. (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
  12160. static variable whose address is put into a register that is
  12161. clobbered by the vfork. */
  12162. static void
  12163. #ifdef __cplusplus
  12164. sparc_address_test (int arg)
  12165. # else
  12166. sparc_address_test (arg) int arg;
  12167. #endif
  12168. {
  12169. static pid_t child;
  12170. if (!child) {
  12171. child = vfork ();
  12172. if (child < 0) {
  12173. perror ("vfork");
  12174. _exit(2);
  12175. }
  12176. if (!child) {
  12177. arg = getpid();
  12178. write(-1, "", 0);
  12179. _exit (arg);
  12180. }
  12181. }
  12182. }
  12183. int
  12184. main ()
  12185. {
  12186. pid_t parent = getpid ();
  12187. pid_t child;
  12188. sparc_address_test (0);
  12189. child = vfork ();
  12190. if (child == 0) {
  12191. /* Here is another test for sparc vfork register problems. This
  12192. test uses lots of local variables, at least as many local
  12193. variables as main has allocated so far including compiler
  12194. temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
  12195. 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
  12196. reuse the register of parent for one of the local variables,
  12197. since it will think that parent can't possibly be used any more
  12198. in this routine. Assigning to the local variable will thus
  12199. munge parent in the parent process. */
  12200. pid_t
  12201. p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
  12202. p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
  12203. /* Convince the compiler that p..p7 are live; otherwise, it might
  12204. use the same hardware register for all 8 local variables. */
  12205. if (p != p1 || p != p2 || p != p3 || p != p4
  12206. || p != p5 || p != p6 || p != p7)
  12207. _exit(1);
  12208. /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
  12209. from child file descriptors. If the child closes a descriptor
  12210. before it execs or exits, this munges the parent's descriptor
  12211. as well. Test for this by closing stdout in the child. */
  12212. _exit(close(fileno(stdout)) != 0);
  12213. } else {
  12214. int status;
  12215. struct stat st;
  12216. while (wait(&status) != child)
  12217. ;
  12218. return (
  12219. /* Was there some problem with vforking? */
  12220. child < 0
  12221. /* Did the child fail? (This shouldn't happen.) */
  12222. || status
  12223. /* Did the vfork/compiler bug occur? */
  12224. || parent != getpid()
  12225. /* Did the file descriptor bug occur? */
  12226. || fstat(fileno(stdout), &st) != 0
  12227. );
  12228. }
  12229. }
  12230. _ACEOF
  12231. if ac_fn_c_try_run "$LINENO"; then :
  12232. ac_cv_func_vfork_works=yes
  12233. else
  12234. ac_cv_func_vfork_works=no
  12235. fi
  12236. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  12237. conftest.$ac_objext conftest.beam conftest.$ac_ext
  12238. fi
  12239. fi
  12240. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
  12241. $as_echo "$ac_cv_func_vfork_works" >&6; }
  12242. fi;
  12243. if test "x$ac_cv_func_fork_works" = xcross; then
  12244. ac_cv_func_vfork_works=$ac_cv_func_vfork
  12245. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
  12246. $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
  12247. fi
  12248. if test "x$ac_cv_func_vfork_works" = xyes; then
  12249. $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
  12250. else
  12251. $as_echo "#define vfork fork" >>confdefs.h
  12252. fi
  12253. if test "x$ac_cv_func_fork_works" = xyes; then
  12254. $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
  12255. PBX_WORKING_FORK=1
  12256. fi
  12257. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
  12258. $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
  12259. if ${ac_cv_sys_largefile_source+:} false; then :
  12260. $as_echo_n "(cached) " >&6
  12261. else
  12262. while :; do
  12263. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12264. /* end confdefs.h. */
  12265. #include <sys/types.h> /* for off_t */
  12266. #include <stdio.h>
  12267. int
  12268. main ()
  12269. {
  12270. int (*fp) (FILE *, off_t, int) = fseeko;
  12271. return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
  12272. ;
  12273. return 0;
  12274. }
  12275. _ACEOF
  12276. if ac_fn_c_try_link "$LINENO"; then :
  12277. ac_cv_sys_largefile_source=no; break
  12278. fi
  12279. rm -f core conftest.err conftest.$ac_objext \
  12280. conftest$ac_exeext conftest.$ac_ext
  12281. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12282. /* end confdefs.h. */
  12283. #define _LARGEFILE_SOURCE 1
  12284. #include <sys/types.h> /* for off_t */
  12285. #include <stdio.h>
  12286. int
  12287. main ()
  12288. {
  12289. int (*fp) (FILE *, off_t, int) = fseeko;
  12290. return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
  12291. ;
  12292. return 0;
  12293. }
  12294. _ACEOF
  12295. if ac_fn_c_try_link "$LINENO"; then :
  12296. ac_cv_sys_largefile_source=1; break
  12297. fi
  12298. rm -f core conftest.err conftest.$ac_objext \
  12299. conftest$ac_exeext conftest.$ac_ext
  12300. ac_cv_sys_largefile_source=unknown
  12301. break
  12302. done
  12303. fi
  12304. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
  12305. $as_echo "$ac_cv_sys_largefile_source" >&6; }
  12306. case $ac_cv_sys_largefile_source in #(
  12307. no | unknown) ;;
  12308. *)
  12309. cat >>confdefs.h <<_ACEOF
  12310. #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
  12311. _ACEOF
  12312. ;;
  12313. esac
  12314. rm -rf conftest*
  12315. # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
  12316. # in glibc 2.1.3, but that breaks too many other things.
  12317. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
  12318. if test $ac_cv_sys_largefile_source != unknown; then
  12319. $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
  12320. fi
  12321. if test $ac_cv_c_compiler_gnu = yes; then
  12322. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
  12323. $as_echo_n "checking whether $CC needs -traditional... " >&6; }
  12324. if ${ac_cv_prog_gcc_traditional+:} false; then :
  12325. $as_echo_n "(cached) " >&6
  12326. else
  12327. ac_pattern="Autoconf.*'x'"
  12328. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12329. /* end confdefs.h. */
  12330. #include <sgtty.h>
  12331. Autoconf TIOCGETP
  12332. _ACEOF
  12333. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  12334. $EGREP "$ac_pattern" >/dev/null 2>&1; then :
  12335. ac_cv_prog_gcc_traditional=yes
  12336. else
  12337. ac_cv_prog_gcc_traditional=no
  12338. fi
  12339. rm -f conftest*
  12340. if test $ac_cv_prog_gcc_traditional = no; then
  12341. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12342. /* end confdefs.h. */
  12343. #include <termio.h>
  12344. Autoconf TCGETA
  12345. _ACEOF
  12346. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  12347. $EGREP "$ac_pattern" >/dev/null 2>&1; then :
  12348. ac_cv_prog_gcc_traditional=yes
  12349. fi
  12350. rm -f conftest*
  12351. fi
  12352. fi
  12353. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
  12354. $as_echo "$ac_cv_prog_gcc_traditional" >&6; }
  12355. if test $ac_cv_prog_gcc_traditional = yes; then
  12356. CC="$CC -traditional"
  12357. fi
  12358. fi
  12359. # XXX: these are commented out until we determine whether it matters if our malloc()
  12360. # acts exactly like glibc's or not
  12361. # AC_FUNC_MALLOC
  12362. # AC_FUNC_REALLOC
  12363. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
  12364. $as_echo_n "checking for working memcmp... " >&6; }
  12365. if ${ac_cv_func_memcmp_working+:} false; then :
  12366. $as_echo_n "(cached) " >&6
  12367. else
  12368. if test "$cross_compiling" = yes; then :
  12369. ac_cv_func_memcmp_working=no
  12370. else
  12371. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12372. /* end confdefs.h. */
  12373. $ac_includes_default
  12374. int
  12375. main ()
  12376. {
  12377. /* Some versions of memcmp are not 8-bit clean. */
  12378. char c0 = '\100', c1 = '\200', c2 = '\201';
  12379. if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
  12380. return 1;
  12381. /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
  12382. or more and with at least one buffer not starting on a 4-byte boundary.
  12383. William Lewis provided this test program. */
  12384. {
  12385. char foo[21];
  12386. char bar[21];
  12387. int i;
  12388. for (i = 0; i < 4; i++)
  12389. {
  12390. char *a = foo + i;
  12391. char *b = bar + i;
  12392. strcpy (a, "--------01111111");
  12393. strcpy (b, "--------10000000");
  12394. if (memcmp (a, b, 16) >= 0)
  12395. return 1;
  12396. }
  12397. return 0;
  12398. }
  12399. ;
  12400. return 0;
  12401. }
  12402. _ACEOF
  12403. if ac_fn_c_try_run "$LINENO"; then :
  12404. ac_cv_func_memcmp_working=yes
  12405. else
  12406. ac_cv_func_memcmp_working=no
  12407. fi
  12408. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  12409. conftest.$ac_objext conftest.beam conftest.$ac_ext
  12410. fi
  12411. fi
  12412. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
  12413. $as_echo "$ac_cv_func_memcmp_working" >&6; }
  12414. test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
  12415. *" memcmp.$ac_objext "* ) ;;
  12416. *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
  12417. ;;
  12418. esac
  12419. for ac_header in $ac_header_list
  12420. do :
  12421. as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  12422. ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
  12423. "
  12424. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  12425. cat >>confdefs.h <<_ACEOF
  12426. #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  12427. _ACEOF
  12428. fi
  12429. done
  12430. for ac_func in getpagesize
  12431. do :
  12432. ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
  12433. if test "x$ac_cv_func_getpagesize" = xyes; then :
  12434. cat >>confdefs.h <<_ACEOF
  12435. #define HAVE_GETPAGESIZE 1
  12436. _ACEOF
  12437. fi
  12438. done
  12439. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
  12440. $as_echo_n "checking for working mmap... " >&6; }
  12441. if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
  12442. $as_echo_n "(cached) " >&6
  12443. else
  12444. if test "$cross_compiling" = yes; then :
  12445. ac_cv_func_mmap_fixed_mapped=no
  12446. else
  12447. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12448. /* end confdefs.h. */
  12449. $ac_includes_default
  12450. /* malloc might have been renamed as rpl_malloc. */
  12451. #undef malloc
  12452. /* Thanks to Mike Haertel and Jim Avera for this test.
  12453. Here is a matrix of mmap possibilities:
  12454. mmap private not fixed
  12455. mmap private fixed at somewhere currently unmapped
  12456. mmap private fixed at somewhere already mapped
  12457. mmap shared not fixed
  12458. mmap shared fixed at somewhere currently unmapped
  12459. mmap shared fixed at somewhere already mapped
  12460. For private mappings, we should verify that changes cannot be read()
  12461. back from the file, nor mmap's back from the file at a different
  12462. address. (There have been systems where private was not correctly
  12463. implemented like the infamous i386 svr4.0, and systems where the
  12464. VM page cache was not coherent with the file system buffer cache
  12465. like early versions of FreeBSD and possibly contemporary NetBSD.)
  12466. For shared mappings, we should conversely verify that changes get
  12467. propagated back to all the places they're supposed to be.
  12468. Grep wants private fixed already mapped.
  12469. The main things grep needs to know about mmap are:
  12470. * does it exist and is it safe to write into the mmap'd area
  12471. * how to use it (BSD variants) */
  12472. #include <fcntl.h>
  12473. #include <sys/mman.h>
  12474. #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
  12475. char *malloc ();
  12476. #endif
  12477. /* This mess was copied from the GNU getpagesize.h. */
  12478. #ifndef HAVE_GETPAGESIZE
  12479. # ifdef _SC_PAGESIZE
  12480. # define getpagesize() sysconf(_SC_PAGESIZE)
  12481. # else /* no _SC_PAGESIZE */
  12482. # ifdef HAVE_SYS_PARAM_H
  12483. # include <sys/param.h>
  12484. # ifdef EXEC_PAGESIZE
  12485. # define getpagesize() EXEC_PAGESIZE
  12486. # else /* no EXEC_PAGESIZE */
  12487. # ifdef NBPG
  12488. # define getpagesize() NBPG * CLSIZE
  12489. # ifndef CLSIZE
  12490. # define CLSIZE 1
  12491. # endif /* no CLSIZE */
  12492. # else /* no NBPG */
  12493. # ifdef NBPC
  12494. # define getpagesize() NBPC
  12495. # else /* no NBPC */
  12496. # ifdef PAGESIZE
  12497. # define getpagesize() PAGESIZE
  12498. # endif /* PAGESIZE */
  12499. # endif /* no NBPC */
  12500. # endif /* no NBPG */
  12501. # endif /* no EXEC_PAGESIZE */
  12502. # else /* no HAVE_SYS_PARAM_H */
  12503. # define getpagesize() 8192 /* punt totally */
  12504. # endif /* no HAVE_SYS_PARAM_H */
  12505. # endif /* no _SC_PAGESIZE */
  12506. #endif /* no HAVE_GETPAGESIZE */
  12507. int
  12508. main ()
  12509. {
  12510. char *data, *data2, *data3;
  12511. const char *cdata2;
  12512. int i, pagesize;
  12513. int fd, fd2;
  12514. pagesize = getpagesize ();
  12515. /* First, make a file with some known garbage in it. */
  12516. data = (char *) malloc (pagesize);
  12517. if (!data)
  12518. return 1;
  12519. for (i = 0; i < pagesize; ++i)
  12520. *(data + i) = rand ();
  12521. umask (0);
  12522. fd = creat ("conftest.mmap", 0600);
  12523. if (fd < 0)
  12524. return 2;
  12525. if (write (fd, data, pagesize) != pagesize)
  12526. return 3;
  12527. close (fd);
  12528. /* Next, check that the tail of a page is zero-filled. File must have
  12529. non-zero length, otherwise we risk SIGBUS for entire page. */
  12530. fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
  12531. if (fd2 < 0)
  12532. return 4;
  12533. cdata2 = "";
  12534. if (write (fd2, cdata2, 1) != 1)
  12535. return 5;
  12536. data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
  12537. if (data2 == MAP_FAILED)
  12538. return 6;
  12539. for (i = 0; i < pagesize; ++i)
  12540. if (*(data2 + i))
  12541. return 7;
  12542. close (fd2);
  12543. if (munmap (data2, pagesize))
  12544. return 8;
  12545. /* Next, try to mmap the file at a fixed address which already has
  12546. something else allocated at it. If we can, also make sure that
  12547. we see the same garbage. */
  12548. fd = open ("conftest.mmap", O_RDWR);
  12549. if (fd < 0)
  12550. return 9;
  12551. if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
  12552. MAP_PRIVATE | MAP_FIXED, fd, 0L))
  12553. return 10;
  12554. for (i = 0; i < pagesize; ++i)
  12555. if (*(data + i) != *(data2 + i))
  12556. return 11;
  12557. /* Finally, make sure that changes to the mapped area do not
  12558. percolate back to the file as seen by read(). (This is a bug on
  12559. some variants of i386 svr4.0.) */
  12560. for (i = 0; i < pagesize; ++i)
  12561. *(data2 + i) = *(data2 + i) + 1;
  12562. data3 = (char *) malloc (pagesize);
  12563. if (!data3)
  12564. return 12;
  12565. if (read (fd, data3, pagesize) != pagesize)
  12566. return 13;
  12567. for (i = 0; i < pagesize; ++i)
  12568. if (*(data + i) != *(data3 + i))
  12569. return 14;
  12570. close (fd);
  12571. return 0;
  12572. }
  12573. _ACEOF
  12574. if ac_fn_c_try_run "$LINENO"; then :
  12575. ac_cv_func_mmap_fixed_mapped=yes
  12576. else
  12577. ac_cv_func_mmap_fixed_mapped=no
  12578. fi
  12579. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  12580. conftest.$ac_objext conftest.beam conftest.$ac_ext
  12581. fi
  12582. fi
  12583. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
  12584. $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
  12585. if test $ac_cv_func_mmap_fixed_mapped = yes; then
  12586. $as_echo "#define HAVE_MMAP 1" >>confdefs.h
  12587. fi
  12588. rm -f conftest.mmap conftest.txt
  12589. for ac_header in sys/select.h sys/socket.h
  12590. do :
  12591. as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  12592. ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
  12593. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  12594. cat >>confdefs.h <<_ACEOF
  12595. #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  12596. _ACEOF
  12597. fi
  12598. done
  12599. { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
  12600. $as_echo_n "checking types of arguments for select... " >&6; }
  12601. if ${ac_cv_func_select_args+:} false; then :
  12602. $as_echo_n "(cached) " >&6
  12603. else
  12604. for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
  12605. for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
  12606. for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
  12607. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12608. /* end confdefs.h. */
  12609. $ac_includes_default
  12610. #ifdef HAVE_SYS_SELECT_H
  12611. # include <sys/select.h>
  12612. #endif
  12613. #ifdef HAVE_SYS_SOCKET_H
  12614. # include <sys/socket.h>
  12615. #endif
  12616. int
  12617. main ()
  12618. {
  12619. extern int select ($ac_arg1,
  12620. $ac_arg234, $ac_arg234, $ac_arg234,
  12621. $ac_arg5);
  12622. ;
  12623. return 0;
  12624. }
  12625. _ACEOF
  12626. if ac_fn_c_try_compile "$LINENO"; then :
  12627. ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
  12628. fi
  12629. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  12630. done
  12631. done
  12632. done
  12633. # Provide a safe default value.
  12634. : "${ac_cv_func_select_args=int,int *,struct timeval *}"
  12635. fi
  12636. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
  12637. $as_echo "$ac_cv_func_select_args" >&6; }
  12638. ac_save_IFS=$IFS; IFS=','
  12639. set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
  12640. IFS=$ac_save_IFS
  12641. shift
  12642. cat >>confdefs.h <<_ACEOF
  12643. #define SELECT_TYPE_ARG1 $1
  12644. _ACEOF
  12645. cat >>confdefs.h <<_ACEOF
  12646. #define SELECT_TYPE_ARG234 ($2)
  12647. _ACEOF
  12648. cat >>confdefs.h <<_ACEOF
  12649. #define SELECT_TYPE_ARG5 ($3)
  12650. _ACEOF
  12651. rm -f conftest*
  12652. if ${ac_cv_func_setvbuf_reversed+:} false; then :
  12653. $as_echo_n "(cached) " >&6
  12654. else
  12655. ac_cv_func_setvbuf_reversed=no
  12656. fi
  12657. { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
  12658. $as_echo_n "checking return type of signal handlers... " >&6; }
  12659. if ${ac_cv_type_signal+:} false; then :
  12660. $as_echo_n "(cached) " >&6
  12661. else
  12662. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12663. /* end confdefs.h. */
  12664. #include <sys/types.h>
  12665. #include <signal.h>
  12666. int
  12667. main ()
  12668. {
  12669. return *(signal (0, 0)) (0) == 1;
  12670. ;
  12671. return 0;
  12672. }
  12673. _ACEOF
  12674. if ac_fn_c_try_compile "$LINENO"; then :
  12675. ac_cv_type_signal=int
  12676. else
  12677. ac_cv_type_signal=void
  12678. fi
  12679. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  12680. fi
  12681. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
  12682. $as_echo "$ac_cv_type_signal" >&6; }
  12683. cat >>confdefs.h <<_ACEOF
  12684. #define RETSIGTYPE $ac_cv_type_signal
  12685. _ACEOF
  12686. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
  12687. $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
  12688. if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
  12689. $as_echo_n "(cached) " >&6
  12690. else
  12691. rm -f conftest.sym conftest.file
  12692. echo >conftest.file
  12693. if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
  12694. if test "$cross_compiling" = yes; then :
  12695. ac_cv_func_lstat_dereferences_slashed_symlink=no
  12696. else
  12697. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12698. /* end confdefs.h. */
  12699. $ac_includes_default
  12700. int
  12701. main ()
  12702. {
  12703. struct stat sbuf;
  12704. /* Linux will dereference the symlink and fail, as required by POSIX.
  12705. That is better in the sense that it means we will not
  12706. have to compile and use the lstat wrapper. */
  12707. return lstat ("conftest.sym/", &sbuf) == 0;
  12708. ;
  12709. return 0;
  12710. }
  12711. _ACEOF
  12712. if ac_fn_c_try_run "$LINENO"; then :
  12713. ac_cv_func_lstat_dereferences_slashed_symlink=yes
  12714. else
  12715. ac_cv_func_lstat_dereferences_slashed_symlink=no
  12716. fi
  12717. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  12718. conftest.$ac_objext conftest.beam conftest.$ac_ext
  12719. fi
  12720. else
  12721. # If the `ln -s' command failed, then we probably don't even
  12722. # have an lstat function.
  12723. ac_cv_func_lstat_dereferences_slashed_symlink=no
  12724. fi
  12725. rm -f conftest.sym conftest.file
  12726. fi
  12727. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
  12728. $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
  12729. test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
  12730. cat >>confdefs.h <<_ACEOF
  12731. #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
  12732. _ACEOF
  12733. if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
  12734. case " $LIBOBJS " in
  12735. *" lstat.$ac_objext "* ) ;;
  12736. *) LIBOBJS="$LIBOBJS lstat.$ac_objext"
  12737. ;;
  12738. esac
  12739. fi
  12740. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5
  12741. $as_echo_n "checking whether stat accepts an empty string... " >&6; }
  12742. if ${ac_cv_func_stat_empty_string_bug+:} false; then :
  12743. $as_echo_n "(cached) " >&6
  12744. else
  12745. if test "$cross_compiling" = yes; then :
  12746. ac_cv_func_stat_empty_string_bug=yes
  12747. else
  12748. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12749. /* end confdefs.h. */
  12750. $ac_includes_default
  12751. int
  12752. main ()
  12753. {
  12754. struct stat sbuf;
  12755. return stat ("", &sbuf) == 0;
  12756. ;
  12757. return 0;
  12758. }
  12759. _ACEOF
  12760. if ac_fn_c_try_run "$LINENO"; then :
  12761. ac_cv_func_stat_empty_string_bug=no
  12762. else
  12763. ac_cv_func_stat_empty_string_bug=yes
  12764. fi
  12765. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  12766. conftest.$ac_objext conftest.beam conftest.$ac_ext
  12767. fi
  12768. fi
  12769. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5
  12770. $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; }
  12771. if test $ac_cv_func_stat_empty_string_bug = yes; then
  12772. case " $LIBOBJS " in
  12773. *" stat.$ac_objext "* ) ;;
  12774. *) LIBOBJS="$LIBOBJS stat.$ac_objext"
  12775. ;;
  12776. esac
  12777. cat >>confdefs.h <<_ACEOF
  12778. #define HAVE_STAT_EMPTY_STRING_BUG 1
  12779. _ACEOF
  12780. fi
  12781. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strcoll" >&5
  12782. $as_echo_n "checking for working strcoll... " >&6; }
  12783. if ${ac_cv_func_strcoll_works+:} false; then :
  12784. $as_echo_n "(cached) " >&6
  12785. else
  12786. if test "$cross_compiling" = yes; then :
  12787. ac_cv_func_strcoll_works=no
  12788. else
  12789. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12790. /* end confdefs.h. */
  12791. $ac_includes_default
  12792. int
  12793. main ()
  12794. {
  12795. return (strcoll ("abc", "def") >= 0 ||
  12796. strcoll ("ABC", "DEF") >= 0 ||
  12797. strcoll ("123", "456") >= 0)
  12798. ;
  12799. return 0;
  12800. }
  12801. _ACEOF
  12802. if ac_fn_c_try_run "$LINENO"; then :
  12803. ac_cv_func_strcoll_works=yes
  12804. else
  12805. ac_cv_func_strcoll_works=no
  12806. fi
  12807. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  12808. conftest.$ac_objext conftest.beam conftest.$ac_ext
  12809. fi
  12810. fi
  12811. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strcoll_works" >&5
  12812. $as_echo "$ac_cv_func_strcoll_works" >&6; }
  12813. if test $ac_cv_func_strcoll_works = yes; then
  12814. $as_echo "#define HAVE_STRCOLL 1" >>confdefs.h
  12815. fi
  12816. for ac_func in strftime
  12817. do :
  12818. ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
  12819. if test "x$ac_cv_func_strftime" = xyes; then :
  12820. cat >>confdefs.h <<_ACEOF
  12821. #define HAVE_STRFTIME 1
  12822. _ACEOF
  12823. else
  12824. # strftime is in -lintl on SCO UNIX.
  12825. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
  12826. $as_echo_n "checking for strftime in -lintl... " >&6; }
  12827. if ${ac_cv_lib_intl_strftime+:} false; then :
  12828. $as_echo_n "(cached) " >&6
  12829. else
  12830. ac_check_lib_save_LIBS=$LIBS
  12831. LIBS="-lintl $LIBS"
  12832. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12833. /* end confdefs.h. */
  12834. /* Override any GCC internal prototype to avoid an error.
  12835. Use char because int might match the return type of a GCC
  12836. builtin and then its argument prototype would still apply. */
  12837. #ifdef __cplusplus
  12838. extern "C"
  12839. #endif
  12840. char strftime ();
  12841. int
  12842. main ()
  12843. {
  12844. return strftime ();
  12845. ;
  12846. return 0;
  12847. }
  12848. _ACEOF
  12849. if ac_fn_c_try_link "$LINENO"; then :
  12850. ac_cv_lib_intl_strftime=yes
  12851. else
  12852. ac_cv_lib_intl_strftime=no
  12853. fi
  12854. rm -f core conftest.err conftest.$ac_objext \
  12855. conftest$ac_exeext conftest.$ac_ext
  12856. LIBS=$ac_check_lib_save_LIBS
  12857. fi
  12858. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
  12859. $as_echo "$ac_cv_lib_intl_strftime" >&6; }
  12860. if test "x$ac_cv_lib_intl_strftime" = xyes; then :
  12861. $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
  12862. LIBS="-lintl $LIBS"
  12863. fi
  12864. fi
  12865. done
  12866. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
  12867. $as_echo_n "checking for working strnlen... " >&6; }
  12868. if ${ac_cv_func_strnlen_working+:} false; then :
  12869. $as_echo_n "(cached) " >&6
  12870. else
  12871. if test "$cross_compiling" = yes; then :
  12872. # Guess no on AIX systems, yes otherwise.
  12873. case "$host_os" in
  12874. aix*) ac_cv_func_strnlen_working=no;;
  12875. *) ac_cv_func_strnlen_working=yes;;
  12876. esac
  12877. else
  12878. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12879. /* end confdefs.h. */
  12880. $ac_includes_default
  12881. int
  12882. main ()
  12883. {
  12884. #define S "foobar"
  12885. #define S_LEN (sizeof S - 1)
  12886. /* At least one implementation is buggy: that of AIX 4.3 would
  12887. give strnlen (S, 1) == 3. */
  12888. int i;
  12889. for (i = 0; i < S_LEN + 1; ++i)
  12890. {
  12891. int expected = i <= S_LEN ? i : S_LEN;
  12892. if (strnlen (S, i) != expected)
  12893. return 1;
  12894. }
  12895. return 0;
  12896. ;
  12897. return 0;
  12898. }
  12899. _ACEOF
  12900. if ac_fn_c_try_run "$LINENO"; then :
  12901. ac_cv_func_strnlen_working=yes
  12902. else
  12903. ac_cv_func_strnlen_working=no
  12904. fi
  12905. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  12906. conftest.$ac_objext conftest.beam conftest.$ac_ext
  12907. fi
  12908. fi
  12909. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
  12910. $as_echo "$ac_cv_func_strnlen_working" >&6; }
  12911. test $ac_cv_func_strnlen_working = no && case " $LIBOBJS " in
  12912. *" strnlen.$ac_objext "* ) ;;
  12913. *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
  12914. ;;
  12915. esac
  12916. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
  12917. $as_echo_n "checking for working strtod... " >&6; }
  12918. if ${ac_cv_func_strtod+:} false; then :
  12919. $as_echo_n "(cached) " >&6
  12920. else
  12921. if test "$cross_compiling" = yes; then :
  12922. ac_cv_func_strtod=no
  12923. else
  12924. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12925. /* end confdefs.h. */
  12926. $ac_includes_default
  12927. #ifndef strtod
  12928. double strtod ();
  12929. #endif
  12930. int
  12931. main()
  12932. {
  12933. {
  12934. /* Some versions of Linux strtod mis-parse strings with leading '+'. */
  12935. char *string = " +69";
  12936. char *term;
  12937. double value;
  12938. value = strtod (string, &term);
  12939. if (value != 69 || term != (string + 4))
  12940. return 1;
  12941. }
  12942. {
  12943. /* Under Solaris 2.4, strtod returns the wrong value for the
  12944. terminating character under some conditions. */
  12945. char *string = "NaN";
  12946. char *term;
  12947. strtod (string, &term);
  12948. if (term != string && *(term - 1) == 0)
  12949. return 1;
  12950. }
  12951. return 0;
  12952. }
  12953. _ACEOF
  12954. if ac_fn_c_try_run "$LINENO"; then :
  12955. ac_cv_func_strtod=yes
  12956. else
  12957. ac_cv_func_strtod=no
  12958. fi
  12959. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  12960. conftest.$ac_objext conftest.beam conftest.$ac_ext
  12961. fi
  12962. fi
  12963. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
  12964. $as_echo "$ac_cv_func_strtod" >&6; }
  12965. if test $ac_cv_func_strtod = no; then
  12966. case " $LIBOBJS " in
  12967. *" strtod.$ac_objext "* ) ;;
  12968. *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
  12969. ;;
  12970. esac
  12971. ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
  12972. if test "x$ac_cv_func_pow" = xyes; then :
  12973. fi
  12974. if test $ac_cv_func_pow = no; then
  12975. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
  12976. $as_echo_n "checking for pow in -lm... " >&6; }
  12977. if ${ac_cv_lib_m_pow+:} false; then :
  12978. $as_echo_n "(cached) " >&6
  12979. else
  12980. ac_check_lib_save_LIBS=$LIBS
  12981. LIBS="-lm $LIBS"
  12982. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12983. /* end confdefs.h. */
  12984. /* Override any GCC internal prototype to avoid an error.
  12985. Use char because int might match the return type of a GCC
  12986. builtin and then its argument prototype would still apply. */
  12987. #ifdef __cplusplus
  12988. extern "C"
  12989. #endif
  12990. char pow ();
  12991. int
  12992. main ()
  12993. {
  12994. return pow ();
  12995. ;
  12996. return 0;
  12997. }
  12998. _ACEOF
  12999. if ac_fn_c_try_link "$LINENO"; then :
  13000. ac_cv_lib_m_pow=yes
  13001. else
  13002. ac_cv_lib_m_pow=no
  13003. fi
  13004. rm -f core conftest.err conftest.$ac_objext \
  13005. conftest$ac_exeext conftest.$ac_ext
  13006. LIBS=$ac_check_lib_save_LIBS
  13007. fi
  13008. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
  13009. $as_echo "$ac_cv_lib_m_pow" >&6; }
  13010. if test "x$ac_cv_lib_m_pow" = xyes; then :
  13011. POW_LIB=-lm
  13012. else
  13013. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
  13014. $as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
  13015. fi
  13016. fi
  13017. fi
  13018. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether utime accepts a null argument" >&5
  13019. $as_echo_n "checking whether utime accepts a null argument... " >&6; }
  13020. if ${ac_cv_func_utime_null+:} false; then :
  13021. $as_echo_n "(cached) " >&6
  13022. else
  13023. rm -f conftest.data; >conftest.data
  13024. # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
  13025. if test "$cross_compiling" = yes; then :
  13026. ac_cv_func_utime_null='guessing yes'
  13027. else
  13028. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13029. /* end confdefs.h. */
  13030. $ac_includes_default
  13031. #ifdef HAVE_UTIME_H
  13032. # include <utime.h>
  13033. #endif
  13034. int
  13035. main ()
  13036. {
  13037. struct stat s, t;
  13038. return ! (stat ("conftest.data", &s) == 0
  13039. && utime ("conftest.data", 0) == 0
  13040. && stat ("conftest.data", &t) == 0
  13041. && t.st_mtime >= s.st_mtime
  13042. && t.st_mtime - s.st_mtime < 120);
  13043. ;
  13044. return 0;
  13045. }
  13046. _ACEOF
  13047. if ac_fn_c_try_run "$LINENO"; then :
  13048. ac_cv_func_utime_null=yes
  13049. else
  13050. ac_cv_func_utime_null=no
  13051. fi
  13052. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  13053. conftest.$ac_objext conftest.beam conftest.$ac_ext
  13054. fi
  13055. fi
  13056. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_utime_null" >&5
  13057. $as_echo "$ac_cv_func_utime_null" >&6; }
  13058. if test "x$ac_cv_func_utime_null" != xno; then
  13059. ac_cv_func_utime_null=yes
  13060. $as_echo "#define HAVE_UTIME_NULL 1" >>confdefs.h
  13061. fi
  13062. rm -f conftest.data
  13063. for ac_func in vprintf
  13064. do :
  13065. ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
  13066. if test "x$ac_cv_func_vprintf" = xyes; then :
  13067. cat >>confdefs.h <<_ACEOF
  13068. #define HAVE_VPRINTF 1
  13069. _ACEOF
  13070. ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
  13071. if test "x$ac_cv_func__doprnt" = xyes; then :
  13072. $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
  13073. fi
  13074. fi
  13075. done
  13076. for ac_func in 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 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 utime vasprintf getpeereid sysctl swapctl
  13077. do :
  13078. as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  13079. ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
  13080. if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  13081. cat >>confdefs.h <<_ACEOF
  13082. #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  13083. _ACEOF
  13084. fi
  13085. done
  13086. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htonll" >&5
  13087. $as_echo_n "checking for htonll... " >&6; }
  13088. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13089. /* end confdefs.h. */
  13090. #include <arpa/inet.h>
  13091. int
  13092. main ()
  13093. {
  13094. return htonll(0);
  13095. ;
  13096. return 0;
  13097. }
  13098. _ACEOF
  13099. if ac_fn_c_try_link "$LINENO"; then :
  13100. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13101. $as_echo "yes" >&6; }
  13102. $as_echo "#define HAVE_HTONLL 1" >>confdefs.h
  13103. else
  13104. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13105. $as_echo "no" >&6; }
  13106. fi
  13107. rm -f core conftest.err conftest.$ac_objext \
  13108. conftest$ac_exeext conftest.$ac_ext
  13109. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ntohll" >&5
  13110. $as_echo_n "checking for ntohll... " >&6; }
  13111. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13112. /* end confdefs.h. */
  13113. #include <arpa/inet.h>
  13114. int
  13115. main ()
  13116. {
  13117. return ntohll(0);
  13118. ;
  13119. return 0;
  13120. }
  13121. _ACEOF
  13122. if ac_fn_c_try_link "$LINENO"; then :
  13123. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13124. $as_echo "yes" >&6; }
  13125. $as_echo "#define HAVE_NTOHLL 1" >>confdefs.h
  13126. else
  13127. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13128. $as_echo "no" >&6; }
  13129. fi
  13130. rm -f core conftest.err conftest.$ac_objext \
  13131. conftest$ac_exeext conftest.$ac_ext
  13132. # NOTE: we use AC_CHECK_LIB to get -lm into the arguments for later checks,
  13133. # so that AC_CHECK_FUNCS can detect functions in that library.
  13134. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
  13135. $as_echo_n "checking for sqrt in -lm... " >&6; }
  13136. if ${ac_cv_lib_m_sqrt+:} false; then :
  13137. $as_echo_n "(cached) " >&6
  13138. else
  13139. ac_check_lib_save_LIBS=$LIBS
  13140. LIBS="-lm $LIBS"
  13141. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13142. /* end confdefs.h. */
  13143. /* Override any GCC internal prototype to avoid an error.
  13144. Use char because int might match the return type of a GCC
  13145. builtin and then its argument prototype would still apply. */
  13146. #ifdef __cplusplus
  13147. extern "C"
  13148. #endif
  13149. char sqrt ();
  13150. int
  13151. main ()
  13152. {
  13153. return sqrt ();
  13154. ;
  13155. return 0;
  13156. }
  13157. _ACEOF
  13158. if ac_fn_c_try_link "$LINENO"; then :
  13159. ac_cv_lib_m_sqrt=yes
  13160. else
  13161. ac_cv_lib_m_sqrt=no
  13162. fi
  13163. rm -f core conftest.err conftest.$ac_objext \
  13164. conftest$ac_exeext conftest.$ac_ext
  13165. LIBS=$ac_check_lib_save_LIBS
  13166. fi
  13167. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
  13168. $as_echo "$ac_cv_lib_m_sqrt" >&6; }
  13169. if test "x$ac_cv_lib_m_sqrt" = xyes; then :
  13170. cat >>confdefs.h <<_ACEOF
  13171. #define HAVE_LIBM 1
  13172. _ACEOF
  13173. LIBS="-lm $LIBS"
  13174. fi
  13175. # BSD might not have exp2, and/or log2
  13176. for ac_func in exp2 log2 exp10 log10 sin cos tan asin acos atan atan2 pow rint exp log remainder fmod round roundf trunc floor ceil
  13177. do :
  13178. as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  13179. ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
  13180. if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  13181. cat >>confdefs.h <<_ACEOF
  13182. #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  13183. _ACEOF
  13184. fi
  13185. done
  13186. # Certain architectures don't really have long double, even though
  13187. # AC_CHECK_FUNCS would otherwise find the following functions.
  13188. if test "x${ac_cv_type_long_double_wider}" = "xyes" ; then
  13189. for ac_func in exp2l log2l exp10l log10l sinl cosl tanl asinl acosl atanl atan2l powl sqrtl rintl expl logl remainderl fmodl roundl truncl floorl ceill
  13190. do :
  13191. as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  13192. ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
  13193. if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  13194. cat >>confdefs.h <<_ACEOF
  13195. #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  13196. _ACEOF
  13197. fi
  13198. done
  13199. fi
  13200. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLONG_MAX in limits.h" >&5
  13201. $as_echo_n "checking for LLONG_MAX in limits.h... " >&6; }
  13202. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13203. /* end confdefs.h. */
  13204. #include <limits.h>
  13205. int
  13206. main ()
  13207. {
  13208. long long foo = LLONG_MAX
  13209. ;
  13210. return 0;
  13211. }
  13212. _ACEOF
  13213. if ac_fn_c_try_link "$LINENO"; then :
  13214. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13215. $as_echo "yes" >&6; }
  13216. $as_echo "#define HAVE_LLONG_MAX 1" >>confdefs.h
  13217. else
  13218. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13219. $as_echo "no" >&6; }
  13220. fi
  13221. rm -f core conftest.err conftest.$ac_objext \
  13222. conftest$ac_exeext conftest.$ac_ext
  13223. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timersub in time.h" >&5
  13224. $as_echo_n "checking for timersub in time.h... " >&6; }
  13225. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13226. /* end confdefs.h. */
  13227. #include <sys/time.h>
  13228. int
  13229. main ()
  13230. {
  13231. struct timeval *a; timersub(a, a, a);
  13232. ;
  13233. return 0;
  13234. }
  13235. _ACEOF
  13236. if ac_fn_c_try_link "$LINENO"; then :
  13237. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13238. $as_echo "yes" >&6; }
  13239. $as_echo "#define HAVE_TIMERSUB 1" >>confdefs.h
  13240. else
  13241. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13242. $as_echo "no" >&6; }
  13243. fi
  13244. rm -f core conftest.err conftest.$ac_objext \
  13245. conftest$ac_exeext conftest.$ac_ext
  13246. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of GNU ld that supports the --dynamic-list flag" >&5
  13247. $as_echo_n "checking for a version of GNU ld that supports the --dynamic-list flag... " >&6; }
  13248. old_LDFLAGS=${LDFLAGS}
  13249. cat >conftest.dynamics <<_ACEOF
  13250. {
  13251. *ast_*;
  13252. };
  13253. _ACEOF
  13254. LDFLAGS="${LDFLAGS} -Wl,--dynamic-list,conftest.dynamics"
  13255. PBX_DYNAMIC_LIST=0
  13256. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13257. /* end confdefs.h. */
  13258. int
  13259. main ()
  13260. {
  13261. ;
  13262. return 0;
  13263. }
  13264. _ACEOF
  13265. if ac_fn_c_try_link "$LINENO"; then :
  13266. PBX_DYNAMIC_LIST=1
  13267. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13268. $as_echo "yes" >&6; }
  13269. else
  13270. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13271. $as_echo "no" >&6; }
  13272. fi
  13273. rm -f core conftest.err conftest.$ac_objext \
  13274. conftest$ac_exeext conftest.$ac_ext
  13275. LDFLAGS=${old_LDFLAGS}
  13276. rm -f conftest.dynamics
  13277. ac_fn_c_check_header_mongrel "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
  13278. if test "x$ac_cv_header_sys_poll_h" = xyes; then :
  13279. HAS_POLL=1
  13280. $as_echo "#define HAVE_SYS_POLL_H 1" >>confdefs.h
  13281. fi
  13282. # Check whether --enable-internal-poll was given.
  13283. if test "${enable_internal_poll+set}" = set; then :
  13284. enableval=$enable_internal_poll; case "${enableval}" in
  13285. y|ye|yes) HAS_POLL="";;
  13286. n|no) HAS_POLL="${HAS_POLL}" ;;
  13287. *) as_fn_error $? "bad value ${enableval} for --enable-internal-poll" "$LINENO" 5 ;;
  13288. esac
  13289. fi
  13290. # Check whether --enable-asteriskssl was given.
  13291. if test "${enable_asteriskssl+set}" = set; then :
  13292. enableval=$enable_asteriskssl; case "${enableval}" in
  13293. y|ye|yes) AST_ASTERISKSSL=yes ;;
  13294. n|no) AST_ASTERISKSSL=no ;;
  13295. *) as_fn_error $? "bad value ${enableval} for --disable-asteriskssl" "$LINENO" 5 ;;
  13296. esac
  13297. else
  13298. AST_ASTERISKSSL=yes
  13299. fi
  13300. # https support (in main/http.c) uses funopen on BSD systems,
  13301. # fopencookie on linux
  13302. for ac_func in funopen fopencookie
  13303. do :
  13304. as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  13305. ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
  13306. if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  13307. cat >>confdefs.h <<_ACEOF
  13308. #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  13309. _ACEOF
  13310. fi
  13311. done
  13312. for ac_func in inet_aton
  13313. do :
  13314. ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
  13315. if test "x$ac_cv_func_inet_aton" = xyes; then :
  13316. cat >>confdefs.h <<_ACEOF
  13317. #define HAVE_INET_ATON 1
  13318. _ACEOF
  13319. fi
  13320. done
  13321. # check if we have IP_PKTINFO constant defined
  13322. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IP_PKTINFO" >&5
  13323. $as_echo_n "checking for IP_PKTINFO... " >&6; }
  13324. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13325. /* end confdefs.h. */
  13326. #include <netinet/in.h>
  13327. int
  13328. main ()
  13329. {
  13330. int pi = IP_PKTINFO;
  13331. ;
  13332. return 0;
  13333. }
  13334. _ACEOF
  13335. if ac_fn_c_try_link "$LINENO"; then :
  13336. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13337. $as_echo "yes" >&6; }
  13338. $as_echo "#define HAVE_PKTINFO 1" >>confdefs.h
  13339. else
  13340. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13341. $as_echo "no" >&6; }
  13342. fi
  13343. rm -f core conftest.err conftest.$ac_objext \
  13344. conftest$ac_exeext conftest.$ac_ext
  13345. # some systems already have gethostbyname_r so we don't need to build ours in main/utils.c
  13346. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
  13347. $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
  13348. if ${ac_cv_search_gethostbyname_r+:} false; then :
  13349. $as_echo_n "(cached) " >&6
  13350. else
  13351. ac_func_search_save_LIBS=$LIBS
  13352. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13353. /* end confdefs.h. */
  13354. /* Override any GCC internal prototype to avoid an error.
  13355. Use char because int might match the return type of a GCC
  13356. builtin and then its argument prototype would still apply. */
  13357. #ifdef __cplusplus
  13358. extern "C"
  13359. #endif
  13360. char gethostbyname_r ();
  13361. int
  13362. main ()
  13363. {
  13364. return gethostbyname_r ();
  13365. ;
  13366. return 0;
  13367. }
  13368. _ACEOF
  13369. for ac_lib in '' socket nsl; do
  13370. if test -z "$ac_lib"; then
  13371. ac_res="none required"
  13372. else
  13373. ac_res=-l$ac_lib
  13374. LIBS="-l$ac_lib $ac_func_search_save_LIBS"
  13375. fi
  13376. if ac_fn_c_try_link "$LINENO"; then :
  13377. ac_cv_search_gethostbyname_r=$ac_res
  13378. fi
  13379. rm -f core conftest.err conftest.$ac_objext \
  13380. conftest$ac_exeext
  13381. if ${ac_cv_search_gethostbyname_r+:} false; then :
  13382. break
  13383. fi
  13384. done
  13385. if ${ac_cv_search_gethostbyname_r+:} false; then :
  13386. else
  13387. ac_cv_search_gethostbyname_r=no
  13388. fi
  13389. rm conftest.$ac_ext
  13390. LIBS=$ac_func_search_save_LIBS
  13391. fi
  13392. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
  13393. $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
  13394. ac_res=$ac_cv_search_gethostbyname_r
  13395. if test "$ac_res" != no; then :
  13396. test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  13397. fi
  13398. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r with 6 arguments" >&5
  13399. $as_echo_n "checking for gethostbyname_r with 6 arguments... " >&6; }
  13400. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13401. /* end confdefs.h. */
  13402. #include <stdlib.h>
  13403. #include <netdb.h>
  13404. int
  13405. main ()
  13406. {
  13407. struct hostent *he = gethostbyname_r((const char *)NULL, (struct hostent *)NULL, (char *)NULL, (int)0, (struct hostent **)NULL, (int *)NULL);
  13408. ;
  13409. return 0;
  13410. }
  13411. _ACEOF
  13412. if ac_fn_c_try_link "$LINENO"; then :
  13413. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13414. $as_echo "yes" >&6; }
  13415. $as_echo "#define HAVE_GETHOSTBYNAME_R_6 1" >>confdefs.h
  13416. else
  13417. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13418. $as_echo "no" >&6; }
  13419. fi
  13420. rm -f core conftest.err conftest.$ac_objext \
  13421. conftest$ac_exeext conftest.$ac_ext
  13422. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r with 5 arguments" >&5
  13423. $as_echo_n "checking for gethostbyname_r with 5 arguments... " >&6; }
  13424. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13425. /* end confdefs.h. */
  13426. #include <stdlib.h>
  13427. #include <netdb.h>
  13428. int
  13429. main ()
  13430. {
  13431. struct hostent *he = gethostbyname_r((const char *)NULL, (struct hostent *)NULL, (char *)NULL, (int)0, (int *)NULL);
  13432. ;
  13433. return 0;
  13434. }
  13435. _ACEOF
  13436. if ac_fn_c_try_link "$LINENO"; then :
  13437. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13438. $as_echo "yes" >&6; }
  13439. $as_echo "#define HAVE_GETHOSTBYNAME_R_5 1" >>confdefs.h
  13440. else
  13441. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13442. $as_echo "no" >&6; }
  13443. fi
  13444. rm -f core conftest.err conftest.$ac_objext \
  13445. conftest$ac_exeext conftest.$ac_ext
  13446. ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default"
  13447. if test "x$ac_cv_header_byteswap_h" = xyes; then :
  13448. cat >>confdefs.h <<_ACEOF
  13449. #define HAVE_BYTESWAP_H 1
  13450. _ACEOF
  13451. fi
  13452. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __swap16 variant of <sys/endian.h> byteswapping macros" >&5
  13453. $as_echo_n "checking for __swap16 variant of <sys/endian.h> byteswapping macros... " >&6; }
  13454. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13455. /* end confdefs.h. */
  13456. #include <sys/endian.h>
  13457. int
  13458. main ()
  13459. {
  13460. int a = 1; int b = __swap16(a);
  13461. ;
  13462. return 0;
  13463. }
  13464. _ACEOF
  13465. if ac_fn_c_try_link "$LINENO"; then :
  13466. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13467. $as_echo "yes" >&6; }
  13468. $as_echo "#define HAVE_SYS_ENDIAN_SWAP16 1" >>confdefs.h
  13469. else
  13470. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13471. $as_echo "no" >&6; }
  13472. fi
  13473. rm -f core conftest.err conftest.$ac_objext \
  13474. conftest$ac_exeext conftest.$ac_ext
  13475. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bswap16 variant of <sys/endian.h> byteswapping macros" >&5
  13476. $as_echo_n "checking for bswap16 variant of <sys/endian.h> byteswapping macros... " >&6; }
  13477. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13478. /* end confdefs.h. */
  13479. #include <sys/endian.h>
  13480. int
  13481. main ()
  13482. {
  13483. int a = 1; int b = bswap16(a);
  13484. ;
  13485. return 0;
  13486. }
  13487. _ACEOF
  13488. if ac_fn_c_try_link "$LINENO"; then :
  13489. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13490. $as_echo "yes" >&6; }
  13491. $as_echo "#define HAVE_SYS_ENDIAN_BSWAP16 1" >>confdefs.h
  13492. else
  13493. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13494. $as_echo "no" >&6; }
  13495. fi
  13496. rm -f core conftest.err conftest.$ac_objext \
  13497. conftest$ac_exeext conftest.$ac_ext
  13498. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t in locale.h" >&5
  13499. $as_echo_n "checking for locale_t in locale.h... " >&6; }
  13500. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13501. /* end confdefs.h. */
  13502. #include <locale.h>
  13503. int
  13504. main ()
  13505. {
  13506. locale_t lt = NULL
  13507. ;
  13508. return 0;
  13509. }
  13510. _ACEOF
  13511. if ac_fn_c_try_link "$LINENO"; then :
  13512. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13513. $as_echo "yes" >&6; }
  13514. $as_echo "#define HAVE_LOCALE_T_IN_LOCALE_H 1" >>confdefs.h
  13515. else
  13516. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13517. $as_echo "no" >&6; }
  13518. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t in xlocale.h" >&5
  13519. $as_echo_n "checking for locale_t in xlocale.h... " >&6; }
  13520. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13521. /* end confdefs.h. */
  13522. #include <xlocale.h>
  13523. int
  13524. main ()
  13525. {
  13526. locale_t lt = NULL
  13527. ;
  13528. return 0;
  13529. }
  13530. _ACEOF
  13531. if ac_fn_c_try_link "$LINENO"; then :
  13532. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13533. $as_echo "yes" >&6; }
  13534. $as_echo "#define HAVE_LOCALE_T_IN_XLOCALE_H 1" >>confdefs.h
  13535. else
  13536. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13537. $as_echo "no" >&6; }
  13538. fi
  13539. rm -f core conftest.err conftest.$ac_objext \
  13540. conftest$ac_exeext conftest.$ac_ext
  13541. fi
  13542. rm -f core conftest.err conftest.$ac_objext \
  13543. conftest$ac_exeext conftest.$ac_ext
  13544. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_EVTONLY in fcntl.h" >&5
  13545. $as_echo_n "checking for O_EVTONLY in fcntl.h... " >&6; }
  13546. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13547. /* end confdefs.h. */
  13548. #include <fcntl.h>
  13549. int
  13550. main ()
  13551. {
  13552. int a = O_EVTONLY;
  13553. ;
  13554. return 0;
  13555. }
  13556. _ACEOF
  13557. if ac_fn_c_try_link "$LINENO"; then :
  13558. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13559. $as_echo "yes" >&6; }
  13560. $as_echo "#define HAVE_O_EVTONLY 1" >>confdefs.h
  13561. else
  13562. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13563. $as_echo "no" >&6; }
  13564. fi
  13565. rm -f core conftest.err conftest.$ac_objext \
  13566. conftest$ac_exeext conftest.$ac_ext
  13567. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_SYMLINK in fcntl.h" >&5
  13568. $as_echo_n "checking for O_SYMLINK in fcntl.h... " >&6; }
  13569. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13570. /* end confdefs.h. */
  13571. #include <fcntl.h>
  13572. int
  13573. main ()
  13574. {
  13575. int a = O_SYMLINK;
  13576. ;
  13577. return 0;
  13578. }
  13579. _ACEOF
  13580. if ac_fn_c_try_link "$LINENO"; then :
  13581. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13582. $as_echo "yes" >&6; }
  13583. $as_echo "#define HAVE_O_SYMLINK 1" >>confdefs.h
  13584. else
  13585. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13586. $as_echo "no" >&6; }
  13587. fi
  13588. rm -f core conftest.err conftest.$ac_objext \
  13589. conftest$ac_exeext conftest.$ac_ext
  13590. if test "x${PBX_PTHREAD_RWLOCK_INITIALIZER}" != "x1"; then
  13591. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_RWLOCK_INITIALIZER in pthread.h" >&5
  13592. $as_echo_n "checking for PTHREAD_RWLOCK_INITIALIZER in pthread.h... " >&6; }
  13593. saved_cppflags="${CPPFLAGS}"
  13594. if test "x${PTHREAD_RWLOCK_INITIALIZER_DIR}" != "x"; then
  13595. PTHREAD_RWLOCK_INITIALIZER_INCLUDE="-I${PTHREAD_RWLOCK_INITIALIZER_DIR}/include"
  13596. fi
  13597. CPPFLAGS="${CPPFLAGS} ${PTHREAD_RWLOCK_INITIALIZER_INCLUDE}"
  13598. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13599. /* end confdefs.h. */
  13600. #include <pthread.h>
  13601. int
  13602. main ()
  13603. {
  13604. #if defined(PTHREAD_RWLOCK_INITIALIZER)
  13605. int foo = 0;
  13606. #else
  13607. int foo = bar;
  13608. #endif
  13609. 0
  13610. ;
  13611. return 0;
  13612. }
  13613. _ACEOF
  13614. if ac_fn_c_try_compile "$LINENO"; then :
  13615. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13616. $as_echo "yes" >&6; }
  13617. PBX_PTHREAD_RWLOCK_INITIALIZER=1
  13618. $as_echo "#define HAVE_PTHREAD_RWLOCK_INITIALIZER 1" >>confdefs.h
  13619. else
  13620. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13621. $as_echo "no" >&6; }
  13622. fi
  13623. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  13624. CPPFLAGS="${saved_cppflags}"
  13625. fi
  13626. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_RWLOCK_PREFER_WRITER_NP in pthread.h" >&5
  13627. $as_echo_n "checking for PTHREAD_RWLOCK_PREFER_WRITER_NP in pthread.h... " >&6; }
  13628. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13629. /* end confdefs.h. */
  13630. #include <pthread.h>
  13631. int
  13632. main ()
  13633. {
  13634. int a = PTHREAD_RWLOCK_PREFER_WRITER_NP;
  13635. ;
  13636. return 0;
  13637. }
  13638. _ACEOF
  13639. if ac_fn_c_try_link "$LINENO"; then :
  13640. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13641. $as_echo "yes" >&6; }
  13642. $as_echo "#define HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NP 1" >>confdefs.h
  13643. else
  13644. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13645. $as_echo "no" >&6; }
  13646. fi
  13647. rm -f core conftest.err conftest.$ac_objext \
  13648. conftest$ac_exeext conftest.$ac_ext
  13649. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_RECURSIVE_NP in pthread.h" >&5
  13650. $as_echo_n "checking for PTHREAD_MUTEX_RECURSIVE_NP in pthread.h... " >&6; }
  13651. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13652. /* end confdefs.h. */
  13653. #include <pthread.h>
  13654. int
  13655. main ()
  13656. {
  13657. int a = PTHREAD_MUTEX_RECURSIVE_NP;
  13658. ;
  13659. return 0;
  13660. }
  13661. _ACEOF
  13662. if ac_fn_c_try_link "$LINENO"; then :
  13663. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13664. $as_echo "yes" >&6; }
  13665. $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE_NP 1" >>confdefs.h
  13666. else
  13667. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13668. $as_echo "no" >&6; }
  13669. fi
  13670. rm -f core conftest.err conftest.$ac_objext \
  13671. conftest$ac_exeext conftest.$ac_ext
  13672. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_ADAPTIVE_NP in pthread.h" >&5
  13673. $as_echo_n "checking for PTHREAD_MUTEX_ADAPTIVE_NP in pthread.h... " >&6; }
  13674. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13675. /* end confdefs.h. */
  13676. #include <pthread.h>
  13677. int
  13678. main ()
  13679. {
  13680. int a = PTHREAD_MUTEX_ADAPTIVE_NP;
  13681. ;
  13682. return 0;
  13683. }
  13684. _ACEOF
  13685. if ac_fn_c_try_link "$LINENO"; then :
  13686. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13687. $as_echo "yes" >&6; }
  13688. $as_echo "#define HAVE_PTHREAD_MUTEX_ADAPTIVE_NP 1" >>confdefs.h
  13689. else
  13690. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13691. $as_echo "no" >&6; }
  13692. fi
  13693. rm -f core conftest.err conftest.$ac_objext \
  13694. conftest$ac_exeext conftest.$ac_ext
  13695. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_spinlock_t in pthread.h" >&5
  13696. $as_echo_n "checking for pthread_spinlock_t in pthread.h... " >&6; }
  13697. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13698. /* end confdefs.h. */
  13699. #include <pthread.h>
  13700. int
  13701. main ()
  13702. {
  13703. pthread_spinlock_t spin;
  13704. ;
  13705. return 0;
  13706. }
  13707. _ACEOF
  13708. if ac_fn_c_try_link "$LINENO"; then :
  13709. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13710. $as_echo "yes" >&6; }
  13711. $as_echo "#define HAVE_PTHREAD_SPINLOCK 1" >>confdefs.h
  13712. else
  13713. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13714. $as_echo "no" >&6; }
  13715. fi
  13716. rm -f core conftest.err conftest.$ac_objext \
  13717. conftest$ac_exeext conftest.$ac_ext
  13718. save_LIBS="$LIBS"
  13719. save_CFLAGS="$CFLAGS"
  13720. LIBS="$PTHREAD_LIBS $LIBS"
  13721. CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
  13722. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_timedwrlock() in pthread.h" >&5
  13723. $as_echo_n "checking for pthread_rwlock_timedwrlock() in pthread.h... " >&6; }
  13724. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13725. /* end confdefs.h. */
  13726. #include <pthread.h>
  13727. #include <time.h>
  13728. int
  13729. main ()
  13730. {
  13731. pthread_rwlock_t foo; struct timespec bar; pthread_rwlock_timedwrlock(&foo, &bar)
  13732. ;
  13733. return 0;
  13734. }
  13735. _ACEOF
  13736. if ac_fn_c_try_link "$LINENO"; then :
  13737. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13738. $as_echo "yes" >&6; }
  13739. ac_cv_pthread_rwlock_timedwrlock="yes"
  13740. else
  13741. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13742. $as_echo "no" >&6; }
  13743. ac_cv_pthread_rwlock_timedwrlock="no"
  13744. fi
  13745. rm -f core conftest.err conftest.$ac_objext \
  13746. conftest$ac_exeext conftest.$ac_ext
  13747. # Some platforms define sem_init(), but only support sem_open(). joyous.
  13748. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working unnamed semaphores" >&5
  13749. $as_echo_n "checking for working unnamed semaphores... " >&6; }
  13750. if test "$cross_compiling" = yes; then :
  13751. { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile" >&5
  13752. $as_echo "cross-compile" >&6; }
  13753. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result yes guessed because of cross compilation" >&5
  13754. $as_echo "$as_me: WARNING: result yes guessed because of cross compilation" >&6;}
  13755. $as_echo "#define HAS_WORKING_SEMAPHORE 1" >>confdefs.h
  13756. else
  13757. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13758. /* end confdefs.h. */
  13759. #include <semaphore.h>
  13760. int
  13761. main ()
  13762. {
  13763. sem_t sem; return sem_init(&sem, 0, 0);
  13764. ;
  13765. return 0;
  13766. }
  13767. _ACEOF
  13768. if ac_fn_c_try_run "$LINENO"; then :
  13769. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13770. $as_echo "yes" >&6; }
  13771. $as_echo "#define HAS_WORKING_SEMAPHORE 1" >>confdefs.h
  13772. else
  13773. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13774. $as_echo "no" >&6; }
  13775. fi
  13776. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  13777. conftest.$ac_objext conftest.beam conftest.$ac_ext
  13778. fi
  13779. LIBS="$save_LIBS"
  13780. CFLAGS="$save_CFLAGS"
  13781. if test "${ac_cv_pthread_rwlock_timedwrlock}" = "yes"; then
  13782. $as_echo "#define HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK 1" >>confdefs.h
  13783. fi
  13784. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_ONCE_INIT needs braces" >&5
  13785. $as_echo_n "checking if PTHREAD_ONCE_INIT needs braces... " >&6; }
  13786. saved_CFLAGS="${CFLAGS}"
  13787. CFLAGS="${CFLAGS} -Werror -Wmissing-braces"
  13788. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13789. /* end confdefs.h. */
  13790. #include <pthread.h>
  13791. void empty(){}
  13792. int
  13793. main ()
  13794. {
  13795. pthread_once_t once = PTHREAD_ONCE_INIT; pthread_once(&once, empty);
  13796. ;
  13797. return 0;
  13798. }
  13799. _ACEOF
  13800. if ac_fn_c_try_compile "$LINENO"; then :
  13801. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13802. $as_echo "no" >&6; }
  13803. ac_cv_pthread_once_needsbraces="no"
  13804. else
  13805. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13806. $as_echo "yes" >&6; }
  13807. ac_cv_pthread_once_needsbraces="yes"
  13808. fi
  13809. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  13810. CFLAGS="${saved_CFLAGS}"
  13811. if test "${ac_cv_pthread_once_needsbraces}" = "yes"; then
  13812. $as_echo "#define PTHREAD_ONCE_INIT_NEEDS_BRACES 1" >>confdefs.h
  13813. fi
  13814. if test "x${PBX_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP}" != "x1"; then
  13815. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP in pthread.h" >&5
  13816. $as_echo_n "checking for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP in pthread.h... " >&6; }
  13817. saved_cppflags="${CPPFLAGS}"
  13818. if test "x${PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP_DIR}" != "x"; then
  13819. PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP_INCLUDE="-I${PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP_DIR}/include"
  13820. fi
  13821. CPPFLAGS="${CPPFLAGS} ${PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP_INCLUDE}"
  13822. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13823. /* end confdefs.h. */
  13824. #include <pthread.h>
  13825. int
  13826. main ()
  13827. {
  13828. #if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
  13829. int foo = 0;
  13830. #else
  13831. int foo = bar;
  13832. #endif
  13833. 0
  13834. ;
  13835. return 0;
  13836. }
  13837. _ACEOF
  13838. if ac_fn_c_try_compile "$LINENO"; then :
  13839. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13840. $as_echo "yes" >&6; }
  13841. PBX_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP=1
  13842. $as_echo "#define HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP 1" >>confdefs.h
  13843. else
  13844. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13845. $as_echo "no" >&6; }
  13846. fi
  13847. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  13848. CPPFLAGS="${saved_cppflags}"
  13849. fi
  13850. # Can we compare a mutex to its initial value?
  13851. # Generally yes on OpenBSD/FreeBSD and no on Mac OS X.
  13852. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compare a mutex to its initial value" >&5
  13853. $as_echo_n "checking whether we can compare a mutex to its initial value... " >&6; }
  13854. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13855. /* end confdefs.h. */
  13856. #include <pthread.h>
  13857. int
  13858. main ()
  13859. {
  13860. pthread_mutex_t lock;
  13861. if ((lock) != ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
  13862. return 0;
  13863. }
  13864. return 0
  13865. ;
  13866. return 0;
  13867. }
  13868. _ACEOF
  13869. if ac_fn_c_try_link "$LINENO"; then :
  13870. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13871. $as_echo "yes" >&6; }
  13872. $as_echo "#define CAN_COMPARE_MUTEX_TO_INIT_VALUE 1" >>confdefs.h
  13873. else
  13874. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13875. $as_echo "no" >&6; }
  13876. fi
  13877. rm -f core conftest.err conftest.$ac_objext \
  13878. conftest$ac_exeext conftest.$ac_ext
  13879. #if test "${cross_compiling}" = "no";
  13880. #then
  13881. #AC_MSG_CHECKING(for working epoll support)
  13882. #AC_LINK_IFELSE(
  13883. #AC_LANG_PROGRAM([#include <sys/epoll.h>], [int res = epoll_create(10);
  13884. # if (res < 0)
  13885. # return 1;
  13886. # close (res);
  13887. # return 0;]),
  13888. #AC_MSG_RESULT(yes)
  13889. #AC_DEFINE([HAVE_EPOLL], 1, [Define to 1 if your system has working epoll support.]),
  13890. #AC_MSG_RESULT(no)
  13891. #)
  13892. #fi
  13893. # for FreeBSD thr_self
  13894. for ac_header in sys/thr.h
  13895. do :
  13896. ac_fn_c_check_header_mongrel "$LINENO" "sys/thr.h" "ac_cv_header_sys_thr_h" "$ac_includes_default"
  13897. if test "x$ac_cv_header_sys_thr_h" = xyes; then :
  13898. cat >>confdefs.h <<_ACEOF
  13899. #define HAVE_SYS_THR_H 1
  13900. _ACEOF
  13901. fi
  13902. done
  13903. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler atomic operations" >&5
  13904. $as_echo_n "checking for compiler atomic operations... " >&6; }
  13905. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13906. /* end confdefs.h. */
  13907. int
  13908. main ()
  13909. {
  13910. int foo1; int foo2 = __sync_fetch_and_add(&foo1, 1);
  13911. ;
  13912. return 0;
  13913. }
  13914. _ACEOF
  13915. if ac_fn_c_try_link "$LINENO"; then :
  13916. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13917. $as_echo "yes" >&6; }
  13918. $as_echo "#define HAVE_GCC_ATOMICS 1" >>confdefs.h
  13919. else
  13920. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13921. $as_echo "no" >&6; }
  13922. fi
  13923. rm -f core conftest.err conftest.$ac_objext \
  13924. conftest$ac_exeext conftest.$ac_ext
  13925. # glibc, AFAIK, is the only C library that makes printing a NULL to a string safe.
  13926. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system printf is NULL-safe." >&5
  13927. $as_echo_n "checking if your system printf is NULL-safe.... " >&6; }
  13928. if test "$cross_compiling" = yes; then :
  13929. # It's unlikely an embedded system will have this.
  13930. { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
  13931. $as_echo "unknown" >&6; }
  13932. else
  13933. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13934. /* end confdefs.h. */
  13935. #include <stdio.h>
  13936. int
  13937. main ()
  13938. {
  13939. printf("%s", NULL)
  13940. ;
  13941. return 0;
  13942. }
  13943. _ACEOF
  13944. if ac_fn_c_try_run "$LINENO"; then :
  13945. $as_echo "#define HAVE_NULLSAFE_PRINTF 1" >>confdefs.h
  13946. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13947. $as_echo "yes" >&6; }
  13948. else
  13949. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13950. $as_echo "no" >&6; }
  13951. fi
  13952. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  13953. conftest.$ac_objext conftest.beam conftest.$ac_ext
  13954. fi
  13955. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can increase the maximum select-able file descriptor" >&5
  13956. $as_echo_n "checking if we can increase the maximum select-able file descriptor... " >&6; }
  13957. if test "$cross_compiling" = yes; then :
  13958. { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile" >&5
  13959. $as_echo "cross-compile" >&6; }
  13960. else
  13961. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13962. /* end confdefs.h. */
  13963. #include <stdio.h>
  13964. #include <sys/select.h>
  13965. #include <sys/time.h>
  13966. #include <sys/resource.h>
  13967. #include <string.h>
  13968. #include <errno.h>
  13969. #include <stdlib.h>
  13970. #include <sys/types.h>
  13971. #include <sys/stat.h>
  13972. #include <fcntl.h>
  13973. #include <unistd.h>
  13974. int
  13975. main ()
  13976. {
  13977. struct rlimit rlim = { FD_SETSIZE * 2, FD_SETSIZE * 2 };
  13978. int fd0, fd1;
  13979. struct timeval tv = { 0, };
  13980. struct ast_fdset { long fds_bits[[1024]]; } fds = { { 0, } };
  13981. if (setrlimit(RLIMIT_NOFILE, &rlim)) { exit(1); }
  13982. if ((fd0 = open("/dev/null", O_RDONLY)) < 0) { exit(1); }
  13983. if (dup2(fd0, (fd1 = FD_SETSIZE + 1)) < 0) { exit(1); }
  13984. FD_SET(fd0, (fd_set *) &fds);
  13985. FD_SET(fd1, (fd_set *) &fds);
  13986. if (select(FD_SETSIZE + 2, (fd_set *) &fds, NULL, NULL, &tv) < 0) { exit(1); }
  13987. exit(0)
  13988. ;
  13989. return 0;
  13990. }
  13991. _ACEOF
  13992. if ac_fn_c_try_run "$LINENO"; then :
  13993. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  13994. $as_echo "yes" >&6; }
  13995. $as_echo "#define HAVE_VARIABLE_FDSET 1" >>confdefs.h
  13996. else
  13997. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  13998. $as_echo "no" >&6; }
  13999. fi
  14000. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  14001. conftest.$ac_objext conftest.beam conftest.$ac_ext
  14002. fi
  14003. if test "${ac_cv_have_variable_fdset}x" = "0x"; then
  14004. if test "$cross_compiling" = yes; then :
  14005. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  14006. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  14007. as_fn_error $? "cannot run test program while cross compiling
  14008. See \`config.log' for more details" "$LINENO" 5; }
  14009. else
  14010. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14011. /* end confdefs.h. */
  14012. #include <unistd.h>
  14013. #include <sys/types.h>
  14014. #include <stdlib.h>
  14015. int
  14016. main ()
  14017. {
  14018. if (getuid() != 0) { exit(1); }
  14019. ;
  14020. return 0;
  14021. }
  14022. _ACEOF
  14023. if ac_fn_c_try_run "$LINENO"; then :
  14024. $as_echo "#define CONFIGURE_RAN_AS_ROOT 1" >>confdefs.h
  14025. fi
  14026. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  14027. conftest.$ac_objext conftest.beam conftest.$ac_ext
  14028. fi
  14029. fi
  14030. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute pure' support" >&5
  14031. $as_echo_n "checking for compiler 'attribute pure' support... " >&6; }
  14032. saved_CFLAGS="$CFLAGS"
  14033. CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
  14034. if test "x" = "x"
  14035. then
  14036. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14037. /* end confdefs.h. */
  14038. void __attribute__((pure)) *test(void *muffin, ...) {return (void *) 0;}
  14039. int
  14040. main ()
  14041. {
  14042. ;
  14043. return 0;
  14044. }
  14045. _ACEOF
  14046. if ac_fn_c_try_compile "$LINENO"; then :
  14047. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14048. $as_echo "yes" >&6; }
  14049. cat >>confdefs.h <<_ACEOF
  14050. #define HAVE_ATTRIBUTE_pure 1
  14051. _ACEOF
  14052. else
  14053. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14054. $as_echo "no" >&6; }
  14055. fi
  14056. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14057. else
  14058. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14059. /* end confdefs.h. */
  14060. void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
  14061. int
  14062. main ()
  14063. {
  14064. ;
  14065. return 0;
  14066. }
  14067. _ACEOF
  14068. if ac_fn_c_try_compile "$LINENO"; then :
  14069. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14070. $as_echo "yes" >&6; }
  14071. cat >>confdefs.h <<_ACEOF
  14072. #define HAVE_ATTRIBUTE_pure 1
  14073. _ACEOF
  14074. else
  14075. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14076. $as_echo "no" >&6; }
  14077. fi
  14078. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14079. fi
  14080. CFLAGS="$saved_CFLAGS"
  14081. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute malloc' support" >&5
  14082. $as_echo_n "checking for compiler 'attribute malloc' support... " >&6; }
  14083. saved_CFLAGS="$CFLAGS"
  14084. CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
  14085. if test "x" = "x"
  14086. then
  14087. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14088. /* end confdefs.h. */
  14089. void __attribute__((malloc)) *test(void *muffin, ...) {return (void *) 0;}
  14090. int
  14091. main ()
  14092. {
  14093. ;
  14094. return 0;
  14095. }
  14096. _ACEOF
  14097. if ac_fn_c_try_compile "$LINENO"; then :
  14098. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14099. $as_echo "yes" >&6; }
  14100. cat >>confdefs.h <<_ACEOF
  14101. #define HAVE_ATTRIBUTE_malloc 1
  14102. _ACEOF
  14103. else
  14104. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14105. $as_echo "no" >&6; }
  14106. fi
  14107. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14108. else
  14109. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14110. /* end confdefs.h. */
  14111. void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
  14112. int
  14113. main ()
  14114. {
  14115. ;
  14116. return 0;
  14117. }
  14118. _ACEOF
  14119. if ac_fn_c_try_compile "$LINENO"; then :
  14120. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14121. $as_echo "yes" >&6; }
  14122. cat >>confdefs.h <<_ACEOF
  14123. #define HAVE_ATTRIBUTE_malloc 1
  14124. _ACEOF
  14125. else
  14126. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14127. $as_echo "no" >&6; }
  14128. fi
  14129. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14130. fi
  14131. CFLAGS="$saved_CFLAGS"
  14132. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute const' support" >&5
  14133. $as_echo_n "checking for compiler 'attribute const' support... " >&6; }
  14134. saved_CFLAGS="$CFLAGS"
  14135. CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
  14136. if test "x" = "x"
  14137. then
  14138. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14139. /* end confdefs.h. */
  14140. void __attribute__((const)) *test(void *muffin, ...) {return (void *) 0;}
  14141. int
  14142. main ()
  14143. {
  14144. ;
  14145. return 0;
  14146. }
  14147. _ACEOF
  14148. if ac_fn_c_try_compile "$LINENO"; then :
  14149. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14150. $as_echo "yes" >&6; }
  14151. cat >>confdefs.h <<_ACEOF
  14152. #define HAVE_ATTRIBUTE_const 1
  14153. _ACEOF
  14154. else
  14155. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14156. $as_echo "no" >&6; }
  14157. fi
  14158. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14159. else
  14160. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14161. /* end confdefs.h. */
  14162. void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
  14163. int
  14164. main ()
  14165. {
  14166. ;
  14167. return 0;
  14168. }
  14169. _ACEOF
  14170. if ac_fn_c_try_compile "$LINENO"; then :
  14171. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14172. $as_echo "yes" >&6; }
  14173. cat >>confdefs.h <<_ACEOF
  14174. #define HAVE_ATTRIBUTE_const 1
  14175. _ACEOF
  14176. else
  14177. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14178. $as_echo "no" >&6; }
  14179. fi
  14180. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14181. fi
  14182. CFLAGS="$saved_CFLAGS"
  14183. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute unused' support" >&5
  14184. $as_echo_n "checking for compiler 'attribute unused' support... " >&6; }
  14185. saved_CFLAGS="$CFLAGS"
  14186. CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
  14187. if test "x" = "x"
  14188. then
  14189. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14190. /* end confdefs.h. */
  14191. void __attribute__((unused)) *test(void *muffin, ...) {return (void *) 0;}
  14192. int
  14193. main ()
  14194. {
  14195. ;
  14196. return 0;
  14197. }
  14198. _ACEOF
  14199. if ac_fn_c_try_compile "$LINENO"; then :
  14200. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14201. $as_echo "yes" >&6; }
  14202. cat >>confdefs.h <<_ACEOF
  14203. #define HAVE_ATTRIBUTE_unused 1
  14204. _ACEOF
  14205. else
  14206. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14207. $as_echo "no" >&6; }
  14208. fi
  14209. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14210. else
  14211. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14212. /* end confdefs.h. */
  14213. void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
  14214. int
  14215. main ()
  14216. {
  14217. ;
  14218. return 0;
  14219. }
  14220. _ACEOF
  14221. if ac_fn_c_try_compile "$LINENO"; then :
  14222. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14223. $as_echo "yes" >&6; }
  14224. cat >>confdefs.h <<_ACEOF
  14225. #define HAVE_ATTRIBUTE_unused 1
  14226. _ACEOF
  14227. else
  14228. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14229. $as_echo "no" >&6; }
  14230. fi
  14231. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14232. fi
  14233. CFLAGS="$saved_CFLAGS"
  14234. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute always_inline' support" >&5
  14235. $as_echo_n "checking for compiler 'attribute always_inline' support... " >&6; }
  14236. saved_CFLAGS="$CFLAGS"
  14237. CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
  14238. if test "x" = "x"
  14239. then
  14240. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14241. /* end confdefs.h. */
  14242. void __attribute__((always_inline)) *test(void *muffin, ...) {return (void *) 0;}
  14243. int
  14244. main ()
  14245. {
  14246. ;
  14247. return 0;
  14248. }
  14249. _ACEOF
  14250. if ac_fn_c_try_compile "$LINENO"; then :
  14251. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14252. $as_echo "yes" >&6; }
  14253. cat >>confdefs.h <<_ACEOF
  14254. #define HAVE_ATTRIBUTE_always_inline 1
  14255. _ACEOF
  14256. else
  14257. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14258. $as_echo "no" >&6; }
  14259. fi
  14260. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14261. else
  14262. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14263. /* end confdefs.h. */
  14264. void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
  14265. int
  14266. main ()
  14267. {
  14268. ;
  14269. return 0;
  14270. }
  14271. _ACEOF
  14272. if ac_fn_c_try_compile "$LINENO"; then :
  14273. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14274. $as_echo "yes" >&6; }
  14275. cat >>confdefs.h <<_ACEOF
  14276. #define HAVE_ATTRIBUTE_always_inline 1
  14277. _ACEOF
  14278. else
  14279. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14280. $as_echo "no" >&6; }
  14281. fi
  14282. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14283. fi
  14284. CFLAGS="$saved_CFLAGS"
  14285. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute deprecated' support" >&5
  14286. $as_echo_n "checking for compiler 'attribute deprecated' support... " >&6; }
  14287. saved_CFLAGS="$CFLAGS"
  14288. CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
  14289. if test "x" = "x"
  14290. then
  14291. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14292. /* end confdefs.h. */
  14293. void __attribute__((deprecated)) *test(void *muffin, ...) {return (void *) 0;}
  14294. int
  14295. main ()
  14296. {
  14297. ;
  14298. return 0;
  14299. }
  14300. _ACEOF
  14301. if ac_fn_c_try_compile "$LINENO"; then :
  14302. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14303. $as_echo "yes" >&6; }
  14304. cat >>confdefs.h <<_ACEOF
  14305. #define HAVE_ATTRIBUTE_deprecated 1
  14306. _ACEOF
  14307. else
  14308. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14309. $as_echo "no" >&6; }
  14310. fi
  14311. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14312. else
  14313. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14314. /* end confdefs.h. */
  14315. void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
  14316. int
  14317. main ()
  14318. {
  14319. ;
  14320. return 0;
  14321. }
  14322. _ACEOF
  14323. if ac_fn_c_try_compile "$LINENO"; then :
  14324. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14325. $as_echo "yes" >&6; }
  14326. cat >>confdefs.h <<_ACEOF
  14327. #define HAVE_ATTRIBUTE_deprecated 1
  14328. _ACEOF
  14329. else
  14330. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14331. $as_echo "no" >&6; }
  14332. fi
  14333. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14334. fi
  14335. CFLAGS="$saved_CFLAGS"
  14336. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute sentinel' support" >&5
  14337. $as_echo_n "checking for compiler 'attribute sentinel' support... " >&6; }
  14338. saved_CFLAGS="$CFLAGS"
  14339. CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
  14340. if test "x" = "x"
  14341. then
  14342. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14343. /* end confdefs.h. */
  14344. void __attribute__((sentinel)) *test(void *muffin, ...) {return (void *) 0;}
  14345. int
  14346. main ()
  14347. {
  14348. ;
  14349. return 0;
  14350. }
  14351. _ACEOF
  14352. if ac_fn_c_try_compile "$LINENO"; then :
  14353. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14354. $as_echo "yes" >&6; }
  14355. cat >>confdefs.h <<_ACEOF
  14356. #define HAVE_ATTRIBUTE_sentinel 1
  14357. _ACEOF
  14358. else
  14359. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14360. $as_echo "no" >&6; }
  14361. fi
  14362. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14363. else
  14364. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14365. /* end confdefs.h. */
  14366. void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
  14367. int
  14368. main ()
  14369. {
  14370. ;
  14371. return 0;
  14372. }
  14373. _ACEOF
  14374. if ac_fn_c_try_compile "$LINENO"; then :
  14375. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14376. $as_echo "yes" >&6; }
  14377. cat >>confdefs.h <<_ACEOF
  14378. #define HAVE_ATTRIBUTE_sentinel 1
  14379. _ACEOF
  14380. else
  14381. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14382. $as_echo "no" >&6; }
  14383. fi
  14384. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14385. fi
  14386. CFLAGS="$saved_CFLAGS"
  14387. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute warn_unused_result' support" >&5
  14388. $as_echo_n "checking for compiler 'attribute warn_unused_result' support... " >&6; }
  14389. saved_CFLAGS="$CFLAGS"
  14390. CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
  14391. if test "x" = "x"
  14392. then
  14393. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14394. /* end confdefs.h. */
  14395. void __attribute__((warn_unused_result)) *test(void *muffin, ...) {return (void *) 0;}
  14396. int
  14397. main ()
  14398. {
  14399. ;
  14400. return 0;
  14401. }
  14402. _ACEOF
  14403. if ac_fn_c_try_compile "$LINENO"; then :
  14404. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14405. $as_echo "yes" >&6; }
  14406. cat >>confdefs.h <<_ACEOF
  14407. #define HAVE_ATTRIBUTE_warn_unused_result 1
  14408. _ACEOF
  14409. else
  14410. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14411. $as_echo "no" >&6; }
  14412. fi
  14413. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14414. else
  14415. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14416. /* end confdefs.h. */
  14417. void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
  14418. int
  14419. main ()
  14420. {
  14421. ;
  14422. return 0;
  14423. }
  14424. _ACEOF
  14425. if ac_fn_c_try_compile "$LINENO"; then :
  14426. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14427. $as_echo "yes" >&6; }
  14428. cat >>confdefs.h <<_ACEOF
  14429. #define HAVE_ATTRIBUTE_warn_unused_result 1
  14430. _ACEOF
  14431. else
  14432. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14433. $as_echo "no" >&6; }
  14434. fi
  14435. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14436. fi
  14437. CFLAGS="$saved_CFLAGS"
  14438. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute may_alias' support" >&5
  14439. $as_echo_n "checking for compiler 'attribute may_alias' support... " >&6; }
  14440. saved_CFLAGS="$CFLAGS"
  14441. CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
  14442. if test "x" = "x"
  14443. then
  14444. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14445. /* end confdefs.h. */
  14446. void __attribute__((may_alias)) *test(void *muffin, ...) {return (void *) 0;}
  14447. int
  14448. main ()
  14449. {
  14450. ;
  14451. return 0;
  14452. }
  14453. _ACEOF
  14454. if ac_fn_c_try_compile "$LINENO"; then :
  14455. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14456. $as_echo "yes" >&6; }
  14457. cat >>confdefs.h <<_ACEOF
  14458. #define HAVE_ATTRIBUTE_may_alias 1
  14459. _ACEOF
  14460. else
  14461. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14462. $as_echo "no" >&6; }
  14463. fi
  14464. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14465. else
  14466. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14467. /* end confdefs.h. */
  14468. void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
  14469. int
  14470. main ()
  14471. {
  14472. ;
  14473. return 0;
  14474. }
  14475. _ACEOF
  14476. if ac_fn_c_try_compile "$LINENO"; then :
  14477. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14478. $as_echo "yes" >&6; }
  14479. cat >>confdefs.h <<_ACEOF
  14480. #define HAVE_ATTRIBUTE_may_alias 1
  14481. _ACEOF
  14482. else
  14483. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14484. $as_echo "no" >&6; }
  14485. fi
  14486. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14487. fi
  14488. CFLAGS="$saved_CFLAGS"
  14489. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute constructor' support" >&5
  14490. $as_echo_n "checking for compiler 'attribute constructor' support... " >&6; }
  14491. saved_CFLAGS="$CFLAGS"
  14492. CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
  14493. if test "x" = "x"
  14494. then
  14495. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14496. /* end confdefs.h. */
  14497. void __attribute__((constructor)) *test(void *muffin, ...) {return (void *) 0;}
  14498. int
  14499. main ()
  14500. {
  14501. ;
  14502. return 0;
  14503. }
  14504. _ACEOF
  14505. if ac_fn_c_try_compile "$LINENO"; then :
  14506. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14507. $as_echo "yes" >&6; }
  14508. cat >>confdefs.h <<_ACEOF
  14509. #define HAVE_ATTRIBUTE_constructor 1
  14510. _ACEOF
  14511. else
  14512. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14513. $as_echo "no" >&6; }
  14514. fi
  14515. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14516. else
  14517. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14518. /* end confdefs.h. */
  14519. void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
  14520. int
  14521. main ()
  14522. {
  14523. ;
  14524. return 0;
  14525. }
  14526. _ACEOF
  14527. if ac_fn_c_try_compile "$LINENO"; then :
  14528. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14529. $as_echo "yes" >&6; }
  14530. cat >>confdefs.h <<_ACEOF
  14531. #define HAVE_ATTRIBUTE_constructor 1
  14532. _ACEOF
  14533. else
  14534. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14535. $as_echo "no" >&6; }
  14536. fi
  14537. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14538. fi
  14539. CFLAGS="$saved_CFLAGS"
  14540. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute destructor' support" >&5
  14541. $as_echo_n "checking for compiler 'attribute destructor' support... " >&6; }
  14542. saved_CFLAGS="$CFLAGS"
  14543. CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
  14544. if test "x" = "x"
  14545. then
  14546. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14547. /* end confdefs.h. */
  14548. void __attribute__((destructor)) *test(void *muffin, ...) {return (void *) 0;}
  14549. int
  14550. main ()
  14551. {
  14552. ;
  14553. return 0;
  14554. }
  14555. _ACEOF
  14556. if ac_fn_c_try_compile "$LINENO"; then :
  14557. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14558. $as_echo "yes" >&6; }
  14559. cat >>confdefs.h <<_ACEOF
  14560. #define HAVE_ATTRIBUTE_destructor 1
  14561. _ACEOF
  14562. else
  14563. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14564. $as_echo "no" >&6; }
  14565. fi
  14566. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14567. else
  14568. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14569. /* end confdefs.h. */
  14570. void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
  14571. int
  14572. main ()
  14573. {
  14574. ;
  14575. return 0;
  14576. }
  14577. _ACEOF
  14578. if ac_fn_c_try_compile "$LINENO"; then :
  14579. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14580. $as_echo "yes" >&6; }
  14581. cat >>confdefs.h <<_ACEOF
  14582. #define HAVE_ATTRIBUTE_destructor 1
  14583. _ACEOF
  14584. else
  14585. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14586. $as_echo "no" >&6; }
  14587. fi
  14588. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14589. fi
  14590. CFLAGS="$saved_CFLAGS"
  14591. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -ffunction-sections support" >&5
  14592. $as_echo_n "checking for -ffunction-sections support... " >&6; }
  14593. saved_CFLAGS="${CFLAGS}"
  14594. CFLAGS="${CFLAGS} -ffunction-sections"
  14595. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14596. /* end confdefs.h. */
  14597. int
  14598. main ()
  14599. {
  14600. int x = 1;
  14601. ;
  14602. return 0;
  14603. }
  14604. _ACEOF
  14605. if ac_fn_c_try_compile "$LINENO"; then :
  14606. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14607. $as_echo "yes" >&6; }
  14608. saved_LDFLAGS="${LDFLAGS}"
  14609. LDFLAGS="${LDFLAGS} -Wl,--gc-sections"
  14610. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --gc-sections support" >&5
  14611. $as_echo_n "checking for --gc-sections support... " >&6; }
  14612. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14613. /* end confdefs.h. */
  14614. int
  14615. main ()
  14616. {
  14617. int x = 1;
  14618. ;
  14619. return 0;
  14620. }
  14621. _ACEOF
  14622. if ac_fn_c_try_link "$LINENO"; then :
  14623. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14624. $as_echo "yes" >&6; }
  14625. GC_CFLAGS="-ffunction-sections"
  14626. GC_LDFLAGS="-Wl,--gc-sections"
  14627. else
  14628. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14629. $as_echo "no" >&6; }
  14630. fi
  14631. rm -f core conftest.err conftest.$ac_objext \
  14632. conftest$ac_exeext conftest.$ac_ext
  14633. LDFLAGS="${saved_LDFLAGS}"
  14634. else
  14635. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14636. $as_echo "no" >&6; }
  14637. fi
  14638. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14639. CFLAGS="${saved_CFLAGS}"
  14640. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wdeclaration-after-statement support" >&5
  14641. $as_echo_n "checking for -Wdeclaration-after-statement support... " >&6; }
  14642. if $(${CC} -Wdeclaration-after-statement -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
  14643. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14644. $as_echo "yes" >&6; }
  14645. AST_DECLARATION_AFTER_STATEMENT=-Wdeclaration-after-statement
  14646. else
  14647. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14648. $as_echo "no" >&6; }
  14649. AST_DECLARATION_AFTER_STATEMENT=
  14650. fi
  14651. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wtrampolines support" >&5
  14652. $as_echo_n "checking for -Wtrampolines support... " >&6; }
  14653. if $(${CC} -Wtrampolines -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
  14654. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14655. $as_echo "yes" >&6; }
  14656. AST_TRAMPOLINES=-Wtrampolines
  14657. else
  14658. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14659. $as_echo "no" >&6; }
  14660. AST_TRAMPOLINES=
  14661. fi
  14662. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FORTIFY_SOURCE support" >&5
  14663. $as_echo_n "checking for _FORTIFY_SOURCE support... " >&6; }
  14664. if $(${CC} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
  14665. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14666. $as_echo "yes" >&6; }
  14667. AST_FORTIFY_SOURCE="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
  14668. else
  14669. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14670. $as_echo "no" >&6; }
  14671. AST_FORTIFY_SOURCE=
  14672. fi
  14673. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fno-strict-overflow" >&5
  14674. $as_echo_n "checking for -fno-strict-overflow... " >&6; }
  14675. if $(${CC} -O2 -fno-strict-overflow -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
  14676. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14677. $as_echo "yes" >&6; }
  14678. AST_NO_STRICT_OVERFLOW=-fno-strict-overflow
  14679. else
  14680. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14681. $as_echo "no" >&6; }
  14682. AST_NO_STRICT_OVERFLOW=
  14683. fi
  14684. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wshadow" >&5
  14685. $as_echo_n "checking for -Wshadow... " >&6; }
  14686. if $(${CC} -Wshadow -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
  14687. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14688. $as_echo "yes" >&6; }
  14689. AST_SHADOW_WARNINGS=-Wshadow
  14690. else
  14691. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14692. $as_echo "no" >&6; }
  14693. AST_SHADOW_WARNINGS=
  14694. fi
  14695. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -march=native support" >&5
  14696. $as_echo_n "checking for -march=native support... " >&6; }
  14697. if $(${CC} -march=native -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
  14698. if test "${CONFIG_CFLAGS}" = ""; then
  14699. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14700. $as_echo "yes" >&6; }
  14701. AST_NATIVE_ARCH=1
  14702. else
  14703. { $as_echo "$as_me:${as_lineno-$LINENO}: result: user CFLAGS present" >&5
  14704. $as_echo "user CFLAGS present" >&6; }
  14705. AST_NATIVE_ARCH=
  14706. fi
  14707. else
  14708. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14709. $as_echo "no" >&6; }
  14710. AST_NATIVE_ARCH=
  14711. fi
  14712. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fnested-functions" >&5
  14713. $as_echo_n "checking for -fnested-functions... " >&6; }
  14714. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14715. /* end confdefs.h. */
  14716. int
  14717. main ()
  14718. {
  14719. auto void foo(void); void foo(void) {}
  14720. ;
  14721. return 0;
  14722. }
  14723. _ACEOF
  14724. if ac_fn_c_try_compile "$LINENO"; then :
  14725. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14726. $as_echo "no" >&6; }
  14727. AST_NESTED_FUNCTIONS=
  14728. else
  14729. { $as_echo "$as_me:${as_lineno-$LINENO}: result: required" >&5
  14730. $as_echo "required" >&6; }
  14731. AST_NESTED_FUNCTIONS=-fnested-functions
  14732. fi
  14733. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14734. # Check whether --enable-rpath was given.
  14735. if test "${enable_rpath+set}" = set; then :
  14736. enableval=$enable_rpath; case "${enableval}" in
  14737. y|ye|yes) check_rpath=yes ;;
  14738. n|no) check_rpath=no ;;
  14739. *) as_fn_error $? "bad value ${enableval} for --disable-rpath" "$LINENO" 5 ;;
  14740. esac
  14741. else
  14742. check_rpath=yes
  14743. fi
  14744. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use rpath" >&5
  14745. $as_echo_n "checking whether to use rpath... " >&6; }
  14746. AST_RPATH=
  14747. if test "${check_rpath}" != yes; then
  14748. { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipped" >&5
  14749. $as_echo "skipped" >&6; }
  14750. elif test "${prefix}" = /usr || test "${prefix}" = NONE; then
  14751. { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed" >&5
  14752. $as_echo "not needed" >&6; }
  14753. else
  14754. AST_RPATH="-Wl,-rpath,${libdir}"
  14755. fi
  14756. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysinfo" >&5
  14757. $as_echo_n "checking for sysinfo... " >&6; }
  14758. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14759. /* end confdefs.h. */
  14760. #include <sys/sysinfo.h>
  14761. int
  14762. main ()
  14763. {
  14764. struct sysinfo sys_info; int uptime = sys_info.uptime
  14765. ;
  14766. return 0;
  14767. }
  14768. _ACEOF
  14769. if ac_fn_c_try_link "$LINENO"; then :
  14770. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14771. $as_echo "yes" >&6; }
  14772. $as_echo "#define HAVE_SYSINFO 1" >>confdefs.h
  14773. else
  14774. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14775. $as_echo "no" >&6; }
  14776. fi
  14777. rm -f core conftest.err conftest.$ac_objext \
  14778. conftest$ac_exeext conftest.$ac_ext
  14779. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_ninit" >&5
  14780. $as_echo_n "checking for library containing res_9_ninit... " >&6; }
  14781. if ${ac_cv_search_res_9_ninit+:} false; then :
  14782. $as_echo_n "(cached) " >&6
  14783. else
  14784. ac_func_search_save_LIBS=$LIBS
  14785. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14786. /* end confdefs.h. */
  14787. /* Override any GCC internal prototype to avoid an error.
  14788. Use char because int might match the return type of a GCC
  14789. builtin and then its argument prototype would still apply. */
  14790. #ifdef __cplusplus
  14791. extern "C"
  14792. #endif
  14793. char res_9_ninit ();
  14794. int
  14795. main ()
  14796. {
  14797. return res_9_ninit ();
  14798. ;
  14799. return 0;
  14800. }
  14801. _ACEOF
  14802. for ac_lib in '' resolv; do
  14803. if test -z "$ac_lib"; then
  14804. ac_res="none required"
  14805. else
  14806. ac_res=-l$ac_lib
  14807. LIBS="-l$ac_lib $ac_func_search_save_LIBS"
  14808. fi
  14809. if ac_fn_c_try_link "$LINENO"; then :
  14810. ac_cv_search_res_9_ninit=$ac_res
  14811. fi
  14812. rm -f core conftest.err conftest.$ac_objext \
  14813. conftest$ac_exeext
  14814. if ${ac_cv_search_res_9_ninit+:} false; then :
  14815. break
  14816. fi
  14817. done
  14818. if ${ac_cv_search_res_9_ninit+:} false; then :
  14819. else
  14820. ac_cv_search_res_9_ninit=no
  14821. fi
  14822. rm conftest.$ac_ext
  14823. LIBS=$ac_func_search_save_LIBS
  14824. fi
  14825. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_ninit" >&5
  14826. $as_echo "$ac_cv_search_res_9_ninit" >&6; }
  14827. ac_res=$ac_cv_search_res_9_ninit
  14828. if test "$ac_res" != no; then :
  14829. test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  14830. fi
  14831. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_ninit" >&5
  14832. $as_echo_n "checking for res_ninit... " >&6; }
  14833. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14834. /* end confdefs.h. */
  14835. #ifdef HAVE_SYS_SOCKET_H
  14836. #include <sys/socket.h>
  14837. #endif
  14838. #ifdef HAVE_NETINET_IN_H
  14839. #include <netinet/in.h>
  14840. #endif
  14841. #ifdef HAVE_ARPA_NAMESER_H
  14842. #include <arpa/nameser.h>
  14843. #endif
  14844. #include <resolv.h>
  14845. int
  14846. main ()
  14847. {
  14848. int foo = res_ninit(NULL);
  14849. ;
  14850. return 0;
  14851. }
  14852. _ACEOF
  14853. if ac_fn_c_try_link "$LINENO"; then :
  14854. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14855. $as_echo "yes" >&6; }
  14856. $as_echo "#define HAVE_RES_NINIT 1" >>confdefs.h
  14857. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_ndestroy" >&5
  14858. $as_echo_n "checking for library containing res_9_ndestroy... " >&6; }
  14859. if ${ac_cv_search_res_9_ndestroy+:} false; then :
  14860. $as_echo_n "(cached) " >&6
  14861. else
  14862. ac_func_search_save_LIBS=$LIBS
  14863. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14864. /* end confdefs.h. */
  14865. /* Override any GCC internal prototype to avoid an error.
  14866. Use char because int might match the return type of a GCC
  14867. builtin and then its argument prototype would still apply. */
  14868. #ifdef __cplusplus
  14869. extern "C"
  14870. #endif
  14871. char res_9_ndestroy ();
  14872. int
  14873. main ()
  14874. {
  14875. return res_9_ndestroy ();
  14876. ;
  14877. return 0;
  14878. }
  14879. _ACEOF
  14880. for ac_lib in '' resolv; do
  14881. if test -z "$ac_lib"; then
  14882. ac_res="none required"
  14883. else
  14884. ac_res=-l$ac_lib
  14885. LIBS="-l$ac_lib $ac_func_search_save_LIBS"
  14886. fi
  14887. if ac_fn_c_try_link "$LINENO"; then :
  14888. ac_cv_search_res_9_ndestroy=$ac_res
  14889. fi
  14890. rm -f core conftest.err conftest.$ac_objext \
  14891. conftest$ac_exeext
  14892. if ${ac_cv_search_res_9_ndestroy+:} false; then :
  14893. break
  14894. fi
  14895. done
  14896. if ${ac_cv_search_res_9_ndestroy+:} false; then :
  14897. else
  14898. ac_cv_search_res_9_ndestroy=no
  14899. fi
  14900. rm conftest.$ac_ext
  14901. LIBS=$ac_func_search_save_LIBS
  14902. fi
  14903. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_ndestroy" >&5
  14904. $as_echo "$ac_cv_search_res_9_ndestroy" >&6; }
  14905. ac_res=$ac_cv_search_res_9_ndestroy
  14906. if test "$ac_res" != no; then :
  14907. test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  14908. fi
  14909. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_ndestroy" >&5
  14910. $as_echo_n "checking for res_ndestroy... " >&6; }
  14911. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14912. /* end confdefs.h. */
  14913. #ifdef HAVE_SYS_SOCKET_H
  14914. #include <sys/socket.h>
  14915. #endif
  14916. #ifdef HAVE_NETINET_IN_H
  14917. #include <netinet/in.h>
  14918. #endif
  14919. #ifdef HAVE_ARPA_NAMESER_H
  14920. #include <arpa/nameser.h>
  14921. #endif
  14922. #include <resolv.h>
  14923. int
  14924. main ()
  14925. {
  14926. res_ndestroy(NULL);
  14927. ;
  14928. return 0;
  14929. }
  14930. _ACEOF
  14931. if ac_fn_c_try_link "$LINENO"; then :
  14932. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  14933. $as_echo "yes" >&6; }
  14934. $as_echo "#define HAVE_RES_NDESTROY 1" >>confdefs.h
  14935. else
  14936. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  14937. $as_echo "no" >&6; }
  14938. fi
  14939. rm -f core conftest.err conftest.$ac_objext \
  14940. conftest$ac_exeext conftest.$ac_ext
  14941. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_close" >&5
  14942. $as_echo_n "checking for library containing res_9_close... " >&6; }
  14943. if ${ac_cv_search_res_9_close+:} false; then :
  14944. $as_echo_n "(cached) " >&6
  14945. else
  14946. ac_func_search_save_LIBS=$LIBS
  14947. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14948. /* end confdefs.h. */
  14949. /* Override any GCC internal prototype to avoid an error.
  14950. Use char because int might match the return type of a GCC
  14951. builtin and then its argument prototype would still apply. */
  14952. #ifdef __cplusplus
  14953. extern "C"
  14954. #endif
  14955. char res_9_close ();
  14956. int
  14957. main ()
  14958. {
  14959. return res_9_close ();
  14960. ;
  14961. return 0;
  14962. }
  14963. _ACEOF
  14964. for ac_lib in '' resolv; do
  14965. if test -z "$ac_lib"; then
  14966. ac_res="none required"
  14967. else
  14968. ac_res=-l$ac_lib
  14969. LIBS="-l$ac_lib $ac_func_search_save_LIBS"
  14970. fi
  14971. if ac_fn_c_try_link "$LINENO"; then :
  14972. ac_cv_search_res_9_close=$ac_res
  14973. fi
  14974. rm -f core conftest.err conftest.$ac_objext \
  14975. conftest$ac_exeext
  14976. if ${ac_cv_search_res_9_close+:} false; then :
  14977. break
  14978. fi
  14979. done
  14980. if ${ac_cv_search_res_9_close+:} false; then :
  14981. else
  14982. ac_cv_search_res_9_close=no
  14983. fi
  14984. rm conftest.$ac_ext
  14985. LIBS=$ac_func_search_save_LIBS
  14986. fi
  14987. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_close" >&5
  14988. $as_echo "$ac_cv_search_res_9_close" >&6; }
  14989. ac_res=$ac_cv_search_res_9_close
  14990. if test "$ac_res" != no; then :
  14991. test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  14992. fi
  14993. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_close" >&5
  14994. $as_echo_n "checking for res_close... " >&6; }
  14995. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14996. /* end confdefs.h. */
  14997. #ifdef HAVE_SYS_SOCKET_H
  14998. #include <sys/socket.h>
  14999. #endif
  15000. #ifdef HAVE_NETINET_IN_H
  15001. #include <netinet/in.h>
  15002. #endif
  15003. #ifdef HAVE_ARPA_NAMESER_H
  15004. #include <arpa/nameser.h>
  15005. #endif
  15006. #include <resolv.h>
  15007. int
  15008. main ()
  15009. {
  15010. res_close();
  15011. ;
  15012. return 0;
  15013. }
  15014. _ACEOF
  15015. if ac_fn_c_try_link "$LINENO"; then :
  15016. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  15017. $as_echo "yes" >&6; }
  15018. $as_echo "#define HAVE_RES_CLOSE 1" >>confdefs.h
  15019. else
  15020. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  15021. $as_echo "no" >&6; }
  15022. fi
  15023. rm -f core conftest.err conftest.$ac_objext \
  15024. conftest$ac_exeext conftest.$ac_ext
  15025. else
  15026. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  15027. $as_echo "no" >&6; }
  15028. fi
  15029. rm -f core conftest.err conftest.$ac_objext \
  15030. conftest$ac_exeext conftest.$ac_ext
  15031. if test "x${PBX_GLOB_NOMAGIC}" != "x1"; then
  15032. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_NOMAGIC in glob.h" >&5
  15033. $as_echo_n "checking for GLOB_NOMAGIC in glob.h... " >&6; }
  15034. saved_cppflags="${CPPFLAGS}"
  15035. if test "x${GLOB_NOMAGIC_DIR}" != "x"; then
  15036. GLOB_NOMAGIC_INCLUDE="-I${GLOB_NOMAGIC_DIR}/include"
  15037. fi
  15038. CPPFLAGS="${CPPFLAGS} ${GLOB_NOMAGIC_INCLUDE}"
  15039. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15040. /* end confdefs.h. */
  15041. #include <glob.h>
  15042. int
  15043. main ()
  15044. {
  15045. #if defined(GLOB_NOMAGIC)
  15046. int foo = 0;
  15047. #else
  15048. int foo = bar;
  15049. #endif
  15050. 0
  15051. ;
  15052. return 0;
  15053. }
  15054. _ACEOF
  15055. if ac_fn_c_try_compile "$LINENO"; then :
  15056. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  15057. $as_echo "yes" >&6; }
  15058. PBX_GLOB_NOMAGIC=1
  15059. $as_echo "#define HAVE_GLOB_NOMAGIC 1" >>confdefs.h
  15060. else
  15061. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  15062. $as_echo "no" >&6; }
  15063. fi
  15064. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  15065. CPPFLAGS="${saved_cppflags}"
  15066. fi
  15067. if test "x${PBX_GLOB_BRACE}" != "x1"; then
  15068. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_BRACE in glob.h" >&5
  15069. $as_echo_n "checking for GLOB_BRACE in glob.h... " >&6; }
  15070. saved_cppflags="${CPPFLAGS}"
  15071. if test "x${GLOB_BRACE_DIR}" != "x"; then
  15072. GLOB_BRACE_INCLUDE="-I${GLOB_BRACE_DIR}/include"
  15073. fi
  15074. CPPFLAGS="${CPPFLAGS} ${GLOB_BRACE_INCLUDE}"
  15075. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15076. /* end confdefs.h. */
  15077. #include <glob.h>
  15078. int
  15079. main ()
  15080. {
  15081. #if defined(GLOB_BRACE)
  15082. int foo = 0;
  15083. #else
  15084. int foo = bar;
  15085. #endif
  15086. 0
  15087. ;
  15088. return 0;
  15089. }
  15090. _ACEOF
  15091. if ac_fn_c_try_compile "$LINENO"; then :
  15092. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  15093. $as_echo "yes" >&6; }
  15094. PBX_GLOB_BRACE=1
  15095. $as_echo "#define HAVE_GLOB_BRACE 1" >>confdefs.h
  15096. else
  15097. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  15098. $as_echo "no" >&6; }
  15099. fi
  15100. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  15101. CPPFLAGS="${saved_cppflags}"
  15102. fi
  15103. if test "x${PBX_RTLD_NOLOAD}" != "x1"; then
  15104. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RTLD_NOLOAD in dlfcn.h" >&5
  15105. $as_echo_n "checking for RTLD_NOLOAD in dlfcn.h... " >&6; }
  15106. saved_cppflags="${CPPFLAGS}"
  15107. if test "x${RTLD_NOLOAD_DIR}" != "x"; then
  15108. RTLD_NOLOAD_INCLUDE="-I${RTLD_NOLOAD_DIR}/include"
  15109. fi
  15110. CPPFLAGS="${CPPFLAGS} ${RTLD_NOLOAD_INCLUDE}"
  15111. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15112. /* end confdefs.h. */
  15113. #include <dlfcn.h>
  15114. int
  15115. main ()
  15116. {
  15117. #if defined(RTLD_NOLOAD)
  15118. int foo = 0;
  15119. #else
  15120. int foo = bar;
  15121. #endif
  15122. 0
  15123. ;
  15124. return 0;
  15125. }
  15126. _ACEOF
  15127. if ac_fn_c_try_compile "$LINENO"; then :
  15128. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  15129. $as_echo "yes" >&6; }
  15130. PBX_RTLD_NOLOAD=1
  15131. $as_echo "#define HAVE_RTLD_NOLOAD 1" >>confdefs.h
  15132. else
  15133. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  15134. $as_echo "no" >&6; }
  15135. fi
  15136. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  15137. CPPFLAGS="${saved_cppflags}"
  15138. fi
  15139. if test "x${PBX_IP_MTU_DISCOVER}" != "x1"; then
  15140. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IP_MTU_DISCOVER in netinet/in.h" >&5
  15141. $as_echo_n "checking for IP_MTU_DISCOVER in netinet/in.h... " >&6; }
  15142. saved_cppflags="${CPPFLAGS}"
  15143. if test "x${IP_MTU_DISCOVER_DIR}" != "x"; then
  15144. IP_MTU_DISCOVER_INCLUDE="-I${IP_MTU_DISCOVER_DIR}/include"
  15145. fi
  15146. CPPFLAGS="${CPPFLAGS} ${IP_MTU_DISCOVER_INCLUDE}"
  15147. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15148. /* end confdefs.h. */
  15149. #include <netinet/in.h>
  15150. int
  15151. main ()
  15152. {
  15153. #if defined(IP_MTU_DISCOVER)
  15154. int foo = 0;
  15155. #else
  15156. int foo = bar;
  15157. #endif
  15158. 0
  15159. ;
  15160. return 0;
  15161. }
  15162. _ACEOF
  15163. if ac_fn_c_try_compile "$LINENO"; then :
  15164. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  15165. $as_echo "yes" >&6; }
  15166. PBX_IP_MTU_DISCOVER=1
  15167. $as_echo "#define HAVE_IP_MTU_DISCOVER 1" >>confdefs.h
  15168. else
  15169. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  15170. $as_echo "no" >&6; }
  15171. fi
  15172. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  15173. CPPFLAGS="${saved_cppflags}"
  15174. fi
  15175. ac_fn_c_check_header_mongrel "$LINENO" "libkern/OSAtomic.h" "ac_cv_header_libkern_OSAtomic_h" "$ac_includes_default"
  15176. if test "x$ac_cv_header_libkern_OSAtomic_h" = xyes; then :
  15177. cat >>confdefs.h <<_ACEOF
  15178. #define HAVE_OSX_ATOMICS 1
  15179. _ACEOF
  15180. fi
  15181. # The cast to long int works around a bug in the HP C Compiler
  15182. # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  15183. # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  15184. # This bug is HP SR number 8606223364.
  15185. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
  15186. $as_echo_n "checking size of int... " >&6; }
  15187. if ${ac_cv_sizeof_int+:} false; then :
  15188. $as_echo_n "(cached) " >&6
  15189. else
  15190. if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
  15191. else
  15192. if test "$ac_cv_type_int" = yes; then
  15193. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  15194. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  15195. as_fn_error 77 "cannot compute sizeof (int)
  15196. See \`config.log' for more details" "$LINENO" 5; }
  15197. else
  15198. ac_cv_sizeof_int=0
  15199. fi
  15200. fi
  15201. fi
  15202. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
  15203. $as_echo "$ac_cv_sizeof_int" >&6; }
  15204. cat >>confdefs.h <<_ACEOF
  15205. #define SIZEOF_INT $ac_cv_sizeof_int
  15206. _ACEOF
  15207. # The cast to long int works around a bug in the HP C Compiler
  15208. # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  15209. # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  15210. # This bug is HP SR number 8606223364.
  15211. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
  15212. $as_echo_n "checking size of long... " >&6; }
  15213. if ${ac_cv_sizeof_long+:} false; then :
  15214. $as_echo_n "(cached) " >&6
  15215. else
  15216. if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
  15217. else
  15218. if test "$ac_cv_type_long" = yes; then
  15219. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  15220. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  15221. as_fn_error 77 "cannot compute sizeof (long)
  15222. See \`config.log' for more details" "$LINENO" 5; }
  15223. else
  15224. ac_cv_sizeof_long=0
  15225. fi
  15226. fi
  15227. fi
  15228. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
  15229. $as_echo "$ac_cv_sizeof_long" >&6; }
  15230. cat >>confdefs.h <<_ACEOF
  15231. #define SIZEOF_LONG $ac_cv_sizeof_long
  15232. _ACEOF
  15233. # The cast to long int works around a bug in the HP C Compiler
  15234. # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  15235. # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  15236. # This bug is HP SR number 8606223364.
  15237. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
  15238. $as_echo_n "checking size of long long... " >&6; }
  15239. if ${ac_cv_sizeof_long_long+:} false; then :
  15240. $as_echo_n "(cached) " >&6
  15241. else
  15242. if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
  15243. else
  15244. if test "$ac_cv_type_long_long" = yes; then
  15245. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  15246. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  15247. as_fn_error 77 "cannot compute sizeof (long long)
  15248. See \`config.log' for more details" "$LINENO" 5; }
  15249. else
  15250. ac_cv_sizeof_long_long=0
  15251. fi
  15252. fi
  15253. fi
  15254. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
  15255. $as_echo "$ac_cv_sizeof_long_long" >&6; }
  15256. cat >>confdefs.h <<_ACEOF
  15257. #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
  15258. _ACEOF
  15259. # The cast to long int works around a bug in the HP C Compiler
  15260. # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  15261. # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  15262. # This bug is HP SR number 8606223364.
  15263. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
  15264. $as_echo_n "checking size of char *... " >&6; }
  15265. if ${ac_cv_sizeof_char_p+:} false; then :
  15266. $as_echo_n "(cached) " >&6
  15267. else
  15268. if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default"; then :
  15269. else
  15270. if test "$ac_cv_type_char_p" = yes; then
  15271. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  15272. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  15273. as_fn_error 77 "cannot compute sizeof (char *)
  15274. See \`config.log' for more details" "$LINENO" 5; }
  15275. else
  15276. ac_cv_sizeof_char_p=0
  15277. fi
  15278. fi
  15279. fi
  15280. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
  15281. $as_echo "$ac_cv_sizeof_char_p" >&6; }
  15282. cat >>confdefs.h <<_ACEOF
  15283. #define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
  15284. _ACEOF
  15285. # The cast to long int works around a bug in the HP C Compiler
  15286. # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  15287. # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  15288. # This bug is HP SR number 8606223364.
  15289. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
  15290. $as_echo_n "checking size of long... " >&6; }
  15291. if ${ac_cv_sizeof_long+:} false; then :
  15292. $as_echo_n "(cached) " >&6
  15293. else
  15294. if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
  15295. else
  15296. if test "$ac_cv_type_long" = yes; then
  15297. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  15298. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  15299. as_fn_error 77 "cannot compute sizeof (long)
  15300. See \`config.log' for more details" "$LINENO" 5; }
  15301. else
  15302. ac_cv_sizeof_long=0
  15303. fi
  15304. fi
  15305. fi
  15306. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
  15307. $as_echo "$ac_cv_sizeof_long" >&6; }
  15308. cat >>confdefs.h <<_ACEOF
  15309. #define SIZEOF_LONG $ac_cv_sizeof_long
  15310. _ACEOF
  15311. # The cast to long int works around a bug in the HP C Compiler
  15312. # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  15313. # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  15314. # This bug is HP SR number 8606223364.
  15315. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
  15316. $as_echo_n "checking size of long long... " >&6; }
  15317. if ${ac_cv_sizeof_long_long+:} false; then :
  15318. $as_echo_n "(cached) " >&6
  15319. else
  15320. if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
  15321. else
  15322. if test "$ac_cv_type_long_long" = yes; then
  15323. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  15324. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  15325. as_fn_error 77 "cannot compute sizeof (long long)
  15326. See \`config.log' for more details" "$LINENO" 5; }
  15327. else
  15328. ac_cv_sizeof_long_long=0
  15329. fi
  15330. fi
  15331. fi
  15332. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
  15333. $as_echo "$ac_cv_sizeof_long_long" >&6; }
  15334. cat >>confdefs.h <<_ACEOF
  15335. #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
  15336. _ACEOF
  15337. if ac_fn_c_compute_int "$LINENO" "sizeof(foo.fds_bits[0])" "ac_cv_sizeof_fd_set_fds_bits" "$ac_includes_default
  15338. fd_set foo;"; then :
  15339. fi
  15340. # This doesn't actually work; what it does is to use the variable set in the
  15341. # previous test as a cached value to set the right output variables.
  15342. # The cast to long int works around a bug in the HP C Compiler
  15343. # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  15344. # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  15345. # This bug is HP SR number 8606223364.
  15346. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fd_set.fds_bits" >&5
  15347. $as_echo_n "checking size of fd_set.fds_bits... " >&6; }
  15348. if ${ac_cv_sizeof_fd_set_fds_bits+:} false; then :
  15349. $as_echo_n "(cached) " >&6
  15350. else
  15351. if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fd_set.fds_bits))" "ac_cv_sizeof_fd_set_fds_bits" "$ac_includes_default"; then :
  15352. else
  15353. if test "$ac_cv_type_fd_set_fds_bits" = yes; then
  15354. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  15355. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  15356. as_fn_error 77 "cannot compute sizeof (fd_set.fds_bits)
  15357. See \`config.log' for more details" "$LINENO" 5; }
  15358. else
  15359. ac_cv_sizeof_fd_set_fds_bits=0
  15360. fi
  15361. fi
  15362. fi
  15363. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fd_set_fds_bits" >&5
  15364. $as_echo "$ac_cv_sizeof_fd_set_fds_bits" >&6; }
  15365. cat >>confdefs.h <<_ACEOF
  15366. #define SIZEOF_FD_SET_FDS_BITS $ac_cv_sizeof_fd_set_fds_bits
  15367. _ACEOF
  15368. # Set a type compatible with the previous. We cannot just use a generic type
  15369. # for these bits, because on big-endian systems, the bits won't match up
  15370. # correctly if the size is wrong.
  15371. if test $ac_cv_sizeof_int = $ac_cv_sizeof_fd_set_fds_bits; then
  15372. $as_echo "#define TYPEOF_FD_SET_FDS_BITS int" >>confdefs.h
  15373. else if test $ac_cv_sizeof_long = $ac_cv_sizeof_fd_set_fds_bits; then
  15374. $as_echo "#define TYPEOF_FD_SET_FDS_BITS long" >>confdefs.h
  15375. else if test $ac_cv_sizeof_long_long = $ac_cv_sizeof_fd_set_fds_bits; then
  15376. $as_echo "#define TYPEOF_FD_SET_FDS_BITS long long" >>confdefs.h
  15377. fi ; fi ; fi
  15378. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dladdr in dlfcn.h" >&5
  15379. $as_echo_n "checking for dladdr in dlfcn.h... " >&6; }
  15380. PBX_DLADDR=0
  15381. old_LIBS=${LIBS}
  15382. LIBS="${LIBS} -ldl"
  15383. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15384. /* end confdefs.h. */
  15385. #define _GNU_SOURCE 1
  15386. #include <dlfcn.h>
  15387. int
  15388. main ()
  15389. {
  15390. dladdr((void *)0, (void *)0)
  15391. ;
  15392. return 0;
  15393. }
  15394. _ACEOF
  15395. if ac_fn_c_try_link "$LINENO"; then :
  15396. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  15397. $as_echo "yes" >&6; }
  15398. PBX_DLADDR=1
  15399. $as_echo "#define HAVE_DLADDR 1" >>confdefs.h
  15400. else
  15401. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  15402. $as_echo "no" >&6; }
  15403. fi
  15404. rm -f core conftest.err conftest.$ac_objext \
  15405. conftest$ac_exeext conftest.$ac_ext
  15406. LIBS=${old_LIBS}
  15407. # PKGCONFIG is used in later tests
  15408. if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
  15409. if test -n "$ac_tool_prefix"; then
  15410. # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
  15411. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
  15412. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  15413. $as_echo_n "checking for $ac_word... " >&6; }
  15414. if ${ac_cv_path_PKG_CONFIG+:} false; then :
  15415. $as_echo_n "(cached) " >&6
  15416. else
  15417. case $PKG_CONFIG in
  15418. [\\/]* | ?:[\\/]*)
  15419. ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  15420. ;;
  15421. *)
  15422. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  15423. for as_dir in $PATH
  15424. do
  15425. IFS=$as_save_IFS
  15426. test -z "$as_dir" && as_dir=.
  15427. for ac_exec_ext in '' $ac_executable_extensions; do
  15428. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  15429. ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  15430. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  15431. break 2
  15432. fi
  15433. done
  15434. done
  15435. IFS=$as_save_IFS
  15436. ;;
  15437. esac
  15438. fi
  15439. PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  15440. if test -n "$PKG_CONFIG"; then
  15441. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
  15442. $as_echo "$PKG_CONFIG" >&6; }
  15443. else
  15444. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  15445. $as_echo "no" >&6; }
  15446. fi
  15447. fi
  15448. if test -z "$ac_cv_path_PKG_CONFIG"; then
  15449. ac_pt_PKG_CONFIG=$PKG_CONFIG
  15450. # Extract the first word of "pkg-config", so it can be a program name with args.
  15451. set dummy pkg-config; ac_word=$2
  15452. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  15453. $as_echo_n "checking for $ac_word... " >&6; }
  15454. if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
  15455. $as_echo_n "(cached) " >&6
  15456. else
  15457. case $ac_pt_PKG_CONFIG in
  15458. [\\/]* | ?:[\\/]*)
  15459. ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
  15460. ;;
  15461. *)
  15462. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  15463. for as_dir in $PATH
  15464. do
  15465. IFS=$as_save_IFS
  15466. test -z "$as_dir" && as_dir=.
  15467. for ac_exec_ext in '' $ac_executable_extensions; do
  15468. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  15469. ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  15470. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  15471. break 2
  15472. fi
  15473. done
  15474. done
  15475. IFS=$as_save_IFS
  15476. ;;
  15477. esac
  15478. fi
  15479. ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
  15480. if test -n "$ac_pt_PKG_CONFIG"; then
  15481. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
  15482. $as_echo "$ac_pt_PKG_CONFIG" >&6; }
  15483. else
  15484. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  15485. $as_echo "no" >&6; }
  15486. fi
  15487. if test "x$ac_pt_PKG_CONFIG" = x; then
  15488. PKG_CONFIG=""
  15489. else
  15490. case $cross_compiling:$ac_tool_warned in
  15491. yes:)
  15492. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  15493. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  15494. ac_tool_warned=yes ;;
  15495. esac
  15496. PKG_CONFIG=$ac_pt_PKG_CONFIG
  15497. fi
  15498. else
  15499. PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
  15500. fi
  15501. fi
  15502. if test -n "$PKG_CONFIG"; then
  15503. _pkg_min_version=0.9.0
  15504. { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
  15505. $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
  15506. if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
  15507. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  15508. $as_echo "yes" >&6; }
  15509. else
  15510. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  15511. $as_echo "no" >&6; }
  15512. PKG_CONFIG=""
  15513. fi
  15514. fi
  15515. # do the package library checks now
  15516. if test "x${PBX_ALSA}" != "x1" -a "${USE_ALSA}" != "no"; then
  15517. pbxlibdir=""
  15518. # if --with-ALSA=DIR has been specified, use it.
  15519. if test "x${ALSA_DIR}" != "x"; then
  15520. if test -d ${ALSA_DIR}/lib; then
  15521. pbxlibdir="-L${ALSA_DIR}/lib"
  15522. else
  15523. pbxlibdir="-L${ALSA_DIR}"
  15524. fi
  15525. fi
  15526. pbxfuncname="snd_spcm_init"
  15527. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  15528. AST_ALSA_FOUND=yes
  15529. else
  15530. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  15531. CFLAGS="${CFLAGS} "
  15532. as_ac_Lib=`$as_echo "ac_cv_lib_asound_${pbxfuncname}" | $as_tr_sh`
  15533. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lasound" >&5
  15534. $as_echo_n "checking for ${pbxfuncname} in -lasound... " >&6; }
  15535. if eval \${$as_ac_Lib+:} false; then :
  15536. $as_echo_n "(cached) " >&6
  15537. else
  15538. ac_check_lib_save_LIBS=$LIBS
  15539. LIBS="-lasound ${pbxlibdir} -lm -ldl $LIBS"
  15540. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15541. /* end confdefs.h. */
  15542. /* Override any GCC internal prototype to avoid an error.
  15543. Use char because int might match the return type of a GCC
  15544. builtin and then its argument prototype would still apply. */
  15545. #ifdef __cplusplus
  15546. extern "C"
  15547. #endif
  15548. char ${pbxfuncname} ();
  15549. int
  15550. main ()
  15551. {
  15552. return ${pbxfuncname} ();
  15553. ;
  15554. return 0;
  15555. }
  15556. _ACEOF
  15557. if ac_fn_c_try_link "$LINENO"; then :
  15558. eval "$as_ac_Lib=yes"
  15559. else
  15560. eval "$as_ac_Lib=no"
  15561. fi
  15562. rm -f core conftest.err conftest.$ac_objext \
  15563. conftest$ac_exeext conftest.$ac_ext
  15564. LIBS=$ac_check_lib_save_LIBS
  15565. fi
  15566. eval ac_res=\$$as_ac_Lib
  15567. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  15568. $as_echo "$ac_res" >&6; }
  15569. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  15570. AST_ALSA_FOUND=yes
  15571. else
  15572. AST_ALSA_FOUND=no
  15573. fi
  15574. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  15575. fi
  15576. # now check for the header.
  15577. if test "${AST_ALSA_FOUND}" = "yes"; then
  15578. ALSA_LIB="${pbxlibdir} -lasound -lm -ldl"
  15579. # if --with-ALSA=DIR has been specified, use it.
  15580. if test "x${ALSA_DIR}" != "x"; then
  15581. ALSA_INCLUDE="-I${ALSA_DIR}/include"
  15582. fi
  15583. ALSA_INCLUDE="${ALSA_INCLUDE} "
  15584. if test "xalsa/asoundlib.h" = "x" ; then # no header, assume found
  15585. ALSA_HEADER_FOUND="1"
  15586. else # check for the header
  15587. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  15588. CPPFLAGS="${CPPFLAGS} ${ALSA_INCLUDE}"
  15589. ac_fn_c_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
  15590. if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
  15591. ALSA_HEADER_FOUND=1
  15592. else
  15593. ALSA_HEADER_FOUND=0
  15594. fi
  15595. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  15596. fi
  15597. if test "x${ALSA_HEADER_FOUND}" = "x0" ; then
  15598. ALSA_LIB=""
  15599. ALSA_INCLUDE=""
  15600. else
  15601. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  15602. ALSA_LIB=""
  15603. fi
  15604. PBX_ALSA=1
  15605. cat >>confdefs.h <<_ACEOF
  15606. #define HAVE_ALSA 1
  15607. _ACEOF
  15608. fi
  15609. fi
  15610. fi
  15611. if test "x${PBX_BFD}" != "x1" -a "${USE_BFD}" != "no"; then
  15612. pbxlibdir=""
  15613. # if --with-BFD=DIR has been specified, use it.
  15614. if test "x${BFD_DIR}" != "x"; then
  15615. if test -d ${BFD_DIR}/lib; then
  15616. pbxlibdir="-L${BFD_DIR}/lib"
  15617. else
  15618. pbxlibdir="-L${BFD_DIR}"
  15619. fi
  15620. fi
  15621. pbxfuncname="bfd_openr"
  15622. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  15623. AST_BFD_FOUND=yes
  15624. else
  15625. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  15626. CFLAGS="${CFLAGS} "
  15627. as_ac_Lib=`$as_echo "ac_cv_lib_bfd_${pbxfuncname}" | $as_tr_sh`
  15628. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lbfd" >&5
  15629. $as_echo_n "checking for ${pbxfuncname} in -lbfd... " >&6; }
  15630. if eval \${$as_ac_Lib+:} false; then :
  15631. $as_echo_n "(cached) " >&6
  15632. else
  15633. ac_check_lib_save_LIBS=$LIBS
  15634. LIBS="-lbfd ${pbxlibdir} $LIBS"
  15635. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15636. /* end confdefs.h. */
  15637. /* Override any GCC internal prototype to avoid an error.
  15638. Use char because int might match the return type of a GCC
  15639. builtin and then its argument prototype would still apply. */
  15640. #ifdef __cplusplus
  15641. extern "C"
  15642. #endif
  15643. char ${pbxfuncname} ();
  15644. int
  15645. main ()
  15646. {
  15647. return ${pbxfuncname} ();
  15648. ;
  15649. return 0;
  15650. }
  15651. _ACEOF
  15652. if ac_fn_c_try_link "$LINENO"; then :
  15653. eval "$as_ac_Lib=yes"
  15654. else
  15655. eval "$as_ac_Lib=no"
  15656. fi
  15657. rm -f core conftest.err conftest.$ac_objext \
  15658. conftest$ac_exeext conftest.$ac_ext
  15659. LIBS=$ac_check_lib_save_LIBS
  15660. fi
  15661. eval ac_res=\$$as_ac_Lib
  15662. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  15663. $as_echo "$ac_res" >&6; }
  15664. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  15665. AST_BFD_FOUND=yes
  15666. else
  15667. AST_BFD_FOUND=no
  15668. fi
  15669. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  15670. fi
  15671. # now check for the header.
  15672. if test "${AST_BFD_FOUND}" = "yes"; then
  15673. BFD_LIB="${pbxlibdir} -lbfd "
  15674. # if --with-BFD=DIR has been specified, use it.
  15675. if test "x${BFD_DIR}" != "x"; then
  15676. BFD_INCLUDE="-I${BFD_DIR}/include"
  15677. fi
  15678. BFD_INCLUDE="${BFD_INCLUDE} "
  15679. if test "xbfd.h" = "x" ; then # no header, assume found
  15680. BFD_HEADER_FOUND="1"
  15681. else # check for the header
  15682. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  15683. CPPFLAGS="${CPPFLAGS} ${BFD_INCLUDE}"
  15684. ac_fn_c_check_header_mongrel "$LINENO" "bfd.h" "ac_cv_header_bfd_h" "$ac_includes_default"
  15685. if test "x$ac_cv_header_bfd_h" = xyes; then :
  15686. BFD_HEADER_FOUND=1
  15687. else
  15688. BFD_HEADER_FOUND=0
  15689. fi
  15690. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  15691. fi
  15692. if test "x${BFD_HEADER_FOUND}" = "x0" ; then
  15693. BFD_LIB=""
  15694. BFD_INCLUDE=""
  15695. else
  15696. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  15697. BFD_LIB=""
  15698. fi
  15699. PBX_BFD=1
  15700. cat >>confdefs.h <<_ACEOF
  15701. #define HAVE_BFD 1
  15702. _ACEOF
  15703. fi
  15704. fi
  15705. fi
  15706. if test "${PBX_BFD}" = "0"; then
  15707. # Fedora/RedHat/CentOS require extra libraries
  15708. if test "x${PBX_BFD}" != "x1" -a "${USE_BFD}" != "no"; then
  15709. pbxlibdir=""
  15710. # if --with-BFD=DIR has been specified, use it.
  15711. if test "x${BFD_DIR}" != "x"; then
  15712. if test -d ${BFD_DIR}/lib; then
  15713. pbxlibdir="-L${BFD_DIR}/lib"
  15714. else
  15715. pbxlibdir="-L${BFD_DIR}"
  15716. fi
  15717. fi
  15718. pbxfuncname="bfd_check_format"
  15719. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  15720. AST_BFD_FOUND=yes
  15721. else
  15722. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  15723. CFLAGS="${CFLAGS} "
  15724. as_ac_Lib=`$as_echo "ac_cv_lib_bfd_${pbxfuncname}" | $as_tr_sh`
  15725. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lbfd" >&5
  15726. $as_echo_n "checking for ${pbxfuncname} in -lbfd... " >&6; }
  15727. if eval \${$as_ac_Lib+:} false; then :
  15728. $as_echo_n "(cached) " >&6
  15729. else
  15730. ac_check_lib_save_LIBS=$LIBS
  15731. LIBS="-lbfd ${pbxlibdir} -ldl -liberty $LIBS"
  15732. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15733. /* end confdefs.h. */
  15734. /* Override any GCC internal prototype to avoid an error.
  15735. Use char because int might match the return type of a GCC
  15736. builtin and then its argument prototype would still apply. */
  15737. #ifdef __cplusplus
  15738. extern "C"
  15739. #endif
  15740. char ${pbxfuncname} ();
  15741. int
  15742. main ()
  15743. {
  15744. return ${pbxfuncname} ();
  15745. ;
  15746. return 0;
  15747. }
  15748. _ACEOF
  15749. if ac_fn_c_try_link "$LINENO"; then :
  15750. eval "$as_ac_Lib=yes"
  15751. else
  15752. eval "$as_ac_Lib=no"
  15753. fi
  15754. rm -f core conftest.err conftest.$ac_objext \
  15755. conftest$ac_exeext conftest.$ac_ext
  15756. LIBS=$ac_check_lib_save_LIBS
  15757. fi
  15758. eval ac_res=\$$as_ac_Lib
  15759. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  15760. $as_echo "$ac_res" >&6; }
  15761. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  15762. AST_BFD_FOUND=yes
  15763. else
  15764. AST_BFD_FOUND=no
  15765. fi
  15766. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  15767. fi
  15768. # now check for the header.
  15769. if test "${AST_BFD_FOUND}" = "yes"; then
  15770. BFD_LIB="${pbxlibdir} -lbfd -ldl -liberty"
  15771. # if --with-BFD=DIR has been specified, use it.
  15772. if test "x${BFD_DIR}" != "x"; then
  15773. BFD_INCLUDE="-I${BFD_DIR}/include"
  15774. fi
  15775. BFD_INCLUDE="${BFD_INCLUDE} "
  15776. if test "xbfd.h" = "x" ; then # no header, assume found
  15777. BFD_HEADER_FOUND="1"
  15778. else # check for the header
  15779. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  15780. CPPFLAGS="${CPPFLAGS} ${BFD_INCLUDE}"
  15781. ac_fn_c_check_header_mongrel "$LINENO" "bfd.h" "ac_cv_header_bfd_h" "$ac_includes_default"
  15782. if test "x$ac_cv_header_bfd_h" = xyes; then :
  15783. BFD_HEADER_FOUND=1
  15784. else
  15785. BFD_HEADER_FOUND=0
  15786. fi
  15787. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  15788. fi
  15789. if test "x${BFD_HEADER_FOUND}" = "x0" ; then
  15790. BFD_LIB=""
  15791. BFD_INCLUDE=""
  15792. else
  15793. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  15794. BFD_LIB=""
  15795. fi
  15796. PBX_BFD=1
  15797. cat >>confdefs.h <<_ACEOF
  15798. #define HAVE_BFD 1
  15799. _ACEOF
  15800. fi
  15801. fi
  15802. fi
  15803. fi
  15804. if test "${PBX_BFD}" = "0"; then
  15805. # openSUSE requires -lz
  15806. if test "x${PBX_BFD}" != "x1" -a "${USE_BFD}" != "no"; then
  15807. pbxlibdir=""
  15808. # if --with-BFD=DIR has been specified, use it.
  15809. if test "x${BFD_DIR}" != "x"; then
  15810. if test -d ${BFD_DIR}/lib; then
  15811. pbxlibdir="-L${BFD_DIR}/lib"
  15812. else
  15813. pbxlibdir="-L${BFD_DIR}"
  15814. fi
  15815. fi
  15816. pbxfuncname="bfd_check_format"
  15817. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  15818. AST_BFD_FOUND=yes
  15819. else
  15820. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  15821. CFLAGS="${CFLAGS} "
  15822. as_ac_Lib=`$as_echo "ac_cv_lib_bfd_${pbxfuncname}" | $as_tr_sh`
  15823. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lbfd" >&5
  15824. $as_echo_n "checking for ${pbxfuncname} in -lbfd... " >&6; }
  15825. if eval \${$as_ac_Lib+:} false; then :
  15826. $as_echo_n "(cached) " >&6
  15827. else
  15828. ac_check_lib_save_LIBS=$LIBS
  15829. LIBS="-lbfd ${pbxlibdir} -ldl -liberty -lz $LIBS"
  15830. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15831. /* end confdefs.h. */
  15832. /* Override any GCC internal prototype to avoid an error.
  15833. Use char because int might match the return type of a GCC
  15834. builtin and then its argument prototype would still apply. */
  15835. #ifdef __cplusplus
  15836. extern "C"
  15837. #endif
  15838. char ${pbxfuncname} ();
  15839. int
  15840. main ()
  15841. {
  15842. return ${pbxfuncname} ();
  15843. ;
  15844. return 0;
  15845. }
  15846. _ACEOF
  15847. if ac_fn_c_try_link "$LINENO"; then :
  15848. eval "$as_ac_Lib=yes"
  15849. else
  15850. eval "$as_ac_Lib=no"
  15851. fi
  15852. rm -f core conftest.err conftest.$ac_objext \
  15853. conftest$ac_exeext conftest.$ac_ext
  15854. LIBS=$ac_check_lib_save_LIBS
  15855. fi
  15856. eval ac_res=\$$as_ac_Lib
  15857. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  15858. $as_echo "$ac_res" >&6; }
  15859. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  15860. AST_BFD_FOUND=yes
  15861. else
  15862. AST_BFD_FOUND=no
  15863. fi
  15864. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  15865. fi
  15866. # now check for the header.
  15867. if test "${AST_BFD_FOUND}" = "yes"; then
  15868. BFD_LIB="${pbxlibdir} -lbfd -ldl -liberty -lz"
  15869. # if --with-BFD=DIR has been specified, use it.
  15870. if test "x${BFD_DIR}" != "x"; then
  15871. BFD_INCLUDE="-I${BFD_DIR}/include"
  15872. fi
  15873. BFD_INCLUDE="${BFD_INCLUDE} "
  15874. if test "xbfd.h" = "x" ; then # no header, assume found
  15875. BFD_HEADER_FOUND="1"
  15876. else # check for the header
  15877. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  15878. CPPFLAGS="${CPPFLAGS} ${BFD_INCLUDE}"
  15879. ac_fn_c_check_header_mongrel "$LINENO" "bfd.h" "ac_cv_header_bfd_h" "$ac_includes_default"
  15880. if test "x$ac_cv_header_bfd_h" = xyes; then :
  15881. BFD_HEADER_FOUND=1
  15882. else
  15883. BFD_HEADER_FOUND=0
  15884. fi
  15885. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  15886. fi
  15887. if test "x${BFD_HEADER_FOUND}" = "x0" ; then
  15888. BFD_LIB=""
  15889. BFD_INCLUDE=""
  15890. else
  15891. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  15892. BFD_LIB=""
  15893. fi
  15894. PBX_BFD=1
  15895. cat >>confdefs.h <<_ACEOF
  15896. #define HAVE_BFD 1
  15897. _ACEOF
  15898. fi
  15899. fi
  15900. fi
  15901. fi
  15902. if test "x${OSARCH}" = "xlinux-gnu" ; then
  15903. if test "x${PBX_CAP}" != "x1" -a "${USE_CAP}" != "no"; then
  15904. pbxlibdir=""
  15905. # if --with-CAP=DIR has been specified, use it.
  15906. if test "x${CAP_DIR}" != "x"; then
  15907. if test -d ${CAP_DIR}/lib; then
  15908. pbxlibdir="-L${CAP_DIR}/lib"
  15909. else
  15910. pbxlibdir="-L${CAP_DIR}"
  15911. fi
  15912. fi
  15913. pbxfuncname="cap_from_text"
  15914. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  15915. AST_CAP_FOUND=yes
  15916. else
  15917. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  15918. CFLAGS="${CFLAGS} "
  15919. as_ac_Lib=`$as_echo "ac_cv_lib_cap_${pbxfuncname}" | $as_tr_sh`
  15920. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lcap" >&5
  15921. $as_echo_n "checking for ${pbxfuncname} in -lcap... " >&6; }
  15922. if eval \${$as_ac_Lib+:} false; then :
  15923. $as_echo_n "(cached) " >&6
  15924. else
  15925. ac_check_lib_save_LIBS=$LIBS
  15926. LIBS="-lcap ${pbxlibdir} $LIBS"
  15927. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15928. /* end confdefs.h. */
  15929. /* Override any GCC internal prototype to avoid an error.
  15930. Use char because int might match the return type of a GCC
  15931. builtin and then its argument prototype would still apply. */
  15932. #ifdef __cplusplus
  15933. extern "C"
  15934. #endif
  15935. char ${pbxfuncname} ();
  15936. int
  15937. main ()
  15938. {
  15939. return ${pbxfuncname} ();
  15940. ;
  15941. return 0;
  15942. }
  15943. _ACEOF
  15944. if ac_fn_c_try_link "$LINENO"; then :
  15945. eval "$as_ac_Lib=yes"
  15946. else
  15947. eval "$as_ac_Lib=no"
  15948. fi
  15949. rm -f core conftest.err conftest.$ac_objext \
  15950. conftest$ac_exeext conftest.$ac_ext
  15951. LIBS=$ac_check_lib_save_LIBS
  15952. fi
  15953. eval ac_res=\$$as_ac_Lib
  15954. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  15955. $as_echo "$ac_res" >&6; }
  15956. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  15957. AST_CAP_FOUND=yes
  15958. else
  15959. AST_CAP_FOUND=no
  15960. fi
  15961. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  15962. fi
  15963. # now check for the header.
  15964. if test "${AST_CAP_FOUND}" = "yes"; then
  15965. CAP_LIB="${pbxlibdir} -lcap "
  15966. # if --with-CAP=DIR has been specified, use it.
  15967. if test "x${CAP_DIR}" != "x"; then
  15968. CAP_INCLUDE="-I${CAP_DIR}/include"
  15969. fi
  15970. CAP_INCLUDE="${CAP_INCLUDE} "
  15971. if test "xsys/capability.h" = "x" ; then # no header, assume found
  15972. CAP_HEADER_FOUND="1"
  15973. else # check for the header
  15974. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  15975. CPPFLAGS="${CPPFLAGS} ${CAP_INCLUDE}"
  15976. ac_fn_c_check_header_mongrel "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default"
  15977. if test "x$ac_cv_header_sys_capability_h" = xyes; then :
  15978. CAP_HEADER_FOUND=1
  15979. else
  15980. CAP_HEADER_FOUND=0
  15981. fi
  15982. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  15983. fi
  15984. if test "x${CAP_HEADER_FOUND}" = "x0" ; then
  15985. CAP_LIB=""
  15986. CAP_INCLUDE=""
  15987. else
  15988. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  15989. CAP_LIB=""
  15990. fi
  15991. PBX_CAP=1
  15992. cat >>confdefs.h <<_ACEOF
  15993. #define HAVE_CAP 1
  15994. _ACEOF
  15995. fi
  15996. fi
  15997. fi
  15998. fi
  15999. if test "x${PBX_DAHDI}" != "x1"; then
  16000. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DAHDI_RESET_COUNTERS in dahdi/user.h" >&5
  16001. $as_echo_n "checking for DAHDI_RESET_COUNTERS in dahdi/user.h... " >&6; }
  16002. saved_cppflags="${CPPFLAGS}"
  16003. if test "x${DAHDI_DIR}" != "x"; then
  16004. DAHDI_INCLUDE="-I${DAHDI_DIR}/include"
  16005. fi
  16006. CPPFLAGS="${CPPFLAGS} ${DAHDI_INCLUDE}"
  16007. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16008. /* end confdefs.h. */
  16009. #include <dahdi/user.h>
  16010. int
  16011. main ()
  16012. {
  16013. #if defined(DAHDI_RESET_COUNTERS)
  16014. int foo = 0;
  16015. #else
  16016. int foo = bar;
  16017. #endif
  16018. 0
  16019. ;
  16020. return 0;
  16021. }
  16022. _ACEOF
  16023. if ac_fn_c_try_compile "$LINENO"; then :
  16024. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  16025. $as_echo "yes" >&6; }
  16026. PBX_DAHDI=1
  16027. $as_echo "#define HAVE_DAHDI 1" >>confdefs.h
  16028. $as_echo "#define HAVE_DAHDI_VERSION 230" >>confdefs.h
  16029. else
  16030. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  16031. $as_echo "no" >&6; }
  16032. fi
  16033. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  16034. CPPFLAGS="${saved_cppflags}"
  16035. fi
  16036. if test "x${PBX_DAHDI}" != "x1"; then
  16037. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DAHDI_DEFAULT_MTU_MRU in dahdi/user.h" >&5
  16038. $as_echo_n "checking for DAHDI_DEFAULT_MTU_MRU in dahdi/user.h... " >&6; }
  16039. saved_cppflags="${CPPFLAGS}"
  16040. if test "x${DAHDI_DIR}" != "x"; then
  16041. DAHDI_INCLUDE="-I${DAHDI_DIR}/include"
  16042. fi
  16043. CPPFLAGS="${CPPFLAGS} ${DAHDI_INCLUDE}"
  16044. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16045. /* end confdefs.h. */
  16046. #include <dahdi/user.h>
  16047. int
  16048. main ()
  16049. {
  16050. #if defined(DAHDI_DEFAULT_MTU_MRU)
  16051. int foo = 0;
  16052. #else
  16053. int foo = bar;
  16054. #endif
  16055. 0
  16056. ;
  16057. return 0;
  16058. }
  16059. _ACEOF
  16060. if ac_fn_c_try_compile "$LINENO"; then :
  16061. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  16062. $as_echo "yes" >&6; }
  16063. PBX_DAHDI=1
  16064. $as_echo "#define HAVE_DAHDI 1" >>confdefs.h
  16065. $as_echo "#define HAVE_DAHDI_VERSION 220" >>confdefs.h
  16066. else
  16067. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  16068. $as_echo "no" >&6; }
  16069. fi
  16070. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  16071. CPPFLAGS="${saved_cppflags}"
  16072. fi
  16073. if test "x${PBX_DAHDI}" != "x1"; then
  16074. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DAHDI_CODE in dahdi/user.h" >&5
  16075. $as_echo_n "checking for DAHDI_CODE in dahdi/user.h... " >&6; }
  16076. saved_cppflags="${CPPFLAGS}"
  16077. if test "x${DAHDI_DIR}" != "x"; then
  16078. DAHDI_INCLUDE="-I${DAHDI_DIR}/include"
  16079. fi
  16080. CPPFLAGS="${CPPFLAGS} ${DAHDI_INCLUDE}"
  16081. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16082. /* end confdefs.h. */
  16083. #include <dahdi/user.h>
  16084. int
  16085. main ()
  16086. {
  16087. #if defined(DAHDI_CODE)
  16088. int foo = 0;
  16089. #else
  16090. int foo = bar;
  16091. #endif
  16092. 0
  16093. ;
  16094. return 0;
  16095. }
  16096. _ACEOF
  16097. if ac_fn_c_try_compile "$LINENO"; then :
  16098. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  16099. $as_echo "yes" >&6; }
  16100. PBX_DAHDI=1
  16101. $as_echo "#define HAVE_DAHDI 1" >>confdefs.h
  16102. $as_echo "#define HAVE_DAHDI_VERSION 200" >>confdefs.h
  16103. else
  16104. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  16105. $as_echo "no" >&6; }
  16106. fi
  16107. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  16108. CPPFLAGS="${saved_cppflags}"
  16109. fi
  16110. if test "x${PBX_DAHDI_HALF_FULL}" != "x1"; then
  16111. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DAHDI_POLICY_HALF_FULL in dahdi/user.h" >&5
  16112. $as_echo_n "checking for DAHDI_POLICY_HALF_FULL in dahdi/user.h... " >&6; }
  16113. saved_cppflags="${CPPFLAGS}"
  16114. if test "x${DAHDI_HALF_FULL_DIR}" != "x"; then
  16115. DAHDI_HALF_FULL_INCLUDE="-I${DAHDI_HALF_FULL_DIR}/include"
  16116. fi
  16117. CPPFLAGS="${CPPFLAGS} ${DAHDI_HALF_FULL_INCLUDE}"
  16118. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16119. /* end confdefs.h. */
  16120. #include <dahdi/user.h>
  16121. int
  16122. main ()
  16123. {
  16124. #if defined(DAHDI_POLICY_HALF_FULL)
  16125. int foo = 0;
  16126. #else
  16127. int foo = bar;
  16128. #endif
  16129. 0
  16130. ;
  16131. return 0;
  16132. }
  16133. _ACEOF
  16134. if ac_fn_c_try_compile "$LINENO"; then :
  16135. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  16136. $as_echo "yes" >&6; }
  16137. PBX_DAHDI_HALF_FULL=1
  16138. $as_echo "#define HAVE_DAHDI_HALF_FULL 1" >>confdefs.h
  16139. else
  16140. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  16141. $as_echo "no" >&6; }
  16142. fi
  16143. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  16144. CPPFLAGS="${saved_cppflags}"
  16145. fi
  16146. if test "x${PBX_DAHDI_LINEREVERSE_VMWI}" != "x1" -a "${USE_DAHDI_LINEREVERSE_VMWI}" != "no"; then
  16147. if test "xenhanced dahdi vmwi support" != "x"; then
  16148. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for enhanced dahdi vmwi support" >&5
  16149. $as_echo_n "checking for enhanced dahdi vmwi support... " >&6; }
  16150. else
  16151. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"struct dahdi_vmwi_info booger\" compiles using dahdi/user.h" >&5
  16152. $as_echo_n "checking if \"struct dahdi_vmwi_info booger\" compiles using dahdi/user.h... " >&6; }
  16153. fi
  16154. saved_cppflags="${CPPFLAGS}"
  16155. if test "x${DAHDI_LINEREVERSE_VMWI_DIR}" != "x"; then
  16156. DAHDI_LINEREVERSE_VMWI_INCLUDE="-I${DAHDI_LINEREVERSE_VMWI_DIR}/include"
  16157. fi
  16158. CPPFLAGS="${CPPFLAGS} ${DAHDI_LINEREVERSE_VMWI_INCLUDE}"
  16159. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16160. /* end confdefs.h. */
  16161. #include <dahdi/user.h>
  16162. int
  16163. main ()
  16164. {
  16165. struct dahdi_vmwi_info booger;
  16166. ;
  16167. return 0;
  16168. }
  16169. _ACEOF
  16170. if ac_fn_c_try_compile "$LINENO"; then :
  16171. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  16172. $as_echo "yes" >&6; }
  16173. PBX_DAHDI_LINEREVERSE_VMWI=1
  16174. $as_echo "#define HAVE_DAHDI_LINEREVERSE_VMWI 1" >>confdefs.h
  16175. else
  16176. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  16177. $as_echo "no" >&6; }
  16178. fi
  16179. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  16180. CPPFLAGS="${saved_cppflags}"
  16181. fi
  16182. if test "x${PBX_DAHDI_ECHOCANCEL_FAX_MODE}" != "x1" -a "${USE_DAHDI_ECHOCANCEL_FAX_MODE}" != "no"; then
  16183. if test "x" != "x"; then
  16184. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for " >&5
  16185. $as_echo_n "checking for ... " >&6; }
  16186. else
  16187. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"int foo = DAHDI_ECHOCANCEL_FAX_MODE\" compiles using dahdi/user.h" >&5
  16188. $as_echo_n "checking if \"int foo = DAHDI_ECHOCANCEL_FAX_MODE\" compiles using dahdi/user.h... " >&6; }
  16189. fi
  16190. saved_cppflags="${CPPFLAGS}"
  16191. if test "x${DAHDI_ECHOCANCEL_FAX_MODE_DIR}" != "x"; then
  16192. DAHDI_ECHOCANCEL_FAX_MODE_INCLUDE="-I${DAHDI_ECHOCANCEL_FAX_MODE_DIR}/include"
  16193. fi
  16194. CPPFLAGS="${CPPFLAGS} ${DAHDI_ECHOCANCEL_FAX_MODE_INCLUDE}"
  16195. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16196. /* end confdefs.h. */
  16197. #include <dahdi/user.h>
  16198. int
  16199. main ()
  16200. {
  16201. int foo = DAHDI_ECHOCANCEL_FAX_MODE;
  16202. ;
  16203. return 0;
  16204. }
  16205. _ACEOF
  16206. if ac_fn_c_try_compile "$LINENO"; then :
  16207. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  16208. $as_echo "yes" >&6; }
  16209. PBX_DAHDI_ECHOCANCEL_FAX_MODE=1
  16210. $as_echo "#define HAVE_DAHDI_ECHOCANCEL_FAX_MODE 1" >>confdefs.h
  16211. else
  16212. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  16213. $as_echo "no" >&6; }
  16214. fi
  16215. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  16216. CPPFLAGS="${saved_cppflags}"
  16217. fi
  16218. if test "x${PBX_GETIFADDRS}" != "x1" -a "${USE_GETIFADDRS}" != "no"; then
  16219. if test "xgetifaddrs() support" != "x"; then
  16220. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs() support" >&5
  16221. $as_echo_n "checking for getifaddrs() support... " >&6; }
  16222. else
  16223. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"struct ifaddrs *p; getifaddrs(&p)\" compiles using ifaddrs.h" >&5
  16224. $as_echo_n "checking if \"struct ifaddrs *p; getifaddrs(&p)\" compiles using ifaddrs.h... " >&6; }
  16225. fi
  16226. saved_cppflags="${CPPFLAGS}"
  16227. if test "x${GETIFADDRS_DIR}" != "x"; then
  16228. GETIFADDRS_INCLUDE="-I${GETIFADDRS_DIR}/include"
  16229. fi
  16230. CPPFLAGS="${CPPFLAGS} ${GETIFADDRS_INCLUDE}"
  16231. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16232. /* end confdefs.h. */
  16233. #include <ifaddrs.h>
  16234. int
  16235. main ()
  16236. {
  16237. struct ifaddrs *p; getifaddrs(&p);
  16238. ;
  16239. return 0;
  16240. }
  16241. _ACEOF
  16242. if ac_fn_c_try_compile "$LINENO"; then :
  16243. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  16244. $as_echo "yes" >&6; }
  16245. PBX_GETIFADDRS=1
  16246. $as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
  16247. else
  16248. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  16249. $as_echo "no" >&6; }
  16250. fi
  16251. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  16252. CPPFLAGS="${saved_cppflags}"
  16253. fi
  16254. if test "x${PBX_TIMERFD}" != "x1" -a "${USE_TIMERFD}" != "no"; then
  16255. if test "xtimerfd support" != "x"; then
  16256. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timerfd support" >&5
  16257. $as_echo_n "checking for timerfd support... " >&6; }
  16258. else
  16259. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"timerfd_create(0,0); timerfd_settime(0,0,NULL,NULL);\" compiles using sys/timerfd.h" >&5
  16260. $as_echo_n "checking if \"timerfd_create(0,0); timerfd_settime(0,0,NULL,NULL);\" compiles using sys/timerfd.h... " >&6; }
  16261. fi
  16262. saved_cppflags="${CPPFLAGS}"
  16263. if test "x${TIMERFD_DIR}" != "x"; then
  16264. TIMERFD_INCLUDE="-I${TIMERFD_DIR}/include"
  16265. fi
  16266. CPPFLAGS="${CPPFLAGS} ${TIMERFD_INCLUDE}"
  16267. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16268. /* end confdefs.h. */
  16269. #include <sys/timerfd.h>
  16270. int
  16271. main ()
  16272. {
  16273. timerfd_create(0,0); timerfd_settime(0,0,NULL,NULL);;
  16274. ;
  16275. return 0;
  16276. }
  16277. _ACEOF
  16278. if ac_fn_c_try_compile "$LINENO"; then :
  16279. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  16280. $as_echo "yes" >&6; }
  16281. PBX_TIMERFD=1
  16282. $as_echo "#define HAVE_TIMERFD 1" >>confdefs.h
  16283. else
  16284. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  16285. $as_echo "no" >&6; }
  16286. fi
  16287. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  16288. CPPFLAGS="${saved_cppflags}"
  16289. fi
  16290. GSM_INTERNAL="yes"
  16291. GSM_SYSTEM="yes"
  16292. if test "${USE_GSM}" != "no"; then
  16293. if test "${GSM_DIR}" = "internal"; then
  16294. GSM_SYSTEM="no"
  16295. elif test "${GSM_DIR}" != ""; then
  16296. GSM_INTERNAL="no"
  16297. fi
  16298. if test "${GSM_SYSTEM}" = "yes"; then
  16299. gsmlibdir=""
  16300. if test "x${GSM_DIR}" != "x"; then
  16301. if test -d ${GSM_DIR}/lib; then
  16302. gsmlibdir="-L${GSM_DIR}/lib"
  16303. else
  16304. gsmlibdir="-L${GSM_DIR}"
  16305. fi
  16306. fi
  16307. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gsm_create in -lgsm" >&5
  16308. $as_echo_n "checking for gsm_create in -lgsm... " >&6; }
  16309. if ${ac_cv_lib_gsm_gsm_create+:} false; then :
  16310. $as_echo_n "(cached) " >&6
  16311. else
  16312. ac_check_lib_save_LIBS=$LIBS
  16313. LIBS="-lgsm ${gsmlibdir} $LIBS"
  16314. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16315. /* end confdefs.h. */
  16316. /* Override any GCC internal prototype to avoid an error.
  16317. Use char because int might match the return type of a GCC
  16318. builtin and then its argument prototype would still apply. */
  16319. #ifdef __cplusplus
  16320. extern "C"
  16321. #endif
  16322. char gsm_create ();
  16323. int
  16324. main ()
  16325. {
  16326. return gsm_create ();
  16327. ;
  16328. return 0;
  16329. }
  16330. _ACEOF
  16331. if ac_fn_c_try_link "$LINENO"; then :
  16332. ac_cv_lib_gsm_gsm_create=yes
  16333. else
  16334. ac_cv_lib_gsm_gsm_create=no
  16335. fi
  16336. rm -f core conftest.err conftest.$ac_objext \
  16337. conftest$ac_exeext conftest.$ac_ext
  16338. LIBS=$ac_check_lib_save_LIBS
  16339. fi
  16340. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gsm_gsm_create" >&5
  16341. $as_echo "$ac_cv_lib_gsm_gsm_create" >&6; }
  16342. if test "x$ac_cv_lib_gsm_gsm_create" = xyes; then :
  16343. cat >>confdefs.h <<_ACEOF
  16344. #define HAVE_GSM 1
  16345. _ACEOF
  16346. fi
  16347. if test "${ac_cv_lib_gsm_gsm_create}" = "yes"; then
  16348. if test "x${GSM_DIR}" != "x" ; then
  16349. as_ac_Header=`$as_echo "ac_cv_header_${GSM_DIR}/include/gsm.h" | $as_tr_sh`
  16350. ac_fn_c_check_header_mongrel "$LINENO" "${GSM_DIR}/include/gsm.h" "$as_ac_Header" "$ac_includes_default"
  16351. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  16352. GSM_HEADER_FOUND=1
  16353. else
  16354. GSM_HEADER_FOUND=0
  16355. fi
  16356. as_ac_Header=`$as_echo "ac_cv_header_${GSM_DIR}/include/gsm/gsm.h" | $as_tr_sh`
  16357. ac_fn_c_check_header_mongrel "$LINENO" "${GSM_DIR}/include/gsm/gsm.h" "$as_ac_Header" "$ac_includes_default"
  16358. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  16359. GSM_GSM_HEADER_FOUND=1
  16360. else
  16361. GSM_GSM_HEADER_FOUND=0
  16362. fi
  16363. else
  16364. ac_fn_c_check_header_mongrel "$LINENO" "gsm.h" "ac_cv_header_gsm_h" "$ac_includes_default"
  16365. if test "x$ac_cv_header_gsm_h" = xyes; then :
  16366. GSM_HEADER_FOUND=1
  16367. else
  16368. GSM_HEADER_FOUND=0
  16369. fi
  16370. ac_fn_c_check_header_mongrel "$LINENO" "gsm/gsm.h" "ac_cv_header_gsm_gsm_h" "$ac_includes_default"
  16371. if test "x$ac_cv_header_gsm_gsm_h" = xyes; then :
  16372. GSM_GSM_HEADER_FOUND=1
  16373. else
  16374. GSM_GSM_HEADER_FOUND=0
  16375. fi
  16376. fi
  16377. if test "${GSM_HEADER_FOUND}" = "0" ; then
  16378. if test "{GSM_GSM_HEADER_FOUND}" = "0" ; then
  16379. if test "x${GSM_MANDATORY}" = "xyes" ; then
  16380. { $as_echo "$as_me:${as_lineno-$LINENO}: ***" >&5
  16381. $as_echo "$as_me: ***" >&6;}
  16382. { $as_echo "$as_me:${as_lineno-$LINENO}: *** It appears that you do not have the gsm development package installed." >&5
  16383. $as_echo "$as_me: *** It appears that you do not have the gsm development package installed." >&6;}
  16384. { $as_echo "$as_me:${as_lineno-$LINENO}: *** Please install it to include ${GSM_DESCRIP} support, or re-run configure" >&5
  16385. $as_echo "$as_me: *** Please install it to include ${GSM_DESCRIP} support, or re-run configure" >&6;}
  16386. { $as_echo "$as_me:${as_lineno-$LINENO}: *** without explicitly specifying --with-${GSM_OPTION}" >&5
  16387. $as_echo "$as_me: *** without explicitly specifying --with-${GSM_OPTION}" >&6;}
  16388. exit 1
  16389. fi
  16390. fi
  16391. fi
  16392. GSM_OK=0
  16393. if test "${GSM_HEADER_FOUND}" = "1" ; then
  16394. cat >>confdefs.h <<_ACEOF
  16395. #define HAVE_GSM_HEADER 1
  16396. _ACEOF
  16397. GSM_OK=1
  16398. else
  16399. if test "${GSM_GSM_HEADER_FOUND}" = "1" ; then
  16400. cat >>confdefs.h <<_ACEOF
  16401. #define HAVE_GSM_GSM_HEADER 1
  16402. _ACEOF
  16403. GSM_OK=1
  16404. fi
  16405. fi
  16406. if test "${GSM_OK}" = "1" ; then
  16407. GSM_LIB="-lgsm"
  16408. if test "x${GSM_DIR}" != "x"; then
  16409. GSM_LIB="${gsmlibdir} ${GSM_LIB}"
  16410. GSM_INCLUDE="-I${GSM_DIR}/include"
  16411. fi
  16412. PBX_GSM=1
  16413. GSM_INTERNAL="no"
  16414. fi
  16415. fi
  16416. fi
  16417. if test "${GSM_INTERNAL}" = "yes"; then
  16418. PBX_GSM=1
  16419. cat >>confdefs.h <<_ACEOF
  16420. #define HAVE_GSM_HEADER 1
  16421. _ACEOF
  16422. fi
  16423. fi
  16424. ILBC_INTERNAL="yes"
  16425. ILBC_SYSTEM="yes"
  16426. if test "${USE_ILBC}" != "no"; then
  16427. if test "${ILBC_DIR}" = "internal"; then
  16428. ILBC_SYSTEM="no"
  16429. elif test "${ILBC_DIR}" != ""; then
  16430. ILBC_INTERNAL="no"
  16431. fi
  16432. if test "${ILBC_SYSTEM}" = "yes"; then
  16433. if test "x${PBX_ILBC}" != "x1" -a "${USE_ILBC}" != "no"; then
  16434. pkg_failed=no
  16435. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ILBC" >&5
  16436. $as_echo_n "checking for ILBC... " >&6; }
  16437. if test -n "$ILBC_CFLAGS"; then
  16438. pkg_cv_ILBC_CFLAGS="$ILBC_CFLAGS"
  16439. elif test -n "$PKG_CONFIG"; then
  16440. if test -n "$PKG_CONFIG" && \
  16441. { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libilbc\""; } >&5
  16442. ($PKG_CONFIG --exists --print-errors "libilbc") 2>&5
  16443. ac_status=$?
  16444. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  16445. test $ac_status = 0; }; then
  16446. pkg_cv_ILBC_CFLAGS=`$PKG_CONFIG --cflags "libilbc" 2>/dev/null`
  16447. test "x$?" != "x0" && pkg_failed=yes
  16448. else
  16449. pkg_failed=yes
  16450. fi
  16451. else
  16452. pkg_failed=untried
  16453. fi
  16454. if test -n "$ILBC_LIBS"; then
  16455. pkg_cv_ILBC_LIBS="$ILBC_LIBS"
  16456. elif test -n "$PKG_CONFIG"; then
  16457. if test -n "$PKG_CONFIG" && \
  16458. { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libilbc\""; } >&5
  16459. ($PKG_CONFIG --exists --print-errors "libilbc") 2>&5
  16460. ac_status=$?
  16461. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  16462. test $ac_status = 0; }; then
  16463. pkg_cv_ILBC_LIBS=`$PKG_CONFIG --libs "libilbc" 2>/dev/null`
  16464. test "x$?" != "x0" && pkg_failed=yes
  16465. else
  16466. pkg_failed=yes
  16467. fi
  16468. else
  16469. pkg_failed=untried
  16470. fi
  16471. if test $pkg_failed = yes; then
  16472. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  16473. $as_echo "no" >&6; }
  16474. if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  16475. _pkg_short_errors_supported=yes
  16476. else
  16477. _pkg_short_errors_supported=no
  16478. fi
  16479. if test $_pkg_short_errors_supported = yes; then
  16480. ILBC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libilbc" 2>&1`
  16481. else
  16482. ILBC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libilbc" 2>&1`
  16483. fi
  16484. # Put the nasty error message in config.log where it belongs
  16485. echo "$ILBC_PKG_ERRORS" >&5
  16486. PBX_ILBC=0
  16487. elif test $pkg_failed = untried; then
  16488. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  16489. $as_echo "no" >&6; }
  16490. PBX_ILBC=0
  16491. else
  16492. ILBC_CFLAGS=$pkg_cv_ILBC_CFLAGS
  16493. ILBC_LIBS=$pkg_cv_ILBC_LIBS
  16494. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  16495. $as_echo "yes" >&6; }
  16496. PBX_ILBC=1
  16497. ILBC_INCLUDE="$ILBC_CFLAGS"
  16498. ILBC_LIB="$ILBC_LIBS"
  16499. $as_echo "#define HAVE_ILBC 1" >>confdefs.h
  16500. fi
  16501. fi
  16502. if test "$PBX_ILBC" = "1"; then
  16503. ILBC_INTERNAL="no"
  16504. fi
  16505. fi
  16506. if test "${ILBC_INTERNAL}" = "yes"; then
  16507. PBX_ILBC=1
  16508. fi
  16509. fi
  16510. LIBEDIT_INTERNAL="yes"
  16511. LIBEDIT_SYSTEM="yes"
  16512. if test "${USE_LIBEDIT}" != "no"; then
  16513. if test "${LIBEDIT_DIR}" = "internal"; then
  16514. LIBEDIT_SYSTEM="no"
  16515. elif test "${LIBEDIT_DIR}" != ""; then
  16516. LIBEDIT_INTERNAL="no"
  16517. fi
  16518. if test "${LIBEDIT_SYSTEM}" = "yes"; then
  16519. if test "x${PBX_LIBEDIT}" != "x1" -a "${USE_LIBEDIT}" != "no"; then
  16520. pkg_failed=no
  16521. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBEDIT" >&5
  16522. $as_echo_n "checking for LIBEDIT... " >&6; }
  16523. if test -n "$LIBEDIT_CFLAGS"; then
  16524. pkg_cv_LIBEDIT_CFLAGS="$LIBEDIT_CFLAGS"
  16525. elif test -n "$PKG_CONFIG"; then
  16526. if test -n "$PKG_CONFIG" && \
  16527. { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libedit\""; } >&5
  16528. ($PKG_CONFIG --exists --print-errors "libedit") 2>&5
  16529. ac_status=$?
  16530. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  16531. test $ac_status = 0; }; then
  16532. pkg_cv_LIBEDIT_CFLAGS=`$PKG_CONFIG --cflags "libedit" 2>/dev/null`
  16533. test "x$?" != "x0" && pkg_failed=yes
  16534. else
  16535. pkg_failed=yes
  16536. fi
  16537. else
  16538. pkg_failed=untried
  16539. fi
  16540. if test -n "$LIBEDIT_LIBS"; then
  16541. pkg_cv_LIBEDIT_LIBS="$LIBEDIT_LIBS"
  16542. elif test -n "$PKG_CONFIG"; then
  16543. if test -n "$PKG_CONFIG" && \
  16544. { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libedit\""; } >&5
  16545. ($PKG_CONFIG --exists --print-errors "libedit") 2>&5
  16546. ac_status=$?
  16547. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  16548. test $ac_status = 0; }; then
  16549. pkg_cv_LIBEDIT_LIBS=`$PKG_CONFIG --libs "libedit" 2>/dev/null`
  16550. test "x$?" != "x0" && pkg_failed=yes
  16551. else
  16552. pkg_failed=yes
  16553. fi
  16554. else
  16555. pkg_failed=untried
  16556. fi
  16557. if test $pkg_failed = yes; then
  16558. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  16559. $as_echo "no" >&6; }
  16560. if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  16561. _pkg_short_errors_supported=yes
  16562. else
  16563. _pkg_short_errors_supported=no
  16564. fi
  16565. if test $_pkg_short_errors_supported = yes; then
  16566. LIBEDIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libedit" 2>&1`
  16567. else
  16568. LIBEDIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libedit" 2>&1`
  16569. fi
  16570. # Put the nasty error message in config.log where it belongs
  16571. echo "$LIBEDIT_PKG_ERRORS" >&5
  16572. PBX_LIBEDIT=0
  16573. elif test $pkg_failed = untried; then
  16574. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  16575. $as_echo "no" >&6; }
  16576. PBX_LIBEDIT=0
  16577. else
  16578. LIBEDIT_CFLAGS=$pkg_cv_LIBEDIT_CFLAGS
  16579. LIBEDIT_LIBS=$pkg_cv_LIBEDIT_LIBS
  16580. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  16581. $as_echo "yes" >&6; }
  16582. PBX_LIBEDIT=1
  16583. LIBEDIT_INCLUDE="$LIBEDIT_CFLAGS"
  16584. LIBEDIT_LIB="$LIBEDIT_LIBS"
  16585. $as_echo "#define HAVE_LIBEDIT 1" >>confdefs.h
  16586. fi
  16587. fi
  16588. if test "$PBX_LIBEDIT" = "1"; then
  16589. LIBEDIT_INTERNAL="no"
  16590. fi
  16591. fi
  16592. if test "${LIBEDIT_INTERNAL}" = "yes"; then
  16593. PBX_LIBEDIT=1
  16594. fi
  16595. fi
  16596. if test "x${PBX_ICONV}" != "x1" -a "${USE_ICONV}" != "no"; then
  16597. pbxlibdir=""
  16598. # if --with-ICONV=DIR has been specified, use it.
  16599. if test "x${ICONV_DIR}" != "x"; then
  16600. if test -d ${ICONV_DIR}/lib; then
  16601. pbxlibdir="-L${ICONV_DIR}/lib"
  16602. else
  16603. pbxlibdir="-L${ICONV_DIR}"
  16604. fi
  16605. fi
  16606. pbxfuncname="iconv_open"
  16607. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  16608. AST_ICONV_FOUND=yes
  16609. else
  16610. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  16611. CFLAGS="${CFLAGS} "
  16612. as_ac_Lib=`$as_echo "ac_cv_lib_iconv_${pbxfuncname}" | $as_tr_sh`
  16613. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -liconv" >&5
  16614. $as_echo_n "checking for ${pbxfuncname} in -liconv... " >&6; }
  16615. if eval \${$as_ac_Lib+:} false; then :
  16616. $as_echo_n "(cached) " >&6
  16617. else
  16618. ac_check_lib_save_LIBS=$LIBS
  16619. LIBS="-liconv ${pbxlibdir} $LIBS"
  16620. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16621. /* end confdefs.h. */
  16622. /* Override any GCC internal prototype to avoid an error.
  16623. Use char because int might match the return type of a GCC
  16624. builtin and then its argument prototype would still apply. */
  16625. #ifdef __cplusplus
  16626. extern "C"
  16627. #endif
  16628. char ${pbxfuncname} ();
  16629. int
  16630. main ()
  16631. {
  16632. return ${pbxfuncname} ();
  16633. ;
  16634. return 0;
  16635. }
  16636. _ACEOF
  16637. if ac_fn_c_try_link "$LINENO"; then :
  16638. eval "$as_ac_Lib=yes"
  16639. else
  16640. eval "$as_ac_Lib=no"
  16641. fi
  16642. rm -f core conftest.err conftest.$ac_objext \
  16643. conftest$ac_exeext conftest.$ac_ext
  16644. LIBS=$ac_check_lib_save_LIBS
  16645. fi
  16646. eval ac_res=\$$as_ac_Lib
  16647. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  16648. $as_echo "$ac_res" >&6; }
  16649. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  16650. AST_ICONV_FOUND=yes
  16651. else
  16652. AST_ICONV_FOUND=no
  16653. fi
  16654. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  16655. fi
  16656. # now check for the header.
  16657. if test "${AST_ICONV_FOUND}" = "yes"; then
  16658. ICONV_LIB="${pbxlibdir} -liconv "
  16659. # if --with-ICONV=DIR has been specified, use it.
  16660. if test "x${ICONV_DIR}" != "x"; then
  16661. ICONV_INCLUDE="-I${ICONV_DIR}/include"
  16662. fi
  16663. ICONV_INCLUDE="${ICONV_INCLUDE} "
  16664. if test "xiconv.h" = "x" ; then # no header, assume found
  16665. ICONV_HEADER_FOUND="1"
  16666. else # check for the header
  16667. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  16668. CPPFLAGS="${CPPFLAGS} ${ICONV_INCLUDE}"
  16669. ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
  16670. if test "x$ac_cv_header_iconv_h" = xyes; then :
  16671. ICONV_HEADER_FOUND=1
  16672. else
  16673. ICONV_HEADER_FOUND=0
  16674. fi
  16675. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  16676. fi
  16677. if test "x${ICONV_HEADER_FOUND}" = "x0" ; then
  16678. ICONV_LIB=""
  16679. ICONV_INCLUDE=""
  16680. else
  16681. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  16682. ICONV_LIB=""
  16683. fi
  16684. PBX_ICONV=1
  16685. cat >>confdefs.h <<_ACEOF
  16686. #define HAVE_ICONV 1
  16687. _ACEOF
  16688. fi
  16689. fi
  16690. fi
  16691. # GNU libiconv #define's iconv_open to libiconv_open, so we need to search for that symbol
  16692. if test "x${PBX_ICONV}" != "x1" -a "${USE_ICONV}" != "no"; then
  16693. pbxlibdir=""
  16694. # if --with-ICONV=DIR has been specified, use it.
  16695. if test "x${ICONV_DIR}" != "x"; then
  16696. if test -d ${ICONV_DIR}/lib; then
  16697. pbxlibdir="-L${ICONV_DIR}/lib"
  16698. else
  16699. pbxlibdir="-L${ICONV_DIR}"
  16700. fi
  16701. fi
  16702. pbxfuncname="libiconv_open"
  16703. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  16704. AST_ICONV_FOUND=yes
  16705. else
  16706. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  16707. CFLAGS="${CFLAGS} "
  16708. as_ac_Lib=`$as_echo "ac_cv_lib_iconv_${pbxfuncname}" | $as_tr_sh`
  16709. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -liconv" >&5
  16710. $as_echo_n "checking for ${pbxfuncname} in -liconv... " >&6; }
  16711. if eval \${$as_ac_Lib+:} false; then :
  16712. $as_echo_n "(cached) " >&6
  16713. else
  16714. ac_check_lib_save_LIBS=$LIBS
  16715. LIBS="-liconv ${pbxlibdir} $LIBS"
  16716. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16717. /* end confdefs.h. */
  16718. /* Override any GCC internal prototype to avoid an error.
  16719. Use char because int might match the return type of a GCC
  16720. builtin and then its argument prototype would still apply. */
  16721. #ifdef __cplusplus
  16722. extern "C"
  16723. #endif
  16724. char ${pbxfuncname} ();
  16725. int
  16726. main ()
  16727. {
  16728. return ${pbxfuncname} ();
  16729. ;
  16730. return 0;
  16731. }
  16732. _ACEOF
  16733. if ac_fn_c_try_link "$LINENO"; then :
  16734. eval "$as_ac_Lib=yes"
  16735. else
  16736. eval "$as_ac_Lib=no"
  16737. fi
  16738. rm -f core conftest.err conftest.$ac_objext \
  16739. conftest$ac_exeext conftest.$ac_ext
  16740. LIBS=$ac_check_lib_save_LIBS
  16741. fi
  16742. eval ac_res=\$$as_ac_Lib
  16743. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  16744. $as_echo "$ac_res" >&6; }
  16745. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  16746. AST_ICONV_FOUND=yes
  16747. else
  16748. AST_ICONV_FOUND=no
  16749. fi
  16750. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  16751. fi
  16752. # now check for the header.
  16753. if test "${AST_ICONV_FOUND}" = "yes"; then
  16754. ICONV_LIB="${pbxlibdir} -liconv "
  16755. # if --with-ICONV=DIR has been specified, use it.
  16756. if test "x${ICONV_DIR}" != "x"; then
  16757. ICONV_INCLUDE="-I${ICONV_DIR}/include"
  16758. fi
  16759. ICONV_INCLUDE="${ICONV_INCLUDE} "
  16760. if test "xiconv.h" = "x" ; then # no header, assume found
  16761. ICONV_HEADER_FOUND="1"
  16762. else # check for the header
  16763. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  16764. CPPFLAGS="${CPPFLAGS} ${ICONV_INCLUDE}"
  16765. ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
  16766. if test "x$ac_cv_header_iconv_h" = xyes; then :
  16767. ICONV_HEADER_FOUND=1
  16768. else
  16769. ICONV_HEADER_FOUND=0
  16770. fi
  16771. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  16772. fi
  16773. if test "x${ICONV_HEADER_FOUND}" = "x0" ; then
  16774. ICONV_LIB=""
  16775. ICONV_INCLUDE=""
  16776. else
  16777. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  16778. ICONV_LIB=""
  16779. fi
  16780. PBX_ICONV=1
  16781. cat >>confdefs.h <<_ACEOF
  16782. #define HAVE_ICONV 1
  16783. _ACEOF
  16784. fi
  16785. fi
  16786. fi
  16787. # Some versions of Linux package iconv in glibc
  16788. if test "x${PBX_ICONV}" != "x1" -a "${USE_ICONV}" != "no"; then
  16789. pbxlibdir=""
  16790. # if --with-ICONV=DIR has been specified, use it.
  16791. if test "x${ICONV_DIR}" != "x"; then
  16792. if test -d ${ICONV_DIR}/lib; then
  16793. pbxlibdir="-L${ICONV_DIR}/lib"
  16794. else
  16795. pbxlibdir="-L${ICONV_DIR}"
  16796. fi
  16797. fi
  16798. pbxfuncname="iconv_close"
  16799. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  16800. AST_ICONV_FOUND=yes
  16801. else
  16802. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  16803. CFLAGS="${CFLAGS} "
  16804. as_ac_Lib=`$as_echo "ac_cv_lib_c_${pbxfuncname}" | $as_tr_sh`
  16805. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lc" >&5
  16806. $as_echo_n "checking for ${pbxfuncname} in -lc... " >&6; }
  16807. if eval \${$as_ac_Lib+:} false; then :
  16808. $as_echo_n "(cached) " >&6
  16809. else
  16810. ac_check_lib_save_LIBS=$LIBS
  16811. LIBS="-lc ${pbxlibdir} $LIBS"
  16812. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16813. /* end confdefs.h. */
  16814. /* Override any GCC internal prototype to avoid an error.
  16815. Use char because int might match the return type of a GCC
  16816. builtin and then its argument prototype would still apply. */
  16817. #ifdef __cplusplus
  16818. extern "C"
  16819. #endif
  16820. char ${pbxfuncname} ();
  16821. int
  16822. main ()
  16823. {
  16824. return ${pbxfuncname} ();
  16825. ;
  16826. return 0;
  16827. }
  16828. _ACEOF
  16829. if ac_fn_c_try_link "$LINENO"; then :
  16830. eval "$as_ac_Lib=yes"
  16831. else
  16832. eval "$as_ac_Lib=no"
  16833. fi
  16834. rm -f core conftest.err conftest.$ac_objext \
  16835. conftest$ac_exeext conftest.$ac_ext
  16836. LIBS=$ac_check_lib_save_LIBS
  16837. fi
  16838. eval ac_res=\$$as_ac_Lib
  16839. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  16840. $as_echo "$ac_res" >&6; }
  16841. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  16842. AST_ICONV_FOUND=yes
  16843. else
  16844. AST_ICONV_FOUND=no
  16845. fi
  16846. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  16847. fi
  16848. # now check for the header.
  16849. if test "${AST_ICONV_FOUND}" = "yes"; then
  16850. ICONV_LIB="${pbxlibdir} -lc "
  16851. # if --with-ICONV=DIR has been specified, use it.
  16852. if test "x${ICONV_DIR}" != "x"; then
  16853. ICONV_INCLUDE="-I${ICONV_DIR}/include"
  16854. fi
  16855. ICONV_INCLUDE="${ICONV_INCLUDE} "
  16856. if test "xiconv.h" = "x" ; then # no header, assume found
  16857. ICONV_HEADER_FOUND="1"
  16858. else # check for the header
  16859. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  16860. CPPFLAGS="${CPPFLAGS} ${ICONV_INCLUDE}"
  16861. ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
  16862. if test "x$ac_cv_header_iconv_h" = xyes; then :
  16863. ICONV_HEADER_FOUND=1
  16864. else
  16865. ICONV_HEADER_FOUND=0
  16866. fi
  16867. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  16868. fi
  16869. if test "x${ICONV_HEADER_FOUND}" = "x0" ; then
  16870. ICONV_LIB=""
  16871. ICONV_INCLUDE=""
  16872. else
  16873. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  16874. ICONV_LIB=""
  16875. fi
  16876. PBX_ICONV=1
  16877. cat >>confdefs.h <<_ACEOF
  16878. #define HAVE_ICONV 1
  16879. _ACEOF
  16880. fi
  16881. fi
  16882. fi
  16883. # If ical.h is NOT in the libical directory, then it is of a version insufficient for us.
  16884. if test "x${PBX_ICAL}" != "x1" -a "${USE_ICAL}" != "no"; then
  16885. pbxlibdir=""
  16886. # if --with-ICAL=DIR has been specified, use it.
  16887. if test "x${ICAL_DIR}" != "x"; then
  16888. if test -d ${ICAL_DIR}/lib; then
  16889. pbxlibdir="-L${ICAL_DIR}/lib"
  16890. else
  16891. pbxlibdir="-L${ICAL_DIR}"
  16892. fi
  16893. fi
  16894. pbxfuncname="icaltimezone_get_utc_timezone"
  16895. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  16896. AST_ICAL_FOUND=yes
  16897. else
  16898. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  16899. CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
  16900. as_ac_Lib=`$as_echo "ac_cv_lib_ical_${pbxfuncname}" | $as_tr_sh`
  16901. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lical" >&5
  16902. $as_echo_n "checking for ${pbxfuncname} in -lical... " >&6; }
  16903. if eval \${$as_ac_Lib+:} false; then :
  16904. $as_echo_n "(cached) " >&6
  16905. else
  16906. ac_check_lib_save_LIBS=$LIBS
  16907. LIBS="-lical ${pbxlibdir} ${PTHREAD_LIBS} $LIBS"
  16908. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16909. /* end confdefs.h. */
  16910. /* Override any GCC internal prototype to avoid an error.
  16911. Use char because int might match the return type of a GCC
  16912. builtin and then its argument prototype would still apply. */
  16913. #ifdef __cplusplus
  16914. extern "C"
  16915. #endif
  16916. char ${pbxfuncname} ();
  16917. int
  16918. main ()
  16919. {
  16920. return ${pbxfuncname} ();
  16921. ;
  16922. return 0;
  16923. }
  16924. _ACEOF
  16925. if ac_fn_c_try_link "$LINENO"; then :
  16926. eval "$as_ac_Lib=yes"
  16927. else
  16928. eval "$as_ac_Lib=no"
  16929. fi
  16930. rm -f core conftest.err conftest.$ac_objext \
  16931. conftest$ac_exeext conftest.$ac_ext
  16932. LIBS=$ac_check_lib_save_LIBS
  16933. fi
  16934. eval ac_res=\$$as_ac_Lib
  16935. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  16936. $as_echo "$ac_res" >&6; }
  16937. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  16938. AST_ICAL_FOUND=yes
  16939. else
  16940. AST_ICAL_FOUND=no
  16941. fi
  16942. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  16943. fi
  16944. # now check for the header.
  16945. if test "${AST_ICAL_FOUND}" = "yes"; then
  16946. ICAL_LIB="${pbxlibdir} -lical ${PTHREAD_LIBS}"
  16947. # if --with-ICAL=DIR has been specified, use it.
  16948. if test "x${ICAL_DIR}" != "x"; then
  16949. ICAL_INCLUDE="-I${ICAL_DIR}/include"
  16950. fi
  16951. ICAL_INCLUDE="${ICAL_INCLUDE} ${PTHREAD_CFLAGS}"
  16952. if test "xlibical/ical.h" = "x" ; then # no header, assume found
  16953. ICAL_HEADER_FOUND="1"
  16954. else # check for the header
  16955. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  16956. CPPFLAGS="${CPPFLAGS} ${ICAL_INCLUDE}"
  16957. ac_fn_c_check_header_mongrel "$LINENO" "libical/ical.h" "ac_cv_header_libical_ical_h" "$ac_includes_default"
  16958. if test "x$ac_cv_header_libical_ical_h" = xyes; then :
  16959. ICAL_HEADER_FOUND=1
  16960. else
  16961. ICAL_HEADER_FOUND=0
  16962. fi
  16963. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  16964. fi
  16965. if test "x${ICAL_HEADER_FOUND}" = "x0" ; then
  16966. ICAL_LIB=""
  16967. ICAL_INCLUDE=""
  16968. else
  16969. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  16970. ICAL_LIB=""
  16971. fi
  16972. PBX_ICAL=1
  16973. cat >>confdefs.h <<_ACEOF
  16974. #define HAVE_ICAL 1
  16975. _ACEOF
  16976. fi
  16977. fi
  16978. fi
  16979. if test "x${PBX_IKSEMEL}" != "x1" -a "${USE_IKSEMEL}" != "no"; then
  16980. pbxlibdir=""
  16981. # if --with-IKSEMEL=DIR has been specified, use it.
  16982. if test "x${IKSEMEL_DIR}" != "x"; then
  16983. if test -d ${IKSEMEL_DIR}/lib; then
  16984. pbxlibdir="-L${IKSEMEL_DIR}/lib"
  16985. else
  16986. pbxlibdir="-L${IKSEMEL_DIR}"
  16987. fi
  16988. fi
  16989. pbxfuncname="iks_start_sasl"
  16990. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  16991. AST_IKSEMEL_FOUND=yes
  16992. else
  16993. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  16994. CFLAGS="${CFLAGS} "
  16995. as_ac_Lib=`$as_echo "ac_cv_lib_iksemel_${pbxfuncname}" | $as_tr_sh`
  16996. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -liksemel" >&5
  16997. $as_echo_n "checking for ${pbxfuncname} in -liksemel... " >&6; }
  16998. if eval \${$as_ac_Lib+:} false; then :
  16999. $as_echo_n "(cached) " >&6
  17000. else
  17001. ac_check_lib_save_LIBS=$LIBS
  17002. LIBS="-liksemel ${pbxlibdir} $LIBS"
  17003. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17004. /* end confdefs.h. */
  17005. /* Override any GCC internal prototype to avoid an error.
  17006. Use char because int might match the return type of a GCC
  17007. builtin and then its argument prototype would still apply. */
  17008. #ifdef __cplusplus
  17009. extern "C"
  17010. #endif
  17011. char ${pbxfuncname} ();
  17012. int
  17013. main ()
  17014. {
  17015. return ${pbxfuncname} ();
  17016. ;
  17017. return 0;
  17018. }
  17019. _ACEOF
  17020. if ac_fn_c_try_link "$LINENO"; then :
  17021. eval "$as_ac_Lib=yes"
  17022. else
  17023. eval "$as_ac_Lib=no"
  17024. fi
  17025. rm -f core conftest.err conftest.$ac_objext \
  17026. conftest$ac_exeext conftest.$ac_ext
  17027. LIBS=$ac_check_lib_save_LIBS
  17028. fi
  17029. eval ac_res=\$$as_ac_Lib
  17030. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  17031. $as_echo "$ac_res" >&6; }
  17032. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  17033. AST_IKSEMEL_FOUND=yes
  17034. else
  17035. AST_IKSEMEL_FOUND=no
  17036. fi
  17037. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  17038. fi
  17039. # now check for the header.
  17040. if test "${AST_IKSEMEL_FOUND}" = "yes"; then
  17041. IKSEMEL_LIB="${pbxlibdir} -liksemel "
  17042. # if --with-IKSEMEL=DIR has been specified, use it.
  17043. if test "x${IKSEMEL_DIR}" != "x"; then
  17044. IKSEMEL_INCLUDE="-I${IKSEMEL_DIR}/include"
  17045. fi
  17046. IKSEMEL_INCLUDE="${IKSEMEL_INCLUDE} "
  17047. if test "xiksemel.h" = "x" ; then # no header, assume found
  17048. IKSEMEL_HEADER_FOUND="1"
  17049. else # check for the header
  17050. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  17051. CPPFLAGS="${CPPFLAGS} ${IKSEMEL_INCLUDE}"
  17052. ac_fn_c_check_header_mongrel "$LINENO" "iksemel.h" "ac_cv_header_iksemel_h" "$ac_includes_default"
  17053. if test "x$ac_cv_header_iksemel_h" = xyes; then :
  17054. IKSEMEL_HEADER_FOUND=1
  17055. else
  17056. IKSEMEL_HEADER_FOUND=0
  17057. fi
  17058. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  17059. fi
  17060. if test "x${IKSEMEL_HEADER_FOUND}" = "x0" ; then
  17061. IKSEMEL_LIB=""
  17062. IKSEMEL_INCLUDE=""
  17063. else
  17064. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  17065. IKSEMEL_LIB=""
  17066. fi
  17067. PBX_IKSEMEL=1
  17068. cat >>confdefs.h <<_ACEOF
  17069. #define HAVE_IKSEMEL 1
  17070. _ACEOF
  17071. fi
  17072. fi
  17073. fi
  17074. if test "${USE_IMAP_TK}" != "no"; then
  17075. saved_cppflags="${CPPFLAGS}"
  17076. saved_libs="${LIBS}"
  17077. switch_to_system_on_failure="no"
  17078. if test "${IMAP_TK_DIR}" = ""; then
  17079. IMAP_TK_DIR=`pwd`"/../imap-2004g"
  17080. switch_to_system_on_failure="yes"
  17081. fi
  17082. if test "${IMAP_TK_DIR}" != "system"; then
  17083. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UW IMAP Toolkit c-client library" >&5
  17084. $as_echo_n "checking for UW IMAP Toolkit c-client library... " >&6; }
  17085. if test -f "${IMAP_TK_DIR}/c-client/LDFLAGS"; then
  17086. imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS`
  17087. fi
  17088. imap_libs="${IMAP_TK_DIR}/c-client/c-client.a"
  17089. imap_include="-I${IMAP_TK_DIR}/c-client"
  17090. CPPFLAGS="${CPPFLAGS} ${imap_include}"
  17091. LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
  17092. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17093. /* end confdefs.h. */
  17094. #include "c-client.h"
  17095. void mm_searched (MAILSTREAM *stream,unsigned long number)
  17096. {
  17097. }
  17098. void mm_exists (MAILSTREAM *stream,unsigned long number)
  17099. {
  17100. }
  17101. void mm_expunged (MAILSTREAM *stream,unsigned long number)
  17102. {
  17103. }
  17104. void mm_flags (MAILSTREAM *stream,unsigned long number)
  17105. {
  17106. }
  17107. void mm_notify (MAILSTREAM *stream,char *string,long errflg)
  17108. {
  17109. }
  17110. void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
  17111. {
  17112. }
  17113. void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
  17114. {
  17115. }
  17116. void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
  17117. {
  17118. }
  17119. void mm_log (char *string,long errflg)
  17120. {
  17121. }
  17122. void mm_dlog (char *string)
  17123. {
  17124. }
  17125. void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
  17126. {
  17127. }
  17128. void mm_critical (MAILSTREAM *stream)
  17129. {
  17130. }
  17131. void mm_nocritical (MAILSTREAM *stream)
  17132. {
  17133. }
  17134. long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
  17135. {
  17136. }
  17137. void mm_fatal (char *string)
  17138. {
  17139. }
  17140. int
  17141. main ()
  17142. {
  17143. MAILSTREAM *foo = mail_open(NULL, "", 0);
  17144. ;
  17145. return 0;
  17146. }
  17147. _ACEOF
  17148. if ac_fn_c_try_link "$LINENO"; then :
  17149. ac_cv_imap_tk="yes"
  17150. else
  17151. ac_cv_imap_tk="no"
  17152. fi
  17153. rm -f core conftest.err conftest.$ac_objext \
  17154. conftest$ac_exeext conftest.$ac_ext
  17155. if test "${ac_cv_imap_tk}" = "yes"; then
  17156. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17157. /* end confdefs.h. */
  17158. #include "c-client.h"
  17159. void mm_searched (MAILSTREAM *stream,unsigned long number)
  17160. {
  17161. }
  17162. void mm_exists (MAILSTREAM *stream,unsigned long number)
  17163. {
  17164. }
  17165. void mm_expunged (MAILSTREAM *stream,unsigned long number)
  17166. {
  17167. }
  17168. void mm_flags (MAILSTREAM *stream,unsigned long number)
  17169. {
  17170. }
  17171. void mm_notify (MAILSTREAM *stream,char *string,long errflg)
  17172. {
  17173. }
  17174. void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
  17175. {
  17176. }
  17177. void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
  17178. {
  17179. }
  17180. void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
  17181. {
  17182. }
  17183. void mm_log (char *string,long errflg)
  17184. {
  17185. }
  17186. void mm_dlog (char *string)
  17187. {
  17188. }
  17189. void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
  17190. {
  17191. }
  17192. void mm_critical (MAILSTREAM *stream)
  17193. {
  17194. }
  17195. void mm_nocritical (MAILSTREAM *stream)
  17196. {
  17197. }
  17198. long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
  17199. {
  17200. }
  17201. void mm_fatal (char *string)
  17202. {
  17203. }
  17204. int
  17205. main ()
  17206. {
  17207. long check = mail_expunge_full(NULL, "", 0);
  17208. ;
  17209. return 0;
  17210. }
  17211. _ACEOF
  17212. if ac_fn_c_try_link "$LINENO"; then :
  17213. ac_cv_imap_tk2006="yes"
  17214. else
  17215. ac_cv_imap_tk2006="no"
  17216. fi
  17217. rm -f core conftest.err conftest.$ac_objext \
  17218. conftest$ac_exeext conftest.$ac_ext
  17219. fi
  17220. CPPFLAGS="${saved_cppflags}"
  17221. LIBS="${saved_libs}"
  17222. if test "${ac_cv_imap_tk}" = "no"; then
  17223. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  17224. $as_echo "no" >&6; }
  17225. if test "${switch_to_system_on_failure}" = "yes"; then
  17226. IMAP_TK_DIR="system"
  17227. else #This means they specified a directory. Search for a package installation there too
  17228. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for system c-client library..." >&5
  17229. $as_echo_n "checking for system c-client library...... " >&6; }
  17230. CPPFLAGS="${saved_cppflags}"
  17231. LIBS="${saved_libs}"
  17232. imap_include="-I${IMAP_TK_DIR}/include"
  17233. imap_ldflags="-L${IMAP_TK_DIR}/lib"
  17234. imap_libs="-lc-client"
  17235. CPPFLAGS="${CPPFLAGS} ${imap_include}"
  17236. LIBS="${LIBS} ${imap_libs} ${imap_ldflags}"
  17237. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17238. /* end confdefs.h. */
  17239. #include "c-client.h"
  17240. void mm_searched (MAILSTREAM *stream,unsigned long number)
  17241. {
  17242. }
  17243. void mm_exists (MAILSTREAM *stream,unsigned long number)
  17244. {
  17245. }
  17246. void mm_expunged (MAILSTREAM *stream,unsigned long number)
  17247. {
  17248. }
  17249. void mm_flags (MAILSTREAM *stream,unsigned long number)
  17250. {
  17251. }
  17252. void mm_notify (MAILSTREAM *stream,char *string,long errflg)
  17253. {
  17254. }
  17255. void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
  17256. {
  17257. }
  17258. void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
  17259. {
  17260. }
  17261. void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
  17262. {
  17263. }
  17264. void mm_log (char *string,long errflg)
  17265. {
  17266. }
  17267. void mm_dlog (char *string)
  17268. {
  17269. }
  17270. void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
  17271. {
  17272. }
  17273. void mm_critical (MAILSTREAM *stream)
  17274. {
  17275. }
  17276. void mm_nocritical (MAILSTREAM *stream)
  17277. {
  17278. }
  17279. long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
  17280. {
  17281. }
  17282. void mm_fatal (char *string)
  17283. {
  17284. }
  17285. int
  17286. main ()
  17287. {
  17288. MAILSTREAM *foo = mail_open(NULL, "", 0);
  17289. ;
  17290. return 0;
  17291. }
  17292. _ACEOF
  17293. if ac_fn_c_try_link "$LINENO"; then :
  17294. ac_cv_imap_tk="yes"
  17295. else
  17296. ac_cv_imap_tk="no"
  17297. fi
  17298. rm -f core conftest.err conftest.$ac_objext \
  17299. conftest$ac_exeext conftest.$ac_ext
  17300. if test "${ac_cv_imap_tk}" = "yes"; then
  17301. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17302. /* end confdefs.h. */
  17303. #include "c-client.h"
  17304. void mm_searched (MAILSTREAM *stream,unsigned long number)
  17305. {
  17306. }
  17307. void mm_exists (MAILSTREAM *stream,unsigned long number)
  17308. {
  17309. }
  17310. void mm_expunged (MAILSTREAM *stream,unsigned long number)
  17311. {
  17312. }
  17313. void mm_flags (MAILSTREAM *stream,unsigned long number)
  17314. {
  17315. }
  17316. void mm_notify (MAILSTREAM *stream,char *string,long errflg)
  17317. {
  17318. }
  17319. void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
  17320. {
  17321. }
  17322. void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
  17323. {
  17324. }
  17325. void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
  17326. {
  17327. }
  17328. void mm_log (char *string,long errflg)
  17329. {
  17330. }
  17331. void mm_dlog (char *string)
  17332. {
  17333. }
  17334. void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
  17335. {
  17336. }
  17337. void mm_critical (MAILSTREAM *stream)
  17338. {
  17339. }
  17340. void mm_nocritical (MAILSTREAM *stream)
  17341. {
  17342. }
  17343. long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
  17344. {
  17345. }
  17346. void mm_fatal (char *string)
  17347. {
  17348. }
  17349. int
  17350. main ()
  17351. {
  17352. long check = mail_expunge_full(NULL, "", 0);
  17353. ;
  17354. return 0;
  17355. }
  17356. _ACEOF
  17357. if ac_fn_c_try_link "$LINENO"; then :
  17358. ac_cv_imap_tk2006="yes"
  17359. else
  17360. ac_cv_imap_tk2006="no"
  17361. fi
  17362. rm -f core conftest.err conftest.$ac_objext \
  17363. conftest$ac_exeext conftest.$ac_ext
  17364. fi
  17365. fi
  17366. fi
  17367. fi
  17368. if test "${IMAP_TK_DIR}" = "system"; then
  17369. #We will enter here if user specified "system" or if any of above checks failed
  17370. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for system c-client library..." >&5
  17371. $as_echo_n "checking for system c-client library...... " >&6; }
  17372. CPPFLAGS="${saved_cppflags}"
  17373. LIBS="${saved_libs}"
  17374. imap_ldflags=""
  17375. imap_libs="-lc-client"
  17376. imap_include="-DUSE_SYSTEM_IMAP" #Try the imap directory first
  17377. CPPFLAGS="${CPPFLAGS} ${imap_include}"
  17378. LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
  17379. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17380. /* end confdefs.h. */
  17381. #include <stdio.h>
  17382. #include <imap/c-client.h>
  17383. void mm_searched (MAILSTREAM *stream,unsigned long number)
  17384. {
  17385. }
  17386. void mm_exists (MAILSTREAM *stream,unsigned long number)
  17387. {
  17388. }
  17389. void mm_expunged (MAILSTREAM *stream,unsigned long number)
  17390. {
  17391. }
  17392. void mm_flags (MAILSTREAM *stream,unsigned long number)
  17393. {
  17394. }
  17395. void mm_notify (MAILSTREAM *stream,char *string,long errflg)
  17396. {
  17397. }
  17398. void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
  17399. {
  17400. }
  17401. void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
  17402. {
  17403. }
  17404. void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
  17405. {
  17406. }
  17407. void mm_log (char *string,long errflg)
  17408. {
  17409. }
  17410. void mm_dlog (char *string)
  17411. {
  17412. }
  17413. void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
  17414. {
  17415. }
  17416. void mm_critical (MAILSTREAM *stream)
  17417. {
  17418. }
  17419. void mm_nocritical (MAILSTREAM *stream)
  17420. {
  17421. }
  17422. long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
  17423. {
  17424. }
  17425. void mm_fatal (char *string)
  17426. {
  17427. }
  17428. int
  17429. main ()
  17430. {
  17431. MAILSTREAM *foo = mail_open(NULL, "", 0);
  17432. ;
  17433. return 0;
  17434. }
  17435. _ACEOF
  17436. if ac_fn_c_try_link "$LINENO"; then :
  17437. ac_cv_imap_tk="yes"
  17438. else
  17439. ac_cv_imap_tk="no"
  17440. fi
  17441. rm -f core conftest.err conftest.$ac_objext \
  17442. conftest$ac_exeext conftest.$ac_ext
  17443. if test "${ac_cv_imap_tk}" = "yes"; then
  17444. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17445. /* end confdefs.h. */
  17446. #include <stdio.h>
  17447. #include <imap/c-client.h>
  17448. void mm_searched (MAILSTREAM *stream,unsigned long number)
  17449. {
  17450. }
  17451. void mm_exists (MAILSTREAM *stream,unsigned long number)
  17452. {
  17453. }
  17454. void mm_expunged (MAILSTREAM *stream,unsigned long number)
  17455. {
  17456. }
  17457. void mm_flags (MAILSTREAM *stream,unsigned long number)
  17458. {
  17459. }
  17460. void mm_notify (MAILSTREAM *stream,char *string,long errflg)
  17461. {
  17462. }
  17463. void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
  17464. {
  17465. }
  17466. void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
  17467. {
  17468. }
  17469. void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
  17470. {
  17471. }
  17472. void mm_log (char *string,long errflg)
  17473. {
  17474. }
  17475. void mm_dlog (char *string)
  17476. {
  17477. }
  17478. void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
  17479. {
  17480. }
  17481. void mm_critical (MAILSTREAM *stream)
  17482. {
  17483. }
  17484. void mm_nocritical (MAILSTREAM *stream)
  17485. {
  17486. }
  17487. long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
  17488. {
  17489. }
  17490. void mm_fatal (char *string)
  17491. {
  17492. }
  17493. int
  17494. main ()
  17495. {
  17496. long check = mail_expunge_full(NULL, "", 0);
  17497. ;
  17498. return 0;
  17499. }
  17500. _ACEOF
  17501. if ac_fn_c_try_link "$LINENO"; then :
  17502. ac_cv_imap_tk2006="yes"
  17503. else
  17504. ac_cv_imap_tk2006="no"
  17505. fi
  17506. rm -f core conftest.err conftest.$ac_objext \
  17507. conftest$ac_exeext conftest.$ac_ext
  17508. else #looking in imap directory didn't work, try c-client
  17509. imap_ldflags=""
  17510. imap_libs="-lc-client"
  17511. imap_include="-DUSE_SYSTEM_CCLIENT"
  17512. CPPFLAGS="${saved_cppflags}"
  17513. LIBS="${saved_libs}"
  17514. CPPFLAGS="${CPPFLAGS} ${imap_include}"
  17515. LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
  17516. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17517. /* end confdefs.h. */
  17518. #include <stdio.h>
  17519. #include <c-client/c-client.h>
  17520. void mm_searched (MAILSTREAM *stream,unsigned long number)
  17521. {
  17522. }
  17523. void mm_exists (MAILSTREAM *stream,unsigned long number)
  17524. {
  17525. }
  17526. void mm_expunged (MAILSTREAM *stream,unsigned long number)
  17527. {
  17528. }
  17529. void mm_flags (MAILSTREAM *stream,unsigned long number)
  17530. {
  17531. }
  17532. void mm_notify (MAILSTREAM *stream,char *string,long errflg)
  17533. {
  17534. }
  17535. void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
  17536. {
  17537. }
  17538. void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
  17539. {
  17540. }
  17541. void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
  17542. {
  17543. }
  17544. void mm_log (char *string,long errflg)
  17545. {
  17546. }
  17547. void mm_dlog (char *string)
  17548. {
  17549. }
  17550. void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
  17551. {
  17552. }
  17553. void mm_critical (MAILSTREAM *stream)
  17554. {
  17555. }
  17556. void mm_nocritical (MAILSTREAM *stream)
  17557. {
  17558. }
  17559. long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
  17560. {
  17561. }
  17562. void mm_fatal (char *string)
  17563. {
  17564. }
  17565. int
  17566. main ()
  17567. {
  17568. MAILSTREAM *foo = mail_open(NULL, "", 0);
  17569. ;
  17570. return 0;
  17571. }
  17572. _ACEOF
  17573. if ac_fn_c_try_link "$LINENO"; then :
  17574. ac_cv_imap_tk="yes"
  17575. else
  17576. ac_cv_imap_tk="no"
  17577. fi
  17578. rm -f core conftest.err conftest.$ac_objext \
  17579. conftest$ac_exeext conftest.$ac_ext
  17580. if test "${ac_cv_imap_tk}" = "yes"; then
  17581. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17582. /* end confdefs.h. */
  17583. #include <stdio.h>
  17584. #include <c-client/c-client.h>
  17585. void mm_searched (MAILSTREAM *stream,unsigned long number)
  17586. {
  17587. }
  17588. void mm_exists (MAILSTREAM *stream,unsigned long number)
  17589. {
  17590. }
  17591. void mm_expunged (MAILSTREAM *stream,unsigned long number)
  17592. {
  17593. }
  17594. void mm_flags (MAILSTREAM *stream,unsigned long number)
  17595. {
  17596. }
  17597. void mm_notify (MAILSTREAM *stream,char *string,long errflg)
  17598. {
  17599. }
  17600. void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
  17601. {
  17602. }
  17603. void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
  17604. {
  17605. }
  17606. void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
  17607. {
  17608. }
  17609. void mm_log (char *string,long errflg)
  17610. {
  17611. }
  17612. void mm_dlog (char *string)
  17613. {
  17614. }
  17615. void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
  17616. {
  17617. }
  17618. void mm_critical (MAILSTREAM *stream)
  17619. {
  17620. }
  17621. void mm_nocritical (MAILSTREAM *stream)
  17622. {
  17623. }
  17624. long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
  17625. {
  17626. }
  17627. void mm_fatal (char *string)
  17628. {
  17629. }
  17630. int
  17631. main ()
  17632. {
  17633. long check = mail_expunge_full(NULL, "", 0);
  17634. ;
  17635. return 0;
  17636. }
  17637. _ACEOF
  17638. if ac_fn_c_try_link "$LINENO"; then :
  17639. ac_cv_imap_tk2006="yes"
  17640. else
  17641. ac_cv_imap_tk2006="no"
  17642. fi
  17643. rm -f core conftest.err conftest.$ac_objext \
  17644. conftest$ac_exeext conftest.$ac_ext
  17645. fi
  17646. fi
  17647. fi
  17648. if test "${ac_cv_imap_tk}" = "yes"; then
  17649. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  17650. $as_echo "yes" >&6; }
  17651. IMAP_TK_LIB="${imap_libs} "`echo ${imap_ldflags}`
  17652. IMAP_TK_INCLUDE="${imap_include}"
  17653. PBX_IMAP_TK=1
  17654. $as_echo "#define HAVE_IMAP_TK 1" >>confdefs.h
  17655. if test "${ac_cv_imap_tk2006}" = "yes"; then
  17656. $as_echo "#define HAVE_IMAP_TK2006 1" >>confdefs.h
  17657. fi
  17658. else
  17659. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  17660. $as_echo "no" >&6; }
  17661. fi
  17662. CPPFLAGS="${saved_cppflags}"
  17663. LIBS="${saved_libs}"
  17664. fi
  17665. if test "x${PBX_IODBC}" != "x1" -a "${USE_IODBC}" != "no"; then
  17666. pbxlibdir=""
  17667. # if --with-IODBC=DIR has been specified, use it.
  17668. if test "x${IODBC_DIR}" != "x"; then
  17669. if test -d ${IODBC_DIR}/lib; then
  17670. pbxlibdir="-L${IODBC_DIR}/lib"
  17671. else
  17672. pbxlibdir="-L${IODBC_DIR}"
  17673. fi
  17674. fi
  17675. pbxfuncname="SQLConnect"
  17676. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  17677. AST_IODBC_FOUND=yes
  17678. else
  17679. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  17680. CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
  17681. as_ac_Lib=`$as_echo "ac_cv_lib_iodbc_${pbxfuncname}" | $as_tr_sh`
  17682. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -liodbc" >&5
  17683. $as_echo_n "checking for ${pbxfuncname} in -liodbc... " >&6; }
  17684. if eval \${$as_ac_Lib+:} false; then :
  17685. $as_echo_n "(cached) " >&6
  17686. else
  17687. ac_check_lib_save_LIBS=$LIBS
  17688. LIBS="-liodbc ${pbxlibdir} ${PTHREAD_LIBS} $LIBS"
  17689. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17690. /* end confdefs.h. */
  17691. /* Override any GCC internal prototype to avoid an error.
  17692. Use char because int might match the return type of a GCC
  17693. builtin and then its argument prototype would still apply. */
  17694. #ifdef __cplusplus
  17695. extern "C"
  17696. #endif
  17697. char ${pbxfuncname} ();
  17698. int
  17699. main ()
  17700. {
  17701. return ${pbxfuncname} ();
  17702. ;
  17703. return 0;
  17704. }
  17705. _ACEOF
  17706. if ac_fn_c_try_link "$LINENO"; then :
  17707. eval "$as_ac_Lib=yes"
  17708. else
  17709. eval "$as_ac_Lib=no"
  17710. fi
  17711. rm -f core conftest.err conftest.$ac_objext \
  17712. conftest$ac_exeext conftest.$ac_ext
  17713. LIBS=$ac_check_lib_save_LIBS
  17714. fi
  17715. eval ac_res=\$$as_ac_Lib
  17716. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  17717. $as_echo "$ac_res" >&6; }
  17718. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  17719. AST_IODBC_FOUND=yes
  17720. else
  17721. AST_IODBC_FOUND=no
  17722. fi
  17723. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  17724. fi
  17725. # now check for the header.
  17726. if test "${AST_IODBC_FOUND}" = "yes"; then
  17727. IODBC_LIB="${pbxlibdir} -liodbc ${PTHREAD_LIBS}"
  17728. # if --with-IODBC=DIR has been specified, use it.
  17729. if test "x${IODBC_DIR}" != "x"; then
  17730. IODBC_INCLUDE="-I${IODBC_DIR}/include"
  17731. fi
  17732. IODBC_INCLUDE="${IODBC_INCLUDE} ${PTHREAD_CFLAGS}"
  17733. if test "xsql.h" = "x" ; then # no header, assume found
  17734. IODBC_HEADER_FOUND="1"
  17735. else # check for the header
  17736. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  17737. CPPFLAGS="${CPPFLAGS} ${IODBC_INCLUDE}"
  17738. ac_fn_c_check_header_mongrel "$LINENO" "sql.h" "ac_cv_header_sql_h" "$ac_includes_default"
  17739. if test "x$ac_cv_header_sql_h" = xyes; then :
  17740. IODBC_HEADER_FOUND=1
  17741. else
  17742. IODBC_HEADER_FOUND=0
  17743. fi
  17744. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  17745. fi
  17746. if test "x${IODBC_HEADER_FOUND}" = "x0" ; then
  17747. IODBC_LIB=""
  17748. IODBC_INCLUDE=""
  17749. else
  17750. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  17751. IODBC_LIB=""
  17752. fi
  17753. PBX_IODBC=1
  17754. cat >>confdefs.h <<_ACEOF
  17755. #define HAVE_IODBC 1
  17756. _ACEOF
  17757. fi
  17758. fi
  17759. fi
  17760. if test "x${PBX_INOTIFY}" != "x1" -a "${USE_INOTIFY}" != "no"; then
  17761. pbxlibdir=""
  17762. # if --with-INOTIFY=DIR has been specified, use it.
  17763. if test "x${INOTIFY_DIR}" != "x"; then
  17764. if test -d ${INOTIFY_DIR}/lib; then
  17765. pbxlibdir="-L${INOTIFY_DIR}/lib"
  17766. else
  17767. pbxlibdir="-L${INOTIFY_DIR}"
  17768. fi
  17769. fi
  17770. pbxfuncname="inotify_init"
  17771. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  17772. AST_INOTIFY_FOUND=yes
  17773. else
  17774. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  17775. CFLAGS="${CFLAGS} "
  17776. as_ac_Lib=`$as_echo "ac_cv_lib_c_${pbxfuncname}" | $as_tr_sh`
  17777. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lc" >&5
  17778. $as_echo_n "checking for ${pbxfuncname} in -lc... " >&6; }
  17779. if eval \${$as_ac_Lib+:} false; then :
  17780. $as_echo_n "(cached) " >&6
  17781. else
  17782. ac_check_lib_save_LIBS=$LIBS
  17783. LIBS="-lc ${pbxlibdir} $LIBS"
  17784. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17785. /* end confdefs.h. */
  17786. /* Override any GCC internal prototype to avoid an error.
  17787. Use char because int might match the return type of a GCC
  17788. builtin and then its argument prototype would still apply. */
  17789. #ifdef __cplusplus
  17790. extern "C"
  17791. #endif
  17792. char ${pbxfuncname} ();
  17793. int
  17794. main ()
  17795. {
  17796. return ${pbxfuncname} ();
  17797. ;
  17798. return 0;
  17799. }
  17800. _ACEOF
  17801. if ac_fn_c_try_link "$LINENO"; then :
  17802. eval "$as_ac_Lib=yes"
  17803. else
  17804. eval "$as_ac_Lib=no"
  17805. fi
  17806. rm -f core conftest.err conftest.$ac_objext \
  17807. conftest$ac_exeext conftest.$ac_ext
  17808. LIBS=$ac_check_lib_save_LIBS
  17809. fi
  17810. eval ac_res=\$$as_ac_Lib
  17811. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  17812. $as_echo "$ac_res" >&6; }
  17813. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  17814. AST_INOTIFY_FOUND=yes
  17815. else
  17816. AST_INOTIFY_FOUND=no
  17817. fi
  17818. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  17819. fi
  17820. # now check for the header.
  17821. if test "${AST_INOTIFY_FOUND}" = "yes"; then
  17822. INOTIFY_LIB="${pbxlibdir} -lc "
  17823. # if --with-INOTIFY=DIR has been specified, use it.
  17824. if test "x${INOTIFY_DIR}" != "x"; then
  17825. INOTIFY_INCLUDE="-I${INOTIFY_DIR}/include"
  17826. fi
  17827. INOTIFY_INCLUDE="${INOTIFY_INCLUDE} "
  17828. if test "xsys/inotify.h" = "x" ; then # no header, assume found
  17829. INOTIFY_HEADER_FOUND="1"
  17830. else # check for the header
  17831. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  17832. CPPFLAGS="${CPPFLAGS} ${INOTIFY_INCLUDE}"
  17833. ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
  17834. if test "x$ac_cv_header_sys_inotify_h" = xyes; then :
  17835. INOTIFY_HEADER_FOUND=1
  17836. else
  17837. INOTIFY_HEADER_FOUND=0
  17838. fi
  17839. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  17840. fi
  17841. if test "x${INOTIFY_HEADER_FOUND}" = "x0" ; then
  17842. INOTIFY_LIB=""
  17843. INOTIFY_INCLUDE=""
  17844. else
  17845. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  17846. INOTIFY_LIB=""
  17847. fi
  17848. PBX_INOTIFY=1
  17849. cat >>confdefs.h <<_ACEOF
  17850. #define HAVE_INOTIFY 1
  17851. _ACEOF
  17852. fi
  17853. fi
  17854. fi
  17855. if test "x${PBX_JACK}" != "x1" -a "${USE_JACK}" != "no"; then
  17856. pbxlibdir=""
  17857. # if --with-JACK=DIR has been specified, use it.
  17858. if test "x${JACK_DIR}" != "x"; then
  17859. if test -d ${JACK_DIR}/lib; then
  17860. pbxlibdir="-L${JACK_DIR}/lib"
  17861. else
  17862. pbxlibdir="-L${JACK_DIR}"
  17863. fi
  17864. fi
  17865. pbxfuncname="jack_activate"
  17866. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  17867. AST_JACK_FOUND=yes
  17868. else
  17869. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  17870. CFLAGS="${CFLAGS} "
  17871. as_ac_Lib=`$as_echo "ac_cv_lib_jack_${pbxfuncname}" | $as_tr_sh`
  17872. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -ljack" >&5
  17873. $as_echo_n "checking for ${pbxfuncname} in -ljack... " >&6; }
  17874. if eval \${$as_ac_Lib+:} false; then :
  17875. $as_echo_n "(cached) " >&6
  17876. else
  17877. ac_check_lib_save_LIBS=$LIBS
  17878. LIBS="-ljack ${pbxlibdir} $LIBS"
  17879. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17880. /* end confdefs.h. */
  17881. /* Override any GCC internal prototype to avoid an error.
  17882. Use char because int might match the return type of a GCC
  17883. builtin and then its argument prototype would still apply. */
  17884. #ifdef __cplusplus
  17885. extern "C"
  17886. #endif
  17887. char ${pbxfuncname} ();
  17888. int
  17889. main ()
  17890. {
  17891. return ${pbxfuncname} ();
  17892. ;
  17893. return 0;
  17894. }
  17895. _ACEOF
  17896. if ac_fn_c_try_link "$LINENO"; then :
  17897. eval "$as_ac_Lib=yes"
  17898. else
  17899. eval "$as_ac_Lib=no"
  17900. fi
  17901. rm -f core conftest.err conftest.$ac_objext \
  17902. conftest$ac_exeext conftest.$ac_ext
  17903. LIBS=$ac_check_lib_save_LIBS
  17904. fi
  17905. eval ac_res=\$$as_ac_Lib
  17906. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  17907. $as_echo "$ac_res" >&6; }
  17908. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  17909. AST_JACK_FOUND=yes
  17910. else
  17911. AST_JACK_FOUND=no
  17912. fi
  17913. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  17914. fi
  17915. # now check for the header.
  17916. if test "${AST_JACK_FOUND}" = "yes"; then
  17917. JACK_LIB="${pbxlibdir} -ljack "
  17918. # if --with-JACK=DIR has been specified, use it.
  17919. if test "x${JACK_DIR}" != "x"; then
  17920. JACK_INCLUDE="-I${JACK_DIR}/include"
  17921. fi
  17922. JACK_INCLUDE="${JACK_INCLUDE} "
  17923. if test "xjack/jack.h" = "x" ; then # no header, assume found
  17924. JACK_HEADER_FOUND="1"
  17925. else # check for the header
  17926. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  17927. CPPFLAGS="${CPPFLAGS} ${JACK_INCLUDE}"
  17928. ac_fn_c_check_header_mongrel "$LINENO" "jack/jack.h" "ac_cv_header_jack_jack_h" "$ac_includes_default"
  17929. if test "x$ac_cv_header_jack_jack_h" = xyes; then :
  17930. JACK_HEADER_FOUND=1
  17931. else
  17932. JACK_HEADER_FOUND=0
  17933. fi
  17934. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  17935. fi
  17936. if test "x${JACK_HEADER_FOUND}" = "x0" ; then
  17937. JACK_LIB=""
  17938. JACK_INCLUDE=""
  17939. else
  17940. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  17941. JACK_LIB=""
  17942. fi
  17943. PBX_JACK=1
  17944. cat >>confdefs.h <<_ACEOF
  17945. #define HAVE_JACK 1
  17946. _ACEOF
  17947. fi
  17948. fi
  17949. fi
  17950. # BSD (and OS X) equivalent of inotify
  17951. if test "x${PBX_KQUEUE}" != "x1" -a "${USE_KQUEUE}" != "no"; then
  17952. pbxlibdir=""
  17953. # if --with-KQUEUE=DIR has been specified, use it.
  17954. if test "x${KQUEUE_DIR}" != "x"; then
  17955. if test -d ${KQUEUE_DIR}/lib; then
  17956. pbxlibdir="-L${KQUEUE_DIR}/lib"
  17957. else
  17958. pbxlibdir="-L${KQUEUE_DIR}"
  17959. fi
  17960. fi
  17961. pbxfuncname="kqueue"
  17962. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  17963. AST_KQUEUE_FOUND=yes
  17964. else
  17965. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  17966. CFLAGS="${CFLAGS} "
  17967. as_ac_Lib=`$as_echo "ac_cv_lib_c_${pbxfuncname}" | $as_tr_sh`
  17968. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lc" >&5
  17969. $as_echo_n "checking for ${pbxfuncname} in -lc... " >&6; }
  17970. if eval \${$as_ac_Lib+:} false; then :
  17971. $as_echo_n "(cached) " >&6
  17972. else
  17973. ac_check_lib_save_LIBS=$LIBS
  17974. LIBS="-lc ${pbxlibdir} $LIBS"
  17975. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17976. /* end confdefs.h. */
  17977. /* Override any GCC internal prototype to avoid an error.
  17978. Use char because int might match the return type of a GCC
  17979. builtin and then its argument prototype would still apply. */
  17980. #ifdef __cplusplus
  17981. extern "C"
  17982. #endif
  17983. char ${pbxfuncname} ();
  17984. int
  17985. main ()
  17986. {
  17987. return ${pbxfuncname} ();
  17988. ;
  17989. return 0;
  17990. }
  17991. _ACEOF
  17992. if ac_fn_c_try_link "$LINENO"; then :
  17993. eval "$as_ac_Lib=yes"
  17994. else
  17995. eval "$as_ac_Lib=no"
  17996. fi
  17997. rm -f core conftest.err conftest.$ac_objext \
  17998. conftest$ac_exeext conftest.$ac_ext
  17999. LIBS=$ac_check_lib_save_LIBS
  18000. fi
  18001. eval ac_res=\$$as_ac_Lib
  18002. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  18003. $as_echo "$ac_res" >&6; }
  18004. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  18005. AST_KQUEUE_FOUND=yes
  18006. else
  18007. AST_KQUEUE_FOUND=no
  18008. fi
  18009. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  18010. fi
  18011. # now check for the header.
  18012. if test "${AST_KQUEUE_FOUND}" = "yes"; then
  18013. KQUEUE_LIB="${pbxlibdir} -lc "
  18014. # if --with-KQUEUE=DIR has been specified, use it.
  18015. if test "x${KQUEUE_DIR}" != "x"; then
  18016. KQUEUE_INCLUDE="-I${KQUEUE_DIR}/include"
  18017. fi
  18018. KQUEUE_INCLUDE="${KQUEUE_INCLUDE} "
  18019. if test "xsys/event.h" = "x" ; then # no header, assume found
  18020. KQUEUE_HEADER_FOUND="1"
  18021. else # check for the header
  18022. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  18023. CPPFLAGS="${CPPFLAGS} ${KQUEUE_INCLUDE}"
  18024. ac_fn_c_check_header_mongrel "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" "$ac_includes_default"
  18025. if test "x$ac_cv_header_sys_event_h" = xyes; then :
  18026. KQUEUE_HEADER_FOUND=1
  18027. else
  18028. KQUEUE_HEADER_FOUND=0
  18029. fi
  18030. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  18031. fi
  18032. if test "x${KQUEUE_HEADER_FOUND}" = "x0" ; then
  18033. KQUEUE_LIB=""
  18034. KQUEUE_INCLUDE=""
  18035. else
  18036. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  18037. KQUEUE_LIB=""
  18038. fi
  18039. PBX_KQUEUE=1
  18040. cat >>confdefs.h <<_ACEOF
  18041. #define HAVE_KQUEUE 1
  18042. _ACEOF
  18043. fi
  18044. fi
  18045. fi
  18046. # 64-bit version of kevent (from kqueue) on OS X
  18047. for ac_func in kevent64
  18048. do :
  18049. ac_fn_c_check_func "$LINENO" "kevent64" "ac_cv_func_kevent64"
  18050. if test "x$ac_cv_func_kevent64" = xyes; then :
  18051. cat >>confdefs.h <<_ACEOF
  18052. #define HAVE_KEVENT64 1
  18053. _ACEOF
  18054. fi
  18055. done
  18056. # Needed by unixodbc
  18057. if test "x${PBX_LTDL}" != "x1" -a "${USE_LTDL}" != "no"; then
  18058. pbxlibdir=""
  18059. # if --with-LTDL=DIR has been specified, use it.
  18060. if test "x${LTDL_DIR}" != "x"; then
  18061. if test -d ${LTDL_DIR}/lib; then
  18062. pbxlibdir="-L${LTDL_DIR}/lib"
  18063. else
  18064. pbxlibdir="-L${LTDL_DIR}"
  18065. fi
  18066. fi
  18067. pbxfuncname="lt_dlinit"
  18068. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  18069. AST_LTDL_FOUND=yes
  18070. else
  18071. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  18072. CFLAGS="${CFLAGS} "
  18073. as_ac_Lib=`$as_echo "ac_cv_lib_ltdl_${pbxfuncname}" | $as_tr_sh`
  18074. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lltdl" >&5
  18075. $as_echo_n "checking for ${pbxfuncname} in -lltdl... " >&6; }
  18076. if eval \${$as_ac_Lib+:} false; then :
  18077. $as_echo_n "(cached) " >&6
  18078. else
  18079. ac_check_lib_save_LIBS=$LIBS
  18080. LIBS="-lltdl ${pbxlibdir} $LIBS"
  18081. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18082. /* end confdefs.h. */
  18083. /* Override any GCC internal prototype to avoid an error.
  18084. Use char because int might match the return type of a GCC
  18085. builtin and then its argument prototype would still apply. */
  18086. #ifdef __cplusplus
  18087. extern "C"
  18088. #endif
  18089. char ${pbxfuncname} ();
  18090. int
  18091. main ()
  18092. {
  18093. return ${pbxfuncname} ();
  18094. ;
  18095. return 0;
  18096. }
  18097. _ACEOF
  18098. if ac_fn_c_try_link "$LINENO"; then :
  18099. eval "$as_ac_Lib=yes"
  18100. else
  18101. eval "$as_ac_Lib=no"
  18102. fi
  18103. rm -f core conftest.err conftest.$ac_objext \
  18104. conftest$ac_exeext conftest.$ac_ext
  18105. LIBS=$ac_check_lib_save_LIBS
  18106. fi
  18107. eval ac_res=\$$as_ac_Lib
  18108. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  18109. $as_echo "$ac_res" >&6; }
  18110. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  18111. AST_LTDL_FOUND=yes
  18112. else
  18113. AST_LTDL_FOUND=no
  18114. fi
  18115. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  18116. fi
  18117. # now check for the header.
  18118. if test "${AST_LTDL_FOUND}" = "yes"; then
  18119. LTDL_LIB="${pbxlibdir} -lltdl "
  18120. # if --with-LTDL=DIR has been specified, use it.
  18121. if test "x${LTDL_DIR}" != "x"; then
  18122. LTDL_INCLUDE="-I${LTDL_DIR}/include"
  18123. fi
  18124. LTDL_INCLUDE="${LTDL_INCLUDE} "
  18125. if test "xltdl.h" = "x" ; then # no header, assume found
  18126. LTDL_HEADER_FOUND="1"
  18127. else # check for the header
  18128. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  18129. CPPFLAGS="${CPPFLAGS} ${LTDL_INCLUDE}"
  18130. ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
  18131. if test "x$ac_cv_header_ltdl_h" = xyes; then :
  18132. LTDL_HEADER_FOUND=1
  18133. else
  18134. LTDL_HEADER_FOUND=0
  18135. fi
  18136. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  18137. fi
  18138. if test "x${LTDL_HEADER_FOUND}" = "x0" ; then
  18139. LTDL_LIB=""
  18140. LTDL_INCLUDE=""
  18141. else
  18142. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  18143. LTDL_LIB=""
  18144. fi
  18145. PBX_LTDL=1
  18146. cat >>confdefs.h <<_ACEOF
  18147. #define HAVE_LTDL 1
  18148. _ACEOF
  18149. fi
  18150. fi
  18151. fi
  18152. if test "x${PBX_LDAP}" != "x1" -a "${USE_LDAP}" != "no"; then
  18153. pbxlibdir=""
  18154. # if --with-LDAP=DIR has been specified, use it.
  18155. if test "x${LDAP_DIR}" != "x"; then
  18156. if test -d ${LDAP_DIR}/lib; then
  18157. pbxlibdir="-L${LDAP_DIR}/lib"
  18158. else
  18159. pbxlibdir="-L${LDAP_DIR}"
  18160. fi
  18161. fi
  18162. pbxfuncname="ldap_initialize"
  18163. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  18164. AST_LDAP_FOUND=yes
  18165. else
  18166. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  18167. CFLAGS="${CFLAGS} "
  18168. as_ac_Lib=`$as_echo "ac_cv_lib_ldap_${pbxfuncname}" | $as_tr_sh`
  18169. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lldap" >&5
  18170. $as_echo_n "checking for ${pbxfuncname} in -lldap... " >&6; }
  18171. if eval \${$as_ac_Lib+:} false; then :
  18172. $as_echo_n "(cached) " >&6
  18173. else
  18174. ac_check_lib_save_LIBS=$LIBS
  18175. LIBS="-lldap ${pbxlibdir} $LIBS"
  18176. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18177. /* end confdefs.h. */
  18178. /* Override any GCC internal prototype to avoid an error.
  18179. Use char because int might match the return type of a GCC
  18180. builtin and then its argument prototype would still apply. */
  18181. #ifdef __cplusplus
  18182. extern "C"
  18183. #endif
  18184. char ${pbxfuncname} ();
  18185. int
  18186. main ()
  18187. {
  18188. return ${pbxfuncname} ();
  18189. ;
  18190. return 0;
  18191. }
  18192. _ACEOF
  18193. if ac_fn_c_try_link "$LINENO"; then :
  18194. eval "$as_ac_Lib=yes"
  18195. else
  18196. eval "$as_ac_Lib=no"
  18197. fi
  18198. rm -f core conftest.err conftest.$ac_objext \
  18199. conftest$ac_exeext conftest.$ac_ext
  18200. LIBS=$ac_check_lib_save_LIBS
  18201. fi
  18202. eval ac_res=\$$as_ac_Lib
  18203. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  18204. $as_echo "$ac_res" >&6; }
  18205. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  18206. AST_LDAP_FOUND=yes
  18207. else
  18208. AST_LDAP_FOUND=no
  18209. fi
  18210. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  18211. fi
  18212. # now check for the header.
  18213. if test "${AST_LDAP_FOUND}" = "yes"; then
  18214. LDAP_LIB="${pbxlibdir} -lldap "
  18215. # if --with-LDAP=DIR has been specified, use it.
  18216. if test "x${LDAP_DIR}" != "x"; then
  18217. LDAP_INCLUDE="-I${LDAP_DIR}/include"
  18218. fi
  18219. LDAP_INCLUDE="${LDAP_INCLUDE} "
  18220. if test "xldap.h" = "x" ; then # no header, assume found
  18221. LDAP_HEADER_FOUND="1"
  18222. else # check for the header
  18223. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  18224. CPPFLAGS="${CPPFLAGS} ${LDAP_INCLUDE}"
  18225. ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
  18226. if test "x$ac_cv_header_ldap_h" = xyes; then :
  18227. LDAP_HEADER_FOUND=1
  18228. else
  18229. LDAP_HEADER_FOUND=0
  18230. fi
  18231. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  18232. fi
  18233. if test "x${LDAP_HEADER_FOUND}" = "x0" ; then
  18234. LDAP_LIB=""
  18235. LDAP_INCLUDE=""
  18236. else
  18237. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  18238. LDAP_LIB=""
  18239. fi
  18240. PBX_LDAP=1
  18241. cat >>confdefs.h <<_ACEOF
  18242. #define HAVE_LDAP 1
  18243. _ACEOF
  18244. fi
  18245. fi
  18246. fi
  18247. if test "x${PBX_MISDN}" != "x1" -a "${USE_MISDN}" != "no"; then
  18248. pbxlibdir=""
  18249. # if --with-MISDN=DIR has been specified, use it.
  18250. if test "x${MISDN_DIR}" != "x"; then
  18251. if test -d ${MISDN_DIR}/lib; then
  18252. pbxlibdir="-L${MISDN_DIR}/lib"
  18253. else
  18254. pbxlibdir="-L${MISDN_DIR}"
  18255. fi
  18256. fi
  18257. pbxfuncname="mISDN_open"
  18258. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  18259. AST_MISDN_FOUND=yes
  18260. else
  18261. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  18262. CFLAGS="${CFLAGS} "
  18263. as_ac_Lib=`$as_echo "ac_cv_lib_mISDN_${pbxfuncname}" | $as_tr_sh`
  18264. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lmISDN" >&5
  18265. $as_echo_n "checking for ${pbxfuncname} in -lmISDN... " >&6; }
  18266. if eval \${$as_ac_Lib+:} false; then :
  18267. $as_echo_n "(cached) " >&6
  18268. else
  18269. ac_check_lib_save_LIBS=$LIBS
  18270. LIBS="-lmISDN ${pbxlibdir} $LIBS"
  18271. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18272. /* end confdefs.h. */
  18273. /* Override any GCC internal prototype to avoid an error.
  18274. Use char because int might match the return type of a GCC
  18275. builtin and then its argument prototype would still apply. */
  18276. #ifdef __cplusplus
  18277. extern "C"
  18278. #endif
  18279. char ${pbxfuncname} ();
  18280. int
  18281. main ()
  18282. {
  18283. return ${pbxfuncname} ();
  18284. ;
  18285. return 0;
  18286. }
  18287. _ACEOF
  18288. if ac_fn_c_try_link "$LINENO"; then :
  18289. eval "$as_ac_Lib=yes"
  18290. else
  18291. eval "$as_ac_Lib=no"
  18292. fi
  18293. rm -f core conftest.err conftest.$ac_objext \
  18294. conftest$ac_exeext conftest.$ac_ext
  18295. LIBS=$ac_check_lib_save_LIBS
  18296. fi
  18297. eval ac_res=\$$as_ac_Lib
  18298. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  18299. $as_echo "$ac_res" >&6; }
  18300. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  18301. AST_MISDN_FOUND=yes
  18302. else
  18303. AST_MISDN_FOUND=no
  18304. fi
  18305. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  18306. fi
  18307. # now check for the header.
  18308. if test "${AST_MISDN_FOUND}" = "yes"; then
  18309. MISDN_LIB="${pbxlibdir} -lmISDN "
  18310. # if --with-MISDN=DIR has been specified, use it.
  18311. if test "x${MISDN_DIR}" != "x"; then
  18312. MISDN_INCLUDE="-I${MISDN_DIR}/include"
  18313. fi
  18314. MISDN_INCLUDE="${MISDN_INCLUDE} "
  18315. if test "xmISDNuser/mISDNlib.h" = "x" ; then # no header, assume found
  18316. MISDN_HEADER_FOUND="1"
  18317. else # check for the header
  18318. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  18319. CPPFLAGS="${CPPFLAGS} ${MISDN_INCLUDE}"
  18320. ac_fn_c_check_header_mongrel "$LINENO" "mISDNuser/mISDNlib.h" "ac_cv_header_mISDNuser_mISDNlib_h" "$ac_includes_default"
  18321. if test "x$ac_cv_header_mISDNuser_mISDNlib_h" = xyes; then :
  18322. MISDN_HEADER_FOUND=1
  18323. else
  18324. MISDN_HEADER_FOUND=0
  18325. fi
  18326. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  18327. fi
  18328. if test "x${MISDN_HEADER_FOUND}" = "x0" ; then
  18329. MISDN_LIB=""
  18330. MISDN_INCLUDE=""
  18331. else
  18332. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  18333. MISDN_LIB=""
  18334. fi
  18335. PBX_MISDN=1
  18336. cat >>confdefs.h <<_ACEOF
  18337. #define HAVE_MISDN 1
  18338. _ACEOF
  18339. fi
  18340. fi
  18341. fi
  18342. if test "${PBX_MISDN}" = 1; then
  18343. if test "x${PBX_ISDNNET}" != "x1" -a "${USE_ISDNNET}" != "no"; then
  18344. pbxlibdir=""
  18345. # if --with-ISDNNET=DIR has been specified, use it.
  18346. if test "x${ISDNNET_DIR}" != "x"; then
  18347. if test -d ${ISDNNET_DIR}/lib; then
  18348. pbxlibdir="-L${ISDNNET_DIR}/lib"
  18349. else
  18350. pbxlibdir="-L${ISDNNET_DIR}"
  18351. fi
  18352. fi
  18353. pbxfuncname="init_manager"
  18354. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  18355. AST_ISDNNET_FOUND=yes
  18356. else
  18357. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  18358. CFLAGS="${CFLAGS} "
  18359. as_ac_Lib=`$as_echo "ac_cv_lib_isdnnet_${pbxfuncname}" | $as_tr_sh`
  18360. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lisdnnet" >&5
  18361. $as_echo_n "checking for ${pbxfuncname} in -lisdnnet... " >&6; }
  18362. if eval \${$as_ac_Lib+:} false; then :
  18363. $as_echo_n "(cached) " >&6
  18364. else
  18365. ac_check_lib_save_LIBS=$LIBS
  18366. LIBS="-lisdnnet ${pbxlibdir} -lmISDN -lpthread $LIBS"
  18367. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18368. /* end confdefs.h. */
  18369. /* Override any GCC internal prototype to avoid an error.
  18370. Use char because int might match the return type of a GCC
  18371. builtin and then its argument prototype would still apply. */
  18372. #ifdef __cplusplus
  18373. extern "C"
  18374. #endif
  18375. char ${pbxfuncname} ();
  18376. int
  18377. main ()
  18378. {
  18379. return ${pbxfuncname} ();
  18380. ;
  18381. return 0;
  18382. }
  18383. _ACEOF
  18384. if ac_fn_c_try_link "$LINENO"; then :
  18385. eval "$as_ac_Lib=yes"
  18386. else
  18387. eval "$as_ac_Lib=no"
  18388. fi
  18389. rm -f core conftest.err conftest.$ac_objext \
  18390. conftest$ac_exeext conftest.$ac_ext
  18391. LIBS=$ac_check_lib_save_LIBS
  18392. fi
  18393. eval ac_res=\$$as_ac_Lib
  18394. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  18395. $as_echo "$ac_res" >&6; }
  18396. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  18397. AST_ISDNNET_FOUND=yes
  18398. else
  18399. AST_ISDNNET_FOUND=no
  18400. fi
  18401. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  18402. fi
  18403. # now check for the header.
  18404. if test "${AST_ISDNNET_FOUND}" = "yes"; then
  18405. ISDNNET_LIB="${pbxlibdir} -lisdnnet -lmISDN -lpthread"
  18406. # if --with-ISDNNET=DIR has been specified, use it.
  18407. if test "x${ISDNNET_DIR}" != "x"; then
  18408. ISDNNET_INCLUDE="-I${ISDNNET_DIR}/include"
  18409. fi
  18410. ISDNNET_INCLUDE="${ISDNNET_INCLUDE} "
  18411. if test "xmISDNuser/isdn_net.h" = "x" ; then # no header, assume found
  18412. ISDNNET_HEADER_FOUND="1"
  18413. else # check for the header
  18414. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  18415. CPPFLAGS="${CPPFLAGS} ${ISDNNET_INCLUDE}"
  18416. ac_fn_c_check_header_mongrel "$LINENO" "mISDNuser/isdn_net.h" "ac_cv_header_mISDNuser_isdn_net_h" "$ac_includes_default"
  18417. if test "x$ac_cv_header_mISDNuser_isdn_net_h" = xyes; then :
  18418. ISDNNET_HEADER_FOUND=1
  18419. else
  18420. ISDNNET_HEADER_FOUND=0
  18421. fi
  18422. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  18423. fi
  18424. if test "x${ISDNNET_HEADER_FOUND}" = "x0" ; then
  18425. ISDNNET_LIB=""
  18426. ISDNNET_INCLUDE=""
  18427. else
  18428. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  18429. ISDNNET_LIB=""
  18430. fi
  18431. PBX_ISDNNET=1
  18432. cat >>confdefs.h <<_ACEOF
  18433. #define HAVE_ISDNNET 1
  18434. _ACEOF
  18435. fi
  18436. fi
  18437. fi
  18438. if test "x${PBX_SUPPSERV}" != "x1" -a "${USE_SUPPSERV}" != "no"; then
  18439. pbxlibdir=""
  18440. # if --with-SUPPSERV=DIR has been specified, use it.
  18441. if test "x${SUPPSERV_DIR}" != "x"; then
  18442. if test -d ${SUPPSERV_DIR}/lib; then
  18443. pbxlibdir="-L${SUPPSERV_DIR}/lib"
  18444. else
  18445. pbxlibdir="-L${SUPPSERV_DIR}"
  18446. fi
  18447. fi
  18448. pbxfuncname="encodeFac"
  18449. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  18450. AST_SUPPSERV_FOUND=yes
  18451. else
  18452. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  18453. CFLAGS="${CFLAGS} "
  18454. as_ac_Lib=`$as_echo "ac_cv_lib_suppserv_${pbxfuncname}" | $as_tr_sh`
  18455. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsuppserv" >&5
  18456. $as_echo_n "checking for ${pbxfuncname} in -lsuppserv... " >&6; }
  18457. if eval \${$as_ac_Lib+:} false; then :
  18458. $as_echo_n "(cached) " >&6
  18459. else
  18460. ac_check_lib_save_LIBS=$LIBS
  18461. LIBS="-lsuppserv ${pbxlibdir} $LIBS"
  18462. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18463. /* end confdefs.h. */
  18464. /* Override any GCC internal prototype to avoid an error.
  18465. Use char because int might match the return type of a GCC
  18466. builtin and then its argument prototype would still apply. */
  18467. #ifdef __cplusplus
  18468. extern "C"
  18469. #endif
  18470. char ${pbxfuncname} ();
  18471. int
  18472. main ()
  18473. {
  18474. return ${pbxfuncname} ();
  18475. ;
  18476. return 0;
  18477. }
  18478. _ACEOF
  18479. if ac_fn_c_try_link "$LINENO"; then :
  18480. eval "$as_ac_Lib=yes"
  18481. else
  18482. eval "$as_ac_Lib=no"
  18483. fi
  18484. rm -f core conftest.err conftest.$ac_objext \
  18485. conftest$ac_exeext conftest.$ac_ext
  18486. LIBS=$ac_check_lib_save_LIBS
  18487. fi
  18488. eval ac_res=\$$as_ac_Lib
  18489. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  18490. $as_echo "$ac_res" >&6; }
  18491. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  18492. AST_SUPPSERV_FOUND=yes
  18493. else
  18494. AST_SUPPSERV_FOUND=no
  18495. fi
  18496. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  18497. fi
  18498. # now check for the header.
  18499. if test "${AST_SUPPSERV_FOUND}" = "yes"; then
  18500. SUPPSERV_LIB="${pbxlibdir} -lsuppserv "
  18501. # if --with-SUPPSERV=DIR has been specified, use it.
  18502. if test "x${SUPPSERV_DIR}" != "x"; then
  18503. SUPPSERV_INCLUDE="-I${SUPPSERV_DIR}/include"
  18504. fi
  18505. SUPPSERV_INCLUDE="${SUPPSERV_INCLUDE} "
  18506. if test "xmISDNuser/suppserv.h" = "x" ; then # no header, assume found
  18507. SUPPSERV_HEADER_FOUND="1"
  18508. else # check for the header
  18509. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  18510. CPPFLAGS="${CPPFLAGS} ${SUPPSERV_INCLUDE}"
  18511. ac_fn_c_check_header_mongrel "$LINENO" "mISDNuser/suppserv.h" "ac_cv_header_mISDNuser_suppserv_h" "$ac_includes_default"
  18512. if test "x$ac_cv_header_mISDNuser_suppserv_h" = xyes; then :
  18513. SUPPSERV_HEADER_FOUND=1
  18514. else
  18515. SUPPSERV_HEADER_FOUND=0
  18516. fi
  18517. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  18518. fi
  18519. if test "x${SUPPSERV_HEADER_FOUND}" = "x0" ; then
  18520. SUPPSERV_LIB=""
  18521. SUPPSERV_INCLUDE=""
  18522. else
  18523. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  18524. SUPPSERV_LIB=""
  18525. fi
  18526. PBX_SUPPSERV=1
  18527. cat >>confdefs.h <<_ACEOF
  18528. #define HAVE_SUPPSERV 1
  18529. _ACEOF
  18530. fi
  18531. fi
  18532. fi
  18533. if test "x${PBX_MISDN_FAC_RESULT}" != "x1"; then
  18534. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fac_RESULT in mISDNuser/suppserv.h" >&5
  18535. $as_echo_n "checking for Fac_RESULT in mISDNuser/suppserv.h... " >&6; }
  18536. saved_cppflags="${CPPFLAGS}"
  18537. if test "x${MISDN_FAC_RESULT_DIR}" != "x"; then
  18538. MISDN_FAC_RESULT_INCLUDE="-I${MISDN_FAC_RESULT_DIR}/include"
  18539. fi
  18540. CPPFLAGS="${CPPFLAGS} ${MISDN_FAC_RESULT_INCLUDE}"
  18541. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18542. /* end confdefs.h. */
  18543. #include <mISDNuser/suppserv.h>
  18544. int
  18545. main ()
  18546. {
  18547. #if defined(Fac_RESULT)
  18548. int foo = 0;
  18549. #else
  18550. int foo = bar;
  18551. #endif
  18552. 0
  18553. ;
  18554. return 0;
  18555. }
  18556. _ACEOF
  18557. if ac_fn_c_try_compile "$LINENO"; then :
  18558. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  18559. $as_echo "yes" >&6; }
  18560. PBX_MISDN_FAC_RESULT=1
  18561. $as_echo "#define HAVE_MISDN_FAC_RESULT 1" >>confdefs.h
  18562. else
  18563. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  18564. $as_echo "no" >&6; }
  18565. fi
  18566. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  18567. CPPFLAGS="${saved_cppflags}"
  18568. fi
  18569. if test "x${PBX_MISDN_FAC_ERROR}" != "x1"; then
  18570. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fac_ERROR in mISDNuser/suppserv.h" >&5
  18571. $as_echo_n "checking for Fac_ERROR in mISDNuser/suppserv.h... " >&6; }
  18572. saved_cppflags="${CPPFLAGS}"
  18573. if test "x${MISDN_FAC_ERROR_DIR}" != "x"; then
  18574. MISDN_FAC_ERROR_INCLUDE="-I${MISDN_FAC_ERROR_DIR}/include"
  18575. fi
  18576. CPPFLAGS="${CPPFLAGS} ${MISDN_FAC_ERROR_INCLUDE}"
  18577. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18578. /* end confdefs.h. */
  18579. #include <mISDNuser/suppserv.h>
  18580. int
  18581. main ()
  18582. {
  18583. #if defined(Fac_ERROR)
  18584. int foo = 0;
  18585. #else
  18586. int foo = bar;
  18587. #endif
  18588. 0
  18589. ;
  18590. return 0;
  18591. }
  18592. _ACEOF
  18593. if ac_fn_c_try_compile "$LINENO"; then :
  18594. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  18595. $as_echo "yes" >&6; }
  18596. PBX_MISDN_FAC_ERROR=1
  18597. $as_echo "#define HAVE_MISDN_FAC_ERROR 1" >>confdefs.h
  18598. else
  18599. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  18600. $as_echo "no" >&6; }
  18601. fi
  18602. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  18603. CPPFLAGS="${saved_cppflags}"
  18604. fi
  18605. ac_fn_c_check_header_mongrel "$LINENO" "linux/mISDNdsp.h" "ac_cv_header_linux_mISDNdsp_h" "$ac_includes_default"
  18606. if test "x$ac_cv_header_linux_mISDNdsp_h" = xyes; then :
  18607. cat >>confdefs.h <<_ACEOF
  18608. #define MISDN_1_2 1
  18609. _ACEOF
  18610. fi
  18611. ac_fn_c_check_member "$LINENO" "Q931_info_t" "redirect_dn" "ac_cv_member_Q931_info_t_redirect_dn" "#include <mISDNuser/mISDNlib.h>
  18612. "
  18613. if test "x$ac_cv_member_Q931_info_t_redirect_dn" = xyes; then :
  18614. else
  18615. PBX_MISDN=0
  18616. fi
  18617. fi
  18618. if test "x${PBX_MYSQLCLIENT}" != "x1" -a "${USE_MYSQLCLIENT}" != "no"; then
  18619. PBX_MYSQLCLIENT=0
  18620. if test -n "$ac_tool_prefix"; then
  18621. # Extract the first word of "${ac_tool_prefix}mysql_config", so it can be a program name with args.
  18622. set dummy ${ac_tool_prefix}mysql_config; ac_word=$2
  18623. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  18624. $as_echo_n "checking for $ac_word... " >&6; }
  18625. if ${ac_cv_path_CONFIG_MYSQLCLIENT+:} false; then :
  18626. $as_echo_n "(cached) " >&6
  18627. else
  18628. case $CONFIG_MYSQLCLIENT in
  18629. [\\/]* | ?:[\\/]*)
  18630. ac_cv_path_CONFIG_MYSQLCLIENT="$CONFIG_MYSQLCLIENT" # Let the user override the test with a path.
  18631. ;;
  18632. *)
  18633. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  18634. as_dummy="${MYSQLCLIENT_DIR}/bin:$PATH"
  18635. for as_dir in $as_dummy
  18636. do
  18637. IFS=$as_save_IFS
  18638. test -z "$as_dir" && as_dir=.
  18639. for ac_exec_ext in '' $ac_executable_extensions; do
  18640. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  18641. ac_cv_path_CONFIG_MYSQLCLIENT="$as_dir/$ac_word$ac_exec_ext"
  18642. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  18643. break 2
  18644. fi
  18645. done
  18646. done
  18647. IFS=$as_save_IFS
  18648. ;;
  18649. esac
  18650. fi
  18651. CONFIG_MYSQLCLIENT=$ac_cv_path_CONFIG_MYSQLCLIENT
  18652. if test -n "$CONFIG_MYSQLCLIENT"; then
  18653. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONFIG_MYSQLCLIENT" >&5
  18654. $as_echo "$CONFIG_MYSQLCLIENT" >&6; }
  18655. else
  18656. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  18657. $as_echo "no" >&6; }
  18658. fi
  18659. fi
  18660. if test -z "$ac_cv_path_CONFIG_MYSQLCLIENT"; then
  18661. ac_pt_CONFIG_MYSQLCLIENT=$CONFIG_MYSQLCLIENT
  18662. # Extract the first word of "mysql_config", so it can be a program name with args.
  18663. set dummy mysql_config; ac_word=$2
  18664. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  18665. $as_echo_n "checking for $ac_word... " >&6; }
  18666. if ${ac_cv_path_ac_pt_CONFIG_MYSQLCLIENT+:} false; then :
  18667. $as_echo_n "(cached) " >&6
  18668. else
  18669. case $ac_pt_CONFIG_MYSQLCLIENT in
  18670. [\\/]* | ?:[\\/]*)
  18671. ac_cv_path_ac_pt_CONFIG_MYSQLCLIENT="$ac_pt_CONFIG_MYSQLCLIENT" # Let the user override the test with a path.
  18672. ;;
  18673. *)
  18674. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  18675. as_dummy="${MYSQLCLIENT_DIR}/bin:$PATH"
  18676. for as_dir in $as_dummy
  18677. do
  18678. IFS=$as_save_IFS
  18679. test -z "$as_dir" && as_dir=.
  18680. for ac_exec_ext in '' $ac_executable_extensions; do
  18681. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  18682. ac_cv_path_ac_pt_CONFIG_MYSQLCLIENT="$as_dir/$ac_word$ac_exec_ext"
  18683. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  18684. break 2
  18685. fi
  18686. done
  18687. done
  18688. IFS=$as_save_IFS
  18689. ;;
  18690. esac
  18691. fi
  18692. ac_pt_CONFIG_MYSQLCLIENT=$ac_cv_path_ac_pt_CONFIG_MYSQLCLIENT
  18693. if test -n "$ac_pt_CONFIG_MYSQLCLIENT"; then
  18694. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CONFIG_MYSQLCLIENT" >&5
  18695. $as_echo "$ac_pt_CONFIG_MYSQLCLIENT" >&6; }
  18696. else
  18697. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  18698. $as_echo "no" >&6; }
  18699. fi
  18700. if test "x$ac_pt_CONFIG_MYSQLCLIENT" = x; then
  18701. CONFIG_MYSQLCLIENT="No"
  18702. else
  18703. case $cross_compiling:$ac_tool_warned in
  18704. yes:)
  18705. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  18706. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  18707. ac_tool_warned=yes ;;
  18708. esac
  18709. CONFIG_MYSQLCLIENT=$ac_pt_CONFIG_MYSQLCLIENT
  18710. fi
  18711. else
  18712. CONFIG_MYSQLCLIENT="$ac_cv_path_CONFIG_MYSQLCLIENT"
  18713. fi
  18714. if test ! "x${CONFIG_MYSQLCLIENT}" = xNo; then
  18715. if test x"" = x ; then A=--cflags ; else A="" ; fi
  18716. MYSQLCLIENT_INCLUDE=$(${CONFIG_MYSQLCLIENT} $A)
  18717. MYSQLCLIENT_INCLUDE=$(echo ${MYSQLCLIENT_INCLUDE} | $SED -e "s|-I|-I${MYSQLCLIENT_DIR}|g")
  18718. if test x"" = x ; then A=--libs ; else A="" ; fi
  18719. MYSQLCLIENT_LIB=$(${CONFIG_MYSQLCLIENT} $A)
  18720. MYSQLCLIENT_LIB=$(echo ${MYSQLCLIENT_LIB} | $SED -e "s|-L|-L${MYSQLCLIENT_DIR}|g")
  18721. if test x"" != x ; then
  18722. saved_cppflags="${CPPFLAGS}"
  18723. CPPFLAGS="${CPPFLAGS} ${MYSQLCLIENT_INCLUDE}"
  18724. saved_libs="${LIBS}"
  18725. LIBS=${MYSQLCLIENT_LIB}
  18726. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18727. /* end confdefs.h. */
  18728. int
  18729. main ()
  18730. {
  18731. ;
  18732. ;
  18733. return 0;
  18734. }
  18735. _ACEOF
  18736. if ac_fn_c_try_link "$LINENO"; then :
  18737. PBX_MYSQLCLIENT=1
  18738. $as_echo "#define HAVE_MYSQLCLIENT 1" >>confdefs.h
  18739. fi
  18740. rm -f core conftest.err conftest.$ac_objext \
  18741. conftest$ac_exeext conftest.$ac_ext
  18742. CPPFLAGS="${saved_cppflags}"
  18743. LIBS="${saved_libs}"
  18744. else
  18745. PBX_MYSQLCLIENT=1
  18746. $as_echo "#define HAVE_MYSQLCLIENT 1" >>confdefs.h
  18747. fi
  18748. fi
  18749. fi
  18750. if test "x${PBX_NBS}" != "x1" -a "${USE_NBS}" != "no"; then
  18751. pbxlibdir=""
  18752. # if --with-NBS=DIR has been specified, use it.
  18753. if test "x${NBS_DIR}" != "x"; then
  18754. if test -d ${NBS_DIR}/lib; then
  18755. pbxlibdir="-L${NBS_DIR}/lib"
  18756. else
  18757. pbxlibdir="-L${NBS_DIR}"
  18758. fi
  18759. fi
  18760. pbxfuncname="nbs_connect"
  18761. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  18762. AST_NBS_FOUND=yes
  18763. else
  18764. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  18765. CFLAGS="${CFLAGS} "
  18766. as_ac_Lib=`$as_echo "ac_cv_lib_nbs_${pbxfuncname}" | $as_tr_sh`
  18767. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lnbs" >&5
  18768. $as_echo_n "checking for ${pbxfuncname} in -lnbs... " >&6; }
  18769. if eval \${$as_ac_Lib+:} false; then :
  18770. $as_echo_n "(cached) " >&6
  18771. else
  18772. ac_check_lib_save_LIBS=$LIBS
  18773. LIBS="-lnbs ${pbxlibdir} $LIBS"
  18774. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18775. /* end confdefs.h. */
  18776. /* Override any GCC internal prototype to avoid an error.
  18777. Use char because int might match the return type of a GCC
  18778. builtin and then its argument prototype would still apply. */
  18779. #ifdef __cplusplus
  18780. extern "C"
  18781. #endif
  18782. char ${pbxfuncname} ();
  18783. int
  18784. main ()
  18785. {
  18786. return ${pbxfuncname} ();
  18787. ;
  18788. return 0;
  18789. }
  18790. _ACEOF
  18791. if ac_fn_c_try_link "$LINENO"; then :
  18792. eval "$as_ac_Lib=yes"
  18793. else
  18794. eval "$as_ac_Lib=no"
  18795. fi
  18796. rm -f core conftest.err conftest.$ac_objext \
  18797. conftest$ac_exeext conftest.$ac_ext
  18798. LIBS=$ac_check_lib_save_LIBS
  18799. fi
  18800. eval ac_res=\$$as_ac_Lib
  18801. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  18802. $as_echo "$ac_res" >&6; }
  18803. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  18804. AST_NBS_FOUND=yes
  18805. else
  18806. AST_NBS_FOUND=no
  18807. fi
  18808. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  18809. fi
  18810. # now check for the header.
  18811. if test "${AST_NBS_FOUND}" = "yes"; then
  18812. NBS_LIB="${pbxlibdir} -lnbs "
  18813. # if --with-NBS=DIR has been specified, use it.
  18814. if test "x${NBS_DIR}" != "x"; then
  18815. NBS_INCLUDE="-I${NBS_DIR}/include"
  18816. fi
  18817. NBS_INCLUDE="${NBS_INCLUDE} "
  18818. if test "xnbs.h" = "x" ; then # no header, assume found
  18819. NBS_HEADER_FOUND="1"
  18820. else # check for the header
  18821. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  18822. CPPFLAGS="${CPPFLAGS} ${NBS_INCLUDE}"
  18823. ac_fn_c_check_header_mongrel "$LINENO" "nbs.h" "ac_cv_header_nbs_h" "$ac_includes_default"
  18824. if test "x$ac_cv_header_nbs_h" = xyes; then :
  18825. NBS_HEADER_FOUND=1
  18826. else
  18827. NBS_HEADER_FOUND=0
  18828. fi
  18829. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  18830. fi
  18831. if test "x${NBS_HEADER_FOUND}" = "x0" ; then
  18832. NBS_LIB=""
  18833. NBS_INCLUDE=""
  18834. else
  18835. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  18836. NBS_LIB=""
  18837. fi
  18838. PBX_NBS=1
  18839. cat >>confdefs.h <<_ACEOF
  18840. #define HAVE_NBS 1
  18841. _ACEOF
  18842. fi
  18843. fi
  18844. fi
  18845. if test "x${PBX_NEON}" != "x1" -a "${USE_NEON}" != "no"; then
  18846. PBX_NEON=0
  18847. if test -n "$ac_tool_prefix"; then
  18848. # Extract the first word of "${ac_tool_prefix}neon-config", so it can be a program name with args.
  18849. set dummy ${ac_tool_prefix}neon-config; ac_word=$2
  18850. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  18851. $as_echo_n "checking for $ac_word... " >&6; }
  18852. if ${ac_cv_path_CONFIG_NEON+:} false; then :
  18853. $as_echo_n "(cached) " >&6
  18854. else
  18855. case $CONFIG_NEON in
  18856. [\\/]* | ?:[\\/]*)
  18857. ac_cv_path_CONFIG_NEON="$CONFIG_NEON" # Let the user override the test with a path.
  18858. ;;
  18859. *)
  18860. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  18861. as_dummy="${NEON_DIR}/bin:$PATH"
  18862. for as_dir in $as_dummy
  18863. do
  18864. IFS=$as_save_IFS
  18865. test -z "$as_dir" && as_dir=.
  18866. for ac_exec_ext in '' $ac_executable_extensions; do
  18867. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  18868. ac_cv_path_CONFIG_NEON="$as_dir/$ac_word$ac_exec_ext"
  18869. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  18870. break 2
  18871. fi
  18872. done
  18873. done
  18874. IFS=$as_save_IFS
  18875. ;;
  18876. esac
  18877. fi
  18878. CONFIG_NEON=$ac_cv_path_CONFIG_NEON
  18879. if test -n "$CONFIG_NEON"; then
  18880. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONFIG_NEON" >&5
  18881. $as_echo "$CONFIG_NEON" >&6; }
  18882. else
  18883. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  18884. $as_echo "no" >&6; }
  18885. fi
  18886. fi
  18887. if test -z "$ac_cv_path_CONFIG_NEON"; then
  18888. ac_pt_CONFIG_NEON=$CONFIG_NEON
  18889. # Extract the first word of "neon-config", so it can be a program name with args.
  18890. set dummy neon-config; ac_word=$2
  18891. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  18892. $as_echo_n "checking for $ac_word... " >&6; }
  18893. if ${ac_cv_path_ac_pt_CONFIG_NEON+:} false; then :
  18894. $as_echo_n "(cached) " >&6
  18895. else
  18896. case $ac_pt_CONFIG_NEON in
  18897. [\\/]* | ?:[\\/]*)
  18898. ac_cv_path_ac_pt_CONFIG_NEON="$ac_pt_CONFIG_NEON" # Let the user override the test with a path.
  18899. ;;
  18900. *)
  18901. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  18902. as_dummy="${NEON_DIR}/bin:$PATH"
  18903. for as_dir in $as_dummy
  18904. do
  18905. IFS=$as_save_IFS
  18906. test -z "$as_dir" && as_dir=.
  18907. for ac_exec_ext in '' $ac_executable_extensions; do
  18908. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  18909. ac_cv_path_ac_pt_CONFIG_NEON="$as_dir/$ac_word$ac_exec_ext"
  18910. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  18911. break 2
  18912. fi
  18913. done
  18914. done
  18915. IFS=$as_save_IFS
  18916. ;;
  18917. esac
  18918. fi
  18919. ac_pt_CONFIG_NEON=$ac_cv_path_ac_pt_CONFIG_NEON
  18920. if test -n "$ac_pt_CONFIG_NEON"; then
  18921. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CONFIG_NEON" >&5
  18922. $as_echo "$ac_pt_CONFIG_NEON" >&6; }
  18923. else
  18924. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  18925. $as_echo "no" >&6; }
  18926. fi
  18927. if test "x$ac_pt_CONFIG_NEON" = x; then
  18928. CONFIG_NEON="No"
  18929. else
  18930. case $cross_compiling:$ac_tool_warned in
  18931. yes:)
  18932. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  18933. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  18934. ac_tool_warned=yes ;;
  18935. esac
  18936. CONFIG_NEON=$ac_pt_CONFIG_NEON
  18937. fi
  18938. else
  18939. CONFIG_NEON="$ac_cv_path_CONFIG_NEON"
  18940. fi
  18941. if test ! "x${CONFIG_NEON}" = xNo; then
  18942. if test x"" = x ; then A=--cflags ; else A="" ; fi
  18943. NEON_INCLUDE=$(${CONFIG_NEON} $A)
  18944. NEON_INCLUDE=$(echo ${NEON_INCLUDE} | $SED -e "s|-I|-I${NEON_DIR}|g")
  18945. if test x"" = x ; then A=--libs ; else A="" ; fi
  18946. NEON_LIB=$(${CONFIG_NEON} $A)
  18947. NEON_LIB=$(echo ${NEON_LIB} | $SED -e "s|-L|-L${NEON_DIR}|g")
  18948. if test x"" != x ; then
  18949. saved_cppflags="${CPPFLAGS}"
  18950. CPPFLAGS="${CPPFLAGS} ${NEON_INCLUDE}"
  18951. saved_libs="${LIBS}"
  18952. LIBS=${NEON_LIB}
  18953. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18954. /* end confdefs.h. */
  18955. int
  18956. main ()
  18957. {
  18958. ;
  18959. ;
  18960. return 0;
  18961. }
  18962. _ACEOF
  18963. if ac_fn_c_try_link "$LINENO"; then :
  18964. PBX_NEON=1
  18965. $as_echo "#define HAVE_NEON 1" >>confdefs.h
  18966. fi
  18967. rm -f core conftest.err conftest.$ac_objext \
  18968. conftest$ac_exeext conftest.$ac_ext
  18969. CPPFLAGS="${saved_cppflags}"
  18970. LIBS="${saved_libs}"
  18971. else
  18972. PBX_NEON=1
  18973. $as_echo "#define HAVE_NEON 1" >>confdefs.h
  18974. fi
  18975. fi
  18976. fi
  18977. if test "x${PBX_NEON29}" != "x1" -a "${USE_NEON29}" != "no"; then
  18978. PBX_NEON29=0
  18979. if test -n "$ac_tool_prefix"; then
  18980. # Extract the first word of "${ac_tool_prefix}neon-config", so it can be a program name with args.
  18981. set dummy ${ac_tool_prefix}neon-config; ac_word=$2
  18982. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  18983. $as_echo_n "checking for $ac_word... " >&6; }
  18984. if ${ac_cv_path_CONFIG_NEON29+:} false; then :
  18985. $as_echo_n "(cached) " >&6
  18986. else
  18987. case $CONFIG_NEON29 in
  18988. [\\/]* | ?:[\\/]*)
  18989. ac_cv_path_CONFIG_NEON29="$CONFIG_NEON29" # Let the user override the test with a path.
  18990. ;;
  18991. *)
  18992. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  18993. as_dummy="${NEON29_DIR}/bin:$PATH"
  18994. for as_dir in $as_dummy
  18995. do
  18996. IFS=$as_save_IFS
  18997. test -z "$as_dir" && as_dir=.
  18998. for ac_exec_ext in '' $ac_executable_extensions; do
  18999. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  19000. ac_cv_path_CONFIG_NEON29="$as_dir/$ac_word$ac_exec_ext"
  19001. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  19002. break 2
  19003. fi
  19004. done
  19005. done
  19006. IFS=$as_save_IFS
  19007. ;;
  19008. esac
  19009. fi
  19010. CONFIG_NEON29=$ac_cv_path_CONFIG_NEON29
  19011. if test -n "$CONFIG_NEON29"; then
  19012. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONFIG_NEON29" >&5
  19013. $as_echo "$CONFIG_NEON29" >&6; }
  19014. else
  19015. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  19016. $as_echo "no" >&6; }
  19017. fi
  19018. fi
  19019. if test -z "$ac_cv_path_CONFIG_NEON29"; then
  19020. ac_pt_CONFIG_NEON29=$CONFIG_NEON29
  19021. # Extract the first word of "neon-config", so it can be a program name with args.
  19022. set dummy neon-config; ac_word=$2
  19023. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  19024. $as_echo_n "checking for $ac_word... " >&6; }
  19025. if ${ac_cv_path_ac_pt_CONFIG_NEON29+:} false; then :
  19026. $as_echo_n "(cached) " >&6
  19027. else
  19028. case $ac_pt_CONFIG_NEON29 in
  19029. [\\/]* | ?:[\\/]*)
  19030. ac_cv_path_ac_pt_CONFIG_NEON29="$ac_pt_CONFIG_NEON29" # Let the user override the test with a path.
  19031. ;;
  19032. *)
  19033. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  19034. as_dummy="${NEON29_DIR}/bin:$PATH"
  19035. for as_dir in $as_dummy
  19036. do
  19037. IFS=$as_save_IFS
  19038. test -z "$as_dir" && as_dir=.
  19039. for ac_exec_ext in '' $ac_executable_extensions; do
  19040. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  19041. ac_cv_path_ac_pt_CONFIG_NEON29="$as_dir/$ac_word$ac_exec_ext"
  19042. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  19043. break 2
  19044. fi
  19045. done
  19046. done
  19047. IFS=$as_save_IFS
  19048. ;;
  19049. esac
  19050. fi
  19051. ac_pt_CONFIG_NEON29=$ac_cv_path_ac_pt_CONFIG_NEON29
  19052. if test -n "$ac_pt_CONFIG_NEON29"; then
  19053. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CONFIG_NEON29" >&5
  19054. $as_echo "$ac_pt_CONFIG_NEON29" >&6; }
  19055. else
  19056. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  19057. $as_echo "no" >&6; }
  19058. fi
  19059. if test "x$ac_pt_CONFIG_NEON29" = x; then
  19060. CONFIG_NEON29="No"
  19061. else
  19062. case $cross_compiling:$ac_tool_warned in
  19063. yes:)
  19064. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  19065. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  19066. ac_tool_warned=yes ;;
  19067. esac
  19068. CONFIG_NEON29=$ac_pt_CONFIG_NEON29
  19069. fi
  19070. else
  19071. CONFIG_NEON29="$ac_cv_path_CONFIG_NEON29"
  19072. fi
  19073. if test ! "x${CONFIG_NEON29}" = xNo; then
  19074. if test x"" = x ; then A=--cflags ; else A="" ; fi
  19075. NEON29_INCLUDE=$(${CONFIG_NEON29} $A)
  19076. NEON29_INCLUDE=$(echo ${NEON29_INCLUDE} | $SED -e "s|-I|-I${NEON29_DIR}|g")
  19077. if test x"--libs" = x ; then A=--libs ; else A="--libs" ; fi
  19078. NEON29_LIB=$(${CONFIG_NEON29} $A)
  19079. NEON29_LIB=$(echo ${NEON29_LIB} | $SED -e "s|-L|-L${NEON29_DIR}|g")
  19080. if test x"#include <ne_auth.h>" != x ; then
  19081. saved_cppflags="${CPPFLAGS}"
  19082. CPPFLAGS="${CPPFLAGS} ${NEON29_INCLUDE}"
  19083. saved_libs="${LIBS}"
  19084. LIBS=${NEON29_LIB}
  19085. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19086. /* end confdefs.h. */
  19087. #include <ne_auth.h>
  19088. int
  19089. main ()
  19090. {
  19091. #ifndef NE_AUTH_NTLM
  19092. #error Need libneon >= 0.29.0
  19093. #endif;
  19094. ;
  19095. return 0;
  19096. }
  19097. _ACEOF
  19098. if ac_fn_c_try_link "$LINENO"; then :
  19099. PBX_NEON29=1
  19100. $as_echo "#define HAVE_NEON29 1" >>confdefs.h
  19101. fi
  19102. rm -f core conftest.err conftest.$ac_objext \
  19103. conftest$ac_exeext conftest.$ac_ext
  19104. CPPFLAGS="${saved_cppflags}"
  19105. LIBS="${saved_libs}"
  19106. else
  19107. PBX_NEON29=1
  19108. $as_echo "#define HAVE_NEON29 1" >>confdefs.h
  19109. fi
  19110. fi
  19111. fi
  19112. if test "x${PBX_NETSNMP}" != "x1" -a "${USE_NETSNMP}" != "no"; then
  19113. PBX_NETSNMP=0
  19114. if test -n "$ac_tool_prefix"; then
  19115. # Extract the first word of "${ac_tool_prefix}net-snmp-config", so it can be a program name with args.
  19116. set dummy ${ac_tool_prefix}net-snmp-config; ac_word=$2
  19117. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  19118. $as_echo_n "checking for $ac_word... " >&6; }
  19119. if ${ac_cv_path_CONFIG_NETSNMP+:} false; then :
  19120. $as_echo_n "(cached) " >&6
  19121. else
  19122. case $CONFIG_NETSNMP in
  19123. [\\/]* | ?:[\\/]*)
  19124. ac_cv_path_CONFIG_NETSNMP="$CONFIG_NETSNMP" # Let the user override the test with a path.
  19125. ;;
  19126. *)
  19127. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  19128. as_dummy="${NETSNMP_DIR}/bin:$PATH"
  19129. for as_dir in $as_dummy
  19130. do
  19131. IFS=$as_save_IFS
  19132. test -z "$as_dir" && as_dir=.
  19133. for ac_exec_ext in '' $ac_executable_extensions; do
  19134. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  19135. ac_cv_path_CONFIG_NETSNMP="$as_dir/$ac_word$ac_exec_ext"
  19136. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  19137. break 2
  19138. fi
  19139. done
  19140. done
  19141. IFS=$as_save_IFS
  19142. ;;
  19143. esac
  19144. fi
  19145. CONFIG_NETSNMP=$ac_cv_path_CONFIG_NETSNMP
  19146. if test -n "$CONFIG_NETSNMP"; then
  19147. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONFIG_NETSNMP" >&5
  19148. $as_echo "$CONFIG_NETSNMP" >&6; }
  19149. else
  19150. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  19151. $as_echo "no" >&6; }
  19152. fi
  19153. fi
  19154. if test -z "$ac_cv_path_CONFIG_NETSNMP"; then
  19155. ac_pt_CONFIG_NETSNMP=$CONFIG_NETSNMP
  19156. # Extract the first word of "net-snmp-config", so it can be a program name with args.
  19157. set dummy net-snmp-config; ac_word=$2
  19158. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  19159. $as_echo_n "checking for $ac_word... " >&6; }
  19160. if ${ac_cv_path_ac_pt_CONFIG_NETSNMP+:} false; then :
  19161. $as_echo_n "(cached) " >&6
  19162. else
  19163. case $ac_pt_CONFIG_NETSNMP in
  19164. [\\/]* | ?:[\\/]*)
  19165. ac_cv_path_ac_pt_CONFIG_NETSNMP="$ac_pt_CONFIG_NETSNMP" # Let the user override the test with a path.
  19166. ;;
  19167. *)
  19168. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  19169. as_dummy="${NETSNMP_DIR}/bin:$PATH"
  19170. for as_dir in $as_dummy
  19171. do
  19172. IFS=$as_save_IFS
  19173. test -z "$as_dir" && as_dir=.
  19174. for ac_exec_ext in '' $ac_executable_extensions; do
  19175. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  19176. ac_cv_path_ac_pt_CONFIG_NETSNMP="$as_dir/$ac_word$ac_exec_ext"
  19177. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  19178. break 2
  19179. fi
  19180. done
  19181. done
  19182. IFS=$as_save_IFS
  19183. ;;
  19184. esac
  19185. fi
  19186. ac_pt_CONFIG_NETSNMP=$ac_cv_path_ac_pt_CONFIG_NETSNMP
  19187. if test -n "$ac_pt_CONFIG_NETSNMP"; then
  19188. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CONFIG_NETSNMP" >&5
  19189. $as_echo "$ac_pt_CONFIG_NETSNMP" >&6; }
  19190. else
  19191. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  19192. $as_echo "no" >&6; }
  19193. fi
  19194. if test "x$ac_pt_CONFIG_NETSNMP" = x; then
  19195. CONFIG_NETSNMP="No"
  19196. else
  19197. case $cross_compiling:$ac_tool_warned in
  19198. yes:)
  19199. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  19200. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  19201. ac_tool_warned=yes ;;
  19202. esac
  19203. CONFIG_NETSNMP=$ac_pt_CONFIG_NETSNMP
  19204. fi
  19205. else
  19206. CONFIG_NETSNMP="$ac_cv_path_CONFIG_NETSNMP"
  19207. fi
  19208. if test ! "x${CONFIG_NETSNMP}" = xNo; then
  19209. if test x"" = x ; then A=--cflags ; else A="" ; fi
  19210. NETSNMP_INCLUDE=$(${CONFIG_NETSNMP} $A)
  19211. NETSNMP_INCLUDE=$(echo ${NETSNMP_INCLUDE} | $SED -e "s|-I|-I${NETSNMP_DIR}|g")
  19212. if test x"--agent-libs" = x ; then A=--libs ; else A="--agent-libs" ; fi
  19213. NETSNMP_LIB=$(${CONFIG_NETSNMP} $A)
  19214. NETSNMP_LIB=$(echo ${NETSNMP_LIB} | $SED -e "s|-L|-L${NETSNMP_DIR}|g")
  19215. if test x"#include <net-snmp/net-snmp-config.h>
  19216. #include <net-snmp/net-snmp-includes.h>
  19217. #include <net-snmp/agent/net-snmp-agent-includes.h>" != x ; then
  19218. saved_cppflags="${CPPFLAGS}"
  19219. CPPFLAGS="${CPPFLAGS} ${NETSNMP_INCLUDE}"
  19220. saved_libs="${LIBS}"
  19221. LIBS=${NETSNMP_LIB}
  19222. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19223. /* end confdefs.h. */
  19224. #include <net-snmp/net-snmp-config.h>
  19225. #include <net-snmp/net-snmp-includes.h>
  19226. #include <net-snmp/agent/net-snmp-agent-includes.h>
  19227. int
  19228. main ()
  19229. {
  19230. int callback = snmp_register_callback(0, 0, NULL, NULL);
  19231. ;
  19232. return 0;
  19233. }
  19234. _ACEOF
  19235. if ac_fn_c_try_link "$LINENO"; then :
  19236. PBX_NETSNMP=1
  19237. $as_echo "#define HAVE_NETSNMP 1" >>confdefs.h
  19238. fi
  19239. rm -f core conftest.err conftest.$ac_objext \
  19240. conftest$ac_exeext conftest.$ac_ext
  19241. CPPFLAGS="${saved_cppflags}"
  19242. LIBS="${saved_libs}"
  19243. else
  19244. PBX_NETSNMP=1
  19245. $as_echo "#define HAVE_NETSNMP 1" >>confdefs.h
  19246. fi
  19247. fi
  19248. fi
  19249. if test "x${PBX_NEWT}" != "x1" -a "${USE_NEWT}" != "no"; then
  19250. pbxlibdir=""
  19251. # if --with-NEWT=DIR has been specified, use it.
  19252. if test "x${NEWT_DIR}" != "x"; then
  19253. if test -d ${NEWT_DIR}/lib; then
  19254. pbxlibdir="-L${NEWT_DIR}/lib"
  19255. else
  19256. pbxlibdir="-L${NEWT_DIR}"
  19257. fi
  19258. fi
  19259. pbxfuncname="newtBell"
  19260. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  19261. AST_NEWT_FOUND=yes
  19262. else
  19263. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  19264. CFLAGS="${CFLAGS} "
  19265. as_ac_Lib=`$as_echo "ac_cv_lib_newt_${pbxfuncname}" | $as_tr_sh`
  19266. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lnewt" >&5
  19267. $as_echo_n "checking for ${pbxfuncname} in -lnewt... " >&6; }
  19268. if eval \${$as_ac_Lib+:} false; then :
  19269. $as_echo_n "(cached) " >&6
  19270. else
  19271. ac_check_lib_save_LIBS=$LIBS
  19272. LIBS="-lnewt ${pbxlibdir} $LIBS"
  19273. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19274. /* end confdefs.h. */
  19275. /* Override any GCC internal prototype to avoid an error.
  19276. Use char because int might match the return type of a GCC
  19277. builtin and then its argument prototype would still apply. */
  19278. #ifdef __cplusplus
  19279. extern "C"
  19280. #endif
  19281. char ${pbxfuncname} ();
  19282. int
  19283. main ()
  19284. {
  19285. return ${pbxfuncname} ();
  19286. ;
  19287. return 0;
  19288. }
  19289. _ACEOF
  19290. if ac_fn_c_try_link "$LINENO"; then :
  19291. eval "$as_ac_Lib=yes"
  19292. else
  19293. eval "$as_ac_Lib=no"
  19294. fi
  19295. rm -f core conftest.err conftest.$ac_objext \
  19296. conftest$ac_exeext conftest.$ac_ext
  19297. LIBS=$ac_check_lib_save_LIBS
  19298. fi
  19299. eval ac_res=\$$as_ac_Lib
  19300. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  19301. $as_echo "$ac_res" >&6; }
  19302. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  19303. AST_NEWT_FOUND=yes
  19304. else
  19305. AST_NEWT_FOUND=no
  19306. fi
  19307. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  19308. fi
  19309. # now check for the header.
  19310. if test "${AST_NEWT_FOUND}" = "yes"; then
  19311. NEWT_LIB="${pbxlibdir} -lnewt "
  19312. # if --with-NEWT=DIR has been specified, use it.
  19313. if test "x${NEWT_DIR}" != "x"; then
  19314. NEWT_INCLUDE="-I${NEWT_DIR}/include"
  19315. fi
  19316. NEWT_INCLUDE="${NEWT_INCLUDE} "
  19317. if test "xnewt.h" = "x" ; then # no header, assume found
  19318. NEWT_HEADER_FOUND="1"
  19319. else # check for the header
  19320. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  19321. CPPFLAGS="${CPPFLAGS} ${NEWT_INCLUDE}"
  19322. ac_fn_c_check_header_mongrel "$LINENO" "newt.h" "ac_cv_header_newt_h" "$ac_includes_default"
  19323. if test "x$ac_cv_header_newt_h" = xyes; then :
  19324. NEWT_HEADER_FOUND=1
  19325. else
  19326. NEWT_HEADER_FOUND=0
  19327. fi
  19328. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  19329. fi
  19330. if test "x${NEWT_HEADER_FOUND}" = "x0" ; then
  19331. NEWT_LIB=""
  19332. NEWT_INCLUDE=""
  19333. else
  19334. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  19335. NEWT_LIB=""
  19336. fi
  19337. PBX_NEWT=1
  19338. cat >>confdefs.h <<_ACEOF
  19339. #define HAVE_NEWT 1
  19340. _ACEOF
  19341. fi
  19342. fi
  19343. fi
  19344. if test "x${PBX_UNIXODBC}" != "x1" -a "${USE_UNIXODBC}" != "no"; then
  19345. pbxlibdir=""
  19346. # if --with-UNIXODBC=DIR has been specified, use it.
  19347. if test "x${UNIXODBC_DIR}" != "x"; then
  19348. if test -d ${UNIXODBC_DIR}/lib; then
  19349. pbxlibdir="-L${UNIXODBC_DIR}/lib"
  19350. else
  19351. pbxlibdir="-L${UNIXODBC_DIR}"
  19352. fi
  19353. fi
  19354. pbxfuncname="SQLConnect"
  19355. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  19356. AST_UNIXODBC_FOUND=yes
  19357. else
  19358. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  19359. CFLAGS="${CFLAGS} "
  19360. as_ac_Lib=`$as_echo "ac_cv_lib_odbc_${pbxfuncname}" | $as_tr_sh`
  19361. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lodbc" >&5
  19362. $as_echo_n "checking for ${pbxfuncname} in -lodbc... " >&6; }
  19363. if eval \${$as_ac_Lib+:} false; then :
  19364. $as_echo_n "(cached) " >&6
  19365. else
  19366. ac_check_lib_save_LIBS=$LIBS
  19367. LIBS="-lodbc ${pbxlibdir} $LIBS"
  19368. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19369. /* end confdefs.h. */
  19370. /* Override any GCC internal prototype to avoid an error.
  19371. Use char because int might match the return type of a GCC
  19372. builtin and then its argument prototype would still apply. */
  19373. #ifdef __cplusplus
  19374. extern "C"
  19375. #endif
  19376. char ${pbxfuncname} ();
  19377. int
  19378. main ()
  19379. {
  19380. return ${pbxfuncname} ();
  19381. ;
  19382. return 0;
  19383. }
  19384. _ACEOF
  19385. if ac_fn_c_try_link "$LINENO"; then :
  19386. eval "$as_ac_Lib=yes"
  19387. else
  19388. eval "$as_ac_Lib=no"
  19389. fi
  19390. rm -f core conftest.err conftest.$ac_objext \
  19391. conftest$ac_exeext conftest.$ac_ext
  19392. LIBS=$ac_check_lib_save_LIBS
  19393. fi
  19394. eval ac_res=\$$as_ac_Lib
  19395. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  19396. $as_echo "$ac_res" >&6; }
  19397. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  19398. AST_UNIXODBC_FOUND=yes
  19399. else
  19400. AST_UNIXODBC_FOUND=no
  19401. fi
  19402. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  19403. fi
  19404. # now check for the header.
  19405. if test "${AST_UNIXODBC_FOUND}" = "yes"; then
  19406. UNIXODBC_LIB="${pbxlibdir} -lodbc "
  19407. # if --with-UNIXODBC=DIR has been specified, use it.
  19408. if test "x${UNIXODBC_DIR}" != "x"; then
  19409. UNIXODBC_INCLUDE="-I${UNIXODBC_DIR}/include"
  19410. fi
  19411. UNIXODBC_INCLUDE="${UNIXODBC_INCLUDE} "
  19412. if test "xsql.h" = "x" ; then # no header, assume found
  19413. UNIXODBC_HEADER_FOUND="1"
  19414. else # check for the header
  19415. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  19416. CPPFLAGS="${CPPFLAGS} ${UNIXODBC_INCLUDE}"
  19417. ac_fn_c_check_header_mongrel "$LINENO" "sql.h" "ac_cv_header_sql_h" "$ac_includes_default"
  19418. if test "x$ac_cv_header_sql_h" = xyes; then :
  19419. UNIXODBC_HEADER_FOUND=1
  19420. else
  19421. UNIXODBC_HEADER_FOUND=0
  19422. fi
  19423. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  19424. fi
  19425. if test "x${UNIXODBC_HEADER_FOUND}" = "x0" ; then
  19426. UNIXODBC_LIB=""
  19427. UNIXODBC_INCLUDE=""
  19428. else
  19429. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  19430. UNIXODBC_LIB=""
  19431. fi
  19432. PBX_UNIXODBC=1
  19433. cat >>confdefs.h <<_ACEOF
  19434. #define HAVE_UNIXODBC 1
  19435. _ACEOF
  19436. fi
  19437. fi
  19438. fi
  19439. if test "x${PBX_OGG}" != "x1" -a "${USE_OGG}" != "no"; then
  19440. pbxlibdir=""
  19441. # if --with-OGG=DIR has been specified, use it.
  19442. if test "x${OGG_DIR}" != "x"; then
  19443. if test -d ${OGG_DIR}/lib; then
  19444. pbxlibdir="-L${OGG_DIR}/lib"
  19445. else
  19446. pbxlibdir="-L${OGG_DIR}"
  19447. fi
  19448. fi
  19449. pbxfuncname="ogg_sync_init"
  19450. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  19451. AST_OGG_FOUND=yes
  19452. else
  19453. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  19454. CFLAGS="${CFLAGS} "
  19455. as_ac_Lib=`$as_echo "ac_cv_lib_ogg_${pbxfuncname}" | $as_tr_sh`
  19456. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -logg" >&5
  19457. $as_echo_n "checking for ${pbxfuncname} in -logg... " >&6; }
  19458. if eval \${$as_ac_Lib+:} false; then :
  19459. $as_echo_n "(cached) " >&6
  19460. else
  19461. ac_check_lib_save_LIBS=$LIBS
  19462. LIBS="-logg ${pbxlibdir} $LIBS"
  19463. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19464. /* end confdefs.h. */
  19465. /* Override any GCC internal prototype to avoid an error.
  19466. Use char because int might match the return type of a GCC
  19467. builtin and then its argument prototype would still apply. */
  19468. #ifdef __cplusplus
  19469. extern "C"
  19470. #endif
  19471. char ${pbxfuncname} ();
  19472. int
  19473. main ()
  19474. {
  19475. return ${pbxfuncname} ();
  19476. ;
  19477. return 0;
  19478. }
  19479. _ACEOF
  19480. if ac_fn_c_try_link "$LINENO"; then :
  19481. eval "$as_ac_Lib=yes"
  19482. else
  19483. eval "$as_ac_Lib=no"
  19484. fi
  19485. rm -f core conftest.err conftest.$ac_objext \
  19486. conftest$ac_exeext conftest.$ac_ext
  19487. LIBS=$ac_check_lib_save_LIBS
  19488. fi
  19489. eval ac_res=\$$as_ac_Lib
  19490. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  19491. $as_echo "$ac_res" >&6; }
  19492. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  19493. AST_OGG_FOUND=yes
  19494. else
  19495. AST_OGG_FOUND=no
  19496. fi
  19497. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  19498. fi
  19499. # now check for the header.
  19500. if test "${AST_OGG_FOUND}" = "yes"; then
  19501. OGG_LIB="${pbxlibdir} -logg "
  19502. # if --with-OGG=DIR has been specified, use it.
  19503. if test "x${OGG_DIR}" != "x"; then
  19504. OGG_INCLUDE="-I${OGG_DIR}/include"
  19505. fi
  19506. OGG_INCLUDE="${OGG_INCLUDE} "
  19507. if test "x" = "x" ; then # no header, assume found
  19508. OGG_HEADER_FOUND="1"
  19509. else # check for the header
  19510. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  19511. CPPFLAGS="${CPPFLAGS} ${OGG_INCLUDE}"
  19512. ac_fn_c_check_header_mongrel "$LINENO" "" "ac_cv_header_" "$ac_includes_default"
  19513. if test "x$ac_cv_header_" = xyes; then :
  19514. OGG_HEADER_FOUND=1
  19515. else
  19516. OGG_HEADER_FOUND=0
  19517. fi
  19518. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  19519. fi
  19520. if test "x${OGG_HEADER_FOUND}" = "x0" ; then
  19521. OGG_LIB=""
  19522. OGG_INCLUDE=""
  19523. else
  19524. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  19525. OGG_LIB=""
  19526. fi
  19527. PBX_OGG=1
  19528. cat >>confdefs.h <<_ACEOF
  19529. #define HAVE_OGG 1
  19530. _ACEOF
  19531. fi
  19532. fi
  19533. fi
  19534. # Non-glibc platforms require libexecinfo for backtrace support
  19535. if test "x${PBX_BKTR}" != "x1" -a "${USE_BKTR}" != "no"; then
  19536. pbxlibdir=""
  19537. # if --with-BKTR=DIR has been specified, use it.
  19538. if test "x${BKTR_DIR}" != "x"; then
  19539. if test -d ${BKTR_DIR}/lib; then
  19540. pbxlibdir="-L${BKTR_DIR}/lib"
  19541. else
  19542. pbxlibdir="-L${BKTR_DIR}"
  19543. fi
  19544. fi
  19545. pbxfuncname="backtrace"
  19546. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  19547. AST_BKTR_FOUND=yes
  19548. else
  19549. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  19550. CFLAGS="${CFLAGS} "
  19551. as_ac_Lib=`$as_echo "ac_cv_lib_execinfo_${pbxfuncname}" | $as_tr_sh`
  19552. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lexecinfo" >&5
  19553. $as_echo_n "checking for ${pbxfuncname} in -lexecinfo... " >&6; }
  19554. if eval \${$as_ac_Lib+:} false; then :
  19555. $as_echo_n "(cached) " >&6
  19556. else
  19557. ac_check_lib_save_LIBS=$LIBS
  19558. LIBS="-lexecinfo ${pbxlibdir} $LIBS"
  19559. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19560. /* end confdefs.h. */
  19561. /* Override any GCC internal prototype to avoid an error.
  19562. Use char because int might match the return type of a GCC
  19563. builtin and then its argument prototype would still apply. */
  19564. #ifdef __cplusplus
  19565. extern "C"
  19566. #endif
  19567. char ${pbxfuncname} ();
  19568. int
  19569. main ()
  19570. {
  19571. return ${pbxfuncname} ();
  19572. ;
  19573. return 0;
  19574. }
  19575. _ACEOF
  19576. if ac_fn_c_try_link "$LINENO"; then :
  19577. eval "$as_ac_Lib=yes"
  19578. else
  19579. eval "$as_ac_Lib=no"
  19580. fi
  19581. rm -f core conftest.err conftest.$ac_objext \
  19582. conftest$ac_exeext conftest.$ac_ext
  19583. LIBS=$ac_check_lib_save_LIBS
  19584. fi
  19585. eval ac_res=\$$as_ac_Lib
  19586. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  19587. $as_echo "$ac_res" >&6; }
  19588. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  19589. AST_BKTR_FOUND=yes
  19590. else
  19591. AST_BKTR_FOUND=no
  19592. fi
  19593. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  19594. fi
  19595. # now check for the header.
  19596. if test "${AST_BKTR_FOUND}" = "yes"; then
  19597. BKTR_LIB="${pbxlibdir} -lexecinfo "
  19598. # if --with-BKTR=DIR has been specified, use it.
  19599. if test "x${BKTR_DIR}" != "x"; then
  19600. BKTR_INCLUDE="-I${BKTR_DIR}/include"
  19601. fi
  19602. BKTR_INCLUDE="${BKTR_INCLUDE} "
  19603. if test "xexecinfo.h" = "x" ; then # no header, assume found
  19604. BKTR_HEADER_FOUND="1"
  19605. else # check for the header
  19606. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  19607. CPPFLAGS="${CPPFLAGS} ${BKTR_INCLUDE}"
  19608. ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
  19609. if test "x$ac_cv_header_execinfo_h" = xyes; then :
  19610. BKTR_HEADER_FOUND=1
  19611. else
  19612. BKTR_HEADER_FOUND=0
  19613. fi
  19614. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  19615. fi
  19616. if test "x${BKTR_HEADER_FOUND}" = "x0" ; then
  19617. BKTR_LIB=""
  19618. BKTR_INCLUDE=""
  19619. else
  19620. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  19621. BKTR_LIB=""
  19622. fi
  19623. PBX_BKTR=1
  19624. cat >>confdefs.h <<_ACEOF
  19625. #define HAVE_BKTR 1
  19626. _ACEOF
  19627. fi
  19628. fi
  19629. fi
  19630. # Linux, however, has backtrace directly in glibc
  19631. if test "x${PBX_BKTR}" != "x1" -a "${USE_BKTR}" != "no"; then
  19632. pbxlibdir=""
  19633. # if --with-BKTR=DIR has been specified, use it.
  19634. if test "x${BKTR_DIR}" != "x"; then
  19635. if test -d ${BKTR_DIR}/lib; then
  19636. pbxlibdir="-L${BKTR_DIR}/lib"
  19637. else
  19638. pbxlibdir="-L${BKTR_DIR}"
  19639. fi
  19640. fi
  19641. pbxfuncname="backtrace"
  19642. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  19643. AST_BKTR_FOUND=yes
  19644. else
  19645. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  19646. CFLAGS="${CFLAGS} "
  19647. as_ac_Lib=`$as_echo "ac_cv_lib_c_${pbxfuncname}" | $as_tr_sh`
  19648. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lc" >&5
  19649. $as_echo_n "checking for ${pbxfuncname} in -lc... " >&6; }
  19650. if eval \${$as_ac_Lib+:} false; then :
  19651. $as_echo_n "(cached) " >&6
  19652. else
  19653. ac_check_lib_save_LIBS=$LIBS
  19654. LIBS="-lc ${pbxlibdir} $LIBS"
  19655. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19656. /* end confdefs.h. */
  19657. /* Override any GCC internal prototype to avoid an error.
  19658. Use char because int might match the return type of a GCC
  19659. builtin and then its argument prototype would still apply. */
  19660. #ifdef __cplusplus
  19661. extern "C"
  19662. #endif
  19663. char ${pbxfuncname} ();
  19664. int
  19665. main ()
  19666. {
  19667. return ${pbxfuncname} ();
  19668. ;
  19669. return 0;
  19670. }
  19671. _ACEOF
  19672. if ac_fn_c_try_link "$LINENO"; then :
  19673. eval "$as_ac_Lib=yes"
  19674. else
  19675. eval "$as_ac_Lib=no"
  19676. fi
  19677. rm -f core conftest.err conftest.$ac_objext \
  19678. conftest$ac_exeext conftest.$ac_ext
  19679. LIBS=$ac_check_lib_save_LIBS
  19680. fi
  19681. eval ac_res=\$$as_ac_Lib
  19682. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  19683. $as_echo "$ac_res" >&6; }
  19684. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  19685. AST_BKTR_FOUND=yes
  19686. else
  19687. AST_BKTR_FOUND=no
  19688. fi
  19689. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  19690. fi
  19691. # now check for the header.
  19692. if test "${AST_BKTR_FOUND}" = "yes"; then
  19693. BKTR_LIB="${pbxlibdir} -lc "
  19694. # if --with-BKTR=DIR has been specified, use it.
  19695. if test "x${BKTR_DIR}" != "x"; then
  19696. BKTR_INCLUDE="-I${BKTR_DIR}/include"
  19697. fi
  19698. BKTR_INCLUDE="${BKTR_INCLUDE} "
  19699. if test "xexecinfo.h" = "x" ; then # no header, assume found
  19700. BKTR_HEADER_FOUND="1"
  19701. else # check for the header
  19702. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  19703. CPPFLAGS="${CPPFLAGS} ${BKTR_INCLUDE}"
  19704. ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
  19705. if test "x$ac_cv_header_execinfo_h" = xyes; then :
  19706. BKTR_HEADER_FOUND=1
  19707. else
  19708. BKTR_HEADER_FOUND=0
  19709. fi
  19710. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  19711. fi
  19712. if test "x${BKTR_HEADER_FOUND}" = "x0" ; then
  19713. BKTR_LIB=""
  19714. BKTR_INCLUDE=""
  19715. else
  19716. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  19717. BKTR_LIB=""
  19718. fi
  19719. PBX_BKTR=1
  19720. cat >>confdefs.h <<_ACEOF
  19721. #define HAVE_BKTR 1
  19722. _ACEOF
  19723. fi
  19724. fi
  19725. fi
  19726. if test "x${PBX_BLUETOOTH}" != "x1" -a "${USE_BLUETOOTH}" != "no"; then
  19727. pbxlibdir=""
  19728. # if --with-BLUETOOTH=DIR has been specified, use it.
  19729. if test "x${BLUETOOTH_DIR}" != "x"; then
  19730. if test -d ${BLUETOOTH_DIR}/lib; then
  19731. pbxlibdir="-L${BLUETOOTH_DIR}/lib"
  19732. else
  19733. pbxlibdir="-L${BLUETOOTH_DIR}"
  19734. fi
  19735. fi
  19736. pbxfuncname="ba2str"
  19737. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  19738. AST_BLUETOOTH_FOUND=yes
  19739. else
  19740. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  19741. CFLAGS="${CFLAGS} "
  19742. as_ac_Lib=`$as_echo "ac_cv_lib_bluetooth_${pbxfuncname}" | $as_tr_sh`
  19743. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lbluetooth" >&5
  19744. $as_echo_n "checking for ${pbxfuncname} in -lbluetooth... " >&6; }
  19745. if eval \${$as_ac_Lib+:} false; then :
  19746. $as_echo_n "(cached) " >&6
  19747. else
  19748. ac_check_lib_save_LIBS=$LIBS
  19749. LIBS="-lbluetooth ${pbxlibdir} $LIBS"
  19750. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19751. /* end confdefs.h. */
  19752. /* Override any GCC internal prototype to avoid an error.
  19753. Use char because int might match the return type of a GCC
  19754. builtin and then its argument prototype would still apply. */
  19755. #ifdef __cplusplus
  19756. extern "C"
  19757. #endif
  19758. char ${pbxfuncname} ();
  19759. int
  19760. main ()
  19761. {
  19762. return ${pbxfuncname} ();
  19763. ;
  19764. return 0;
  19765. }
  19766. _ACEOF
  19767. if ac_fn_c_try_link "$LINENO"; then :
  19768. eval "$as_ac_Lib=yes"
  19769. else
  19770. eval "$as_ac_Lib=no"
  19771. fi
  19772. rm -f core conftest.err conftest.$ac_objext \
  19773. conftest$ac_exeext conftest.$ac_ext
  19774. LIBS=$ac_check_lib_save_LIBS
  19775. fi
  19776. eval ac_res=\$$as_ac_Lib
  19777. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  19778. $as_echo "$ac_res" >&6; }
  19779. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  19780. AST_BLUETOOTH_FOUND=yes
  19781. else
  19782. AST_BLUETOOTH_FOUND=no
  19783. fi
  19784. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  19785. fi
  19786. # now check for the header.
  19787. if test "${AST_BLUETOOTH_FOUND}" = "yes"; then
  19788. BLUETOOTH_LIB="${pbxlibdir} -lbluetooth "
  19789. # if --with-BLUETOOTH=DIR has been specified, use it.
  19790. if test "x${BLUETOOTH_DIR}" != "x"; then
  19791. BLUETOOTH_INCLUDE="-I${BLUETOOTH_DIR}/include"
  19792. fi
  19793. BLUETOOTH_INCLUDE="${BLUETOOTH_INCLUDE} "
  19794. if test "xbluetooth/bluetooth.h" = "x" ; then # no header, assume found
  19795. BLUETOOTH_HEADER_FOUND="1"
  19796. else # check for the header
  19797. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  19798. CPPFLAGS="${CPPFLAGS} ${BLUETOOTH_INCLUDE}"
  19799. ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
  19800. if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
  19801. BLUETOOTH_HEADER_FOUND=1
  19802. else
  19803. BLUETOOTH_HEADER_FOUND=0
  19804. fi
  19805. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  19806. fi
  19807. if test "x${BLUETOOTH_HEADER_FOUND}" = "x0" ; then
  19808. BLUETOOTH_LIB=""
  19809. BLUETOOTH_INCLUDE=""
  19810. else
  19811. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  19812. BLUETOOTH_LIB=""
  19813. fi
  19814. PBX_BLUETOOTH=1
  19815. cat >>confdefs.h <<_ACEOF
  19816. #define HAVE_BLUETOOTH 1
  19817. _ACEOF
  19818. fi
  19819. fi
  19820. fi
  19821. # possible places for oss definitions
  19822. if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then
  19823. pbxlibdir=""
  19824. # if --with-OSS=DIR has been specified, use it.
  19825. if test "x${OSS_DIR}" != "x"; then
  19826. if test -d ${OSS_DIR}/lib; then
  19827. pbxlibdir="-L${OSS_DIR}/lib"
  19828. else
  19829. pbxlibdir="-L${OSS_DIR}"
  19830. fi
  19831. fi
  19832. pbxfuncname=""
  19833. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  19834. AST_OSS_FOUND=yes
  19835. else
  19836. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  19837. CFLAGS="${CFLAGS} "
  19838. as_ac_Lib=`$as_echo "ac_cv_lib_ossaudio_${pbxfuncname}" | $as_tr_sh`
  19839. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lossaudio" >&5
  19840. $as_echo_n "checking for ${pbxfuncname} in -lossaudio... " >&6; }
  19841. if eval \${$as_ac_Lib+:} false; then :
  19842. $as_echo_n "(cached) " >&6
  19843. else
  19844. ac_check_lib_save_LIBS=$LIBS
  19845. LIBS="-lossaudio ${pbxlibdir} $LIBS"
  19846. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19847. /* end confdefs.h. */
  19848. /* Override any GCC internal prototype to avoid an error.
  19849. Use char because int might match the return type of a GCC
  19850. builtin and then its argument prototype would still apply. */
  19851. #ifdef __cplusplus
  19852. extern "C"
  19853. #endif
  19854. char ${pbxfuncname} ();
  19855. int
  19856. main ()
  19857. {
  19858. return ${pbxfuncname} ();
  19859. ;
  19860. return 0;
  19861. }
  19862. _ACEOF
  19863. if ac_fn_c_try_link "$LINENO"; then :
  19864. eval "$as_ac_Lib=yes"
  19865. else
  19866. eval "$as_ac_Lib=no"
  19867. fi
  19868. rm -f core conftest.err conftest.$ac_objext \
  19869. conftest$ac_exeext conftest.$ac_ext
  19870. LIBS=$ac_check_lib_save_LIBS
  19871. fi
  19872. eval ac_res=\$$as_ac_Lib
  19873. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  19874. $as_echo "$ac_res" >&6; }
  19875. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  19876. AST_OSS_FOUND=yes
  19877. else
  19878. AST_OSS_FOUND=no
  19879. fi
  19880. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  19881. fi
  19882. # now check for the header.
  19883. if test "${AST_OSS_FOUND}" = "yes"; then
  19884. OSS_LIB="${pbxlibdir} -lossaudio "
  19885. # if --with-OSS=DIR has been specified, use it.
  19886. if test "x${OSS_DIR}" != "x"; then
  19887. OSS_INCLUDE="-I${OSS_DIR}/include"
  19888. fi
  19889. OSS_INCLUDE="${OSS_INCLUDE} "
  19890. if test "xlinux/soundcard.h" = "x" ; then # no header, assume found
  19891. OSS_HEADER_FOUND="1"
  19892. else # check for the header
  19893. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  19894. CPPFLAGS="${CPPFLAGS} ${OSS_INCLUDE}"
  19895. ac_fn_c_check_header_mongrel "$LINENO" "linux/soundcard.h" "ac_cv_header_linux_soundcard_h" "$ac_includes_default"
  19896. if test "x$ac_cv_header_linux_soundcard_h" = xyes; then :
  19897. OSS_HEADER_FOUND=1
  19898. else
  19899. OSS_HEADER_FOUND=0
  19900. fi
  19901. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  19902. fi
  19903. if test "x${OSS_HEADER_FOUND}" = "x0" ; then
  19904. OSS_LIB=""
  19905. OSS_INCLUDE=""
  19906. else
  19907. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  19908. OSS_LIB=""
  19909. fi
  19910. PBX_OSS=1
  19911. cat >>confdefs.h <<_ACEOF
  19912. #define HAVE_OSS 1
  19913. _ACEOF
  19914. fi
  19915. fi
  19916. fi
  19917. if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then
  19918. pbxlibdir=""
  19919. # if --with-OSS=DIR has been specified, use it.
  19920. if test "x${OSS_DIR}" != "x"; then
  19921. if test -d ${OSS_DIR}/lib; then
  19922. pbxlibdir="-L${OSS_DIR}/lib"
  19923. else
  19924. pbxlibdir="-L${OSS_DIR}"
  19925. fi
  19926. fi
  19927. pbxfuncname=""
  19928. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  19929. AST_OSS_FOUND=yes
  19930. else
  19931. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  19932. CFLAGS="${CFLAGS} "
  19933. as_ac_Lib=`$as_echo "ac_cv_lib_ossaudio_${pbxfuncname}" | $as_tr_sh`
  19934. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lossaudio" >&5
  19935. $as_echo_n "checking for ${pbxfuncname} in -lossaudio... " >&6; }
  19936. if eval \${$as_ac_Lib+:} false; then :
  19937. $as_echo_n "(cached) " >&6
  19938. else
  19939. ac_check_lib_save_LIBS=$LIBS
  19940. LIBS="-lossaudio ${pbxlibdir} $LIBS"
  19941. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19942. /* end confdefs.h. */
  19943. /* Override any GCC internal prototype to avoid an error.
  19944. Use char because int might match the return type of a GCC
  19945. builtin and then its argument prototype would still apply. */
  19946. #ifdef __cplusplus
  19947. extern "C"
  19948. #endif
  19949. char ${pbxfuncname} ();
  19950. int
  19951. main ()
  19952. {
  19953. return ${pbxfuncname} ();
  19954. ;
  19955. return 0;
  19956. }
  19957. _ACEOF
  19958. if ac_fn_c_try_link "$LINENO"; then :
  19959. eval "$as_ac_Lib=yes"
  19960. else
  19961. eval "$as_ac_Lib=no"
  19962. fi
  19963. rm -f core conftest.err conftest.$ac_objext \
  19964. conftest$ac_exeext conftest.$ac_ext
  19965. LIBS=$ac_check_lib_save_LIBS
  19966. fi
  19967. eval ac_res=\$$as_ac_Lib
  19968. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  19969. $as_echo "$ac_res" >&6; }
  19970. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  19971. AST_OSS_FOUND=yes
  19972. else
  19973. AST_OSS_FOUND=no
  19974. fi
  19975. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  19976. fi
  19977. # now check for the header.
  19978. if test "${AST_OSS_FOUND}" = "yes"; then
  19979. OSS_LIB="${pbxlibdir} -lossaudio "
  19980. # if --with-OSS=DIR has been specified, use it.
  19981. if test "x${OSS_DIR}" != "x"; then
  19982. OSS_INCLUDE="-I${OSS_DIR}/include"
  19983. fi
  19984. OSS_INCLUDE="${OSS_INCLUDE} "
  19985. if test "xsys/soundcard.h" = "x" ; then # no header, assume found
  19986. OSS_HEADER_FOUND="1"
  19987. else # check for the header
  19988. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  19989. CPPFLAGS="${CPPFLAGS} ${OSS_INCLUDE}"
  19990. ac_fn_c_check_header_mongrel "$LINENO" "sys/soundcard.h" "ac_cv_header_sys_soundcard_h" "$ac_includes_default"
  19991. if test "x$ac_cv_header_sys_soundcard_h" = xyes; then :
  19992. OSS_HEADER_FOUND=1
  19993. else
  19994. OSS_HEADER_FOUND=0
  19995. fi
  19996. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  19997. fi
  19998. if test "x${OSS_HEADER_FOUND}" = "x0" ; then
  19999. OSS_LIB=""
  20000. OSS_INCLUDE=""
  20001. else
  20002. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  20003. OSS_LIB=""
  20004. fi
  20005. PBX_OSS=1
  20006. cat >>confdefs.h <<_ACEOF
  20007. #define HAVE_OSS 1
  20008. _ACEOF
  20009. fi
  20010. fi
  20011. fi
  20012. if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then
  20013. pbxlibdir=""
  20014. # if --with-OSS=DIR has been specified, use it.
  20015. if test "x${OSS_DIR}" != "x"; then
  20016. if test -d ${OSS_DIR}/lib; then
  20017. pbxlibdir="-L${OSS_DIR}/lib"
  20018. else
  20019. pbxlibdir="-L${OSS_DIR}"
  20020. fi
  20021. fi
  20022. pbxfuncname="oss_ioctl_mixer"
  20023. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  20024. AST_OSS_FOUND=yes
  20025. else
  20026. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  20027. CFLAGS="${CFLAGS} "
  20028. as_ac_Lib=`$as_echo "ac_cv_lib_ossaudio_${pbxfuncname}" | $as_tr_sh`
  20029. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lossaudio" >&5
  20030. $as_echo_n "checking for ${pbxfuncname} in -lossaudio... " >&6; }
  20031. if eval \${$as_ac_Lib+:} false; then :
  20032. $as_echo_n "(cached) " >&6
  20033. else
  20034. ac_check_lib_save_LIBS=$LIBS
  20035. LIBS="-lossaudio ${pbxlibdir} $LIBS"
  20036. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20037. /* end confdefs.h. */
  20038. /* Override any GCC internal prototype to avoid an error.
  20039. Use char because int might match the return type of a GCC
  20040. builtin and then its argument prototype would still apply. */
  20041. #ifdef __cplusplus
  20042. extern "C"
  20043. #endif
  20044. char ${pbxfuncname} ();
  20045. int
  20046. main ()
  20047. {
  20048. return ${pbxfuncname} ();
  20049. ;
  20050. return 0;
  20051. }
  20052. _ACEOF
  20053. if ac_fn_c_try_link "$LINENO"; then :
  20054. eval "$as_ac_Lib=yes"
  20055. else
  20056. eval "$as_ac_Lib=no"
  20057. fi
  20058. rm -f core conftest.err conftest.$ac_objext \
  20059. conftest$ac_exeext conftest.$ac_ext
  20060. LIBS=$ac_check_lib_save_LIBS
  20061. fi
  20062. eval ac_res=\$$as_ac_Lib
  20063. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  20064. $as_echo "$ac_res" >&6; }
  20065. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  20066. AST_OSS_FOUND=yes
  20067. else
  20068. AST_OSS_FOUND=no
  20069. fi
  20070. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  20071. fi
  20072. # now check for the header.
  20073. if test "${AST_OSS_FOUND}" = "yes"; then
  20074. OSS_LIB="${pbxlibdir} -lossaudio "
  20075. # if --with-OSS=DIR has been specified, use it.
  20076. if test "x${OSS_DIR}" != "x"; then
  20077. OSS_INCLUDE="-I${OSS_DIR}/include"
  20078. fi
  20079. OSS_INCLUDE="${OSS_INCLUDE} "
  20080. if test "xsoundcard.h" = "x" ; then # no header, assume found
  20081. OSS_HEADER_FOUND="1"
  20082. else # check for the header
  20083. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  20084. CPPFLAGS="${CPPFLAGS} ${OSS_INCLUDE}"
  20085. ac_fn_c_check_header_mongrel "$LINENO" "soundcard.h" "ac_cv_header_soundcard_h" "$ac_includes_default"
  20086. if test "x$ac_cv_header_soundcard_h" = xyes; then :
  20087. OSS_HEADER_FOUND=1
  20088. else
  20089. OSS_HEADER_FOUND=0
  20090. fi
  20091. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  20092. fi
  20093. if test "x${OSS_HEADER_FOUND}" = "x0" ; then
  20094. OSS_LIB=""
  20095. OSS_INCLUDE=""
  20096. else
  20097. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  20098. OSS_LIB=""
  20099. fi
  20100. PBX_OSS=1
  20101. cat >>confdefs.h <<_ACEOF
  20102. #define HAVE_OSS 1
  20103. _ACEOF
  20104. fi
  20105. fi
  20106. fi
  20107. PG_CONFIG=No
  20108. if test "${USE_PGSQL}" != "no"; then
  20109. if test "x${PGSQL_DIR}" != "x"; then
  20110. if test -n "$ac_tool_prefix"; then
  20111. # Extract the first word of "${ac_tool_prefix}pg_config", so it can be a program name with args.
  20112. set dummy ${ac_tool_prefix}pg_config; ac_word=$2
  20113. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  20114. $as_echo_n "checking for $ac_word... " >&6; }
  20115. if ${ac_cv_path_PG_CONFIG+:} false; then :
  20116. $as_echo_n "(cached) " >&6
  20117. else
  20118. case $PG_CONFIG in
  20119. [\\/]* | ?:[\\/]*)
  20120. ac_cv_path_PG_CONFIG="$PG_CONFIG" # Let the user override the test with a path.
  20121. ;;
  20122. *)
  20123. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  20124. for as_dir in ${PGSQL_DIR}/bin
  20125. do
  20126. IFS=$as_save_IFS
  20127. test -z "$as_dir" && as_dir=.
  20128. for ac_exec_ext in '' $ac_executable_extensions; do
  20129. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  20130. ac_cv_path_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  20131. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  20132. break 2
  20133. fi
  20134. done
  20135. done
  20136. IFS=$as_save_IFS
  20137. ;;
  20138. esac
  20139. fi
  20140. PG_CONFIG=$ac_cv_path_PG_CONFIG
  20141. if test -n "$PG_CONFIG"; then
  20142. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PG_CONFIG" >&5
  20143. $as_echo "$PG_CONFIG" >&6; }
  20144. else
  20145. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  20146. $as_echo "no" >&6; }
  20147. fi
  20148. fi
  20149. if test -z "$ac_cv_path_PG_CONFIG"; then
  20150. ac_pt_PG_CONFIG=$PG_CONFIG
  20151. # Extract the first word of "pg_config", so it can be a program name with args.
  20152. set dummy pg_config; ac_word=$2
  20153. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  20154. $as_echo_n "checking for $ac_word... " >&6; }
  20155. if ${ac_cv_path_ac_pt_PG_CONFIG+:} false; then :
  20156. $as_echo_n "(cached) " >&6
  20157. else
  20158. case $ac_pt_PG_CONFIG in
  20159. [\\/]* | ?:[\\/]*)
  20160. ac_cv_path_ac_pt_PG_CONFIG="$ac_pt_PG_CONFIG" # Let the user override the test with a path.
  20161. ;;
  20162. *)
  20163. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  20164. for as_dir in ${PGSQL_DIR}/bin
  20165. do
  20166. IFS=$as_save_IFS
  20167. test -z "$as_dir" && as_dir=.
  20168. for ac_exec_ext in '' $ac_executable_extensions; do
  20169. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  20170. ac_cv_path_ac_pt_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  20171. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  20172. break 2
  20173. fi
  20174. done
  20175. done
  20176. IFS=$as_save_IFS
  20177. ;;
  20178. esac
  20179. fi
  20180. ac_pt_PG_CONFIG=$ac_cv_path_ac_pt_PG_CONFIG
  20181. if test -n "$ac_pt_PG_CONFIG"; then
  20182. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PG_CONFIG" >&5
  20183. $as_echo "$ac_pt_PG_CONFIG" >&6; }
  20184. else
  20185. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  20186. $as_echo "no" >&6; }
  20187. fi
  20188. if test "x$ac_pt_PG_CONFIG" = x; then
  20189. PG_CONFIG="No"
  20190. else
  20191. case $cross_compiling:$ac_tool_warned in
  20192. yes:)
  20193. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  20194. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  20195. ac_tool_warned=yes ;;
  20196. esac
  20197. PG_CONFIG=$ac_pt_PG_CONFIG
  20198. fi
  20199. else
  20200. PG_CONFIG="$ac_cv_path_PG_CONFIG"
  20201. fi
  20202. if test x"${PG_CONFIG}" = xNo; then
  20203. { $as_echo "$as_me:${as_lineno-$LINENO}: ***" >&5
  20204. $as_echo "$as_me: ***" >&6;}
  20205. { $as_echo "$as_me:${as_lineno-$LINENO}: *** pg_config was not found in the path you specified:" >&5
  20206. $as_echo "$as_me: *** pg_config was not found in the path you specified:" >&6;}
  20207. { $as_echo "$as_me:${as_lineno-$LINENO}: *** ${PGSQL_DIR}/bin" >&5
  20208. $as_echo "$as_me: *** ${PGSQL_DIR}/bin" >&6;}
  20209. { $as_echo "$as_me:${as_lineno-$LINENO}: *** Either correct the installation, or run configure" >&5
  20210. $as_echo "$as_me: *** Either correct the installation, or run configure" >&6;}
  20211. { $as_echo "$as_me:${as_lineno-$LINENO}: *** including --without-postgres" >&5
  20212. $as_echo "$as_me: *** including --without-postgres" >&6;}
  20213. exit 1
  20214. fi
  20215. else
  20216. if test -n "$ac_tool_prefix"; then
  20217. # Extract the first word of "${ac_tool_prefix}pg_config", so it can be a program name with args.
  20218. set dummy ${ac_tool_prefix}pg_config; ac_word=$2
  20219. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  20220. $as_echo_n "checking for $ac_word... " >&6; }
  20221. if ${ac_cv_path_PG_CONFIG+:} false; then :
  20222. $as_echo_n "(cached) " >&6
  20223. else
  20224. case $PG_CONFIG in
  20225. [\\/]* | ?:[\\/]*)
  20226. ac_cv_path_PG_CONFIG="$PG_CONFIG" # Let the user override the test with a path.
  20227. ;;
  20228. *)
  20229. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  20230. for as_dir in $PATH
  20231. do
  20232. IFS=$as_save_IFS
  20233. test -z "$as_dir" && as_dir=.
  20234. for ac_exec_ext in '' $ac_executable_extensions; do
  20235. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  20236. ac_cv_path_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  20237. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  20238. break 2
  20239. fi
  20240. done
  20241. done
  20242. IFS=$as_save_IFS
  20243. ;;
  20244. esac
  20245. fi
  20246. PG_CONFIG=$ac_cv_path_PG_CONFIG
  20247. if test -n "$PG_CONFIG"; then
  20248. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PG_CONFIG" >&5
  20249. $as_echo "$PG_CONFIG" >&6; }
  20250. else
  20251. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  20252. $as_echo "no" >&6; }
  20253. fi
  20254. fi
  20255. if test -z "$ac_cv_path_PG_CONFIG"; then
  20256. ac_pt_PG_CONFIG=$PG_CONFIG
  20257. # Extract the first word of "pg_config", so it can be a program name with args.
  20258. set dummy pg_config; ac_word=$2
  20259. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  20260. $as_echo_n "checking for $ac_word... " >&6; }
  20261. if ${ac_cv_path_ac_pt_PG_CONFIG+:} false; then :
  20262. $as_echo_n "(cached) " >&6
  20263. else
  20264. case $ac_pt_PG_CONFIG in
  20265. [\\/]* | ?:[\\/]*)
  20266. ac_cv_path_ac_pt_PG_CONFIG="$ac_pt_PG_CONFIG" # Let the user override the test with a path.
  20267. ;;
  20268. *)
  20269. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  20270. for as_dir in $PATH
  20271. do
  20272. IFS=$as_save_IFS
  20273. test -z "$as_dir" && as_dir=.
  20274. for ac_exec_ext in '' $ac_executable_extensions; do
  20275. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  20276. ac_cv_path_ac_pt_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  20277. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  20278. break 2
  20279. fi
  20280. done
  20281. done
  20282. IFS=$as_save_IFS
  20283. ;;
  20284. esac
  20285. fi
  20286. ac_pt_PG_CONFIG=$ac_cv_path_ac_pt_PG_CONFIG
  20287. if test -n "$ac_pt_PG_CONFIG"; then
  20288. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PG_CONFIG" >&5
  20289. $as_echo "$ac_pt_PG_CONFIG" >&6; }
  20290. else
  20291. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  20292. $as_echo "no" >&6; }
  20293. fi
  20294. if test "x$ac_pt_PG_CONFIG" = x; then
  20295. PG_CONFIG="No"
  20296. else
  20297. case $cross_compiling:$ac_tool_warned in
  20298. yes:)
  20299. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  20300. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  20301. ac_tool_warned=yes ;;
  20302. esac
  20303. PG_CONFIG=$ac_pt_PG_CONFIG
  20304. fi
  20305. else
  20306. PG_CONFIG="$ac_cv_path_PG_CONFIG"
  20307. fi
  20308. fi
  20309. fi
  20310. if test "${PG_CONFIG}" != No; then
  20311. PGSQL_libdir=`${PG_CONFIG} --libdir`
  20312. PGSQL_includedir=`${PG_CONFIG} --includedir`
  20313. if test "x$?" != "x0" ; then
  20314. if test -n "${PGSQL_MANDATORY}" ; then
  20315. { $as_echo "$as_me:${as_lineno-$LINENO}: ***" >&5
  20316. $as_echo "$as_me: ***" >&6;}
  20317. { $as_echo "$as_me:${as_lineno-$LINENO}: *** The PostgreSQL installation on this system appears to be broken." >&5
  20318. $as_echo "$as_me: *** The PostgreSQL installation on this system appears to be broken." >&6;}
  20319. { $as_echo "$as_me:${as_lineno-$LINENO}: *** Either correct the installation, or run configure" >&5
  20320. $as_echo "$as_me: *** Either correct the installation, or run configure" >&6;}
  20321. { $as_echo "$as_me:${as_lineno-$LINENO}: *** including --without-postgres" >&5
  20322. $as_echo "$as_me: *** including --without-postgres" >&6;}
  20323. exit 1
  20324. fi
  20325. else
  20326. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQescapeStringConn in -lpq" >&5
  20327. $as_echo_n "checking for PQescapeStringConn in -lpq... " >&6; }
  20328. if ${ac_cv_lib_pq_PQescapeStringConn+:} false; then :
  20329. $as_echo_n "(cached) " >&6
  20330. else
  20331. ac_check_lib_save_LIBS=$LIBS
  20332. LIBS="-lpq -L${PGSQL_libdir} -lz $LIBS"
  20333. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20334. /* end confdefs.h. */
  20335. /* Override any GCC internal prototype to avoid an error.
  20336. Use char because int might match the return type of a GCC
  20337. builtin and then its argument prototype would still apply. */
  20338. #ifdef __cplusplus
  20339. extern "C"
  20340. #endif
  20341. char PQescapeStringConn ();
  20342. int
  20343. main ()
  20344. {
  20345. return PQescapeStringConn ();
  20346. ;
  20347. return 0;
  20348. }
  20349. _ACEOF
  20350. if ac_fn_c_try_link "$LINENO"; then :
  20351. ac_cv_lib_pq_PQescapeStringConn=yes
  20352. else
  20353. ac_cv_lib_pq_PQescapeStringConn=no
  20354. fi
  20355. rm -f core conftest.err conftest.$ac_objext \
  20356. conftest$ac_exeext conftest.$ac_ext
  20357. LIBS=$ac_check_lib_save_LIBS
  20358. fi
  20359. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQescapeStringConn" >&5
  20360. $as_echo "$ac_cv_lib_pq_PQescapeStringConn" >&6; }
  20361. if test "x$ac_cv_lib_pq_PQescapeStringConn" = xyes; then :
  20362. cat >>confdefs.h <<_ACEOF
  20363. #define HAVE_PGSQL 1
  20364. _ACEOF
  20365. fi
  20366. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pg_encoding_to_char within Postgres headers" >&5
  20367. $as_echo_n "checking for pg_encoding_to_char within Postgres headers... " >&6; }
  20368. old_CFLAGS=${CFLAGS}
  20369. CFLAGS="${CFLAGS} -I${PGSQL_includedir} -Werror"
  20370. old_LDFLAGS=${LDFLAGS}
  20371. LDFLAGS="${LDFLAGS} -L${PGSQL_libdir} -lpq -lz"
  20372. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20373. /* end confdefs.h. */
  20374. #include <libpq-fe.h>
  20375. int
  20376. main ()
  20377. {
  20378. const char *foo = pg_encoding_to_char(1)
  20379. ;
  20380. return 0;
  20381. }
  20382. _ACEOF
  20383. if ac_fn_c_try_link "$LINENO"; then :
  20384. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  20385. $as_echo "yes" >&6; }
  20386. cat >>confdefs.h <<_ACEOF
  20387. #define HAVE_PGSQL_pg_encoding_to_char 1
  20388. _ACEOF
  20389. else
  20390. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  20391. $as_echo "no" >&6; }
  20392. fi
  20393. rm -f core conftest.err conftest.$ac_objext \
  20394. conftest$ac_exeext conftest.$ac_ext
  20395. CFLAGS=${old_CFLAGS}
  20396. LDFLAGS=${old_LDFLAGS}
  20397. if test "${ac_cv_lib_pq_PQescapeStringConn}" = "yes"; then
  20398. PGSQL_LIB="-L${PGSQL_libdir} -lpq -lz"
  20399. PGSQL_INCLUDE="-I${PGSQL_includedir}"
  20400. PBX_PGSQL=1
  20401. elif test -n "${PGSQL_MANDATORY}";
  20402. then
  20403. { $as_echo "$as_me:${as_lineno-$LINENO}: ***" >&5
  20404. $as_echo "$as_me: ***" >&6;}
  20405. { $as_echo "$as_me:${as_lineno-$LINENO}: *** The PostgreSQL installation on this system appears to be broken." >&5
  20406. $as_echo "$as_me: *** The PostgreSQL installation on this system appears to be broken." >&6;}
  20407. { $as_echo "$as_me:${as_lineno-$LINENO}: *** Either correct the installation, or run configure" >&5
  20408. $as_echo "$as_me: *** Either correct the installation, or run configure" >&6;}
  20409. { $as_echo "$as_me:${as_lineno-$LINENO}: *** including --without-postgres" >&5
  20410. $as_echo "$as_me: *** including --without-postgres" >&6;}
  20411. exit 1
  20412. fi
  20413. fi
  20414. fi
  20415. if test "x${PBX_PJPROJECT}" != "x1" -a "${USE_PJPROJECT}" != "no"; then
  20416. pkg_failed=no
  20417. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PJPROJECT" >&5
  20418. $as_echo_n "checking for PJPROJECT... " >&6; }
  20419. if test -n "$PJPROJECT_CFLAGS"; then
  20420. pkg_cv_PJPROJECT_CFLAGS="$PJPROJECT_CFLAGS"
  20421. elif test -n "$PKG_CONFIG"; then
  20422. if test -n "$PKG_CONFIG" && \
  20423. { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpjproject\""; } >&5
  20424. ($PKG_CONFIG --exists --print-errors "libpjproject") 2>&5
  20425. ac_status=$?
  20426. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  20427. test $ac_status = 0; }; then
  20428. pkg_cv_PJPROJECT_CFLAGS=`$PKG_CONFIG --cflags "libpjproject" 2>/dev/null`
  20429. test "x$?" != "x0" && pkg_failed=yes
  20430. else
  20431. pkg_failed=yes
  20432. fi
  20433. else
  20434. pkg_failed=untried
  20435. fi
  20436. if test -n "$PJPROJECT_LIBS"; then
  20437. pkg_cv_PJPROJECT_LIBS="$PJPROJECT_LIBS"
  20438. elif test -n "$PKG_CONFIG"; then
  20439. if test -n "$PKG_CONFIG" && \
  20440. { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpjproject\""; } >&5
  20441. ($PKG_CONFIG --exists --print-errors "libpjproject") 2>&5
  20442. ac_status=$?
  20443. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  20444. test $ac_status = 0; }; then
  20445. pkg_cv_PJPROJECT_LIBS=`$PKG_CONFIG --libs "libpjproject" 2>/dev/null`
  20446. test "x$?" != "x0" && pkg_failed=yes
  20447. else
  20448. pkg_failed=yes
  20449. fi
  20450. else
  20451. pkg_failed=untried
  20452. fi
  20453. if test $pkg_failed = yes; then
  20454. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  20455. $as_echo "no" >&6; }
  20456. if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  20457. _pkg_short_errors_supported=yes
  20458. else
  20459. _pkg_short_errors_supported=no
  20460. fi
  20461. if test $_pkg_short_errors_supported = yes; then
  20462. PJPROJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpjproject" 2>&1`
  20463. else
  20464. PJPROJECT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpjproject" 2>&1`
  20465. fi
  20466. # Put the nasty error message in config.log where it belongs
  20467. echo "$PJPROJECT_PKG_ERRORS" >&5
  20468. PBX_PJPROJECT=0
  20469. elif test $pkg_failed = untried; then
  20470. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  20471. $as_echo "no" >&6; }
  20472. PBX_PJPROJECT=0
  20473. else
  20474. PJPROJECT_CFLAGS=$pkg_cv_PJPROJECT_CFLAGS
  20475. PJPROJECT_LIBS=$pkg_cv_PJPROJECT_LIBS
  20476. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  20477. $as_echo "yes" >&6; }
  20478. PBX_PJPROJECT=1
  20479. PJPROJECT_INCLUDE="$PJPROJECT_CFLAGS"
  20480. PJPROJECT_LIB="$PJPROJECT_LIBS"
  20481. $as_echo "#define HAVE_PJPROJECT 1" >>confdefs.h
  20482. fi
  20483. fi
  20484. if test "x${PBX_PJ_TRANSACTION_GRP_LOCK}" != "x1" -a "${USE_PJ_TRANSACTION_GRP_LOCK}" != "no"; then
  20485. pbxlibdir=""
  20486. # if --with-PJ_TRANSACTION_GRP_LOCK=DIR has been specified, use it.
  20487. if test "x${PJ_TRANSACTION_GRP_LOCK_DIR}" != "x"; then
  20488. if test -d ${PJ_TRANSACTION_GRP_LOCK_DIR}/lib; then
  20489. pbxlibdir="-L${PJ_TRANSACTION_GRP_LOCK_DIR}/lib"
  20490. else
  20491. pbxlibdir="-L${PJ_TRANSACTION_GRP_LOCK_DIR}"
  20492. fi
  20493. fi
  20494. pbxfuncname="pjsip_tsx_create_uac2"
  20495. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  20496. AST_PJ_TRANSACTION_GRP_LOCK_FOUND=yes
  20497. else
  20498. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  20499. CFLAGS="${CFLAGS} $PJPROJECT_CFLAGS"
  20500. as_ac_Lib=`$as_echo "ac_cv_lib_pjsip_${pbxfuncname}" | $as_tr_sh`
  20501. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpjsip" >&5
  20502. $as_echo_n "checking for ${pbxfuncname} in -lpjsip... " >&6; }
  20503. if eval \${$as_ac_Lib+:} false; then :
  20504. $as_echo_n "(cached) " >&6
  20505. else
  20506. ac_check_lib_save_LIBS=$LIBS
  20507. LIBS="-lpjsip ${pbxlibdir} $PJPROJECT_LIBS $LIBS"
  20508. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20509. /* end confdefs.h. */
  20510. /* Override any GCC internal prototype to avoid an error.
  20511. Use char because int might match the return type of a GCC
  20512. builtin and then its argument prototype would still apply. */
  20513. #ifdef __cplusplus
  20514. extern "C"
  20515. #endif
  20516. char ${pbxfuncname} ();
  20517. int
  20518. main ()
  20519. {
  20520. return ${pbxfuncname} ();
  20521. ;
  20522. return 0;
  20523. }
  20524. _ACEOF
  20525. if ac_fn_c_try_link "$LINENO"; then :
  20526. eval "$as_ac_Lib=yes"
  20527. else
  20528. eval "$as_ac_Lib=no"
  20529. fi
  20530. rm -f core conftest.err conftest.$ac_objext \
  20531. conftest$ac_exeext conftest.$ac_ext
  20532. LIBS=$ac_check_lib_save_LIBS
  20533. fi
  20534. eval ac_res=\$$as_ac_Lib
  20535. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  20536. $as_echo "$ac_res" >&6; }
  20537. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  20538. AST_PJ_TRANSACTION_GRP_LOCK_FOUND=yes
  20539. else
  20540. AST_PJ_TRANSACTION_GRP_LOCK_FOUND=no
  20541. fi
  20542. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  20543. fi
  20544. # now check for the header.
  20545. if test "${AST_PJ_TRANSACTION_GRP_LOCK_FOUND}" = "yes"; then
  20546. PJ_TRANSACTION_GRP_LOCK_LIB="${pbxlibdir} -lpjsip $PJPROJECT_LIBS"
  20547. # if --with-PJ_TRANSACTION_GRP_LOCK=DIR has been specified, use it.
  20548. if test "x${PJ_TRANSACTION_GRP_LOCK_DIR}" != "x"; then
  20549. PJ_TRANSACTION_GRP_LOCK_INCLUDE="-I${PJ_TRANSACTION_GRP_LOCK_DIR}/include"
  20550. fi
  20551. PJ_TRANSACTION_GRP_LOCK_INCLUDE="${PJ_TRANSACTION_GRP_LOCK_INCLUDE} $PJPROJECT_CFLAGS"
  20552. if test "xpjsip.h" = "x" ; then # no header, assume found
  20553. PJ_TRANSACTION_GRP_LOCK_HEADER_FOUND="1"
  20554. else # check for the header
  20555. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  20556. CPPFLAGS="${CPPFLAGS} ${PJ_TRANSACTION_GRP_LOCK_INCLUDE}"
  20557. ac_fn_c_check_header_mongrel "$LINENO" "pjsip.h" "ac_cv_header_pjsip_h" "$ac_includes_default"
  20558. if test "x$ac_cv_header_pjsip_h" = xyes; then :
  20559. PJ_TRANSACTION_GRP_LOCK_HEADER_FOUND=1
  20560. else
  20561. PJ_TRANSACTION_GRP_LOCK_HEADER_FOUND=0
  20562. fi
  20563. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  20564. fi
  20565. if test "x${PJ_TRANSACTION_GRP_LOCK_HEADER_FOUND}" = "x0" ; then
  20566. PJ_TRANSACTION_GRP_LOCK_LIB=""
  20567. PJ_TRANSACTION_GRP_LOCK_INCLUDE=""
  20568. else
  20569. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  20570. PJ_TRANSACTION_GRP_LOCK_LIB=""
  20571. fi
  20572. PBX_PJ_TRANSACTION_GRP_LOCK=1
  20573. cat >>confdefs.h <<_ACEOF
  20574. #define HAVE_PJ_TRANSACTION_GRP_LOCK 1
  20575. _ACEOF
  20576. fi
  20577. fi
  20578. fi
  20579. saved_cppflags="${CPPFLAGS}"
  20580. saved_libs="${LIBS}"
  20581. CPPFLAGS="${CPPFLAGS} ${PJPROJECT_CFLAGS}"
  20582. LIBS="${LIBS} ${PJPROJECT_LIBS}"
  20583. if test "x${PBX_PJSIP_REPLACE_MEDIA_STREAM}" != "x1" -a "${USE_PJSIP_REPLACE_MEDIA_STREAM}" != "no"; then
  20584. if test "x" != "x"; then
  20585. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for " >&5
  20586. $as_echo_n "checking for ... " >&6; }
  20587. else
  20588. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"pjmedia_mod_offer_flag flag = PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE\" compiles using pjmedia.h" >&5
  20589. $as_echo_n "checking if \"pjmedia_mod_offer_flag flag = PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE\" compiles using pjmedia.h... " >&6; }
  20590. fi
  20591. saved_cppflags="${CPPFLAGS}"
  20592. if test "x${PJSIP_REPLACE_MEDIA_STREAM_DIR}" != "x"; then
  20593. PJSIP_REPLACE_MEDIA_STREAM_INCLUDE="-I${PJSIP_REPLACE_MEDIA_STREAM_DIR}/include"
  20594. fi
  20595. CPPFLAGS="${CPPFLAGS} ${PJSIP_REPLACE_MEDIA_STREAM_INCLUDE}"
  20596. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20597. /* end confdefs.h. */
  20598. #include <pjmedia.h>
  20599. int
  20600. main ()
  20601. {
  20602. pjmedia_mod_offer_flag flag = PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE;
  20603. ;
  20604. return 0;
  20605. }
  20606. _ACEOF
  20607. if ac_fn_c_try_compile "$LINENO"; then :
  20608. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  20609. $as_echo "yes" >&6; }
  20610. PBX_PJSIP_REPLACE_MEDIA_STREAM=1
  20611. $as_echo "#define HAVE_PJSIP_REPLACE_MEDIA_STREAM 1" >>confdefs.h
  20612. else
  20613. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  20614. $as_echo "no" >&6; }
  20615. fi
  20616. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  20617. CPPFLAGS="${saved_cppflags}"
  20618. fi
  20619. LIBS="${saved_libs}"
  20620. CPPFLAGS="${saved_cppflags}"
  20621. if test "x${PBX_PJSIP_GET_DEST_INFO}" != "x1" -a "${USE_PJSIP_GET_DEST_INFO}" != "no"; then
  20622. pbxlibdir=""
  20623. # if --with-PJSIP_GET_DEST_INFO=DIR has been specified, use it.
  20624. if test "x${PJSIP_GET_DEST_INFO_DIR}" != "x"; then
  20625. if test -d ${PJSIP_GET_DEST_INFO_DIR}/lib; then
  20626. pbxlibdir="-L${PJSIP_GET_DEST_INFO_DIR}/lib"
  20627. else
  20628. pbxlibdir="-L${PJSIP_GET_DEST_INFO_DIR}"
  20629. fi
  20630. fi
  20631. pbxfuncname="pjsip_get_dest_info"
  20632. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  20633. AST_PJSIP_GET_DEST_INFO_FOUND=yes
  20634. else
  20635. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  20636. CFLAGS="${CFLAGS} $PJPROJECT_CFLAGS"
  20637. as_ac_Lib=`$as_echo "ac_cv_lib_pjsip_${pbxfuncname}" | $as_tr_sh`
  20638. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpjsip" >&5
  20639. $as_echo_n "checking for ${pbxfuncname} in -lpjsip... " >&6; }
  20640. if eval \${$as_ac_Lib+:} false; then :
  20641. $as_echo_n "(cached) " >&6
  20642. else
  20643. ac_check_lib_save_LIBS=$LIBS
  20644. LIBS="-lpjsip ${pbxlibdir} $PJPROJECT_LIBS $LIBS"
  20645. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20646. /* end confdefs.h. */
  20647. /* Override any GCC internal prototype to avoid an error.
  20648. Use char because int might match the return type of a GCC
  20649. builtin and then its argument prototype would still apply. */
  20650. #ifdef __cplusplus
  20651. extern "C"
  20652. #endif
  20653. char ${pbxfuncname} ();
  20654. int
  20655. main ()
  20656. {
  20657. return ${pbxfuncname} ();
  20658. ;
  20659. return 0;
  20660. }
  20661. _ACEOF
  20662. if ac_fn_c_try_link "$LINENO"; then :
  20663. eval "$as_ac_Lib=yes"
  20664. else
  20665. eval "$as_ac_Lib=no"
  20666. fi
  20667. rm -f core conftest.err conftest.$ac_objext \
  20668. conftest$ac_exeext conftest.$ac_ext
  20669. LIBS=$ac_check_lib_save_LIBS
  20670. fi
  20671. eval ac_res=\$$as_ac_Lib
  20672. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  20673. $as_echo "$ac_res" >&6; }
  20674. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  20675. AST_PJSIP_GET_DEST_INFO_FOUND=yes
  20676. else
  20677. AST_PJSIP_GET_DEST_INFO_FOUND=no
  20678. fi
  20679. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  20680. fi
  20681. # now check for the header.
  20682. if test "${AST_PJSIP_GET_DEST_INFO_FOUND}" = "yes"; then
  20683. PJSIP_GET_DEST_INFO_LIB="${pbxlibdir} -lpjsip $PJPROJECT_LIBS"
  20684. # if --with-PJSIP_GET_DEST_INFO=DIR has been specified, use it.
  20685. if test "x${PJSIP_GET_DEST_INFO_DIR}" != "x"; then
  20686. PJSIP_GET_DEST_INFO_INCLUDE="-I${PJSIP_GET_DEST_INFO_DIR}/include"
  20687. fi
  20688. PJSIP_GET_DEST_INFO_INCLUDE="${PJSIP_GET_DEST_INFO_INCLUDE} $PJPROJECT_CFLAGS"
  20689. if test "xpjsip.h" = "x" ; then # no header, assume found
  20690. PJSIP_GET_DEST_INFO_HEADER_FOUND="1"
  20691. else # check for the header
  20692. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  20693. CPPFLAGS="${CPPFLAGS} ${PJSIP_GET_DEST_INFO_INCLUDE}"
  20694. ac_fn_c_check_header_mongrel "$LINENO" "pjsip.h" "ac_cv_header_pjsip_h" "$ac_includes_default"
  20695. if test "x$ac_cv_header_pjsip_h" = xyes; then :
  20696. PJSIP_GET_DEST_INFO_HEADER_FOUND=1
  20697. else
  20698. PJSIP_GET_DEST_INFO_HEADER_FOUND=0
  20699. fi
  20700. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  20701. fi
  20702. if test "x${PJSIP_GET_DEST_INFO_HEADER_FOUND}" = "x0" ; then
  20703. PJSIP_GET_DEST_INFO_LIB=""
  20704. PJSIP_GET_DEST_INFO_INCLUDE=""
  20705. else
  20706. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  20707. PJSIP_GET_DEST_INFO_LIB=""
  20708. fi
  20709. PBX_PJSIP_GET_DEST_INFO=1
  20710. cat >>confdefs.h <<_ACEOF
  20711. #define HAVE_PJSIP_GET_DEST_INFO 1
  20712. _ACEOF
  20713. fi
  20714. fi
  20715. fi
  20716. if test "x${PBX_PJ_SSL_CERT_LOAD_FROM_FILES2}" != "x1" -a "${USE_PJ_SSL_CERT_LOAD_FROM_FILES2}" != "no"; then
  20717. pbxlibdir=""
  20718. # if --with-PJ_SSL_CERT_LOAD_FROM_FILES2=DIR has been specified, use it.
  20719. if test "x${PJ_SSL_CERT_LOAD_FROM_FILES2_DIR}" != "x"; then
  20720. if test -d ${PJ_SSL_CERT_LOAD_FROM_FILES2_DIR}/lib; then
  20721. pbxlibdir="-L${PJ_SSL_CERT_LOAD_FROM_FILES2_DIR}/lib"
  20722. else
  20723. pbxlibdir="-L${PJ_SSL_CERT_LOAD_FROM_FILES2_DIR}"
  20724. fi
  20725. fi
  20726. pbxfuncname="pj_ssl_cert_load_from_files2"
  20727. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  20728. AST_PJ_SSL_CERT_LOAD_FROM_FILES2_FOUND=yes
  20729. else
  20730. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  20731. CFLAGS="${CFLAGS} $PJPROJECT_CFLAGS"
  20732. as_ac_Lib=`$as_echo "ac_cv_lib_pj_${pbxfuncname}" | $as_tr_sh`
  20733. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpj" >&5
  20734. $as_echo_n "checking for ${pbxfuncname} in -lpj... " >&6; }
  20735. if eval \${$as_ac_Lib+:} false; then :
  20736. $as_echo_n "(cached) " >&6
  20737. else
  20738. ac_check_lib_save_LIBS=$LIBS
  20739. LIBS="-lpj ${pbxlibdir} $PJPROJECT_LIBS $LIBS"
  20740. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20741. /* end confdefs.h. */
  20742. /* Override any GCC internal prototype to avoid an error.
  20743. Use char because int might match the return type of a GCC
  20744. builtin and then its argument prototype would still apply. */
  20745. #ifdef __cplusplus
  20746. extern "C"
  20747. #endif
  20748. char ${pbxfuncname} ();
  20749. int
  20750. main ()
  20751. {
  20752. return ${pbxfuncname} ();
  20753. ;
  20754. return 0;
  20755. }
  20756. _ACEOF
  20757. if ac_fn_c_try_link "$LINENO"; then :
  20758. eval "$as_ac_Lib=yes"
  20759. else
  20760. eval "$as_ac_Lib=no"
  20761. fi
  20762. rm -f core conftest.err conftest.$ac_objext \
  20763. conftest$ac_exeext conftest.$ac_ext
  20764. LIBS=$ac_check_lib_save_LIBS
  20765. fi
  20766. eval ac_res=\$$as_ac_Lib
  20767. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  20768. $as_echo "$ac_res" >&6; }
  20769. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  20770. AST_PJ_SSL_CERT_LOAD_FROM_FILES2_FOUND=yes
  20771. else
  20772. AST_PJ_SSL_CERT_LOAD_FROM_FILES2_FOUND=no
  20773. fi
  20774. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  20775. fi
  20776. # now check for the header.
  20777. if test "${AST_PJ_SSL_CERT_LOAD_FROM_FILES2_FOUND}" = "yes"; then
  20778. PJ_SSL_CERT_LOAD_FROM_FILES2_LIB="${pbxlibdir} -lpj $PJPROJECT_LIBS"
  20779. # if --with-PJ_SSL_CERT_LOAD_FROM_FILES2=DIR has been specified, use it.
  20780. if test "x${PJ_SSL_CERT_LOAD_FROM_FILES2_DIR}" != "x"; then
  20781. PJ_SSL_CERT_LOAD_FROM_FILES2_INCLUDE="-I${PJ_SSL_CERT_LOAD_FROM_FILES2_DIR}/include"
  20782. fi
  20783. PJ_SSL_CERT_LOAD_FROM_FILES2_INCLUDE="${PJ_SSL_CERT_LOAD_FROM_FILES2_INCLUDE} $PJPROJECT_CFLAGS"
  20784. if test "xpjlib.h" = "x" ; then # no header, assume found
  20785. PJ_SSL_CERT_LOAD_FROM_FILES2_HEADER_FOUND="1"
  20786. else # check for the header
  20787. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  20788. CPPFLAGS="${CPPFLAGS} ${PJ_SSL_CERT_LOAD_FROM_FILES2_INCLUDE}"
  20789. ac_fn_c_check_header_mongrel "$LINENO" "pjlib.h" "ac_cv_header_pjlib_h" "$ac_includes_default"
  20790. if test "x$ac_cv_header_pjlib_h" = xyes; then :
  20791. PJ_SSL_CERT_LOAD_FROM_FILES2_HEADER_FOUND=1
  20792. else
  20793. PJ_SSL_CERT_LOAD_FROM_FILES2_HEADER_FOUND=0
  20794. fi
  20795. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  20796. fi
  20797. if test "x${PJ_SSL_CERT_LOAD_FROM_FILES2_HEADER_FOUND}" = "x0" ; then
  20798. PJ_SSL_CERT_LOAD_FROM_FILES2_LIB=""
  20799. PJ_SSL_CERT_LOAD_FROM_FILES2_INCLUDE=""
  20800. else
  20801. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  20802. PJ_SSL_CERT_LOAD_FROM_FILES2_LIB=""
  20803. fi
  20804. PBX_PJ_SSL_CERT_LOAD_FROM_FILES2=1
  20805. cat >>confdefs.h <<_ACEOF
  20806. #define HAVE_PJ_SSL_CERT_LOAD_FROM_FILES2 1
  20807. _ACEOF
  20808. fi
  20809. fi
  20810. fi
  20811. if test "x${PBX_POPT}" != "x1" -a "${USE_POPT}" != "no"; then
  20812. pbxlibdir=""
  20813. # if --with-POPT=DIR has been specified, use it.
  20814. if test "x${POPT_DIR}" != "x"; then
  20815. if test -d ${POPT_DIR}/lib; then
  20816. pbxlibdir="-L${POPT_DIR}/lib"
  20817. else
  20818. pbxlibdir="-L${POPT_DIR}"
  20819. fi
  20820. fi
  20821. pbxfuncname="poptStrerror"
  20822. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  20823. AST_POPT_FOUND=yes
  20824. else
  20825. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  20826. CFLAGS="${CFLAGS} "
  20827. as_ac_Lib=`$as_echo "ac_cv_lib_popt_${pbxfuncname}" | $as_tr_sh`
  20828. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpopt" >&5
  20829. $as_echo_n "checking for ${pbxfuncname} in -lpopt... " >&6; }
  20830. if eval \${$as_ac_Lib+:} false; then :
  20831. $as_echo_n "(cached) " >&6
  20832. else
  20833. ac_check_lib_save_LIBS=$LIBS
  20834. LIBS="-lpopt ${pbxlibdir} $LIBS"
  20835. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20836. /* end confdefs.h. */
  20837. /* Override any GCC internal prototype to avoid an error.
  20838. Use char because int might match the return type of a GCC
  20839. builtin and then its argument prototype would still apply. */
  20840. #ifdef __cplusplus
  20841. extern "C"
  20842. #endif
  20843. char ${pbxfuncname} ();
  20844. int
  20845. main ()
  20846. {
  20847. return ${pbxfuncname} ();
  20848. ;
  20849. return 0;
  20850. }
  20851. _ACEOF
  20852. if ac_fn_c_try_link "$LINENO"; then :
  20853. eval "$as_ac_Lib=yes"
  20854. else
  20855. eval "$as_ac_Lib=no"
  20856. fi
  20857. rm -f core conftest.err conftest.$ac_objext \
  20858. conftest$ac_exeext conftest.$ac_ext
  20859. LIBS=$ac_check_lib_save_LIBS
  20860. fi
  20861. eval ac_res=\$$as_ac_Lib
  20862. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  20863. $as_echo "$ac_res" >&6; }
  20864. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  20865. AST_POPT_FOUND=yes
  20866. else
  20867. AST_POPT_FOUND=no
  20868. fi
  20869. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  20870. fi
  20871. # now check for the header.
  20872. if test "${AST_POPT_FOUND}" = "yes"; then
  20873. POPT_LIB="${pbxlibdir} -lpopt "
  20874. # if --with-POPT=DIR has been specified, use it.
  20875. if test "x${POPT_DIR}" != "x"; then
  20876. POPT_INCLUDE="-I${POPT_DIR}/include"
  20877. fi
  20878. POPT_INCLUDE="${POPT_INCLUDE} "
  20879. if test "xpopt.h" = "x" ; then # no header, assume found
  20880. POPT_HEADER_FOUND="1"
  20881. else # check for the header
  20882. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  20883. CPPFLAGS="${CPPFLAGS} ${POPT_INCLUDE}"
  20884. ac_fn_c_check_header_mongrel "$LINENO" "popt.h" "ac_cv_header_popt_h" "$ac_includes_default"
  20885. if test "x$ac_cv_header_popt_h" = xyes; then :
  20886. POPT_HEADER_FOUND=1
  20887. else
  20888. POPT_HEADER_FOUND=0
  20889. fi
  20890. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  20891. fi
  20892. if test "x${POPT_HEADER_FOUND}" = "x0" ; then
  20893. POPT_LIB=""
  20894. POPT_INCLUDE=""
  20895. else
  20896. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  20897. POPT_LIB=""
  20898. fi
  20899. PBX_POPT=1
  20900. cat >>confdefs.h <<_ACEOF
  20901. #define HAVE_POPT 1
  20902. _ACEOF
  20903. fi
  20904. fi
  20905. fi
  20906. if test "x${PBX_PORTAUDIO}" != "x1" -a "${USE_PORTAUDIO}" != "no"; then
  20907. pbxlibdir=""
  20908. # if --with-PORTAUDIO=DIR has been specified, use it.
  20909. if test "x${PORTAUDIO_DIR}" != "x"; then
  20910. if test -d ${PORTAUDIO_DIR}/lib; then
  20911. pbxlibdir="-L${PORTAUDIO_DIR}/lib"
  20912. else
  20913. pbxlibdir="-L${PORTAUDIO_DIR}"
  20914. fi
  20915. fi
  20916. pbxfuncname="Pa_GetDeviceCount"
  20917. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  20918. AST_PORTAUDIO_FOUND=yes
  20919. else
  20920. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  20921. CFLAGS="${CFLAGS} "
  20922. as_ac_Lib=`$as_echo "ac_cv_lib_portaudio_${pbxfuncname}" | $as_tr_sh`
  20923. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lportaudio" >&5
  20924. $as_echo_n "checking for ${pbxfuncname} in -lportaudio... " >&6; }
  20925. if eval \${$as_ac_Lib+:} false; then :
  20926. $as_echo_n "(cached) " >&6
  20927. else
  20928. ac_check_lib_save_LIBS=$LIBS
  20929. LIBS="-lportaudio ${pbxlibdir} $LIBS"
  20930. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20931. /* end confdefs.h. */
  20932. /* Override any GCC internal prototype to avoid an error.
  20933. Use char because int might match the return type of a GCC
  20934. builtin and then its argument prototype would still apply. */
  20935. #ifdef __cplusplus
  20936. extern "C"
  20937. #endif
  20938. char ${pbxfuncname} ();
  20939. int
  20940. main ()
  20941. {
  20942. return ${pbxfuncname} ();
  20943. ;
  20944. return 0;
  20945. }
  20946. _ACEOF
  20947. if ac_fn_c_try_link "$LINENO"; then :
  20948. eval "$as_ac_Lib=yes"
  20949. else
  20950. eval "$as_ac_Lib=no"
  20951. fi
  20952. rm -f core conftest.err conftest.$ac_objext \
  20953. conftest$ac_exeext conftest.$ac_ext
  20954. LIBS=$ac_check_lib_save_LIBS
  20955. fi
  20956. eval ac_res=\$$as_ac_Lib
  20957. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  20958. $as_echo "$ac_res" >&6; }
  20959. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  20960. AST_PORTAUDIO_FOUND=yes
  20961. else
  20962. AST_PORTAUDIO_FOUND=no
  20963. fi
  20964. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  20965. fi
  20966. # now check for the header.
  20967. if test "${AST_PORTAUDIO_FOUND}" = "yes"; then
  20968. PORTAUDIO_LIB="${pbxlibdir} -lportaudio "
  20969. # if --with-PORTAUDIO=DIR has been specified, use it.
  20970. if test "x${PORTAUDIO_DIR}" != "x"; then
  20971. PORTAUDIO_INCLUDE="-I${PORTAUDIO_DIR}/include"
  20972. fi
  20973. PORTAUDIO_INCLUDE="${PORTAUDIO_INCLUDE} "
  20974. if test "xportaudio.h" = "x" ; then # no header, assume found
  20975. PORTAUDIO_HEADER_FOUND="1"
  20976. else # check for the header
  20977. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  20978. CPPFLAGS="${CPPFLAGS} ${PORTAUDIO_INCLUDE}"
  20979. ac_fn_c_check_header_mongrel "$LINENO" "portaudio.h" "ac_cv_header_portaudio_h" "$ac_includes_default"
  20980. if test "x$ac_cv_header_portaudio_h" = xyes; then :
  20981. PORTAUDIO_HEADER_FOUND=1
  20982. else
  20983. PORTAUDIO_HEADER_FOUND=0
  20984. fi
  20985. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  20986. fi
  20987. if test "x${PORTAUDIO_HEADER_FOUND}" = "x0" ; then
  20988. PORTAUDIO_LIB=""
  20989. PORTAUDIO_INCLUDE=""
  20990. else
  20991. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  20992. PORTAUDIO_LIB=""
  20993. fi
  20994. PBX_PORTAUDIO=1
  20995. cat >>confdefs.h <<_ACEOF
  20996. #define HAVE_PORTAUDIO 1
  20997. _ACEOF
  20998. fi
  20999. fi
  21000. fi
  21001. if test "x${PBX_PRI}" != "x1" -a "${USE_PRI}" != "no"; then
  21002. pbxlibdir=""
  21003. # if --with-PRI=DIR has been specified, use it.
  21004. if test "x${PRI_DIR}" != "x"; then
  21005. if test -d ${PRI_DIR}/lib; then
  21006. pbxlibdir="-L${PRI_DIR}/lib"
  21007. else
  21008. pbxlibdir="-L${PRI_DIR}"
  21009. fi
  21010. fi
  21011. pbxfuncname="pri_connected_line_update"
  21012. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  21013. AST_PRI_FOUND=yes
  21014. else
  21015. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  21016. CFLAGS="${CFLAGS} "
  21017. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  21018. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  21019. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  21020. if eval \${$as_ac_Lib+:} false; then :
  21021. $as_echo_n "(cached) " >&6
  21022. else
  21023. ac_check_lib_save_LIBS=$LIBS
  21024. LIBS="-lpri ${pbxlibdir} $LIBS"
  21025. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21026. /* end confdefs.h. */
  21027. /* Override any GCC internal prototype to avoid an error.
  21028. Use char because int might match the return type of a GCC
  21029. builtin and then its argument prototype would still apply. */
  21030. #ifdef __cplusplus
  21031. extern "C"
  21032. #endif
  21033. char ${pbxfuncname} ();
  21034. int
  21035. main ()
  21036. {
  21037. return ${pbxfuncname} ();
  21038. ;
  21039. return 0;
  21040. }
  21041. _ACEOF
  21042. if ac_fn_c_try_link "$LINENO"; then :
  21043. eval "$as_ac_Lib=yes"
  21044. else
  21045. eval "$as_ac_Lib=no"
  21046. fi
  21047. rm -f core conftest.err conftest.$ac_objext \
  21048. conftest$ac_exeext conftest.$ac_ext
  21049. LIBS=$ac_check_lib_save_LIBS
  21050. fi
  21051. eval ac_res=\$$as_ac_Lib
  21052. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  21053. $as_echo "$ac_res" >&6; }
  21054. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  21055. AST_PRI_FOUND=yes
  21056. else
  21057. AST_PRI_FOUND=no
  21058. fi
  21059. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  21060. fi
  21061. # now check for the header.
  21062. if test "${AST_PRI_FOUND}" = "yes"; then
  21063. PRI_LIB="${pbxlibdir} -lpri "
  21064. # if --with-PRI=DIR has been specified, use it.
  21065. if test "x${PRI_DIR}" != "x"; then
  21066. PRI_INCLUDE="-I${PRI_DIR}/include"
  21067. fi
  21068. PRI_INCLUDE="${PRI_INCLUDE} "
  21069. if test "xlibpri.h" = "x" ; then # no header, assume found
  21070. PRI_HEADER_FOUND="1"
  21071. else # check for the header
  21072. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  21073. CPPFLAGS="${CPPFLAGS} ${PRI_INCLUDE}"
  21074. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  21075. if test "x$ac_cv_header_libpri_h" = xyes; then :
  21076. PRI_HEADER_FOUND=1
  21077. else
  21078. PRI_HEADER_FOUND=0
  21079. fi
  21080. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  21081. fi
  21082. if test "x${PRI_HEADER_FOUND}" = "x0" ; then
  21083. PRI_LIB=""
  21084. PRI_INCLUDE=""
  21085. else
  21086. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  21087. PRI_LIB=""
  21088. fi
  21089. PBX_PRI=1
  21090. cat >>confdefs.h <<_ACEOF
  21091. #define HAVE_PRI 1
  21092. _ACEOF
  21093. fi
  21094. fi
  21095. fi
  21096. if test "x${PBX_PRI_SETUP_ACK_INBAND}" != "x1" -a "${USE_PRI_SETUP_ACK_INBAND}" != "no"; then
  21097. pbxlibdir=""
  21098. # if --with-PRI_SETUP_ACK_INBAND=DIR has been specified, use it.
  21099. if test "x${PRI_SETUP_ACK_INBAND_DIR}" != "x"; then
  21100. if test -d ${PRI_SETUP_ACK_INBAND_DIR}/lib; then
  21101. pbxlibdir="-L${PRI_SETUP_ACK_INBAND_DIR}/lib"
  21102. else
  21103. pbxlibdir="-L${PRI_SETUP_ACK_INBAND_DIR}"
  21104. fi
  21105. fi
  21106. pbxfuncname="pri_setup_ack"
  21107. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  21108. AST_PRI_SETUP_ACK_INBAND_FOUND=yes
  21109. else
  21110. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  21111. CFLAGS="${CFLAGS} "
  21112. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  21113. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  21114. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  21115. if eval \${$as_ac_Lib+:} false; then :
  21116. $as_echo_n "(cached) " >&6
  21117. else
  21118. ac_check_lib_save_LIBS=$LIBS
  21119. LIBS="-lpri ${pbxlibdir} $LIBS"
  21120. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21121. /* end confdefs.h. */
  21122. /* Override any GCC internal prototype to avoid an error.
  21123. Use char because int might match the return type of a GCC
  21124. builtin and then its argument prototype would still apply. */
  21125. #ifdef __cplusplus
  21126. extern "C"
  21127. #endif
  21128. char ${pbxfuncname} ();
  21129. int
  21130. main ()
  21131. {
  21132. return ${pbxfuncname} ();
  21133. ;
  21134. return 0;
  21135. }
  21136. _ACEOF
  21137. if ac_fn_c_try_link "$LINENO"; then :
  21138. eval "$as_ac_Lib=yes"
  21139. else
  21140. eval "$as_ac_Lib=no"
  21141. fi
  21142. rm -f core conftest.err conftest.$ac_objext \
  21143. conftest$ac_exeext conftest.$ac_ext
  21144. LIBS=$ac_check_lib_save_LIBS
  21145. fi
  21146. eval ac_res=\$$as_ac_Lib
  21147. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  21148. $as_echo "$ac_res" >&6; }
  21149. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  21150. AST_PRI_SETUP_ACK_INBAND_FOUND=yes
  21151. else
  21152. AST_PRI_SETUP_ACK_INBAND_FOUND=no
  21153. fi
  21154. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  21155. fi
  21156. # now check for the header.
  21157. if test "${AST_PRI_SETUP_ACK_INBAND_FOUND}" = "yes"; then
  21158. PRI_SETUP_ACK_INBAND_LIB="${pbxlibdir} -lpri "
  21159. # if --with-PRI_SETUP_ACK_INBAND=DIR has been specified, use it.
  21160. if test "x${PRI_SETUP_ACK_INBAND_DIR}" != "x"; then
  21161. PRI_SETUP_ACK_INBAND_INCLUDE="-I${PRI_SETUP_ACK_INBAND_DIR}/include"
  21162. fi
  21163. PRI_SETUP_ACK_INBAND_INCLUDE="${PRI_SETUP_ACK_INBAND_INCLUDE} "
  21164. if test "xlibpri.h" = "x" ; then # no header, assume found
  21165. PRI_SETUP_ACK_INBAND_HEADER_FOUND="1"
  21166. else # check for the header
  21167. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  21168. CPPFLAGS="${CPPFLAGS} ${PRI_SETUP_ACK_INBAND_INCLUDE}"
  21169. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  21170. if test "x$ac_cv_header_libpri_h" = xyes; then :
  21171. PRI_SETUP_ACK_INBAND_HEADER_FOUND=1
  21172. else
  21173. PRI_SETUP_ACK_INBAND_HEADER_FOUND=0
  21174. fi
  21175. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  21176. fi
  21177. if test "x${PRI_SETUP_ACK_INBAND_HEADER_FOUND}" = "x0" ; then
  21178. PRI_SETUP_ACK_INBAND_LIB=""
  21179. PRI_SETUP_ACK_INBAND_INCLUDE=""
  21180. else
  21181. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  21182. PRI_SETUP_ACK_INBAND_LIB=""
  21183. fi
  21184. PBX_PRI_SETUP_ACK_INBAND=1
  21185. cat >>confdefs.h <<_ACEOF
  21186. #define HAVE_PRI_SETUP_ACK_INBAND 1
  21187. _ACEOF
  21188. fi
  21189. fi
  21190. fi
  21191. if test "x${PBX_PRI_L2_PERSISTENCE}" != "x1" -a "${USE_PRI_L2_PERSISTENCE}" != "no"; then
  21192. pbxlibdir=""
  21193. # if --with-PRI_L2_PERSISTENCE=DIR has been specified, use it.
  21194. if test "x${PRI_L2_PERSISTENCE_DIR}" != "x"; then
  21195. if test -d ${PRI_L2_PERSISTENCE_DIR}/lib; then
  21196. pbxlibdir="-L${PRI_L2_PERSISTENCE_DIR}/lib"
  21197. else
  21198. pbxlibdir="-L${PRI_L2_PERSISTENCE_DIR}"
  21199. fi
  21200. fi
  21201. pbxfuncname="pri_persistent_layer2_option"
  21202. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  21203. AST_PRI_L2_PERSISTENCE_FOUND=yes
  21204. else
  21205. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  21206. CFLAGS="${CFLAGS} "
  21207. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  21208. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  21209. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  21210. if eval \${$as_ac_Lib+:} false; then :
  21211. $as_echo_n "(cached) " >&6
  21212. else
  21213. ac_check_lib_save_LIBS=$LIBS
  21214. LIBS="-lpri ${pbxlibdir} $LIBS"
  21215. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21216. /* end confdefs.h. */
  21217. /* Override any GCC internal prototype to avoid an error.
  21218. Use char because int might match the return type of a GCC
  21219. builtin and then its argument prototype would still apply. */
  21220. #ifdef __cplusplus
  21221. extern "C"
  21222. #endif
  21223. char ${pbxfuncname} ();
  21224. int
  21225. main ()
  21226. {
  21227. return ${pbxfuncname} ();
  21228. ;
  21229. return 0;
  21230. }
  21231. _ACEOF
  21232. if ac_fn_c_try_link "$LINENO"; then :
  21233. eval "$as_ac_Lib=yes"
  21234. else
  21235. eval "$as_ac_Lib=no"
  21236. fi
  21237. rm -f core conftest.err conftest.$ac_objext \
  21238. conftest$ac_exeext conftest.$ac_ext
  21239. LIBS=$ac_check_lib_save_LIBS
  21240. fi
  21241. eval ac_res=\$$as_ac_Lib
  21242. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  21243. $as_echo "$ac_res" >&6; }
  21244. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  21245. AST_PRI_L2_PERSISTENCE_FOUND=yes
  21246. else
  21247. AST_PRI_L2_PERSISTENCE_FOUND=no
  21248. fi
  21249. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  21250. fi
  21251. # now check for the header.
  21252. if test "${AST_PRI_L2_PERSISTENCE_FOUND}" = "yes"; then
  21253. PRI_L2_PERSISTENCE_LIB="${pbxlibdir} -lpri "
  21254. # if --with-PRI_L2_PERSISTENCE=DIR has been specified, use it.
  21255. if test "x${PRI_L2_PERSISTENCE_DIR}" != "x"; then
  21256. PRI_L2_PERSISTENCE_INCLUDE="-I${PRI_L2_PERSISTENCE_DIR}/include"
  21257. fi
  21258. PRI_L2_PERSISTENCE_INCLUDE="${PRI_L2_PERSISTENCE_INCLUDE} "
  21259. if test "xlibpri.h" = "x" ; then # no header, assume found
  21260. PRI_L2_PERSISTENCE_HEADER_FOUND="1"
  21261. else # check for the header
  21262. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  21263. CPPFLAGS="${CPPFLAGS} ${PRI_L2_PERSISTENCE_INCLUDE}"
  21264. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  21265. if test "x$ac_cv_header_libpri_h" = xyes; then :
  21266. PRI_L2_PERSISTENCE_HEADER_FOUND=1
  21267. else
  21268. PRI_L2_PERSISTENCE_HEADER_FOUND=0
  21269. fi
  21270. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  21271. fi
  21272. if test "x${PRI_L2_PERSISTENCE_HEADER_FOUND}" = "x0" ; then
  21273. PRI_L2_PERSISTENCE_LIB=""
  21274. PRI_L2_PERSISTENCE_INCLUDE=""
  21275. else
  21276. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  21277. PRI_L2_PERSISTENCE_LIB=""
  21278. fi
  21279. PBX_PRI_L2_PERSISTENCE=1
  21280. cat >>confdefs.h <<_ACEOF
  21281. #define HAVE_PRI_L2_PERSISTENCE 1
  21282. _ACEOF
  21283. fi
  21284. fi
  21285. fi
  21286. if test "x${PBX_PRI_DATETIME_SEND}" != "x1" -a "${USE_PRI_DATETIME_SEND}" != "no"; then
  21287. pbxlibdir=""
  21288. # if --with-PRI_DATETIME_SEND=DIR has been specified, use it.
  21289. if test "x${PRI_DATETIME_SEND_DIR}" != "x"; then
  21290. if test -d ${PRI_DATETIME_SEND_DIR}/lib; then
  21291. pbxlibdir="-L${PRI_DATETIME_SEND_DIR}/lib"
  21292. else
  21293. pbxlibdir="-L${PRI_DATETIME_SEND_DIR}"
  21294. fi
  21295. fi
  21296. pbxfuncname="pri_date_time_send_option"
  21297. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  21298. AST_PRI_DATETIME_SEND_FOUND=yes
  21299. else
  21300. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  21301. CFLAGS="${CFLAGS} "
  21302. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  21303. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  21304. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  21305. if eval \${$as_ac_Lib+:} false; then :
  21306. $as_echo_n "(cached) " >&6
  21307. else
  21308. ac_check_lib_save_LIBS=$LIBS
  21309. LIBS="-lpri ${pbxlibdir} $LIBS"
  21310. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21311. /* end confdefs.h. */
  21312. /* Override any GCC internal prototype to avoid an error.
  21313. Use char because int might match the return type of a GCC
  21314. builtin and then its argument prototype would still apply. */
  21315. #ifdef __cplusplus
  21316. extern "C"
  21317. #endif
  21318. char ${pbxfuncname} ();
  21319. int
  21320. main ()
  21321. {
  21322. return ${pbxfuncname} ();
  21323. ;
  21324. return 0;
  21325. }
  21326. _ACEOF
  21327. if ac_fn_c_try_link "$LINENO"; then :
  21328. eval "$as_ac_Lib=yes"
  21329. else
  21330. eval "$as_ac_Lib=no"
  21331. fi
  21332. rm -f core conftest.err conftest.$ac_objext \
  21333. conftest$ac_exeext conftest.$ac_ext
  21334. LIBS=$ac_check_lib_save_LIBS
  21335. fi
  21336. eval ac_res=\$$as_ac_Lib
  21337. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  21338. $as_echo "$ac_res" >&6; }
  21339. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  21340. AST_PRI_DATETIME_SEND_FOUND=yes
  21341. else
  21342. AST_PRI_DATETIME_SEND_FOUND=no
  21343. fi
  21344. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  21345. fi
  21346. # now check for the header.
  21347. if test "${AST_PRI_DATETIME_SEND_FOUND}" = "yes"; then
  21348. PRI_DATETIME_SEND_LIB="${pbxlibdir} -lpri "
  21349. # if --with-PRI_DATETIME_SEND=DIR has been specified, use it.
  21350. if test "x${PRI_DATETIME_SEND_DIR}" != "x"; then
  21351. PRI_DATETIME_SEND_INCLUDE="-I${PRI_DATETIME_SEND_DIR}/include"
  21352. fi
  21353. PRI_DATETIME_SEND_INCLUDE="${PRI_DATETIME_SEND_INCLUDE} "
  21354. if test "xlibpri.h" = "x" ; then # no header, assume found
  21355. PRI_DATETIME_SEND_HEADER_FOUND="1"
  21356. else # check for the header
  21357. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  21358. CPPFLAGS="${CPPFLAGS} ${PRI_DATETIME_SEND_INCLUDE}"
  21359. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  21360. if test "x$ac_cv_header_libpri_h" = xyes; then :
  21361. PRI_DATETIME_SEND_HEADER_FOUND=1
  21362. else
  21363. PRI_DATETIME_SEND_HEADER_FOUND=0
  21364. fi
  21365. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  21366. fi
  21367. if test "x${PRI_DATETIME_SEND_HEADER_FOUND}" = "x0" ; then
  21368. PRI_DATETIME_SEND_LIB=""
  21369. PRI_DATETIME_SEND_INCLUDE=""
  21370. else
  21371. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  21372. PRI_DATETIME_SEND_LIB=""
  21373. fi
  21374. PBX_PRI_DATETIME_SEND=1
  21375. cat >>confdefs.h <<_ACEOF
  21376. #define HAVE_PRI_DATETIME_SEND 1
  21377. _ACEOF
  21378. fi
  21379. fi
  21380. fi
  21381. if test "x${PBX_PRI_MWI_V2}" != "x1" -a "${USE_PRI_MWI_V2}" != "no"; then
  21382. pbxlibdir=""
  21383. # if --with-PRI_MWI_V2=DIR has been specified, use it.
  21384. if test "x${PRI_MWI_V2_DIR}" != "x"; then
  21385. if test -d ${PRI_MWI_V2_DIR}/lib; then
  21386. pbxlibdir="-L${PRI_MWI_V2_DIR}/lib"
  21387. else
  21388. pbxlibdir="-L${PRI_MWI_V2_DIR}"
  21389. fi
  21390. fi
  21391. pbxfuncname="pri_mwi_indicate_v2"
  21392. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  21393. AST_PRI_MWI_V2_FOUND=yes
  21394. else
  21395. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  21396. CFLAGS="${CFLAGS} "
  21397. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  21398. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  21399. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  21400. if eval \${$as_ac_Lib+:} false; then :
  21401. $as_echo_n "(cached) " >&6
  21402. else
  21403. ac_check_lib_save_LIBS=$LIBS
  21404. LIBS="-lpri ${pbxlibdir} $LIBS"
  21405. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21406. /* end confdefs.h. */
  21407. /* Override any GCC internal prototype to avoid an error.
  21408. Use char because int might match the return type of a GCC
  21409. builtin and then its argument prototype would still apply. */
  21410. #ifdef __cplusplus
  21411. extern "C"
  21412. #endif
  21413. char ${pbxfuncname} ();
  21414. int
  21415. main ()
  21416. {
  21417. return ${pbxfuncname} ();
  21418. ;
  21419. return 0;
  21420. }
  21421. _ACEOF
  21422. if ac_fn_c_try_link "$LINENO"; then :
  21423. eval "$as_ac_Lib=yes"
  21424. else
  21425. eval "$as_ac_Lib=no"
  21426. fi
  21427. rm -f core conftest.err conftest.$ac_objext \
  21428. conftest$ac_exeext conftest.$ac_ext
  21429. LIBS=$ac_check_lib_save_LIBS
  21430. fi
  21431. eval ac_res=\$$as_ac_Lib
  21432. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  21433. $as_echo "$ac_res" >&6; }
  21434. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  21435. AST_PRI_MWI_V2_FOUND=yes
  21436. else
  21437. AST_PRI_MWI_V2_FOUND=no
  21438. fi
  21439. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  21440. fi
  21441. # now check for the header.
  21442. if test "${AST_PRI_MWI_V2_FOUND}" = "yes"; then
  21443. PRI_MWI_V2_LIB="${pbxlibdir} -lpri "
  21444. # if --with-PRI_MWI_V2=DIR has been specified, use it.
  21445. if test "x${PRI_MWI_V2_DIR}" != "x"; then
  21446. PRI_MWI_V2_INCLUDE="-I${PRI_MWI_V2_DIR}/include"
  21447. fi
  21448. PRI_MWI_V2_INCLUDE="${PRI_MWI_V2_INCLUDE} "
  21449. if test "xlibpri.h" = "x" ; then # no header, assume found
  21450. PRI_MWI_V2_HEADER_FOUND="1"
  21451. else # check for the header
  21452. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  21453. CPPFLAGS="${CPPFLAGS} ${PRI_MWI_V2_INCLUDE}"
  21454. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  21455. if test "x$ac_cv_header_libpri_h" = xyes; then :
  21456. PRI_MWI_V2_HEADER_FOUND=1
  21457. else
  21458. PRI_MWI_V2_HEADER_FOUND=0
  21459. fi
  21460. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  21461. fi
  21462. if test "x${PRI_MWI_V2_HEADER_FOUND}" = "x0" ; then
  21463. PRI_MWI_V2_LIB=""
  21464. PRI_MWI_V2_INCLUDE=""
  21465. else
  21466. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  21467. PRI_MWI_V2_LIB=""
  21468. fi
  21469. PBX_PRI_MWI_V2=1
  21470. cat >>confdefs.h <<_ACEOF
  21471. #define HAVE_PRI_MWI_V2 1
  21472. _ACEOF
  21473. fi
  21474. fi
  21475. fi
  21476. if test "x${PBX_PRI_DISPLAY_TEXT}" != "x1" -a "${USE_PRI_DISPLAY_TEXT}" != "no"; then
  21477. pbxlibdir=""
  21478. # if --with-PRI_DISPLAY_TEXT=DIR has been specified, use it.
  21479. if test "x${PRI_DISPLAY_TEXT_DIR}" != "x"; then
  21480. if test -d ${PRI_DISPLAY_TEXT_DIR}/lib; then
  21481. pbxlibdir="-L${PRI_DISPLAY_TEXT_DIR}/lib"
  21482. else
  21483. pbxlibdir="-L${PRI_DISPLAY_TEXT_DIR}"
  21484. fi
  21485. fi
  21486. pbxfuncname="pri_display_text"
  21487. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  21488. AST_PRI_DISPLAY_TEXT_FOUND=yes
  21489. else
  21490. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  21491. CFLAGS="${CFLAGS} "
  21492. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  21493. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  21494. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  21495. if eval \${$as_ac_Lib+:} false; then :
  21496. $as_echo_n "(cached) " >&6
  21497. else
  21498. ac_check_lib_save_LIBS=$LIBS
  21499. LIBS="-lpri ${pbxlibdir} $LIBS"
  21500. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21501. /* end confdefs.h. */
  21502. /* Override any GCC internal prototype to avoid an error.
  21503. Use char because int might match the return type of a GCC
  21504. builtin and then its argument prototype would still apply. */
  21505. #ifdef __cplusplus
  21506. extern "C"
  21507. #endif
  21508. char ${pbxfuncname} ();
  21509. int
  21510. main ()
  21511. {
  21512. return ${pbxfuncname} ();
  21513. ;
  21514. return 0;
  21515. }
  21516. _ACEOF
  21517. if ac_fn_c_try_link "$LINENO"; then :
  21518. eval "$as_ac_Lib=yes"
  21519. else
  21520. eval "$as_ac_Lib=no"
  21521. fi
  21522. rm -f core conftest.err conftest.$ac_objext \
  21523. conftest$ac_exeext conftest.$ac_ext
  21524. LIBS=$ac_check_lib_save_LIBS
  21525. fi
  21526. eval ac_res=\$$as_ac_Lib
  21527. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  21528. $as_echo "$ac_res" >&6; }
  21529. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  21530. AST_PRI_DISPLAY_TEXT_FOUND=yes
  21531. else
  21532. AST_PRI_DISPLAY_TEXT_FOUND=no
  21533. fi
  21534. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  21535. fi
  21536. # now check for the header.
  21537. if test "${AST_PRI_DISPLAY_TEXT_FOUND}" = "yes"; then
  21538. PRI_DISPLAY_TEXT_LIB="${pbxlibdir} -lpri "
  21539. # if --with-PRI_DISPLAY_TEXT=DIR has been specified, use it.
  21540. if test "x${PRI_DISPLAY_TEXT_DIR}" != "x"; then
  21541. PRI_DISPLAY_TEXT_INCLUDE="-I${PRI_DISPLAY_TEXT_DIR}/include"
  21542. fi
  21543. PRI_DISPLAY_TEXT_INCLUDE="${PRI_DISPLAY_TEXT_INCLUDE} "
  21544. if test "xlibpri.h" = "x" ; then # no header, assume found
  21545. PRI_DISPLAY_TEXT_HEADER_FOUND="1"
  21546. else # check for the header
  21547. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  21548. CPPFLAGS="${CPPFLAGS} ${PRI_DISPLAY_TEXT_INCLUDE}"
  21549. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  21550. if test "x$ac_cv_header_libpri_h" = xyes; then :
  21551. PRI_DISPLAY_TEXT_HEADER_FOUND=1
  21552. else
  21553. PRI_DISPLAY_TEXT_HEADER_FOUND=0
  21554. fi
  21555. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  21556. fi
  21557. if test "x${PRI_DISPLAY_TEXT_HEADER_FOUND}" = "x0" ; then
  21558. PRI_DISPLAY_TEXT_LIB=""
  21559. PRI_DISPLAY_TEXT_INCLUDE=""
  21560. else
  21561. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  21562. PRI_DISPLAY_TEXT_LIB=""
  21563. fi
  21564. PBX_PRI_DISPLAY_TEXT=1
  21565. cat >>confdefs.h <<_ACEOF
  21566. #define HAVE_PRI_DISPLAY_TEXT 1
  21567. _ACEOF
  21568. fi
  21569. fi
  21570. fi
  21571. if test "x${PBX_PRI_MWI}" != "x1" -a "${USE_PRI_MWI}" != "no"; then
  21572. pbxlibdir=""
  21573. # if --with-PRI_MWI=DIR has been specified, use it.
  21574. if test "x${PRI_MWI_DIR}" != "x"; then
  21575. if test -d ${PRI_MWI_DIR}/lib; then
  21576. pbxlibdir="-L${PRI_MWI_DIR}/lib"
  21577. else
  21578. pbxlibdir="-L${PRI_MWI_DIR}"
  21579. fi
  21580. fi
  21581. pbxfuncname="pri_mwi_indicate"
  21582. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  21583. AST_PRI_MWI_FOUND=yes
  21584. else
  21585. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  21586. CFLAGS="${CFLAGS} "
  21587. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  21588. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  21589. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  21590. if eval \${$as_ac_Lib+:} false; then :
  21591. $as_echo_n "(cached) " >&6
  21592. else
  21593. ac_check_lib_save_LIBS=$LIBS
  21594. LIBS="-lpri ${pbxlibdir} $LIBS"
  21595. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21596. /* end confdefs.h. */
  21597. /* Override any GCC internal prototype to avoid an error.
  21598. Use char because int might match the return type of a GCC
  21599. builtin and then its argument prototype would still apply. */
  21600. #ifdef __cplusplus
  21601. extern "C"
  21602. #endif
  21603. char ${pbxfuncname} ();
  21604. int
  21605. main ()
  21606. {
  21607. return ${pbxfuncname} ();
  21608. ;
  21609. return 0;
  21610. }
  21611. _ACEOF
  21612. if ac_fn_c_try_link "$LINENO"; then :
  21613. eval "$as_ac_Lib=yes"
  21614. else
  21615. eval "$as_ac_Lib=no"
  21616. fi
  21617. rm -f core conftest.err conftest.$ac_objext \
  21618. conftest$ac_exeext conftest.$ac_ext
  21619. LIBS=$ac_check_lib_save_LIBS
  21620. fi
  21621. eval ac_res=\$$as_ac_Lib
  21622. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  21623. $as_echo "$ac_res" >&6; }
  21624. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  21625. AST_PRI_MWI_FOUND=yes
  21626. else
  21627. AST_PRI_MWI_FOUND=no
  21628. fi
  21629. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  21630. fi
  21631. # now check for the header.
  21632. if test "${AST_PRI_MWI_FOUND}" = "yes"; then
  21633. PRI_MWI_LIB="${pbxlibdir} -lpri "
  21634. # if --with-PRI_MWI=DIR has been specified, use it.
  21635. if test "x${PRI_MWI_DIR}" != "x"; then
  21636. PRI_MWI_INCLUDE="-I${PRI_MWI_DIR}/include"
  21637. fi
  21638. PRI_MWI_INCLUDE="${PRI_MWI_INCLUDE} "
  21639. if test "xlibpri.h" = "x" ; then # no header, assume found
  21640. PRI_MWI_HEADER_FOUND="1"
  21641. else # check for the header
  21642. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  21643. CPPFLAGS="${CPPFLAGS} ${PRI_MWI_INCLUDE}"
  21644. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  21645. if test "x$ac_cv_header_libpri_h" = xyes; then :
  21646. PRI_MWI_HEADER_FOUND=1
  21647. else
  21648. PRI_MWI_HEADER_FOUND=0
  21649. fi
  21650. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  21651. fi
  21652. if test "x${PRI_MWI_HEADER_FOUND}" = "x0" ; then
  21653. PRI_MWI_LIB=""
  21654. PRI_MWI_INCLUDE=""
  21655. else
  21656. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  21657. PRI_MWI_LIB=""
  21658. fi
  21659. PBX_PRI_MWI=1
  21660. cat >>confdefs.h <<_ACEOF
  21661. #define HAVE_PRI_MWI 1
  21662. _ACEOF
  21663. fi
  21664. fi
  21665. fi
  21666. if test "x${PBX_PRI_MCID}" != "x1" -a "${USE_PRI_MCID}" != "no"; then
  21667. pbxlibdir=""
  21668. # if --with-PRI_MCID=DIR has been specified, use it.
  21669. if test "x${PRI_MCID_DIR}" != "x"; then
  21670. if test -d ${PRI_MCID_DIR}/lib; then
  21671. pbxlibdir="-L${PRI_MCID_DIR}/lib"
  21672. else
  21673. pbxlibdir="-L${PRI_MCID_DIR}"
  21674. fi
  21675. fi
  21676. pbxfuncname="pri_mcid_enable"
  21677. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  21678. AST_PRI_MCID_FOUND=yes
  21679. else
  21680. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  21681. CFLAGS="${CFLAGS} "
  21682. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  21683. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  21684. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  21685. if eval \${$as_ac_Lib+:} false; then :
  21686. $as_echo_n "(cached) " >&6
  21687. else
  21688. ac_check_lib_save_LIBS=$LIBS
  21689. LIBS="-lpri ${pbxlibdir} $LIBS"
  21690. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21691. /* end confdefs.h. */
  21692. /* Override any GCC internal prototype to avoid an error.
  21693. Use char because int might match the return type of a GCC
  21694. builtin and then its argument prototype would still apply. */
  21695. #ifdef __cplusplus
  21696. extern "C"
  21697. #endif
  21698. char ${pbxfuncname} ();
  21699. int
  21700. main ()
  21701. {
  21702. return ${pbxfuncname} ();
  21703. ;
  21704. return 0;
  21705. }
  21706. _ACEOF
  21707. if ac_fn_c_try_link "$LINENO"; then :
  21708. eval "$as_ac_Lib=yes"
  21709. else
  21710. eval "$as_ac_Lib=no"
  21711. fi
  21712. rm -f core conftest.err conftest.$ac_objext \
  21713. conftest$ac_exeext conftest.$ac_ext
  21714. LIBS=$ac_check_lib_save_LIBS
  21715. fi
  21716. eval ac_res=\$$as_ac_Lib
  21717. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  21718. $as_echo "$ac_res" >&6; }
  21719. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  21720. AST_PRI_MCID_FOUND=yes
  21721. else
  21722. AST_PRI_MCID_FOUND=no
  21723. fi
  21724. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  21725. fi
  21726. # now check for the header.
  21727. if test "${AST_PRI_MCID_FOUND}" = "yes"; then
  21728. PRI_MCID_LIB="${pbxlibdir} -lpri "
  21729. # if --with-PRI_MCID=DIR has been specified, use it.
  21730. if test "x${PRI_MCID_DIR}" != "x"; then
  21731. PRI_MCID_INCLUDE="-I${PRI_MCID_DIR}/include"
  21732. fi
  21733. PRI_MCID_INCLUDE="${PRI_MCID_INCLUDE} "
  21734. if test "xlibpri.h" = "x" ; then # no header, assume found
  21735. PRI_MCID_HEADER_FOUND="1"
  21736. else # check for the header
  21737. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  21738. CPPFLAGS="${CPPFLAGS} ${PRI_MCID_INCLUDE}"
  21739. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  21740. if test "x$ac_cv_header_libpri_h" = xyes; then :
  21741. PRI_MCID_HEADER_FOUND=1
  21742. else
  21743. PRI_MCID_HEADER_FOUND=0
  21744. fi
  21745. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  21746. fi
  21747. if test "x${PRI_MCID_HEADER_FOUND}" = "x0" ; then
  21748. PRI_MCID_LIB=""
  21749. PRI_MCID_INCLUDE=""
  21750. else
  21751. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  21752. PRI_MCID_LIB=""
  21753. fi
  21754. PBX_PRI_MCID=1
  21755. cat >>confdefs.h <<_ACEOF
  21756. #define HAVE_PRI_MCID 1
  21757. _ACEOF
  21758. fi
  21759. fi
  21760. fi
  21761. if test "x${PBX_PRI_CALL_WAITING}" != "x1" -a "${USE_PRI_CALL_WAITING}" != "no"; then
  21762. pbxlibdir=""
  21763. # if --with-PRI_CALL_WAITING=DIR has been specified, use it.
  21764. if test "x${PRI_CALL_WAITING_DIR}" != "x"; then
  21765. if test -d ${PRI_CALL_WAITING_DIR}/lib; then
  21766. pbxlibdir="-L${PRI_CALL_WAITING_DIR}/lib"
  21767. else
  21768. pbxlibdir="-L${PRI_CALL_WAITING_DIR}"
  21769. fi
  21770. fi
  21771. pbxfuncname="pri_connect_ack_enable"
  21772. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  21773. AST_PRI_CALL_WAITING_FOUND=yes
  21774. else
  21775. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  21776. CFLAGS="${CFLAGS} "
  21777. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  21778. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  21779. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  21780. if eval \${$as_ac_Lib+:} false; then :
  21781. $as_echo_n "(cached) " >&6
  21782. else
  21783. ac_check_lib_save_LIBS=$LIBS
  21784. LIBS="-lpri ${pbxlibdir} $LIBS"
  21785. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21786. /* end confdefs.h. */
  21787. /* Override any GCC internal prototype to avoid an error.
  21788. Use char because int might match the return type of a GCC
  21789. builtin and then its argument prototype would still apply. */
  21790. #ifdef __cplusplus
  21791. extern "C"
  21792. #endif
  21793. char ${pbxfuncname} ();
  21794. int
  21795. main ()
  21796. {
  21797. return ${pbxfuncname} ();
  21798. ;
  21799. return 0;
  21800. }
  21801. _ACEOF
  21802. if ac_fn_c_try_link "$LINENO"; then :
  21803. eval "$as_ac_Lib=yes"
  21804. else
  21805. eval "$as_ac_Lib=no"
  21806. fi
  21807. rm -f core conftest.err conftest.$ac_objext \
  21808. conftest$ac_exeext conftest.$ac_ext
  21809. LIBS=$ac_check_lib_save_LIBS
  21810. fi
  21811. eval ac_res=\$$as_ac_Lib
  21812. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  21813. $as_echo "$ac_res" >&6; }
  21814. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  21815. AST_PRI_CALL_WAITING_FOUND=yes
  21816. else
  21817. AST_PRI_CALL_WAITING_FOUND=no
  21818. fi
  21819. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  21820. fi
  21821. # now check for the header.
  21822. if test "${AST_PRI_CALL_WAITING_FOUND}" = "yes"; then
  21823. PRI_CALL_WAITING_LIB="${pbxlibdir} -lpri "
  21824. # if --with-PRI_CALL_WAITING=DIR has been specified, use it.
  21825. if test "x${PRI_CALL_WAITING_DIR}" != "x"; then
  21826. PRI_CALL_WAITING_INCLUDE="-I${PRI_CALL_WAITING_DIR}/include"
  21827. fi
  21828. PRI_CALL_WAITING_INCLUDE="${PRI_CALL_WAITING_INCLUDE} "
  21829. if test "xlibpri.h" = "x" ; then # no header, assume found
  21830. PRI_CALL_WAITING_HEADER_FOUND="1"
  21831. else # check for the header
  21832. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  21833. CPPFLAGS="${CPPFLAGS} ${PRI_CALL_WAITING_INCLUDE}"
  21834. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  21835. if test "x$ac_cv_header_libpri_h" = xyes; then :
  21836. PRI_CALL_WAITING_HEADER_FOUND=1
  21837. else
  21838. PRI_CALL_WAITING_HEADER_FOUND=0
  21839. fi
  21840. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  21841. fi
  21842. if test "x${PRI_CALL_WAITING_HEADER_FOUND}" = "x0" ; then
  21843. PRI_CALL_WAITING_LIB=""
  21844. PRI_CALL_WAITING_INCLUDE=""
  21845. else
  21846. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  21847. PRI_CALL_WAITING_LIB=""
  21848. fi
  21849. PBX_PRI_CALL_WAITING=1
  21850. cat >>confdefs.h <<_ACEOF
  21851. #define HAVE_PRI_CALL_WAITING 1
  21852. _ACEOF
  21853. fi
  21854. fi
  21855. fi
  21856. if test "x${PBX_PRI_AOC_EVENTS}" != "x1" -a "${USE_PRI_AOC_EVENTS}" != "no"; then
  21857. pbxlibdir=""
  21858. # if --with-PRI_AOC_EVENTS=DIR has been specified, use it.
  21859. if test "x${PRI_AOC_EVENTS_DIR}" != "x"; then
  21860. if test -d ${PRI_AOC_EVENTS_DIR}/lib; then
  21861. pbxlibdir="-L${PRI_AOC_EVENTS_DIR}/lib"
  21862. else
  21863. pbxlibdir="-L${PRI_AOC_EVENTS_DIR}"
  21864. fi
  21865. fi
  21866. pbxfuncname="pri_aoc_events_enable"
  21867. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  21868. AST_PRI_AOC_EVENTS_FOUND=yes
  21869. else
  21870. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  21871. CFLAGS="${CFLAGS} "
  21872. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  21873. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  21874. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  21875. if eval \${$as_ac_Lib+:} false; then :
  21876. $as_echo_n "(cached) " >&6
  21877. else
  21878. ac_check_lib_save_LIBS=$LIBS
  21879. LIBS="-lpri ${pbxlibdir} $LIBS"
  21880. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21881. /* end confdefs.h. */
  21882. /* Override any GCC internal prototype to avoid an error.
  21883. Use char because int might match the return type of a GCC
  21884. builtin and then its argument prototype would still apply. */
  21885. #ifdef __cplusplus
  21886. extern "C"
  21887. #endif
  21888. char ${pbxfuncname} ();
  21889. int
  21890. main ()
  21891. {
  21892. return ${pbxfuncname} ();
  21893. ;
  21894. return 0;
  21895. }
  21896. _ACEOF
  21897. if ac_fn_c_try_link "$LINENO"; then :
  21898. eval "$as_ac_Lib=yes"
  21899. else
  21900. eval "$as_ac_Lib=no"
  21901. fi
  21902. rm -f core conftest.err conftest.$ac_objext \
  21903. conftest$ac_exeext conftest.$ac_ext
  21904. LIBS=$ac_check_lib_save_LIBS
  21905. fi
  21906. eval ac_res=\$$as_ac_Lib
  21907. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  21908. $as_echo "$ac_res" >&6; }
  21909. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  21910. AST_PRI_AOC_EVENTS_FOUND=yes
  21911. else
  21912. AST_PRI_AOC_EVENTS_FOUND=no
  21913. fi
  21914. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  21915. fi
  21916. # now check for the header.
  21917. if test "${AST_PRI_AOC_EVENTS_FOUND}" = "yes"; then
  21918. PRI_AOC_EVENTS_LIB="${pbxlibdir} -lpri "
  21919. # if --with-PRI_AOC_EVENTS=DIR has been specified, use it.
  21920. if test "x${PRI_AOC_EVENTS_DIR}" != "x"; then
  21921. PRI_AOC_EVENTS_INCLUDE="-I${PRI_AOC_EVENTS_DIR}/include"
  21922. fi
  21923. PRI_AOC_EVENTS_INCLUDE="${PRI_AOC_EVENTS_INCLUDE} "
  21924. if test "xlibpri.h" = "x" ; then # no header, assume found
  21925. PRI_AOC_EVENTS_HEADER_FOUND="1"
  21926. else # check for the header
  21927. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  21928. CPPFLAGS="${CPPFLAGS} ${PRI_AOC_EVENTS_INCLUDE}"
  21929. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  21930. if test "x$ac_cv_header_libpri_h" = xyes; then :
  21931. PRI_AOC_EVENTS_HEADER_FOUND=1
  21932. else
  21933. PRI_AOC_EVENTS_HEADER_FOUND=0
  21934. fi
  21935. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  21936. fi
  21937. if test "x${PRI_AOC_EVENTS_HEADER_FOUND}" = "x0" ; then
  21938. PRI_AOC_EVENTS_LIB=""
  21939. PRI_AOC_EVENTS_INCLUDE=""
  21940. else
  21941. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  21942. PRI_AOC_EVENTS_LIB=""
  21943. fi
  21944. PBX_PRI_AOC_EVENTS=1
  21945. cat >>confdefs.h <<_ACEOF
  21946. #define HAVE_PRI_AOC_EVENTS 1
  21947. _ACEOF
  21948. fi
  21949. fi
  21950. fi
  21951. if test "x${PBX_PRI_TRANSFER}" != "x1" -a "${USE_PRI_TRANSFER}" != "no"; then
  21952. pbxlibdir=""
  21953. # if --with-PRI_TRANSFER=DIR has been specified, use it.
  21954. if test "x${PRI_TRANSFER_DIR}" != "x"; then
  21955. if test -d ${PRI_TRANSFER_DIR}/lib; then
  21956. pbxlibdir="-L${PRI_TRANSFER_DIR}/lib"
  21957. else
  21958. pbxlibdir="-L${PRI_TRANSFER_DIR}"
  21959. fi
  21960. fi
  21961. pbxfuncname="pri_transfer_enable"
  21962. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  21963. AST_PRI_TRANSFER_FOUND=yes
  21964. else
  21965. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  21966. CFLAGS="${CFLAGS} "
  21967. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  21968. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  21969. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  21970. if eval \${$as_ac_Lib+:} false; then :
  21971. $as_echo_n "(cached) " >&6
  21972. else
  21973. ac_check_lib_save_LIBS=$LIBS
  21974. LIBS="-lpri ${pbxlibdir} $LIBS"
  21975. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21976. /* end confdefs.h. */
  21977. /* Override any GCC internal prototype to avoid an error.
  21978. Use char because int might match the return type of a GCC
  21979. builtin and then its argument prototype would still apply. */
  21980. #ifdef __cplusplus
  21981. extern "C"
  21982. #endif
  21983. char ${pbxfuncname} ();
  21984. int
  21985. main ()
  21986. {
  21987. return ${pbxfuncname} ();
  21988. ;
  21989. return 0;
  21990. }
  21991. _ACEOF
  21992. if ac_fn_c_try_link "$LINENO"; then :
  21993. eval "$as_ac_Lib=yes"
  21994. else
  21995. eval "$as_ac_Lib=no"
  21996. fi
  21997. rm -f core conftest.err conftest.$ac_objext \
  21998. conftest$ac_exeext conftest.$ac_ext
  21999. LIBS=$ac_check_lib_save_LIBS
  22000. fi
  22001. eval ac_res=\$$as_ac_Lib
  22002. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  22003. $as_echo "$ac_res" >&6; }
  22004. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  22005. AST_PRI_TRANSFER_FOUND=yes
  22006. else
  22007. AST_PRI_TRANSFER_FOUND=no
  22008. fi
  22009. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  22010. fi
  22011. # now check for the header.
  22012. if test "${AST_PRI_TRANSFER_FOUND}" = "yes"; then
  22013. PRI_TRANSFER_LIB="${pbxlibdir} -lpri "
  22014. # if --with-PRI_TRANSFER=DIR has been specified, use it.
  22015. if test "x${PRI_TRANSFER_DIR}" != "x"; then
  22016. PRI_TRANSFER_INCLUDE="-I${PRI_TRANSFER_DIR}/include"
  22017. fi
  22018. PRI_TRANSFER_INCLUDE="${PRI_TRANSFER_INCLUDE} "
  22019. if test "xlibpri.h" = "x" ; then # no header, assume found
  22020. PRI_TRANSFER_HEADER_FOUND="1"
  22021. else # check for the header
  22022. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  22023. CPPFLAGS="${CPPFLAGS} ${PRI_TRANSFER_INCLUDE}"
  22024. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  22025. if test "x$ac_cv_header_libpri_h" = xyes; then :
  22026. PRI_TRANSFER_HEADER_FOUND=1
  22027. else
  22028. PRI_TRANSFER_HEADER_FOUND=0
  22029. fi
  22030. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  22031. fi
  22032. if test "x${PRI_TRANSFER_HEADER_FOUND}" = "x0" ; then
  22033. PRI_TRANSFER_LIB=""
  22034. PRI_TRANSFER_INCLUDE=""
  22035. else
  22036. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  22037. PRI_TRANSFER_LIB=""
  22038. fi
  22039. PBX_PRI_TRANSFER=1
  22040. cat >>confdefs.h <<_ACEOF
  22041. #define HAVE_PRI_TRANSFER 1
  22042. _ACEOF
  22043. fi
  22044. fi
  22045. fi
  22046. if test "x${PBX_PRI_CCSS}" != "x1" -a "${USE_PRI_CCSS}" != "no"; then
  22047. pbxlibdir=""
  22048. # if --with-PRI_CCSS=DIR has been specified, use it.
  22049. if test "x${PRI_CCSS_DIR}" != "x"; then
  22050. if test -d ${PRI_CCSS_DIR}/lib; then
  22051. pbxlibdir="-L${PRI_CCSS_DIR}/lib"
  22052. else
  22053. pbxlibdir="-L${PRI_CCSS_DIR}"
  22054. fi
  22055. fi
  22056. pbxfuncname="pri_cc_enable"
  22057. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  22058. AST_PRI_CCSS_FOUND=yes
  22059. else
  22060. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  22061. CFLAGS="${CFLAGS} "
  22062. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  22063. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  22064. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  22065. if eval \${$as_ac_Lib+:} false; then :
  22066. $as_echo_n "(cached) " >&6
  22067. else
  22068. ac_check_lib_save_LIBS=$LIBS
  22069. LIBS="-lpri ${pbxlibdir} $LIBS"
  22070. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22071. /* end confdefs.h. */
  22072. /* Override any GCC internal prototype to avoid an error.
  22073. Use char because int might match the return type of a GCC
  22074. builtin and then its argument prototype would still apply. */
  22075. #ifdef __cplusplus
  22076. extern "C"
  22077. #endif
  22078. char ${pbxfuncname} ();
  22079. int
  22080. main ()
  22081. {
  22082. return ${pbxfuncname} ();
  22083. ;
  22084. return 0;
  22085. }
  22086. _ACEOF
  22087. if ac_fn_c_try_link "$LINENO"; then :
  22088. eval "$as_ac_Lib=yes"
  22089. else
  22090. eval "$as_ac_Lib=no"
  22091. fi
  22092. rm -f core conftest.err conftest.$ac_objext \
  22093. conftest$ac_exeext conftest.$ac_ext
  22094. LIBS=$ac_check_lib_save_LIBS
  22095. fi
  22096. eval ac_res=\$$as_ac_Lib
  22097. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  22098. $as_echo "$ac_res" >&6; }
  22099. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  22100. AST_PRI_CCSS_FOUND=yes
  22101. else
  22102. AST_PRI_CCSS_FOUND=no
  22103. fi
  22104. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  22105. fi
  22106. # now check for the header.
  22107. if test "${AST_PRI_CCSS_FOUND}" = "yes"; then
  22108. PRI_CCSS_LIB="${pbxlibdir} -lpri "
  22109. # if --with-PRI_CCSS=DIR has been specified, use it.
  22110. if test "x${PRI_CCSS_DIR}" != "x"; then
  22111. PRI_CCSS_INCLUDE="-I${PRI_CCSS_DIR}/include"
  22112. fi
  22113. PRI_CCSS_INCLUDE="${PRI_CCSS_INCLUDE} "
  22114. if test "xlibpri.h" = "x" ; then # no header, assume found
  22115. PRI_CCSS_HEADER_FOUND="1"
  22116. else # check for the header
  22117. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  22118. CPPFLAGS="${CPPFLAGS} ${PRI_CCSS_INCLUDE}"
  22119. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  22120. if test "x$ac_cv_header_libpri_h" = xyes; then :
  22121. PRI_CCSS_HEADER_FOUND=1
  22122. else
  22123. PRI_CCSS_HEADER_FOUND=0
  22124. fi
  22125. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  22126. fi
  22127. if test "x${PRI_CCSS_HEADER_FOUND}" = "x0" ; then
  22128. PRI_CCSS_LIB=""
  22129. PRI_CCSS_INCLUDE=""
  22130. else
  22131. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  22132. PRI_CCSS_LIB=""
  22133. fi
  22134. PBX_PRI_CCSS=1
  22135. cat >>confdefs.h <<_ACEOF
  22136. #define HAVE_PRI_CCSS 1
  22137. _ACEOF
  22138. fi
  22139. fi
  22140. fi
  22141. if test "x${PBX_PRI_HANGUP_FIX}" != "x1" -a "${USE_PRI_HANGUP_FIX}" != "no"; then
  22142. pbxlibdir=""
  22143. # if --with-PRI_HANGUP_FIX=DIR has been specified, use it.
  22144. if test "x${PRI_HANGUP_FIX_DIR}" != "x"; then
  22145. if test -d ${PRI_HANGUP_FIX_DIR}/lib; then
  22146. pbxlibdir="-L${PRI_HANGUP_FIX_DIR}/lib"
  22147. else
  22148. pbxlibdir="-L${PRI_HANGUP_FIX_DIR}"
  22149. fi
  22150. fi
  22151. pbxfuncname="pri_hangup_fix_enable"
  22152. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  22153. AST_PRI_HANGUP_FIX_FOUND=yes
  22154. else
  22155. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  22156. CFLAGS="${CFLAGS} "
  22157. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  22158. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  22159. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  22160. if eval \${$as_ac_Lib+:} false; then :
  22161. $as_echo_n "(cached) " >&6
  22162. else
  22163. ac_check_lib_save_LIBS=$LIBS
  22164. LIBS="-lpri ${pbxlibdir} $LIBS"
  22165. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22166. /* end confdefs.h. */
  22167. /* Override any GCC internal prototype to avoid an error.
  22168. Use char because int might match the return type of a GCC
  22169. builtin and then its argument prototype would still apply. */
  22170. #ifdef __cplusplus
  22171. extern "C"
  22172. #endif
  22173. char ${pbxfuncname} ();
  22174. int
  22175. main ()
  22176. {
  22177. return ${pbxfuncname} ();
  22178. ;
  22179. return 0;
  22180. }
  22181. _ACEOF
  22182. if ac_fn_c_try_link "$LINENO"; then :
  22183. eval "$as_ac_Lib=yes"
  22184. else
  22185. eval "$as_ac_Lib=no"
  22186. fi
  22187. rm -f core conftest.err conftest.$ac_objext \
  22188. conftest$ac_exeext conftest.$ac_ext
  22189. LIBS=$ac_check_lib_save_LIBS
  22190. fi
  22191. eval ac_res=\$$as_ac_Lib
  22192. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  22193. $as_echo "$ac_res" >&6; }
  22194. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  22195. AST_PRI_HANGUP_FIX_FOUND=yes
  22196. else
  22197. AST_PRI_HANGUP_FIX_FOUND=no
  22198. fi
  22199. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  22200. fi
  22201. # now check for the header.
  22202. if test "${AST_PRI_HANGUP_FIX_FOUND}" = "yes"; then
  22203. PRI_HANGUP_FIX_LIB="${pbxlibdir} -lpri "
  22204. # if --with-PRI_HANGUP_FIX=DIR has been specified, use it.
  22205. if test "x${PRI_HANGUP_FIX_DIR}" != "x"; then
  22206. PRI_HANGUP_FIX_INCLUDE="-I${PRI_HANGUP_FIX_DIR}/include"
  22207. fi
  22208. PRI_HANGUP_FIX_INCLUDE="${PRI_HANGUP_FIX_INCLUDE} "
  22209. if test "xlibpri.h" = "x" ; then # no header, assume found
  22210. PRI_HANGUP_FIX_HEADER_FOUND="1"
  22211. else # check for the header
  22212. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  22213. CPPFLAGS="${CPPFLAGS} ${PRI_HANGUP_FIX_INCLUDE}"
  22214. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  22215. if test "x$ac_cv_header_libpri_h" = xyes; then :
  22216. PRI_HANGUP_FIX_HEADER_FOUND=1
  22217. else
  22218. PRI_HANGUP_FIX_HEADER_FOUND=0
  22219. fi
  22220. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  22221. fi
  22222. if test "x${PRI_HANGUP_FIX_HEADER_FOUND}" = "x0" ; then
  22223. PRI_HANGUP_FIX_LIB=""
  22224. PRI_HANGUP_FIX_INCLUDE=""
  22225. else
  22226. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  22227. PRI_HANGUP_FIX_LIB=""
  22228. fi
  22229. PBX_PRI_HANGUP_FIX=1
  22230. cat >>confdefs.h <<_ACEOF
  22231. #define HAVE_PRI_HANGUP_FIX 1
  22232. _ACEOF
  22233. fi
  22234. fi
  22235. fi
  22236. if test "x${PBX_PRI_SUBADDR}" != "x1" -a "${USE_PRI_SUBADDR}" != "no"; then
  22237. pbxlibdir=""
  22238. # if --with-PRI_SUBADDR=DIR has been specified, use it.
  22239. if test "x${PRI_SUBADDR_DIR}" != "x"; then
  22240. if test -d ${PRI_SUBADDR_DIR}/lib; then
  22241. pbxlibdir="-L${PRI_SUBADDR_DIR}/lib"
  22242. else
  22243. pbxlibdir="-L${PRI_SUBADDR_DIR}"
  22244. fi
  22245. fi
  22246. pbxfuncname="pri_sr_set_called_subaddress"
  22247. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  22248. AST_PRI_SUBADDR_FOUND=yes
  22249. else
  22250. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  22251. CFLAGS="${CFLAGS} "
  22252. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  22253. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  22254. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  22255. if eval \${$as_ac_Lib+:} false; then :
  22256. $as_echo_n "(cached) " >&6
  22257. else
  22258. ac_check_lib_save_LIBS=$LIBS
  22259. LIBS="-lpri ${pbxlibdir} $LIBS"
  22260. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22261. /* end confdefs.h. */
  22262. /* Override any GCC internal prototype to avoid an error.
  22263. Use char because int might match the return type of a GCC
  22264. builtin and then its argument prototype would still apply. */
  22265. #ifdef __cplusplus
  22266. extern "C"
  22267. #endif
  22268. char ${pbxfuncname} ();
  22269. int
  22270. main ()
  22271. {
  22272. return ${pbxfuncname} ();
  22273. ;
  22274. return 0;
  22275. }
  22276. _ACEOF
  22277. if ac_fn_c_try_link "$LINENO"; then :
  22278. eval "$as_ac_Lib=yes"
  22279. else
  22280. eval "$as_ac_Lib=no"
  22281. fi
  22282. rm -f core conftest.err conftest.$ac_objext \
  22283. conftest$ac_exeext conftest.$ac_ext
  22284. LIBS=$ac_check_lib_save_LIBS
  22285. fi
  22286. eval ac_res=\$$as_ac_Lib
  22287. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  22288. $as_echo "$ac_res" >&6; }
  22289. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  22290. AST_PRI_SUBADDR_FOUND=yes
  22291. else
  22292. AST_PRI_SUBADDR_FOUND=no
  22293. fi
  22294. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  22295. fi
  22296. # now check for the header.
  22297. if test "${AST_PRI_SUBADDR_FOUND}" = "yes"; then
  22298. PRI_SUBADDR_LIB="${pbxlibdir} -lpri "
  22299. # if --with-PRI_SUBADDR=DIR has been specified, use it.
  22300. if test "x${PRI_SUBADDR_DIR}" != "x"; then
  22301. PRI_SUBADDR_INCLUDE="-I${PRI_SUBADDR_DIR}/include"
  22302. fi
  22303. PRI_SUBADDR_INCLUDE="${PRI_SUBADDR_INCLUDE} "
  22304. if test "xlibpri.h" = "x" ; then # no header, assume found
  22305. PRI_SUBADDR_HEADER_FOUND="1"
  22306. else # check for the header
  22307. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  22308. CPPFLAGS="${CPPFLAGS} ${PRI_SUBADDR_INCLUDE}"
  22309. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  22310. if test "x$ac_cv_header_libpri_h" = xyes; then :
  22311. PRI_SUBADDR_HEADER_FOUND=1
  22312. else
  22313. PRI_SUBADDR_HEADER_FOUND=0
  22314. fi
  22315. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  22316. fi
  22317. if test "x${PRI_SUBADDR_HEADER_FOUND}" = "x0" ; then
  22318. PRI_SUBADDR_LIB=""
  22319. PRI_SUBADDR_INCLUDE=""
  22320. else
  22321. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  22322. PRI_SUBADDR_LIB=""
  22323. fi
  22324. PBX_PRI_SUBADDR=1
  22325. cat >>confdefs.h <<_ACEOF
  22326. #define HAVE_PRI_SUBADDR 1
  22327. _ACEOF
  22328. fi
  22329. fi
  22330. fi
  22331. if test "x${PBX_PRI_CALL_HOLD}" != "x1" -a "${USE_PRI_CALL_HOLD}" != "no"; then
  22332. pbxlibdir=""
  22333. # if --with-PRI_CALL_HOLD=DIR has been specified, use it.
  22334. if test "x${PRI_CALL_HOLD_DIR}" != "x"; then
  22335. if test -d ${PRI_CALL_HOLD_DIR}/lib; then
  22336. pbxlibdir="-L${PRI_CALL_HOLD_DIR}/lib"
  22337. else
  22338. pbxlibdir="-L${PRI_CALL_HOLD_DIR}"
  22339. fi
  22340. fi
  22341. pbxfuncname="pri_hold_enable"
  22342. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  22343. AST_PRI_CALL_HOLD_FOUND=yes
  22344. else
  22345. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  22346. CFLAGS="${CFLAGS} "
  22347. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  22348. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  22349. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  22350. if eval \${$as_ac_Lib+:} false; then :
  22351. $as_echo_n "(cached) " >&6
  22352. else
  22353. ac_check_lib_save_LIBS=$LIBS
  22354. LIBS="-lpri ${pbxlibdir} $LIBS"
  22355. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22356. /* end confdefs.h. */
  22357. /* Override any GCC internal prototype to avoid an error.
  22358. Use char because int might match the return type of a GCC
  22359. builtin and then its argument prototype would still apply. */
  22360. #ifdef __cplusplus
  22361. extern "C"
  22362. #endif
  22363. char ${pbxfuncname} ();
  22364. int
  22365. main ()
  22366. {
  22367. return ${pbxfuncname} ();
  22368. ;
  22369. return 0;
  22370. }
  22371. _ACEOF
  22372. if ac_fn_c_try_link "$LINENO"; then :
  22373. eval "$as_ac_Lib=yes"
  22374. else
  22375. eval "$as_ac_Lib=no"
  22376. fi
  22377. rm -f core conftest.err conftest.$ac_objext \
  22378. conftest$ac_exeext conftest.$ac_ext
  22379. LIBS=$ac_check_lib_save_LIBS
  22380. fi
  22381. eval ac_res=\$$as_ac_Lib
  22382. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  22383. $as_echo "$ac_res" >&6; }
  22384. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  22385. AST_PRI_CALL_HOLD_FOUND=yes
  22386. else
  22387. AST_PRI_CALL_HOLD_FOUND=no
  22388. fi
  22389. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  22390. fi
  22391. # now check for the header.
  22392. if test "${AST_PRI_CALL_HOLD_FOUND}" = "yes"; then
  22393. PRI_CALL_HOLD_LIB="${pbxlibdir} -lpri "
  22394. # if --with-PRI_CALL_HOLD=DIR has been specified, use it.
  22395. if test "x${PRI_CALL_HOLD_DIR}" != "x"; then
  22396. PRI_CALL_HOLD_INCLUDE="-I${PRI_CALL_HOLD_DIR}/include"
  22397. fi
  22398. PRI_CALL_HOLD_INCLUDE="${PRI_CALL_HOLD_INCLUDE} "
  22399. if test "xlibpri.h" = "x" ; then # no header, assume found
  22400. PRI_CALL_HOLD_HEADER_FOUND="1"
  22401. else # check for the header
  22402. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  22403. CPPFLAGS="${CPPFLAGS} ${PRI_CALL_HOLD_INCLUDE}"
  22404. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  22405. if test "x$ac_cv_header_libpri_h" = xyes; then :
  22406. PRI_CALL_HOLD_HEADER_FOUND=1
  22407. else
  22408. PRI_CALL_HOLD_HEADER_FOUND=0
  22409. fi
  22410. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  22411. fi
  22412. if test "x${PRI_CALL_HOLD_HEADER_FOUND}" = "x0" ; then
  22413. PRI_CALL_HOLD_LIB=""
  22414. PRI_CALL_HOLD_INCLUDE=""
  22415. else
  22416. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  22417. PRI_CALL_HOLD_LIB=""
  22418. fi
  22419. PBX_PRI_CALL_HOLD=1
  22420. cat >>confdefs.h <<_ACEOF
  22421. #define HAVE_PRI_CALL_HOLD 1
  22422. _ACEOF
  22423. fi
  22424. fi
  22425. fi
  22426. if test "x${PBX_PRI_CALL_REROUTING}" != "x1" -a "${USE_PRI_CALL_REROUTING}" != "no"; then
  22427. pbxlibdir=""
  22428. # if --with-PRI_CALL_REROUTING=DIR has been specified, use it.
  22429. if test "x${PRI_CALL_REROUTING_DIR}" != "x"; then
  22430. if test -d ${PRI_CALL_REROUTING_DIR}/lib; then
  22431. pbxlibdir="-L${PRI_CALL_REROUTING_DIR}/lib"
  22432. else
  22433. pbxlibdir="-L${PRI_CALL_REROUTING_DIR}"
  22434. fi
  22435. fi
  22436. pbxfuncname="pri_reroute_enable"
  22437. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  22438. AST_PRI_CALL_REROUTING_FOUND=yes
  22439. else
  22440. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  22441. CFLAGS="${CFLAGS} "
  22442. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  22443. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  22444. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  22445. if eval \${$as_ac_Lib+:} false; then :
  22446. $as_echo_n "(cached) " >&6
  22447. else
  22448. ac_check_lib_save_LIBS=$LIBS
  22449. LIBS="-lpri ${pbxlibdir} $LIBS"
  22450. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22451. /* end confdefs.h. */
  22452. /* Override any GCC internal prototype to avoid an error.
  22453. Use char because int might match the return type of a GCC
  22454. builtin and then its argument prototype would still apply. */
  22455. #ifdef __cplusplus
  22456. extern "C"
  22457. #endif
  22458. char ${pbxfuncname} ();
  22459. int
  22460. main ()
  22461. {
  22462. return ${pbxfuncname} ();
  22463. ;
  22464. return 0;
  22465. }
  22466. _ACEOF
  22467. if ac_fn_c_try_link "$LINENO"; then :
  22468. eval "$as_ac_Lib=yes"
  22469. else
  22470. eval "$as_ac_Lib=no"
  22471. fi
  22472. rm -f core conftest.err conftest.$ac_objext \
  22473. conftest$ac_exeext conftest.$ac_ext
  22474. LIBS=$ac_check_lib_save_LIBS
  22475. fi
  22476. eval ac_res=\$$as_ac_Lib
  22477. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  22478. $as_echo "$ac_res" >&6; }
  22479. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  22480. AST_PRI_CALL_REROUTING_FOUND=yes
  22481. else
  22482. AST_PRI_CALL_REROUTING_FOUND=no
  22483. fi
  22484. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  22485. fi
  22486. # now check for the header.
  22487. if test "${AST_PRI_CALL_REROUTING_FOUND}" = "yes"; then
  22488. PRI_CALL_REROUTING_LIB="${pbxlibdir} -lpri "
  22489. # if --with-PRI_CALL_REROUTING=DIR has been specified, use it.
  22490. if test "x${PRI_CALL_REROUTING_DIR}" != "x"; then
  22491. PRI_CALL_REROUTING_INCLUDE="-I${PRI_CALL_REROUTING_DIR}/include"
  22492. fi
  22493. PRI_CALL_REROUTING_INCLUDE="${PRI_CALL_REROUTING_INCLUDE} "
  22494. if test "xlibpri.h" = "x" ; then # no header, assume found
  22495. PRI_CALL_REROUTING_HEADER_FOUND="1"
  22496. else # check for the header
  22497. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  22498. CPPFLAGS="${CPPFLAGS} ${PRI_CALL_REROUTING_INCLUDE}"
  22499. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  22500. if test "x$ac_cv_header_libpri_h" = xyes; then :
  22501. PRI_CALL_REROUTING_HEADER_FOUND=1
  22502. else
  22503. PRI_CALL_REROUTING_HEADER_FOUND=0
  22504. fi
  22505. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  22506. fi
  22507. if test "x${PRI_CALL_REROUTING_HEADER_FOUND}" = "x0" ; then
  22508. PRI_CALL_REROUTING_LIB=""
  22509. PRI_CALL_REROUTING_INCLUDE=""
  22510. else
  22511. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  22512. PRI_CALL_REROUTING_LIB=""
  22513. fi
  22514. PBX_PRI_CALL_REROUTING=1
  22515. cat >>confdefs.h <<_ACEOF
  22516. #define HAVE_PRI_CALL_REROUTING 1
  22517. _ACEOF
  22518. fi
  22519. fi
  22520. fi
  22521. if test "x${PBX_PRI_SETUP_KEYPAD}" != "x1" -a "${USE_PRI_SETUP_KEYPAD}" != "no"; then
  22522. pbxlibdir=""
  22523. # if --with-PRI_SETUP_KEYPAD=DIR has been specified, use it.
  22524. if test "x${PRI_SETUP_KEYPAD_DIR}" != "x"; then
  22525. if test -d ${PRI_SETUP_KEYPAD_DIR}/lib; then
  22526. pbxlibdir="-L${PRI_SETUP_KEYPAD_DIR}/lib"
  22527. else
  22528. pbxlibdir="-L${PRI_SETUP_KEYPAD_DIR}"
  22529. fi
  22530. fi
  22531. pbxfuncname="pri_sr_set_keypad_digits"
  22532. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  22533. AST_PRI_SETUP_KEYPAD_FOUND=yes
  22534. else
  22535. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  22536. CFLAGS="${CFLAGS} "
  22537. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  22538. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  22539. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  22540. if eval \${$as_ac_Lib+:} false; then :
  22541. $as_echo_n "(cached) " >&6
  22542. else
  22543. ac_check_lib_save_LIBS=$LIBS
  22544. LIBS="-lpri ${pbxlibdir} $LIBS"
  22545. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22546. /* end confdefs.h. */
  22547. /* Override any GCC internal prototype to avoid an error.
  22548. Use char because int might match the return type of a GCC
  22549. builtin and then its argument prototype would still apply. */
  22550. #ifdef __cplusplus
  22551. extern "C"
  22552. #endif
  22553. char ${pbxfuncname} ();
  22554. int
  22555. main ()
  22556. {
  22557. return ${pbxfuncname} ();
  22558. ;
  22559. return 0;
  22560. }
  22561. _ACEOF
  22562. if ac_fn_c_try_link "$LINENO"; then :
  22563. eval "$as_ac_Lib=yes"
  22564. else
  22565. eval "$as_ac_Lib=no"
  22566. fi
  22567. rm -f core conftest.err conftest.$ac_objext \
  22568. conftest$ac_exeext conftest.$ac_ext
  22569. LIBS=$ac_check_lib_save_LIBS
  22570. fi
  22571. eval ac_res=\$$as_ac_Lib
  22572. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  22573. $as_echo "$ac_res" >&6; }
  22574. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  22575. AST_PRI_SETUP_KEYPAD_FOUND=yes
  22576. else
  22577. AST_PRI_SETUP_KEYPAD_FOUND=no
  22578. fi
  22579. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  22580. fi
  22581. # now check for the header.
  22582. if test "${AST_PRI_SETUP_KEYPAD_FOUND}" = "yes"; then
  22583. PRI_SETUP_KEYPAD_LIB="${pbxlibdir} -lpri "
  22584. # if --with-PRI_SETUP_KEYPAD=DIR has been specified, use it.
  22585. if test "x${PRI_SETUP_KEYPAD_DIR}" != "x"; then
  22586. PRI_SETUP_KEYPAD_INCLUDE="-I${PRI_SETUP_KEYPAD_DIR}/include"
  22587. fi
  22588. PRI_SETUP_KEYPAD_INCLUDE="${PRI_SETUP_KEYPAD_INCLUDE} "
  22589. if test "xlibpri.h" = "x" ; then # no header, assume found
  22590. PRI_SETUP_KEYPAD_HEADER_FOUND="1"
  22591. else # check for the header
  22592. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  22593. CPPFLAGS="${CPPFLAGS} ${PRI_SETUP_KEYPAD_INCLUDE}"
  22594. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  22595. if test "x$ac_cv_header_libpri_h" = xyes; then :
  22596. PRI_SETUP_KEYPAD_HEADER_FOUND=1
  22597. else
  22598. PRI_SETUP_KEYPAD_HEADER_FOUND=0
  22599. fi
  22600. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  22601. fi
  22602. if test "x${PRI_SETUP_KEYPAD_HEADER_FOUND}" = "x0" ; then
  22603. PRI_SETUP_KEYPAD_LIB=""
  22604. PRI_SETUP_KEYPAD_INCLUDE=""
  22605. else
  22606. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  22607. PRI_SETUP_KEYPAD_LIB=""
  22608. fi
  22609. PBX_PRI_SETUP_KEYPAD=1
  22610. cat >>confdefs.h <<_ACEOF
  22611. #define HAVE_PRI_SETUP_KEYPAD 1
  22612. _ACEOF
  22613. fi
  22614. fi
  22615. fi
  22616. # ------------------------------------v
  22617. # TODO: The code can be changed to always include these features now.
  22618. # These features will always be present if pri_connected_line_update is available.
  22619. if test "x${PBX_PRI_PROG_W_CAUSE}" != "x1" -a "${USE_PRI_PROG_W_CAUSE}" != "no"; then
  22620. pbxlibdir=""
  22621. # if --with-PRI_PROG_W_CAUSE=DIR has been specified, use it.
  22622. if test "x${PRI_PROG_W_CAUSE_DIR}" != "x"; then
  22623. if test -d ${PRI_PROG_W_CAUSE_DIR}/lib; then
  22624. pbxlibdir="-L${PRI_PROG_W_CAUSE_DIR}/lib"
  22625. else
  22626. pbxlibdir="-L${PRI_PROG_W_CAUSE_DIR}"
  22627. fi
  22628. fi
  22629. pbxfuncname="pri_progress_with_cause"
  22630. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  22631. AST_PRI_PROG_W_CAUSE_FOUND=yes
  22632. else
  22633. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  22634. CFLAGS="${CFLAGS} "
  22635. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  22636. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  22637. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  22638. if eval \${$as_ac_Lib+:} false; then :
  22639. $as_echo_n "(cached) " >&6
  22640. else
  22641. ac_check_lib_save_LIBS=$LIBS
  22642. LIBS="-lpri ${pbxlibdir} $LIBS"
  22643. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22644. /* end confdefs.h. */
  22645. /* Override any GCC internal prototype to avoid an error.
  22646. Use char because int might match the return type of a GCC
  22647. builtin and then its argument prototype would still apply. */
  22648. #ifdef __cplusplus
  22649. extern "C"
  22650. #endif
  22651. char ${pbxfuncname} ();
  22652. int
  22653. main ()
  22654. {
  22655. return ${pbxfuncname} ();
  22656. ;
  22657. return 0;
  22658. }
  22659. _ACEOF
  22660. if ac_fn_c_try_link "$LINENO"; then :
  22661. eval "$as_ac_Lib=yes"
  22662. else
  22663. eval "$as_ac_Lib=no"
  22664. fi
  22665. rm -f core conftest.err conftest.$ac_objext \
  22666. conftest$ac_exeext conftest.$ac_ext
  22667. LIBS=$ac_check_lib_save_LIBS
  22668. fi
  22669. eval ac_res=\$$as_ac_Lib
  22670. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  22671. $as_echo "$ac_res" >&6; }
  22672. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  22673. AST_PRI_PROG_W_CAUSE_FOUND=yes
  22674. else
  22675. AST_PRI_PROG_W_CAUSE_FOUND=no
  22676. fi
  22677. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  22678. fi
  22679. # now check for the header.
  22680. if test "${AST_PRI_PROG_W_CAUSE_FOUND}" = "yes"; then
  22681. PRI_PROG_W_CAUSE_LIB="${pbxlibdir} -lpri "
  22682. # if --with-PRI_PROG_W_CAUSE=DIR has been specified, use it.
  22683. if test "x${PRI_PROG_W_CAUSE_DIR}" != "x"; then
  22684. PRI_PROG_W_CAUSE_INCLUDE="-I${PRI_PROG_W_CAUSE_DIR}/include"
  22685. fi
  22686. PRI_PROG_W_CAUSE_INCLUDE="${PRI_PROG_W_CAUSE_INCLUDE} "
  22687. if test "xlibpri.h" = "x" ; then # no header, assume found
  22688. PRI_PROG_W_CAUSE_HEADER_FOUND="1"
  22689. else # check for the header
  22690. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  22691. CPPFLAGS="${CPPFLAGS} ${PRI_PROG_W_CAUSE_INCLUDE}"
  22692. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  22693. if test "x$ac_cv_header_libpri_h" = xyes; then :
  22694. PRI_PROG_W_CAUSE_HEADER_FOUND=1
  22695. else
  22696. PRI_PROG_W_CAUSE_HEADER_FOUND=0
  22697. fi
  22698. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  22699. fi
  22700. if test "x${PRI_PROG_W_CAUSE_HEADER_FOUND}" = "x0" ; then
  22701. PRI_PROG_W_CAUSE_LIB=""
  22702. PRI_PROG_W_CAUSE_INCLUDE=""
  22703. else
  22704. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  22705. PRI_PROG_W_CAUSE_LIB=""
  22706. fi
  22707. PBX_PRI_PROG_W_CAUSE=1
  22708. cat >>confdefs.h <<_ACEOF
  22709. #define HAVE_PRI_PROG_W_CAUSE 1
  22710. _ACEOF
  22711. fi
  22712. fi
  22713. fi
  22714. if test "x${PBX_PRI_INBANDDISCONNECT}" != "x1" -a "${USE_PRI_INBANDDISCONNECT}" != "no"; then
  22715. pbxlibdir=""
  22716. # if --with-PRI_INBANDDISCONNECT=DIR has been specified, use it.
  22717. if test "x${PRI_INBANDDISCONNECT_DIR}" != "x"; then
  22718. if test -d ${PRI_INBANDDISCONNECT_DIR}/lib; then
  22719. pbxlibdir="-L${PRI_INBANDDISCONNECT_DIR}/lib"
  22720. else
  22721. pbxlibdir="-L${PRI_INBANDDISCONNECT_DIR}"
  22722. fi
  22723. fi
  22724. pbxfuncname="pri_set_inbanddisconnect"
  22725. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  22726. AST_PRI_INBANDDISCONNECT_FOUND=yes
  22727. else
  22728. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  22729. CFLAGS="${CFLAGS} "
  22730. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  22731. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  22732. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  22733. if eval \${$as_ac_Lib+:} false; then :
  22734. $as_echo_n "(cached) " >&6
  22735. else
  22736. ac_check_lib_save_LIBS=$LIBS
  22737. LIBS="-lpri ${pbxlibdir} $LIBS"
  22738. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22739. /* end confdefs.h. */
  22740. /* Override any GCC internal prototype to avoid an error.
  22741. Use char because int might match the return type of a GCC
  22742. builtin and then its argument prototype would still apply. */
  22743. #ifdef __cplusplus
  22744. extern "C"
  22745. #endif
  22746. char ${pbxfuncname} ();
  22747. int
  22748. main ()
  22749. {
  22750. return ${pbxfuncname} ();
  22751. ;
  22752. return 0;
  22753. }
  22754. _ACEOF
  22755. if ac_fn_c_try_link "$LINENO"; then :
  22756. eval "$as_ac_Lib=yes"
  22757. else
  22758. eval "$as_ac_Lib=no"
  22759. fi
  22760. rm -f core conftest.err conftest.$ac_objext \
  22761. conftest$ac_exeext conftest.$ac_ext
  22762. LIBS=$ac_check_lib_save_LIBS
  22763. fi
  22764. eval ac_res=\$$as_ac_Lib
  22765. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  22766. $as_echo "$ac_res" >&6; }
  22767. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  22768. AST_PRI_INBANDDISCONNECT_FOUND=yes
  22769. else
  22770. AST_PRI_INBANDDISCONNECT_FOUND=no
  22771. fi
  22772. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  22773. fi
  22774. # now check for the header.
  22775. if test "${AST_PRI_INBANDDISCONNECT_FOUND}" = "yes"; then
  22776. PRI_INBANDDISCONNECT_LIB="${pbxlibdir} -lpri "
  22777. # if --with-PRI_INBANDDISCONNECT=DIR has been specified, use it.
  22778. if test "x${PRI_INBANDDISCONNECT_DIR}" != "x"; then
  22779. PRI_INBANDDISCONNECT_INCLUDE="-I${PRI_INBANDDISCONNECT_DIR}/include"
  22780. fi
  22781. PRI_INBANDDISCONNECT_INCLUDE="${PRI_INBANDDISCONNECT_INCLUDE} "
  22782. if test "xlibpri.h" = "x" ; then # no header, assume found
  22783. PRI_INBANDDISCONNECT_HEADER_FOUND="1"
  22784. else # check for the header
  22785. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  22786. CPPFLAGS="${CPPFLAGS} ${PRI_INBANDDISCONNECT_INCLUDE}"
  22787. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  22788. if test "x$ac_cv_header_libpri_h" = xyes; then :
  22789. PRI_INBANDDISCONNECT_HEADER_FOUND=1
  22790. else
  22791. PRI_INBANDDISCONNECT_HEADER_FOUND=0
  22792. fi
  22793. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  22794. fi
  22795. if test "x${PRI_INBANDDISCONNECT_HEADER_FOUND}" = "x0" ; then
  22796. PRI_INBANDDISCONNECT_LIB=""
  22797. PRI_INBANDDISCONNECT_INCLUDE=""
  22798. else
  22799. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  22800. PRI_INBANDDISCONNECT_LIB=""
  22801. fi
  22802. PBX_PRI_INBANDDISCONNECT=1
  22803. cat >>confdefs.h <<_ACEOF
  22804. #define HAVE_PRI_INBANDDISCONNECT 1
  22805. _ACEOF
  22806. fi
  22807. fi
  22808. fi
  22809. if test "x${PBX_PRI_SERVICE_MESSAGES}" != "x1" -a "${USE_PRI_SERVICE_MESSAGES}" != "no"; then
  22810. pbxlibdir=""
  22811. # if --with-PRI_SERVICE_MESSAGES=DIR has been specified, use it.
  22812. if test "x${PRI_SERVICE_MESSAGES_DIR}" != "x"; then
  22813. if test -d ${PRI_SERVICE_MESSAGES_DIR}/lib; then
  22814. pbxlibdir="-L${PRI_SERVICE_MESSAGES_DIR}/lib"
  22815. else
  22816. pbxlibdir="-L${PRI_SERVICE_MESSAGES_DIR}"
  22817. fi
  22818. fi
  22819. pbxfuncname="pri_maintenance_service"
  22820. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  22821. AST_PRI_SERVICE_MESSAGES_FOUND=yes
  22822. else
  22823. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  22824. CFLAGS="${CFLAGS} "
  22825. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  22826. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  22827. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  22828. if eval \${$as_ac_Lib+:} false; then :
  22829. $as_echo_n "(cached) " >&6
  22830. else
  22831. ac_check_lib_save_LIBS=$LIBS
  22832. LIBS="-lpri ${pbxlibdir} $LIBS"
  22833. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22834. /* end confdefs.h. */
  22835. /* Override any GCC internal prototype to avoid an error.
  22836. Use char because int might match the return type of a GCC
  22837. builtin and then its argument prototype would still apply. */
  22838. #ifdef __cplusplus
  22839. extern "C"
  22840. #endif
  22841. char ${pbxfuncname} ();
  22842. int
  22843. main ()
  22844. {
  22845. return ${pbxfuncname} ();
  22846. ;
  22847. return 0;
  22848. }
  22849. _ACEOF
  22850. if ac_fn_c_try_link "$LINENO"; then :
  22851. eval "$as_ac_Lib=yes"
  22852. else
  22853. eval "$as_ac_Lib=no"
  22854. fi
  22855. rm -f core conftest.err conftest.$ac_objext \
  22856. conftest$ac_exeext conftest.$ac_ext
  22857. LIBS=$ac_check_lib_save_LIBS
  22858. fi
  22859. eval ac_res=\$$as_ac_Lib
  22860. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  22861. $as_echo "$ac_res" >&6; }
  22862. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  22863. AST_PRI_SERVICE_MESSAGES_FOUND=yes
  22864. else
  22865. AST_PRI_SERVICE_MESSAGES_FOUND=no
  22866. fi
  22867. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  22868. fi
  22869. # now check for the header.
  22870. if test "${AST_PRI_SERVICE_MESSAGES_FOUND}" = "yes"; then
  22871. PRI_SERVICE_MESSAGES_LIB="${pbxlibdir} -lpri "
  22872. # if --with-PRI_SERVICE_MESSAGES=DIR has been specified, use it.
  22873. if test "x${PRI_SERVICE_MESSAGES_DIR}" != "x"; then
  22874. PRI_SERVICE_MESSAGES_INCLUDE="-I${PRI_SERVICE_MESSAGES_DIR}/include"
  22875. fi
  22876. PRI_SERVICE_MESSAGES_INCLUDE="${PRI_SERVICE_MESSAGES_INCLUDE} "
  22877. if test "xlibpri.h" = "x" ; then # no header, assume found
  22878. PRI_SERVICE_MESSAGES_HEADER_FOUND="1"
  22879. else # check for the header
  22880. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  22881. CPPFLAGS="${CPPFLAGS} ${PRI_SERVICE_MESSAGES_INCLUDE}"
  22882. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  22883. if test "x$ac_cv_header_libpri_h" = xyes; then :
  22884. PRI_SERVICE_MESSAGES_HEADER_FOUND=1
  22885. else
  22886. PRI_SERVICE_MESSAGES_HEADER_FOUND=0
  22887. fi
  22888. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  22889. fi
  22890. if test "x${PRI_SERVICE_MESSAGES_HEADER_FOUND}" = "x0" ; then
  22891. PRI_SERVICE_MESSAGES_LIB=""
  22892. PRI_SERVICE_MESSAGES_INCLUDE=""
  22893. else
  22894. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  22895. PRI_SERVICE_MESSAGES_LIB=""
  22896. fi
  22897. PBX_PRI_SERVICE_MESSAGES=1
  22898. cat >>confdefs.h <<_ACEOF
  22899. #define HAVE_PRI_SERVICE_MESSAGES 1
  22900. _ACEOF
  22901. fi
  22902. fi
  22903. fi
  22904. if test "x${PBX_PRI_REVERSE_CHARGE}" != "x1" -a "${USE_PRI_REVERSE_CHARGE}" != "no"; then
  22905. pbxlibdir=""
  22906. # if --with-PRI_REVERSE_CHARGE=DIR has been specified, use it.
  22907. if test "x${PRI_REVERSE_CHARGE_DIR}" != "x"; then
  22908. if test -d ${PRI_REVERSE_CHARGE_DIR}/lib; then
  22909. pbxlibdir="-L${PRI_REVERSE_CHARGE_DIR}/lib"
  22910. else
  22911. pbxlibdir="-L${PRI_REVERSE_CHARGE_DIR}"
  22912. fi
  22913. fi
  22914. pbxfuncname="pri_sr_set_reversecharge"
  22915. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  22916. AST_PRI_REVERSE_CHARGE_FOUND=yes
  22917. else
  22918. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  22919. CFLAGS="${CFLAGS} "
  22920. as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
  22921. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
  22922. $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
  22923. if eval \${$as_ac_Lib+:} false; then :
  22924. $as_echo_n "(cached) " >&6
  22925. else
  22926. ac_check_lib_save_LIBS=$LIBS
  22927. LIBS="-lpri ${pbxlibdir} $LIBS"
  22928. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22929. /* end confdefs.h. */
  22930. /* Override any GCC internal prototype to avoid an error.
  22931. Use char because int might match the return type of a GCC
  22932. builtin and then its argument prototype would still apply. */
  22933. #ifdef __cplusplus
  22934. extern "C"
  22935. #endif
  22936. char ${pbxfuncname} ();
  22937. int
  22938. main ()
  22939. {
  22940. return ${pbxfuncname} ();
  22941. ;
  22942. return 0;
  22943. }
  22944. _ACEOF
  22945. if ac_fn_c_try_link "$LINENO"; then :
  22946. eval "$as_ac_Lib=yes"
  22947. else
  22948. eval "$as_ac_Lib=no"
  22949. fi
  22950. rm -f core conftest.err conftest.$ac_objext \
  22951. conftest$ac_exeext conftest.$ac_ext
  22952. LIBS=$ac_check_lib_save_LIBS
  22953. fi
  22954. eval ac_res=\$$as_ac_Lib
  22955. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  22956. $as_echo "$ac_res" >&6; }
  22957. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  22958. AST_PRI_REVERSE_CHARGE_FOUND=yes
  22959. else
  22960. AST_PRI_REVERSE_CHARGE_FOUND=no
  22961. fi
  22962. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  22963. fi
  22964. # now check for the header.
  22965. if test "${AST_PRI_REVERSE_CHARGE_FOUND}" = "yes"; then
  22966. PRI_REVERSE_CHARGE_LIB="${pbxlibdir} -lpri "
  22967. # if --with-PRI_REVERSE_CHARGE=DIR has been specified, use it.
  22968. if test "x${PRI_REVERSE_CHARGE_DIR}" != "x"; then
  22969. PRI_REVERSE_CHARGE_INCLUDE="-I${PRI_REVERSE_CHARGE_DIR}/include"
  22970. fi
  22971. PRI_REVERSE_CHARGE_INCLUDE="${PRI_REVERSE_CHARGE_INCLUDE} "
  22972. if test "xlibpri.h" = "x" ; then # no header, assume found
  22973. PRI_REVERSE_CHARGE_HEADER_FOUND="1"
  22974. else # check for the header
  22975. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  22976. CPPFLAGS="${CPPFLAGS} ${PRI_REVERSE_CHARGE_INCLUDE}"
  22977. ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
  22978. if test "x$ac_cv_header_libpri_h" = xyes; then :
  22979. PRI_REVERSE_CHARGE_HEADER_FOUND=1
  22980. else
  22981. PRI_REVERSE_CHARGE_HEADER_FOUND=0
  22982. fi
  22983. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  22984. fi
  22985. if test "x${PRI_REVERSE_CHARGE_HEADER_FOUND}" = "x0" ; then
  22986. PRI_REVERSE_CHARGE_LIB=""
  22987. PRI_REVERSE_CHARGE_INCLUDE=""
  22988. else
  22989. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  22990. PRI_REVERSE_CHARGE_LIB=""
  22991. fi
  22992. PBX_PRI_REVERSE_CHARGE=1
  22993. cat >>confdefs.h <<_ACEOF
  22994. #define HAVE_PRI_REVERSE_CHARGE 1
  22995. _ACEOF
  22996. fi
  22997. fi
  22998. fi
  22999. # ------------------------------------^
  23000. if test "x${PBX_RESAMPLE}" != "x1" -a "${USE_RESAMPLE}" != "no"; then
  23001. pbxlibdir=""
  23002. # if --with-RESAMPLE=DIR has been specified, use it.
  23003. if test "x${RESAMPLE_DIR}" != "x"; then
  23004. if test -d ${RESAMPLE_DIR}/lib; then
  23005. pbxlibdir="-L${RESAMPLE_DIR}/lib"
  23006. else
  23007. pbxlibdir="-L${RESAMPLE_DIR}"
  23008. fi
  23009. fi
  23010. pbxfuncname="resample_open"
  23011. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  23012. AST_RESAMPLE_FOUND=yes
  23013. else
  23014. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  23015. CFLAGS="${CFLAGS} "
  23016. as_ac_Lib=`$as_echo "ac_cv_lib_resample_${pbxfuncname}" | $as_tr_sh`
  23017. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lresample" >&5
  23018. $as_echo_n "checking for ${pbxfuncname} in -lresample... " >&6; }
  23019. if eval \${$as_ac_Lib+:} false; then :
  23020. $as_echo_n "(cached) " >&6
  23021. else
  23022. ac_check_lib_save_LIBS=$LIBS
  23023. LIBS="-lresample ${pbxlibdir} -lm $LIBS"
  23024. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23025. /* end confdefs.h. */
  23026. /* Override any GCC internal prototype to avoid an error.
  23027. Use char because int might match the return type of a GCC
  23028. builtin and then its argument prototype would still apply. */
  23029. #ifdef __cplusplus
  23030. extern "C"
  23031. #endif
  23032. char ${pbxfuncname} ();
  23033. int
  23034. main ()
  23035. {
  23036. return ${pbxfuncname} ();
  23037. ;
  23038. return 0;
  23039. }
  23040. _ACEOF
  23041. if ac_fn_c_try_link "$LINENO"; then :
  23042. eval "$as_ac_Lib=yes"
  23043. else
  23044. eval "$as_ac_Lib=no"
  23045. fi
  23046. rm -f core conftest.err conftest.$ac_objext \
  23047. conftest$ac_exeext conftest.$ac_ext
  23048. LIBS=$ac_check_lib_save_LIBS
  23049. fi
  23050. eval ac_res=\$$as_ac_Lib
  23051. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  23052. $as_echo "$ac_res" >&6; }
  23053. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  23054. AST_RESAMPLE_FOUND=yes
  23055. else
  23056. AST_RESAMPLE_FOUND=no
  23057. fi
  23058. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  23059. fi
  23060. # now check for the header.
  23061. if test "${AST_RESAMPLE_FOUND}" = "yes"; then
  23062. RESAMPLE_LIB="${pbxlibdir} -lresample -lm"
  23063. # if --with-RESAMPLE=DIR has been specified, use it.
  23064. if test "x${RESAMPLE_DIR}" != "x"; then
  23065. RESAMPLE_INCLUDE="-I${RESAMPLE_DIR}/include"
  23066. fi
  23067. RESAMPLE_INCLUDE="${RESAMPLE_INCLUDE} "
  23068. if test "xlibresample.h" = "x" ; then # no header, assume found
  23069. RESAMPLE_HEADER_FOUND="1"
  23070. else # check for the header
  23071. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  23072. CPPFLAGS="${CPPFLAGS} ${RESAMPLE_INCLUDE}"
  23073. ac_fn_c_check_header_mongrel "$LINENO" "libresample.h" "ac_cv_header_libresample_h" "$ac_includes_default"
  23074. if test "x$ac_cv_header_libresample_h" = xyes; then :
  23075. RESAMPLE_HEADER_FOUND=1
  23076. else
  23077. RESAMPLE_HEADER_FOUND=0
  23078. fi
  23079. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  23080. fi
  23081. if test "x${RESAMPLE_HEADER_FOUND}" = "x0" ; then
  23082. RESAMPLE_LIB=""
  23083. RESAMPLE_INCLUDE=""
  23084. else
  23085. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  23086. RESAMPLE_LIB=""
  23087. fi
  23088. PBX_RESAMPLE=1
  23089. cat >>confdefs.h <<_ACEOF
  23090. #define HAVE_RESAMPLE 1
  23091. _ACEOF
  23092. fi
  23093. fi
  23094. fi
  23095. if test "x${PBX_SPANDSP}" != "x1" -a "${USE_SPANDSP}" != "no"; then
  23096. if test "xminimum version of SpanDSP" != "x"; then
  23097. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for minimum version of SpanDSP" >&5
  23098. $as_echo_n "checking for minimum version of SpanDSP... " >&6; }
  23099. else
  23100. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"
  23101. #if SPANDSP_RELEASE_DATE < 20080516
  23102. #error \"spandsp 0.0.5 or greater is required\"
  23103. #endif
  23104. \" compiles using spandsp/version.h" >&5
  23105. $as_echo_n "checking if \"
  23106. #if SPANDSP_RELEASE_DATE < 20080516
  23107. #error \"spandsp 0.0.5 or greater is required\"
  23108. #endif
  23109. \" compiles using spandsp/version.h... " >&6; }
  23110. fi
  23111. saved_cppflags="${CPPFLAGS}"
  23112. if test "x${SPANDSP_DIR}" != "x"; then
  23113. SPANDSP_INCLUDE="-I${SPANDSP_DIR}/include"
  23114. fi
  23115. CPPFLAGS="${CPPFLAGS} ${SPANDSP_INCLUDE}"
  23116. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23117. /* end confdefs.h. */
  23118. #include <spandsp/version.h>
  23119. int
  23120. main ()
  23121. {
  23122. #if SPANDSP_RELEASE_DATE < 20080516
  23123. #error "spandsp 0.0.5 or greater is required"
  23124. #endif
  23125. ;
  23126. ;
  23127. return 0;
  23128. }
  23129. _ACEOF
  23130. if ac_fn_c_try_compile "$LINENO"; then :
  23131. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  23132. $as_echo "yes" >&6; }
  23133. PBX_SPANDSP=1
  23134. $as_echo "#define HAVE_SPANDSP 1" >>confdefs.h
  23135. else
  23136. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  23137. $as_echo "no" >&6; }
  23138. fi
  23139. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  23140. CPPFLAGS="${saved_cppflags}"
  23141. fi
  23142. if test "x${PBX_SPANDSP}" = "x1" ; then
  23143. # We found the correct version in the header, now let's make sure it links
  23144. # properly, and that libtiff is available
  23145. PBX_SPANDSP=0
  23146. if test "x${PBX_SPANDSP}" != "x1" -a "${USE_SPANDSP}" != "no"; then
  23147. pbxlibdir=""
  23148. # if --with-SPANDSP=DIR has been specified, use it.
  23149. if test "x${SPANDSP_DIR}" != "x"; then
  23150. if test -d ${SPANDSP_DIR}/lib; then
  23151. pbxlibdir="-L${SPANDSP_DIR}/lib"
  23152. else
  23153. pbxlibdir="-L${SPANDSP_DIR}"
  23154. fi
  23155. fi
  23156. pbxfuncname="span_set_message_handler"
  23157. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  23158. AST_SPANDSP_FOUND=yes
  23159. else
  23160. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  23161. CFLAGS="${CFLAGS} "
  23162. as_ac_Lib=`$as_echo "ac_cv_lib_spandsp_${pbxfuncname}" | $as_tr_sh`
  23163. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lspandsp" >&5
  23164. $as_echo_n "checking for ${pbxfuncname} in -lspandsp... " >&6; }
  23165. if eval \${$as_ac_Lib+:} false; then :
  23166. $as_echo_n "(cached) " >&6
  23167. else
  23168. ac_check_lib_save_LIBS=$LIBS
  23169. LIBS="-lspandsp ${pbxlibdir} -ltiff $LIBS"
  23170. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23171. /* end confdefs.h. */
  23172. /* Override any GCC internal prototype to avoid an error.
  23173. Use char because int might match the return type of a GCC
  23174. builtin and then its argument prototype would still apply. */
  23175. #ifdef __cplusplus
  23176. extern "C"
  23177. #endif
  23178. char ${pbxfuncname} ();
  23179. int
  23180. main ()
  23181. {
  23182. return ${pbxfuncname} ();
  23183. ;
  23184. return 0;
  23185. }
  23186. _ACEOF
  23187. if ac_fn_c_try_link "$LINENO"; then :
  23188. eval "$as_ac_Lib=yes"
  23189. else
  23190. eval "$as_ac_Lib=no"
  23191. fi
  23192. rm -f core conftest.err conftest.$ac_objext \
  23193. conftest$ac_exeext conftest.$ac_ext
  23194. LIBS=$ac_check_lib_save_LIBS
  23195. fi
  23196. eval ac_res=\$$as_ac_Lib
  23197. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  23198. $as_echo "$ac_res" >&6; }
  23199. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  23200. AST_SPANDSP_FOUND=yes
  23201. else
  23202. AST_SPANDSP_FOUND=no
  23203. fi
  23204. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  23205. fi
  23206. # now check for the header.
  23207. if test "${AST_SPANDSP_FOUND}" = "yes"; then
  23208. SPANDSP_LIB="${pbxlibdir} -lspandsp -ltiff"
  23209. # if --with-SPANDSP=DIR has been specified, use it.
  23210. if test "x${SPANDSP_DIR}" != "x"; then
  23211. SPANDSP_INCLUDE="-I${SPANDSP_DIR}/include"
  23212. fi
  23213. SPANDSP_INCLUDE="${SPANDSP_INCLUDE} "
  23214. if test "xspandsp.h" = "x" ; then # no header, assume found
  23215. SPANDSP_HEADER_FOUND="1"
  23216. else # check for the header
  23217. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  23218. CPPFLAGS="${CPPFLAGS} ${SPANDSP_INCLUDE}"
  23219. ac_fn_c_check_header_mongrel "$LINENO" "spandsp.h" "ac_cv_header_spandsp_h" "$ac_includes_default"
  23220. if test "x$ac_cv_header_spandsp_h" = xyes; then :
  23221. SPANDSP_HEADER_FOUND=1
  23222. else
  23223. SPANDSP_HEADER_FOUND=0
  23224. fi
  23225. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  23226. fi
  23227. if test "x${SPANDSP_HEADER_FOUND}" = "x0" ; then
  23228. SPANDSP_LIB=""
  23229. SPANDSP_INCLUDE=""
  23230. else
  23231. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  23232. SPANDSP_LIB=""
  23233. fi
  23234. PBX_SPANDSP=1
  23235. cat >>confdefs.h <<_ACEOF
  23236. #define HAVE_SPANDSP 1
  23237. _ACEOF
  23238. fi
  23239. fi
  23240. fi
  23241. fi
  23242. if test "x${PBX_SPANDSP}" = "x1" ; then
  23243. # We also need t38_terminal_init()
  23244. PBX_SPANDSP=0
  23245. if test "x${PBX_SPANDSP}" != "x1" -a "${USE_SPANDSP}" != "no"; then
  23246. pbxlibdir=""
  23247. # if --with-SPANDSP=DIR has been specified, use it.
  23248. if test "x${SPANDSP_DIR}" != "x"; then
  23249. if test -d ${SPANDSP_DIR}/lib; then
  23250. pbxlibdir="-L${SPANDSP_DIR}/lib"
  23251. else
  23252. pbxlibdir="-L${SPANDSP_DIR}"
  23253. fi
  23254. fi
  23255. pbxfuncname="t38_terminal_init"
  23256. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  23257. AST_SPANDSP_FOUND=yes
  23258. else
  23259. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  23260. CFLAGS="${CFLAGS} "
  23261. as_ac_Lib=`$as_echo "ac_cv_lib_spandsp_${pbxfuncname}" | $as_tr_sh`
  23262. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lspandsp" >&5
  23263. $as_echo_n "checking for ${pbxfuncname} in -lspandsp... " >&6; }
  23264. if eval \${$as_ac_Lib+:} false; then :
  23265. $as_echo_n "(cached) " >&6
  23266. else
  23267. ac_check_lib_save_LIBS=$LIBS
  23268. LIBS="-lspandsp ${pbxlibdir} -ltiff $LIBS"
  23269. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23270. /* end confdefs.h. */
  23271. /* Override any GCC internal prototype to avoid an error.
  23272. Use char because int might match the return type of a GCC
  23273. builtin and then its argument prototype would still apply. */
  23274. #ifdef __cplusplus
  23275. extern "C"
  23276. #endif
  23277. char ${pbxfuncname} ();
  23278. int
  23279. main ()
  23280. {
  23281. return ${pbxfuncname} ();
  23282. ;
  23283. return 0;
  23284. }
  23285. _ACEOF
  23286. if ac_fn_c_try_link "$LINENO"; then :
  23287. eval "$as_ac_Lib=yes"
  23288. else
  23289. eval "$as_ac_Lib=no"
  23290. fi
  23291. rm -f core conftest.err conftest.$ac_objext \
  23292. conftest$ac_exeext conftest.$ac_ext
  23293. LIBS=$ac_check_lib_save_LIBS
  23294. fi
  23295. eval ac_res=\$$as_ac_Lib
  23296. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  23297. $as_echo "$ac_res" >&6; }
  23298. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  23299. AST_SPANDSP_FOUND=yes
  23300. else
  23301. AST_SPANDSP_FOUND=no
  23302. fi
  23303. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  23304. fi
  23305. # now check for the header.
  23306. if test "${AST_SPANDSP_FOUND}" = "yes"; then
  23307. SPANDSP_LIB="${pbxlibdir} -lspandsp -ltiff"
  23308. # if --with-SPANDSP=DIR has been specified, use it.
  23309. if test "x${SPANDSP_DIR}" != "x"; then
  23310. SPANDSP_INCLUDE="-I${SPANDSP_DIR}/include"
  23311. fi
  23312. SPANDSP_INCLUDE="${SPANDSP_INCLUDE} "
  23313. if test "xspandsp.h" = "x" ; then # no header, assume found
  23314. SPANDSP_HEADER_FOUND="1"
  23315. else # check for the header
  23316. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  23317. CPPFLAGS="${CPPFLAGS} ${SPANDSP_INCLUDE}"
  23318. ac_fn_c_check_header_mongrel "$LINENO" "spandsp.h" "ac_cv_header_spandsp_h" "$ac_includes_default"
  23319. if test "x$ac_cv_header_spandsp_h" = xyes; then :
  23320. SPANDSP_HEADER_FOUND=1
  23321. else
  23322. SPANDSP_HEADER_FOUND=0
  23323. fi
  23324. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  23325. fi
  23326. if test "x${SPANDSP_HEADER_FOUND}" = "x0" ; then
  23327. SPANDSP_LIB=""
  23328. SPANDSP_INCLUDE=""
  23329. else
  23330. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  23331. SPANDSP_LIB=""
  23332. fi
  23333. PBX_SPANDSP=1
  23334. cat >>confdefs.h <<_ACEOF
  23335. #define HAVE_SPANDSP 1
  23336. _ACEOF
  23337. fi
  23338. fi
  23339. fi
  23340. fi
  23341. # Check for libss7 v2.0 branch compatible version.
  23342. if test "x${PBX_SS7}" != "x1" -a "${USE_SS7}" != "no"; then
  23343. pbxlibdir=""
  23344. # if --with-SS7=DIR has been specified, use it.
  23345. if test "x${SS7_DIR}" != "x"; then
  23346. if test -d ${SS7_DIR}/lib; then
  23347. pbxlibdir="-L${SS7_DIR}/lib"
  23348. else
  23349. pbxlibdir="-L${SS7_DIR}"
  23350. fi
  23351. fi
  23352. pbxfuncname="ss7_set_isup_timer"
  23353. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  23354. AST_SS7_FOUND=yes
  23355. else
  23356. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  23357. CFLAGS="${CFLAGS} "
  23358. as_ac_Lib=`$as_echo "ac_cv_lib_ss7_${pbxfuncname}" | $as_tr_sh`
  23359. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lss7" >&5
  23360. $as_echo_n "checking for ${pbxfuncname} in -lss7... " >&6; }
  23361. if eval \${$as_ac_Lib+:} false; then :
  23362. $as_echo_n "(cached) " >&6
  23363. else
  23364. ac_check_lib_save_LIBS=$LIBS
  23365. LIBS="-lss7 ${pbxlibdir} $LIBS"
  23366. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23367. /* end confdefs.h. */
  23368. /* Override any GCC internal prototype to avoid an error.
  23369. Use char because int might match the return type of a GCC
  23370. builtin and then its argument prototype would still apply. */
  23371. #ifdef __cplusplus
  23372. extern "C"
  23373. #endif
  23374. char ${pbxfuncname} ();
  23375. int
  23376. main ()
  23377. {
  23378. return ${pbxfuncname} ();
  23379. ;
  23380. return 0;
  23381. }
  23382. _ACEOF
  23383. if ac_fn_c_try_link "$LINENO"; then :
  23384. eval "$as_ac_Lib=yes"
  23385. else
  23386. eval "$as_ac_Lib=no"
  23387. fi
  23388. rm -f core conftest.err conftest.$ac_objext \
  23389. conftest$ac_exeext conftest.$ac_ext
  23390. LIBS=$ac_check_lib_save_LIBS
  23391. fi
  23392. eval ac_res=\$$as_ac_Lib
  23393. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  23394. $as_echo "$ac_res" >&6; }
  23395. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  23396. AST_SS7_FOUND=yes
  23397. else
  23398. AST_SS7_FOUND=no
  23399. fi
  23400. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  23401. fi
  23402. # now check for the header.
  23403. if test "${AST_SS7_FOUND}" = "yes"; then
  23404. SS7_LIB="${pbxlibdir} -lss7 "
  23405. # if --with-SS7=DIR has been specified, use it.
  23406. if test "x${SS7_DIR}" != "x"; then
  23407. SS7_INCLUDE="-I${SS7_DIR}/include"
  23408. fi
  23409. SS7_INCLUDE="${SS7_INCLUDE} "
  23410. if test "xlibss7.h" = "x" ; then # no header, assume found
  23411. SS7_HEADER_FOUND="1"
  23412. else # check for the header
  23413. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  23414. CPPFLAGS="${CPPFLAGS} ${SS7_INCLUDE}"
  23415. ac_fn_c_check_header_mongrel "$LINENO" "libss7.h" "ac_cv_header_libss7_h" "$ac_includes_default"
  23416. if test "x$ac_cv_header_libss7_h" = xyes; then :
  23417. SS7_HEADER_FOUND=1
  23418. else
  23419. SS7_HEADER_FOUND=0
  23420. fi
  23421. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  23422. fi
  23423. if test "x${SS7_HEADER_FOUND}" = "x0" ; then
  23424. SS7_LIB=""
  23425. SS7_INCLUDE=""
  23426. else
  23427. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  23428. SS7_LIB=""
  23429. fi
  23430. PBX_SS7=1
  23431. cat >>confdefs.h <<_ACEOF
  23432. #define HAVE_SS7 1
  23433. _ACEOF
  23434. fi
  23435. fi
  23436. fi
  23437. if test "x${PBX_OPENR2}" != "x1" -a "${USE_OPENR2}" != "no"; then
  23438. pbxlibdir=""
  23439. # if --with-OPENR2=DIR has been specified, use it.
  23440. if test "x${OPENR2_DIR}" != "x"; then
  23441. if test -d ${OPENR2_DIR}/lib; then
  23442. pbxlibdir="-L${OPENR2_DIR}/lib"
  23443. else
  23444. pbxlibdir="-L${OPENR2_DIR}"
  23445. fi
  23446. fi
  23447. pbxfuncname="openr2_chan_new"
  23448. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  23449. AST_OPENR2_FOUND=yes
  23450. else
  23451. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  23452. CFLAGS="${CFLAGS} "
  23453. as_ac_Lib=`$as_echo "ac_cv_lib_openr2_${pbxfuncname}" | $as_tr_sh`
  23454. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lopenr2" >&5
  23455. $as_echo_n "checking for ${pbxfuncname} in -lopenr2... " >&6; }
  23456. if eval \${$as_ac_Lib+:} false; then :
  23457. $as_echo_n "(cached) " >&6
  23458. else
  23459. ac_check_lib_save_LIBS=$LIBS
  23460. LIBS="-lopenr2 ${pbxlibdir} $LIBS"
  23461. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23462. /* end confdefs.h. */
  23463. /* Override any GCC internal prototype to avoid an error.
  23464. Use char because int might match the return type of a GCC
  23465. builtin and then its argument prototype would still apply. */
  23466. #ifdef __cplusplus
  23467. extern "C"
  23468. #endif
  23469. char ${pbxfuncname} ();
  23470. int
  23471. main ()
  23472. {
  23473. return ${pbxfuncname} ();
  23474. ;
  23475. return 0;
  23476. }
  23477. _ACEOF
  23478. if ac_fn_c_try_link "$LINENO"; then :
  23479. eval "$as_ac_Lib=yes"
  23480. else
  23481. eval "$as_ac_Lib=no"
  23482. fi
  23483. rm -f core conftest.err conftest.$ac_objext \
  23484. conftest$ac_exeext conftest.$ac_ext
  23485. LIBS=$ac_check_lib_save_LIBS
  23486. fi
  23487. eval ac_res=\$$as_ac_Lib
  23488. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  23489. $as_echo "$ac_res" >&6; }
  23490. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  23491. AST_OPENR2_FOUND=yes
  23492. else
  23493. AST_OPENR2_FOUND=no
  23494. fi
  23495. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  23496. fi
  23497. # now check for the header.
  23498. if test "${AST_OPENR2_FOUND}" = "yes"; then
  23499. OPENR2_LIB="${pbxlibdir} -lopenr2 "
  23500. # if --with-OPENR2=DIR has been specified, use it.
  23501. if test "x${OPENR2_DIR}" != "x"; then
  23502. OPENR2_INCLUDE="-I${OPENR2_DIR}/include"
  23503. fi
  23504. OPENR2_INCLUDE="${OPENR2_INCLUDE} "
  23505. if test "xopenr2.h" = "x" ; then # no header, assume found
  23506. OPENR2_HEADER_FOUND="1"
  23507. else # check for the header
  23508. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  23509. CPPFLAGS="${CPPFLAGS} ${OPENR2_INCLUDE}"
  23510. ac_fn_c_check_header_mongrel "$LINENO" "openr2.h" "ac_cv_header_openr2_h" "$ac_includes_default"
  23511. if test "x$ac_cv_header_openr2_h" = xyes; then :
  23512. OPENR2_HEADER_FOUND=1
  23513. else
  23514. OPENR2_HEADER_FOUND=0
  23515. fi
  23516. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  23517. fi
  23518. if test "x${OPENR2_HEADER_FOUND}" = "x0" ; then
  23519. OPENR2_LIB=""
  23520. OPENR2_INCLUDE=""
  23521. else
  23522. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  23523. OPENR2_LIB=""
  23524. fi
  23525. PBX_OPENR2=1
  23526. cat >>confdefs.h <<_ACEOF
  23527. #define HAVE_OPENR2 1
  23528. _ACEOF
  23529. fi
  23530. fi
  23531. fi
  23532. if test "x${PBX_OPUS}" != "x1" -a "${USE_OPUS}" != "no"; then
  23533. pbxlibdir=""
  23534. # if --with-OPUS=DIR has been specified, use it.
  23535. if test "x${OPUS_DIR}" != "x"; then
  23536. if test -d ${OPUS_DIR}/lib; then
  23537. pbxlibdir="-L${OPUS_DIR}/lib"
  23538. else
  23539. pbxlibdir="-L${OPUS_DIR}"
  23540. fi
  23541. fi
  23542. pbxfuncname="opus_encoder_create"
  23543. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  23544. AST_OPUS_FOUND=yes
  23545. else
  23546. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  23547. CFLAGS="${CFLAGS} "
  23548. as_ac_Lib=`$as_echo "ac_cv_lib_opus_${pbxfuncname}" | $as_tr_sh`
  23549. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lopus" >&5
  23550. $as_echo_n "checking for ${pbxfuncname} in -lopus... " >&6; }
  23551. if eval \${$as_ac_Lib+:} false; then :
  23552. $as_echo_n "(cached) " >&6
  23553. else
  23554. ac_check_lib_save_LIBS=$LIBS
  23555. LIBS="-lopus ${pbxlibdir} $LIBS"
  23556. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23557. /* end confdefs.h. */
  23558. /* Override any GCC internal prototype to avoid an error.
  23559. Use char because int might match the return type of a GCC
  23560. builtin and then its argument prototype would still apply. */
  23561. #ifdef __cplusplus
  23562. extern "C"
  23563. #endif
  23564. char ${pbxfuncname} ();
  23565. int
  23566. main ()
  23567. {
  23568. return ${pbxfuncname} ();
  23569. ;
  23570. return 0;
  23571. }
  23572. _ACEOF
  23573. if ac_fn_c_try_link "$LINENO"; then :
  23574. eval "$as_ac_Lib=yes"
  23575. else
  23576. eval "$as_ac_Lib=no"
  23577. fi
  23578. rm -f core conftest.err conftest.$ac_objext \
  23579. conftest$ac_exeext conftest.$ac_ext
  23580. LIBS=$ac_check_lib_save_LIBS
  23581. fi
  23582. eval ac_res=\$$as_ac_Lib
  23583. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  23584. $as_echo "$ac_res" >&6; }
  23585. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  23586. AST_OPUS_FOUND=yes
  23587. else
  23588. AST_OPUS_FOUND=no
  23589. fi
  23590. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  23591. fi
  23592. # now check for the header.
  23593. if test "${AST_OPUS_FOUND}" = "yes"; then
  23594. OPUS_LIB="${pbxlibdir} -lopus "
  23595. # if --with-OPUS=DIR has been specified, use it.
  23596. if test "x${OPUS_DIR}" != "x"; then
  23597. OPUS_INCLUDE="-I${OPUS_DIR}/include"
  23598. fi
  23599. OPUS_INCLUDE="${OPUS_INCLUDE} "
  23600. if test "xopus/opus.h" = "x" ; then # no header, assume found
  23601. OPUS_HEADER_FOUND="1"
  23602. else # check for the header
  23603. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  23604. CPPFLAGS="${CPPFLAGS} ${OPUS_INCLUDE}"
  23605. ac_fn_c_check_header_mongrel "$LINENO" "opus/opus.h" "ac_cv_header_opus_opus_h" "$ac_includes_default"
  23606. if test "x$ac_cv_header_opus_opus_h" = xyes; then :
  23607. OPUS_HEADER_FOUND=1
  23608. else
  23609. OPUS_HEADER_FOUND=0
  23610. fi
  23611. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  23612. fi
  23613. if test "x${OPUS_HEADER_FOUND}" = "x0" ; then
  23614. OPUS_LIB=""
  23615. OPUS_INCLUDE=""
  23616. else
  23617. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  23618. OPUS_LIB=""
  23619. fi
  23620. PBX_OPUS=1
  23621. cat >>confdefs.h <<_ACEOF
  23622. #define HAVE_OPUS 1
  23623. _ACEOF
  23624. fi
  23625. fi
  23626. fi
  23627. if test "${USE_PWLIB}" != "no"; then
  23628. if test -n "${PWLIB_DIR}"; then
  23629. PWLIBDIR="${PWLIB_DIR}"
  23630. fi
  23631. PWLIB_INCDIR=
  23632. PWLIB_LIBDIR=
  23633. ac_ext=cpp
  23634. ac_cpp='$CXXCPP $CPPFLAGS'
  23635. ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  23636. ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  23637. ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  23638. if test "${PWLIBDIR:-unset}" != "unset" ; then
  23639. as_ac_Header=`$as_echo "ac_cv_header_${PWLIBDIR}/version.h" | $as_tr_sh`
  23640. ac_fn_cxx_check_header_mongrel "$LINENO" "${PWLIBDIR}/version.h" "$as_ac_Header" "$ac_includes_default"
  23641. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  23642. HAS_PWLIB=1
  23643. fi
  23644. fi
  23645. if test "${HAS_PWLIB:-unset}" = "unset" ; then
  23646. if test "${OPENH323DIR:-unset}" != "unset"; then
  23647. as_ac_Header=`$as_echo "ac_cv_header_${OPENH323DIR}/../pwlib/version.h" | $as_tr_sh`
  23648. ac_fn_cxx_check_header_mongrel "$LINENO" "${OPENH323DIR}/../pwlib/version.h" "$as_ac_Header" "$ac_includes_default"
  23649. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  23650. HAS_PWLIB=1
  23651. fi
  23652. fi
  23653. if test "${HAS_PWLIB:-unset}" != "unset" ; then
  23654. PWLIBDIR="${OPENH323DIR}/../pwlib"
  23655. else
  23656. as_ac_Header=`$as_echo "ac_cv_header_${HOME}/pwlib/include/ptlib.h" | $as_tr_sh`
  23657. ac_fn_cxx_check_header_mongrel "$LINENO" "${HOME}/pwlib/include/ptlib.h" "$as_ac_Header" "$ac_includes_default"
  23658. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  23659. HAS_PWLIB=1
  23660. fi
  23661. if test "${HAS_PWLIB:-unset}" != "unset" ; then
  23662. PWLIBDIR="${HOME}/pwlib"
  23663. else
  23664. ac_fn_cxx_check_header_mongrel "$LINENO" "/usr/local/include/ptlib.h" "ac_cv_header__usr_local_include_ptlib_h" "$ac_includes_default"
  23665. if test "x$ac_cv_header__usr_local_include_ptlib_h" = xyes; then :
  23666. HAS_PWLIB=1
  23667. fi
  23668. if test "${HAS_PWLIB:-unset}" != "unset" ; then
  23669. # Extract the first word of "ptlib-config", so it can be a program name with args.
  23670. set dummy ptlib-config; ac_word=$2
  23671. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  23672. $as_echo_n "checking for $ac_word... " >&6; }
  23673. if ${ac_cv_path_PTLIB_CONFIG+:} false; then :
  23674. $as_echo_n "(cached) " >&6
  23675. else
  23676. case $PTLIB_CONFIG in
  23677. [\\/]* | ?:[\\/]*)
  23678. ac_cv_path_PTLIB_CONFIG="$PTLIB_CONFIG" # Let the user override the test with a path.
  23679. ;;
  23680. *)
  23681. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  23682. for as_dir in /usr/local/bin$PATH_SEPARATOR/usr/local/share/pwlib/make
  23683. do
  23684. IFS=$as_save_IFS
  23685. test -z "$as_dir" && as_dir=.
  23686. for ac_exec_ext in '' $ac_executable_extensions; do
  23687. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  23688. ac_cv_path_PTLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  23689. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  23690. break 2
  23691. fi
  23692. done
  23693. done
  23694. IFS=$as_save_IFS
  23695. ;;
  23696. esac
  23697. fi
  23698. PTLIB_CONFIG=$ac_cv_path_PTLIB_CONFIG
  23699. if test -n "$PTLIB_CONFIG"; then
  23700. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTLIB_CONFIG" >&5
  23701. $as_echo "$PTLIB_CONFIG" >&6; }
  23702. else
  23703. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  23704. $as_echo "no" >&6; }
  23705. fi
  23706. PWLIB_INCDIR="/usr/local/include"
  23707. PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir 2>/dev/null`
  23708. if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
  23709. PWLIB_LIBDIR=`${PTLIB_CONFIG} --ptlibdir 2>/dev/null`
  23710. fi
  23711. if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
  23712. if test "x$LIB64" != "x"; then
  23713. PWLIB_LIBDIR="/usr/local/lib64"
  23714. else
  23715. PWLIB_LIBDIR="/usr/local/lib"
  23716. fi
  23717. fi
  23718. PWLIB_LIB=`${PTLIB_CONFIG} --ldflags --libs`
  23719. PWLIB_LIB="-L${PWLIB_LIBDIR} `echo ${PWLIB_LIB}`"
  23720. else
  23721. ac_fn_cxx_check_header_mongrel "$LINENO" "/usr/include/ptlib.h" "ac_cv_header__usr_include_ptlib_h" "$ac_includes_default"
  23722. if test "x$ac_cv_header__usr_include_ptlib_h" = xyes; then :
  23723. HAS_PWLIB=1
  23724. fi
  23725. if test "${HAS_PWLIB:-unset}" != "unset" ; then
  23726. # Extract the first word of "ptlib-config", so it can be a program name with args.
  23727. set dummy ptlib-config; ac_word=$2
  23728. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  23729. $as_echo_n "checking for $ac_word... " >&6; }
  23730. if ${ac_cv_path_PTLIB_CONFIG+:} false; then :
  23731. $as_echo_n "(cached) " >&6
  23732. else
  23733. case $PTLIB_CONFIG in
  23734. [\\/]* | ?:[\\/]*)
  23735. ac_cv_path_PTLIB_CONFIG="$PTLIB_CONFIG" # Let the user override the test with a path.
  23736. ;;
  23737. *)
  23738. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  23739. for as_dir in /usr/bin$PATH_SEPARATOR/usr/share/pwlib/make
  23740. do
  23741. IFS=$as_save_IFS
  23742. test -z "$as_dir" && as_dir=.
  23743. for ac_exec_ext in '' $ac_executable_extensions; do
  23744. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  23745. ac_cv_path_PTLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  23746. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  23747. break 2
  23748. fi
  23749. done
  23750. done
  23751. IFS=$as_save_IFS
  23752. ;;
  23753. esac
  23754. fi
  23755. PTLIB_CONFIG=$ac_cv_path_PTLIB_CONFIG
  23756. if test -n "$PTLIB_CONFIG"; then
  23757. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTLIB_CONFIG" >&5
  23758. $as_echo "$PTLIB_CONFIG" >&6; }
  23759. else
  23760. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  23761. $as_echo "no" >&6; }
  23762. fi
  23763. PWLIB_INCDIR="/usr/include"
  23764. PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir 2>/dev/null`
  23765. if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
  23766. PWLIB_LIBDIR=`${PTLIB_CONFIG} --ptlibdir 2>/dev/null`
  23767. fi
  23768. if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
  23769. if test "x$LIB64" != "x"; then
  23770. PWLIB_LIBDIR="/usr/lib64"
  23771. else
  23772. PWLIB_LIBDIR="/usr/lib"
  23773. fi
  23774. fi
  23775. PWLIB_LIB=`${PTLIB_CONFIG} --ldflags --libs`
  23776. PWLIB_LIB="-L${PWLIB_LIBDIR} `echo ${PWLIB_LIB}`"
  23777. fi
  23778. fi
  23779. fi
  23780. fi
  23781. fi
  23782. #if test "${HAS_PWLIB:-unset}" = "unset" ; then
  23783. # echo "Cannot find pwlib - please install or set PWLIBDIR and try again"
  23784. # exit
  23785. #fi
  23786. if test "${HAS_PWLIB:-unset}" != "unset" ; then
  23787. if test "${PWLIBDIR:-unset}" = "unset" ; then
  23788. if test "${PTLIB_CONFIG:-unset}" != "unset" ; then
  23789. PWLIBDIR=`$PTLIB_CONFIG --prefix`
  23790. else
  23791. echo "Cannot find ptlib-config - please install and try again"
  23792. exit
  23793. fi
  23794. fi
  23795. if test "x$PWLIBDIR" = "x/usr" -o "x$PWLIBDIR" = "x/usr/"; then
  23796. PWLIBDIR="/usr/share/pwlib"
  23797. PWLIB_INCDIR="/usr/include"
  23798. if test "x$LIB64" != "x"; then
  23799. PWLIB_LIBDIR="/usr/lib64"
  23800. else
  23801. PWLIB_LIBDIR="/usr/lib"
  23802. fi
  23803. fi
  23804. if test "x$PWLIBDIR" = "x/usr/local" -o "x$PWLIBDIR" = "x/usr/"; then
  23805. PWLIBDIR="/usr/local/share/pwlib"
  23806. PWLIB_INCDIR="/usr/local/include"
  23807. if test "x$LIB64" != "x"; then
  23808. PWLIB_LIBDIR="/usr/local/lib64"
  23809. else
  23810. PWLIB_LIBDIR="/usr/local/lib"
  23811. fi
  23812. fi
  23813. if test "${PWLIB_INCDIR:-unset}" = "unset"; then
  23814. PWLIB_INCDIR="${PWLIBDIR}/include"
  23815. fi
  23816. if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
  23817. PWLIB_LIBDIR="${PWLIBDIR}/lib"
  23818. fi
  23819. fi
  23820. ac_ext=c
  23821. ac_cpp='$CPP $CPPFLAGS'
  23822. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  23823. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  23824. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  23825. if test "xP[WT]LIB_VERSION" != "x"; then
  23826. VNAME="P[WT]LIB_VERSION"
  23827. else
  23828. VNAME="PWLIB_VERSION"
  23829. fi
  23830. if test "${HAS_PWLIB:-unset}" != "unset"; then
  23831. PWLIB_VERSION=`grep "$VNAME \"" ${PWLIB_INCDIR}/ptbuildopts.h | sed -e 's/[[:space:]]\{1,\}/ /g' | cut -f3 -d ' ' | sed -e 's/"//g'`
  23832. PWLIB_MAJOR_VERSION=`echo ${PWLIB_VERSION} | cut -f1 -d.`
  23833. PWLIB_MINOR_VERSION=`echo ${PWLIB_VERSION} | cut -f2 -d.`
  23834. PWLIB_BUILD_NUMBER=`echo ${PWLIB_VERSION} | cut -f3 -d.`
  23835. PWLIB_VER=$((${PWLIB_MAJOR_VERSION}*10000+${PWLIB_MINOR_VERSION}*100+${PWLIB_BUILD_NUMBER}))
  23836. PWLIB_REQ=$((1*10000+9*100+2))
  23837. if test "x" = "x"; then
  23838. PWLIB_MAX=9999999
  23839. else
  23840. PWLIB_MAX=$((*10000+*100+))
  23841. fi
  23842. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PWLib version ${PWLIB_VERSION} is compatible with chan_h323" >&5
  23843. $as_echo_n "checking if PWLib version ${PWLIB_VERSION} is compatible with chan_h323... " >&6; }
  23844. if test ${PWLIB_VER} -lt ${PWLIB_REQ}; then
  23845. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  23846. $as_echo "no" >&6; }
  23847. unset HAS_PWLIB
  23848. else
  23849. if test ${PWLIB_VER} -gt ${PWLIB_MAX}; then
  23850. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  23851. $as_echo "no" >&6; }
  23852. unset HAS_PWLIB
  23853. else
  23854. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  23855. $as_echo "yes" >&6; }
  23856. fi
  23857. fi
  23858. fi
  23859. if test "${HAS_PWLIB:-unset}" != "unset"; then
  23860. PWLIB_OSTYPE=
  23861. case "$host_os" in
  23862. linux*) PWLIB_OSTYPE=linux ;
  23863. ;;
  23864. freebsd* ) PWLIB_OSTYPE=FreeBSD ;
  23865. ;;
  23866. openbsd* ) PWLIB_OSTYPE=OpenBSD ;
  23867. ENDLDLIBS="-lossaudio" ;
  23868. ;;
  23869. netbsd* ) PWLIB_OSTYPE=NetBSD ;
  23870. ENDLDLIBS="-lossaudio" ;
  23871. ;;
  23872. solaris* | sunos* ) PWLIB_OSTYPE=solaris ;
  23873. ;;
  23874. darwin* ) PWLIB_OSTYPE=Darwin ;
  23875. ;;
  23876. beos*) PWLIB_OSTYPE=beos ;
  23877. STDCCFLAGS="$STDCCFLAGS -D__BEOS__"
  23878. ;;
  23879. cygwin*) PWLIB_OSTYPE=cygwin ;
  23880. ;;
  23881. mingw*) PWLIB_OSTYPE=mingw ;
  23882. STDCCFLAGS="$STDCCFLAGS -mms-bitfields" ;
  23883. ENDLDLIBS="-lwinmm -lwsock32 -lsnmpapi -lmpr -lcomdlg32 -lgdi32 -lavicap32" ;
  23884. ;;
  23885. * ) PWLIB_OSTYPE="$host_os" ;
  23886. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"OS $PWLIB_OSTYPE not recognized - proceed with caution!\"" >&5
  23887. $as_echo "$as_me: WARNING: \"OS $PWLIB_OSTYPE not recognized - proceed with caution!\"" >&2;} ;
  23888. ;;
  23889. esac
  23890. PWLIB_MACHTYPE=
  23891. case "$host_cpu" in
  23892. x86 | i686 | i586 | i486 | i386 ) PWLIB_MACHTYPE=x86
  23893. ;;
  23894. x86_64) PWLIB_MACHTYPE=x86_64 ;
  23895. P_64BIT=1 ;
  23896. LIB64=1 ;
  23897. ;;
  23898. alpha | alphaev56 | alphaev6 | alphaev67 | alphaev7) PWLIB_MACHTYPE=alpha ;
  23899. P_64BIT=1 ;
  23900. ;;
  23901. sparc ) PWLIB_MACHTYPE=sparc ;
  23902. ;;
  23903. powerpc ) PWLIB_MACHTYPE=ppc ;
  23904. ;;
  23905. ppc ) PWLIB_MACHTYPE=ppc ;
  23906. ;;
  23907. powerpc64 ) PWLIB_MACHTYPE=ppc64 ;
  23908. P_64BIT=1 ;
  23909. LIB64=1 ;
  23910. ;;
  23911. ppc64 ) PWLIB_MACHTYPE=ppc64 ;
  23912. P_64BIT=1 ;
  23913. LIB64=1 ;
  23914. ;;
  23915. ia64) PWLIB_MACHTYPE=ia64 ;
  23916. P_64BIT=1 ;
  23917. ;;
  23918. s390x) PWLIB_MACHTYPE=s390x ;
  23919. P_64BIT=1 ;
  23920. LIB64=1 ;
  23921. ;;
  23922. s390) PWLIB_MACHTYPE=s390 ;
  23923. ;;
  23924. * ) PWLIB_MACHTYPE="$host_cpu";
  23925. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"CPU $PWLIB_MACHTYPE not recognized - proceed with caution!\"" >&5
  23926. $as_echo "$as_me: WARNING: \"CPU $PWLIB_MACHTYPE not recognized - proceed with caution!\"" >&2;} ;;
  23927. esac
  23928. PWLIB_PLATFORM="${PWLIB_OSTYPE}_${PWLIB_MACHTYPE}"
  23929. PLATFORM_PWLIB="pt_${PWLIB_PLATFORM}_r"
  23930. if test "${HAS_PWLIB:-unset}" != "unset"; then
  23931. { $as_echo "$as_me:${as_lineno-$LINENO}: checking PWLib installation validity" >&5
  23932. $as_echo_n "checking PWLib installation validity... " >&6; }
  23933. saved_cppflags="${CPPFLAGS}"
  23934. saved_libs="${LIBS}"
  23935. if test "${PWLIB_LIB:-unset}" != "unset"; then
  23936. LIBS="${LIBS} ${PWLIB_LIB} "
  23937. else
  23938. LIBS="${LIBS} -L${PWLIB_LIBDIR} -l${PLATFORM_PWLIB} "
  23939. fi
  23940. CPPFLAGS="${CPPFLAGS} -I${PWLIB_INCDIR} "
  23941. ac_ext=cpp
  23942. ac_cpp='$CXXCPP $CPPFLAGS'
  23943. ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  23944. ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  23945. ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  23946. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23947. /* end confdefs.h. */
  23948. #include "ptlib.h"
  23949. int
  23950. main ()
  23951. {
  23952. int q = (int) PTime::IsDaylightSavings();
  23953. ;
  23954. return 0;
  23955. }
  23956. _ACEOF
  23957. if ac_fn_cxx_try_link "$LINENO"; then :
  23958. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  23959. $as_echo "yes" >&6; }
  23960. ac_cv_lib_PWLIB="yes"
  23961. else
  23962. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  23963. $as_echo "no" >&6; }
  23964. ac_cv_lib_PWLIB="no"
  23965. fi
  23966. rm -f core conftest.err conftest.$ac_objext \
  23967. conftest$ac_exeext conftest.$ac_ext
  23968. ac_ext=c
  23969. ac_cpp='$CPP $CPPFLAGS'
  23970. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  23971. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  23972. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  23973. LIBS="${saved_libs}"
  23974. CPPFLAGS="${saved_cppflags}"
  23975. if test "${ac_cv_lib_PWLIB}" = "yes"; then
  23976. if test "${PWLIB_LIB:-undef}" = "undef"; then
  23977. if test "${PWLIB_LIBDIR}" != "" -a "${PWLIB_LIBDIR}" != "/usr/lib"; then
  23978. PWLIB_LIB="-L${PWLIB_LIBDIR} -l${PLATFORM_PWLIB}"
  23979. else
  23980. PWLIB_LIB="-l${PLATFORM_PWLIB}"
  23981. fi
  23982. fi
  23983. if test "${PWLIB_INCDIR}" != "" -a "${PWLIB_INCDIR}" != "/usr/include"; then
  23984. PWLIB_INCLUDE="-I${PWLIB_INCDIR}"
  23985. fi
  23986. PBX_PWLIB=1
  23987. $as_echo "#define HAVE_PWLIB 1" >>confdefs.h
  23988. fi
  23989. fi
  23990. fi
  23991. fi
  23992. if test "${PBX_PWLIB}" = "1" -a "${USE_OPENH323}" != "no" ; then
  23993. if test -n "${OPENH323_DIR}"; then
  23994. OPENH323DIR="${OPENH323_DIR}"
  23995. fi
  23996. OPENH323_INCDIR=
  23997. OPENH323_LIBDIR=
  23998. ac_ext=cpp
  23999. ac_cpp='$CXXCPP $CPPFLAGS'
  24000. ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  24001. ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  24002. ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  24003. if test "${OPENH323DIR:-unset}" != "unset" ; then
  24004. as_ac_Header=`$as_echo "ac_cv_header_${OPENH323DIR}/version.h" | $as_tr_sh`
  24005. ac_fn_cxx_check_header_mongrel "$LINENO" "${OPENH323DIR}/version.h" "$as_ac_Header" "$ac_includes_default"
  24006. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  24007. HAS_OPENH323=1
  24008. fi
  24009. fi
  24010. if test "${HAS_OPENH323:-unset}" = "unset" ; then
  24011. as_ac_Header=`$as_echo "ac_cv_header_${PWLIBDIR}/../openh323/version.h" | $as_tr_sh`
  24012. ac_fn_cxx_check_header_mongrel "$LINENO" "${PWLIBDIR}/../openh323/version.h" "$as_ac_Header" "$ac_includes_default"
  24013. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  24014. OPENH323DIR="${PWLIBDIR}/../openh323"; HAS_OPENH323=1
  24015. fi
  24016. if test "${HAS_OPENH323:-unset}" != "unset" ; then
  24017. OPENH323DIR="${PWLIBDIR}/../openh323"
  24018. saved_cppflags="${CPPFLAGS}"
  24019. CPPFLAGS="${CPPFLAGS} -I${PWLIB_INCDIR}/openh323 -I${PWLIB_INCDIR}"
  24020. as_ac_Header=`$as_echo "ac_cv_header_${OPENH323DIR}/include/h323.h" | $as_tr_sh`
  24021. ac_fn_cxx_check_header_compile "$LINENO" "${OPENH323DIR}/include/h323.h" "$as_ac_Header" "#include <ptlib.h>
  24022. "
  24023. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  24024. else
  24025. OPENH323_INCDIR="${PWLIB_INCDIR}/openh323"; OPENH323_LIBDIR="${PWLIB_LIBDIR}"
  24026. fi
  24027. CPPFLAGS="${saved_cppflags}"
  24028. else
  24029. saved_cppflags="${CPPFLAGS}"
  24030. CPPFLAGS="${CPPFLAGS} -I${HOME}/openh323/include -I${PWLIB_INCDIR}"
  24031. as_ac_Header=`$as_echo "ac_cv_header_${HOME}/openh323/include/h323.h" | $as_tr_sh`
  24032. ac_fn_cxx_check_header_compile "$LINENO" "${HOME}/openh323/include/h323.h" "$as_ac_Header" "#include <ptlib.h>
  24033. "
  24034. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  24035. HAS_OPENH323=1
  24036. fi
  24037. CPPFLAGS="${saved_cppflags}"
  24038. if test "${HAS_OPENH323:-unset}" != "unset" ; then
  24039. OPENH323DIR="${HOME}/openh323"
  24040. else
  24041. saved_cppflags="${CPPFLAGS}"
  24042. CPPFLAGS="${CPPFLAGS} -I/usr/local/include/openh323 -I${PWLIB_INCDIR}"
  24043. ac_fn_cxx_check_header_compile "$LINENO" "/usr/local/include/openh323/h323.h" "ac_cv_header__usr_local_include_openh323_h323_h" "#include <ptlib.h>
  24044. "
  24045. if test "x$ac_cv_header__usr_local_include_openh323_h323_h" = xyes; then :
  24046. HAS_OPENH323=1
  24047. fi
  24048. CPPFLAGS="${saved_cppflags}"
  24049. if test "${HAS_OPENH323:-unset}" != "unset" ; then
  24050. OPENH323DIR="/usr/local/share/openh323"
  24051. OPENH323_INCDIR="/usr/local/include/openh323"
  24052. if test "x$LIB64" != "x" && test -d "/usr/local/lib64"; then
  24053. OPENH323_LIBDIR="/usr/local/lib64"
  24054. else
  24055. OPENH323_LIBDIR="/usr/local/lib"
  24056. fi
  24057. else
  24058. saved_cppflags="${CPPFLAGS}"
  24059. CPPFLAGS="${CPPFLAGS} -I/usr/include/openh323 -I${PWLIB_INCDIR}"
  24060. ac_fn_cxx_check_header_compile "$LINENO" "/usr/include/openh323/h323.h" "ac_cv_header__usr_include_openh323_h323_h" "#include <ptlib.h>
  24061. "
  24062. if test "x$ac_cv_header__usr_include_openh323_h323_h" = xyes; then :
  24063. HAS_OPENH323=1
  24064. fi
  24065. CPPFLAGS="${saved_cppflags}"
  24066. if test "${HAS_OPENH323:-unset}" != "unset" ; then
  24067. OPENH323DIR="/usr/share/openh323"
  24068. OPENH323_INCDIR="/usr/include/openh323"
  24069. if test "x$LIB64" != "x" && test -d "/usr/local/lib64"; then
  24070. OPENH323_LIBDIR="/usr/lib64"
  24071. else
  24072. OPENH323_LIBDIR="/usr/lib"
  24073. fi
  24074. fi
  24075. fi
  24076. fi
  24077. fi
  24078. fi
  24079. if test "${HAS_OPENH323:-unset}" != "unset" ; then
  24080. if test "${OPENH323_INCDIR:-unset}" = "unset"; then
  24081. OPENH323_INCDIR="${OPENH323DIR}/include"
  24082. fi
  24083. if test "${OPENH323_LIBDIR:-unset}" = "unset"; then
  24084. OPENH323_LIBDIR="${OPENH323DIR}/lib"
  24085. fi
  24086. OPENH323_LIBDIR="`cd ${OPENH323_LIBDIR}; pwd`"
  24087. OPENH323_INCDIR="`cd ${OPENH323_INCDIR}; pwd`"
  24088. OPENH323DIR="`cd ${OPENH323DIR}; pwd`"
  24089. fi
  24090. ac_ext=c
  24091. ac_cpp='$CPP $CPPFLAGS'
  24092. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  24093. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  24094. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  24095. if test "x" != "x"; then
  24096. VNAME=""
  24097. else
  24098. VNAME="OPENH323_VERSION"
  24099. fi
  24100. if test "${HAS_OPENH323:-unset}" != "unset"; then
  24101. OPENH323_VERSION=`grep "$VNAME \"" ${OPENH323_INCDIR}/openh323buildopts.h | sed -e 's/[[:space:]]\{1,\}/ /g' | cut -f3 -d ' ' | sed -e 's/"//g'`
  24102. OPENH323_MAJOR_VERSION=`echo ${OPENH323_VERSION} | cut -f1 -d.`
  24103. OPENH323_MINOR_VERSION=`echo ${OPENH323_VERSION} | cut -f2 -d.`
  24104. OPENH323_BUILD_NUMBER=`echo ${OPENH323_VERSION} | cut -f3 -d.`
  24105. OPENH323_VER=$((${OPENH323_MAJOR_VERSION}*10000+${OPENH323_MINOR_VERSION}*100+${OPENH323_BUILD_NUMBER}))
  24106. OPENH323_REQ=$((1*10000+17*100+3))
  24107. if test "x0" = "x"; then
  24108. OPENH323_MAX=9999999
  24109. else
  24110. OPENH323_MAX=$((1*10000+19*100+0))
  24111. fi
  24112. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OpenH323 version ${OPENH323_VERSION} is compatible with chan_h323" >&5
  24113. $as_echo_n "checking if OpenH323 version ${OPENH323_VERSION} is compatible with chan_h323... " >&6; }
  24114. if test ${OPENH323_VER} -lt ${OPENH323_REQ}; then
  24115. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  24116. $as_echo "no" >&6; }
  24117. unset HAS_OPENH323
  24118. else
  24119. if test ${OPENH323_VER} -gt ${OPENH323_MAX}; then
  24120. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  24121. $as_echo "no" >&6; }
  24122. unset HAS_OPENH323
  24123. else
  24124. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  24125. $as_echo "yes" >&6; }
  24126. fi
  24127. fi
  24128. fi
  24129. if test "${HAS_OPENH323:-unset}" != "unset"; then
  24130. { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenH323 build option" >&5
  24131. $as_echo_n "checking OpenH323 build option... " >&6; }
  24132. OPENH323_SUFFIX=
  24133. prefixes="h323_${PWLIB_PLATFORM}_ h323_ openh323"
  24134. for pfx in $prefixes; do
  24135. #files=`ls -l /usr/local/lib/lib${pfx}*.so* 2>/dev/null`
  24136. files=`ls -l ${OPENH323_LIBDIR}/lib${pfx}*.so* 2>/dev/null`
  24137. if test -z "$files"; then
  24138. # check the default location
  24139. files=`ls -l /usr/local/lib/lib${pfx}*.so* 2>/dev/null`
  24140. fi
  24141. libfile=
  24142. if test -n "$files"; then
  24143. for f in $files; do
  24144. if test -f $f -a ! -L $f; then
  24145. libfile=`basename $f`
  24146. break;
  24147. fi
  24148. done
  24149. fi
  24150. if test -n "$libfile"; then
  24151. OPENH323_PREFIX=$pfx
  24152. break;
  24153. fi
  24154. done
  24155. if test "${libfile:-unset}" != "unset"; then
  24156. OPENH323_SUFFIX=`eval "echo ${libfile} | sed -e 's/lib${OPENH323_PREFIX}\([^.]*\)\..*/\1/'"`
  24157. fi
  24158. case "${OPENH323_SUFFIX}" in
  24159. n)
  24160. OPENH323_BUILD="notrace";;
  24161. r)
  24162. OPENH323_BUILD="opt";;
  24163. d)
  24164. OPENH323_BUILD="debug";;
  24165. *)
  24166. if test "${OPENH323_PREFIX:-undef}" = "openh323"; then
  24167. notrace=`eval "grep NOTRACE ${OPENH323DIR}/openh323u.mak | grep = | sed -e 's/[A-Z0-9_]*[ ]*=[ ]*//'"`
  24168. if test "x$notrace" = "x"; then
  24169. notrace="0"
  24170. fi
  24171. if test "$notrace" -ne 0; then
  24172. OPENH323_BUILD="notrace"
  24173. else
  24174. OPENH323_BUILD="opt"
  24175. fi
  24176. OPENH323_LIB="-l${OPENH323_PREFIX}"
  24177. else
  24178. OPENH323_BUILD="notrace"
  24179. fi
  24180. ;;
  24181. esac
  24182. { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${OPENH323_BUILD}" >&5
  24183. $as_echo "${OPENH323_BUILD}" >&6; }
  24184. fi
  24185. PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_${OPENH323_SUFFIX}"
  24186. if test "${HAS_OPENH323:-unset}" != "unset"; then
  24187. { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenH323 installation validity" >&5
  24188. $as_echo_n "checking OpenH323 installation validity... " >&6; }
  24189. saved_cppflags="${CPPFLAGS}"
  24190. saved_libs="${LIBS}"
  24191. if test "${OPENH323_LIB:-unset}" != "unset"; then
  24192. LIBS="${LIBS} ${OPENH323_LIB} ${PWLIB_LIB}"
  24193. else
  24194. LIBS="${LIBS} -L${OPENH323_LIBDIR} -l${PLATFORM_OPENH323} ${PWLIB_LIB}"
  24195. fi
  24196. CPPFLAGS="${CPPFLAGS} -I${OPENH323_INCDIR} ${PWLIB_INCLUDE}"
  24197. ac_ext=cpp
  24198. ac_cpp='$CXXCPP $CPPFLAGS'
  24199. ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  24200. ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  24201. ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  24202. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24203. /* end confdefs.h. */
  24204. #include "ptlib.h"
  24205. #include "h323.h"
  24206. #include "h323ep.h"
  24207. int
  24208. main ()
  24209. {
  24210. H323EndPoint ep = H323EndPoint();
  24211. ;
  24212. return 0;
  24213. }
  24214. _ACEOF
  24215. if ac_fn_cxx_try_link "$LINENO"; then :
  24216. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  24217. $as_echo "yes" >&6; }
  24218. ac_cv_lib_OPENH323="yes"
  24219. else
  24220. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  24221. $as_echo "no" >&6; }
  24222. ac_cv_lib_OPENH323="no"
  24223. fi
  24224. rm -f core conftest.err conftest.$ac_objext \
  24225. conftest$ac_exeext conftest.$ac_ext
  24226. ac_ext=c
  24227. ac_cpp='$CPP $CPPFLAGS'
  24228. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  24229. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  24230. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  24231. LIBS="${saved_libs}"
  24232. CPPFLAGS="${saved_cppflags}"
  24233. if test "${ac_cv_lib_OPENH323}" = "yes"; then
  24234. if test "${OPENH323_LIB:-undef}" = "undef"; then
  24235. if test "${OPENH323_LIBDIR}" != "" -a "${OPENH323_LIBDIR}" != "/usr/lib"; then
  24236. OPENH323_LIB="-L${OPENH323_LIBDIR} -l${PLATFORM_OPENH323}"
  24237. else
  24238. OPENH323_LIB="-l${PLATFORM_OPENH323}"
  24239. fi
  24240. fi
  24241. if test "${OPENH323_INCDIR}" != "" -a "${OPENH323_INCDIR}" != "/usr/include"; then
  24242. OPENH323_INCLUDE="-I${OPENH323_INCDIR}"
  24243. fi
  24244. PBX_OPENH323=1
  24245. $as_echo "#define HAVE_OPENH323 1" >>confdefs.h
  24246. fi
  24247. fi
  24248. fi
  24249. if test "x${PBX_LUA}" != "x1" -a "${USE_LUA}" != "no"; then
  24250. pbxlibdir=""
  24251. # if --with-LUA=DIR has been specified, use it.
  24252. if test "x${LUA_DIR}" != "x"; then
  24253. if test -d ${LUA_DIR}/lib; then
  24254. pbxlibdir="-L${LUA_DIR}/lib"
  24255. else
  24256. pbxlibdir="-L${LUA_DIR}"
  24257. fi
  24258. fi
  24259. pbxfuncname="luaL_newstate"
  24260. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  24261. AST_LUA_FOUND=yes
  24262. else
  24263. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  24264. CFLAGS="${CFLAGS} "
  24265. as_ac_Lib=`$as_echo "ac_cv_lib_lua5.2_${pbxfuncname}" | $as_tr_sh`
  24266. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -llua5.2" >&5
  24267. $as_echo_n "checking for ${pbxfuncname} in -llua5.2... " >&6; }
  24268. if eval \${$as_ac_Lib+:} false; then :
  24269. $as_echo_n "(cached) " >&6
  24270. else
  24271. ac_check_lib_save_LIBS=$LIBS
  24272. LIBS="-llua5.2 ${pbxlibdir} -lm $LIBS"
  24273. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24274. /* end confdefs.h. */
  24275. /* Override any GCC internal prototype to avoid an error.
  24276. Use char because int might match the return type of a GCC
  24277. builtin and then its argument prototype would still apply. */
  24278. #ifdef __cplusplus
  24279. extern "C"
  24280. #endif
  24281. char ${pbxfuncname} ();
  24282. int
  24283. main ()
  24284. {
  24285. return ${pbxfuncname} ();
  24286. ;
  24287. return 0;
  24288. }
  24289. _ACEOF
  24290. if ac_fn_c_try_link "$LINENO"; then :
  24291. eval "$as_ac_Lib=yes"
  24292. else
  24293. eval "$as_ac_Lib=no"
  24294. fi
  24295. rm -f core conftest.err conftest.$ac_objext \
  24296. conftest$ac_exeext conftest.$ac_ext
  24297. LIBS=$ac_check_lib_save_LIBS
  24298. fi
  24299. eval ac_res=\$$as_ac_Lib
  24300. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  24301. $as_echo "$ac_res" >&6; }
  24302. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  24303. AST_LUA_FOUND=yes
  24304. else
  24305. AST_LUA_FOUND=no
  24306. fi
  24307. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  24308. fi
  24309. # now check for the header.
  24310. if test "${AST_LUA_FOUND}" = "yes"; then
  24311. LUA_LIB="${pbxlibdir} -llua5.2 -lm"
  24312. # if --with-LUA=DIR has been specified, use it.
  24313. if test "x${LUA_DIR}" != "x"; then
  24314. LUA_INCLUDE="-I${LUA_DIR}/include"
  24315. fi
  24316. LUA_INCLUDE="${LUA_INCLUDE} "
  24317. if test "xlua5.2/lua.h" = "x" ; then # no header, assume found
  24318. LUA_HEADER_FOUND="1"
  24319. else # check for the header
  24320. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  24321. CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}"
  24322. ac_fn_c_check_header_mongrel "$LINENO" "lua5.2/lua.h" "ac_cv_header_lua5_2_lua_h" "$ac_includes_default"
  24323. if test "x$ac_cv_header_lua5_2_lua_h" = xyes; then :
  24324. LUA_HEADER_FOUND=1
  24325. else
  24326. LUA_HEADER_FOUND=0
  24327. fi
  24328. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  24329. fi
  24330. if test "x${LUA_HEADER_FOUND}" = "x0" ; then
  24331. LUA_LIB=""
  24332. LUA_INCLUDE=""
  24333. else
  24334. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  24335. LUA_LIB=""
  24336. fi
  24337. PBX_LUA=1
  24338. cat >>confdefs.h <<_ACEOF
  24339. #define HAVE_LUA 1
  24340. _ACEOF
  24341. fi
  24342. fi
  24343. fi
  24344. if test "x${PBX_LUA}" = "x1" ; then
  24345. if test x"${LUA_DIR}" = x; then
  24346. LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua5.2"
  24347. else
  24348. LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua5.2"
  24349. fi
  24350. fi
  24351. if test "x${PBX_LUA}" != "x1" -a "${USE_LUA}" != "no"; then
  24352. pbxlibdir=""
  24353. # if --with-LUA=DIR has been specified, use it.
  24354. if test "x${LUA_DIR}" != "x"; then
  24355. if test -d ${LUA_DIR}/lib; then
  24356. pbxlibdir="-L${LUA_DIR}/lib"
  24357. else
  24358. pbxlibdir="-L${LUA_DIR}"
  24359. fi
  24360. fi
  24361. pbxfuncname="luaL_newstate"
  24362. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  24363. AST_LUA_FOUND=yes
  24364. else
  24365. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  24366. CFLAGS="${CFLAGS} "
  24367. as_ac_Lib=`$as_echo "ac_cv_lib_lua5.1_${pbxfuncname}" | $as_tr_sh`
  24368. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -llua5.1" >&5
  24369. $as_echo_n "checking for ${pbxfuncname} in -llua5.1... " >&6; }
  24370. if eval \${$as_ac_Lib+:} false; then :
  24371. $as_echo_n "(cached) " >&6
  24372. else
  24373. ac_check_lib_save_LIBS=$LIBS
  24374. LIBS="-llua5.1 ${pbxlibdir} -lm $LIBS"
  24375. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24376. /* end confdefs.h. */
  24377. /* Override any GCC internal prototype to avoid an error.
  24378. Use char because int might match the return type of a GCC
  24379. builtin and then its argument prototype would still apply. */
  24380. #ifdef __cplusplus
  24381. extern "C"
  24382. #endif
  24383. char ${pbxfuncname} ();
  24384. int
  24385. main ()
  24386. {
  24387. return ${pbxfuncname} ();
  24388. ;
  24389. return 0;
  24390. }
  24391. _ACEOF
  24392. if ac_fn_c_try_link "$LINENO"; then :
  24393. eval "$as_ac_Lib=yes"
  24394. else
  24395. eval "$as_ac_Lib=no"
  24396. fi
  24397. rm -f core conftest.err conftest.$ac_objext \
  24398. conftest$ac_exeext conftest.$ac_ext
  24399. LIBS=$ac_check_lib_save_LIBS
  24400. fi
  24401. eval ac_res=\$$as_ac_Lib
  24402. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  24403. $as_echo "$ac_res" >&6; }
  24404. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  24405. AST_LUA_FOUND=yes
  24406. else
  24407. AST_LUA_FOUND=no
  24408. fi
  24409. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  24410. fi
  24411. # now check for the header.
  24412. if test "${AST_LUA_FOUND}" = "yes"; then
  24413. LUA_LIB="${pbxlibdir} -llua5.1 -lm"
  24414. # if --with-LUA=DIR has been specified, use it.
  24415. if test "x${LUA_DIR}" != "x"; then
  24416. LUA_INCLUDE="-I${LUA_DIR}/include"
  24417. fi
  24418. LUA_INCLUDE="${LUA_INCLUDE} "
  24419. if test "xlua5.1/lua.h" = "x" ; then # no header, assume found
  24420. LUA_HEADER_FOUND="1"
  24421. else # check for the header
  24422. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  24423. CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}"
  24424. ac_fn_c_check_header_mongrel "$LINENO" "lua5.1/lua.h" "ac_cv_header_lua5_1_lua_h" "$ac_includes_default"
  24425. if test "x$ac_cv_header_lua5_1_lua_h" = xyes; then :
  24426. LUA_HEADER_FOUND=1
  24427. else
  24428. LUA_HEADER_FOUND=0
  24429. fi
  24430. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  24431. fi
  24432. if test "x${LUA_HEADER_FOUND}" = "x0" ; then
  24433. LUA_LIB=""
  24434. LUA_INCLUDE=""
  24435. else
  24436. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  24437. LUA_LIB=""
  24438. fi
  24439. PBX_LUA=1
  24440. cat >>confdefs.h <<_ACEOF
  24441. #define HAVE_LUA 1
  24442. _ACEOF
  24443. fi
  24444. fi
  24445. fi
  24446. if test "x${PBX_LUA}" = "x1" ; then
  24447. if test x"${LUA_DIR}" = x; then
  24448. LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua5.1"
  24449. else
  24450. LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua5.1"
  24451. fi
  24452. fi
  24453. # Some distributions (like SuSE) remove the 5.1 suffix.
  24454. if test "x${PBX_LUA}" != "x1" -a "${USE_LUA}" != "no"; then
  24455. pbxlibdir=""
  24456. # if --with-LUA=DIR has been specified, use it.
  24457. if test "x${LUA_DIR}" != "x"; then
  24458. if test -d ${LUA_DIR}/lib; then
  24459. pbxlibdir="-L${LUA_DIR}/lib"
  24460. else
  24461. pbxlibdir="-L${LUA_DIR}"
  24462. fi
  24463. fi
  24464. pbxfuncname="luaL_openlib"
  24465. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  24466. AST_LUA_FOUND=yes
  24467. else
  24468. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  24469. CFLAGS="${CFLAGS} "
  24470. as_ac_Lib=`$as_echo "ac_cv_lib_lua_${pbxfuncname}" | $as_tr_sh`
  24471. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -llua" >&5
  24472. $as_echo_n "checking for ${pbxfuncname} in -llua... " >&6; }
  24473. if eval \${$as_ac_Lib+:} false; then :
  24474. $as_echo_n "(cached) " >&6
  24475. else
  24476. ac_check_lib_save_LIBS=$LIBS
  24477. LIBS="-llua ${pbxlibdir} -lm $LIBS"
  24478. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24479. /* end confdefs.h. */
  24480. /* Override any GCC internal prototype to avoid an error.
  24481. Use char because int might match the return type of a GCC
  24482. builtin and then its argument prototype would still apply. */
  24483. #ifdef __cplusplus
  24484. extern "C"
  24485. #endif
  24486. char ${pbxfuncname} ();
  24487. int
  24488. main ()
  24489. {
  24490. return ${pbxfuncname} ();
  24491. ;
  24492. return 0;
  24493. }
  24494. _ACEOF
  24495. if ac_fn_c_try_link "$LINENO"; then :
  24496. eval "$as_ac_Lib=yes"
  24497. else
  24498. eval "$as_ac_Lib=no"
  24499. fi
  24500. rm -f core conftest.err conftest.$ac_objext \
  24501. conftest$ac_exeext conftest.$ac_ext
  24502. LIBS=$ac_check_lib_save_LIBS
  24503. fi
  24504. eval ac_res=\$$as_ac_Lib
  24505. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  24506. $as_echo "$ac_res" >&6; }
  24507. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  24508. AST_LUA_FOUND=yes
  24509. else
  24510. AST_LUA_FOUND=no
  24511. fi
  24512. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  24513. fi
  24514. # now check for the header.
  24515. if test "${AST_LUA_FOUND}" = "yes"; then
  24516. LUA_LIB="${pbxlibdir} -llua -lm"
  24517. # if --with-LUA=DIR has been specified, use it.
  24518. if test "x${LUA_DIR}" != "x"; then
  24519. LUA_INCLUDE="-I${LUA_DIR}/include"
  24520. fi
  24521. LUA_INCLUDE="${LUA_INCLUDE} "
  24522. if test "xlua.h" = "x" ; then # no header, assume found
  24523. LUA_HEADER_FOUND="1"
  24524. else # check for the header
  24525. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  24526. CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}"
  24527. ac_fn_c_check_header_mongrel "$LINENO" "lua.h" "ac_cv_header_lua_h" "$ac_includes_default"
  24528. if test "x$ac_cv_header_lua_h" = xyes; then :
  24529. LUA_HEADER_FOUND=1
  24530. else
  24531. LUA_HEADER_FOUND=0
  24532. fi
  24533. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  24534. fi
  24535. if test "x${LUA_HEADER_FOUND}" = "x0" ; then
  24536. LUA_LIB=""
  24537. LUA_INCLUDE=""
  24538. else
  24539. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  24540. LUA_LIB=""
  24541. fi
  24542. PBX_LUA=1
  24543. cat >>confdefs.h <<_ACEOF
  24544. #define HAVE_LUA 1
  24545. _ACEOF
  24546. fi
  24547. fi
  24548. fi
  24549. # Accept either RADIUS client library, their APIs are fully compatible,
  24550. # just different header filenames and different SONAMEs
  24551. if test "x${PBX_RADIUS}" != "x1" -a "${USE_RADIUS}" != "no"; then
  24552. pbxlibdir=""
  24553. # if --with-RADIUS=DIR has been specified, use it.
  24554. if test "x${RADIUS_DIR}" != "x"; then
  24555. if test -d ${RADIUS_DIR}/lib; then
  24556. pbxlibdir="-L${RADIUS_DIR}/lib"
  24557. else
  24558. pbxlibdir="-L${RADIUS_DIR}"
  24559. fi
  24560. fi
  24561. pbxfuncname="rc_read_config"
  24562. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  24563. AST_RADIUS_FOUND=yes
  24564. else
  24565. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  24566. CFLAGS="${CFLAGS} "
  24567. as_ac_Lib=`$as_echo "ac_cv_lib_freeradius-client_${pbxfuncname}" | $as_tr_sh`
  24568. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lfreeradius-client" >&5
  24569. $as_echo_n "checking for ${pbxfuncname} in -lfreeradius-client... " >&6; }
  24570. if eval \${$as_ac_Lib+:} false; then :
  24571. $as_echo_n "(cached) " >&6
  24572. else
  24573. ac_check_lib_save_LIBS=$LIBS
  24574. LIBS="-lfreeradius-client ${pbxlibdir} $LIBS"
  24575. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24576. /* end confdefs.h. */
  24577. /* Override any GCC internal prototype to avoid an error.
  24578. Use char because int might match the return type of a GCC
  24579. builtin and then its argument prototype would still apply. */
  24580. #ifdef __cplusplus
  24581. extern "C"
  24582. #endif
  24583. char ${pbxfuncname} ();
  24584. int
  24585. main ()
  24586. {
  24587. return ${pbxfuncname} ();
  24588. ;
  24589. return 0;
  24590. }
  24591. _ACEOF
  24592. if ac_fn_c_try_link "$LINENO"; then :
  24593. eval "$as_ac_Lib=yes"
  24594. else
  24595. eval "$as_ac_Lib=no"
  24596. fi
  24597. rm -f core conftest.err conftest.$ac_objext \
  24598. conftest$ac_exeext conftest.$ac_ext
  24599. LIBS=$ac_check_lib_save_LIBS
  24600. fi
  24601. eval ac_res=\$$as_ac_Lib
  24602. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  24603. $as_echo "$ac_res" >&6; }
  24604. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  24605. AST_RADIUS_FOUND=yes
  24606. else
  24607. AST_RADIUS_FOUND=no
  24608. fi
  24609. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  24610. fi
  24611. # now check for the header.
  24612. if test "${AST_RADIUS_FOUND}" = "yes"; then
  24613. RADIUS_LIB="${pbxlibdir} -lfreeradius-client "
  24614. # if --with-RADIUS=DIR has been specified, use it.
  24615. if test "x${RADIUS_DIR}" != "x"; then
  24616. RADIUS_INCLUDE="-I${RADIUS_DIR}/include"
  24617. fi
  24618. RADIUS_INCLUDE="${RADIUS_INCLUDE} "
  24619. if test "xfreeradius-client.h" = "x" ; then # no header, assume found
  24620. RADIUS_HEADER_FOUND="1"
  24621. else # check for the header
  24622. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  24623. CPPFLAGS="${CPPFLAGS} ${RADIUS_INCLUDE}"
  24624. ac_fn_c_check_header_mongrel "$LINENO" "freeradius-client.h" "ac_cv_header_freeradius_client_h" "$ac_includes_default"
  24625. if test "x$ac_cv_header_freeradius_client_h" = xyes; then :
  24626. RADIUS_HEADER_FOUND=1
  24627. else
  24628. RADIUS_HEADER_FOUND=0
  24629. fi
  24630. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  24631. fi
  24632. if test "x${RADIUS_HEADER_FOUND}" = "x0" ; then
  24633. RADIUS_LIB=""
  24634. RADIUS_INCLUDE=""
  24635. else
  24636. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  24637. RADIUS_LIB=""
  24638. fi
  24639. PBX_RADIUS=1
  24640. cat >>confdefs.h <<_ACEOF
  24641. #define HAVE_RADIUS 1
  24642. _ACEOF
  24643. fi
  24644. fi
  24645. fi
  24646. if test "x${PBX_RADIUS}" = "x1"; then
  24647. $as_echo "#define FREERADIUS_CLIENT /**/" >>confdefs.h
  24648. else
  24649. if test "x${PBX_RADIUS}" != "x1" -a "${USE_RADIUS}" != "no"; then
  24650. pbxlibdir=""
  24651. # if --with-RADIUS=DIR has been specified, use it.
  24652. if test "x${RADIUS_DIR}" != "x"; then
  24653. if test -d ${RADIUS_DIR}/lib; then
  24654. pbxlibdir="-L${RADIUS_DIR}/lib"
  24655. else
  24656. pbxlibdir="-L${RADIUS_DIR}"
  24657. fi
  24658. fi
  24659. pbxfuncname="rc_read_config"
  24660. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  24661. AST_RADIUS_FOUND=yes
  24662. else
  24663. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  24664. CFLAGS="${CFLAGS} "
  24665. as_ac_Lib=`$as_echo "ac_cv_lib_radiusclient-ng_${pbxfuncname}" | $as_tr_sh`
  24666. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lradiusclient-ng" >&5
  24667. $as_echo_n "checking for ${pbxfuncname} in -lradiusclient-ng... " >&6; }
  24668. if eval \${$as_ac_Lib+:} false; then :
  24669. $as_echo_n "(cached) " >&6
  24670. else
  24671. ac_check_lib_save_LIBS=$LIBS
  24672. LIBS="-lradiusclient-ng ${pbxlibdir} $LIBS"
  24673. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24674. /* end confdefs.h. */
  24675. /* Override any GCC internal prototype to avoid an error.
  24676. Use char because int might match the return type of a GCC
  24677. builtin and then its argument prototype would still apply. */
  24678. #ifdef __cplusplus
  24679. extern "C"
  24680. #endif
  24681. char ${pbxfuncname} ();
  24682. int
  24683. main ()
  24684. {
  24685. return ${pbxfuncname} ();
  24686. ;
  24687. return 0;
  24688. }
  24689. _ACEOF
  24690. if ac_fn_c_try_link "$LINENO"; then :
  24691. eval "$as_ac_Lib=yes"
  24692. else
  24693. eval "$as_ac_Lib=no"
  24694. fi
  24695. rm -f core conftest.err conftest.$ac_objext \
  24696. conftest$ac_exeext conftest.$ac_ext
  24697. LIBS=$ac_check_lib_save_LIBS
  24698. fi
  24699. eval ac_res=\$$as_ac_Lib
  24700. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  24701. $as_echo "$ac_res" >&6; }
  24702. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  24703. AST_RADIUS_FOUND=yes
  24704. else
  24705. AST_RADIUS_FOUND=no
  24706. fi
  24707. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  24708. fi
  24709. # now check for the header.
  24710. if test "${AST_RADIUS_FOUND}" = "yes"; then
  24711. RADIUS_LIB="${pbxlibdir} -lradiusclient-ng "
  24712. # if --with-RADIUS=DIR has been specified, use it.
  24713. if test "x${RADIUS_DIR}" != "x"; then
  24714. RADIUS_INCLUDE="-I${RADIUS_DIR}/include"
  24715. fi
  24716. RADIUS_INCLUDE="${RADIUS_INCLUDE} "
  24717. if test "xradiusclient-ng.h" = "x" ; then # no header, assume found
  24718. RADIUS_HEADER_FOUND="1"
  24719. else # check for the header
  24720. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  24721. CPPFLAGS="${CPPFLAGS} ${RADIUS_INCLUDE}"
  24722. ac_fn_c_check_header_mongrel "$LINENO" "radiusclient-ng.h" "ac_cv_header_radiusclient_ng_h" "$ac_includes_default"
  24723. if test "x$ac_cv_header_radiusclient_ng_h" = xyes; then :
  24724. RADIUS_HEADER_FOUND=1
  24725. else
  24726. RADIUS_HEADER_FOUND=0
  24727. fi
  24728. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  24729. fi
  24730. if test "x${RADIUS_HEADER_FOUND}" = "x0" ; then
  24731. RADIUS_LIB=""
  24732. RADIUS_INCLUDE=""
  24733. else
  24734. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  24735. RADIUS_LIB=""
  24736. fi
  24737. PBX_RADIUS=1
  24738. cat >>confdefs.h <<_ACEOF
  24739. #define HAVE_RADIUS 1
  24740. _ACEOF
  24741. fi
  24742. fi
  24743. fi
  24744. fi
  24745. if test "x${PBX_COROSYNC}" != "x1" -a "${USE_COROSYNC}" != "no"; then
  24746. pbxlibdir=""
  24747. # if --with-COROSYNC=DIR has been specified, use it.
  24748. if test "x${COROSYNC_DIR}" != "x"; then
  24749. if test -d ${COROSYNC_DIR}/lib; then
  24750. pbxlibdir="-L${COROSYNC_DIR}/lib"
  24751. else
  24752. pbxlibdir="-L${COROSYNC_DIR}"
  24753. fi
  24754. fi
  24755. pbxfuncname="cpg_join"
  24756. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  24757. AST_COROSYNC_FOUND=yes
  24758. else
  24759. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  24760. CFLAGS="${CFLAGS} "
  24761. as_ac_Lib=`$as_echo "ac_cv_lib_cpg_${pbxfuncname}" | $as_tr_sh`
  24762. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lcpg" >&5
  24763. $as_echo_n "checking for ${pbxfuncname} in -lcpg... " >&6; }
  24764. if eval \${$as_ac_Lib+:} false; then :
  24765. $as_echo_n "(cached) " >&6
  24766. else
  24767. ac_check_lib_save_LIBS=$LIBS
  24768. LIBS="-lcpg ${pbxlibdir} -lcfg $LIBS"
  24769. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24770. /* end confdefs.h. */
  24771. /* Override any GCC internal prototype to avoid an error.
  24772. Use char because int might match the return type of a GCC
  24773. builtin and then its argument prototype would still apply. */
  24774. #ifdef __cplusplus
  24775. extern "C"
  24776. #endif
  24777. char ${pbxfuncname} ();
  24778. int
  24779. main ()
  24780. {
  24781. return ${pbxfuncname} ();
  24782. ;
  24783. return 0;
  24784. }
  24785. _ACEOF
  24786. if ac_fn_c_try_link "$LINENO"; then :
  24787. eval "$as_ac_Lib=yes"
  24788. else
  24789. eval "$as_ac_Lib=no"
  24790. fi
  24791. rm -f core conftest.err conftest.$ac_objext \
  24792. conftest$ac_exeext conftest.$ac_ext
  24793. LIBS=$ac_check_lib_save_LIBS
  24794. fi
  24795. eval ac_res=\$$as_ac_Lib
  24796. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  24797. $as_echo "$ac_res" >&6; }
  24798. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  24799. AST_COROSYNC_FOUND=yes
  24800. else
  24801. AST_COROSYNC_FOUND=no
  24802. fi
  24803. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  24804. fi
  24805. # now check for the header.
  24806. if test "${AST_COROSYNC_FOUND}" = "yes"; then
  24807. COROSYNC_LIB="${pbxlibdir} -lcpg -lcfg"
  24808. # if --with-COROSYNC=DIR has been specified, use it.
  24809. if test "x${COROSYNC_DIR}" != "x"; then
  24810. COROSYNC_INCLUDE="-I${COROSYNC_DIR}/include"
  24811. fi
  24812. COROSYNC_INCLUDE="${COROSYNC_INCLUDE} "
  24813. if test "xcorosync/cpg.h" = "x" ; then # no header, assume found
  24814. COROSYNC_HEADER_FOUND="1"
  24815. else # check for the header
  24816. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  24817. CPPFLAGS="${CPPFLAGS} ${COROSYNC_INCLUDE}"
  24818. ac_fn_c_check_header_mongrel "$LINENO" "corosync/cpg.h" "ac_cv_header_corosync_cpg_h" "$ac_includes_default"
  24819. if test "x$ac_cv_header_corosync_cpg_h" = xyes; then :
  24820. COROSYNC_HEADER_FOUND=1
  24821. else
  24822. COROSYNC_HEADER_FOUND=0
  24823. fi
  24824. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  24825. fi
  24826. if test "x${COROSYNC_HEADER_FOUND}" = "x0" ; then
  24827. COROSYNC_LIB=""
  24828. COROSYNC_INCLUDE=""
  24829. else
  24830. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  24831. COROSYNC_LIB=""
  24832. fi
  24833. PBX_COROSYNC=1
  24834. cat >>confdefs.h <<_ACEOF
  24835. #define HAVE_COROSYNC 1
  24836. _ACEOF
  24837. fi
  24838. fi
  24839. fi
  24840. if test "x${PBX_COROSYNC_CFG_STATE_TRACK}" != "x1" -a "${USE_COROSYNC_CFG_STATE_TRACK}" != "no"; then
  24841. pbxlibdir=""
  24842. # if --with-COROSYNC_CFG_STATE_TRACK=DIR has been specified, use it.
  24843. if test "x${COROSYNC_CFG_STATE_TRACK_DIR}" != "x"; then
  24844. if test -d ${COROSYNC_CFG_STATE_TRACK_DIR}/lib; then
  24845. pbxlibdir="-L${COROSYNC_CFG_STATE_TRACK_DIR}/lib"
  24846. else
  24847. pbxlibdir="-L${COROSYNC_CFG_STATE_TRACK_DIR}"
  24848. fi
  24849. fi
  24850. pbxfuncname="corosync_cfg_state_track"
  24851. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  24852. AST_COROSYNC_CFG_STATE_TRACK_FOUND=yes
  24853. else
  24854. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  24855. CFLAGS="${CFLAGS} "
  24856. as_ac_Lib=`$as_echo "ac_cv_lib_cfg_${pbxfuncname}" | $as_tr_sh`
  24857. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lcfg" >&5
  24858. $as_echo_n "checking for ${pbxfuncname} in -lcfg... " >&6; }
  24859. if eval \${$as_ac_Lib+:} false; then :
  24860. $as_echo_n "(cached) " >&6
  24861. else
  24862. ac_check_lib_save_LIBS=$LIBS
  24863. LIBS="-lcfg ${pbxlibdir} -lcfg $LIBS"
  24864. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24865. /* end confdefs.h. */
  24866. /* Override any GCC internal prototype to avoid an error.
  24867. Use char because int might match the return type of a GCC
  24868. builtin and then its argument prototype would still apply. */
  24869. #ifdef __cplusplus
  24870. extern "C"
  24871. #endif
  24872. char ${pbxfuncname} ();
  24873. int
  24874. main ()
  24875. {
  24876. return ${pbxfuncname} ();
  24877. ;
  24878. return 0;
  24879. }
  24880. _ACEOF
  24881. if ac_fn_c_try_link "$LINENO"; then :
  24882. eval "$as_ac_Lib=yes"
  24883. else
  24884. eval "$as_ac_Lib=no"
  24885. fi
  24886. rm -f core conftest.err conftest.$ac_objext \
  24887. conftest$ac_exeext conftest.$ac_ext
  24888. LIBS=$ac_check_lib_save_LIBS
  24889. fi
  24890. eval ac_res=\$$as_ac_Lib
  24891. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  24892. $as_echo "$ac_res" >&6; }
  24893. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  24894. AST_COROSYNC_CFG_STATE_TRACK_FOUND=yes
  24895. else
  24896. AST_COROSYNC_CFG_STATE_TRACK_FOUND=no
  24897. fi
  24898. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  24899. fi
  24900. # now check for the header.
  24901. if test "${AST_COROSYNC_CFG_STATE_TRACK_FOUND}" = "yes"; then
  24902. COROSYNC_CFG_STATE_TRACK_LIB="${pbxlibdir} -lcfg -lcfg"
  24903. # if --with-COROSYNC_CFG_STATE_TRACK=DIR has been specified, use it.
  24904. if test "x${COROSYNC_CFG_STATE_TRACK_DIR}" != "x"; then
  24905. COROSYNC_CFG_STATE_TRACK_INCLUDE="-I${COROSYNC_CFG_STATE_TRACK_DIR}/include"
  24906. fi
  24907. COROSYNC_CFG_STATE_TRACK_INCLUDE="${COROSYNC_CFG_STATE_TRACK_INCLUDE} "
  24908. if test "xcorosync/cfg.h" = "x" ; then # no header, assume found
  24909. COROSYNC_CFG_STATE_TRACK_HEADER_FOUND="1"
  24910. else # check for the header
  24911. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  24912. CPPFLAGS="${CPPFLAGS} ${COROSYNC_CFG_STATE_TRACK_INCLUDE}"
  24913. ac_fn_c_check_header_mongrel "$LINENO" "corosync/cfg.h" "ac_cv_header_corosync_cfg_h" "$ac_includes_default"
  24914. if test "x$ac_cv_header_corosync_cfg_h" = xyes; then :
  24915. COROSYNC_CFG_STATE_TRACK_HEADER_FOUND=1
  24916. else
  24917. COROSYNC_CFG_STATE_TRACK_HEADER_FOUND=0
  24918. fi
  24919. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  24920. fi
  24921. if test "x${COROSYNC_CFG_STATE_TRACK_HEADER_FOUND}" = "x0" ; then
  24922. COROSYNC_CFG_STATE_TRACK_LIB=""
  24923. COROSYNC_CFG_STATE_TRACK_INCLUDE=""
  24924. else
  24925. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  24926. COROSYNC_CFG_STATE_TRACK_LIB=""
  24927. fi
  24928. PBX_COROSYNC_CFG_STATE_TRACK=1
  24929. cat >>confdefs.h <<_ACEOF
  24930. #define HAVE_COROSYNC_CFG_STATE_TRACK 1
  24931. _ACEOF
  24932. fi
  24933. fi
  24934. fi
  24935. if test "x${PBX_SPEEX}" != "x1" -a "${USE_SPEEX}" != "no"; then
  24936. pbxlibdir=""
  24937. # if --with-SPEEX=DIR has been specified, use it.
  24938. if test "x${SPEEX_DIR}" != "x"; then
  24939. if test -d ${SPEEX_DIR}/lib; then
  24940. pbxlibdir="-L${SPEEX_DIR}/lib"
  24941. else
  24942. pbxlibdir="-L${SPEEX_DIR}"
  24943. fi
  24944. fi
  24945. pbxfuncname="speex_encode"
  24946. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  24947. AST_SPEEX_FOUND=yes
  24948. else
  24949. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  24950. CFLAGS="${CFLAGS} "
  24951. as_ac_Lib=`$as_echo "ac_cv_lib_speex_${pbxfuncname}" | $as_tr_sh`
  24952. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lspeex" >&5
  24953. $as_echo_n "checking for ${pbxfuncname} in -lspeex... " >&6; }
  24954. if eval \${$as_ac_Lib+:} false; then :
  24955. $as_echo_n "(cached) " >&6
  24956. else
  24957. ac_check_lib_save_LIBS=$LIBS
  24958. LIBS="-lspeex ${pbxlibdir} -lm $LIBS"
  24959. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24960. /* end confdefs.h. */
  24961. /* Override any GCC internal prototype to avoid an error.
  24962. Use char because int might match the return type of a GCC
  24963. builtin and then its argument prototype would still apply. */
  24964. #ifdef __cplusplus
  24965. extern "C"
  24966. #endif
  24967. char ${pbxfuncname} ();
  24968. int
  24969. main ()
  24970. {
  24971. return ${pbxfuncname} ();
  24972. ;
  24973. return 0;
  24974. }
  24975. _ACEOF
  24976. if ac_fn_c_try_link "$LINENO"; then :
  24977. eval "$as_ac_Lib=yes"
  24978. else
  24979. eval "$as_ac_Lib=no"
  24980. fi
  24981. rm -f core conftest.err conftest.$ac_objext \
  24982. conftest$ac_exeext conftest.$ac_ext
  24983. LIBS=$ac_check_lib_save_LIBS
  24984. fi
  24985. eval ac_res=\$$as_ac_Lib
  24986. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  24987. $as_echo "$ac_res" >&6; }
  24988. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  24989. AST_SPEEX_FOUND=yes
  24990. else
  24991. AST_SPEEX_FOUND=no
  24992. fi
  24993. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  24994. fi
  24995. # now check for the header.
  24996. if test "${AST_SPEEX_FOUND}" = "yes"; then
  24997. SPEEX_LIB="${pbxlibdir} -lspeex -lm"
  24998. # if --with-SPEEX=DIR has been specified, use it.
  24999. if test "x${SPEEX_DIR}" != "x"; then
  25000. SPEEX_INCLUDE="-I${SPEEX_DIR}/include"
  25001. fi
  25002. SPEEX_INCLUDE="${SPEEX_INCLUDE} "
  25003. if test "xspeex/speex.h" = "x" ; then # no header, assume found
  25004. SPEEX_HEADER_FOUND="1"
  25005. else # check for the header
  25006. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  25007. CPPFLAGS="${CPPFLAGS} ${SPEEX_INCLUDE}"
  25008. ac_fn_c_check_header_mongrel "$LINENO" "speex/speex.h" "ac_cv_header_speex_speex_h" "$ac_includes_default"
  25009. if test "x$ac_cv_header_speex_speex_h" = xyes; then :
  25010. SPEEX_HEADER_FOUND=1
  25011. else
  25012. SPEEX_HEADER_FOUND=0
  25013. fi
  25014. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  25015. fi
  25016. if test "x${SPEEX_HEADER_FOUND}" = "x0" ; then
  25017. SPEEX_LIB=""
  25018. SPEEX_INCLUDE=""
  25019. else
  25020. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  25021. SPEEX_LIB=""
  25022. fi
  25023. PBX_SPEEX=1
  25024. cat >>confdefs.h <<_ACEOF
  25025. #define HAVE_SPEEX 1
  25026. _ACEOF
  25027. fi
  25028. fi
  25029. fi
  25030. # See if the main speex library contains the preprocess functions
  25031. if test "x${PBX_SPEEX_PREPROCESS}" != "x1" -a "${USE_SPEEX_PREPROCESS}" != "no"; then
  25032. pbxlibdir=""
  25033. # if --with-SPEEX_PREPROCESS=DIR has been specified, use it.
  25034. if test "x${SPEEX_PREPROCESS_DIR}" != "x"; then
  25035. if test -d ${SPEEX_PREPROCESS_DIR}/lib; then
  25036. pbxlibdir="-L${SPEEX_PREPROCESS_DIR}/lib"
  25037. else
  25038. pbxlibdir="-L${SPEEX_PREPROCESS_DIR}"
  25039. fi
  25040. fi
  25041. pbxfuncname="speex_preprocess_ctl"
  25042. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  25043. AST_SPEEX_PREPROCESS_FOUND=yes
  25044. else
  25045. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  25046. CFLAGS="${CFLAGS} "
  25047. as_ac_Lib=`$as_echo "ac_cv_lib_speex_${pbxfuncname}" | $as_tr_sh`
  25048. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lspeex" >&5
  25049. $as_echo_n "checking for ${pbxfuncname} in -lspeex... " >&6; }
  25050. if eval \${$as_ac_Lib+:} false; then :
  25051. $as_echo_n "(cached) " >&6
  25052. else
  25053. ac_check_lib_save_LIBS=$LIBS
  25054. LIBS="-lspeex ${pbxlibdir} -lm $LIBS"
  25055. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  25056. /* end confdefs.h. */
  25057. /* Override any GCC internal prototype to avoid an error.
  25058. Use char because int might match the return type of a GCC
  25059. builtin and then its argument prototype would still apply. */
  25060. #ifdef __cplusplus
  25061. extern "C"
  25062. #endif
  25063. char ${pbxfuncname} ();
  25064. int
  25065. main ()
  25066. {
  25067. return ${pbxfuncname} ();
  25068. ;
  25069. return 0;
  25070. }
  25071. _ACEOF
  25072. if ac_fn_c_try_link "$LINENO"; then :
  25073. eval "$as_ac_Lib=yes"
  25074. else
  25075. eval "$as_ac_Lib=no"
  25076. fi
  25077. rm -f core conftest.err conftest.$ac_objext \
  25078. conftest$ac_exeext conftest.$ac_ext
  25079. LIBS=$ac_check_lib_save_LIBS
  25080. fi
  25081. eval ac_res=\$$as_ac_Lib
  25082. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  25083. $as_echo "$ac_res" >&6; }
  25084. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  25085. AST_SPEEX_PREPROCESS_FOUND=yes
  25086. else
  25087. AST_SPEEX_PREPROCESS_FOUND=no
  25088. fi
  25089. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  25090. fi
  25091. # now check for the header.
  25092. if test "${AST_SPEEX_PREPROCESS_FOUND}" = "yes"; then
  25093. SPEEX_PREPROCESS_LIB="${pbxlibdir} -lspeex -lm"
  25094. # if --with-SPEEX_PREPROCESS=DIR has been specified, use it.
  25095. if test "x${SPEEX_PREPROCESS_DIR}" != "x"; then
  25096. SPEEX_PREPROCESS_INCLUDE="-I${SPEEX_PREPROCESS_DIR}/include"
  25097. fi
  25098. SPEEX_PREPROCESS_INCLUDE="${SPEEX_PREPROCESS_INCLUDE} "
  25099. if test "xspeex/speex.h" = "x" ; then # no header, assume found
  25100. SPEEX_PREPROCESS_HEADER_FOUND="1"
  25101. else # check for the header
  25102. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  25103. CPPFLAGS="${CPPFLAGS} ${SPEEX_PREPROCESS_INCLUDE}"
  25104. ac_fn_c_check_header_mongrel "$LINENO" "speex/speex.h" "ac_cv_header_speex_speex_h" "$ac_includes_default"
  25105. if test "x$ac_cv_header_speex_speex_h" = xyes; then :
  25106. SPEEX_PREPROCESS_HEADER_FOUND=1
  25107. else
  25108. SPEEX_PREPROCESS_HEADER_FOUND=0
  25109. fi
  25110. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  25111. fi
  25112. if test "x${SPEEX_PREPROCESS_HEADER_FOUND}" = "x0" ; then
  25113. SPEEX_PREPROCESS_LIB=""
  25114. SPEEX_PREPROCESS_INCLUDE=""
  25115. else
  25116. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  25117. SPEEX_PREPROCESS_LIB=""
  25118. fi
  25119. PBX_SPEEX_PREPROCESS=1
  25120. cat >>confdefs.h <<_ACEOF
  25121. #define HAVE_SPEEX_PREPROCESS 1
  25122. _ACEOF
  25123. fi
  25124. fi
  25125. fi
  25126. if test "${PBX_SPEEX_PREPROCESS}" = 1; then
  25127. PBX_SPEEX_PREPROCESS=1
  25128. fi
  25129. if test "x${PBX_SPEEXDSP}" != "x1" -a "${USE_SPEEXDSP}" != "no"; then
  25130. pbxlibdir=""
  25131. # if --with-SPEEXDSP=DIR has been specified, use it.
  25132. if test "x${SPEEXDSP_DIR}" != "x"; then
  25133. if test -d ${SPEEXDSP_DIR}/lib; then
  25134. pbxlibdir="-L${SPEEXDSP_DIR}/lib"
  25135. else
  25136. pbxlibdir="-L${SPEEXDSP_DIR}"
  25137. fi
  25138. fi
  25139. pbxfuncname="speex_preprocess_ctl"
  25140. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  25141. AST_SPEEXDSP_FOUND=yes
  25142. else
  25143. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  25144. CFLAGS="${CFLAGS} "
  25145. as_ac_Lib=`$as_echo "ac_cv_lib_speexdsp_${pbxfuncname}" | $as_tr_sh`
  25146. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lspeexdsp" >&5
  25147. $as_echo_n "checking for ${pbxfuncname} in -lspeexdsp... " >&6; }
  25148. if eval \${$as_ac_Lib+:} false; then :
  25149. $as_echo_n "(cached) " >&6
  25150. else
  25151. ac_check_lib_save_LIBS=$LIBS
  25152. LIBS="-lspeexdsp ${pbxlibdir} -lm $LIBS"
  25153. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  25154. /* end confdefs.h. */
  25155. /* Override any GCC internal prototype to avoid an error.
  25156. Use char because int might match the return type of a GCC
  25157. builtin and then its argument prototype would still apply. */
  25158. #ifdef __cplusplus
  25159. extern "C"
  25160. #endif
  25161. char ${pbxfuncname} ();
  25162. int
  25163. main ()
  25164. {
  25165. return ${pbxfuncname} ();
  25166. ;
  25167. return 0;
  25168. }
  25169. _ACEOF
  25170. if ac_fn_c_try_link "$LINENO"; then :
  25171. eval "$as_ac_Lib=yes"
  25172. else
  25173. eval "$as_ac_Lib=no"
  25174. fi
  25175. rm -f core conftest.err conftest.$ac_objext \
  25176. conftest$ac_exeext conftest.$ac_ext
  25177. LIBS=$ac_check_lib_save_LIBS
  25178. fi
  25179. eval ac_res=\$$as_ac_Lib
  25180. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  25181. $as_echo "$ac_res" >&6; }
  25182. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  25183. AST_SPEEXDSP_FOUND=yes
  25184. else
  25185. AST_SPEEXDSP_FOUND=no
  25186. fi
  25187. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  25188. fi
  25189. # now check for the header.
  25190. if test "${AST_SPEEXDSP_FOUND}" = "yes"; then
  25191. SPEEXDSP_LIB="${pbxlibdir} -lspeexdsp -lm"
  25192. # if --with-SPEEXDSP=DIR has been specified, use it.
  25193. if test "x${SPEEXDSP_DIR}" != "x"; then
  25194. SPEEXDSP_INCLUDE="-I${SPEEXDSP_DIR}/include"
  25195. fi
  25196. SPEEXDSP_INCLUDE="${SPEEXDSP_INCLUDE} "
  25197. if test "xspeex/speex.h" = "x" ; then # no header, assume found
  25198. SPEEXDSP_HEADER_FOUND="1"
  25199. else # check for the header
  25200. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  25201. CPPFLAGS="${CPPFLAGS} ${SPEEXDSP_INCLUDE}"
  25202. ac_fn_c_check_header_mongrel "$LINENO" "speex/speex.h" "ac_cv_header_speex_speex_h" "$ac_includes_default"
  25203. if test "x$ac_cv_header_speex_speex_h" = xyes; then :
  25204. SPEEXDSP_HEADER_FOUND=1
  25205. else
  25206. SPEEXDSP_HEADER_FOUND=0
  25207. fi
  25208. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  25209. fi
  25210. if test "x${SPEEXDSP_HEADER_FOUND}" = "x0" ; then
  25211. SPEEXDSP_LIB=""
  25212. SPEEXDSP_INCLUDE=""
  25213. else
  25214. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  25215. SPEEXDSP_LIB=""
  25216. fi
  25217. PBX_SPEEXDSP=1
  25218. cat >>confdefs.h <<_ACEOF
  25219. #define HAVE_SPEEXDSP 1
  25220. _ACEOF
  25221. fi
  25222. fi
  25223. fi
  25224. if test "${PBX_SPEEXDSP}" = 1; then
  25225. PBX_SPEEX_PREPROCESS=1
  25226. fi
  25227. if test "x${PBX_SQLITE}" != "x1" -a "${USE_SQLITE}" != "no"; then
  25228. pbxlibdir=""
  25229. # if --with-SQLITE=DIR has been specified, use it.
  25230. if test "x${SQLITE_DIR}" != "x"; then
  25231. if test -d ${SQLITE_DIR}/lib; then
  25232. pbxlibdir="-L${SQLITE_DIR}/lib"
  25233. else
  25234. pbxlibdir="-L${SQLITE_DIR}"
  25235. fi
  25236. fi
  25237. pbxfuncname="sqlite_exec"
  25238. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  25239. AST_SQLITE_FOUND=yes
  25240. else
  25241. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  25242. CFLAGS="${CFLAGS} "
  25243. as_ac_Lib=`$as_echo "ac_cv_lib_sqlite_${pbxfuncname}" | $as_tr_sh`
  25244. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsqlite" >&5
  25245. $as_echo_n "checking for ${pbxfuncname} in -lsqlite... " >&6; }
  25246. if eval \${$as_ac_Lib+:} false; then :
  25247. $as_echo_n "(cached) " >&6
  25248. else
  25249. ac_check_lib_save_LIBS=$LIBS
  25250. LIBS="-lsqlite ${pbxlibdir} $LIBS"
  25251. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  25252. /* end confdefs.h. */
  25253. /* Override any GCC internal prototype to avoid an error.
  25254. Use char because int might match the return type of a GCC
  25255. builtin and then its argument prototype would still apply. */
  25256. #ifdef __cplusplus
  25257. extern "C"
  25258. #endif
  25259. char ${pbxfuncname} ();
  25260. int
  25261. main ()
  25262. {
  25263. return ${pbxfuncname} ();
  25264. ;
  25265. return 0;
  25266. }
  25267. _ACEOF
  25268. if ac_fn_c_try_link "$LINENO"; then :
  25269. eval "$as_ac_Lib=yes"
  25270. else
  25271. eval "$as_ac_Lib=no"
  25272. fi
  25273. rm -f core conftest.err conftest.$ac_objext \
  25274. conftest$ac_exeext conftest.$ac_ext
  25275. LIBS=$ac_check_lib_save_LIBS
  25276. fi
  25277. eval ac_res=\$$as_ac_Lib
  25278. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  25279. $as_echo "$ac_res" >&6; }
  25280. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  25281. AST_SQLITE_FOUND=yes
  25282. else
  25283. AST_SQLITE_FOUND=no
  25284. fi
  25285. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  25286. fi
  25287. # now check for the header.
  25288. if test "${AST_SQLITE_FOUND}" = "yes"; then
  25289. SQLITE_LIB="${pbxlibdir} -lsqlite "
  25290. # if --with-SQLITE=DIR has been specified, use it.
  25291. if test "x${SQLITE_DIR}" != "x"; then
  25292. SQLITE_INCLUDE="-I${SQLITE_DIR}/include"
  25293. fi
  25294. SQLITE_INCLUDE="${SQLITE_INCLUDE} "
  25295. if test "xsqlite.h" = "x" ; then # no header, assume found
  25296. SQLITE_HEADER_FOUND="1"
  25297. else # check for the header
  25298. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  25299. CPPFLAGS="${CPPFLAGS} ${SQLITE_INCLUDE}"
  25300. ac_fn_c_check_header_mongrel "$LINENO" "sqlite.h" "ac_cv_header_sqlite_h" "$ac_includes_default"
  25301. if test "x$ac_cv_header_sqlite_h" = xyes; then :
  25302. SQLITE_HEADER_FOUND=1
  25303. else
  25304. SQLITE_HEADER_FOUND=0
  25305. fi
  25306. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  25307. fi
  25308. if test "x${SQLITE_HEADER_FOUND}" = "x0" ; then
  25309. SQLITE_LIB=""
  25310. SQLITE_INCLUDE=""
  25311. else
  25312. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  25313. SQLITE_LIB=""
  25314. fi
  25315. PBX_SQLITE=1
  25316. cat >>confdefs.h <<_ACEOF
  25317. #define HAVE_SQLITE 1
  25318. _ACEOF
  25319. fi
  25320. fi
  25321. fi
  25322. if test "x${PBX_SQLITE3}" != "x1" -a "${USE_SQLITE3}" != "no"; then
  25323. pbxlibdir=""
  25324. # if --with-SQLITE3=DIR has been specified, use it.
  25325. if test "x${SQLITE3_DIR}" != "x"; then
  25326. if test -d ${SQLITE3_DIR}/lib; then
  25327. pbxlibdir="-L${SQLITE3_DIR}/lib"
  25328. else
  25329. pbxlibdir="-L${SQLITE3_DIR}"
  25330. fi
  25331. fi
  25332. pbxfuncname="sqlite3_open"
  25333. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  25334. AST_SQLITE3_FOUND=yes
  25335. else
  25336. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  25337. CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
  25338. as_ac_Lib=`$as_echo "ac_cv_lib_sqlite3_${pbxfuncname}" | $as_tr_sh`
  25339. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsqlite3" >&5
  25340. $as_echo_n "checking for ${pbxfuncname} in -lsqlite3... " >&6; }
  25341. if eval \${$as_ac_Lib+:} false; then :
  25342. $as_echo_n "(cached) " >&6
  25343. else
  25344. ac_check_lib_save_LIBS=$LIBS
  25345. LIBS="-lsqlite3 ${pbxlibdir} ${PTHREAD_LIBS} $LIBS"
  25346. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  25347. /* end confdefs.h. */
  25348. /* Override any GCC internal prototype to avoid an error.
  25349. Use char because int might match the return type of a GCC
  25350. builtin and then its argument prototype would still apply. */
  25351. #ifdef __cplusplus
  25352. extern "C"
  25353. #endif
  25354. char ${pbxfuncname} ();
  25355. int
  25356. main ()
  25357. {
  25358. return ${pbxfuncname} ();
  25359. ;
  25360. return 0;
  25361. }
  25362. _ACEOF
  25363. if ac_fn_c_try_link "$LINENO"; then :
  25364. eval "$as_ac_Lib=yes"
  25365. else
  25366. eval "$as_ac_Lib=no"
  25367. fi
  25368. rm -f core conftest.err conftest.$ac_objext \
  25369. conftest$ac_exeext conftest.$ac_ext
  25370. LIBS=$ac_check_lib_save_LIBS
  25371. fi
  25372. eval ac_res=\$$as_ac_Lib
  25373. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  25374. $as_echo "$ac_res" >&6; }
  25375. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  25376. AST_SQLITE3_FOUND=yes
  25377. else
  25378. AST_SQLITE3_FOUND=no
  25379. fi
  25380. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  25381. fi
  25382. # now check for the header.
  25383. if test "${AST_SQLITE3_FOUND}" = "yes"; then
  25384. SQLITE3_LIB="${pbxlibdir} -lsqlite3 ${PTHREAD_LIBS}"
  25385. # if --with-SQLITE3=DIR has been specified, use it.
  25386. if test "x${SQLITE3_DIR}" != "x"; then
  25387. SQLITE3_INCLUDE="-I${SQLITE3_DIR}/include"
  25388. fi
  25389. SQLITE3_INCLUDE="${SQLITE3_INCLUDE} ${PTHREAD_CFLAGS}"
  25390. if test "xsqlite3.h" = "x" ; then # no header, assume found
  25391. SQLITE3_HEADER_FOUND="1"
  25392. else # check for the header
  25393. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  25394. CPPFLAGS="${CPPFLAGS} ${SQLITE3_INCLUDE}"
  25395. ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
  25396. if test "x$ac_cv_header_sqlite3_h" = xyes; then :
  25397. SQLITE3_HEADER_FOUND=1
  25398. else
  25399. SQLITE3_HEADER_FOUND=0
  25400. fi
  25401. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  25402. fi
  25403. if test "x${SQLITE3_HEADER_FOUND}" = "x0" ; then
  25404. SQLITE3_LIB=""
  25405. SQLITE3_INCLUDE=""
  25406. else
  25407. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  25408. SQLITE3_LIB=""
  25409. fi
  25410. PBX_SQLITE3=1
  25411. cat >>confdefs.h <<_ACEOF
  25412. #define HAVE_SQLITE3 1
  25413. _ACEOF
  25414. fi
  25415. fi
  25416. fi
  25417. if test "${PBX_SQLITE3}" != 1; then
  25418. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Asterisk now uses SQLite3 for the internal Asterisk database." >&5
  25419. $as_echo "$as_me: WARNING: *** Asterisk now uses SQLite3 for the internal Asterisk database." >&2;}
  25420. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Please install the SQLite3 development package." >&5
  25421. $as_echo "$as_me: WARNING: *** Please install the SQLite3 development package." >&2;}
  25422. exit 1
  25423. fi
  25424. # Find crypt support
  25425. # * -lcrypt on *NIX
  25426. # * in libsystem on OS X
  25427. if test "x${PBX_LIBCRYPT}" != "x1" -a "${USE_LIBCRYPT}" != "no"; then
  25428. pbxlibdir=""
  25429. # if --with-LIBCRYPT=DIR has been specified, use it.
  25430. if test "x${LIBCRYPT_DIR}" != "x"; then
  25431. if test -d ${LIBCRYPT_DIR}/lib; then
  25432. pbxlibdir="-L${LIBCRYPT_DIR}/lib"
  25433. else
  25434. pbxlibdir="-L${LIBCRYPT_DIR}"
  25435. fi
  25436. fi
  25437. pbxfuncname="crypt"
  25438. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  25439. AST_LIBCRYPT_FOUND=yes
  25440. else
  25441. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  25442. CFLAGS="${CFLAGS} "
  25443. as_ac_Lib=`$as_echo "ac_cv_lib_crypt_${pbxfuncname}" | $as_tr_sh`
  25444. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lcrypt" >&5
  25445. $as_echo_n "checking for ${pbxfuncname} in -lcrypt... " >&6; }
  25446. if eval \${$as_ac_Lib+:} false; then :
  25447. $as_echo_n "(cached) " >&6
  25448. else
  25449. ac_check_lib_save_LIBS=$LIBS
  25450. LIBS="-lcrypt ${pbxlibdir} $LIBS"
  25451. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  25452. /* end confdefs.h. */
  25453. /* Override any GCC internal prototype to avoid an error.
  25454. Use char because int might match the return type of a GCC
  25455. builtin and then its argument prototype would still apply. */
  25456. #ifdef __cplusplus
  25457. extern "C"
  25458. #endif
  25459. char ${pbxfuncname} ();
  25460. int
  25461. main ()
  25462. {
  25463. return ${pbxfuncname} ();
  25464. ;
  25465. return 0;
  25466. }
  25467. _ACEOF
  25468. if ac_fn_c_try_link "$LINENO"; then :
  25469. eval "$as_ac_Lib=yes"
  25470. else
  25471. eval "$as_ac_Lib=no"
  25472. fi
  25473. rm -f core conftest.err conftest.$ac_objext \
  25474. conftest$ac_exeext conftest.$ac_ext
  25475. LIBS=$ac_check_lib_save_LIBS
  25476. fi
  25477. eval ac_res=\$$as_ac_Lib
  25478. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  25479. $as_echo "$ac_res" >&6; }
  25480. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  25481. AST_LIBCRYPT_FOUND=yes
  25482. else
  25483. AST_LIBCRYPT_FOUND=no
  25484. fi
  25485. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  25486. fi
  25487. # now check for the header.
  25488. if test "${AST_LIBCRYPT_FOUND}" = "yes"; then
  25489. LIBCRYPT_LIB="${pbxlibdir} -lcrypt "
  25490. # if --with-LIBCRYPT=DIR has been specified, use it.
  25491. if test "x${LIBCRYPT_DIR}" != "x"; then
  25492. LIBCRYPT_INCLUDE="-I${LIBCRYPT_DIR}/include"
  25493. fi
  25494. LIBCRYPT_INCLUDE="${LIBCRYPT_INCLUDE} "
  25495. if test "xcrypt.h" = "x" ; then # no header, assume found
  25496. LIBCRYPT_HEADER_FOUND="1"
  25497. else # check for the header
  25498. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  25499. CPPFLAGS="${CPPFLAGS} ${LIBCRYPT_INCLUDE}"
  25500. ac_fn_c_check_header_mongrel "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default"
  25501. if test "x$ac_cv_header_crypt_h" = xyes; then :
  25502. LIBCRYPT_HEADER_FOUND=1
  25503. else
  25504. LIBCRYPT_HEADER_FOUND=0
  25505. fi
  25506. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  25507. fi
  25508. if test "x${LIBCRYPT_HEADER_FOUND}" = "x0" ; then
  25509. LIBCRYPT_LIB=""
  25510. LIBCRYPT_INCLUDE=""
  25511. else
  25512. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  25513. LIBCRYPT_LIB=""
  25514. fi
  25515. PBX_LIBCRYPT=1
  25516. cat >>confdefs.h <<_ACEOF
  25517. #define HAVE_LIBCRYPT 1
  25518. _ACEOF
  25519. fi
  25520. fi
  25521. fi
  25522. ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
  25523. if test "x$ac_cv_func_crypt" = xyes; then :
  25524. SYSCRYPT=true
  25525. else
  25526. SYSCRYPT=""
  25527. fi
  25528. if test "x$LIBCRYPT_LIB" != "x" ; then
  25529. CRYPT_LIB="$LIBCRYPT_LIB"
  25530. CRYPT_INCLUDE="$LIBCRYPT_INCLUDE"
  25531. $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
  25532. elif test "x$SYSCRYPT" != "x" ; then
  25533. CRYPT_LIB=""
  25534. CRYPT_INCLUDE=""
  25535. $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
  25536. fi
  25537. # Find crypt_r support
  25538. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt_r in -lcrypt" >&5
  25539. $as_echo_n "checking for crypt_r in -lcrypt... " >&6; }
  25540. if ${ac_cv_lib_crypt_crypt_r+:} false; then :
  25541. $as_echo_n "(cached) " >&6
  25542. else
  25543. ac_check_lib_save_LIBS=$LIBS
  25544. LIBS="-lcrypt $LIBS"
  25545. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  25546. /* end confdefs.h. */
  25547. /* Override any GCC internal prototype to avoid an error.
  25548. Use char because int might match the return type of a GCC
  25549. builtin and then its argument prototype would still apply. */
  25550. #ifdef __cplusplus
  25551. extern "C"
  25552. #endif
  25553. char crypt_r ();
  25554. int
  25555. main ()
  25556. {
  25557. return crypt_r ();
  25558. ;
  25559. return 0;
  25560. }
  25561. _ACEOF
  25562. if ac_fn_c_try_link "$LINENO"; then :
  25563. ac_cv_lib_crypt_crypt_r=yes
  25564. else
  25565. ac_cv_lib_crypt_crypt_r=no
  25566. fi
  25567. rm -f core conftest.err conftest.$ac_objext \
  25568. conftest$ac_exeext conftest.$ac_ext
  25569. LIBS=$ac_check_lib_save_LIBS
  25570. fi
  25571. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt_r" >&5
  25572. $as_echo "$ac_cv_lib_crypt_crypt_r" >&6; }
  25573. if test "x$ac_cv_lib_crypt_crypt_r" = xyes; then :
  25574. $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
  25575. fi
  25576. if test "x${PBX_CRYPTO}" != "x1" -a "${USE_CRYPTO}" != "no"; then
  25577. pbxlibdir=""
  25578. # if --with-CRYPTO=DIR has been specified, use it.
  25579. if test "x${CRYPTO_DIR}" != "x"; then
  25580. if test -d ${CRYPTO_DIR}/lib; then
  25581. pbxlibdir="-L${CRYPTO_DIR}/lib"
  25582. else
  25583. pbxlibdir="-L${CRYPTO_DIR}"
  25584. fi
  25585. fi
  25586. pbxfuncname="AES_encrypt"
  25587. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  25588. AST_CRYPTO_FOUND=yes
  25589. else
  25590. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  25591. CFLAGS="${CFLAGS} "
  25592. as_ac_Lib=`$as_echo "ac_cv_lib_crypto_${pbxfuncname}" | $as_tr_sh`
  25593. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lcrypto" >&5
  25594. $as_echo_n "checking for ${pbxfuncname} in -lcrypto... " >&6; }
  25595. if eval \${$as_ac_Lib+:} false; then :
  25596. $as_echo_n "(cached) " >&6
  25597. else
  25598. ac_check_lib_save_LIBS=$LIBS
  25599. LIBS="-lcrypto ${pbxlibdir} $LIBS"
  25600. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  25601. /* end confdefs.h. */
  25602. /* Override any GCC internal prototype to avoid an error.
  25603. Use char because int might match the return type of a GCC
  25604. builtin and then its argument prototype would still apply. */
  25605. #ifdef __cplusplus
  25606. extern "C"
  25607. #endif
  25608. char ${pbxfuncname} ();
  25609. int
  25610. main ()
  25611. {
  25612. return ${pbxfuncname} ();
  25613. ;
  25614. return 0;
  25615. }
  25616. _ACEOF
  25617. if ac_fn_c_try_link "$LINENO"; then :
  25618. eval "$as_ac_Lib=yes"
  25619. else
  25620. eval "$as_ac_Lib=no"
  25621. fi
  25622. rm -f core conftest.err conftest.$ac_objext \
  25623. conftest$ac_exeext conftest.$ac_ext
  25624. LIBS=$ac_check_lib_save_LIBS
  25625. fi
  25626. eval ac_res=\$$as_ac_Lib
  25627. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  25628. $as_echo "$ac_res" >&6; }
  25629. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  25630. AST_CRYPTO_FOUND=yes
  25631. else
  25632. AST_CRYPTO_FOUND=no
  25633. fi
  25634. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  25635. fi
  25636. # now check for the header.
  25637. if test "${AST_CRYPTO_FOUND}" = "yes"; then
  25638. CRYPTO_LIB="${pbxlibdir} -lcrypto "
  25639. # if --with-CRYPTO=DIR has been specified, use it.
  25640. if test "x${CRYPTO_DIR}" != "x"; then
  25641. CRYPTO_INCLUDE="-I${CRYPTO_DIR}/include"
  25642. fi
  25643. CRYPTO_INCLUDE="${CRYPTO_INCLUDE} "
  25644. if test "xopenssl/aes.h" = "x" ; then # no header, assume found
  25645. CRYPTO_HEADER_FOUND="1"
  25646. else # check for the header
  25647. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  25648. CPPFLAGS="${CPPFLAGS} ${CRYPTO_INCLUDE}"
  25649. ac_fn_c_check_header_mongrel "$LINENO" "openssl/aes.h" "ac_cv_header_openssl_aes_h" "$ac_includes_default"
  25650. if test "x$ac_cv_header_openssl_aes_h" = xyes; then :
  25651. CRYPTO_HEADER_FOUND=1
  25652. else
  25653. CRYPTO_HEADER_FOUND=0
  25654. fi
  25655. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  25656. fi
  25657. if test "x${CRYPTO_HEADER_FOUND}" = "x0" ; then
  25658. CRYPTO_LIB=""
  25659. CRYPTO_INCLUDE=""
  25660. else
  25661. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  25662. CRYPTO_LIB=""
  25663. fi
  25664. PBX_CRYPTO=1
  25665. cat >>confdefs.h <<_ACEOF
  25666. #define HAVE_CRYPTO 1
  25667. _ACEOF
  25668. fi
  25669. fi
  25670. fi
  25671. if test "$PBX_CRYPTO" = "1";
  25672. then
  25673. if test "x${PBX_OPENSSL}" != "x1" -a "${USE_OPENSSL}" != "no"; then
  25674. pbxlibdir=""
  25675. # if --with-OPENSSL=DIR has been specified, use it.
  25676. if test "x${OPENSSL_DIR}" != "x"; then
  25677. if test -d ${OPENSSL_DIR}/lib; then
  25678. pbxlibdir="-L${OPENSSL_DIR}/lib"
  25679. else
  25680. pbxlibdir="-L${OPENSSL_DIR}"
  25681. fi
  25682. fi
  25683. pbxfuncname="SSL_connect"
  25684. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  25685. AST_OPENSSL_FOUND=yes
  25686. else
  25687. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  25688. CFLAGS="${CFLAGS} "
  25689. as_ac_Lib=`$as_echo "ac_cv_lib_ssl_${pbxfuncname}" | $as_tr_sh`
  25690. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lssl" >&5
  25691. $as_echo_n "checking for ${pbxfuncname} in -lssl... " >&6; }
  25692. if eval \${$as_ac_Lib+:} false; then :
  25693. $as_echo_n "(cached) " >&6
  25694. else
  25695. ac_check_lib_save_LIBS=$LIBS
  25696. LIBS="-lssl ${pbxlibdir} -lcrypto $LIBS"
  25697. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  25698. /* end confdefs.h. */
  25699. /* Override any GCC internal prototype to avoid an error.
  25700. Use char because int might match the return type of a GCC
  25701. builtin and then its argument prototype would still apply. */
  25702. #ifdef __cplusplus
  25703. extern "C"
  25704. #endif
  25705. char ${pbxfuncname} ();
  25706. int
  25707. main ()
  25708. {
  25709. return ${pbxfuncname} ();
  25710. ;
  25711. return 0;
  25712. }
  25713. _ACEOF
  25714. if ac_fn_c_try_link "$LINENO"; then :
  25715. eval "$as_ac_Lib=yes"
  25716. else
  25717. eval "$as_ac_Lib=no"
  25718. fi
  25719. rm -f core conftest.err conftest.$ac_objext \
  25720. conftest$ac_exeext conftest.$ac_ext
  25721. LIBS=$ac_check_lib_save_LIBS
  25722. fi
  25723. eval ac_res=\$$as_ac_Lib
  25724. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  25725. $as_echo "$ac_res" >&6; }
  25726. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  25727. AST_OPENSSL_FOUND=yes
  25728. else
  25729. AST_OPENSSL_FOUND=no
  25730. fi
  25731. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  25732. fi
  25733. # now check for the header.
  25734. if test "${AST_OPENSSL_FOUND}" = "yes"; then
  25735. OPENSSL_LIB="${pbxlibdir} -lssl -lcrypto"
  25736. # if --with-OPENSSL=DIR has been specified, use it.
  25737. if test "x${OPENSSL_DIR}" != "x"; then
  25738. OPENSSL_INCLUDE="-I${OPENSSL_DIR}/include"
  25739. fi
  25740. OPENSSL_INCLUDE="${OPENSSL_INCLUDE} "
  25741. if test "xopenssl/ssl.h" = "x" ; then # no header, assume found
  25742. OPENSSL_HEADER_FOUND="1"
  25743. else # check for the header
  25744. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  25745. CPPFLAGS="${CPPFLAGS} ${OPENSSL_INCLUDE}"
  25746. ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
  25747. if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
  25748. OPENSSL_HEADER_FOUND=1
  25749. else
  25750. OPENSSL_HEADER_FOUND=0
  25751. fi
  25752. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  25753. fi
  25754. if test "x${OPENSSL_HEADER_FOUND}" = "x0" ; then
  25755. OPENSSL_LIB=""
  25756. OPENSSL_INCLUDE=""
  25757. else
  25758. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  25759. OPENSSL_LIB=""
  25760. fi
  25761. PBX_OPENSSL=1
  25762. cat >>confdefs.h <<_ACEOF
  25763. #define HAVE_OPENSSL 1
  25764. _ACEOF
  25765. fi
  25766. fi
  25767. fi
  25768. fi
  25769. if test "$PBX_OPENSSL" = "1";
  25770. then
  25771. # if OSPTK has not been checked and is not excluded
  25772. if test "x${PBX_OSPTK}" != "x1" -a "${USE_OSPTK}" != "no"; then
  25773. # if --with-osptk=DIR has been specified, use it.
  25774. if test "x${OSPTK_DIR}" != "x"; then
  25775. osptk_cflags="-I${OSPTK_DIR}/include"
  25776. osptk_ldflags="-L${OSPTK_DIR}/lib"
  25777. else
  25778. osptk_cflags=""
  25779. osptk_ldflags=""
  25780. fi
  25781. # check for the header
  25782. osptk_saved_cppflags="${CPPFLAGS}"
  25783. CPPFLAGS="${CPPFLAGS} ${osptk_cflags}"
  25784. ac_fn_c_check_header_mongrel "$LINENO" "osp/osp.h" "ac_cv_header_osp_osp_h" "$ac_includes_default"
  25785. if test "x$ac_cv_header_osp_osp_h" = xyes; then :
  25786. osptk_header_found=yes
  25787. else
  25788. osptk_header_found=no
  25789. fi
  25790. CPPFLAGS="${osptk_saved_cppflags}"
  25791. # check for the library
  25792. if test "${osptk_header_found}" = "yes"; then
  25793. osptk_extralibs="-lssl -lcrypto"
  25794. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSPPInit in -losptk" >&5
  25795. $as_echo_n "checking for OSPPInit in -losptk... " >&6; }
  25796. if ${ac_cv_lib_osptk_OSPPInit+:} false; then :
  25797. $as_echo_n "(cached) " >&6
  25798. else
  25799. ac_check_lib_save_LIBS=$LIBS
  25800. LIBS="-losptk ${osptk_ldflags} ${osptk_extralibs} $LIBS"
  25801. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  25802. /* end confdefs.h. */
  25803. /* Override any GCC internal prototype to avoid an error.
  25804. Use char because int might match the return type of a GCC
  25805. builtin and then its argument prototype would still apply. */
  25806. #ifdef __cplusplus
  25807. extern "C"
  25808. #endif
  25809. char OSPPInit ();
  25810. int
  25811. main ()
  25812. {
  25813. return OSPPInit ();
  25814. ;
  25815. return 0;
  25816. }
  25817. _ACEOF
  25818. if ac_fn_c_try_link "$LINENO"; then :
  25819. ac_cv_lib_osptk_OSPPInit=yes
  25820. else
  25821. ac_cv_lib_osptk_OSPPInit=no
  25822. fi
  25823. rm -f core conftest.err conftest.$ac_objext \
  25824. conftest$ac_exeext conftest.$ac_ext
  25825. LIBS=$ac_check_lib_save_LIBS
  25826. fi
  25827. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_osptk_OSPPInit" >&5
  25828. $as_echo "$ac_cv_lib_osptk_OSPPInit" >&6; }
  25829. if test "x$ac_cv_lib_osptk_OSPPInit" = xyes; then :
  25830. osptk_library_found=yes
  25831. else
  25832. osptk_library_found=no
  25833. fi
  25834. # check OSP Toolkit version
  25835. if test "${osptk_library_found}" = "yes"; then
  25836. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OSP Toolkit version is compatible with app_osplookup" >&5
  25837. $as_echo_n "checking if OSP Toolkit version is compatible with app_osplookup... " >&6; }
  25838. osptk_saved_cppflags="${CPPFLAGS}"
  25839. CPPFLAGS="${CPPFLAGS} ${osptk_cflags}"
  25840. if test "$cross_compiling" = yes; then :
  25841. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  25842. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  25843. as_fn_error $? "cannot run test program while cross compiling
  25844. See \`config.log' for more details" "$LINENO" 5; }
  25845. else
  25846. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  25847. /* end confdefs.h. */
  25848. #include <osp/osp.h>
  25849. int main(void) {
  25850. int ver = OSP_CLIENT_TOOLKIT_VERSION_MAJOR * 10000 + OSP_CLIENT_TOOLKIT_VERSION_MINOR * 100 + OSP_CLIENT_TOOLKIT_VERSION_BUGFIX;
  25851. int req = 4 * 10000 + 0 * 100 + 0;
  25852. return (ver < req) ? 1 : 0;
  25853. }
  25854. _ACEOF
  25855. if ac_fn_c_try_run "$LINENO"; then :
  25856. osptk_compatible=yes
  25857. else
  25858. osptk_compatible=no
  25859. fi
  25860. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  25861. conftest.$ac_objext conftest.beam conftest.$ac_ext
  25862. fi
  25863. CPPFLAGS="${osptk_saved_cppflags}"
  25864. if test "${osptk_compatible}" = "yes"; then
  25865. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  25866. $as_echo "yes" >&6; }
  25867. PBX_OSPTK=1
  25868. OSPTK_INCLUDE="${osptk_cflags}"
  25869. OSPTK_LIB="${osptk_ldflags} -losptk ${osptk_extralibs}"
  25870. cat >>confdefs.h <<_ACEOF
  25871. #define HAVE_OSPTK 1
  25872. _ACEOF
  25873. else
  25874. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  25875. $as_echo "no" >&6; }
  25876. fi
  25877. fi
  25878. fi
  25879. fi
  25880. if test "x${PBX_OPENSSL_SRTP}" != "x1" -a "${USE_OPENSSL_SRTP}" != "no"; then
  25881. pbxlibdir=""
  25882. # if --with-OPENSSL_SRTP=DIR has been specified, use it.
  25883. if test "x${OPENSSL_SRTP_DIR}" != "x"; then
  25884. if test -d ${OPENSSL_SRTP_DIR}/lib; then
  25885. pbxlibdir="-L${OPENSSL_SRTP_DIR}/lib"
  25886. else
  25887. pbxlibdir="-L${OPENSSL_SRTP_DIR}"
  25888. fi
  25889. fi
  25890. pbxfuncname="SSL_CTX_set_tlsext_use_srtp"
  25891. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  25892. AST_OPENSSL_SRTP_FOUND=yes
  25893. else
  25894. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  25895. CFLAGS="${CFLAGS} "
  25896. as_ac_Lib=`$as_echo "ac_cv_lib_ssl_${pbxfuncname}" | $as_tr_sh`
  25897. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lssl" >&5
  25898. $as_echo_n "checking for ${pbxfuncname} in -lssl... " >&6; }
  25899. if eval \${$as_ac_Lib+:} false; then :
  25900. $as_echo_n "(cached) " >&6
  25901. else
  25902. ac_check_lib_save_LIBS=$LIBS
  25903. LIBS="-lssl ${pbxlibdir} -lcrypto $LIBS"
  25904. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  25905. /* end confdefs.h. */
  25906. /* Override any GCC internal prototype to avoid an error.
  25907. Use char because int might match the return type of a GCC
  25908. builtin and then its argument prototype would still apply. */
  25909. #ifdef __cplusplus
  25910. extern "C"
  25911. #endif
  25912. char ${pbxfuncname} ();
  25913. int
  25914. main ()
  25915. {
  25916. return ${pbxfuncname} ();
  25917. ;
  25918. return 0;
  25919. }
  25920. _ACEOF
  25921. if ac_fn_c_try_link "$LINENO"; then :
  25922. eval "$as_ac_Lib=yes"
  25923. else
  25924. eval "$as_ac_Lib=no"
  25925. fi
  25926. rm -f core conftest.err conftest.$ac_objext \
  25927. conftest$ac_exeext conftest.$ac_ext
  25928. LIBS=$ac_check_lib_save_LIBS
  25929. fi
  25930. eval ac_res=\$$as_ac_Lib
  25931. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  25932. $as_echo "$ac_res" >&6; }
  25933. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  25934. AST_OPENSSL_SRTP_FOUND=yes
  25935. else
  25936. AST_OPENSSL_SRTP_FOUND=no
  25937. fi
  25938. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  25939. fi
  25940. # now check for the header.
  25941. if test "${AST_OPENSSL_SRTP_FOUND}" = "yes"; then
  25942. OPENSSL_SRTP_LIB="${pbxlibdir} -lssl -lcrypto"
  25943. # if --with-OPENSSL_SRTP=DIR has been specified, use it.
  25944. if test "x${OPENSSL_SRTP_DIR}" != "x"; then
  25945. OPENSSL_SRTP_INCLUDE="-I${OPENSSL_SRTP_DIR}/include"
  25946. fi
  25947. OPENSSL_SRTP_INCLUDE="${OPENSSL_SRTP_INCLUDE} "
  25948. if test "xopenssl/ssl.h" = "x" ; then # no header, assume found
  25949. OPENSSL_SRTP_HEADER_FOUND="1"
  25950. else # check for the header
  25951. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  25952. CPPFLAGS="${CPPFLAGS} ${OPENSSL_SRTP_INCLUDE}"
  25953. ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
  25954. if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
  25955. OPENSSL_SRTP_HEADER_FOUND=1
  25956. else
  25957. OPENSSL_SRTP_HEADER_FOUND=0
  25958. fi
  25959. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  25960. fi
  25961. if test "x${OPENSSL_SRTP_HEADER_FOUND}" = "x0" ; then
  25962. OPENSSL_SRTP_LIB=""
  25963. OPENSSL_SRTP_INCLUDE=""
  25964. else
  25965. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  25966. OPENSSL_SRTP_LIB=""
  25967. fi
  25968. PBX_OPENSSL_SRTP=1
  25969. cat >>confdefs.h <<_ACEOF
  25970. #define HAVE_OPENSSL_SRTP 1
  25971. _ACEOF
  25972. fi
  25973. fi
  25974. fi
  25975. fi
  25976. if test "$PBX_OPENSSL" = "1";
  25977. then
  25978. if test "x${PBX_OPENSSL_EC}" != "x1" -a "${USE_OPENSSL_EC}" != "no"; then
  25979. pbxlibdir=""
  25980. # if --with-OPENSSL_EC=DIR has been specified, use it.
  25981. if test "x${OPENSSL_EC_DIR}" != "x"; then
  25982. if test -d ${OPENSSL_EC_DIR}/lib; then
  25983. pbxlibdir="-L${OPENSSL_EC_DIR}/lib"
  25984. else
  25985. pbxlibdir="-L${OPENSSL_EC_DIR}"
  25986. fi
  25987. fi
  25988. pbxfuncname="EC_KEY_new_by_curve_name"
  25989. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  25990. AST_OPENSSL_EC_FOUND=yes
  25991. else
  25992. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  25993. CFLAGS="${CFLAGS} "
  25994. as_ac_Lib=`$as_echo "ac_cv_lib_ssl_${pbxfuncname}" | $as_tr_sh`
  25995. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lssl" >&5
  25996. $as_echo_n "checking for ${pbxfuncname} in -lssl... " >&6; }
  25997. if eval \${$as_ac_Lib+:} false; then :
  25998. $as_echo_n "(cached) " >&6
  25999. else
  26000. ac_check_lib_save_LIBS=$LIBS
  26001. LIBS="-lssl ${pbxlibdir} -lcrypto $LIBS"
  26002. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  26003. /* end confdefs.h. */
  26004. /* Override any GCC internal prototype to avoid an error.
  26005. Use char because int might match the return type of a GCC
  26006. builtin and then its argument prototype would still apply. */
  26007. #ifdef __cplusplus
  26008. extern "C"
  26009. #endif
  26010. char ${pbxfuncname} ();
  26011. int
  26012. main ()
  26013. {
  26014. return ${pbxfuncname} ();
  26015. ;
  26016. return 0;
  26017. }
  26018. _ACEOF
  26019. if ac_fn_c_try_link "$LINENO"; then :
  26020. eval "$as_ac_Lib=yes"
  26021. else
  26022. eval "$as_ac_Lib=no"
  26023. fi
  26024. rm -f core conftest.err conftest.$ac_objext \
  26025. conftest$ac_exeext conftest.$ac_ext
  26026. LIBS=$ac_check_lib_save_LIBS
  26027. fi
  26028. eval ac_res=\$$as_ac_Lib
  26029. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  26030. $as_echo "$ac_res" >&6; }
  26031. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  26032. AST_OPENSSL_EC_FOUND=yes
  26033. else
  26034. AST_OPENSSL_EC_FOUND=no
  26035. fi
  26036. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  26037. fi
  26038. # now check for the header.
  26039. if test "${AST_OPENSSL_EC_FOUND}" = "yes"; then
  26040. OPENSSL_EC_LIB="${pbxlibdir} -lssl -lcrypto"
  26041. # if --with-OPENSSL_EC=DIR has been specified, use it.
  26042. if test "x${OPENSSL_EC_DIR}" != "x"; then
  26043. OPENSSL_EC_INCLUDE="-I${OPENSSL_EC_DIR}/include"
  26044. fi
  26045. OPENSSL_EC_INCLUDE="${OPENSSL_EC_INCLUDE} "
  26046. if test "xopenssl/ec.h" = "x" ; then # no header, assume found
  26047. OPENSSL_EC_HEADER_FOUND="1"
  26048. else # check for the header
  26049. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  26050. CPPFLAGS="${CPPFLAGS} ${OPENSSL_EC_INCLUDE}"
  26051. ac_fn_c_check_header_mongrel "$LINENO" "openssl/ec.h" "ac_cv_header_openssl_ec_h" "$ac_includes_default"
  26052. if test "x$ac_cv_header_openssl_ec_h" = xyes; then :
  26053. OPENSSL_EC_HEADER_FOUND=1
  26054. else
  26055. OPENSSL_EC_HEADER_FOUND=0
  26056. fi
  26057. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  26058. fi
  26059. if test "x${OPENSSL_EC_HEADER_FOUND}" = "x0" ; then
  26060. OPENSSL_EC_LIB=""
  26061. OPENSSL_EC_INCLUDE=""
  26062. else
  26063. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  26064. OPENSSL_EC_LIB=""
  26065. fi
  26066. PBX_OPENSSL_EC=1
  26067. cat >>confdefs.h <<_ACEOF
  26068. #define HAVE_OPENSSL_EC 1
  26069. _ACEOF
  26070. fi
  26071. fi
  26072. fi
  26073. fi
  26074. if test "x${PBX_SRTP}" != "x1" -a "${USE_SRTP}" != "no"; then
  26075. pbxlibdir=""
  26076. # if --with-SRTP=DIR has been specified, use it.
  26077. if test "x${SRTP_DIR}" != "x"; then
  26078. if test -d ${SRTP_DIR}/lib; then
  26079. pbxlibdir="-L${SRTP_DIR}/lib"
  26080. else
  26081. pbxlibdir="-L${SRTP_DIR}"
  26082. fi
  26083. fi
  26084. pbxfuncname="srtp_init"
  26085. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  26086. AST_SRTP_FOUND=yes
  26087. else
  26088. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  26089. CFLAGS="${CFLAGS} "
  26090. as_ac_Lib=`$as_echo "ac_cv_lib_srtp_${pbxfuncname}" | $as_tr_sh`
  26091. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsrtp" >&5
  26092. $as_echo_n "checking for ${pbxfuncname} in -lsrtp... " >&6; }
  26093. if eval \${$as_ac_Lib+:} false; then :
  26094. $as_echo_n "(cached) " >&6
  26095. else
  26096. ac_check_lib_save_LIBS=$LIBS
  26097. LIBS="-lsrtp ${pbxlibdir} $LIBS"
  26098. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  26099. /* end confdefs.h. */
  26100. /* Override any GCC internal prototype to avoid an error.
  26101. Use char because int might match the return type of a GCC
  26102. builtin and then its argument prototype would still apply. */
  26103. #ifdef __cplusplus
  26104. extern "C"
  26105. #endif
  26106. char ${pbxfuncname} ();
  26107. int
  26108. main ()
  26109. {
  26110. return ${pbxfuncname} ();
  26111. ;
  26112. return 0;
  26113. }
  26114. _ACEOF
  26115. if ac_fn_c_try_link "$LINENO"; then :
  26116. eval "$as_ac_Lib=yes"
  26117. else
  26118. eval "$as_ac_Lib=no"
  26119. fi
  26120. rm -f core conftest.err conftest.$ac_objext \
  26121. conftest$ac_exeext conftest.$ac_ext
  26122. LIBS=$ac_check_lib_save_LIBS
  26123. fi
  26124. eval ac_res=\$$as_ac_Lib
  26125. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  26126. $as_echo "$ac_res" >&6; }
  26127. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  26128. AST_SRTP_FOUND=yes
  26129. else
  26130. AST_SRTP_FOUND=no
  26131. fi
  26132. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  26133. fi
  26134. # now check for the header.
  26135. if test "${AST_SRTP_FOUND}" = "yes"; then
  26136. SRTP_LIB="${pbxlibdir} -lsrtp "
  26137. # if --with-SRTP=DIR has been specified, use it.
  26138. if test "x${SRTP_DIR}" != "x"; then
  26139. SRTP_INCLUDE="-I${SRTP_DIR}/include"
  26140. fi
  26141. SRTP_INCLUDE="${SRTP_INCLUDE} "
  26142. if test "xsrtp/srtp.h" = "x" ; then # no header, assume found
  26143. SRTP_HEADER_FOUND="1"
  26144. else # check for the header
  26145. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  26146. CPPFLAGS="${CPPFLAGS} ${SRTP_INCLUDE}"
  26147. ac_fn_c_check_header_mongrel "$LINENO" "srtp/srtp.h" "ac_cv_header_srtp_srtp_h" "$ac_includes_default"
  26148. if test "x$ac_cv_header_srtp_srtp_h" = xyes; then :
  26149. SRTP_HEADER_FOUND=1
  26150. else
  26151. SRTP_HEADER_FOUND=0
  26152. fi
  26153. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  26154. fi
  26155. if test "x${SRTP_HEADER_FOUND}" = "x0" ; then
  26156. SRTP_LIB=""
  26157. SRTP_INCLUDE=""
  26158. else
  26159. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  26160. SRTP_LIB=""
  26161. fi
  26162. PBX_SRTP=1
  26163. cat >>confdefs.h <<_ACEOF
  26164. #define HAVE_SRTP 1
  26165. _ACEOF
  26166. fi
  26167. fi
  26168. fi
  26169. if test "$PBX_SRTP" = "1";
  26170. then
  26171. saved_libs="${LIBS}"
  26172. saved_ldflags="${LDFLAGS}"
  26173. saved_cflags="${CFLAGS}"
  26174. LIBS="${LIBS} ${SRTP_LIB}"
  26175. LDFLAGS="${LDFLAGS} -shared -fPIC"
  26176. CFLAGS="${CFLAGS} ${SRTP_INCLUDE}"
  26177. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the ability of -lsrtp to be linked in a shared object" >&5
  26178. $as_echo_n "checking for the ability of -lsrtp to be linked in a shared object... " >&6; }
  26179. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  26180. /* end confdefs.h. */
  26181. #include <srtp/srtp.h>
  26182. int
  26183. main ()
  26184. {
  26185. srtp_init();
  26186. ;
  26187. return 0;
  26188. }
  26189. _ACEOF
  26190. if ac_fn_c_try_link "$LINENO"; then :
  26191. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  26192. $as_echo "yes" >&6; }
  26193. else
  26194. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  26195. $as_echo "no" >&6; }
  26196. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ***" >&5
  26197. $as_echo "$as_me: WARNING: ***" >&2;}
  26198. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** libsrtp could not be linked as a shared object." >&5
  26199. $as_echo "$as_me: WARNING: *** libsrtp could not be linked as a shared object." >&2;}
  26200. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Try compiling libsrtp manually. Configure libsrtp" >&5
  26201. $as_echo "$as_me: WARNING: *** Try compiling libsrtp manually. Configure libsrtp" >&2;}
  26202. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** with ./configure CFLAGS=-fPIC --prefix=/usr" >&5
  26203. $as_echo "$as_me: WARNING: *** with ./configure CFLAGS=-fPIC --prefix=/usr" >&2;}
  26204. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** replacing /usr with the prefix of your choice." >&5
  26205. $as_echo "$as_me: WARNING: *** replacing /usr with the prefix of your choice." >&2;}
  26206. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** After re-installing libsrtp" >&5
  26207. $as_echo "$as_me: WARNING: *** After re-installing libsrtp" >&2;}
  26208. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** configure script." >&5
  26209. $as_echo "$as_me: WARNING: *** configure script." >&2;}
  26210. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ***" >&5
  26211. $as_echo "$as_me: WARNING: ***" >&2;}
  26212. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** If you do not need SRTP support re-run configure" >&5
  26213. $as_echo "$as_me: WARNING: *** If you do not need SRTP support re-run configure" >&2;}
  26214. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** with the --without-srtp option." >&5
  26215. $as_echo "$as_me: WARNING: *** with the --without-srtp option." >&2;}
  26216. exit 1
  26217. fi
  26218. rm -f core conftest.err conftest.$ac_objext \
  26219. conftest$ac_exeext conftest.$ac_ext
  26220. LIBS="${saved_libs}"
  26221. LDFLAGS="${saved_ldflags}"
  26222. CFLAGS="${saved_cflags}"
  26223. fi
  26224. if test "x${PBX_SRTP_SHUTDOWN}" != "x1" -a "${USE_SRTP_SHUTDOWN}" != "no"; then
  26225. pbxlibdir=""
  26226. # if --with-SRTP_SHUTDOWN=DIR has been specified, use it.
  26227. if test "x${SRTP_SHUTDOWN_DIR}" != "x"; then
  26228. if test -d ${SRTP_SHUTDOWN_DIR}/lib; then
  26229. pbxlibdir="-L${SRTP_SHUTDOWN_DIR}/lib"
  26230. else
  26231. pbxlibdir="-L${SRTP_SHUTDOWN_DIR}"
  26232. fi
  26233. fi
  26234. pbxfuncname="srtp_shutdown"
  26235. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  26236. AST_SRTP_SHUTDOWN_FOUND=yes
  26237. else
  26238. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  26239. CFLAGS="${CFLAGS} "
  26240. as_ac_Lib=`$as_echo "ac_cv_lib_srtp_${pbxfuncname}" | $as_tr_sh`
  26241. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsrtp" >&5
  26242. $as_echo_n "checking for ${pbxfuncname} in -lsrtp... " >&6; }
  26243. if eval \${$as_ac_Lib+:} false; then :
  26244. $as_echo_n "(cached) " >&6
  26245. else
  26246. ac_check_lib_save_LIBS=$LIBS
  26247. LIBS="-lsrtp ${pbxlibdir} $LIBS"
  26248. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  26249. /* end confdefs.h. */
  26250. /* Override any GCC internal prototype to avoid an error.
  26251. Use char because int might match the return type of a GCC
  26252. builtin and then its argument prototype would still apply. */
  26253. #ifdef __cplusplus
  26254. extern "C"
  26255. #endif
  26256. char ${pbxfuncname} ();
  26257. int
  26258. main ()
  26259. {
  26260. return ${pbxfuncname} ();
  26261. ;
  26262. return 0;
  26263. }
  26264. _ACEOF
  26265. if ac_fn_c_try_link "$LINENO"; then :
  26266. eval "$as_ac_Lib=yes"
  26267. else
  26268. eval "$as_ac_Lib=no"
  26269. fi
  26270. rm -f core conftest.err conftest.$ac_objext \
  26271. conftest$ac_exeext conftest.$ac_ext
  26272. LIBS=$ac_check_lib_save_LIBS
  26273. fi
  26274. eval ac_res=\$$as_ac_Lib
  26275. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  26276. $as_echo "$ac_res" >&6; }
  26277. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  26278. AST_SRTP_SHUTDOWN_FOUND=yes
  26279. else
  26280. AST_SRTP_SHUTDOWN_FOUND=no
  26281. fi
  26282. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  26283. fi
  26284. # now check for the header.
  26285. if test "${AST_SRTP_SHUTDOWN_FOUND}" = "yes"; then
  26286. SRTP_SHUTDOWN_LIB="${pbxlibdir} -lsrtp "
  26287. # if --with-SRTP_SHUTDOWN=DIR has been specified, use it.
  26288. if test "x${SRTP_SHUTDOWN_DIR}" != "x"; then
  26289. SRTP_SHUTDOWN_INCLUDE="-I${SRTP_SHUTDOWN_DIR}/include"
  26290. fi
  26291. SRTP_SHUTDOWN_INCLUDE="${SRTP_SHUTDOWN_INCLUDE} "
  26292. if test "xsrtp/srtp.h" = "x" ; then # no header, assume found
  26293. SRTP_SHUTDOWN_HEADER_FOUND="1"
  26294. else # check for the header
  26295. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  26296. CPPFLAGS="${CPPFLAGS} ${SRTP_SHUTDOWN_INCLUDE}"
  26297. ac_fn_c_check_header_mongrel "$LINENO" "srtp/srtp.h" "ac_cv_header_srtp_srtp_h" "$ac_includes_default"
  26298. if test "x$ac_cv_header_srtp_srtp_h" = xyes; then :
  26299. SRTP_SHUTDOWN_HEADER_FOUND=1
  26300. else
  26301. SRTP_SHUTDOWN_HEADER_FOUND=0
  26302. fi
  26303. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  26304. fi
  26305. if test "x${SRTP_SHUTDOWN_HEADER_FOUND}" = "x0" ; then
  26306. SRTP_SHUTDOWN_LIB=""
  26307. SRTP_SHUTDOWN_INCLUDE=""
  26308. else
  26309. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  26310. SRTP_SHUTDOWN_LIB=""
  26311. fi
  26312. PBX_SRTP_SHUTDOWN=1
  26313. cat >>confdefs.h <<_ACEOF
  26314. #define HAVE_SRTP_SHUTDOWN 1
  26315. _ACEOF
  26316. fi
  26317. fi
  26318. fi
  26319. for ver in 2.0 2.2 2.4 2.6; do
  26320. if test "x${PBX_GMIME}" != "x1" -a "${USE_GMIME}" != "no"; then
  26321. pkg_failed=no
  26322. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMIME" >&5
  26323. $as_echo_n "checking for GMIME... " >&6; }
  26324. if test -n "$GMIME_CFLAGS"; then
  26325. pkg_cv_GMIME_CFLAGS="$GMIME_CFLAGS"
  26326. elif test -n "$PKG_CONFIG"; then
  26327. if test -n "$PKG_CONFIG" && \
  26328. { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gmime-\$ver\""; } >&5
  26329. ($PKG_CONFIG --exists --print-errors "gmime-$ver") 2>&5
  26330. ac_status=$?
  26331. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  26332. test $ac_status = 0; }; then
  26333. pkg_cv_GMIME_CFLAGS=`$PKG_CONFIG --cflags "gmime-$ver" 2>/dev/null`
  26334. test "x$?" != "x0" && pkg_failed=yes
  26335. else
  26336. pkg_failed=yes
  26337. fi
  26338. else
  26339. pkg_failed=untried
  26340. fi
  26341. if test -n "$GMIME_LIBS"; then
  26342. pkg_cv_GMIME_LIBS="$GMIME_LIBS"
  26343. elif test -n "$PKG_CONFIG"; then
  26344. if test -n "$PKG_CONFIG" && \
  26345. { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gmime-\$ver\""; } >&5
  26346. ($PKG_CONFIG --exists --print-errors "gmime-$ver") 2>&5
  26347. ac_status=$?
  26348. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  26349. test $ac_status = 0; }; then
  26350. pkg_cv_GMIME_LIBS=`$PKG_CONFIG --libs "gmime-$ver" 2>/dev/null`
  26351. test "x$?" != "x0" && pkg_failed=yes
  26352. else
  26353. pkg_failed=yes
  26354. fi
  26355. else
  26356. pkg_failed=untried
  26357. fi
  26358. if test $pkg_failed = yes; then
  26359. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  26360. $as_echo "no" >&6; }
  26361. if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  26362. _pkg_short_errors_supported=yes
  26363. else
  26364. _pkg_short_errors_supported=no
  26365. fi
  26366. if test $_pkg_short_errors_supported = yes; then
  26367. GMIME_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gmime-$ver" 2>&1`
  26368. else
  26369. GMIME_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gmime-$ver" 2>&1`
  26370. fi
  26371. # Put the nasty error message in config.log where it belongs
  26372. echo "$GMIME_PKG_ERRORS" >&5
  26373. PBX_GMIME=0
  26374. elif test $pkg_failed = untried; then
  26375. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  26376. $as_echo "no" >&6; }
  26377. PBX_GMIME=0
  26378. else
  26379. GMIME_CFLAGS=$pkg_cv_GMIME_CFLAGS
  26380. GMIME_LIBS=$pkg_cv_GMIME_LIBS
  26381. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  26382. $as_echo "yes" >&6; }
  26383. PBX_GMIME=1
  26384. GMIME_INCLUDE="$GMIME_CFLAGS"
  26385. GMIME_LIB="$GMIME_LIBS"
  26386. $as_echo "#define HAVE_GMIME 1" >>confdefs.h
  26387. fi
  26388. fi
  26389. if test "$PBX_GMIME" = 1; then
  26390. break;
  26391. fi
  26392. done
  26393. if test "x${PBX_HOARD}" != "x1" -a "${USE_HOARD}" != "no"; then
  26394. pbxlibdir=""
  26395. # if --with-HOARD=DIR has been specified, use it.
  26396. if test "x${HOARD_DIR}" != "x"; then
  26397. if test -d ${HOARD_DIR}/lib; then
  26398. pbxlibdir="-L${HOARD_DIR}/lib"
  26399. else
  26400. pbxlibdir="-L${HOARD_DIR}"
  26401. fi
  26402. fi
  26403. pbxfuncname="malloc"
  26404. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  26405. AST_HOARD_FOUND=yes
  26406. else
  26407. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  26408. CFLAGS="${CFLAGS} "
  26409. as_ac_Lib=`$as_echo "ac_cv_lib_hoard_${pbxfuncname}" | $as_tr_sh`
  26410. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lhoard" >&5
  26411. $as_echo_n "checking for ${pbxfuncname} in -lhoard... " >&6; }
  26412. if eval \${$as_ac_Lib+:} false; then :
  26413. $as_echo_n "(cached) " >&6
  26414. else
  26415. ac_check_lib_save_LIBS=$LIBS
  26416. LIBS="-lhoard ${pbxlibdir} $LIBS"
  26417. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  26418. /* end confdefs.h. */
  26419. /* Override any GCC internal prototype to avoid an error.
  26420. Use char because int might match the return type of a GCC
  26421. builtin and then its argument prototype would still apply. */
  26422. #ifdef __cplusplus
  26423. extern "C"
  26424. #endif
  26425. char ${pbxfuncname} ();
  26426. int
  26427. main ()
  26428. {
  26429. return ${pbxfuncname} ();
  26430. ;
  26431. return 0;
  26432. }
  26433. _ACEOF
  26434. if ac_fn_c_try_link "$LINENO"; then :
  26435. eval "$as_ac_Lib=yes"
  26436. else
  26437. eval "$as_ac_Lib=no"
  26438. fi
  26439. rm -f core conftest.err conftest.$ac_objext \
  26440. conftest$ac_exeext conftest.$ac_ext
  26441. LIBS=$ac_check_lib_save_LIBS
  26442. fi
  26443. eval ac_res=\$$as_ac_Lib
  26444. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  26445. $as_echo "$ac_res" >&6; }
  26446. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  26447. AST_HOARD_FOUND=yes
  26448. else
  26449. AST_HOARD_FOUND=no
  26450. fi
  26451. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  26452. fi
  26453. # now check for the header.
  26454. if test "${AST_HOARD_FOUND}" = "yes"; then
  26455. HOARD_LIB="${pbxlibdir} -lhoard "
  26456. # if --with-HOARD=DIR has been specified, use it.
  26457. if test "x${HOARD_DIR}" != "x"; then
  26458. HOARD_INCLUDE="-I${HOARD_DIR}/include"
  26459. fi
  26460. HOARD_INCLUDE="${HOARD_INCLUDE} "
  26461. if test "x" = "x" ; then # no header, assume found
  26462. HOARD_HEADER_FOUND="1"
  26463. else # check for the header
  26464. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  26465. CPPFLAGS="${CPPFLAGS} ${HOARD_INCLUDE}"
  26466. ac_fn_c_check_header_mongrel "$LINENO" "" "ac_cv_header_" "$ac_includes_default"
  26467. if test "x$ac_cv_header_" = xyes; then :
  26468. HOARD_HEADER_FOUND=1
  26469. else
  26470. HOARD_HEADER_FOUND=0
  26471. fi
  26472. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  26473. fi
  26474. if test "x${HOARD_HEADER_FOUND}" = "x0" ; then
  26475. HOARD_LIB=""
  26476. HOARD_INCLUDE=""
  26477. else
  26478. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  26479. HOARD_LIB=""
  26480. fi
  26481. PBX_HOARD=1
  26482. cat >>confdefs.h <<_ACEOF
  26483. #define HAVE_HOARD 1
  26484. _ACEOF
  26485. fi
  26486. fi
  26487. fi
  26488. if test "x${PBX_FREETDS}" != "x1" -a "${USE_FREETDS}" != "no"; then
  26489. pbxlibdir=""
  26490. # if --with-FREETDS=DIR has been specified, use it.
  26491. if test "x${FREETDS_DIR}" != "x"; then
  26492. if test -d ${FREETDS_DIR}/lib; then
  26493. pbxlibdir="-L${FREETDS_DIR}/lib"
  26494. else
  26495. pbxlibdir="-L${FREETDS_DIR}"
  26496. fi
  26497. fi
  26498. pbxfuncname="dbinit"
  26499. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  26500. AST_FREETDS_FOUND=yes
  26501. else
  26502. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  26503. CFLAGS="${CFLAGS} "
  26504. as_ac_Lib=`$as_echo "ac_cv_lib_sybdb_${pbxfuncname}" | $as_tr_sh`
  26505. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsybdb" >&5
  26506. $as_echo_n "checking for ${pbxfuncname} in -lsybdb... " >&6; }
  26507. if eval \${$as_ac_Lib+:} false; then :
  26508. $as_echo_n "(cached) " >&6
  26509. else
  26510. ac_check_lib_save_LIBS=$LIBS
  26511. LIBS="-lsybdb ${pbxlibdir} $LIBS"
  26512. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  26513. /* end confdefs.h. */
  26514. /* Override any GCC internal prototype to avoid an error.
  26515. Use char because int might match the return type of a GCC
  26516. builtin and then its argument prototype would still apply. */
  26517. #ifdef __cplusplus
  26518. extern "C"
  26519. #endif
  26520. char ${pbxfuncname} ();
  26521. int
  26522. main ()
  26523. {
  26524. return ${pbxfuncname} ();
  26525. ;
  26526. return 0;
  26527. }
  26528. _ACEOF
  26529. if ac_fn_c_try_link "$LINENO"; then :
  26530. eval "$as_ac_Lib=yes"
  26531. else
  26532. eval "$as_ac_Lib=no"
  26533. fi
  26534. rm -f core conftest.err conftest.$ac_objext \
  26535. conftest$ac_exeext conftest.$ac_ext
  26536. LIBS=$ac_check_lib_save_LIBS
  26537. fi
  26538. eval ac_res=\$$as_ac_Lib
  26539. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  26540. $as_echo "$ac_res" >&6; }
  26541. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  26542. AST_FREETDS_FOUND=yes
  26543. else
  26544. AST_FREETDS_FOUND=no
  26545. fi
  26546. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  26547. fi
  26548. # now check for the header.
  26549. if test "${AST_FREETDS_FOUND}" = "yes"; then
  26550. FREETDS_LIB="${pbxlibdir} -lsybdb "
  26551. # if --with-FREETDS=DIR has been specified, use it.
  26552. if test "x${FREETDS_DIR}" != "x"; then
  26553. FREETDS_INCLUDE="-I${FREETDS_DIR}/include"
  26554. fi
  26555. FREETDS_INCLUDE="${FREETDS_INCLUDE} "
  26556. if test "xsybdb.h" = "x" ; then # no header, assume found
  26557. FREETDS_HEADER_FOUND="1"
  26558. else # check for the header
  26559. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  26560. CPPFLAGS="${CPPFLAGS} ${FREETDS_INCLUDE}"
  26561. ac_fn_c_check_header_mongrel "$LINENO" "sybdb.h" "ac_cv_header_sybdb_h" "$ac_includes_default"
  26562. if test "x$ac_cv_header_sybdb_h" = xyes; then :
  26563. FREETDS_HEADER_FOUND=1
  26564. else
  26565. FREETDS_HEADER_FOUND=0
  26566. fi
  26567. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  26568. fi
  26569. if test "x${FREETDS_HEADER_FOUND}" = "x0" ; then
  26570. FREETDS_LIB=""
  26571. FREETDS_INCLUDE=""
  26572. else
  26573. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  26574. FREETDS_LIB=""
  26575. fi
  26576. PBX_FREETDS=1
  26577. cat >>confdefs.h <<_ACEOF
  26578. #define HAVE_FREETDS 1
  26579. _ACEOF
  26580. fi
  26581. fi
  26582. fi
  26583. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tone_zone_find_by_num in -ltonezone" >&5
  26584. $as_echo_n "checking for tone_zone_find_by_num in -ltonezone... " >&6; }
  26585. if ${ac_cv_lib_tonezone_tone_zone_find_by_num+:} false; then :
  26586. $as_echo_n "(cached) " >&6
  26587. else
  26588. ac_check_lib_save_LIBS=$LIBS
  26589. LIBS="-ltonezone $LIBS"
  26590. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  26591. /* end confdefs.h. */
  26592. /* Override any GCC internal prototype to avoid an error.
  26593. Use char because int might match the return type of a GCC
  26594. builtin and then its argument prototype would still apply. */
  26595. #ifdef __cplusplus
  26596. extern "C"
  26597. #endif
  26598. char tone_zone_find_by_num ();
  26599. int
  26600. main ()
  26601. {
  26602. return tone_zone_find_by_num ();
  26603. ;
  26604. return 0;
  26605. }
  26606. _ACEOF
  26607. if ac_fn_c_try_link "$LINENO"; then :
  26608. ac_cv_lib_tonezone_tone_zone_find_by_num=yes
  26609. else
  26610. ac_cv_lib_tonezone_tone_zone_find_by_num=no
  26611. fi
  26612. rm -f core conftest.err conftest.$ac_objext \
  26613. conftest$ac_exeext conftest.$ac_ext
  26614. LIBS=$ac_check_lib_save_LIBS
  26615. fi
  26616. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tonezone_tone_zone_find_by_num" >&5
  26617. $as_echo "$ac_cv_lib_tonezone_tone_zone_find_by_num" >&6; }
  26618. if test "x$ac_cv_lib_tonezone_tone_zone_find_by_num" = xyes; then :
  26619. tonezone_does_not_need_lm=yes
  26620. else
  26621. tonezone_does_not_need_lm=no
  26622. fi
  26623. if test "${tonezone_does_not_need_lm}" = "no" ; then
  26624. tonezone_extra="-lm"
  26625. fi
  26626. if test "x${PBX_TONEZONE}" != "x1" -a "${USE_TONEZONE}" != "no"; then
  26627. pbxlibdir=""
  26628. # if --with-TONEZONE=DIR has been specified, use it.
  26629. if test "x${TONEZONE_DIR}" != "x"; then
  26630. if test -d ${TONEZONE_DIR}/lib; then
  26631. pbxlibdir="-L${TONEZONE_DIR}/lib"
  26632. else
  26633. pbxlibdir="-L${TONEZONE_DIR}"
  26634. fi
  26635. fi
  26636. pbxfuncname="tone_zone_find"
  26637. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  26638. AST_TONEZONE_FOUND=yes
  26639. else
  26640. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  26641. CFLAGS="${CFLAGS} "
  26642. as_ac_Lib=`$as_echo "ac_cv_lib_tonezone_${pbxfuncname}" | $as_tr_sh`
  26643. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -ltonezone" >&5
  26644. $as_echo_n "checking for ${pbxfuncname} in -ltonezone... " >&6; }
  26645. if eval \${$as_ac_Lib+:} false; then :
  26646. $as_echo_n "(cached) " >&6
  26647. else
  26648. ac_check_lib_save_LIBS=$LIBS
  26649. LIBS="-ltonezone ${pbxlibdir} ${tonezone_extra} ${DAHDI_INCLUDE} $LIBS"
  26650. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  26651. /* end confdefs.h. */
  26652. /* Override any GCC internal prototype to avoid an error.
  26653. Use char because int might match the return type of a GCC
  26654. builtin and then its argument prototype would still apply. */
  26655. #ifdef __cplusplus
  26656. extern "C"
  26657. #endif
  26658. char ${pbxfuncname} ();
  26659. int
  26660. main ()
  26661. {
  26662. return ${pbxfuncname} ();
  26663. ;
  26664. return 0;
  26665. }
  26666. _ACEOF
  26667. if ac_fn_c_try_link "$LINENO"; then :
  26668. eval "$as_ac_Lib=yes"
  26669. else
  26670. eval "$as_ac_Lib=no"
  26671. fi
  26672. rm -f core conftest.err conftest.$ac_objext \
  26673. conftest$ac_exeext conftest.$ac_ext
  26674. LIBS=$ac_check_lib_save_LIBS
  26675. fi
  26676. eval ac_res=\$$as_ac_Lib
  26677. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  26678. $as_echo "$ac_res" >&6; }
  26679. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  26680. AST_TONEZONE_FOUND=yes
  26681. else
  26682. AST_TONEZONE_FOUND=no
  26683. fi
  26684. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  26685. fi
  26686. # now check for the header.
  26687. if test "${AST_TONEZONE_FOUND}" = "yes"; then
  26688. TONEZONE_LIB="${pbxlibdir} -ltonezone ${tonezone_extra} ${DAHDI_INCLUDE}"
  26689. # if --with-TONEZONE=DIR has been specified, use it.
  26690. if test "x${TONEZONE_DIR}" != "x"; then
  26691. TONEZONE_INCLUDE="-I${TONEZONE_DIR}/include"
  26692. fi
  26693. TONEZONE_INCLUDE="${TONEZONE_INCLUDE} "
  26694. if test "xdahdi/tonezone.h" = "x" ; then # no header, assume found
  26695. TONEZONE_HEADER_FOUND="1"
  26696. else # check for the header
  26697. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  26698. CPPFLAGS="${CPPFLAGS} ${TONEZONE_INCLUDE}"
  26699. ac_fn_c_check_header_mongrel "$LINENO" "dahdi/tonezone.h" "ac_cv_header_dahdi_tonezone_h" "$ac_includes_default"
  26700. if test "x$ac_cv_header_dahdi_tonezone_h" = xyes; then :
  26701. TONEZONE_HEADER_FOUND=1
  26702. else
  26703. TONEZONE_HEADER_FOUND=0
  26704. fi
  26705. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  26706. fi
  26707. if test "x${TONEZONE_HEADER_FOUND}" = "x0" ; then
  26708. TONEZONE_LIB=""
  26709. TONEZONE_INCLUDE=""
  26710. else
  26711. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  26712. TONEZONE_LIB=""
  26713. fi
  26714. PBX_TONEZONE=1
  26715. cat >>confdefs.h <<_ACEOF
  26716. #define HAVE_TONEZONE 1
  26717. _ACEOF
  26718. fi
  26719. fi
  26720. fi
  26721. if test "${OSARCH}" = "OpenBSD";
  26722. then
  26723. if test "x${PBX_VORBIS}" != "x1" -a "${USE_VORBIS}" != "no"; then
  26724. pbxlibdir=""
  26725. # if --with-VORBIS=DIR has been specified, use it.
  26726. if test "x${VORBIS_DIR}" != "x"; then
  26727. if test -d ${VORBIS_DIR}/lib; then
  26728. pbxlibdir="-L${VORBIS_DIR}/lib"
  26729. else
  26730. pbxlibdir="-L${VORBIS_DIR}"
  26731. fi
  26732. fi
  26733. pbxfuncname="vorbis_info_init"
  26734. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  26735. AST_VORBIS_FOUND=yes
  26736. else
  26737. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  26738. CFLAGS="${CFLAGS} "
  26739. as_ac_Lib=`$as_echo "ac_cv_lib_vorbis_${pbxfuncname}" | $as_tr_sh`
  26740. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lvorbis" >&5
  26741. $as_echo_n "checking for ${pbxfuncname} in -lvorbis... " >&6; }
  26742. if eval \${$as_ac_Lib+:} false; then :
  26743. $as_echo_n "(cached) " >&6
  26744. else
  26745. ac_check_lib_save_LIBS=$LIBS
  26746. LIBS="-lvorbis ${pbxlibdir} -lm -lvorbisenc -lvorbisfile -logg $LIBS"
  26747. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  26748. /* end confdefs.h. */
  26749. /* Override any GCC internal prototype to avoid an error.
  26750. Use char because int might match the return type of a GCC
  26751. builtin and then its argument prototype would still apply. */
  26752. #ifdef __cplusplus
  26753. extern "C"
  26754. #endif
  26755. char ${pbxfuncname} ();
  26756. int
  26757. main ()
  26758. {
  26759. return ${pbxfuncname} ();
  26760. ;
  26761. return 0;
  26762. }
  26763. _ACEOF
  26764. if ac_fn_c_try_link "$LINENO"; then :
  26765. eval "$as_ac_Lib=yes"
  26766. else
  26767. eval "$as_ac_Lib=no"
  26768. fi
  26769. rm -f core conftest.err conftest.$ac_objext \
  26770. conftest$ac_exeext conftest.$ac_ext
  26771. LIBS=$ac_check_lib_save_LIBS
  26772. fi
  26773. eval ac_res=\$$as_ac_Lib
  26774. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  26775. $as_echo "$ac_res" >&6; }
  26776. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  26777. AST_VORBIS_FOUND=yes
  26778. else
  26779. AST_VORBIS_FOUND=no
  26780. fi
  26781. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  26782. fi
  26783. # now check for the header.
  26784. if test "${AST_VORBIS_FOUND}" = "yes"; then
  26785. VORBIS_LIB="${pbxlibdir} -lvorbis -lm -lvorbisenc -lvorbisfile -logg"
  26786. # if --with-VORBIS=DIR has been specified, use it.
  26787. if test "x${VORBIS_DIR}" != "x"; then
  26788. VORBIS_INCLUDE="-I${VORBIS_DIR}/include"
  26789. fi
  26790. VORBIS_INCLUDE="${VORBIS_INCLUDE} "
  26791. if test "xvorbis/codec.h" = "x" ; then # no header, assume found
  26792. VORBIS_HEADER_FOUND="1"
  26793. else # check for the header
  26794. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  26795. CPPFLAGS="${CPPFLAGS} ${VORBIS_INCLUDE}"
  26796. ac_fn_c_check_header_mongrel "$LINENO" "vorbis/codec.h" "ac_cv_header_vorbis_codec_h" "$ac_includes_default"
  26797. if test "x$ac_cv_header_vorbis_codec_h" = xyes; then :
  26798. VORBIS_HEADER_FOUND=1
  26799. else
  26800. VORBIS_HEADER_FOUND=0
  26801. fi
  26802. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  26803. fi
  26804. if test "x${VORBIS_HEADER_FOUND}" = "x0" ; then
  26805. VORBIS_LIB=""
  26806. VORBIS_INCLUDE=""
  26807. else
  26808. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  26809. VORBIS_LIB=""
  26810. fi
  26811. PBX_VORBIS=1
  26812. cat >>confdefs.h <<_ACEOF
  26813. #define HAVE_VORBIS 1
  26814. _ACEOF
  26815. fi
  26816. fi
  26817. fi
  26818. else
  26819. if test "x${PBX_VORBIS}" != "x1" -a "${USE_VORBIS}" != "no"; then
  26820. pbxlibdir=""
  26821. # if --with-VORBIS=DIR has been specified, use it.
  26822. if test "x${VORBIS_DIR}" != "x"; then
  26823. if test -d ${VORBIS_DIR}/lib; then
  26824. pbxlibdir="-L${VORBIS_DIR}/lib"
  26825. else
  26826. pbxlibdir="-L${VORBIS_DIR}"
  26827. fi
  26828. fi
  26829. pbxfuncname="vorbis_info_init"
  26830. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  26831. AST_VORBIS_FOUND=yes
  26832. else
  26833. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  26834. CFLAGS="${CFLAGS} "
  26835. as_ac_Lib=`$as_echo "ac_cv_lib_vorbis_${pbxfuncname}" | $as_tr_sh`
  26836. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lvorbis" >&5
  26837. $as_echo_n "checking for ${pbxfuncname} in -lvorbis... " >&6; }
  26838. if eval \${$as_ac_Lib+:} false; then :
  26839. $as_echo_n "(cached) " >&6
  26840. else
  26841. ac_check_lib_save_LIBS=$LIBS
  26842. LIBS="-lvorbis ${pbxlibdir} -lm -lvorbisenc -lvorbisfile $LIBS"
  26843. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  26844. /* end confdefs.h. */
  26845. /* Override any GCC internal prototype to avoid an error.
  26846. Use char because int might match the return type of a GCC
  26847. builtin and then its argument prototype would still apply. */
  26848. #ifdef __cplusplus
  26849. extern "C"
  26850. #endif
  26851. char ${pbxfuncname} ();
  26852. int
  26853. main ()
  26854. {
  26855. return ${pbxfuncname} ();
  26856. ;
  26857. return 0;
  26858. }
  26859. _ACEOF
  26860. if ac_fn_c_try_link "$LINENO"; then :
  26861. eval "$as_ac_Lib=yes"
  26862. else
  26863. eval "$as_ac_Lib=no"
  26864. fi
  26865. rm -f core conftest.err conftest.$ac_objext \
  26866. conftest$ac_exeext conftest.$ac_ext
  26867. LIBS=$ac_check_lib_save_LIBS
  26868. fi
  26869. eval ac_res=\$$as_ac_Lib
  26870. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  26871. $as_echo "$ac_res" >&6; }
  26872. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  26873. AST_VORBIS_FOUND=yes
  26874. else
  26875. AST_VORBIS_FOUND=no
  26876. fi
  26877. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  26878. fi
  26879. # now check for the header.
  26880. if test "${AST_VORBIS_FOUND}" = "yes"; then
  26881. VORBIS_LIB="${pbxlibdir} -lvorbis -lm -lvorbisenc -lvorbisfile"
  26882. # if --with-VORBIS=DIR has been specified, use it.
  26883. if test "x${VORBIS_DIR}" != "x"; then
  26884. VORBIS_INCLUDE="-I${VORBIS_DIR}/include"
  26885. fi
  26886. VORBIS_INCLUDE="${VORBIS_INCLUDE} "
  26887. if test "xvorbis/codec.h" = "x" ; then # no header, assume found
  26888. VORBIS_HEADER_FOUND="1"
  26889. else # check for the header
  26890. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  26891. CPPFLAGS="${CPPFLAGS} ${VORBIS_INCLUDE}"
  26892. ac_fn_c_check_header_mongrel "$LINENO" "vorbis/codec.h" "ac_cv_header_vorbis_codec_h" "$ac_includes_default"
  26893. if test "x$ac_cv_header_vorbis_codec_h" = xyes; then :
  26894. VORBIS_HEADER_FOUND=1
  26895. else
  26896. VORBIS_HEADER_FOUND=0
  26897. fi
  26898. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  26899. fi
  26900. if test "x${VORBIS_HEADER_FOUND}" = "x0" ; then
  26901. VORBIS_LIB=""
  26902. VORBIS_INCLUDE=""
  26903. else
  26904. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  26905. VORBIS_LIB=""
  26906. fi
  26907. PBX_VORBIS=1
  26908. cat >>confdefs.h <<_ACEOF
  26909. #define HAVE_VORBIS 1
  26910. _ACEOF
  26911. fi
  26912. fi
  26913. fi
  26914. fi
  26915. if test "x${PBX_VORBIS_OPEN_CALLBACKS}" != "x1" -a "${USE_VORBIS_OPEN_CALLBACKS}" != "no"; then
  26916. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OV_CALLBACKS_NOCLOSE declared in vorbis/vorbisfile.h" >&5
  26917. $as_echo_n "checking for OV_CALLBACKS_NOCLOSE declared in vorbis/vorbisfile.h... " >&6; }
  26918. saved_cppflags="${CPPFLAGS}"
  26919. if test "x${VORBIS_OPEN_CALLBACKS_DIR}" != "x"; then
  26920. VORBIS_OPEN_CALLBACKS_INCLUDE="-I${VORBIS_OPEN_CALLBACKS_DIR}/include"
  26921. fi
  26922. CPPFLAGS="${CPPFLAGS} ${VORBIS_OPEN_CALLBACKS_INCLUDE}"
  26923. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  26924. /* end confdefs.h. */
  26925. #include <vorbis/vorbisfile.h>
  26926. int
  26927. main ()
  26928. {
  26929. #if !defined(OV_CALLBACKS_NOCLOSE)
  26930. (void) OV_CALLBACKS_NOCLOSE;
  26931. #endif
  26932. ;
  26933. return 0;
  26934. }
  26935. _ACEOF
  26936. if ac_fn_c_try_compile "$LINENO"; then :
  26937. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  26938. $as_echo "yes" >&6; }
  26939. PBX_VORBIS_OPEN_CALLBACKS=1
  26940. $as_echo "#define HAVE_VORBIS_OPEN_CALLBACKS 1" >>confdefs.h
  26941. else
  26942. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  26943. $as_echo "no" >&6; }
  26944. fi
  26945. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  26946. CPPFLAGS="${saved_cppflags}"
  26947. fi
  26948. ac_ext=cpp
  26949. ac_cpp='$CXXCPP $CPPFLAGS'
  26950. ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  26951. ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  26952. ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  26953. if test "${USE_VPB}" != "no"; then
  26954. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vpb_open in -lvpb" >&5
  26955. $as_echo_n "checking for vpb_open in -lvpb... " >&6; }
  26956. saved_libs="${LIBS}"
  26957. saved_cppflags="${CPPFLAGS}"
  26958. if test "x${VPB_DIR}" != "x"; then
  26959. if test -d ${VPB_DIR}/lib; then
  26960. vpblibdir=${VPB_DIR}/lib
  26961. else
  26962. vpblibdir=${VPB_DIR}
  26963. fi
  26964. LIBS="${LIBS} -L${vpblibdir}"
  26965. CPPFLAGS="${CPPFLAGS} -I${VPB_DIR}/include"
  26966. fi
  26967. LIBS="${PTHREAD_LIBS} ${LIBS} -lvpb"
  26968. CPPFLAGS="${CPPFLAGS} ${PTHREAD_CFLAGS}"
  26969. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  26970. /* end confdefs.h. */
  26971. #include <vpbapi.h>
  26972. int
  26973. main ()
  26974. {
  26975. int q = vpb_open(0,0);
  26976. ;
  26977. return 0;
  26978. }
  26979. _ACEOF
  26980. if ac_fn_cxx_try_link "$LINENO"; then :
  26981. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  26982. $as_echo "yes" >&6; }
  26983. ac_cv_lib_vpb_vpb_open="yes"
  26984. else
  26985. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  26986. $as_echo "no" >&6; }
  26987. ac_cv_lib_vpb_vpb_open="no"
  26988. fi
  26989. rm -f core conftest.err conftest.$ac_objext \
  26990. conftest$ac_exeext conftest.$ac_ext
  26991. LIBS="${saved_libs}"
  26992. CPPFLAGS="${saved_cppflags}"
  26993. if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then
  26994. VPB_LIB="-lvpb"
  26995. if test "${VPB_DIR}" != ""; then
  26996. VPB_LIB="-L${vpblibdir} ${VPB_LIB}"
  26997. VPB_INCLUDE="-I${VPB_DIR}/include"
  26998. fi
  26999. PBX_VPB=1
  27000. $as_echo "#define HAVE_VPB 1" >>confdefs.h
  27001. fi
  27002. fi
  27003. ac_ext=c
  27004. ac_cpp='$CPP $CPPFLAGS'
  27005. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  27006. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  27007. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  27008. if test "x${PBX_ZLIB}" != "x1" -a "${USE_ZLIB}" != "no"; then
  27009. pbxlibdir=""
  27010. # if --with-ZLIB=DIR has been specified, use it.
  27011. if test "x${ZLIB_DIR}" != "x"; then
  27012. if test -d ${ZLIB_DIR}/lib; then
  27013. pbxlibdir="-L${ZLIB_DIR}/lib"
  27014. else
  27015. pbxlibdir="-L${ZLIB_DIR}"
  27016. fi
  27017. fi
  27018. pbxfuncname="compress"
  27019. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  27020. AST_ZLIB_FOUND=yes
  27021. else
  27022. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  27023. CFLAGS="${CFLAGS} "
  27024. as_ac_Lib=`$as_echo "ac_cv_lib_z_${pbxfuncname}" | $as_tr_sh`
  27025. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lz" >&5
  27026. $as_echo_n "checking for ${pbxfuncname} in -lz... " >&6; }
  27027. if eval \${$as_ac_Lib+:} false; then :
  27028. $as_echo_n "(cached) " >&6
  27029. else
  27030. ac_check_lib_save_LIBS=$LIBS
  27031. LIBS="-lz ${pbxlibdir} $LIBS"
  27032. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  27033. /* end confdefs.h. */
  27034. /* Override any GCC internal prototype to avoid an error.
  27035. Use char because int might match the return type of a GCC
  27036. builtin and then its argument prototype would still apply. */
  27037. #ifdef __cplusplus
  27038. extern "C"
  27039. #endif
  27040. char ${pbxfuncname} ();
  27041. int
  27042. main ()
  27043. {
  27044. return ${pbxfuncname} ();
  27045. ;
  27046. return 0;
  27047. }
  27048. _ACEOF
  27049. if ac_fn_c_try_link "$LINENO"; then :
  27050. eval "$as_ac_Lib=yes"
  27051. else
  27052. eval "$as_ac_Lib=no"
  27053. fi
  27054. rm -f core conftest.err conftest.$ac_objext \
  27055. conftest$ac_exeext conftest.$ac_ext
  27056. LIBS=$ac_check_lib_save_LIBS
  27057. fi
  27058. eval ac_res=\$$as_ac_Lib
  27059. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  27060. $as_echo "$ac_res" >&6; }
  27061. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  27062. AST_ZLIB_FOUND=yes
  27063. else
  27064. AST_ZLIB_FOUND=no
  27065. fi
  27066. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  27067. fi
  27068. # now check for the header.
  27069. if test "${AST_ZLIB_FOUND}" = "yes"; then
  27070. ZLIB_LIB="${pbxlibdir} -lz "
  27071. # if --with-ZLIB=DIR has been specified, use it.
  27072. if test "x${ZLIB_DIR}" != "x"; then
  27073. ZLIB_INCLUDE="-I${ZLIB_DIR}/include"
  27074. fi
  27075. ZLIB_INCLUDE="${ZLIB_INCLUDE} "
  27076. if test "xzlib.h" = "x" ; then # no header, assume found
  27077. ZLIB_HEADER_FOUND="1"
  27078. else # check for the header
  27079. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  27080. CPPFLAGS="${CPPFLAGS} ${ZLIB_INCLUDE}"
  27081. ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
  27082. if test "x$ac_cv_header_zlib_h" = xyes; then :
  27083. ZLIB_HEADER_FOUND=1
  27084. else
  27085. ZLIB_HEADER_FOUND=0
  27086. fi
  27087. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  27088. fi
  27089. if test "x${ZLIB_HEADER_FOUND}" = "x0" ; then
  27090. ZLIB_LIB=""
  27091. ZLIB_INCLUDE=""
  27092. else
  27093. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  27094. ZLIB_LIB=""
  27095. fi
  27096. PBX_ZLIB=1
  27097. cat >>confdefs.h <<_ACEOF
  27098. #define HAVE_ZLIB 1
  27099. _ACEOF
  27100. fi
  27101. fi
  27102. fi
  27103. if test "x${PBX_UNIXODBC}" = "x1" -o "x${PBX_IODBC}" = "x1"; then
  27104. # Does ODBC support wide characters?
  27105. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ODBC has support for Unicode types" >&5
  27106. $as_echo_n "checking whether ODBC has support for Unicode types... " >&6; }
  27107. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  27108. /* end confdefs.h. */
  27109. #include <sql.h>
  27110. #include <sqlext.h>
  27111. int
  27112. main ()
  27113. {
  27114. int foo = SQL_WCHAR
  27115. ;
  27116. return 0;
  27117. }
  27118. _ACEOF
  27119. if ac_fn_c_try_link "$LINENO"; then :
  27120. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  27121. $as_echo "yes" >&6; }
  27122. $as_echo "#define HAVE_ODBC_WCHAR 1" >>confdefs.h
  27123. else
  27124. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  27125. $as_echo "no" >&6; }
  27126. fi
  27127. rm -f core conftest.err conftest.$ac_objext \
  27128. conftest$ac_exeext conftest.$ac_ext
  27129. fi
  27130. ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default"
  27131. if test "x$ac_cv_header_linux_compiler_h" = xyes; then :
  27132. cat >>confdefs.h <<_ACEOF
  27133. #define HAVE_LINUX_COMPILER_H 1
  27134. _ACEOF
  27135. fi
  27136. ac_fn_c_check_header_compile "$LINENO" "linux/ixjuser.h" "ac_cv_header_linux_ixjuser_h" "
  27137. #include <linux/version.h>
  27138. #ifdef HAVE_LINUX_COMPILER_H
  27139. #include <linux/compiler.h>
  27140. #endif
  27141. "
  27142. if test "x$ac_cv_header_linux_ixjuser_h" = xyes; then :
  27143. PBX_IXJUSER=1
  27144. else
  27145. PBX_IXJUSER=0
  27146. fi
  27147. # Used in res/res_pktccops
  27148. if test "x${PBX_MSG_NOSIGNAL}" != "x1"; then
  27149. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSG_NOSIGNAL in sys/socket.h" >&5
  27150. $as_echo_n "checking for MSG_NOSIGNAL in sys/socket.h... " >&6; }
  27151. saved_cppflags="${CPPFLAGS}"
  27152. if test "x${MSG_NOSIGNAL_DIR}" != "x"; then
  27153. MSG_NOSIGNAL_INCLUDE="-I${MSG_NOSIGNAL_DIR}/include"
  27154. fi
  27155. CPPFLAGS="${CPPFLAGS} ${MSG_NOSIGNAL_INCLUDE}"
  27156. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  27157. /* end confdefs.h. */
  27158. #include <sys/socket.h>
  27159. int
  27160. main ()
  27161. {
  27162. #if defined(MSG_NOSIGNAL)
  27163. int foo = 0;
  27164. #else
  27165. int foo = bar;
  27166. #endif
  27167. 0
  27168. ;
  27169. return 0;
  27170. }
  27171. _ACEOF
  27172. if ac_fn_c_try_compile "$LINENO"; then :
  27173. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  27174. $as_echo "yes" >&6; }
  27175. PBX_MSG_NOSIGNAL=1
  27176. $as_echo "#define HAVE_MSG_NOSIGNAL 1" >>confdefs.h
  27177. else
  27178. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  27179. $as_echo "no" >&6; }
  27180. fi
  27181. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  27182. CPPFLAGS="${saved_cppflags}"
  27183. fi
  27184. if test "x${PBX_SO_NOSIGPIPE}" != "x1"; then
  27185. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SO_NOSIGPIPE in sys/socket.h" >&5
  27186. $as_echo_n "checking for SO_NOSIGPIPE in sys/socket.h... " >&6; }
  27187. saved_cppflags="${CPPFLAGS}"
  27188. if test "x${SO_NOSIGPIPE_DIR}" != "x"; then
  27189. SO_NOSIGPIPE_INCLUDE="-I${SO_NOSIGPIPE_DIR}/include"
  27190. fi
  27191. CPPFLAGS="${CPPFLAGS} ${SO_NOSIGPIPE_INCLUDE}"
  27192. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  27193. /* end confdefs.h. */
  27194. #include <sys/socket.h>
  27195. int
  27196. main ()
  27197. {
  27198. #if defined(SO_NOSIGPIPE)
  27199. int foo = 0;
  27200. #else
  27201. int foo = bar;
  27202. #endif
  27203. 0
  27204. ;
  27205. return 0;
  27206. }
  27207. _ACEOF
  27208. if ac_fn_c_try_compile "$LINENO"; then :
  27209. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  27210. $as_echo "yes" >&6; }
  27211. PBX_SO_NOSIGPIPE=1
  27212. $as_echo "#define HAVE_SO_NOSIGPIPE 1" >>confdefs.h
  27213. else
  27214. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  27215. $as_echo "no" >&6; }
  27216. fi
  27217. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  27218. CPPFLAGS="${saved_cppflags}"
  27219. fi
  27220. if test "x${PBX_SDL}" != "x1" -a "${USE_SDL}" != "no"; then
  27221. PBX_SDL=0
  27222. if test -n "$ac_tool_prefix"; then
  27223. # Extract the first word of "${ac_tool_prefix}sdl-config", so it can be a program name with args.
  27224. set dummy ${ac_tool_prefix}sdl-config; ac_word=$2
  27225. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  27226. $as_echo_n "checking for $ac_word... " >&6; }
  27227. if ${ac_cv_path_CONFIG_SDL+:} false; then :
  27228. $as_echo_n "(cached) " >&6
  27229. else
  27230. case $CONFIG_SDL in
  27231. [\\/]* | ?:[\\/]*)
  27232. ac_cv_path_CONFIG_SDL="$CONFIG_SDL" # Let the user override the test with a path.
  27233. ;;
  27234. *)
  27235. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  27236. as_dummy="${SDL_DIR}/bin:$PATH"
  27237. for as_dir in $as_dummy
  27238. do
  27239. IFS=$as_save_IFS
  27240. test -z "$as_dir" && as_dir=.
  27241. for ac_exec_ext in '' $ac_executable_extensions; do
  27242. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  27243. ac_cv_path_CONFIG_SDL="$as_dir/$ac_word$ac_exec_ext"
  27244. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  27245. break 2
  27246. fi
  27247. done
  27248. done
  27249. IFS=$as_save_IFS
  27250. ;;
  27251. esac
  27252. fi
  27253. CONFIG_SDL=$ac_cv_path_CONFIG_SDL
  27254. if test -n "$CONFIG_SDL"; then
  27255. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONFIG_SDL" >&5
  27256. $as_echo "$CONFIG_SDL" >&6; }
  27257. else
  27258. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  27259. $as_echo "no" >&6; }
  27260. fi
  27261. fi
  27262. if test -z "$ac_cv_path_CONFIG_SDL"; then
  27263. ac_pt_CONFIG_SDL=$CONFIG_SDL
  27264. # Extract the first word of "sdl-config", so it can be a program name with args.
  27265. set dummy sdl-config; ac_word=$2
  27266. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  27267. $as_echo_n "checking for $ac_word... " >&6; }
  27268. if ${ac_cv_path_ac_pt_CONFIG_SDL+:} false; then :
  27269. $as_echo_n "(cached) " >&6
  27270. else
  27271. case $ac_pt_CONFIG_SDL in
  27272. [\\/]* | ?:[\\/]*)
  27273. ac_cv_path_ac_pt_CONFIG_SDL="$ac_pt_CONFIG_SDL" # Let the user override the test with a path.
  27274. ;;
  27275. *)
  27276. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  27277. as_dummy="${SDL_DIR}/bin:$PATH"
  27278. for as_dir in $as_dummy
  27279. do
  27280. IFS=$as_save_IFS
  27281. test -z "$as_dir" && as_dir=.
  27282. for ac_exec_ext in '' $ac_executable_extensions; do
  27283. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  27284. ac_cv_path_ac_pt_CONFIG_SDL="$as_dir/$ac_word$ac_exec_ext"
  27285. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  27286. break 2
  27287. fi
  27288. done
  27289. done
  27290. IFS=$as_save_IFS
  27291. ;;
  27292. esac
  27293. fi
  27294. ac_pt_CONFIG_SDL=$ac_cv_path_ac_pt_CONFIG_SDL
  27295. if test -n "$ac_pt_CONFIG_SDL"; then
  27296. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CONFIG_SDL" >&5
  27297. $as_echo "$ac_pt_CONFIG_SDL" >&6; }
  27298. else
  27299. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  27300. $as_echo "no" >&6; }
  27301. fi
  27302. if test "x$ac_pt_CONFIG_SDL" = x; then
  27303. CONFIG_SDL="No"
  27304. else
  27305. case $cross_compiling:$ac_tool_warned in
  27306. yes:)
  27307. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  27308. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  27309. ac_tool_warned=yes ;;
  27310. esac
  27311. CONFIG_SDL=$ac_pt_CONFIG_SDL
  27312. fi
  27313. else
  27314. CONFIG_SDL="$ac_cv_path_CONFIG_SDL"
  27315. fi
  27316. if test ! "x${CONFIG_SDL}" = xNo; then
  27317. if test x"" = x ; then A=--cflags ; else A="" ; fi
  27318. SDL_INCLUDE=$(${CONFIG_SDL} $A)
  27319. SDL_INCLUDE=$(echo ${SDL_INCLUDE} | $SED -e "s|-I|-I${SDL_DIR}|g")
  27320. if test x"" = x ; then A=--libs ; else A="" ; fi
  27321. SDL_LIB=$(${CONFIG_SDL} $A)
  27322. SDL_LIB=$(echo ${SDL_LIB} | $SED -e "s|-L|-L${SDL_DIR}|g")
  27323. if test x"" != x ; then
  27324. saved_cppflags="${CPPFLAGS}"
  27325. CPPFLAGS="${CPPFLAGS} ${SDL_INCLUDE}"
  27326. saved_libs="${LIBS}"
  27327. LIBS=${SDL_LIB}
  27328. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  27329. /* end confdefs.h. */
  27330. int
  27331. main ()
  27332. {
  27333. ;
  27334. ;
  27335. return 0;
  27336. }
  27337. _ACEOF
  27338. if ac_fn_c_try_link "$LINENO"; then :
  27339. PBX_SDL=1
  27340. $as_echo "#define HAVE_SDL 1" >>confdefs.h
  27341. fi
  27342. rm -f core conftest.err conftest.$ac_objext \
  27343. conftest$ac_exeext conftest.$ac_ext
  27344. CPPFLAGS="${saved_cppflags}"
  27345. LIBS="${saved_libs}"
  27346. else
  27347. PBX_SDL=1
  27348. $as_echo "#define HAVE_SDL 1" >>confdefs.h
  27349. fi
  27350. fi
  27351. fi
  27352. if test "x${PBX_SDL_IMAGE}" != "x1" -a "${USE_SDL_IMAGE}" != "no"; then
  27353. pbxlibdir=""
  27354. # if --with-SDL_IMAGE=DIR has been specified, use it.
  27355. if test "x${SDL_IMAGE_DIR}" != "x"; then
  27356. if test -d ${SDL_IMAGE_DIR}/lib; then
  27357. pbxlibdir="-L${SDL_IMAGE_DIR}/lib"
  27358. else
  27359. pbxlibdir="-L${SDL_IMAGE_DIR}"
  27360. fi
  27361. fi
  27362. pbxfuncname="IMG_Load"
  27363. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  27364. AST_SDL_IMAGE_FOUND=yes
  27365. else
  27366. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  27367. CFLAGS="${CFLAGS} ${SDL_INCLUDE}"
  27368. as_ac_Lib=`$as_echo "ac_cv_lib_SDL_image_${pbxfuncname}" | $as_tr_sh`
  27369. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lSDL_image" >&5
  27370. $as_echo_n "checking for ${pbxfuncname} in -lSDL_image... " >&6; }
  27371. if eval \${$as_ac_Lib+:} false; then :
  27372. $as_echo_n "(cached) " >&6
  27373. else
  27374. ac_check_lib_save_LIBS=$LIBS
  27375. LIBS="-lSDL_image ${pbxlibdir} ${SDL_LIB} $LIBS"
  27376. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  27377. /* end confdefs.h. */
  27378. /* Override any GCC internal prototype to avoid an error.
  27379. Use char because int might match the return type of a GCC
  27380. builtin and then its argument prototype would still apply. */
  27381. #ifdef __cplusplus
  27382. extern "C"
  27383. #endif
  27384. char ${pbxfuncname} ();
  27385. int
  27386. main ()
  27387. {
  27388. return ${pbxfuncname} ();
  27389. ;
  27390. return 0;
  27391. }
  27392. _ACEOF
  27393. if ac_fn_c_try_link "$LINENO"; then :
  27394. eval "$as_ac_Lib=yes"
  27395. else
  27396. eval "$as_ac_Lib=no"
  27397. fi
  27398. rm -f core conftest.err conftest.$ac_objext \
  27399. conftest$ac_exeext conftest.$ac_ext
  27400. LIBS=$ac_check_lib_save_LIBS
  27401. fi
  27402. eval ac_res=\$$as_ac_Lib
  27403. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  27404. $as_echo "$ac_res" >&6; }
  27405. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  27406. AST_SDL_IMAGE_FOUND=yes
  27407. else
  27408. AST_SDL_IMAGE_FOUND=no
  27409. fi
  27410. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  27411. fi
  27412. # now check for the header.
  27413. if test "${AST_SDL_IMAGE_FOUND}" = "yes"; then
  27414. SDL_IMAGE_LIB="${pbxlibdir} -lSDL_image ${SDL_LIB}"
  27415. # if --with-SDL_IMAGE=DIR has been specified, use it.
  27416. if test "x${SDL_IMAGE_DIR}" != "x"; then
  27417. SDL_IMAGE_INCLUDE="-I${SDL_IMAGE_DIR}/include"
  27418. fi
  27419. SDL_IMAGE_INCLUDE="${SDL_IMAGE_INCLUDE} ${SDL_INCLUDE}"
  27420. if test "xSDL_image.h" = "x" ; then # no header, assume found
  27421. SDL_IMAGE_HEADER_FOUND="1"
  27422. else # check for the header
  27423. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  27424. CPPFLAGS="${CPPFLAGS} ${SDL_IMAGE_INCLUDE}"
  27425. ac_fn_c_check_header_mongrel "$LINENO" "SDL_image.h" "ac_cv_header_SDL_image_h" "$ac_includes_default"
  27426. if test "x$ac_cv_header_SDL_image_h" = xyes; then :
  27427. SDL_IMAGE_HEADER_FOUND=1
  27428. else
  27429. SDL_IMAGE_HEADER_FOUND=0
  27430. fi
  27431. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  27432. fi
  27433. if test "x${SDL_IMAGE_HEADER_FOUND}" = "x0" ; then
  27434. SDL_IMAGE_LIB=""
  27435. SDL_IMAGE_INCLUDE=""
  27436. else
  27437. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  27438. SDL_IMAGE_LIB=""
  27439. fi
  27440. PBX_SDL_IMAGE=1
  27441. cat >>confdefs.h <<_ACEOF
  27442. #define HAVE_SDL_IMAGE 1
  27443. _ACEOF
  27444. fi
  27445. fi
  27446. fi
  27447. if test "x${PBX_FFMPEG}" != "x1" -a "${USE_FFMPEG}" != "no"; then
  27448. pbxlibdir=""
  27449. # if --with-FFMPEG=DIR has been specified, use it.
  27450. if test "x${FFMPEG_DIR}" != "x"; then
  27451. if test -d ${FFMPEG_DIR}/lib; then
  27452. pbxlibdir="-L${FFMPEG_DIR}/lib"
  27453. else
  27454. pbxlibdir="-L${FFMPEG_DIR}"
  27455. fi
  27456. fi
  27457. pbxfuncname="sws_getContext"
  27458. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  27459. AST_FFMPEG_FOUND=yes
  27460. else
  27461. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  27462. CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
  27463. as_ac_Lib=`$as_echo "ac_cv_lib_avcodec_${pbxfuncname}" | $as_tr_sh`
  27464. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lavcodec" >&5
  27465. $as_echo_n "checking for ${pbxfuncname} in -lavcodec... " >&6; }
  27466. if eval \${$as_ac_Lib+:} false; then :
  27467. $as_echo_n "(cached) " >&6
  27468. else
  27469. ac_check_lib_save_LIBS=$LIBS
  27470. LIBS="-lavcodec ${pbxlibdir} ${PTHREAD_LIBS} -lz -lm $LIBS"
  27471. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  27472. /* end confdefs.h. */
  27473. /* Override any GCC internal prototype to avoid an error.
  27474. Use char because int might match the return type of a GCC
  27475. builtin and then its argument prototype would still apply. */
  27476. #ifdef __cplusplus
  27477. extern "C"
  27478. #endif
  27479. char ${pbxfuncname} ();
  27480. int
  27481. main ()
  27482. {
  27483. return ${pbxfuncname} ();
  27484. ;
  27485. return 0;
  27486. }
  27487. _ACEOF
  27488. if ac_fn_c_try_link "$LINENO"; then :
  27489. eval "$as_ac_Lib=yes"
  27490. else
  27491. eval "$as_ac_Lib=no"
  27492. fi
  27493. rm -f core conftest.err conftest.$ac_objext \
  27494. conftest$ac_exeext conftest.$ac_ext
  27495. LIBS=$ac_check_lib_save_LIBS
  27496. fi
  27497. eval ac_res=\$$as_ac_Lib
  27498. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  27499. $as_echo "$ac_res" >&6; }
  27500. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  27501. AST_FFMPEG_FOUND=yes
  27502. else
  27503. AST_FFMPEG_FOUND=no
  27504. fi
  27505. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  27506. fi
  27507. # now check for the header.
  27508. if test "${AST_FFMPEG_FOUND}" = "yes"; then
  27509. FFMPEG_LIB="${pbxlibdir} -lavcodec ${PTHREAD_LIBS} -lz -lm"
  27510. # if --with-FFMPEG=DIR has been specified, use it.
  27511. if test "x${FFMPEG_DIR}" != "x"; then
  27512. FFMPEG_INCLUDE="-I${FFMPEG_DIR}/include"
  27513. fi
  27514. FFMPEG_INCLUDE="${FFMPEG_INCLUDE} ${PTHREAD_CFLAGS}"
  27515. if test "xffmpeg/avcodec.h" = "x" ; then # no header, assume found
  27516. FFMPEG_HEADER_FOUND="1"
  27517. else # check for the header
  27518. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  27519. CPPFLAGS="${CPPFLAGS} ${FFMPEG_INCLUDE}"
  27520. ac_fn_c_check_header_mongrel "$LINENO" "ffmpeg/avcodec.h" "ac_cv_header_ffmpeg_avcodec_h" "$ac_includes_default"
  27521. if test "x$ac_cv_header_ffmpeg_avcodec_h" = xyes; then :
  27522. FFMPEG_HEADER_FOUND=1
  27523. else
  27524. FFMPEG_HEADER_FOUND=0
  27525. fi
  27526. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  27527. fi
  27528. if test "x${FFMPEG_HEADER_FOUND}" = "x0" ; then
  27529. FFMPEG_LIB=""
  27530. FFMPEG_INCLUDE=""
  27531. else
  27532. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  27533. FFMPEG_LIB=""
  27534. fi
  27535. PBX_FFMPEG=1
  27536. cat >>confdefs.h <<_ACEOF
  27537. #define HAVE_FFMPEG 1
  27538. _ACEOF
  27539. fi
  27540. fi
  27541. fi
  27542. # possible places for video4linux version 1
  27543. ac_fn_c_check_header_mongrel "$LINENO" "linux/videodev.h" "ac_cv_header_linux_videodev_h" "$ac_includes_default"
  27544. if test "x$ac_cv_header_linux_videodev_h" = xyes; then :
  27545. cat >>confdefs.h <<_ACEOF
  27546. #define HAVE_VIDEODEV_H 1
  27547. _ACEOF
  27548. fi
  27549. # possible places for X11
  27550. if test "x${PBX_X11}" != "x1" -a "${USE_X11}" != "no"; then
  27551. pbxlibdir=""
  27552. # if --with-X11=DIR has been specified, use it.
  27553. if test "x${X11_DIR}" != "x"; then
  27554. if test -d ${X11_DIR}/lib; then
  27555. pbxlibdir="-L${X11_DIR}/lib"
  27556. else
  27557. pbxlibdir="-L${X11_DIR}"
  27558. fi
  27559. fi
  27560. pbxfuncname="XOpenDisplay"
  27561. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  27562. AST_X11_FOUND=yes
  27563. else
  27564. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  27565. CFLAGS="${CFLAGS} "
  27566. as_ac_Lib=`$as_echo "ac_cv_lib_X11_${pbxfuncname}" | $as_tr_sh`
  27567. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lX11" >&5
  27568. $as_echo_n "checking for ${pbxfuncname} in -lX11... " >&6; }
  27569. if eval \${$as_ac_Lib+:} false; then :
  27570. $as_echo_n "(cached) " >&6
  27571. else
  27572. ac_check_lib_save_LIBS=$LIBS
  27573. LIBS="-lX11 ${pbxlibdir} $LIBS"
  27574. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  27575. /* end confdefs.h. */
  27576. /* Override any GCC internal prototype to avoid an error.
  27577. Use char because int might match the return type of a GCC
  27578. builtin and then its argument prototype would still apply. */
  27579. #ifdef __cplusplus
  27580. extern "C"
  27581. #endif
  27582. char ${pbxfuncname} ();
  27583. int
  27584. main ()
  27585. {
  27586. return ${pbxfuncname} ();
  27587. ;
  27588. return 0;
  27589. }
  27590. _ACEOF
  27591. if ac_fn_c_try_link "$LINENO"; then :
  27592. eval "$as_ac_Lib=yes"
  27593. else
  27594. eval "$as_ac_Lib=no"
  27595. fi
  27596. rm -f core conftest.err conftest.$ac_objext \
  27597. conftest$ac_exeext conftest.$ac_ext
  27598. LIBS=$ac_check_lib_save_LIBS
  27599. fi
  27600. eval ac_res=\$$as_ac_Lib
  27601. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  27602. $as_echo "$ac_res" >&6; }
  27603. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  27604. AST_X11_FOUND=yes
  27605. else
  27606. AST_X11_FOUND=no
  27607. fi
  27608. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  27609. fi
  27610. # now check for the header.
  27611. if test "${AST_X11_FOUND}" = "yes"; then
  27612. X11_LIB="${pbxlibdir} -lX11 "
  27613. # if --with-X11=DIR has been specified, use it.
  27614. if test "x${X11_DIR}" != "x"; then
  27615. X11_INCLUDE="-I${X11_DIR}/include"
  27616. fi
  27617. X11_INCLUDE="${X11_INCLUDE} "
  27618. if test "xX11/Xlib.h" = "x" ; then # no header, assume found
  27619. X11_HEADER_FOUND="1"
  27620. else # check for the header
  27621. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  27622. CPPFLAGS="${CPPFLAGS} ${X11_INCLUDE}"
  27623. ac_fn_c_check_header_mongrel "$LINENO" "X11/Xlib.h" "ac_cv_header_X11_Xlib_h" "$ac_includes_default"
  27624. if test "x$ac_cv_header_X11_Xlib_h" = xyes; then :
  27625. X11_HEADER_FOUND=1
  27626. else
  27627. X11_HEADER_FOUND=0
  27628. fi
  27629. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  27630. fi
  27631. if test "x${X11_HEADER_FOUND}" = "x0" ; then
  27632. X11_LIB=""
  27633. X11_INCLUDE=""
  27634. else
  27635. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  27636. X11_LIB=""
  27637. fi
  27638. PBX_X11=1
  27639. cat >>confdefs.h <<_ACEOF
  27640. #define HAVE_X11 1
  27641. _ACEOF
  27642. cat >>confdefs.h <<_ACEOF
  27643. #define HAVE_X11_VERSION standard_path
  27644. _ACEOF
  27645. fi
  27646. fi
  27647. fi
  27648. if test "x${PBX_X11}" != "x1" -a "${USE_X11}" != "no"; then
  27649. pbxlibdir=""
  27650. # if --with-X11=DIR has been specified, use it.
  27651. if test "x${X11_DIR}" != "x"; then
  27652. if test -d ${X11_DIR}/lib; then
  27653. pbxlibdir="-L${X11_DIR}/lib"
  27654. else
  27655. pbxlibdir="-L${X11_DIR}"
  27656. fi
  27657. fi
  27658. pbxfuncname="XOpenDisplay"
  27659. if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
  27660. AST_X11_FOUND=yes
  27661. else
  27662. ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
  27663. CFLAGS="${CFLAGS} -I/usr/X11R6/include"
  27664. as_ac_Lib=`$as_echo "ac_cv_lib_X11_${pbxfuncname}" | $as_tr_sh`
  27665. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lX11" >&5
  27666. $as_echo_n "checking for ${pbxfuncname} in -lX11... " >&6; }
  27667. if eval \${$as_ac_Lib+:} false; then :
  27668. $as_echo_n "(cached) " >&6
  27669. else
  27670. ac_check_lib_save_LIBS=$LIBS
  27671. LIBS="-lX11 ${pbxlibdir} $LIBS"
  27672. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  27673. /* end confdefs.h. */
  27674. /* Override any GCC internal prototype to avoid an error.
  27675. Use char because int might match the return type of a GCC
  27676. builtin and then its argument prototype would still apply. */
  27677. #ifdef __cplusplus
  27678. extern "C"
  27679. #endif
  27680. char ${pbxfuncname} ();
  27681. int
  27682. main ()
  27683. {
  27684. return ${pbxfuncname} ();
  27685. ;
  27686. return 0;
  27687. }
  27688. _ACEOF
  27689. if ac_fn_c_try_link "$LINENO"; then :
  27690. eval "$as_ac_Lib=yes"
  27691. else
  27692. eval "$as_ac_Lib=no"
  27693. fi
  27694. rm -f core conftest.err conftest.$ac_objext \
  27695. conftest$ac_exeext conftest.$ac_ext
  27696. LIBS=$ac_check_lib_save_LIBS
  27697. fi
  27698. eval ac_res=\$$as_ac_Lib
  27699. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  27700. $as_echo "$ac_res" >&6; }
  27701. if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  27702. AST_X11_FOUND=yes
  27703. else
  27704. AST_X11_FOUND=no
  27705. fi
  27706. CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
  27707. fi
  27708. # now check for the header.
  27709. if test "${AST_X11_FOUND}" = "yes"; then
  27710. X11_LIB="${pbxlibdir} -lX11 "
  27711. # if --with-X11=DIR has been specified, use it.
  27712. if test "x${X11_DIR}" != "x"; then
  27713. X11_INCLUDE="-I${X11_DIR}/include"
  27714. fi
  27715. X11_INCLUDE="${X11_INCLUDE} -I/usr/X11R6/include"
  27716. if test "xX11/Xlib.h" = "x" ; then # no header, assume found
  27717. X11_HEADER_FOUND="1"
  27718. else # check for the header
  27719. ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
  27720. CPPFLAGS="${CPPFLAGS} ${X11_INCLUDE}"
  27721. ac_fn_c_check_header_mongrel "$LINENO" "X11/Xlib.h" "ac_cv_header_X11_Xlib_h" "$ac_includes_default"
  27722. if test "x$ac_cv_header_X11_Xlib_h" = xyes; then :
  27723. X11_HEADER_FOUND=1
  27724. else
  27725. X11_HEADER_FOUND=0
  27726. fi
  27727. CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
  27728. fi
  27729. if test "x${X11_HEADER_FOUND}" = "x0" ; then
  27730. X11_LIB=""
  27731. X11_INCLUDE=""
  27732. else
  27733. if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
  27734. X11_LIB=""
  27735. fi
  27736. PBX_X11=1
  27737. cat >>confdefs.h <<_ACEOF
  27738. #define HAVE_X11 1
  27739. _ACEOF
  27740. cat >>confdefs.h <<_ACEOF
  27741. #define HAVE_X11_VERSION X11R6
  27742. _ACEOF
  27743. fi
  27744. fi
  27745. fi
  27746. PBX_LAUNCHD=0
  27747. if test "${cross_compiling}" = "no";
  27748. then
  27749. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /sbin/launchd" >&5
  27750. $as_echo_n "checking for /sbin/launchd... " >&6; }
  27751. if ${ac_cv_file__sbin_launchd+:} false; then :
  27752. $as_echo_n "(cached) " >&6
  27753. else
  27754. test "$cross_compiling" = yes &&
  27755. as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
  27756. if test -r "/sbin/launchd"; then
  27757. ac_cv_file__sbin_launchd=yes
  27758. else
  27759. ac_cv_file__sbin_launchd=no
  27760. fi
  27761. fi
  27762. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__sbin_launchd" >&5
  27763. $as_echo "$ac_cv_file__sbin_launchd" >&6; }
  27764. if test "x$ac_cv_file__sbin_launchd" = xyes; then :
  27765. PBX_LAUNCHD=1
  27766. $as_echo "#define HAVE_SBIN_LAUNCHD 1" >>confdefs.h
  27767. fi
  27768. fi
  27769. if test "x${PBX_GTK2}" != "x1" -a "${USE_GTK2}" != "no"; then
  27770. pkg_failed=no
  27771. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK2" >&5
  27772. $as_echo_n "checking for GTK2... " >&6; }
  27773. if test -n "$GTK2_CFLAGS"; then
  27774. pkg_cv_GTK2_CFLAGS="$GTK2_CFLAGS"
  27775. elif test -n "$PKG_CONFIG"; then
  27776. if test -n "$PKG_CONFIG" && \
  27777. { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\""; } >&5
  27778. ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5
  27779. ac_status=$?
  27780. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  27781. test $ac_status = 0; }; then
  27782. pkg_cv_GTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0" 2>/dev/null`
  27783. test "x$?" != "x0" && pkg_failed=yes
  27784. else
  27785. pkg_failed=yes
  27786. fi
  27787. else
  27788. pkg_failed=untried
  27789. fi
  27790. if test -n "$GTK2_LIBS"; then
  27791. pkg_cv_GTK2_LIBS="$GTK2_LIBS"
  27792. elif test -n "$PKG_CONFIG"; then
  27793. if test -n "$PKG_CONFIG" && \
  27794. { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\""; } >&5
  27795. ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5
  27796. ac_status=$?
  27797. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  27798. test $ac_status = 0; }; then
  27799. pkg_cv_GTK2_LIBS=`$PKG_CONFIG --libs "gtk+-2.0" 2>/dev/null`
  27800. test "x$?" != "x0" && pkg_failed=yes
  27801. else
  27802. pkg_failed=yes
  27803. fi
  27804. else
  27805. pkg_failed=untried
  27806. fi
  27807. if test $pkg_failed = yes; then
  27808. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  27809. $as_echo "no" >&6; }
  27810. if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  27811. _pkg_short_errors_supported=yes
  27812. else
  27813. _pkg_short_errors_supported=no
  27814. fi
  27815. if test $_pkg_short_errors_supported = yes; then
  27816. GTK2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-2.0" 2>&1`
  27817. else
  27818. GTK2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-2.0" 2>&1`
  27819. fi
  27820. # Put the nasty error message in config.log where it belongs
  27821. echo "$GTK2_PKG_ERRORS" >&5
  27822. PBX_GTK2=0
  27823. elif test $pkg_failed = untried; then
  27824. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  27825. $as_echo "no" >&6; }
  27826. PBX_GTK2=0
  27827. else
  27828. GTK2_CFLAGS=$pkg_cv_GTK2_CFLAGS
  27829. GTK2_LIBS=$pkg_cv_GTK2_LIBS
  27830. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  27831. $as_echo "yes" >&6; }
  27832. PBX_GTK2=1
  27833. GTK2_INCLUDE="$GTK2_CFLAGS"
  27834. GTK2_LIB="$GTK2_LIBS"
  27835. $as_echo "#define HAVE_GTK2 1" >>confdefs.h
  27836. fi
  27837. fi
  27838. # build a GENERIC_ODBC result based on the presence of either UnixODBC (preferred)
  27839. # or iODBC
  27840. PBX_GENERIC_ODBC=0
  27841. if test "${PBX_UNIXODBC}" = 1; then
  27842. PBX_GENERIC_ODBC=1
  27843. GENERIC_ODBC_LIB="${UNIXODBC_LIB}"
  27844. GENERIC_ODBC_INCLUDE="${UNIXODBC_INCLUDE}"
  27845. elif test "${PBX_IODBC}" = 1; then
  27846. PBX_GENERIC_ODBC=1
  27847. GENERIC_ODBC_LIB="${IODBC_LIB}"
  27848. GENERIC_ODBC_INCLUDE="${IODBC_INCLUDE}"
  27849. fi
  27850. PBX_SYSLOG=0
  27851. if test "${ac_cv_header_syslog_h}" = "yes"; then
  27852. # syslog facilities
  27853. if test "x${PBX_SYSLOG_FACILITY_LOG_AUTH}" != "x1"; then
  27854. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOG_AUTH in syslog.h" >&5
  27855. $as_echo_n "checking for LOG_AUTH in syslog.h... " >&6; }
  27856. saved_cppflags="${CPPFLAGS}"
  27857. if test "x${SYSLOG_FACILITY_LOG_AUTH_DIR}" != "x"; then
  27858. SYSLOG_FACILITY_LOG_AUTH_INCLUDE="-I${SYSLOG_FACILITY_LOG_AUTH_DIR}/include"
  27859. fi
  27860. CPPFLAGS="${CPPFLAGS} ${SYSLOG_FACILITY_LOG_AUTH_INCLUDE}"
  27861. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  27862. /* end confdefs.h. */
  27863. #include <syslog.h>
  27864. int
  27865. main ()
  27866. {
  27867. #if defined(LOG_AUTH)
  27868. int foo = 0;
  27869. #else
  27870. int foo = bar;
  27871. #endif
  27872. 0
  27873. ;
  27874. return 0;
  27875. }
  27876. _ACEOF
  27877. if ac_fn_c_try_compile "$LINENO"; then :
  27878. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  27879. $as_echo "yes" >&6; }
  27880. PBX_SYSLOG_FACILITY_LOG_AUTH=1
  27881. $as_echo "#define HAVE_SYSLOG_FACILITY_LOG_AUTH 1" >>confdefs.h
  27882. else
  27883. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  27884. $as_echo "no" >&6; }
  27885. fi
  27886. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  27887. CPPFLAGS="${saved_cppflags}"
  27888. fi
  27889. if test "x${PBX_SYSLOG_FACILITY_LOG_AUTHPRIV}" != "x1"; then
  27890. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOG_AUTHPRIV in syslog.h" >&5
  27891. $as_echo_n "checking for LOG_AUTHPRIV in syslog.h... " >&6; }
  27892. saved_cppflags="${CPPFLAGS}"
  27893. if test "x${SYSLOG_FACILITY_LOG_AUTHPRIV_DIR}" != "x"; then
  27894. SYSLOG_FACILITY_LOG_AUTHPRIV_INCLUDE="-I${SYSLOG_FACILITY_LOG_AUTHPRIV_DIR}/include"
  27895. fi
  27896. CPPFLAGS="${CPPFLAGS} ${SYSLOG_FACILITY_LOG_AUTHPRIV_INCLUDE}"
  27897. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  27898. /* end confdefs.h. */
  27899. #include <syslog.h>
  27900. int
  27901. main ()
  27902. {
  27903. #if defined(LOG_AUTHPRIV)
  27904. int foo = 0;
  27905. #else
  27906. int foo = bar;
  27907. #endif
  27908. 0
  27909. ;
  27910. return 0;
  27911. }
  27912. _ACEOF
  27913. if ac_fn_c_try_compile "$LINENO"; then :
  27914. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  27915. $as_echo "yes" >&6; }
  27916. PBX_SYSLOG_FACILITY_LOG_AUTHPRIV=1
  27917. $as_echo "#define HAVE_SYSLOG_FACILITY_LOG_AUTHPRIV 1" >>confdefs.h
  27918. else
  27919. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  27920. $as_echo "no" >&6; }
  27921. fi
  27922. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  27923. CPPFLAGS="${saved_cppflags}"
  27924. fi
  27925. if test "x${PBX_SYSLOG_FACILITY_LOG_CRON}" != "x1"; then
  27926. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOG_CRON in syslog.h" >&5
  27927. $as_echo_n "checking for LOG_CRON in syslog.h... " >&6; }
  27928. saved_cppflags="${CPPFLAGS}"
  27929. if test "x${SYSLOG_FACILITY_LOG_CRON_DIR}" != "x"; then
  27930. SYSLOG_FACILITY_LOG_CRON_INCLUDE="-I${SYSLOG_FACILITY_LOG_CRON_DIR}/include"
  27931. fi
  27932. CPPFLAGS="${CPPFLAGS} ${SYSLOG_FACILITY_LOG_CRON_INCLUDE}"
  27933. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  27934. /* end confdefs.h. */
  27935. #include <syslog.h>
  27936. int
  27937. main ()
  27938. {
  27939. #if defined(LOG_CRON)
  27940. int foo = 0;
  27941. #else
  27942. int foo = bar;
  27943. #endif
  27944. 0
  27945. ;
  27946. return 0;
  27947. }
  27948. _ACEOF
  27949. if ac_fn_c_try_compile "$LINENO"; then :
  27950. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  27951. $as_echo "yes" >&6; }
  27952. PBX_SYSLOG_FACILITY_LOG_CRON=1
  27953. $as_echo "#define HAVE_SYSLOG_FACILITY_LOG_CRON 1" >>confdefs.h
  27954. else
  27955. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  27956. $as_echo "no" >&6; }
  27957. fi
  27958. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  27959. CPPFLAGS="${saved_cppflags}"
  27960. fi
  27961. if test "x${PBX_SYSLOG_FACILITY_LOG_DAEMON}" != "x1"; then
  27962. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOG_DAEMON in syslog.h" >&5
  27963. $as_echo_n "checking for LOG_DAEMON in syslog.h... " >&6; }
  27964. saved_cppflags="${CPPFLAGS}"
  27965. if test "x${SYSLOG_FACILITY_LOG_DAEMON_DIR}" != "x"; then
  27966. SYSLOG_FACILITY_LOG_DAEMON_INCLUDE="-I${SYSLOG_FACILITY_LOG_DAEMON_DIR}/include"
  27967. fi
  27968. CPPFLAGS="${CPPFLAGS} ${SYSLOG_FACILITY_LOG_DAEMON_INCLUDE}"
  27969. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  27970. /* end confdefs.h. */
  27971. #include <syslog.h>
  27972. int
  27973. main ()
  27974. {
  27975. #if defined(LOG_DAEMON)
  27976. int foo = 0;
  27977. #else
  27978. int foo = bar;
  27979. #endif
  27980. 0
  27981. ;
  27982. return 0;
  27983. }
  27984. _ACEOF
  27985. if ac_fn_c_try_compile "$LINENO"; then :
  27986. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  27987. $as_echo "yes" >&6; }
  27988. PBX_SYSLOG_FACILITY_LOG_DAEMON=1
  27989. $as_echo "#define HAVE_SYSLOG_FACILITY_LOG_DAEMON 1" >>confdefs.h
  27990. else
  27991. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  27992. $as_echo "no" >&6; }
  27993. fi
  27994. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  27995. CPPFLAGS="${saved_cppflags}"
  27996. fi
  27997. if test "x${PBX_SYSLOG_FACILITY_LOG_FTP}" != "x1"; then
  27998. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOG_FTP in syslog.h" >&5
  27999. $as_echo_n "checking for LOG_FTP in syslog.h... " >&6; }
  28000. saved_cppflags="${CPPFLAGS}"
  28001. if test "x${SYSLOG_FACILITY_LOG_FTP_DIR}" != "x"; then
  28002. SYSLOG_FACILITY_LOG_FTP_INCLUDE="-I${SYSLOG_FACILITY_LOG_FTP_DIR}/include"
  28003. fi
  28004. CPPFLAGS="${CPPFLAGS} ${SYSLOG_FACILITY_LOG_FTP_INCLUDE}"
  28005. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  28006. /* end confdefs.h. */
  28007. #include <syslog.h>
  28008. int
  28009. main ()
  28010. {
  28011. #if defined(LOG_FTP)
  28012. int foo = 0;
  28013. #else
  28014. int foo = bar;
  28015. #endif
  28016. 0
  28017. ;
  28018. return 0;
  28019. }
  28020. _ACEOF
  28021. if ac_fn_c_try_compile "$LINENO"; then :
  28022. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  28023. $as_echo "yes" >&6; }
  28024. PBX_SYSLOG_FACILITY_LOG_FTP=1
  28025. $as_echo "#define HAVE_SYSLOG_FACILITY_LOG_FTP 1" >>confdefs.h
  28026. else
  28027. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  28028. $as_echo "no" >&6; }
  28029. fi
  28030. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  28031. CPPFLAGS="${saved_cppflags}"
  28032. fi
  28033. if test "x${PBX_SYSLOG_FACILITY_LOG_KERN}" != "x1"; then
  28034. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOG_KERN in syslog.h" >&5
  28035. $as_echo_n "checking for LOG_KERN in syslog.h... " >&6; }
  28036. saved_cppflags="${CPPFLAGS}"
  28037. if test "x${SYSLOG_FACILITY_LOG_KERN_DIR}" != "x"; then
  28038. SYSLOG_FACILITY_LOG_KERN_INCLUDE="-I${SYSLOG_FACILITY_LOG_KERN_DIR}/include"
  28039. fi
  28040. CPPFLAGS="${CPPFLAGS} ${SYSLOG_FACILITY_LOG_KERN_INCLUDE}"
  28041. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  28042. /* end confdefs.h. */
  28043. #include <syslog.h>
  28044. int
  28045. main ()
  28046. {
  28047. #if defined(LOG_KERN)
  28048. int foo = 0;
  28049. #else
  28050. int foo = bar;
  28051. #endif
  28052. 0
  28053. ;
  28054. return 0;
  28055. }
  28056. _ACEOF
  28057. if ac_fn_c_try_compile "$LINENO"; then :
  28058. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  28059. $as_echo "yes" >&6; }
  28060. PBX_SYSLOG_FACILITY_LOG_KERN=1
  28061. $as_echo "#define HAVE_SYSLOG_FACILITY_LOG_KERN 1" >>confdefs.h
  28062. else
  28063. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  28064. $as_echo "no" >&6; }
  28065. fi
  28066. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  28067. CPPFLAGS="${saved_cppflags}"
  28068. fi
  28069. if test "x${PBX_SYSLOG_FACILITY_LOG_LPR}" != "x1"; then
  28070. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOG_LPR in syslog.h" >&5
  28071. $as_echo_n "checking for LOG_LPR in syslog.h... " >&6; }
  28072. saved_cppflags="${CPPFLAGS}"
  28073. if test "x${SYSLOG_FACILITY_LOG_LPR_DIR}" != "x"; then
  28074. SYSLOG_FACILITY_LOG_LPR_INCLUDE="-I${SYSLOG_FACILITY_LOG_LPR_DIR}/include"
  28075. fi
  28076. CPPFLAGS="${CPPFLAGS} ${SYSLOG_FACILITY_LOG_LPR_INCLUDE}"
  28077. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  28078. /* end confdefs.h. */
  28079. #include <syslog.h>
  28080. int
  28081. main ()
  28082. {
  28083. #if defined(LOG_LPR)
  28084. int foo = 0;
  28085. #else
  28086. int foo = bar;
  28087. #endif
  28088. 0
  28089. ;
  28090. return 0;
  28091. }
  28092. _ACEOF
  28093. if ac_fn_c_try_compile "$LINENO"; then :
  28094. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  28095. $as_echo "yes" >&6; }
  28096. PBX_SYSLOG_FACILITY_LOG_LPR=1
  28097. $as_echo "#define HAVE_SYSLOG_FACILITY_LOG_LPR 1" >>confdefs.h
  28098. else
  28099. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  28100. $as_echo "no" >&6; }
  28101. fi
  28102. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  28103. CPPFLAGS="${saved_cppflags}"
  28104. fi
  28105. if test "x${PBX_SYSLOG_FACILITY_LOG_MAIL}" != "x1"; then
  28106. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOG_MAIL in syslog.h" >&5
  28107. $as_echo_n "checking for LOG_MAIL in syslog.h... " >&6; }
  28108. saved_cppflags="${CPPFLAGS}"
  28109. if test "x${SYSLOG_FACILITY_LOG_MAIL_DIR}" != "x"; then
  28110. SYSLOG_FACILITY_LOG_MAIL_INCLUDE="-I${SYSLOG_FACILITY_LOG_MAIL_DIR}/include"
  28111. fi
  28112. CPPFLAGS="${CPPFLAGS} ${SYSLOG_FACILITY_LOG_MAIL_INCLUDE}"
  28113. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  28114. /* end confdefs.h. */
  28115. #include <syslog.h>
  28116. int
  28117. main ()
  28118. {
  28119. #if defined(LOG_MAIL)
  28120. int foo = 0;
  28121. #else
  28122. int foo = bar;
  28123. #endif
  28124. 0
  28125. ;
  28126. return 0;
  28127. }
  28128. _ACEOF
  28129. if ac_fn_c_try_compile "$LINENO"; then :
  28130. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  28131. $as_echo "yes" >&6; }
  28132. PBX_SYSLOG_FACILITY_LOG_MAIL=1
  28133. $as_echo "#define HAVE_SYSLOG_FACILITY_LOG_MAIL 1" >>confdefs.h
  28134. else
  28135. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  28136. $as_echo "no" >&6; }
  28137. fi
  28138. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  28139. CPPFLAGS="${saved_cppflags}"
  28140. fi
  28141. if test "x${PBX_SYSLOG_FACILITY_LOG_NEWS}" != "x1"; then
  28142. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOG_NEWS in syslog.h" >&5
  28143. $as_echo_n "checking for LOG_NEWS in syslog.h... " >&6; }
  28144. saved_cppflags="${CPPFLAGS}"
  28145. if test "x${SYSLOG_FACILITY_LOG_NEWS_DIR}" != "x"; then
  28146. SYSLOG_FACILITY_LOG_NEWS_INCLUDE="-I${SYSLOG_FACILITY_LOG_NEWS_DIR}/include"
  28147. fi
  28148. CPPFLAGS="${CPPFLAGS} ${SYSLOG_FACILITY_LOG_NEWS_INCLUDE}"
  28149. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  28150. /* end confdefs.h. */
  28151. #include <syslog.h>
  28152. int
  28153. main ()
  28154. {
  28155. #if defined(LOG_NEWS)
  28156. int foo = 0;
  28157. #else
  28158. int foo = bar;
  28159. #endif
  28160. 0
  28161. ;
  28162. return 0;
  28163. }
  28164. _ACEOF
  28165. if ac_fn_c_try_compile "$LINENO"; then :
  28166. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  28167. $as_echo "yes" >&6; }
  28168. PBX_SYSLOG_FACILITY_LOG_NEWS=1
  28169. $as_echo "#define HAVE_SYSLOG_FACILITY_LOG_NEWS 1" >>confdefs.h
  28170. else
  28171. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  28172. $as_echo "no" >&6; }
  28173. fi
  28174. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  28175. CPPFLAGS="${saved_cppflags}"
  28176. fi
  28177. if test "x${PBX_SYSLOG_FACILITY_LOG_SYSLOG}" != "x1"; then
  28178. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOG_SYSLOG in syslog.h" >&5
  28179. $as_echo_n "checking for LOG_SYSLOG in syslog.h... " >&6; }
  28180. saved_cppflags="${CPPFLAGS}"
  28181. if test "x${SYSLOG_FACILITY_LOG_SYSLOG_DIR}" != "x"; then
  28182. SYSLOG_FACILITY_LOG_SYSLOG_INCLUDE="-I${SYSLOG_FACILITY_LOG_SYSLOG_DIR}/include"
  28183. fi
  28184. CPPFLAGS="${CPPFLAGS} ${SYSLOG_FACILITY_LOG_SYSLOG_INCLUDE}"
  28185. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  28186. /* end confdefs.h. */
  28187. #include <syslog.h>
  28188. int
  28189. main ()
  28190. {
  28191. #if defined(LOG_SYSLOG)
  28192. int foo = 0;
  28193. #else
  28194. int foo = bar;
  28195. #endif
  28196. 0
  28197. ;
  28198. return 0;
  28199. }
  28200. _ACEOF
  28201. if ac_fn_c_try_compile "$LINENO"; then :
  28202. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  28203. $as_echo "yes" >&6; }
  28204. PBX_SYSLOG_FACILITY_LOG_SYSLOG=1
  28205. $as_echo "#define HAVE_SYSLOG_FACILITY_LOG_SYSLOG 1" >>confdefs.h
  28206. else
  28207. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  28208. $as_echo "no" >&6; }
  28209. fi
  28210. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  28211. CPPFLAGS="${saved_cppflags}"
  28212. fi
  28213. if test "x${PBX_SYSLOG_FACILITY_LOG_UUCP}" != "x1"; then
  28214. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOG_UUCP in syslog.h" >&5
  28215. $as_echo_n "checking for LOG_UUCP in syslog.h... " >&6; }
  28216. saved_cppflags="${CPPFLAGS}"
  28217. if test "x${SYSLOG_FACILITY_LOG_UUCP_DIR}" != "x"; then
  28218. SYSLOG_FACILITY_LOG_UUCP_INCLUDE="-I${SYSLOG_FACILITY_LOG_UUCP_DIR}/include"
  28219. fi
  28220. CPPFLAGS="${CPPFLAGS} ${SYSLOG_FACILITY_LOG_UUCP_INCLUDE}"
  28221. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  28222. /* end confdefs.h. */
  28223. #include <syslog.h>
  28224. int
  28225. main ()
  28226. {
  28227. #if defined(LOG_UUCP)
  28228. int foo = 0;
  28229. #else
  28230. int foo = bar;
  28231. #endif
  28232. 0
  28233. ;
  28234. return 0;
  28235. }
  28236. _ACEOF
  28237. if ac_fn_c_try_compile "$LINENO"; then :
  28238. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  28239. $as_echo "yes" >&6; }
  28240. PBX_SYSLOG_FACILITY_LOG_UUCP=1
  28241. $as_echo "#define HAVE_SYSLOG_FACILITY_LOG_UUCP 1" >>confdefs.h
  28242. else
  28243. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  28244. $as_echo "no" >&6; }
  28245. fi
  28246. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  28247. CPPFLAGS="${saved_cppflags}"
  28248. fi
  28249. PBX_SYSLOG=1
  28250. fi
  28251. if test -f makeopts; then
  28252. ${ac_cv_path_EGREP} 'CURSES|GTK2|OSARCH|NEWT' makeopts > makeopts.acbak
  28253. else
  28254. touch makeopts.acbak
  28255. fi
  28256. ac_config_files="$ac_config_files build_tools/menuselect-deps makeopts"
  28257. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mandatory modules: ${ac_mandatory_list}" >&5
  28258. $as_echo_n "checking for mandatory modules: ${ac_mandatory_list}... " >&6; }
  28259. err=0;
  28260. for i in ${ac_mandatory_list}; do
  28261. eval "a=\${PBX_$i}"
  28262. if test "x${a}" = "x1" ; then continue; fi
  28263. if test ${err} = "0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: fail" >&5
  28264. $as_echo "fail" >&6; } ; fi
  28265. { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
  28266. $as_echo "" >&6; }
  28267. eval "a=\${${i}_OPTION}"
  28268. { $as_echo "$as_me:${as_lineno-$LINENO}: ***" >&5
  28269. $as_echo "$as_me: ***" >&6;}
  28270. { $as_echo "$as_me:${as_lineno-$LINENO}: *** The $i installation appears to be missing or broken." >&5
  28271. $as_echo "$as_me: *** The $i installation appears to be missing or broken." >&6;}
  28272. { $as_echo "$as_me:${as_lineno-$LINENO}: *** Either correct the installation, or run configure" >&5
  28273. $as_echo "$as_me: *** Either correct the installation, or run configure" >&6;}
  28274. { $as_echo "$as_me:${as_lineno-$LINENO}: *** including --without-${a}." >&5
  28275. $as_echo "$as_me: *** including --without-${a}." >&6;}
  28276. err=1
  28277. done
  28278. if test $err = 1 ; then exit 1; fi
  28279. { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
  28280. $as_echo "ok" >&6; }
  28281. if test -f build_tools/menuselect-deps; then
  28282. # extract old values of all PBX_ variables from menuselect-deps
  28283. # and preserve them so that menuselect can determine whether
  28284. # any previously-met dependencies are no longer met and warn
  28285. # the user appropriately
  28286. while IFS="=:" read var val old_val; do
  28287. eval "PBX_${var}=\${PBX_${var}}:${val}"
  28288. done < build_tools/menuselect-deps
  28289. fi
  28290. cat >confcache <<\_ACEOF
  28291. # This file is a shell script that caches the results of configure
  28292. # tests run on this system so they can be shared between configure
  28293. # scripts and configure runs, see configure's option --config-cache.
  28294. # It is not useful on other systems. If it contains results you don't
  28295. # want to keep, you may remove or edit it.
  28296. #
  28297. # config.status only pays attention to the cache file if you give it
  28298. # the --recheck option to rerun configure.
  28299. #
  28300. # `ac_cv_env_foo' variables (set or unset) will be overridden when
  28301. # loading this file, other *unset* `ac_cv_foo' will be assigned the
  28302. # following values.
  28303. _ACEOF
  28304. # The following way of writing the cache mishandles newlines in values,
  28305. # but we know of no workaround that is simple, portable, and efficient.
  28306. # So, we kill variables containing newlines.
  28307. # Ultrix sh set writes to stderr and can't be redirected directly,
  28308. # and sets the high bit in the cache file unless we assign to the vars.
  28309. (
  28310. for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
  28311. eval ac_val=\$$ac_var
  28312. case $ac_val in #(
  28313. *${as_nl}*)
  28314. case $ac_var in #(
  28315. *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
  28316. $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
  28317. esac
  28318. case $ac_var in #(
  28319. _ | IFS | as_nl) ;; #(
  28320. BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
  28321. *) { eval $ac_var=; unset $ac_var;} ;;
  28322. esac ;;
  28323. esac
  28324. done
  28325. (set) 2>&1 |
  28326. case $as_nl`(ac_space=' '; set) 2>&1` in #(
  28327. *${as_nl}ac_space=\ *)
  28328. # `set' does not quote correctly, so add quotes: double-quote
  28329. # substitution turns \\\\ into \\, and sed turns \\ into \.
  28330. sed -n \
  28331. "s/'/'\\\\''/g;
  28332. s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
  28333. ;; #(
  28334. *)
  28335. # `set' quotes correctly as required by POSIX, so do not add quotes.
  28336. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
  28337. ;;
  28338. esac |
  28339. sort
  28340. ) |
  28341. sed '
  28342. /^ac_cv_env_/b end
  28343. t clear
  28344. :clear
  28345. s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
  28346. t end
  28347. s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
  28348. :end' >>confcache
  28349. if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
  28350. if test -w "$cache_file"; then
  28351. if test "x$cache_file" != "x/dev/null"; then
  28352. { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
  28353. $as_echo "$as_me: updating cache $cache_file" >&6;}
  28354. if test ! -f "$cache_file" || test -h "$cache_file"; then
  28355. cat confcache >"$cache_file"
  28356. else
  28357. case $cache_file in #(
  28358. */* | ?:*)
  28359. mv -f confcache "$cache_file"$$ &&
  28360. mv -f "$cache_file"$$ "$cache_file" ;; #(
  28361. *)
  28362. mv -f confcache "$cache_file" ;;
  28363. esac
  28364. fi
  28365. fi
  28366. else
  28367. { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
  28368. $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
  28369. fi
  28370. fi
  28371. rm -f confcache
  28372. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  28373. # Let make expand exec_prefix.
  28374. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  28375. DEFS=-DHAVE_CONFIG_H
  28376. ac_libobjs=
  28377. ac_ltlibobjs=
  28378. U=
  28379. for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
  28380. # 1. Remove the extension, and $U if already installed.
  28381. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
  28382. ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
  28383. # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
  28384. # will be set to the directory where LIBOBJS objects are built.
  28385. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
  28386. as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
  28387. done
  28388. LIBOBJS=$ac_libobjs
  28389. LTLIBOBJS=$ac_ltlibobjs
  28390. : "${CONFIG_STATUS=./config.status}"
  28391. ac_write_fail=0
  28392. ac_clean_files_save=$ac_clean_files
  28393. ac_clean_files="$ac_clean_files $CONFIG_STATUS"
  28394. { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
  28395. $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
  28396. as_write_fail=0
  28397. cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
  28398. #! $SHELL
  28399. # Generated by $as_me.
  28400. # Run this file to recreate the current configuration.
  28401. # Compiler output produced by configure, useful for debugging
  28402. # configure, is in config.log if it exists.
  28403. debug=false
  28404. ac_cs_recheck=false
  28405. ac_cs_silent=false
  28406. SHELL=\${CONFIG_SHELL-$SHELL}
  28407. export SHELL
  28408. _ASEOF
  28409. cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
  28410. ## -------------------- ##
  28411. ## M4sh Initialization. ##
  28412. ## -------------------- ##
  28413. # Be more Bourne compatible
  28414. DUALCASE=1; export DUALCASE # for MKS sh
  28415. if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  28416. emulate sh
  28417. NULLCMD=:
  28418. # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  28419. # is contrary to our usage. Disable this feature.
  28420. alias -g '${1+"$@"}'='"$@"'
  28421. setopt NO_GLOB_SUBST
  28422. else
  28423. case `(set -o) 2>/dev/null` in #(
  28424. *posix*) :
  28425. set -o posix ;; #(
  28426. *) :
  28427. ;;
  28428. esac
  28429. fi
  28430. as_nl='
  28431. '
  28432. export as_nl
  28433. # Printing a long string crashes Solaris 7 /usr/bin/printf.
  28434. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  28435. as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  28436. as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  28437. # Prefer a ksh shell builtin over an external printf program on Solaris,
  28438. # but without wasting forks for bash or zsh.
  28439. if test -z "$BASH_VERSION$ZSH_VERSION" \
  28440. && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  28441. as_echo='print -r --'
  28442. as_echo_n='print -rn --'
  28443. elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  28444. as_echo='printf %s\n'
  28445. as_echo_n='printf %s'
  28446. else
  28447. if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  28448. as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  28449. as_echo_n='/usr/ucb/echo -n'
  28450. else
  28451. as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  28452. as_echo_n_body='eval
  28453. arg=$1;
  28454. case $arg in #(
  28455. *"$as_nl"*)
  28456. expr "X$arg" : "X\\(.*\\)$as_nl";
  28457. arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  28458. esac;
  28459. expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  28460. '
  28461. export as_echo_n_body
  28462. as_echo_n='sh -c $as_echo_n_body as_echo'
  28463. fi
  28464. export as_echo_body
  28465. as_echo='sh -c $as_echo_body as_echo'
  28466. fi
  28467. # The user is always right.
  28468. if test "${PATH_SEPARATOR+set}" != set; then
  28469. PATH_SEPARATOR=:
  28470. (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  28471. (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  28472. PATH_SEPARATOR=';'
  28473. }
  28474. fi
  28475. # IFS
  28476. # We need space, tab and new line, in precisely that order. Quoting is
  28477. # there to prevent editors from complaining about space-tab.
  28478. # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  28479. # splitting by setting IFS to empty value.)
  28480. IFS=" "" $as_nl"
  28481. # Find who we are. Look in the path if we contain no directory separator.
  28482. as_myself=
  28483. case $0 in #((
  28484. *[\\/]* ) as_myself=$0 ;;
  28485. *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  28486. for as_dir in $PATH
  28487. do
  28488. IFS=$as_save_IFS
  28489. test -z "$as_dir" && as_dir=.
  28490. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
  28491. done
  28492. IFS=$as_save_IFS
  28493. ;;
  28494. esac
  28495. # We did not find ourselves, most probably we were run as `sh COMMAND'
  28496. # in which case we are not to be found in the path.
  28497. if test "x$as_myself" = x; then
  28498. as_myself=$0
  28499. fi
  28500. if test ! -f "$as_myself"; then
  28501. $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  28502. exit 1
  28503. fi
  28504. # Unset variables that we do not need and which cause bugs (e.g. in
  28505. # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
  28506. # suppresses any "Segmentation fault" message there. '((' could
  28507. # trigger a bug in pdksh 5.2.14.
  28508. for as_var in BASH_ENV ENV MAIL MAILPATH
  28509. do eval test x\${$as_var+set} = xset \
  28510. && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
  28511. done
  28512. PS1='$ '
  28513. PS2='> '
  28514. PS4='+ '
  28515. # NLS nuisances.
  28516. LC_ALL=C
  28517. export LC_ALL
  28518. LANGUAGE=C
  28519. export LANGUAGE
  28520. # CDPATH.
  28521. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  28522. # as_fn_error STATUS ERROR [LINENO LOG_FD]
  28523. # ----------------------------------------
  28524. # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
  28525. # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
  28526. # script with STATUS, using 1 if that was 0.
  28527. as_fn_error ()
  28528. {
  28529. as_status=$1; test $as_status -eq 0 && as_status=1
  28530. if test "$4"; then
  28531. as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  28532. $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  28533. fi
  28534. $as_echo "$as_me: error: $2" >&2
  28535. as_fn_exit $as_status
  28536. } # as_fn_error
  28537. # as_fn_set_status STATUS
  28538. # -----------------------
  28539. # Set $? to STATUS, without forking.
  28540. as_fn_set_status ()
  28541. {
  28542. return $1
  28543. } # as_fn_set_status
  28544. # as_fn_exit STATUS
  28545. # -----------------
  28546. # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
  28547. as_fn_exit ()
  28548. {
  28549. set +e
  28550. as_fn_set_status $1
  28551. exit $1
  28552. } # as_fn_exit
  28553. # as_fn_unset VAR
  28554. # ---------------
  28555. # Portably unset VAR.
  28556. as_fn_unset ()
  28557. {
  28558. { eval $1=; unset $1;}
  28559. }
  28560. as_unset=as_fn_unset
  28561. # as_fn_append VAR VALUE
  28562. # ----------------------
  28563. # Append the text in VALUE to the end of the definition contained in VAR. Take
  28564. # advantage of any shell optimizations that allow amortized linear growth over
  28565. # repeated appends, instead of the typical quadratic growth present in naive
  28566. # implementations.
  28567. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
  28568. eval 'as_fn_append ()
  28569. {
  28570. eval $1+=\$2
  28571. }'
  28572. else
  28573. as_fn_append ()
  28574. {
  28575. eval $1=\$$1\$2
  28576. }
  28577. fi # as_fn_append
  28578. # as_fn_arith ARG...
  28579. # ------------------
  28580. # Perform arithmetic evaluation on the ARGs, and store the result in the
  28581. # global $as_val. Take advantage of shells that can avoid forks. The arguments
  28582. # must be portable across $(()) and expr.
  28583. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
  28584. eval 'as_fn_arith ()
  28585. {
  28586. as_val=$(( $* ))
  28587. }'
  28588. else
  28589. as_fn_arith ()
  28590. {
  28591. as_val=`expr "$@" || test $? -eq 1`
  28592. }
  28593. fi # as_fn_arith
  28594. if expr a : '\(a\)' >/dev/null 2>&1 &&
  28595. test "X`expr 00001 : '.*\(...\)'`" = X001; then
  28596. as_expr=expr
  28597. else
  28598. as_expr=false
  28599. fi
  28600. if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  28601. as_basename=basename
  28602. else
  28603. as_basename=false
  28604. fi
  28605. if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  28606. as_dirname=dirname
  28607. else
  28608. as_dirname=false
  28609. fi
  28610. as_me=`$as_basename -- "$0" ||
  28611. $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
  28612. X"$0" : 'X\(//\)$' \| \
  28613. X"$0" : 'X\(/\)' \| . 2>/dev/null ||
  28614. $as_echo X/"$0" |
  28615. sed '/^.*\/\([^/][^/]*\)\/*$/{
  28616. s//\1/
  28617. q
  28618. }
  28619. /^X\/\(\/\/\)$/{
  28620. s//\1/
  28621. q
  28622. }
  28623. /^X\/\(\/\).*/{
  28624. s//\1/
  28625. q
  28626. }
  28627. s/.*/./; q'`
  28628. # Avoid depending upon Character Ranges.
  28629. as_cr_letters='abcdefghijklmnopqrstuvwxyz'
  28630. as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  28631. as_cr_Letters=$as_cr_letters$as_cr_LETTERS
  28632. as_cr_digits='0123456789'
  28633. as_cr_alnum=$as_cr_Letters$as_cr_digits
  28634. ECHO_C= ECHO_N= ECHO_T=
  28635. case `echo -n x` in #(((((
  28636. -n*)
  28637. case `echo 'xy\c'` in
  28638. *c*) ECHO_T=' ';; # ECHO_T is single tab character.
  28639. xy) ECHO_C='\c';;
  28640. *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
  28641. ECHO_T=' ';;
  28642. esac;;
  28643. *)
  28644. ECHO_N='-n';;
  28645. esac
  28646. rm -f conf$$ conf$$.exe conf$$.file
  28647. if test -d conf$$.dir; then
  28648. rm -f conf$$.dir/conf$$.file
  28649. else
  28650. rm -f conf$$.dir
  28651. mkdir conf$$.dir 2>/dev/null
  28652. fi
  28653. if (echo >conf$$.file) 2>/dev/null; then
  28654. if ln -s conf$$.file conf$$ 2>/dev/null; then
  28655. as_ln_s='ln -s'
  28656. # ... but there are two gotchas:
  28657. # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
  28658. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
  28659. # In both cases, we have to default to `cp -pR'.
  28660. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
  28661. as_ln_s='cp -pR'
  28662. elif ln conf$$.file conf$$ 2>/dev/null; then
  28663. as_ln_s=ln
  28664. else
  28665. as_ln_s='cp -pR'
  28666. fi
  28667. else
  28668. as_ln_s='cp -pR'
  28669. fi
  28670. rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
  28671. rmdir conf$$.dir 2>/dev/null
  28672. # as_fn_mkdir_p
  28673. # -------------
  28674. # Create "$as_dir" as a directory, including parents if necessary.
  28675. as_fn_mkdir_p ()
  28676. {
  28677. case $as_dir in #(
  28678. -*) as_dir=./$as_dir;;
  28679. esac
  28680. test -d "$as_dir" || eval $as_mkdir_p || {
  28681. as_dirs=
  28682. while :; do
  28683. case $as_dir in #(
  28684. *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
  28685. *) as_qdir=$as_dir;;
  28686. esac
  28687. as_dirs="'$as_qdir' $as_dirs"
  28688. as_dir=`$as_dirname -- "$as_dir" ||
  28689. $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  28690. X"$as_dir" : 'X\(//\)[^/]' \| \
  28691. X"$as_dir" : 'X\(//\)$' \| \
  28692. X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
  28693. $as_echo X"$as_dir" |
  28694. sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
  28695. s//\1/
  28696. q
  28697. }
  28698. /^X\(\/\/\)[^/].*/{
  28699. s//\1/
  28700. q
  28701. }
  28702. /^X\(\/\/\)$/{
  28703. s//\1/
  28704. q
  28705. }
  28706. /^X\(\/\).*/{
  28707. s//\1/
  28708. q
  28709. }
  28710. s/.*/./; q'`
  28711. test -d "$as_dir" && break
  28712. done
  28713. test -z "$as_dirs" || eval "mkdir $as_dirs"
  28714. } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
  28715. } # as_fn_mkdir_p
  28716. if mkdir -p . 2>/dev/null; then
  28717. as_mkdir_p='mkdir -p "$as_dir"'
  28718. else
  28719. test -d ./-p && rmdir ./-p
  28720. as_mkdir_p=false
  28721. fi
  28722. # as_fn_executable_p FILE
  28723. # -----------------------
  28724. # Test if FILE is an executable regular file.
  28725. as_fn_executable_p ()
  28726. {
  28727. test -f "$1" && test -x "$1"
  28728. } # as_fn_executable_p
  28729. as_test_x='test -x'
  28730. as_executable_p=as_fn_executable_p
  28731. # Sed expression to map a string onto a valid CPP name.
  28732. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
  28733. # Sed expression to map a string onto a valid variable name.
  28734. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
  28735. exec 6>&1
  28736. ## ----------------------------------- ##
  28737. ## Main body of $CONFIG_STATUS script. ##
  28738. ## ----------------------------------- ##
  28739. _ASEOF
  28740. test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
  28741. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  28742. # Save the log message, to keep $0 and so on meaningful, and to
  28743. # report actual input values of CONFIG_FILES etc. instead of their
  28744. # values after options handling.
  28745. ac_log="
  28746. This file was extended by asterisk $as_me trunk, which was
  28747. generated by GNU Autoconf 2.69. Invocation command line was
  28748. CONFIG_FILES = $CONFIG_FILES
  28749. CONFIG_HEADERS = $CONFIG_HEADERS
  28750. CONFIG_LINKS = $CONFIG_LINKS
  28751. CONFIG_COMMANDS = $CONFIG_COMMANDS
  28752. $ $0 $@
  28753. on `(hostname || uname -n) 2>/dev/null | sed 1q`
  28754. "
  28755. _ACEOF
  28756. case $ac_config_files in *"
  28757. "*) set x $ac_config_files; shift; ac_config_files=$*;;
  28758. esac
  28759. case $ac_config_headers in *"
  28760. "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
  28761. esac
  28762. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  28763. # Files that config.status was made for.
  28764. config_files="$ac_config_files"
  28765. config_headers="$ac_config_headers"
  28766. _ACEOF
  28767. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  28768. ac_cs_usage="\
  28769. \`$as_me' instantiates files and other configuration actions
  28770. from templates according to the current configuration. Unless the files
  28771. and actions are specified as TAGs, all are instantiated by default.
  28772. Usage: $0 [OPTION]... [TAG]...
  28773. -h, --help print this help, then exit
  28774. -V, --version print version number and configuration settings, then exit
  28775. --config print configuration, then exit
  28776. -q, --quiet, --silent
  28777. do not print progress messages
  28778. -d, --debug don't remove temporary files
  28779. --recheck update $as_me by reconfiguring in the same conditions
  28780. --file=FILE[:TEMPLATE]
  28781. instantiate the configuration file FILE
  28782. --header=FILE[:TEMPLATE]
  28783. instantiate the configuration header FILE
  28784. Configuration files:
  28785. $config_files
  28786. Configuration headers:
  28787. $config_headers
  28788. Report bugs to <https://issues.asterisk.org>."
  28789. _ACEOF
  28790. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  28791. ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
  28792. ac_cs_version="\\
  28793. asterisk config.status trunk
  28794. configured by $0, generated by GNU Autoconf 2.69,
  28795. with options \\"\$ac_cs_config\\"
  28796. Copyright (C) 2012 Free Software Foundation, Inc.
  28797. This config.status script is free software; the Free Software Foundation
  28798. gives unlimited permission to copy, distribute and modify it."
  28799. ac_pwd='$ac_pwd'
  28800. srcdir='$srcdir'
  28801. INSTALL='$INSTALL'
  28802. AWK='$AWK'
  28803. test -n "\$AWK" || AWK=awk
  28804. _ACEOF
  28805. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  28806. # The default lists apply if the user does not specify any file.
  28807. ac_need_defaults=:
  28808. while test $# != 0
  28809. do
  28810. case $1 in
  28811. --*=?*)
  28812. ac_option=`expr "X$1" : 'X\([^=]*\)='`
  28813. ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
  28814. ac_shift=:
  28815. ;;
  28816. --*=)
  28817. ac_option=`expr "X$1" : 'X\([^=]*\)='`
  28818. ac_optarg=
  28819. ac_shift=:
  28820. ;;
  28821. *)
  28822. ac_option=$1
  28823. ac_optarg=$2
  28824. ac_shift=shift
  28825. ;;
  28826. esac
  28827. case $ac_option in
  28828. # Handling of the options.
  28829. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  28830. ac_cs_recheck=: ;;
  28831. --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
  28832. $as_echo "$ac_cs_version"; exit ;;
  28833. --config | --confi | --conf | --con | --co | --c )
  28834. $as_echo "$ac_cs_config"; exit ;;
  28835. --debug | --debu | --deb | --de | --d | -d )
  28836. debug=: ;;
  28837. --file | --fil | --fi | --f )
  28838. $ac_shift
  28839. case $ac_optarg in
  28840. *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
  28841. '') as_fn_error $? "missing file argument" ;;
  28842. esac
  28843. as_fn_append CONFIG_FILES " '$ac_optarg'"
  28844. ac_need_defaults=false;;
  28845. --header | --heade | --head | --hea )
  28846. $ac_shift
  28847. case $ac_optarg in
  28848. *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
  28849. esac
  28850. as_fn_append CONFIG_HEADERS " '$ac_optarg'"
  28851. ac_need_defaults=false;;
  28852. --he | --h)
  28853. # Conflict between --help and --header
  28854. as_fn_error $? "ambiguous option: \`$1'
  28855. Try \`$0 --help' for more information.";;
  28856. --help | --hel | -h )
  28857. $as_echo "$ac_cs_usage"; exit ;;
  28858. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  28859. | -silent | --silent | --silen | --sile | --sil | --si | --s)
  28860. ac_cs_silent=: ;;
  28861. # This is an error.
  28862. -*) as_fn_error $? "unrecognized option: \`$1'
  28863. Try \`$0 --help' for more information." ;;
  28864. *) as_fn_append ac_config_targets " $1"
  28865. ac_need_defaults=false ;;
  28866. esac
  28867. shift
  28868. done
  28869. ac_configure_extra_args=
  28870. if $ac_cs_silent; then
  28871. exec 6>/dev/null
  28872. ac_configure_extra_args="$ac_configure_extra_args --silent"
  28873. fi
  28874. _ACEOF
  28875. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  28876. if \$ac_cs_recheck; then
  28877. set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
  28878. shift
  28879. \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
  28880. CONFIG_SHELL='$SHELL'
  28881. export CONFIG_SHELL
  28882. exec "\$@"
  28883. fi
  28884. _ACEOF
  28885. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  28886. exec 5>>config.log
  28887. {
  28888. echo
  28889. sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
  28890. ## Running $as_me. ##
  28891. _ASBOX
  28892. $as_echo "$ac_log"
  28893. } >&5
  28894. _ACEOF
  28895. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  28896. _ACEOF
  28897. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  28898. # Handling of arguments.
  28899. for ac_config_target in $ac_config_targets
  28900. do
  28901. case $ac_config_target in
  28902. "include/asterisk/autoconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS include/asterisk/autoconfig.h" ;;
  28903. "build_tools/menuselect-deps") CONFIG_FILES="$CONFIG_FILES build_tools/menuselect-deps" ;;
  28904. "makeopts") CONFIG_FILES="$CONFIG_FILES makeopts" ;;
  28905. *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
  28906. esac
  28907. done
  28908. # If the user did not use the arguments to specify the items to instantiate,
  28909. # then the envvar interface is used. Set only those that are not.
  28910. # We use the long form for the default assignment because of an extremely
  28911. # bizarre bug on SunOS 4.1.3.
  28912. if $ac_need_defaults; then
  28913. test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
  28914. test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
  28915. fi
  28916. # Have a temporary directory for convenience. Make it in the build tree
  28917. # simply because there is no reason against having it here, and in addition,
  28918. # creating and moving files from /tmp can sometimes cause problems.
  28919. # Hook for its removal unless debugging.
  28920. # Note that there is a small window in which the directory will not be cleaned:
  28921. # after its creation but before its name has been assigned to `$tmp'.
  28922. $debug ||
  28923. {
  28924. tmp= ac_tmp=
  28925. trap 'exit_status=$?
  28926. : "${ac_tmp:=$tmp}"
  28927. { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
  28928. ' 0
  28929. trap 'as_fn_exit 1' 1 2 13 15
  28930. }
  28931. # Create a (secure) tmp directory for tmp files.
  28932. {
  28933. tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
  28934. test -d "$tmp"
  28935. } ||
  28936. {
  28937. tmp=./conf$$-$RANDOM
  28938. (umask 077 && mkdir "$tmp")
  28939. } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
  28940. ac_tmp=$tmp
  28941. # Set up the scripts for CONFIG_FILES section.
  28942. # No need to generate them if there are no CONFIG_FILES.
  28943. # This happens for instance with `./config.status config.h'.
  28944. if test -n "$CONFIG_FILES"; then
  28945. ac_cr=`echo X | tr X '\015'`
  28946. # On cygwin, bash can eat \r inside `` if the user requested igncr.
  28947. # But we know of no other shell where ac_cr would be empty at this
  28948. # point, so we can use a bashism as a fallback.
  28949. if test "x$ac_cr" = x; then
  28950. eval ac_cr=\$\'\\r\'
  28951. fi
  28952. ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
  28953. if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
  28954. ac_cs_awk_cr='\\r'
  28955. else
  28956. ac_cs_awk_cr=$ac_cr
  28957. fi
  28958. echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
  28959. _ACEOF
  28960. {
  28961. echo "cat >conf$$subs.awk <<_ACEOF" &&
  28962. echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
  28963. echo "_ACEOF"
  28964. } >conf$$subs.sh ||
  28965. as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
  28966. ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
  28967. ac_delim='%!_!# '
  28968. for ac_last_try in false false false false false :; do
  28969. . ./conf$$subs.sh ||
  28970. as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
  28971. ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
  28972. if test $ac_delim_n = $ac_delim_num; then
  28973. break
  28974. elif $ac_last_try; then
  28975. as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
  28976. else
  28977. ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  28978. fi
  28979. done
  28980. rm -f conf$$subs.sh
  28981. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  28982. cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
  28983. _ACEOF
  28984. sed -n '
  28985. h
  28986. s/^/S["/; s/!.*/"]=/
  28987. p
  28988. g
  28989. s/^[^!]*!//
  28990. :repl
  28991. t repl
  28992. s/'"$ac_delim"'$//
  28993. t delim
  28994. :nl
  28995. h
  28996. s/\(.\{148\}\)..*/\1/
  28997. t more1
  28998. s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
  28999. p
  29000. n
  29001. b repl
  29002. :more1
  29003. s/["\\]/\\&/g; s/^/"/; s/$/"\\/
  29004. p
  29005. g
  29006. s/.\{148\}//
  29007. t nl
  29008. :delim
  29009. h
  29010. s/\(.\{148\}\)..*/\1/
  29011. t more2
  29012. s/["\\]/\\&/g; s/^/"/; s/$/"/
  29013. p
  29014. b
  29015. :more2
  29016. s/["\\]/\\&/g; s/^/"/; s/$/"\\/
  29017. p
  29018. g
  29019. s/.\{148\}//
  29020. t delim
  29021. ' <conf$$subs.awk | sed '
  29022. /^[^""]/{
  29023. N
  29024. s/\n//
  29025. }
  29026. ' >>$CONFIG_STATUS || ac_write_fail=1
  29027. rm -f conf$$subs.awk
  29028. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  29029. _ACAWK
  29030. cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
  29031. for (key in S) S_is_set[key] = 1
  29032. FS = ""
  29033. }
  29034. {
  29035. line = $ 0
  29036. nfields = split(line, field, "@")
  29037. substed = 0
  29038. len = length(field[1])
  29039. for (i = 2; i < nfields; i++) {
  29040. key = field[i]
  29041. keylen = length(key)
  29042. if (S_is_set[key]) {
  29043. value = S[key]
  29044. line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
  29045. len += length(value) + length(field[++i])
  29046. substed = 1
  29047. } else
  29048. len += 1 + keylen
  29049. }
  29050. print line
  29051. }
  29052. _ACAWK
  29053. _ACEOF
  29054. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  29055. if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
  29056. sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
  29057. else
  29058. cat
  29059. fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
  29060. || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
  29061. _ACEOF
  29062. # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
  29063. # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
  29064. # trailing colons and then remove the whole line if VPATH becomes empty
  29065. # (actually we leave an empty line to preserve line numbers).
  29066. if test "x$srcdir" = x.; then
  29067. ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
  29068. h
  29069. s///
  29070. s/^/:/
  29071. s/[ ]*$/:/
  29072. s/:\$(srcdir):/:/g
  29073. s/:\${srcdir}:/:/g
  29074. s/:@srcdir@:/:/g
  29075. s/^:*//
  29076. s/:*$//
  29077. x
  29078. s/\(=[ ]*\).*/\1/
  29079. G
  29080. s/\n//
  29081. s/^[^=]*=[ ]*$//
  29082. }'
  29083. fi
  29084. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  29085. fi # test -n "$CONFIG_FILES"
  29086. # Set up the scripts for CONFIG_HEADERS section.
  29087. # No need to generate them if there are no CONFIG_HEADERS.
  29088. # This happens for instance with `./config.status Makefile'.
  29089. if test -n "$CONFIG_HEADERS"; then
  29090. cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
  29091. BEGIN {
  29092. _ACEOF
  29093. # Transform confdefs.h into an awk script `defines.awk', embedded as
  29094. # here-document in config.status, that substitutes the proper values into
  29095. # config.h.in to produce config.h.
  29096. # Create a delimiter string that does not exist in confdefs.h, to ease
  29097. # handling of long lines.
  29098. ac_delim='%!_!# '
  29099. for ac_last_try in false false :; do
  29100. ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
  29101. if test -z "$ac_tt"; then
  29102. break
  29103. elif $ac_last_try; then
  29104. as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
  29105. else
  29106. ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  29107. fi
  29108. done
  29109. # For the awk script, D is an array of macro values keyed by name,
  29110. # likewise P contains macro parameters if any. Preserve backslash
  29111. # newline sequences.
  29112. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
  29113. sed -n '
  29114. s/.\{148\}/&'"$ac_delim"'/g
  29115. t rset
  29116. :rset
  29117. s/^[ ]*#[ ]*define[ ][ ]*/ /
  29118. t def
  29119. d
  29120. :def
  29121. s/\\$//
  29122. t bsnl
  29123. s/["\\]/\\&/g
  29124. s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
  29125. D["\1"]=" \3"/p
  29126. s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
  29127. d
  29128. :bsnl
  29129. s/["\\]/\\&/g
  29130. s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
  29131. D["\1"]=" \3\\\\\\n"\\/p
  29132. t cont
  29133. s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
  29134. t cont
  29135. d
  29136. :cont
  29137. n
  29138. s/.\{148\}/&'"$ac_delim"'/g
  29139. t clear
  29140. :clear
  29141. s/\\$//
  29142. t bsnlc
  29143. s/["\\]/\\&/g; s/^/"/; s/$/"/p
  29144. d
  29145. :bsnlc
  29146. s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
  29147. b cont
  29148. ' <confdefs.h | sed '
  29149. s/'"$ac_delim"'/"\\\
  29150. "/g' >>$CONFIG_STATUS || ac_write_fail=1
  29151. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  29152. for (key in D) D_is_set[key] = 1
  29153. FS = ""
  29154. }
  29155. /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
  29156. line = \$ 0
  29157. split(line, arg, " ")
  29158. if (arg[1] == "#") {
  29159. defundef = arg[2]
  29160. mac1 = arg[3]
  29161. } else {
  29162. defundef = substr(arg[1], 2)
  29163. mac1 = arg[2]
  29164. }
  29165. split(mac1, mac2, "(") #)
  29166. macro = mac2[1]
  29167. prefix = substr(line, 1, index(line, defundef) - 1)
  29168. if (D_is_set[macro]) {
  29169. # Preserve the white space surrounding the "#".
  29170. print prefix "define", macro P[macro] D[macro]
  29171. next
  29172. } else {
  29173. # Replace #undef with comments. This is necessary, for example,
  29174. # in the case of _POSIX_SOURCE, which is predefined and required
  29175. # on some systems where configure will not decide to define it.
  29176. if (defundef == "undef") {
  29177. print "/*", prefix defundef, macro, "*/"
  29178. next
  29179. }
  29180. }
  29181. }
  29182. { print }
  29183. _ACAWK
  29184. _ACEOF
  29185. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  29186. as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
  29187. fi # test -n "$CONFIG_HEADERS"
  29188. eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
  29189. shift
  29190. for ac_tag
  29191. do
  29192. case $ac_tag in
  29193. :[FHLC]) ac_mode=$ac_tag; continue;;
  29194. esac
  29195. case $ac_mode$ac_tag in
  29196. :[FHL]*:*);;
  29197. :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
  29198. :[FH]-) ac_tag=-:-;;
  29199. :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
  29200. esac
  29201. ac_save_IFS=$IFS
  29202. IFS=:
  29203. set x $ac_tag
  29204. IFS=$ac_save_IFS
  29205. shift
  29206. ac_file=$1
  29207. shift
  29208. case $ac_mode in
  29209. :L) ac_source=$1;;
  29210. :[FH])
  29211. ac_file_inputs=
  29212. for ac_f
  29213. do
  29214. case $ac_f in
  29215. -) ac_f="$ac_tmp/stdin";;
  29216. *) # Look for the file first in the build tree, then in the source tree
  29217. # (if the path is not absolute). The absolute path cannot be DOS-style,
  29218. # because $ac_f cannot contain `:'.
  29219. test -f "$ac_f" ||
  29220. case $ac_f in
  29221. [\\/$]*) false;;
  29222. *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
  29223. esac ||
  29224. as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
  29225. esac
  29226. case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
  29227. as_fn_append ac_file_inputs " '$ac_f'"
  29228. done
  29229. # Let's still pretend it is `configure' which instantiates (i.e., don't
  29230. # use $as_me), people would be surprised to read:
  29231. # /* config.h. Generated by config.status. */
  29232. configure_input='Generated from '`
  29233. $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
  29234. `' by configure.'
  29235. if test x"$ac_file" != x-; then
  29236. configure_input="$ac_file. $configure_input"
  29237. { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
  29238. $as_echo "$as_me: creating $ac_file" >&6;}
  29239. fi
  29240. # Neutralize special characters interpreted by sed in replacement strings.
  29241. case $configure_input in #(
  29242. *\&* | *\|* | *\\* )
  29243. ac_sed_conf_input=`$as_echo "$configure_input" |
  29244. sed 's/[\\\\&|]/\\\\&/g'`;; #(
  29245. *) ac_sed_conf_input=$configure_input;;
  29246. esac
  29247. case $ac_tag in
  29248. *:-:* | *:-) cat >"$ac_tmp/stdin" \
  29249. || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
  29250. esac
  29251. ;;
  29252. esac
  29253. ac_dir=`$as_dirname -- "$ac_file" ||
  29254. $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  29255. X"$ac_file" : 'X\(//\)[^/]' \| \
  29256. X"$ac_file" : 'X\(//\)$' \| \
  29257. X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
  29258. $as_echo X"$ac_file" |
  29259. sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
  29260. s//\1/
  29261. q
  29262. }
  29263. /^X\(\/\/\)[^/].*/{
  29264. s//\1/
  29265. q
  29266. }
  29267. /^X\(\/\/\)$/{
  29268. s//\1/
  29269. q
  29270. }
  29271. /^X\(\/\).*/{
  29272. s//\1/
  29273. q
  29274. }
  29275. s/.*/./; q'`
  29276. as_dir="$ac_dir"; as_fn_mkdir_p
  29277. ac_builddir=.
  29278. case "$ac_dir" in
  29279. .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
  29280. *)
  29281. ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
  29282. # A ".." for each directory in $ac_dir_suffix.
  29283. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
  29284. case $ac_top_builddir_sub in
  29285. "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  29286. *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  29287. esac ;;
  29288. esac
  29289. ac_abs_top_builddir=$ac_pwd
  29290. ac_abs_builddir=$ac_pwd$ac_dir_suffix
  29291. # for backward compatibility:
  29292. ac_top_builddir=$ac_top_build_prefix
  29293. case $srcdir in
  29294. .) # We are building in place.
  29295. ac_srcdir=.
  29296. ac_top_srcdir=$ac_top_builddir_sub
  29297. ac_abs_top_srcdir=$ac_pwd ;;
  29298. [\\/]* | ?:[\\/]* ) # Absolute name.
  29299. ac_srcdir=$srcdir$ac_dir_suffix;
  29300. ac_top_srcdir=$srcdir
  29301. ac_abs_top_srcdir=$srcdir ;;
  29302. *) # Relative name.
  29303. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
  29304. ac_top_srcdir=$ac_top_build_prefix$srcdir
  29305. ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
  29306. esac
  29307. ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
  29308. case $ac_mode in
  29309. :F)
  29310. #
  29311. # CONFIG_FILE
  29312. #
  29313. case $INSTALL in
  29314. [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
  29315. *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
  29316. esac
  29317. _ACEOF
  29318. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  29319. # If the template does not know about datarootdir, expand it.
  29320. # FIXME: This hack should be removed a few years after 2.60.
  29321. ac_datarootdir_hack=; ac_datarootdir_seen=
  29322. ac_sed_dataroot='
  29323. /datarootdir/ {
  29324. p
  29325. q
  29326. }
  29327. /@datadir@/p
  29328. /@docdir@/p
  29329. /@infodir@/p
  29330. /@localedir@/p
  29331. /@mandir@/p'
  29332. case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
  29333. *datarootdir*) ac_datarootdir_seen=yes;;
  29334. *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
  29335. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
  29336. $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
  29337. _ACEOF
  29338. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  29339. ac_datarootdir_hack='
  29340. s&@datadir@&$datadir&g
  29341. s&@docdir@&$docdir&g
  29342. s&@infodir@&$infodir&g
  29343. s&@localedir@&$localedir&g
  29344. s&@mandir@&$mandir&g
  29345. s&\\\${datarootdir}&$datarootdir&g' ;;
  29346. esac
  29347. _ACEOF
  29348. # Neutralize VPATH when `$srcdir' = `.'.
  29349. # Shell code in configure.ac might set extrasub.
  29350. # FIXME: do we really want to maintain this feature?
  29351. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  29352. ac_sed_extra="$ac_vpsub
  29353. $extrasub
  29354. _ACEOF
  29355. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  29356. :t
  29357. /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
  29358. s|@configure_input@|$ac_sed_conf_input|;t t
  29359. s&@top_builddir@&$ac_top_builddir_sub&;t t
  29360. s&@top_build_prefix@&$ac_top_build_prefix&;t t
  29361. s&@srcdir@&$ac_srcdir&;t t
  29362. s&@abs_srcdir@&$ac_abs_srcdir&;t t
  29363. s&@top_srcdir@&$ac_top_srcdir&;t t
  29364. s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
  29365. s&@builddir@&$ac_builddir&;t t
  29366. s&@abs_builddir@&$ac_abs_builddir&;t t
  29367. s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
  29368. s&@INSTALL@&$ac_INSTALL&;t t
  29369. $ac_datarootdir_hack
  29370. "
  29371. eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
  29372. >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  29373. test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
  29374. { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
  29375. { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
  29376. "$ac_tmp/out"`; test -z "$ac_out"; } &&
  29377. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
  29378. which seems to be undefined. Please make sure it is defined" >&5
  29379. $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
  29380. which seems to be undefined. Please make sure it is defined" >&2;}
  29381. rm -f "$ac_tmp/stdin"
  29382. case $ac_file in
  29383. -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
  29384. *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
  29385. esac \
  29386. || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  29387. ;;
  29388. :H)
  29389. #
  29390. # CONFIG_HEADER
  29391. #
  29392. if test x"$ac_file" != x-; then
  29393. {
  29394. $as_echo "/* $configure_input */" \
  29395. && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
  29396. } >"$ac_tmp/config.h" \
  29397. || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  29398. if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
  29399. { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
  29400. $as_echo "$as_me: $ac_file is unchanged" >&6;}
  29401. else
  29402. rm -f "$ac_file"
  29403. mv "$ac_tmp/config.h" "$ac_file" \
  29404. || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  29405. fi
  29406. else
  29407. $as_echo "/* $configure_input */" \
  29408. && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
  29409. || as_fn_error $? "could not create -" "$LINENO" 5
  29410. fi
  29411. ;;
  29412. esac
  29413. done # for ac_tag
  29414. as_fn_exit 0
  29415. _ACEOF
  29416. ac_clean_files=$ac_clean_files_save
  29417. test $ac_write_fail = 0 ||
  29418. as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
  29419. # configure is writing to config.log, and then calls config.status.
  29420. # config.status does its own redirection, appending to config.log.
  29421. # Unfortunately, on DOS this fails, as config.log is still kept open
  29422. # by configure, so config.status won't be able to write to it; its
  29423. # output is simply discarded. So we exec the FD to /dev/null,
  29424. # effectively closing config.log, so it can be properly (re)opened and
  29425. # appended to by config.status. When coming back to configure, we
  29426. # need to make the FD available again.
  29427. if test "$no_create" != yes; then
  29428. ac_cs_success=:
  29429. ac_config_status_args=
  29430. test "$silent" = yes &&
  29431. ac_config_status_args="$ac_config_status_args --quiet"
  29432. exec 5>/dev/null
  29433. $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
  29434. exec 5>>config.log
  29435. # Use ||, not &&, to avoid exiting from the if with $? = 1, which
  29436. # would make configure fail if this is the last instruction.
  29437. $ac_cs_success || as_fn_exit 1
  29438. fi
  29439. if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
  29440. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
  29441. $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
  29442. fi
  29443. ${ac_cv_path_EGREP} 'CURSES|GTK2|OSARCH|NEWT' makeopts > makeopts.acbak2
  29444. if test "x${ac_cv_path_CMP}" = "x:"; then
  29445. ( cd `pwd`/menuselect && ./configure )
  29446. else if ${ac_cv_path_CMP} -s makeopts.acbak makeopts.acbak2; then : ; else
  29447. ( cd `pwd`/menuselect && ./configure )
  29448. fi ; fi
  29449. rm makeopts.acbak makeopts.acbak2
  29450. if test "x${silent}" != "xyes" ; then
  29451. echo
  29452. echo " .\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$=.. "
  29453. echo " .\$7\$7.. .7\$\$7:. "
  29454. echo " .\$\$:. ,\$7.7 "
  29455. echo " .\$7. 7\$\$\$\$ .\$\$77 "
  29456. echo " ..\$\$. \$\$\$\$\$ .\$\$\$7 "
  29457. echo " ..7\$ .?. \$\$\$\$\$ .?. 7\$\$\$."
  29458. echo " \$.\$. .\$\$\$7. \$\$\$\$7 .7\$\$\$. .\$\$\$."
  29459. echo " .777. .\$\$\$\$\$\$77\$\$\$77\$\$\$\$\$7. \$\$\$,"
  29460. echo " \$\$\$~ .7\$\$\$\$\$\$\$\$\$\$\$\$\$7. .\$\$\$."
  29461. echo ".\$\$7 .7\$\$\$\$\$\$\$7: ?\$\$\$."
  29462. echo "\$\$\$ ?7\$\$\$\$\$\$\$\$\$\$I .\$\$\$7 "
  29463. echo "\$\$\$ .7\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$ :\$\$\$. "
  29464. echo "\$\$\$ \$\$\$\$\$\$7\$\$\$\$\$\$\$\$\$\$\$\$ .\$\$\$. "
  29465. echo "\$\$\$ \$\$\$ 7\$\$\$7 .\$\$\$ .\$\$\$. "
  29466. echo "\$\$\$\$ \$\$\$\$7 .\$\$\$. "
  29467. echo "7\$\$\$7 7\$\$\$\$ 7\$\$\$ "
  29468. echo " \$\$\$\$\$ \$\$\$ "
  29469. echo " \$\$\$\$7. \$\$ (TM) "
  29470. echo " \$\$\$\$\$\$\$. .7\$\$\$\$\$\$ \$\$ "
  29471. echo " \$\$\$\$\$\$\$\$\$\$\$\$7\$\$\$\$\$\$\$\$\$.\$\$\$\$\$\$ "
  29472. echo " \$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$. "
  29473. echo
  29474. fi
  29475. if test "x${AST_IODBC_FOUND}" = "xyes"; then
  29476. echo "WARNING: iodbc libs/headers found!"
  29477. echo
  29478. echo " If you plan to use ODBC functionality, you should consider"
  29479. echo " switching to unixodbc instead."
  29480. echo " See: https://issues.asterisk.org/jira/browse/ASTERISK-22459"
  29481. echo
  29482. fi
  29483. { $as_echo "$as_me:${as_lineno-$LINENO}: Package configured for: " >&5
  29484. $as_echo "$as_me: Package configured for: " >&6;}
  29485. { $as_echo "$as_me:${as_lineno-$LINENO}: OS type : $host_os" >&5
  29486. $as_echo "$as_me: OS type : $host_os" >&6;}
  29487. { $as_echo "$as_me:${as_lineno-$LINENO}: Host CPU : $host_cpu" >&5
  29488. $as_echo "$as_me: Host CPU : $host_cpu" >&6;}
  29489. { $as_echo "$as_me:${as_lineno-$LINENO}: build-cpu:vendor:os: $build_cpu : $build_vendor : $build_os :" >&5
  29490. $as_echo "$as_me: build-cpu:vendor:os: $build_cpu : $build_vendor : $build_os :" >&6;}
  29491. { $as_echo "$as_me:${as_lineno-$LINENO}: host-cpu:vendor:os: $host_cpu : $host_vendor : $host_os :" >&5
  29492. $as_echo "$as_me: host-cpu:vendor:os: $host_cpu : $host_vendor : $host_os :" >&6;}
  29493. if test "${cross_compiling}" = "yes"; then
  29494. { $as_echo "$as_me:${as_lineno-$LINENO}: Cross Compilation = YES" >&5
  29495. $as_echo "$as_me: Cross Compilation = YES" >&6;}
  29496. fi