configure 377 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725
  1. #! /bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf version 2.13
  4. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  5. #
  6. # This configure script is free software; the Free Software Foundation
  7. # gives unlimited permission to copy, distribute and modify it.
  8. # Defaults:
  9. ac_help=
  10. ac_default_prefix=/usr/local
  11. # Any additions from configure.in:
  12. ac_default_prefix=/usr/local
  13. ac_help="$ac_help
  14. --enable-macosx-app create a MacOSX application"
  15. ac_help="$ac_help
  16. --enable-shared build and link with shared libraries [--enable-shared]"
  17. ac_help="$ac_help
  18. --enable-w11 use W11 library for Windows X11 emulation"
  19. ac_help="$ac_help
  20. --with-cxx support C++ functionality (default: yes)"
  21. ac_help="$ac_help
  22. --with-macosx-archs[=arch list]
  23. compile multiple architectures on MacOSX, ie.
  24. universal. Valid architectures are i386, ppc,
  25. x86_64 and ppc64. (default: no [native])"
  26. ac_help="$ac_help
  27. --with-macosx-sdk[=path/sdk]
  28. compile with a system SDK on MacOSX. (default: no)"
  29. ac_help="$ac_help
  30. --with-tiff support TIFF functionality (default: yes)"
  31. ac_help="$ac_help
  32. --with-png support PNG functionality (default: yes)"
  33. ac_help="$ac_help
  34. --with-postgres support PostgreSQL functionality (default: no)"
  35. ac_help="$ac_help
  36. --with-mysql support MySQL functionality (default: no)"
  37. ac_help="$ac_help
  38. --with-sqlite support SQLite functionality (default: yes)"
  39. ac_help="$ac_help
  40. --with-opengl support OpenGL functionality (default: yes)"
  41. ac_help="$ac_help
  42. --with-odbc support ODBC functionality (default: no)"
  43. ac_help="$ac_help
  44. --with-fftw support FFTW functionality (default: yes)"
  45. ac_help="$ac_help
  46. --with-blas support BLAS functionality (default: no)"
  47. ac_help="$ac_help
  48. --with-lapack support LAPACK functionality (default: no)"
  49. ac_help="$ac_help
  50. --with-cairo support Cairo functionality (default: yes)"
  51. ac_help="$ac_help
  52. --with-freetype support FreeType functionality (default: yes)"
  53. ac_help="$ac_help
  54. --with-nls support NLS functionality (default: no)"
  55. ac_help="$ac_help
  56. --with-readline support Readline functionality (default: no)"
  57. ac_help="$ac_help
  58. --with-opendwg support openDWG functionality (default: no)"
  59. ac_help="$ac_help
  60. --with-regex support regex functionality (default: yes)"
  61. ac_help="$ac_help
  62. --with-pthread support POSIX threads functionality (default: no)"
  63. ac_help="$ac_help
  64. --with-openmp support OpenMP functionality (default: no)"
  65. ac_help="$ac_help
  66. --with-opencl support OpenCL functionality (default: no)"
  67. ac_help="$ac_help
  68. --with-bzlib support BZIP2 functionality (default: no)"
  69. ac_help="$ac_help
  70. --with-zstd support Zstandard functionality (default: yes)"
  71. ac_help="$ac_help
  72. --with-gdal[=path/gdal-config]
  73. enable GDAL/OGR support (gdal-config with path,
  74. e.g. '--with-gdal=/usr/local/bin/gdal-config')"
  75. ac_help="$ac_help
  76. --with-liblas[=path/liblas-config]
  77. enable libLAS support (liblas-config with path,
  78. e.g. '--with-liblas=/usr/local/bin/liblas-config',
  79. default: no)"
  80. ac_help="$ac_help
  81. --with-pdal[=path/pdal-config]
  82. enable PDAL support (pdal-config with path,
  83. e.g. '--with-pdal=/usr/local/bin/pdal-config',
  84. default: no)"
  85. ac_help="$ac_help
  86. --with-wxwidgets[=path/wx-config]
  87. enable wxWidgets support (wx-config with path,
  88. e.g. '--with-wxwidgets=/usr/local/bin/wx-config',
  89. default: no)"
  90. ac_help="$ac_help
  91. --with-netcdf[=path/nc-config]
  92. enable NetCDF support (nc-config with path,
  93. e.g. '--with-nc=/usr/local/bin/nc-config',
  94. default: no)"
  95. ac_help="$ac_help
  96. --with-geos[=path/geos-config]
  97. enable GEOS support (geos-config with path,
  98. e.g. '--with-geos=/usr/local/bin/geos-config',
  99. default: no)"
  100. ac_help="$ac_help
  101. --with-includes=DIRS site include files are in DIRS"
  102. ac_help="$ac_help
  103. --with-libs=DIRS site library files are in DIRS"
  104. ac_help="$ac_help
  105. --with-zlib-includes=DIRS
  106. zlib include files are in DIRS"
  107. ac_help="$ac_help
  108. --with-zlib-libs=DIRS zlib library files are in DIRS"
  109. ac_help="$ac_help
  110. --with-bzlib-includes=DIRS
  111. BZIP2 include files are in DIRS"
  112. ac_help="$ac_help
  113. --with-bzlib-libs=DIRS BZIP2 library files are in DIRS"
  114. ac_help="$ac_help
  115. --with-zstd-includes=DIRS
  116. ZSTD include files are in DIRS"
  117. ac_help="$ac_help
  118. --with-zstd-libs=DIRS ZSTD library files are in DIRS"
  119. ac_help="$ac_help
  120. --with-readline-includes=DIRS
  121. Readline include files are in DIRS"
  122. ac_help="$ac_help
  123. --with-readline-libs=DIRS
  124. Readline library files are in DIRS"
  125. ac_help="$ac_help
  126. --with-tiff-includes=DIRS
  127. TIFF include files are in DIRS"
  128. ac_help="$ac_help
  129. --with-tiff-libs=DIRS TIFF library files are in DIRS"
  130. ac_help="$ac_help
  131. --with-png-includes=DIRS
  132. PNG include files are in DIRS"
  133. ac_help="$ac_help
  134. --with-png-libs=DIRS PNG library files are in DIRS"
  135. ac_help="$ac_help
  136. --with-postgres-includes=DIRS
  137. PostgreSQL include files are in DIRS"
  138. ac_help="$ac_help
  139. --with-postgres-libs=DIRS
  140. PostgreSQL library files are in DIRS"
  141. ac_help="$ac_help
  142. --with-mysql-includes=DIRS
  143. MySQL include files are in DIRS"
  144. ac_help="$ac_help
  145. --with-mysql-libs=DIRS MySQL library files are in DIRS"
  146. ac_help="$ac_help
  147. --with-sqlite-includes=DIRS
  148. SQLite include files are in DIRS"
  149. ac_help="$ac_help
  150. --with-sqlite-libs=DIRS SQLite library files are in DIRS"
  151. ac_help="$ac_help
  152. --with-opengl-includes=DIRS
  153. OpenGL include files are in DIRS"
  154. ac_help="$ac_help
  155. --with-opengl-libs=DIRS OpenGL library files are in DIRS"
  156. ac_help="$ac_help
  157. --with-opengl-framework=DIR
  158. OpenGL framework is in DIR"
  159. ac_help="$ac_help
  160. --with-odbc-includes=DIRS
  161. ODBC include files are in DIRS"
  162. ac_help="$ac_help
  163. --with-odbc-libs=DIRS ODBC library files are in DIRS"
  164. ac_help="$ac_help
  165. --with-fftw-includes=DIRS
  166. FFTW include files are in DIRS"
  167. ac_help="$ac_help
  168. --with-fftw-libs=DIRS FFTW library files are in DIRS"
  169. ac_help="$ac_help
  170. --with-blas-includes=DIRS
  171. BLAS include files are in DIRS"
  172. ac_help="$ac_help
  173. --with-blas-libs=DIRS BLAS library files are in DIRS"
  174. ac_help="$ac_help
  175. --with-lapack-includes=DIRS
  176. LAPACK include files are in DIRS"
  177. ac_help="$ac_help
  178. --with-lapack-libs=DIRS LAPACK library files are in DIRS"
  179. ac_help="$ac_help
  180. --with-cairo-includes=DIRS
  181. cairo include files are in DIRS"
  182. ac_help="$ac_help
  183. --with-cairo-libs=DIRS cairo library files are in DIRS"
  184. ac_help="$ac_help
  185. --with-cairo-ldflags=FLAGS
  186. cairo needs FLAGS when linking"
  187. ac_help="$ac_help
  188. --with-freetype-includes=DIRS
  189. FreeType include files are in DIRS"
  190. ac_help="$ac_help
  191. --with-freetype-libs=DIRS
  192. FreeType library files are in DIRS"
  193. ac_help="$ac_help
  194. --with-proj-includes=DIRS
  195. External PROJ.4 include files are in DIRS"
  196. ac_help="$ac_help
  197. --with-proj-libs=DIRS External PROJ.4 library files are in DIRS"
  198. ac_help="$ac_help
  199. --with-proj-share=DIR External PROJ.4 data files are in DIR"
  200. ac_help="$ac_help
  201. --with-opendwg-includes=DIRS
  202. openDWG include files are in DIRS"
  203. ac_help="$ac_help
  204. --with-opendwg-libs=DIRS
  205. openDWG library files are in DIRS"
  206. ac_help="$ac_help
  207. --with-regex-includes=DIRS
  208. regex include files are in DIRS"
  209. ac_help="$ac_help
  210. --with-regex-libs=DIRS regex library files are in DIRS"
  211. ac_help="$ac_help
  212. --with-pthread-includes=DIRS
  213. POSIX threads include files are in DIRS"
  214. ac_help="$ac_help
  215. --with-pthread-libs=DIRS
  216. POSIX threads library files are in DIRS"
  217. ac_help="$ac_help
  218. --with-openmp-includes=DIRS
  219. OpenMP include files are in DIRS"
  220. ac_help="$ac_help
  221. --with-openmp-libs=DIRS OpenMP library files are in DIRS"
  222. ac_help="$ac_help
  223. --with-opencl-includes=DIRS
  224. OpenCL include files are in DIRS"
  225. ac_help="$ac_help
  226. --with-opencl-libs=DIRS OpenCL library files are in DIRS"
  227. ac_help="$ac_help
  228. --with-x use the X Window System"
  229. ac_help="$ac_help
  230. --disable-largefile omit support for large files (LFS)"
  231. # Initialize some variables set by options.
  232. # The variables have the same names as the options, with
  233. # dashes changed to underlines.
  234. build=NONE
  235. cache_file=./config.cache
  236. exec_prefix=NONE
  237. host=NONE
  238. no_create=
  239. nonopt=NONE
  240. no_recursion=
  241. prefix=NONE
  242. program_prefix=NONE
  243. program_suffix=NONE
  244. program_transform_name=s,x,x,
  245. silent=
  246. site=
  247. srcdir=
  248. target=NONE
  249. verbose=
  250. x_includes=NONE
  251. x_libraries=NONE
  252. bindir='${exec_prefix}/bin'
  253. sbindir='${exec_prefix}/sbin'
  254. libexecdir='${exec_prefix}/libexec'
  255. datadir='${prefix}/share'
  256. sysconfdir='${prefix}/etc'
  257. sharedstatedir='${prefix}/com'
  258. localstatedir='${prefix}/var'
  259. libdir='${exec_prefix}/lib'
  260. includedir='${prefix}/include'
  261. oldincludedir='/usr/include'
  262. infodir='${prefix}/info'
  263. mandir='${prefix}/man'
  264. # Initialize some other variables.
  265. subdirs=
  266. MFLAGS= MAKEFLAGS=
  267. SHELL=${CONFIG_SHELL-/bin/sh}
  268. # Maximum number of lines to put in a shell here document.
  269. ac_max_here_lines=12
  270. ac_prev=
  271. for ac_option
  272. do
  273. # If the previous option needs an argument, assign it.
  274. if test -n "$ac_prev"; then
  275. eval "$ac_prev=\$ac_option"
  276. ac_prev=
  277. continue
  278. fi
  279. case "$ac_option" in
  280. -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  281. *) ac_optarg= ;;
  282. esac
  283. # Accept the important Cygnus configure options, so we can diagnose typos.
  284. case "$ac_option" in
  285. -bindir | --bindir | --bindi | --bind | --bin | --bi)
  286. ac_prev=bindir ;;
  287. -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  288. bindir="$ac_optarg" ;;
  289. -build | --build | --buil | --bui | --bu)
  290. ac_prev=build ;;
  291. -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  292. build="$ac_optarg" ;;
  293. -cache-file | --cache-file | --cache-fil | --cache-fi \
  294. | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  295. ac_prev=cache_file ;;
  296. -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  297. | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  298. cache_file="$ac_optarg" ;;
  299. -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  300. ac_prev=datadir ;;
  301. -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  302. | --da=*)
  303. datadir="$ac_optarg" ;;
  304. -disable-* | --disable-*)
  305. ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  306. # Reject names that are not valid shell variable names.
  307. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  308. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  309. fi
  310. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  311. eval "enable_${ac_feature}=no" ;;
  312. -enable-* | --enable-*)
  313. ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  314. # Reject names that are not valid shell variable names.
  315. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  316. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  317. fi
  318. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  319. case "$ac_option" in
  320. *=*) ;;
  321. *) ac_optarg=yes ;;
  322. esac
  323. eval "enable_${ac_feature}='$ac_optarg'" ;;
  324. -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  325. | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  326. | --exec | --exe | --ex)
  327. ac_prev=exec_prefix ;;
  328. -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  329. | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  330. | --exec=* | --exe=* | --ex=*)
  331. exec_prefix="$ac_optarg" ;;
  332. -gas | --gas | --ga | --g)
  333. # Obsolete; use --with-gas.
  334. with_gas=yes ;;
  335. -help | --help | --hel | --he)
  336. # Omit some internal or obsolete options to make the list less imposing.
  337. # This message is too long to be a string in the A/UX 3.1 sh.
  338. cat << EOF
  339. Usage: configure [options] [host]
  340. Options: [defaults in brackets after descriptions]
  341. Configuration:
  342. --cache-file=FILE cache test results in FILE
  343. --help print this message
  344. --no-create do not create output files
  345. --quiet, --silent do not print \`checking...' messages
  346. --version print the version of autoconf that created configure
  347. Directory and file names:
  348. --prefix=PREFIX install architecture-independent files in PREFIX
  349. [$ac_default_prefix]
  350. --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  351. [same as prefix]
  352. --bindir=DIR user executables in DIR [EPREFIX/bin]
  353. --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
  354. --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
  355. --datadir=DIR read-only architecture-independent data in DIR
  356. [PREFIX/share]
  357. --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
  358. --sharedstatedir=DIR modifiable architecture-independent data in DIR
  359. [PREFIX/com]
  360. --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
  361. --libdir=DIR object code libraries in DIR [EPREFIX/lib]
  362. --includedir=DIR C header files in DIR [PREFIX/include]
  363. --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
  364. --infodir=DIR info documentation in DIR [PREFIX/info]
  365. --mandir=DIR man documentation in DIR [PREFIX/man]
  366. --srcdir=DIR find the sources in DIR [configure dir or ..]
  367. --program-prefix=PREFIX prepend PREFIX to installed program names
  368. --program-suffix=SUFFIX append SUFFIX to installed program names
  369. --program-transform-name=PROGRAM
  370. run sed PROGRAM on installed program names
  371. EOF
  372. cat << EOF
  373. Host type:
  374. --build=BUILD configure for building on BUILD [BUILD=HOST]
  375. --host=HOST configure for HOST [guessed]
  376. --target=TARGET configure for TARGET [TARGET=HOST]
  377. Features and packages:
  378. --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  379. --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  380. --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  381. --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
  382. --x-includes=DIR X include files are in DIR
  383. --x-libraries=DIR X library files are in DIR
  384. EOF
  385. if test -n "$ac_help"; then
  386. echo "--enable and --with options recognized:$ac_help"
  387. fi
  388. exit 0 ;;
  389. -host | --host | --hos | --ho)
  390. ac_prev=host ;;
  391. -host=* | --host=* | --hos=* | --ho=*)
  392. host="$ac_optarg" ;;
  393. -includedir | --includedir | --includedi | --included | --include \
  394. | --includ | --inclu | --incl | --inc)
  395. ac_prev=includedir ;;
  396. -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  397. | --includ=* | --inclu=* | --incl=* | --inc=*)
  398. includedir="$ac_optarg" ;;
  399. -infodir | --infodir | --infodi | --infod | --info | --inf)
  400. ac_prev=infodir ;;
  401. -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  402. infodir="$ac_optarg" ;;
  403. -libdir | --libdir | --libdi | --libd)
  404. ac_prev=libdir ;;
  405. -libdir=* | --libdir=* | --libdi=* | --libd=*)
  406. libdir="$ac_optarg" ;;
  407. -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  408. | --libexe | --libex | --libe)
  409. ac_prev=libexecdir ;;
  410. -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  411. | --libexe=* | --libex=* | --libe=*)
  412. libexecdir="$ac_optarg" ;;
  413. -localstatedir | --localstatedir | --localstatedi | --localstated \
  414. | --localstate | --localstat | --localsta | --localst \
  415. | --locals | --local | --loca | --loc | --lo)
  416. ac_prev=localstatedir ;;
  417. -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  418. | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  419. | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  420. localstatedir="$ac_optarg" ;;
  421. -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  422. ac_prev=mandir ;;
  423. -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  424. mandir="$ac_optarg" ;;
  425. -nfp | --nfp | --nf)
  426. # Obsolete; use --without-fp.
  427. with_fp=no ;;
  428. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  429. | --no-cr | --no-c)
  430. no_create=yes ;;
  431. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  432. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  433. no_recursion=yes ;;
  434. -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  435. | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  436. | --oldin | --oldi | --old | --ol | --o)
  437. ac_prev=oldincludedir ;;
  438. -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  439. | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  440. | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  441. oldincludedir="$ac_optarg" ;;
  442. -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  443. ac_prev=prefix ;;
  444. -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  445. prefix="$ac_optarg" ;;
  446. -program-prefix | --program-prefix | --program-prefi | --program-pref \
  447. | --program-pre | --program-pr | --program-p)
  448. ac_prev=program_prefix ;;
  449. -program-prefix=* | --program-prefix=* | --program-prefi=* \
  450. | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  451. program_prefix="$ac_optarg" ;;
  452. -program-suffix | --program-suffix | --program-suffi | --program-suff \
  453. | --program-suf | --program-su | --program-s)
  454. ac_prev=program_suffix ;;
  455. -program-suffix=* | --program-suffix=* | --program-suffi=* \
  456. | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  457. program_suffix="$ac_optarg" ;;
  458. -program-transform-name | --program-transform-name \
  459. | --program-transform-nam | --program-transform-na \
  460. | --program-transform-n | --program-transform- \
  461. | --program-transform | --program-transfor \
  462. | --program-transfo | --program-transf \
  463. | --program-trans | --program-tran \
  464. | --progr-tra | --program-tr | --program-t)
  465. ac_prev=program_transform_name ;;
  466. -program-transform-name=* | --program-transform-name=* \
  467. | --program-transform-nam=* | --program-transform-na=* \
  468. | --program-transform-n=* | --program-transform-=* \
  469. | --program-transform=* | --program-transfor=* \
  470. | --program-transfo=* | --program-transf=* \
  471. | --program-trans=* | --program-tran=* \
  472. | --progr-tra=* | --program-tr=* | --program-t=*)
  473. program_transform_name="$ac_optarg" ;;
  474. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  475. | -silent | --silent | --silen | --sile | --sil)
  476. silent=yes ;;
  477. -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  478. ac_prev=sbindir ;;
  479. -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  480. | --sbi=* | --sb=*)
  481. sbindir="$ac_optarg" ;;
  482. -sharedstatedir | --sharedstatedir | --sharedstatedi \
  483. | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  484. | --sharedst | --shareds | --shared | --share | --shar \
  485. | --sha | --sh)
  486. ac_prev=sharedstatedir ;;
  487. -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  488. | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  489. | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  490. | --sha=* | --sh=*)
  491. sharedstatedir="$ac_optarg" ;;
  492. -site | --site | --sit)
  493. ac_prev=site ;;
  494. -site=* | --site=* | --sit=*)
  495. site="$ac_optarg" ;;
  496. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  497. ac_prev=srcdir ;;
  498. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  499. srcdir="$ac_optarg" ;;
  500. -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  501. | --syscon | --sysco | --sysc | --sys | --sy)
  502. ac_prev=sysconfdir ;;
  503. -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  504. | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  505. sysconfdir="$ac_optarg" ;;
  506. -target | --target | --targe | --targ | --tar | --ta | --t)
  507. ac_prev=target ;;
  508. -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  509. target="$ac_optarg" ;;
  510. -v | -verbose | --verbose | --verbos | --verbo | --verb)
  511. verbose=yes ;;
  512. -version | --version | --versio | --versi | --vers)
  513. echo "configure generated by autoconf version 2.13"
  514. exit 0 ;;
  515. -with-* | --with-*)
  516. ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  517. # Reject names that are not valid shell variable names.
  518. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  519. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  520. fi
  521. ac_package=`echo $ac_package| sed 's/-/_/g'`
  522. case "$ac_option" in
  523. *=*) ;;
  524. *) ac_optarg=yes ;;
  525. esac
  526. eval "with_${ac_package}='$ac_optarg'" ;;
  527. -without-* | --without-*)
  528. ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  529. # Reject names that are not valid shell variable names.
  530. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  531. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  532. fi
  533. ac_package=`echo $ac_package| sed 's/-/_/g'`
  534. eval "with_${ac_package}=no" ;;
  535. --x)
  536. # Obsolete; use --with-x.
  537. with_x=yes ;;
  538. -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  539. | --x-incl | --x-inc | --x-in | --x-i)
  540. ac_prev=x_includes ;;
  541. -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  542. | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  543. x_includes="$ac_optarg" ;;
  544. -x-libraries | --x-libraries | --x-librarie | --x-librari \
  545. | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  546. ac_prev=x_libraries ;;
  547. -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  548. | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  549. x_libraries="$ac_optarg" ;;
  550. -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  551. ;;
  552. *)
  553. if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  554. echo "configure: warning: $ac_option: invalid host type" 1>&2
  555. fi
  556. if test "x$nonopt" != xNONE; then
  557. { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  558. fi
  559. nonopt="$ac_option"
  560. ;;
  561. esac
  562. done
  563. if test -n "$ac_prev"; then
  564. { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  565. fi
  566. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  567. # File descriptor usage:
  568. # 0 standard input
  569. # 1 file creation
  570. # 2 errors and warnings
  571. # 3 some systems may open it to /dev/tty
  572. # 4 used on the Kubota Titan
  573. # 6 checking for... messages and results
  574. # 5 compiler messages saved in config.log
  575. if test "$silent" = yes; then
  576. exec 6>/dev/null
  577. else
  578. exec 6>&1
  579. fi
  580. exec 5>./config.log
  581. echo "\
  582. This file contains any messages produced by compilers while
  583. running configure, to aid debugging if configure makes a mistake.
  584. " 1>&5
  585. # Strip out --no-create and --no-recursion so they do not pile up.
  586. # Also quote any args containing shell metacharacters.
  587. ac_configure_args=
  588. for ac_arg
  589. do
  590. case "$ac_arg" in
  591. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  592. | --no-cr | --no-c) ;;
  593. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  594. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  595. *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  596. ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  597. *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  598. esac
  599. done
  600. # NLS nuisances.
  601. # Only set these to C if already set. These must not be set unconditionally
  602. # because not all systems understand e.g. LANG=C (notably SCO).
  603. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  604. # Non-C LC_CTYPE values break the ctype check.
  605. if test "${LANG+set}" = set; then LANG=C; export LANG; fi
  606. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  607. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  608. if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
  609. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  610. rm -rf conftest* confdefs.h
  611. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  612. echo > confdefs.h
  613. # A filename unique to this package, relative to the directory that
  614. # configure is in, which we can look for to find out if srcdir is correct.
  615. ac_unique_file=configure.in
  616. # Find the source files, if location was not specified.
  617. if test -z "$srcdir"; then
  618. ac_srcdir_defaulted=yes
  619. # Try the directory containing this script, then its parent.
  620. ac_prog=$0
  621. ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  622. test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  623. srcdir=$ac_confdir
  624. if test ! -r $srcdir/$ac_unique_file; then
  625. srcdir=..
  626. fi
  627. else
  628. ac_srcdir_defaulted=no
  629. fi
  630. if test ! -r $srcdir/$ac_unique_file; then
  631. if test "$ac_srcdir_defaulted" = yes; then
  632. { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  633. else
  634. { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  635. fi
  636. fi
  637. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  638. # Prefer explicitly selected file to automatically selected ones.
  639. if test -z "$CONFIG_SITE"; then
  640. if test "x$prefix" != xNONE; then
  641. CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  642. else
  643. CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  644. fi
  645. fi
  646. for ac_site_file in $CONFIG_SITE; do
  647. if test -r "$ac_site_file"; then
  648. echo "loading site script $ac_site_file"
  649. . "$ac_site_file"
  650. fi
  651. done
  652. ac_ext=c
  653. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  654. ac_cpp='$CPP $CPPFLAGS'
  655. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  656. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  657. cross_compiling=$ac_cv_prog_cc_cross
  658. ac_exeext=
  659. ac_objext=o
  660. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  661. # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  662. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  663. ac_n= ac_c='
  664. ' ac_t=' '
  665. else
  666. ac_n=-n ac_c= ac_t=
  667. fi
  668. else
  669. ac_n= ac_c='\c' ac_t=
  670. fi
  671. ac_aux_dir=
  672. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  673. if test -f $ac_dir/install-sh; then
  674. ac_aux_dir=$ac_dir
  675. ac_install_sh="$ac_aux_dir/install-sh -c"
  676. break
  677. elif test -f $ac_dir/install.sh; then
  678. ac_aux_dir=$ac_dir
  679. ac_install_sh="$ac_aux_dir/install.sh -c"
  680. break
  681. fi
  682. done
  683. if test -z "$ac_aux_dir"; then
  684. { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  685. fi
  686. ac_config_guess=$ac_aux_dir/config.guess
  687. ac_config_sub=$ac_aux_dir/config.sub
  688. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  689. # Make sure we can run config.sub.
  690. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
  691. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  692. fi
  693. echo $ac_n "checking host system type""... $ac_c" 1>&6
  694. echo "configure:766: checking host system type" >&5
  695. host_alias=$host
  696. case "$host_alias" in
  697. NONE)
  698. case $nonopt in
  699. NONE)
  700. if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
  701. else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  702. fi ;;
  703. *) host_alias=$nonopt ;;
  704. esac ;;
  705. esac
  706. host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
  707. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  708. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  709. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  710. echo "$ac_t""$host" 1>&6
  711. # Extract the first word of "gcc", so it can be a program name with args.
  712. set dummy gcc; ac_word=$2
  713. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  714. echo "configure:789: checking for $ac_word" >&5
  715. if test -n "$CC"; then
  716. ac_cv_prog_CC="$CC" # Let the user override the test.
  717. else
  718. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  719. ac_dummy="$PATH"
  720. for ac_dir in $ac_dummy; do
  721. test -z "$ac_dir" && ac_dir=.
  722. if test -f $ac_dir/$ac_word; then
  723. ac_cv_prog_CC="gcc"
  724. break
  725. fi
  726. done
  727. IFS="$ac_save_ifs"
  728. fi
  729. CC="$ac_cv_prog_CC"
  730. if test -n "$CC"; then
  731. echo "$ac_t""$CC" 1>&6
  732. else
  733. echo "$ac_t""no" 1>&6
  734. fi
  735. if test -z "$CC"; then
  736. # Extract the first word of "cc", so it can be a program name with args.
  737. set dummy cc; ac_word=$2
  738. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  739. echo "configure:816: checking for $ac_word" >&5
  740. if test -n "$CC"; then
  741. ac_cv_prog_CC="$CC" # Let the user override the test.
  742. else
  743. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  744. ac_prog_rejected=no
  745. ac_dummy="$PATH"
  746. for ac_dir in $ac_dummy; do
  747. test -z "$ac_dir" && ac_dir=.
  748. if test -f $ac_dir/$ac_word; then
  749. if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  750. ac_prog_rejected=yes
  751. continue
  752. fi
  753. ac_cv_prog_CC="cc"
  754. break
  755. fi
  756. done
  757. IFS="$ac_save_ifs"
  758. if test $ac_prog_rejected = yes; then
  759. # We found a bogon in the path, so make sure we never use it.
  760. set dummy $ac_cv_prog_CC
  761. shift
  762. if test $# -gt 0; then
  763. # We chose a different compiler from the bogus one.
  764. # However, it has the same basename, so the bogon will be chosen
  765. # first if we set CC to just the basename; use the full file name.
  766. shift
  767. set dummy "$ac_dir/$ac_word" "$@"
  768. shift
  769. ac_cv_prog_CC="$@"
  770. fi
  771. fi
  772. fi
  773. CC="$ac_cv_prog_CC"
  774. if test -n "$CC"; then
  775. echo "$ac_t""$CC" 1>&6
  776. else
  777. echo "$ac_t""no" 1>&6
  778. fi
  779. if test -z "$CC"; then
  780. case "`uname -s`" in
  781. *win32* | *WIN32*)
  782. # Extract the first word of "cl", so it can be a program name with args.
  783. set dummy cl; ac_word=$2
  784. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  785. echo "configure:864: checking for $ac_word" >&5
  786. if test -n "$CC"; then
  787. ac_cv_prog_CC="$CC" # Let the user override the test.
  788. else
  789. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  790. ac_dummy="$PATH"
  791. for ac_dir in $ac_dummy; do
  792. test -z "$ac_dir" && ac_dir=.
  793. if test -f $ac_dir/$ac_word; then
  794. ac_cv_prog_CC="cl"
  795. break
  796. fi
  797. done
  798. IFS="$ac_save_ifs"
  799. fi
  800. CC="$ac_cv_prog_CC"
  801. if test -n "$CC"; then
  802. echo "$ac_t""$CC" 1>&6
  803. else
  804. echo "$ac_t""no" 1>&6
  805. fi
  806. ;;
  807. esac
  808. fi
  809. test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  810. fi
  811. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  812. echo "configure:893: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  813. ac_ext=c
  814. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  815. ac_cpp='$CPP $CPPFLAGS'
  816. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  817. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  818. cross_compiling=$ac_cv_prog_cc_cross
  819. cat > conftest.$ac_ext << EOF
  820. #line 904 "configure"
  821. #include "confdefs.h"
  822. main(){return(0);}
  823. EOF
  824. if { (eval echo configure:909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  825. ac_cv_prog_cc_works=yes
  826. # If we can't run a trivial program, we are probably using a cross compiler.
  827. if (./conftest; exit) 2>/dev/null; then
  828. ac_cv_prog_cc_cross=no
  829. else
  830. ac_cv_prog_cc_cross=yes
  831. fi
  832. else
  833. echo "configure: failed program was:" >&5
  834. cat conftest.$ac_ext >&5
  835. ac_cv_prog_cc_works=no
  836. fi
  837. rm -fr conftest*
  838. ac_ext=c
  839. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  840. ac_cpp='$CPP $CPPFLAGS'
  841. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  842. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  843. cross_compiling=$ac_cv_prog_cc_cross
  844. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  845. if test $ac_cv_prog_cc_works = no; then
  846. { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  847. fi
  848. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  849. echo "configure:935: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  850. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  851. cross_compiling=$ac_cv_prog_cc_cross
  852. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  853. echo "configure:940: checking whether we are using GNU C" >&5
  854. cat > conftest.c <<EOF
  855. #ifdef __GNUC__
  856. yes;
  857. #endif
  858. EOF
  859. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  860. ac_cv_prog_gcc=yes
  861. else
  862. ac_cv_prog_gcc=no
  863. fi
  864. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  865. if test $ac_cv_prog_gcc = yes; then
  866. GCC=yes
  867. else
  868. GCC=
  869. fi
  870. ac_test_CFLAGS="${CFLAGS+set}"
  871. ac_save_CFLAGS="$CFLAGS"
  872. CFLAGS=
  873. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  874. echo "configure:965: checking whether ${CC-cc} accepts -g" >&5
  875. echo 'void f(){}' > conftest.c
  876. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  877. ac_cv_prog_cc_g=yes
  878. else
  879. ac_cv_prog_cc_g=no
  880. fi
  881. rm -f conftest*
  882. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  883. if test "$ac_test_CFLAGS" = set; then
  884. CFLAGS="$ac_save_CFLAGS"
  885. elif test $ac_cv_prog_cc_g = yes; then
  886. if test "$GCC" = yes; then
  887. CFLAGS="-g -O2"
  888. else
  889. CFLAGS="-g"
  890. fi
  891. else
  892. if test "$GCC" = yes; then
  893. CFLAGS="-O2"
  894. else
  895. CFLAGS=
  896. fi
  897. fi
  898. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  899. echo "configure:994: checking for Cygwin environment" >&5
  900. cat > conftest.$ac_ext <<EOF
  901. #line 997 "configure"
  902. #include "confdefs.h"
  903. int main() {
  904. #ifndef __CYGWIN__
  905. #define __CYGWIN__ __CYGWIN32__
  906. #endif
  907. return __CYGWIN__;
  908. ; return 0; }
  909. EOF
  910. if { (eval echo configure:1008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  911. rm -rf conftest*
  912. ac_cv_cygwin=yes
  913. else
  914. echo "configure: failed program was:" >&5
  915. cat conftest.$ac_ext >&5
  916. rm -rf conftest*
  917. ac_cv_cygwin=no
  918. fi
  919. rm -f conftest*
  920. rm -f conftest*
  921. echo "$ac_t""$ac_cv_cygwin" 1>&6
  922. CYGWIN=
  923. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  924. echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
  925. echo "configure:1024: checking for mingw32 environment" >&5
  926. cat > conftest.$ac_ext <<EOF
  927. #line 1027 "configure"
  928. #include "confdefs.h"
  929. int main() {
  930. return __MINGW32__;
  931. ; return 0; }
  932. EOF
  933. if { (eval echo configure:1034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  934. rm -rf conftest*
  935. ac_cv_mingw32=yes
  936. else
  937. echo "configure: failed program was:" >&5
  938. cat conftest.$ac_ext >&5
  939. rm -rf conftest*
  940. ac_cv_mingw32=no
  941. fi
  942. rm -f conftest*
  943. rm -f conftest*
  944. echo "$ac_t""$ac_cv_mingw32" 1>&6
  945. MINGW32=
  946. test "$ac_cv_mingw32" = yes && MINGW32=yes
  947. echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
  948. echo "configure:1052: checking for executable suffix" >&5
  949. if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
  950. ac_cv_exeext=.exe
  951. else
  952. ac_cv_exeext=no
  953. fi
  954. EXEEXT=""
  955. test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
  956. echo "$ac_t""${ac_cv_exeext}" 1>&6
  957. ac_exeext=$EXEEXT
  958. # Set WINDRES
  959. if test "$MINGW32" = yes ; then
  960. WINDRES=${WINDRES-windres}
  961. else
  962. WINDRES=
  963. fi
  964. # Check for custom PKG_CONFIG
  965. PKG_CONFIG=${PKG_CONFIG-pkg-config}
  966. # Check for full floating-point support, including Infinity and NaN
  967. IEEEFLAG=
  968. echo $ac_n "checking for full floating-point support""... $ac_c" 1>&6
  969. echo "configure:1084: checking for full floating-point support" >&5
  970. if test "$cross_compiling" = yes; then
  971. echo "$ac_t""unknown (cross-compiling)" 1>&6
  972. echo $ac_n "checking whether "cc -mieee" works""... $ac_c" 1>&6
  973. echo "configure:1089: checking whether "cc -mieee" works" >&5
  974. ac_save_cflags=${CFLAGS}
  975. CFLAGS="$CFLAGS -mieee"
  976. cat > conftest.$ac_ext <<EOF
  977. #line 1093 "configure"
  978. #include "confdefs.h"
  979. int main() {
  980. ; return 0; }
  981. EOF
  982. if { (eval echo configure:1100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  983. rm -rf conftest*
  984. echo "$ac_t""yes" 1>&6
  985. IEEEFLAG="-mieee"
  986. else
  987. echo "configure: failed program was:" >&5
  988. cat conftest.$ac_ext >&5
  989. rm -rf conftest*
  990. echo "$ac_t""no" 1>&6
  991. fi
  992. rm -f conftest*
  993. CFLAGS=${ac_save_cflags}
  994. else
  995. cat > conftest.$ac_ext <<EOF
  996. #line 1116 "configure"
  997. #include "confdefs.h"
  998. #include <float.h>
  999. int main(void) {
  1000. double one = 1.0;
  1001. double zero = 0.0;
  1002. if (one/zero > DBL_MAX) /* infinity */
  1003. if (zero/zero != zero/zero) /* NaN */
  1004. return 0;
  1005. return 1;
  1006. }
  1007. EOF
  1008. if { (eval echo configure:1130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1009. then
  1010. echo "$ac_t""yes" 1>&6
  1011. else
  1012. echo "configure: failed program was:" >&5
  1013. cat conftest.$ac_ext >&5
  1014. rm -fr conftest*
  1015. echo "$ac_t""no" 1>&6
  1016. ac_save_cflags=${CFLAGS}
  1017. CFLAGS=-mieee
  1018. echo $ac_n "checking for full floating-point support with -mieee""... $ac_c" 1>&6
  1019. echo "configure:1143: checking for full floating-point support with -mieee" >&5
  1020. if test "$cross_compiling" = yes; then
  1021. echo "$ac_t""unknown (cross-compiling)" 1>&6
  1022. { echo "configure: error: *** INTERNAL CONFIGURE ERROR" 1>&2; exit 1; }
  1023. else
  1024. cat > conftest.$ac_ext <<EOF
  1025. #line 1150 "configure"
  1026. #include "confdefs.h"
  1027. #include <float.h>
  1028. int main(void) {
  1029. double one = 1.0;
  1030. double zero = 0.0;
  1031. if (one/zero > DBL_MAX) /* infinity */
  1032. if (zero/zero != zero/zero) /* NaN */
  1033. return 0;
  1034. return 1;
  1035. }
  1036. EOF
  1037. if { (eval echo configure:1164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1038. then
  1039. echo "$ac_t""yes" 1>&6
  1040. IEEEFLAG="-mieee"
  1041. else
  1042. echo "configure: failed program was:" >&5
  1043. cat conftest.$ac_ext >&5
  1044. rm -fr conftest*
  1045. echo "$ac_t""no" 1>&6
  1046. echo "configure: warning: *** Incomplete floating-point support." 1>&2
  1047. fi
  1048. rm -fr conftest*
  1049. fi
  1050. CFLAGS=${ac_save_cflags}
  1051. fi
  1052. rm -fr conftest*
  1053. fi
  1054. CFLAGS="$CFLAGS $IEEEFLAG"
  1055. # Set BINDIR
  1056. if test -n "${bindir}"; then
  1057. BINDIR="${bindir}"
  1058. else
  1059. BINDIR=/usr/local/bin
  1060. fi
  1061. # Set SRCDIR and DSTDIR
  1062. # Extract the first word of "pwd", so it can be a program name with args.
  1063. set dummy pwd; ac_word=$2
  1064. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1065. echo "configure:1201: checking for $ac_word" >&5
  1066. case "$pwd" in
  1067. /*)
  1068. ac_cv_path_pwd="$pwd" # Let the user override the test with a path.
  1069. ;;
  1070. ?:/*)
  1071. ac_cv_path_pwd="$pwd" # Let the user override the test with a dos path.
  1072. ;;
  1073. *)
  1074. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1075. ac_dummy="$PATH"
  1076. for ac_dir in $ac_dummy; do
  1077. test -z "$ac_dir" && ac_dir=.
  1078. if test -f $ac_dir/$ac_word; then
  1079. ac_cv_path_pwd="$ac_dir/$ac_word"
  1080. break
  1081. fi
  1082. done
  1083. IFS="$ac_save_ifs"
  1084. test -z "$ac_cv_path_pwd" && ac_cv_path_pwd="pwd"
  1085. ;;
  1086. esac
  1087. pwd="$ac_cv_path_pwd"
  1088. if test -n "$pwd"; then
  1089. echo "$ac_t""$pwd" 1>&6
  1090. else
  1091. echo "$ac_t""no" 1>&6
  1092. fi
  1093. if test "$MINGW32" = yes -a "$cross_compiling" != yes ; then
  1094. winpwd="pwd -W"
  1095. else
  1096. winpwd="$pwd"
  1097. fi
  1098. echo $ac_n "checking for source directory""... $ac_c" 1>&6
  1099. echo "configure:1239: checking for source directory" >&5
  1100. if test -z "$srcdir" ; then
  1101. SRCDIR=`$pwd`
  1102. else
  1103. SRCDIR=`(cd "$srcdir" ; $pwd)`
  1104. fi
  1105. echo "$ac_t"""$SRCDIR"" 1>&6
  1106. echo $ac_n "checking for build directory""... $ac_c" 1>&6
  1107. echo "configure:1250: checking for build directory" >&5
  1108. DSTDIR=`$pwd`
  1109. WINDSTDIR=`$winpwd`
  1110. echo "$ac_t"""$DSTDIR"" 1>&6
  1111. # Set ARCH
  1112. ARCH=
  1113. if test -z "${host}"; then
  1114. ARCH="unknown"
  1115. else
  1116. ARCH="${host}"
  1117. fi
  1118. # Use absolute path for aux directory so that install-sh works
  1119. ac_aux_dir=
  1120. for ac_dir in "$SRCDIR" $srcdir/"$SRCDIR"; do
  1121. if test -f $ac_dir/install-sh; then
  1122. ac_aux_dir=$ac_dir
  1123. ac_install_sh="$ac_aux_dir/install-sh -c"
  1124. break
  1125. elif test -f $ac_dir/install.sh; then
  1126. ac_aux_dir=$ac_dir
  1127. ac_install_sh="$ac_aux_dir/install.sh -c"
  1128. break
  1129. fi
  1130. done
  1131. if test -z "$ac_aux_dir"; then
  1132. { echo "configure: error: can not find install-sh or install.sh in "$SRCDIR" $srcdir/"$SRCDIR"" 1>&2; exit 1; }
  1133. fi
  1134. ac_config_guess=$ac_aux_dir/config.guess
  1135. ac_config_sub=$ac_aux_dir/config.sub
  1136. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  1137. # Set GISBASE and GRASS_BIN
  1138. GISBASE="${WINDSTDIR}/dist.${ARCH}"
  1139. GRASS_BIN="${DSTDIR}/bin.${ARCH}"
  1140. # Set GRASS_VERSION_*
  1141. GRASS_VERSION_FILE=include/VERSION
  1142. GRASS_VERSION_MAJOR=`sed -n 1p "${GRASS_VERSION_FILE}"`
  1143. GRASS_VERSION_MINOR=`sed -n 2p "${GRASS_VERSION_FILE}"`
  1144. GRASS_VERSION_RELEASE=`sed -n 3p "${GRASS_VERSION_FILE}"`
  1145. GRASS_VERSION_DATE=`sed -n 4p "${GRASS_VERSION_FILE}"`
  1146. GRASS_VERSION_NUMBER=`echo ${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}`
  1147. NAME_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/\..*//'`
  1148. LIB_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/^\([0-9.]*\).*$/\1/'`
  1149. GRASS_VERSION_GIT="exported"
  1150. # Extract the first word of "git", so it can be a program name with args.
  1151. set dummy git; ac_word=$2
  1152. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1153. echo "configure:1318: checking for $ac_word" >&5
  1154. case "$GIT" in
  1155. /*)
  1156. ac_cv_path_GIT="$GIT" # Let the user override the test with a path.
  1157. ;;
  1158. ?:/*)
  1159. ac_cv_path_GIT="$GIT" # Let the user override the test with a dos path.
  1160. ;;
  1161. *)
  1162. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1163. ac_dummy="$PATH"
  1164. for ac_dir in $ac_dummy; do
  1165. test -z "$ac_dir" && ac_dir=.
  1166. if test -f $ac_dir/$ac_word; then
  1167. ac_cv_path_GIT="$ac_dir/$ac_word"
  1168. break
  1169. fi
  1170. done
  1171. IFS="$ac_save_ifs"
  1172. test -z "$ac_cv_path_GIT" && ac_cv_path_GIT="no"
  1173. ;;
  1174. esac
  1175. GIT="$ac_cv_path_GIT"
  1176. if test -n "$GIT"; then
  1177. echo "$ac_t""$GIT" 1>&6
  1178. else
  1179. echo "$ac_t""no" 1>&6
  1180. fi
  1181. if test "$GIT" != "no" ; then
  1182. GRASS_VERSION_GIT=`$GIT rev-parse --short HEAD 2>/dev/null`
  1183. if test -z "$GRASS_VERSION_GIT"; then
  1184. GRASS_VERSION_GIT="exported"
  1185. fi
  1186. fi
  1187. # Check for MacOSX App
  1188. # Check whether --enable-macosx-app or --disable-macosx-app was given.
  1189. if test "${enable_macosx_app+set}" = set; then
  1190. enableval="$enable_macosx_app"
  1191. :
  1192. else
  1193. enable_macosx_app=no
  1194. fi
  1195. echo $ac_n "checking for MacOSX App""... $ac_c" 1>&6
  1196. echo "configure:1377: checking for MacOSX App" >&5
  1197. case "$enable_macosx_app" in
  1198. yes) MACOSX_APP=1 ;;
  1199. no) MACOSX_APP= ;;
  1200. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  1201. esac
  1202. echo "$ac_t"""$enable_macosx_app"" 1>&6
  1203. # Check for MacOSX archs
  1204. echo $ac_n "checking for MacOSX architectures""... $ac_c" 1>&6
  1205. echo "configure:1389: checking for MacOSX architectures" >&5
  1206. MACOSX_ARCHS=
  1207. if test -z "$with_macosx_archs" ; then
  1208. echo "$ac_t""no" 1>&6
  1209. else
  1210. for a in $with_macosx_archs
  1211. do
  1212. # check if valid arch?
  1213. case "$a" in
  1214. i386|ppc|x86_64|ppc64)
  1215. MACOSX_ARCHS="$MACOSX_ARCHS -arch $a"
  1216. ;;
  1217. esac
  1218. done
  1219. echo "$ac_t""$MACOSX_ARCHS" 1>&6
  1220. LDFLAGS="$LDFLAGS $MACOSX_ARCHS"
  1221. CFLAGS="$CFLAGS $MACOSX_ARCHS"
  1222. CXXFLAGS="$CXXFLAGS $MACOSX_ARCHS"
  1223. fi
  1224. # Done checking MacOSX archs
  1225. # Check for MacOSX SDK
  1226. echo $ac_n "checking for MacOSX SDK""... $ac_c" 1>&6
  1227. echo "configure:1418: checking for MacOSX SDK" >&5
  1228. MACOSX_SDK=
  1229. if test -z "$with_macosx_sdk" ; then
  1230. echo "$ac_t""no" 1>&6
  1231. else
  1232. ac_safe=`echo "$with_macosx_sdk/SDKSettings.plist" | sed 'y%./+-%__p_%'`
  1233. echo $ac_n "checking for $with_macosx_sdk/SDKSettings.plist""... $ac_c" 1>&6
  1234. echo "configure:1428: checking for $with_macosx_sdk/SDKSettings.plist" >&5
  1235. if test "$cross_compiling" = yes; then
  1236. { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
  1237. else
  1238. if test -r $with_macosx_sdk/SDKSettings.plist; then
  1239. eval "ac_cv_file_$ac_safe=yes"
  1240. else
  1241. eval "ac_cv_file_$ac_safe=no"
  1242. fi
  1243. fi
  1244. if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  1245. echo "$ac_t""yes" 1>&6
  1246. MACOSX_SDK="-isysroot $with_macosx_sdk"
  1247. else
  1248. echo "$ac_t""no" 1>&6
  1249. { echo "configure: error: *** specified SDK does not exist or is not a SDK" 1>&2; exit 1; }
  1250. fi
  1251. LDFLAGS="$LDFLAGS $MACOSX_SDK"
  1252. CFLAGS="$CFLAGS $MACOSX_SDK"
  1253. CXXFLAGS="$CXXFLAGS $MACOSX_SDK"
  1254. fi
  1255. # Done checking MacOSX SDK
  1256. # Set INST_DIR
  1257. if test -n "$MACOSX_APP" ; then
  1258. INSTDIR='${prefix}'"/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app/Contents/MacOS"
  1259. else
  1260. INSTDIR='${prefix}'"/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}"
  1261. fi
  1262. # Get flags for building shared libraries
  1263. echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
  1264. echo "configure:1472: checking how to build libraries" >&5
  1265. # Check whether --enable-shared or --disable-shared was given.
  1266. if test "${enable_shared+set}" = set; then
  1267. enableval="$enable_shared"
  1268. shared_ok=$enableval
  1269. else
  1270. shared_ok=yes
  1271. fi
  1272. if test "${enable_shared+set}" = set; then
  1273. enableval="$enable_shared"
  1274. shared_ok=$enableval
  1275. else
  1276. shared_ok=yes
  1277. fi
  1278. if test "$shared_ok" = "yes" ; then
  1279. echo "$ac_t""shared" 1>&6
  1280. SHARED_BUILD=1
  1281. GRASS_LIBRARY_TYPE='shlib'
  1282. else
  1283. echo "$ac_t""static" 1>&6
  1284. SHARED_BUILD=0
  1285. cat >> confdefs.h <<\EOF
  1286. #define STATIC_BUILD 1
  1287. EOF
  1288. GRASS_LIBRARY_TYPE='stlib'
  1289. fi
  1290. ac_save_ldflags="$LDFLAGS"
  1291. SHLIB_CFLAGS=""
  1292. SHLIB_LD_FLAGS=""
  1293. SHLIB_SUFFIX=""
  1294. SHLIB_LD=""
  1295. STLIB_LD='${AR} cr'
  1296. STLIB_SUFFIX='.a'
  1297. GRASS_TRIM_DOTS='`echo ${LIB_VER} | tr -d .`'
  1298. GRASS_LIB_VERSIONS_OK=ok
  1299. LDFLAGS=""
  1300. LD_SEARCH_FLAGS=""
  1301. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1302. case $host in
  1303. *-linux-* | *-gnu* | *-kfreebsd*-gnu)
  1304. SHLIB_CFLAGS="-fPIC"
  1305. SHLIB_LD_FLAGS="-Wl,-soname,\$(notdir \$@)"
  1306. SHLIB_SUFFIX=".so"
  1307. SHLIB_LD="${CC} -shared"
  1308. LDFLAGS="-Wl,--export-dynamic"
  1309. LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
  1310. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1311. ;;
  1312. *-pc-cygwin)
  1313. SHLIB_SUFFIX=".dll"
  1314. SHLIB_LD="${CC} -shared"
  1315. LDFLAGS="-Wl,--export-dynamic"
  1316. LD_LIBRARY_PATH_VAR="PATH"
  1317. ;;
  1318. *-pc-mingw32 | *-w64-mingw32 | *-pc-msys)
  1319. SHLIB_SUFFIX=".dll"
  1320. SHLIB_LD="${CC} -shared"
  1321. LDFLAGS="-Wl,--export-dynamic,--enable-runtime-pseudo-reloc"
  1322. LD_LIBRARY_PATH_VAR="PATH"
  1323. ;;
  1324. *-apple-darwin*)
  1325. SHLIB_CFLAGS="-fno-common"
  1326. SHLIB_SUFFIX=".dylib"
  1327. SHLIB_LD="cc -dynamiclib -compatibility_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -current_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -install_name \${INST_DIR}/lib/lib\${LIB_NAME}\${SHLIB_SUFFIX}"
  1328. LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
  1329. ;;
  1330. *-sun-solaris*)
  1331. # Note: If _REENTRANT isn't defined, then Solaris
  1332. # won't define thread-safe library routines.
  1333. cat >> confdefs.h <<\EOF
  1334. #define _REENTRANT 1
  1335. EOF
  1336. cat >> confdefs.h <<\EOF
  1337. #define _POSIX_PTHREAD_SEMANTICS 1
  1338. EOF
  1339. # Note: need the LIBS below, otherwise Tk won't find Tcl's
  1340. # symbols when dynamically loaded into tclsh.
  1341. if test "$GCC" = "yes" ; then
  1342. SHLIB_CFLAGS="-fPIC"
  1343. SHLIB_LD="$CC -shared"
  1344. LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1345. else
  1346. SHLIB_CFLAGS="-KPIC"
  1347. SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1348. LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1349. fi
  1350. SHLIB_SUFFIX=".so"
  1351. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1352. ;;
  1353. *-solaris2*)
  1354. # Note: Solaris is as of 2010 Oracle Solaris, not Sun Solaris
  1355. # Oracle Solaris derives from Solaris 2
  1356. # derives from SunOS 5
  1357. # derives from UNIX System V Release 4
  1358. # Note: If _REENTRANT isn't defined, then Solaris
  1359. # won't define thread-safe library routines.
  1360. cat >> confdefs.h <<\EOF
  1361. #define _REENTRANT 1
  1362. EOF
  1363. cat >> confdefs.h <<\EOF
  1364. #define _POSIX_PTHREAD_SEMANTICS 1
  1365. EOF
  1366. # Note: need the LIBS below, otherwise Tk won't find Tcl's
  1367. # symbols when dynamically loaded into tclsh.
  1368. if test "$GCC" = "yes" ; then
  1369. SHLIB_CFLAGS="-fPIC"
  1370. SHLIB_LD="$CC -shared"
  1371. LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1372. else
  1373. SHLIB_CFLAGS="-KPIC"
  1374. SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1375. LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1376. fi
  1377. SHLIB_SUFFIX=".so"
  1378. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1379. ;;
  1380. *-freebsd*)
  1381. # NOTE: only FreeBSD 4+ is supported
  1382. # FreeBSD 3.* and greater have ELF.
  1383. SHLIB_CFLAGS="-fPIC"
  1384. #SHLIB_LD="ld -Bshareable -x"
  1385. SHLIB_LD="${CC} -shared"
  1386. SHLIB_SUFFIX=".so"
  1387. LDFLAGS="-export-dynamic"
  1388. #LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1389. LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
  1390. # TODO: add optional pthread support with any combination of:
  1391. # CFLAGS="$CFLAGS -pthread"
  1392. # LDFLAGS="$LDFLAGS -lpthread"
  1393. # AC_DEFINE(_REENTRANT)
  1394. # AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
  1395. ;;
  1396. *-netbsd*)
  1397. # NetBSD has ELF.
  1398. SHLIB_CFLAGS="-fPIC"
  1399. SHLIB_LD="${CC} -shared"
  1400. SHLIB_LD_LIBS="${LIBS}"
  1401. LDFLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
  1402. SHLIB_LD_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
  1403. LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -L${LIB_RUNTIME_DIR}'
  1404. # some older NetBSD versions do not handle version numbers with dots.
  1405. #STLIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
  1406. #SHLIB_SUFFIX='${GRASS_TRIM_DOTS}.so'
  1407. #GRASS_LIB_VERSIONS_OK=nodots
  1408. # NetBSD 6 does handle version numbers with dots.
  1409. STLIB_SUFFIX=".a"
  1410. SHLIB_SUFFIX=".so"
  1411. # TODO: add optional pthread support with any combination of:
  1412. # CFLAGS="$CFLAGS -pthread"
  1413. # LDFLAGS="$LDFLAGS -lpthread"
  1414. # AC_DEFINE(_REENTRANT)
  1415. # AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
  1416. ;;
  1417. *aix*)
  1418. # NOTE: do we need to support aix < 6 ?
  1419. LIBS="$LIBS -lc"
  1420. SHLIB_CFLAGS=""
  1421. LDFLAGS=""
  1422. if test "$GCC" = "yes" ; then
  1423. SHLIB_CFLAGS="-fPIC"
  1424. SHLIB_LD="$CC -shared"
  1425. LD_SEARCH_FLAGS='-Wl,-bsvr4,-R,${LIB_RUNTIME_DIR}'
  1426. else
  1427. # assume xlc
  1428. SHLIB_CFLAGS="-qmkshrobj"
  1429. SHLIB_LD="$CC -shared"
  1430. LD_SEARCH_FLAGS='-Wl,-bsvr4,-R,${LIB_RUNTIME_DIR}'
  1431. fi
  1432. SHLIB_SUFFIX=".so"
  1433. LD_LIBRARY_PATH_VAR="LIBPATH"
  1434. GRASS_NEEDS_EXP_FILE=1
  1435. GRASS_EXPORT_FILE_SUFFIX='${LIB_VER}.exp'
  1436. ;;
  1437. *)
  1438. { echo "configure: error: ***Unknown platform: $host***" 1>&2; exit 1; }
  1439. ;;
  1440. esac
  1441. LDFLAGS="${ac_save_ldflags} $LDFLAGS"
  1442. # Enable options
  1443. # Check whether --enable-w11 or --disable-w11 was given.
  1444. if test "${enable_w11+set}" = set; then
  1445. enableval="$enable_w11"
  1446. :
  1447. else
  1448. enable_w11=no
  1449. fi
  1450. # With options
  1451. # Check whether --with-cxx or --without-cxx was given.
  1452. if test "${with_cxx+set}" = set; then
  1453. withval="$with_cxx"
  1454. :
  1455. else
  1456. with_cxx=yes
  1457. fi
  1458. #LOC_ARG_WITH(g77, GNU Fortran 77, no)
  1459. # Check whether --with-macosx-archs or --without-macosx-archs was given.
  1460. if test "${with_macosx_archs+set}" = set; then
  1461. withval="$with_macosx_archs"
  1462. :
  1463. else
  1464. with_macosx_archs="no"
  1465. fi
  1466. # Check whether --with-macosx-sdk or --without-macosx-sdk was given.
  1467. if test "${with_macosx_sdk+set}" = set; then
  1468. withval="$with_macosx_sdk"
  1469. :
  1470. else
  1471. with_macosx_sdk="no"
  1472. fi
  1473. # Check whether --with-tiff or --without-tiff was given.
  1474. if test "${with_tiff+set}" = set; then
  1475. withval="$with_tiff"
  1476. :
  1477. else
  1478. with_tiff=yes
  1479. fi
  1480. # Check whether --with-png or --without-png was given.
  1481. if test "${with_png+set}" = set; then
  1482. withval="$with_png"
  1483. :
  1484. else
  1485. with_png=yes
  1486. fi
  1487. # Check whether --with-postgres or --without-postgres was given.
  1488. if test "${with_postgres+set}" = set; then
  1489. withval="$with_postgres"
  1490. :
  1491. else
  1492. with_postgres=no
  1493. fi
  1494. # Check whether --with-mysql or --without-mysql was given.
  1495. if test "${with_mysql+set}" = set; then
  1496. withval="$with_mysql"
  1497. :
  1498. else
  1499. with_mysql=no
  1500. fi
  1501. # Check whether --with-sqlite or --without-sqlite was given.
  1502. if test "${with_sqlite+set}" = set; then
  1503. withval="$with_sqlite"
  1504. :
  1505. else
  1506. with_sqlite=yes
  1507. fi
  1508. # Check whether --with-opengl or --without-opengl was given.
  1509. if test "${with_opengl+set}" = set; then
  1510. withval="$with_opengl"
  1511. :
  1512. else
  1513. with_opengl=yes
  1514. fi
  1515. # Check whether --with-odbc or --without-odbc was given.
  1516. if test "${with_odbc+set}" = set; then
  1517. withval="$with_odbc"
  1518. :
  1519. else
  1520. with_odbc=no
  1521. fi
  1522. # Check whether --with-fftw or --without-fftw was given.
  1523. if test "${with_fftw+set}" = set; then
  1524. withval="$with_fftw"
  1525. :
  1526. else
  1527. with_fftw=yes
  1528. fi
  1529. # Check whether --with-blas or --without-blas was given.
  1530. if test "${with_blas+set}" = set; then
  1531. withval="$with_blas"
  1532. :
  1533. else
  1534. with_blas=no
  1535. fi
  1536. # Check whether --with-lapack or --without-lapack was given.
  1537. if test "${with_lapack+set}" = set; then
  1538. withval="$with_lapack"
  1539. :
  1540. else
  1541. with_lapack=no
  1542. fi
  1543. # Check whether --with-cairo or --without-cairo was given.
  1544. if test "${with_cairo+set}" = set; then
  1545. withval="$with_cairo"
  1546. :
  1547. else
  1548. with_cairo=yes
  1549. fi
  1550. # Check whether --with-freetype or --without-freetype was given.
  1551. if test "${with_freetype+set}" = set; then
  1552. withval="$with_freetype"
  1553. :
  1554. else
  1555. with_freetype=yes
  1556. fi
  1557. # Check whether --with-nls or --without-nls was given.
  1558. if test "${with_nls+set}" = set; then
  1559. withval="$with_nls"
  1560. :
  1561. else
  1562. with_nls=no
  1563. fi
  1564. # Check whether --with-readline or --without-readline was given.
  1565. if test "${with_readline+set}" = set; then
  1566. withval="$with_readline"
  1567. :
  1568. else
  1569. with_readline=no
  1570. fi
  1571. # Check whether --with-opendwg or --without-opendwg was given.
  1572. if test "${with_opendwg+set}" = set; then
  1573. withval="$with_opendwg"
  1574. :
  1575. else
  1576. with_opendwg=no
  1577. fi
  1578. # Check whether --with-regex or --without-regex was given.
  1579. if test "${with_regex+set}" = set; then
  1580. withval="$with_regex"
  1581. :
  1582. else
  1583. with_regex=yes
  1584. fi
  1585. # Check whether --with-pthread or --without-pthread was given.
  1586. if test "${with_pthread+set}" = set; then
  1587. withval="$with_pthread"
  1588. :
  1589. else
  1590. with_pthread=no
  1591. fi
  1592. # Check whether --with-openmp or --without-openmp was given.
  1593. if test "${with_openmp+set}" = set; then
  1594. withval="$with_openmp"
  1595. :
  1596. else
  1597. with_openmp=no
  1598. fi
  1599. # Check whether --with-opencl or --without-opencl was given.
  1600. if test "${with_opencl+set}" = set; then
  1601. withval="$with_opencl"
  1602. :
  1603. else
  1604. with_opencl=no
  1605. fi
  1606. # Check whether --with-bzlib or --without-bzlib was given.
  1607. if test "${with_bzlib+set}" = set; then
  1608. withval="$with_bzlib"
  1609. :
  1610. else
  1611. with_bzlib=no
  1612. fi
  1613. # Check whether --with-zstd or --without-zstd was given.
  1614. if test "${with_zstd+set}" = set; then
  1615. withval="$with_zstd"
  1616. :
  1617. else
  1618. with_zstd=yes
  1619. fi
  1620. # Check whether --with-gdal or --without-gdal was given.
  1621. if test "${with_gdal+set}" = set; then
  1622. withval="$with_gdal"
  1623. :
  1624. fi
  1625. # Check whether --with-liblas or --without-liblas was given.
  1626. if test "${with_liblas+set}" = set; then
  1627. withval="$with_liblas"
  1628. :
  1629. else
  1630. with_liblas="no"
  1631. fi
  1632. # Check whether --with-pdal or --without-pdal was given.
  1633. if test "${with_pdal+set}" = set; then
  1634. withval="$with_pdal"
  1635. :
  1636. else
  1637. with_pdal="no"
  1638. fi
  1639. # Check whether --with-wxwidgets or --without-wxwidgets was given.
  1640. if test "${with_wxwidgets+set}" = set; then
  1641. withval="$with_wxwidgets"
  1642. :
  1643. else
  1644. with_wxwidgets="no"
  1645. fi
  1646. # Check whether --with-netcdf or --without-netcdf was given.
  1647. if test "${with_netcdf+set}" = set; then
  1648. withval="$with_netcdf"
  1649. :
  1650. else
  1651. with_netcdf="no"
  1652. fi
  1653. # With includes and libs options
  1654. # Check whether --with-geos or --without-geos was given.
  1655. if test "${with_geos+set}" = set; then
  1656. withval="$with_geos"
  1657. :
  1658. else
  1659. with_geos="no"
  1660. fi
  1661. # Check whether --with-includes or --without-includes was given.
  1662. if test "${with_includes+set}" = set; then
  1663. withval="$with_includes"
  1664. :
  1665. fi
  1666. # Check whether --with-libs or --without-libs was given.
  1667. if test "${with_libs+set}" = set; then
  1668. withval="$with_libs"
  1669. :
  1670. fi
  1671. # Check whether --with-zlib-includes or --without-zlib-includes was given.
  1672. if test "${with_zlib_includes+set}" = set; then
  1673. withval="$with_zlib_includes"
  1674. :
  1675. fi
  1676. # Check whether --with-zlib-libs or --without-zlib-libs was given.
  1677. if test "${with_zlib_libs+set}" = set; then
  1678. withval="$with_zlib_libs"
  1679. :
  1680. fi
  1681. # Check whether --with-bzlib-includes or --without-bzlib-includes was given.
  1682. if test "${with_bzlib_includes+set}" = set; then
  1683. withval="$with_bzlib_includes"
  1684. :
  1685. fi
  1686. # Check whether --with-bzlib-libs or --without-bzlib-libs was given.
  1687. if test "${with_bzlib_libs+set}" = set; then
  1688. withval="$with_bzlib_libs"
  1689. :
  1690. fi
  1691. # Check whether --with-zstd-includes or --without-zstd-includes was given.
  1692. if test "${with_zstd_includes+set}" = set; then
  1693. withval="$with_zstd_includes"
  1694. :
  1695. fi
  1696. # Check whether --with-zstd-libs or --without-zstd-libs was given.
  1697. if test "${with_zstd_libs+set}" = set; then
  1698. withval="$with_zstd_libs"
  1699. :
  1700. fi
  1701. # Check whether --with-readline-includes or --without-readline-includes was given.
  1702. if test "${with_readline_includes+set}" = set; then
  1703. withval="$with_readline_includes"
  1704. :
  1705. fi
  1706. # Check whether --with-readline-libs or --without-readline-libs was given.
  1707. if test "${with_readline_libs+set}" = set; then
  1708. withval="$with_readline_libs"
  1709. :
  1710. fi
  1711. # Check whether --with-tiff-includes or --without-tiff-includes was given.
  1712. if test "${with_tiff_includes+set}" = set; then
  1713. withval="$with_tiff_includes"
  1714. :
  1715. fi
  1716. # Check whether --with-tiff-libs or --without-tiff-libs was given.
  1717. if test "${with_tiff_libs+set}" = set; then
  1718. withval="$with_tiff_libs"
  1719. :
  1720. fi
  1721. # Check whether --with-png-includes or --without-png-includes was given.
  1722. if test "${with_png_includes+set}" = set; then
  1723. withval="$with_png_includes"
  1724. :
  1725. fi
  1726. # Check whether --with-png-libs or --without-png-libs was given.
  1727. if test "${with_png_libs+set}" = set; then
  1728. withval="$with_png_libs"
  1729. :
  1730. fi
  1731. # Check whether --with-postgres-includes or --without-postgres-includes was given.
  1732. if test "${with_postgres_includes+set}" = set; then
  1733. withval="$with_postgres_includes"
  1734. :
  1735. fi
  1736. # Check whether --with-postgres-libs or --without-postgres-libs was given.
  1737. if test "${with_postgres_libs+set}" = set; then
  1738. withval="$with_postgres_libs"
  1739. :
  1740. fi
  1741. # Check whether --with-mysql-includes or --without-mysql-includes was given.
  1742. if test "${with_mysql_includes+set}" = set; then
  1743. withval="$with_mysql_includes"
  1744. :
  1745. fi
  1746. # Check whether --with-mysql-libs or --without-mysql-libs was given.
  1747. if test "${with_mysql_libs+set}" = set; then
  1748. withval="$with_mysql_libs"
  1749. :
  1750. fi
  1751. # Check whether --with-sqlite-includes or --without-sqlite-includes was given.
  1752. if test "${with_sqlite_includes+set}" = set; then
  1753. withval="$with_sqlite_includes"
  1754. :
  1755. fi
  1756. # Check whether --with-sqlite-libs or --without-sqlite-libs was given.
  1757. if test "${with_sqlite_libs+set}" = set; then
  1758. withval="$with_sqlite_libs"
  1759. :
  1760. fi
  1761. # Check whether --with-opengl-includes or --without-opengl-includes was given.
  1762. if test "${with_opengl_includes+set}" = set; then
  1763. withval="$with_opengl_includes"
  1764. :
  1765. fi
  1766. # Check whether --with-opengl-libs or --without-opengl-libs was given.
  1767. if test "${with_opengl_libs+set}" = set; then
  1768. withval="$with_opengl_libs"
  1769. :
  1770. fi
  1771. # Check whether --with-opengl-framework or --without-opengl-framework was given.
  1772. if test "${with_opengl_framework+set}" = set; then
  1773. withval="$with_opengl_framework"
  1774. :
  1775. fi
  1776. # Check whether --with-odbc-includes or --without-odbc-includes was given.
  1777. if test "${with_odbc_includes+set}" = set; then
  1778. withval="$with_odbc_includes"
  1779. :
  1780. fi
  1781. # Check whether --with-odbc-libs or --without-odbc-libs was given.
  1782. if test "${with_odbc_libs+set}" = set; then
  1783. withval="$with_odbc_libs"
  1784. :
  1785. fi
  1786. # Check whether --with-fftw-includes or --without-fftw-includes was given.
  1787. if test "${with_fftw_includes+set}" = set; then
  1788. withval="$with_fftw_includes"
  1789. :
  1790. fi
  1791. # Check whether --with-fftw-libs or --without-fftw-libs was given.
  1792. if test "${with_fftw_libs+set}" = set; then
  1793. withval="$with_fftw_libs"
  1794. :
  1795. fi
  1796. # Check whether --with-blas-includes or --without-blas-includes was given.
  1797. if test "${with_blas_includes+set}" = set; then
  1798. withval="$with_blas_includes"
  1799. :
  1800. fi
  1801. # Check whether --with-blas-libs or --without-blas-libs was given.
  1802. if test "${with_blas_libs+set}" = set; then
  1803. withval="$with_blas_libs"
  1804. :
  1805. fi
  1806. # Check whether --with-lapack-includes or --without-lapack-includes was given.
  1807. if test "${with_lapack_includes+set}" = set; then
  1808. withval="$with_lapack_includes"
  1809. :
  1810. fi
  1811. # Check whether --with-lapack-libs or --without-lapack-libs was given.
  1812. if test "${with_lapack_libs+set}" = set; then
  1813. withval="$with_lapack_libs"
  1814. :
  1815. fi
  1816. # Check whether --with-cairo-includes or --without-cairo-includes was given.
  1817. if test "${with_cairo_includes+set}" = set; then
  1818. withval="$with_cairo_includes"
  1819. :
  1820. fi
  1821. # Check whether --with-cairo-libs or --without-cairo-libs was given.
  1822. if test "${with_cairo_libs+set}" = set; then
  1823. withval="$with_cairo_libs"
  1824. :
  1825. fi
  1826. # Check whether --with-cairo-ldflags or --without-cairo-ldflags was given.
  1827. if test "${with_cairo_ldflags+set}" = set; then
  1828. withval="$with_cairo_ldflags"
  1829. :
  1830. fi
  1831. # Check whether --with-freetype-includes or --without-freetype-includes was given.
  1832. if test "${with_freetype_includes+set}" = set; then
  1833. withval="$with_freetype_includes"
  1834. :
  1835. fi
  1836. # Check whether --with-freetype-libs or --without-freetype-libs was given.
  1837. if test "${with_freetype_libs+set}" = set; then
  1838. withval="$with_freetype_libs"
  1839. :
  1840. fi
  1841. # Check whether --with-proj-includes or --without-proj-includes was given.
  1842. if test "${with_proj_includes+set}" = set; then
  1843. withval="$with_proj_includes"
  1844. :
  1845. fi
  1846. # Check whether --with-proj-libs or --without-proj-libs was given.
  1847. if test "${with_proj_libs+set}" = set; then
  1848. withval="$with_proj_libs"
  1849. :
  1850. fi
  1851. # Check whether --with-proj-share or --without-proj-share was given.
  1852. if test "${with_proj_share+set}" = set; then
  1853. withval="$with_proj_share"
  1854. :
  1855. fi
  1856. # Check whether --with-opendwg-includes or --without-opendwg-includes was given.
  1857. if test "${with_opendwg_includes+set}" = set; then
  1858. withval="$with_opendwg_includes"
  1859. :
  1860. fi
  1861. # Check whether --with-opendwg-libs or --without-opendwg-libs was given.
  1862. if test "${with_opendwg_libs+set}" = set; then
  1863. withval="$with_opendwg_libs"
  1864. :
  1865. fi
  1866. # Check whether --with-regex-includes or --without-regex-includes was given.
  1867. if test "${with_regex_includes+set}" = set; then
  1868. withval="$with_regex_includes"
  1869. :
  1870. fi
  1871. # Check whether --with-regex-libs or --without-regex-libs was given.
  1872. if test "${with_regex_libs+set}" = set; then
  1873. withval="$with_regex_libs"
  1874. :
  1875. fi
  1876. # Check whether --with-pthread-includes or --without-pthread-includes was given.
  1877. if test "${with_pthread_includes+set}" = set; then
  1878. withval="$with_pthread_includes"
  1879. :
  1880. fi
  1881. # Check whether --with-pthread-libs or --without-pthread-libs was given.
  1882. if test "${with_pthread_libs+set}" = set; then
  1883. withval="$with_pthread_libs"
  1884. :
  1885. fi
  1886. # Check whether --with-openmp-includes or --without-openmp-includes was given.
  1887. if test "${with_openmp_includes+set}" = set; then
  1888. withval="$with_openmp_includes"
  1889. :
  1890. fi
  1891. # Check whether --with-openmp-libs or --without-openmp-libs was given.
  1892. if test "${with_openmp_libs+set}" = set; then
  1893. withval="$with_openmp_libs"
  1894. :
  1895. fi
  1896. # Check whether --with-opencl-includes or --without-opencl-includes was given.
  1897. if test "${with_opencl_includes+set}" = set; then
  1898. withval="$with_opencl_includes"
  1899. :
  1900. fi
  1901. # Check whether --with-opencl-libs or --without-opencl-libs was given.
  1902. if test "${with_opencl_libs+set}" = set; then
  1903. withval="$with_opencl_libs"
  1904. :
  1905. fi
  1906. #LOC_ARG_WITH_FRAMEWORK(opencl, OpenCL)
  1907. # Put this early on so CPPFLAGS and LDFLAGS have any additional dirs
  1908. # With includes option
  1909. # Handle Fortran compiler choice
  1910. #LOC_CHECK_USE(g77, GNU Fortran 77, USE_G77)
  1911. # Done checking fortran
  1912. echo $ac_n "checking for additional include dirs""... $ac_c" 1>&6
  1913. echo "configure:2405: checking for additional include dirs" >&5
  1914. case "$with_includes" in
  1915. y | ye | yes | n | no)
  1916. { echo "configure: error: *** You must supply a directory to list --with-includes." 1>&2; exit 1; }
  1917. ;;
  1918. esac
  1919. echo "$ac_t""$with_includes" 1>&6
  1920. if test -n "$with_includes"; then
  1921. for dir in $with_includes; do
  1922. if test -d "$dir"; then
  1923. INCLUDE_DIRS="$INCLUDE_DIRS -I$dir"
  1924. else
  1925. { echo "configure: error: *** Include directory $dir does not exist." 1>&2; exit 1; }
  1926. fi
  1927. done
  1928. CPPFLAGS="$CPPFLAGS $INCLUDE_DIRS"
  1929. fi
  1930. # With libs option
  1931. echo $ac_n "checking for additional library dirs""... $ac_c" 1>&6
  1932. echo "configure:2428: checking for additional library dirs" >&5
  1933. case "$with_libs" in
  1934. y | ye | yes | n | no)
  1935. { echo "configure: error: *** You must supply a directory list to --with-libs." 1>&2; exit 1; }
  1936. ;;
  1937. esac
  1938. echo "$ac_t""$with_libs" 1>&6
  1939. if test -n "$with_libs"; then
  1940. for dir in $with_libs; do
  1941. if test -d "$dir"; then
  1942. LIBRARY_DIRS="$LIBRARY_DIRS -L$dir"
  1943. else
  1944. { echo "configure: error: *** Library directory $dir does not exist." 1>&2; exit 1; }
  1945. fi
  1946. done
  1947. LDFLAGS="$LDFLAGS $LIBRARY_DIRS"
  1948. fi
  1949. # Programs and standard headers, libraries, functions
  1950. # Find a good install program. We prefer a C program (faster),
  1951. # so one script is as good as another. But avoid the broken or
  1952. # incompatible versions:
  1953. # SysV /etc/install, /usr/sbin/install
  1954. # SunOS /usr/etc/install
  1955. # IRIX /sbin/install
  1956. # AIX /bin/install
  1957. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  1958. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  1959. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  1960. # ./install, which can be erroneously created by make from ./install.sh.
  1961. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  1962. echo "configure:2462: checking for a BSD compatible install" >&5
  1963. if test -z "$INSTALL"; then
  1964. IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
  1965. for ac_dir in $PATH; do
  1966. # Account for people who put trailing slashes in PATH elements.
  1967. case "$ac_dir/" in
  1968. /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  1969. *)
  1970. # OSF1 and SCO ODT 3.0 have their own names for install.
  1971. # Don't use installbsd from OSF since it installs stuff as root
  1972. # by default.
  1973. for ac_prog in ginstall scoinst install; do
  1974. if test -f $ac_dir/$ac_prog; then
  1975. if test $ac_prog = install &&
  1976. grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1977. # AIX install. It has an incompatible calling convention.
  1978. :
  1979. else
  1980. ac_cv_path_install="$ac_dir/$ac_prog -c"
  1981. break 2
  1982. fi
  1983. fi
  1984. done
  1985. ;;
  1986. esac
  1987. done
  1988. IFS="$ac_save_IFS"
  1989. if test "${ac_cv_path_install+set}" = set; then
  1990. INSTALL="$ac_cv_path_install"
  1991. else
  1992. # As a last resort, use the slow shell script. We don't cache a
  1993. # path for INSTALL within a source directory, because that will
  1994. # break other packages using the cache if that directory is
  1995. # removed, or if the path is relative.
  1996. INSTALL="$ac_install_sh"
  1997. fi
  1998. fi
  1999. echo "$ac_t""$INSTALL" 1>&6
  2000. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  2001. # It thinks the first close brace ends the variable substitution.
  2002. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  2003. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  2004. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  2005. # Extract the first word of "flex", so it can be a program name with args.
  2006. set dummy flex; ac_word=$2
  2007. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2008. echo "configure:2515: checking for $ac_word" >&5
  2009. if test -n "$LEX"; then
  2010. ac_cv_prog_LEX="$LEX" # Let the user override the test.
  2011. else
  2012. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2013. ac_dummy="$PATH"
  2014. for ac_dir in $ac_dummy; do
  2015. test -z "$ac_dir" && ac_dir=.
  2016. if test -f $ac_dir/$ac_word; then
  2017. ac_cv_prog_LEX="flex"
  2018. break
  2019. fi
  2020. done
  2021. IFS="$ac_save_ifs"
  2022. test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
  2023. fi
  2024. LEX="$ac_cv_prog_LEX"
  2025. if test -n "$LEX"; then
  2026. echo "$ac_t""$LEX" 1>&6
  2027. else
  2028. echo "$ac_t""no" 1>&6
  2029. fi
  2030. if test -z "$LEXLIB"
  2031. then
  2032. case "$LEX" in
  2033. flex*) ac_lib=fl ;;
  2034. *) ac_lib=l ;;
  2035. esac
  2036. echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
  2037. echo "configure:2546: checking for yywrap in -l$ac_lib" >&5
  2038. ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
  2039. ac_save_LIBS="$LIBS"
  2040. LIBS="-l$ac_lib $LIBS"
  2041. cat > conftest.$ac_ext <<EOF
  2042. #line 2552 "configure"
  2043. #include "confdefs.h"
  2044. /* Override any gcc2 internal prototype to avoid an error. */
  2045. /* We use char because int might match the return type of a gcc2
  2046. builtin and then its argument prototype would still apply. */
  2047. char yywrap();
  2048. int main() {
  2049. yywrap()
  2050. ; return 0; }
  2051. EOF
  2052. if { (eval echo configure:2563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2053. rm -rf conftest*
  2054. eval "ac_cv_lib_$ac_lib_var=yes"
  2055. else
  2056. echo "configure: failed program was:" >&5
  2057. cat conftest.$ac_ext >&5
  2058. rm -rf conftest*
  2059. eval "ac_cv_lib_$ac_lib_var=no"
  2060. fi
  2061. rm -f conftest*
  2062. LIBS="$ac_save_LIBS"
  2063. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2064. echo "$ac_t""yes" 1>&6
  2065. LEXLIB="-l$ac_lib"
  2066. else
  2067. echo "$ac_t""no" 1>&6
  2068. fi
  2069. fi
  2070. if test "$LEX" = "lex"; then
  2071. # Extract the first word of "lex", so it can be a program name with args.
  2072. set dummy lex; ac_word=$2
  2073. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2074. echo "configure:2588: checking for $ac_word" >&5
  2075. case "$LEXPATH" in
  2076. /*)
  2077. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a path.
  2078. ;;
  2079. ?:/*)
  2080. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a dos path.
  2081. ;;
  2082. *)
  2083. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2084. ac_dummy="$PATH"
  2085. for ac_dir in $ac_dummy; do
  2086. test -z "$ac_dir" && ac_dir=.
  2087. if test -f $ac_dir/$ac_word; then
  2088. ac_cv_path_LEXPATH="$ac_dir/$ac_word"
  2089. break
  2090. fi
  2091. done
  2092. IFS="$ac_save_ifs"
  2093. test -z "$ac_cv_path_LEXPATH" && ac_cv_path_LEXPATH="no"
  2094. ;;
  2095. esac
  2096. LEXPATH="$ac_cv_path_LEXPATH"
  2097. if test -n "$LEXPATH"; then
  2098. echo "$ac_t""$LEXPATH" 1>&6
  2099. else
  2100. echo "$ac_t""no" 1>&6
  2101. fi
  2102. if test "$LEXPATH" = "no"; then
  2103. { echo "configure: error: *** Unable to locate lex." 1>&2; exit 1; }
  2104. fi
  2105. fi
  2106. for ac_prog in 'bison -y' byacc
  2107. do
  2108. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2109. set dummy $ac_prog; ac_word=$2
  2110. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2111. echo "configure:2628: checking for $ac_word" >&5
  2112. if test -n "$YACC"; then
  2113. ac_cv_prog_YACC="$YACC" # Let the user override the test.
  2114. else
  2115. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2116. ac_dummy="$PATH"
  2117. for ac_dir in $ac_dummy; do
  2118. test -z "$ac_dir" && ac_dir=.
  2119. if test -f $ac_dir/$ac_word; then
  2120. ac_cv_prog_YACC="$ac_prog"
  2121. break
  2122. fi
  2123. done
  2124. IFS="$ac_save_ifs"
  2125. fi
  2126. YACC="$ac_cv_prog_YACC"
  2127. if test -n "$YACC"; then
  2128. echo "$ac_t""$YACC" 1>&6
  2129. else
  2130. echo "$ac_t""no" 1>&6
  2131. fi
  2132. test -n "$YACC" && break
  2133. done
  2134. test -n "$YACC" || YACC="yacc"
  2135. if test "$YACC" = "yacc"; then
  2136. # Extract the first word of "yacc", so it can be a program name with args.
  2137. set dummy yacc; ac_word=$2
  2138. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2139. echo "configure:2659: checking for $ac_word" >&5
  2140. case "$YACCPATH" in
  2141. /*)
  2142. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a path.
  2143. ;;
  2144. ?:/*)
  2145. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a dos path.
  2146. ;;
  2147. *)
  2148. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2149. ac_dummy="$PATH"
  2150. for ac_dir in $ac_dummy; do
  2151. test -z "$ac_dir" && ac_dir=.
  2152. if test -f $ac_dir/$ac_word; then
  2153. ac_cv_path_YACCPATH="$ac_dir/$ac_word"
  2154. break
  2155. fi
  2156. done
  2157. IFS="$ac_save_ifs"
  2158. test -z "$ac_cv_path_YACCPATH" && ac_cv_path_YACCPATH="no"
  2159. ;;
  2160. esac
  2161. YACCPATH="$ac_cv_path_YACCPATH"
  2162. if test -n "$YACCPATH"; then
  2163. echo "$ac_t""$YACCPATH" 1>&6
  2164. else
  2165. echo "$ac_t""no" 1>&6
  2166. fi
  2167. if test "$YACCPATH" = "no"; then
  2168. { echo "configure: error: *** Unable to locate yacc." 1>&2; exit 1; }
  2169. fi
  2170. fi
  2171. # Extract the first word of "ranlib", so it can be a program name with args.
  2172. set dummy ranlib; ac_word=$2
  2173. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2174. echo "configure:2697: checking for $ac_word" >&5
  2175. if test -n "$RANLIB"; then
  2176. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  2177. else
  2178. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2179. ac_dummy="$PATH"
  2180. for ac_dir in $ac_dummy; do
  2181. test -z "$ac_dir" && ac_dir=.
  2182. if test -f $ac_dir/$ac_word; then
  2183. ac_cv_prog_RANLIB="ranlib"
  2184. break
  2185. fi
  2186. done
  2187. IFS="$ac_save_ifs"
  2188. test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  2189. fi
  2190. RANLIB="$ac_cv_prog_RANLIB"
  2191. if test -n "$RANLIB"; then
  2192. echo "$ac_t""$RANLIB" 1>&6
  2193. else
  2194. echo "$ac_t""no" 1>&6
  2195. fi
  2196. for ac_prog in ar
  2197. do
  2198. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2199. set dummy $ac_prog; ac_word=$2
  2200. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2201. echo "configure:2726: checking for $ac_word" >&5
  2202. if test -n "$AR"; then
  2203. ac_cv_prog_AR="$AR" # Let the user override the test.
  2204. else
  2205. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2206. ac_dummy="$PATH"
  2207. for ac_dir in $ac_dummy; do
  2208. test -z "$ac_dir" && ac_dir=.
  2209. if test -f $ac_dir/$ac_word; then
  2210. ac_cv_prog_AR="$ac_prog"
  2211. break
  2212. fi
  2213. done
  2214. IFS="$ac_save_ifs"
  2215. fi
  2216. AR="$ac_cv_prog_AR"
  2217. if test -n "$AR"; then
  2218. echo "$ac_t""$AR" 1>&6
  2219. else
  2220. echo "$ac_t""no" 1>&6
  2221. fi
  2222. test -n "$AR" && break
  2223. done
  2224. for ac_prog in env
  2225. do
  2226. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2227. set dummy $ac_prog; ac_word=$2
  2228. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2229. echo "configure:2757: checking for $ac_word" >&5
  2230. if test -n "$ENV"; then
  2231. ac_cv_prog_ENV="$ENV" # Let the user override the test.
  2232. else
  2233. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2234. ac_dummy="$PATH"
  2235. for ac_dir in $ac_dummy; do
  2236. test -z "$ac_dir" && ac_dir=.
  2237. if test -f $ac_dir/$ac_word; then
  2238. ac_cv_prog_ENV="$ac_prog"
  2239. break
  2240. fi
  2241. done
  2242. IFS="$ac_save_ifs"
  2243. fi
  2244. ENV="$ac_cv_prog_ENV"
  2245. if test -n "$ENV"; then
  2246. echo "$ac_t""$ENV" 1>&6
  2247. else
  2248. echo "$ac_t""no" 1>&6
  2249. fi
  2250. test -n "$ENV" && break
  2251. done
  2252. # Extract the first word of "perl", so it can be a program name with args.
  2253. set dummy perl; ac_word=$2
  2254. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2255. echo "configure:2786: checking for $ac_word" >&5
  2256. case "$PERL" in
  2257. /*)
  2258. ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  2259. ;;
  2260. ?:/*)
  2261. ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
  2262. ;;
  2263. *)
  2264. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2265. ac_dummy="$PATH"
  2266. for ac_dir in $ac_dummy; do
  2267. test -z "$ac_dir" && ac_dir=.
  2268. if test -f $ac_dir/$ac_word; then
  2269. ac_cv_path_PERL="$ac_dir/$ac_word"
  2270. break
  2271. fi
  2272. done
  2273. IFS="$ac_save_ifs"
  2274. test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
  2275. ;;
  2276. esac
  2277. PERL="$ac_cv_path_PERL"
  2278. if test -n "$PERL"; then
  2279. echo "$ac_t""$PERL" 1>&6
  2280. else
  2281. echo "$ac_t""no" 1>&6
  2282. fi
  2283. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  2284. echo "configure:2817: checking how to run the C preprocessor" >&5
  2285. # On Suns, sometimes $CPP names a directory.
  2286. if test -n "$CPP" && test -d "$CPP"; then
  2287. CPP=
  2288. fi
  2289. if test -z "$CPP"; then
  2290. # This must be in double quotes, not single quotes, because CPP may get
  2291. # substituted into the Makefile and "${CC-cc}" will confuse make.
  2292. CPP="${CC-cc} -E"
  2293. # On the NeXT, cc -E runs the code through the compiler's parser,
  2294. # not just through cpp.
  2295. cat > conftest.$ac_ext <<EOF
  2296. #line 2830 "configure"
  2297. #include "confdefs.h"
  2298. #include <assert.h>
  2299. Syntax Error
  2300. EOF
  2301. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2302. { (eval echo configure:2836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2303. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2304. if test -z "$ac_err"; then
  2305. :
  2306. else
  2307. echo "$ac_err" >&5
  2308. echo "configure: failed program was:" >&5
  2309. cat conftest.$ac_ext >&5
  2310. rm -rf conftest*
  2311. CPP="${CC-cc} -E -traditional-cpp"
  2312. cat > conftest.$ac_ext <<EOF
  2313. #line 2847 "configure"
  2314. #include "confdefs.h"
  2315. #include <assert.h>
  2316. Syntax Error
  2317. EOF
  2318. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2319. { (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2320. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2321. if test -z "$ac_err"; then
  2322. :
  2323. else
  2324. echo "$ac_err" >&5
  2325. echo "configure: failed program was:" >&5
  2326. cat conftest.$ac_ext >&5
  2327. rm -rf conftest*
  2328. CPP="${CC-cc} -nologo -E"
  2329. cat > conftest.$ac_ext <<EOF
  2330. #line 2864 "configure"
  2331. #include "confdefs.h"
  2332. #include <assert.h>
  2333. Syntax Error
  2334. EOF
  2335. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2336. { (eval echo configure:2870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2337. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2338. if test -z "$ac_err"; then
  2339. :
  2340. else
  2341. echo "$ac_err" >&5
  2342. echo "configure: failed program was:" >&5
  2343. cat conftest.$ac_ext >&5
  2344. rm -rf conftest*
  2345. CPP=/lib/cpp
  2346. fi
  2347. rm -f conftest*
  2348. fi
  2349. rm -f conftest*
  2350. fi
  2351. rm -f conftest*
  2352. ac_cv_prog_CPP="$CPP"
  2353. CPP="$ac_cv_prog_CPP"
  2354. else
  2355. ac_cv_prog_CPP="$CPP"
  2356. fi
  2357. echo "$ac_t""$CPP" 1>&6
  2358. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  2359. echo "configure:2894: checking for ANSI C header files" >&5
  2360. cat > conftest.$ac_ext <<EOF
  2361. #line 2897 "configure"
  2362. #include "confdefs.h"
  2363. #include <stdlib.h>
  2364. #include <stdarg.h>
  2365. #include <string.h>
  2366. #include <float.h>
  2367. EOF
  2368. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2369. { (eval echo configure:2905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2370. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2371. if test -z "$ac_err"; then
  2372. rm -rf conftest*
  2373. ac_cv_header_stdc=yes
  2374. else
  2375. echo "$ac_err" >&5
  2376. echo "configure: failed program was:" >&5
  2377. cat conftest.$ac_ext >&5
  2378. rm -rf conftest*
  2379. ac_cv_header_stdc=no
  2380. fi
  2381. rm -f conftest*
  2382. if test $ac_cv_header_stdc = yes; then
  2383. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  2384. cat > conftest.$ac_ext <<EOF
  2385. #line 2922 "configure"
  2386. #include "confdefs.h"
  2387. #include <string.h>
  2388. EOF
  2389. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2390. egrep "memchr" >/dev/null 2>&1; then
  2391. :
  2392. else
  2393. rm -rf conftest*
  2394. ac_cv_header_stdc=no
  2395. fi
  2396. rm -f conftest*
  2397. fi
  2398. if test $ac_cv_header_stdc = yes; then
  2399. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  2400. cat > conftest.$ac_ext <<EOF
  2401. #line 2940 "configure"
  2402. #include "confdefs.h"
  2403. #include <stdlib.h>
  2404. EOF
  2405. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2406. egrep "free" >/dev/null 2>&1; then
  2407. :
  2408. else
  2409. rm -rf conftest*
  2410. ac_cv_header_stdc=no
  2411. fi
  2412. rm -f conftest*
  2413. fi
  2414. if test $ac_cv_header_stdc = yes; then
  2415. # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  2416. if test "$cross_compiling" = yes; then
  2417. :
  2418. else
  2419. cat > conftest.$ac_ext <<EOF
  2420. #line 2961 "configure"
  2421. #include "confdefs.h"
  2422. #include <ctype.h>
  2423. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  2424. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  2425. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  2426. int main () { int i; for (i = 0; i < 256; i++)
  2427. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  2428. exit (0); }
  2429. EOF
  2430. if { (eval echo configure:2972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2431. then
  2432. :
  2433. else
  2434. echo "configure: failed program was:" >&5
  2435. cat conftest.$ac_ext >&5
  2436. rm -fr conftest*
  2437. ac_cv_header_stdc=no
  2438. fi
  2439. rm -fr conftest*
  2440. fi
  2441. fi
  2442. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  2443. if test $ac_cv_header_stdc = yes; then
  2444. cat >> confdefs.h <<\EOF
  2445. #define STDC_HEADERS 1
  2446. EOF
  2447. fi
  2448. #AC_CHECK_HEADERS(curses.h limits.h termio.h termios.h unistd.h values.h)
  2449. for ac_hdr in limits.h termio.h termios.h unistd.h values.h f2c.h g2c.h
  2450. do
  2451. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2452. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2453. echo "configure:2999: checking for $ac_hdr" >&5
  2454. cat > conftest.$ac_ext <<EOF
  2455. #line 3002 "configure"
  2456. #include "confdefs.h"
  2457. #include <$ac_hdr>
  2458. EOF
  2459. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2460. { (eval echo configure:3007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2461. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2462. if test -z "$ac_err"; then
  2463. rm -rf conftest*
  2464. eval "ac_cv_header_$ac_safe=yes"
  2465. else
  2466. echo "$ac_err" >&5
  2467. echo "configure: failed program was:" >&5
  2468. cat conftest.$ac_ext >&5
  2469. rm -rf conftest*
  2470. eval "ac_cv_header_$ac_safe=no"
  2471. fi
  2472. rm -f conftest*
  2473. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2474. echo "$ac_t""yes" 1>&6
  2475. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2476. cat >> confdefs.h <<EOF
  2477. #define $ac_tr_hdr 1
  2478. EOF
  2479. else
  2480. echo "$ac_t""no" 1>&6
  2481. fi
  2482. done
  2483. for ac_hdr in sys/ioctl.h sys/mtio.h sys/resource.h sys/time.h
  2484. do
  2485. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2486. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2487. echo "configure:3036: checking for $ac_hdr" >&5
  2488. cat > conftest.$ac_ext <<EOF
  2489. #line 3039 "configure"
  2490. #include "confdefs.h"
  2491. #include <$ac_hdr>
  2492. EOF
  2493. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2494. { (eval echo configure:3044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2495. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2496. if test -z "$ac_err"; then
  2497. rm -rf conftest*
  2498. eval "ac_cv_header_$ac_safe=yes"
  2499. else
  2500. echo "$ac_err" >&5
  2501. echo "configure: failed program was:" >&5
  2502. cat conftest.$ac_ext >&5
  2503. rm -rf conftest*
  2504. eval "ac_cv_header_$ac_safe=no"
  2505. fi
  2506. rm -f conftest*
  2507. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2508. echo "$ac_t""yes" 1>&6
  2509. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2510. cat >> confdefs.h <<EOF
  2511. #define $ac_tr_hdr 1
  2512. EOF
  2513. else
  2514. echo "$ac_t""no" 1>&6
  2515. fi
  2516. done
  2517. for ac_hdr in sys/timeb.h sys/types.h sys/utsname.h
  2518. do
  2519. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2520. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2521. echo "configure:3073: checking for $ac_hdr" >&5
  2522. cat > conftest.$ac_ext <<EOF
  2523. #line 3076 "configure"
  2524. #include "confdefs.h"
  2525. #include <$ac_hdr>
  2526. EOF
  2527. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2528. { (eval echo configure:3081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2529. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2530. if test -z "$ac_err"; then
  2531. rm -rf conftest*
  2532. eval "ac_cv_header_$ac_safe=yes"
  2533. else
  2534. echo "$ac_err" >&5
  2535. echo "configure: failed program was:" >&5
  2536. cat conftest.$ac_ext >&5
  2537. rm -rf conftest*
  2538. eval "ac_cv_header_$ac_safe=no"
  2539. fi
  2540. rm -f conftest*
  2541. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2542. echo "$ac_t""yes" 1>&6
  2543. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2544. cat >> confdefs.h <<EOF
  2545. #define $ac_tr_hdr 1
  2546. EOF
  2547. else
  2548. echo "$ac_t""no" 1>&6
  2549. fi
  2550. done
  2551. for ac_hdr in libintl.h iconv.h
  2552. do
  2553. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2554. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2555. echo "configure:3110: checking for $ac_hdr" >&5
  2556. cat > conftest.$ac_ext <<EOF
  2557. #line 3113 "configure"
  2558. #include "confdefs.h"
  2559. #include <$ac_hdr>
  2560. EOF
  2561. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2562. { (eval echo configure:3118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2563. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2564. if test -z "$ac_err"; then
  2565. rm -rf conftest*
  2566. eval "ac_cv_header_$ac_safe=yes"
  2567. else
  2568. echo "$ac_err" >&5
  2569. echo "configure: failed program was:" >&5
  2570. cat conftest.$ac_ext >&5
  2571. rm -rf conftest*
  2572. eval "ac_cv_header_$ac_safe=no"
  2573. fi
  2574. rm -f conftest*
  2575. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2576. echo "$ac_t""yes" 1>&6
  2577. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2578. cat >> confdefs.h <<EOF
  2579. #define $ac_tr_hdr 1
  2580. EOF
  2581. else
  2582. echo "$ac_t""no" 1>&6
  2583. fi
  2584. done
  2585. for ac_hdr in langinfo.h
  2586. do
  2587. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2588. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2589. echo "configure:3147: checking for $ac_hdr" >&5
  2590. cat > conftest.$ac_ext <<EOF
  2591. #line 3150 "configure"
  2592. #include "confdefs.h"
  2593. #include <$ac_hdr>
  2594. EOF
  2595. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2596. { (eval echo configure:3155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2597. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2598. if test -z "$ac_err"; then
  2599. rm -rf conftest*
  2600. eval "ac_cv_header_$ac_safe=yes"
  2601. else
  2602. echo "$ac_err" >&5
  2603. echo "configure: failed program was:" >&5
  2604. cat conftest.$ac_ext >&5
  2605. rm -rf conftest*
  2606. eval "ac_cv_header_$ac_safe=no"
  2607. fi
  2608. rm -f conftest*
  2609. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2610. echo "$ac_t""yes" 1>&6
  2611. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2612. cat >> confdefs.h <<EOF
  2613. #define $ac_tr_hdr 1
  2614. EOF
  2615. else
  2616. echo "$ac_t""no" 1>&6
  2617. fi
  2618. done
  2619. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  2620. echo "configure:3181: checking whether time.h and sys/time.h may both be included" >&5
  2621. cat > conftest.$ac_ext <<EOF
  2622. #line 3184 "configure"
  2623. #include "confdefs.h"
  2624. #include <sys/types.h>
  2625. #include <sys/time.h>
  2626. #include <time.h>
  2627. int main() {
  2628. struct tm *tp;
  2629. ; return 0; }
  2630. EOF
  2631. if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2632. rm -rf conftest*
  2633. ac_cv_header_time=yes
  2634. else
  2635. echo "configure: failed program was:" >&5
  2636. cat conftest.$ac_ext >&5
  2637. rm -rf conftest*
  2638. ac_cv_header_time=no
  2639. fi
  2640. rm -f conftest*
  2641. echo "$ac_t""$ac_cv_header_time" 1>&6
  2642. if test $ac_cv_header_time = yes; then
  2643. cat >> confdefs.h <<\EOF
  2644. #define TIME_WITH_SYS_TIME 1
  2645. EOF
  2646. fi
  2647. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  2648. echo "configure:3213: checking for off_t" >&5
  2649. cat > conftest.$ac_ext <<EOF
  2650. #line 3216 "configure"
  2651. #include "confdefs.h"
  2652. #include <sys/types.h>
  2653. #if STDC_HEADERS
  2654. #include <stdlib.h>
  2655. #include <stddef.h>
  2656. #endif
  2657. EOF
  2658. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2659. egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2660. rm -rf conftest*
  2661. ac_cv_type_off_t=yes
  2662. else
  2663. rm -rf conftest*
  2664. ac_cv_type_off_t=no
  2665. fi
  2666. rm -f conftest*
  2667. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  2668. if test $ac_cv_type_off_t = no; then
  2669. cat >> confdefs.h <<\EOF
  2670. #define off_t long
  2671. EOF
  2672. fi
  2673. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  2674. echo "configure:3243: checking for uid_t in sys/types.h" >&5
  2675. cat > conftest.$ac_ext <<EOF
  2676. #line 3246 "configure"
  2677. #include "confdefs.h"
  2678. #include <sys/types.h>
  2679. EOF
  2680. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2681. egrep "uid_t" >/dev/null 2>&1; then
  2682. rm -rf conftest*
  2683. ac_cv_type_uid_t=yes
  2684. else
  2685. rm -rf conftest*
  2686. ac_cv_type_uid_t=no
  2687. fi
  2688. rm -f conftest*
  2689. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  2690. if test $ac_cv_type_uid_t = no; then
  2691. cat >> confdefs.h <<\EOF
  2692. #define uid_t int
  2693. EOF
  2694. cat >> confdefs.h <<\EOF
  2695. #define gid_t int
  2696. EOF
  2697. fi
  2698. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  2699. echo "configure:3274: checking return type of signal handlers" >&5
  2700. cat > conftest.$ac_ext <<EOF
  2701. #line 3277 "configure"
  2702. #include "confdefs.h"
  2703. #include <sys/types.h>
  2704. #include <signal.h>
  2705. #ifdef signal
  2706. #undef signal
  2707. #endif
  2708. #ifdef __cplusplus
  2709. extern "C" void (*signal (int, void (*)(int)))(int);
  2710. #else
  2711. void (*signal ()) ();
  2712. #endif
  2713. int main() {
  2714. int i;
  2715. ; return 0; }
  2716. EOF
  2717. if { (eval echo configure:3294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2718. rm -rf conftest*
  2719. ac_cv_type_signal=void
  2720. else
  2721. echo "configure: failed program was:" >&5
  2722. cat conftest.$ac_ext >&5
  2723. rm -rf conftest*
  2724. ac_cv_type_signal=int
  2725. fi
  2726. rm -f conftest*
  2727. echo "$ac_t""$ac_cv_type_signal" 1>&6
  2728. cat >> confdefs.h <<EOF
  2729. #define RETSIGTYPE $ac_cv_type_signal
  2730. EOF
  2731. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  2732. echo "configure:3312: checking for Cygwin environment" >&5
  2733. cat > conftest.$ac_ext <<EOF
  2734. #line 3315 "configure"
  2735. #include "confdefs.h"
  2736. int main() {
  2737. #ifndef __CYGWIN__
  2738. #define __CYGWIN__ __CYGWIN32__
  2739. #endif
  2740. return __CYGWIN__;
  2741. ; return 0; }
  2742. EOF
  2743. if { (eval echo configure:3326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2744. rm -rf conftest*
  2745. ac_cv_cygwin=yes
  2746. else
  2747. echo "configure: failed program was:" >&5
  2748. cat conftest.$ac_ext >&5
  2749. rm -rf conftest*
  2750. ac_cv_cygwin=no
  2751. fi
  2752. rm -f conftest*
  2753. rm -f conftest*
  2754. echo "$ac_t""$ac_cv_cygwin" 1>&6
  2755. CYGWIN=
  2756. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  2757. for ac_func in ftime gethostname gettimeofday lseek nice time uname
  2758. do
  2759. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2760. echo "configure:3344: checking for $ac_func" >&5
  2761. cat > conftest.$ac_ext <<EOF
  2762. #line 3347 "configure"
  2763. #include "confdefs.h"
  2764. /* System header to define __stub macros and hopefully few prototypes,
  2765. which can conflict with char $ac_func(); below. */
  2766. #include <assert.h>
  2767. /* Override any gcc2 internal prototype to avoid an error. */
  2768. /* We use char because int might match the return type of a gcc2
  2769. builtin and then its argument prototype would still apply. */
  2770. char $ac_func();
  2771. int main() {
  2772. /* The GNU C library defines this for functions which it implements
  2773. to always fail with ENOSYS. Some functions are actually named
  2774. something starting with __ and the normal name is an alias. */
  2775. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2776. choke me
  2777. #else
  2778. $ac_func();
  2779. #endif
  2780. ; return 0; }
  2781. EOF
  2782. if { (eval echo configure:3370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2783. rm -rf conftest*
  2784. eval "ac_cv_func_$ac_func=yes"
  2785. else
  2786. echo "configure: failed program was:" >&5
  2787. cat conftest.$ac_ext >&5
  2788. rm -rf conftest*
  2789. eval "ac_cv_func_$ac_func=no"
  2790. fi
  2791. rm -f conftest*
  2792. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2793. echo "$ac_t""yes" 1>&6
  2794. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2795. cat >> confdefs.h <<EOF
  2796. #define $ac_tr_func 1
  2797. EOF
  2798. else
  2799. echo "$ac_t""no" 1>&6
  2800. fi
  2801. done
  2802. for ac_func in seteuid setpriority setreuid setruid
  2803. do
  2804. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2805. echo "configure:3396: checking for $ac_func" >&5
  2806. cat > conftest.$ac_ext <<EOF
  2807. #line 3399 "configure"
  2808. #include "confdefs.h"
  2809. /* System header to define __stub macros and hopefully few prototypes,
  2810. which can conflict with char $ac_func(); below. */
  2811. #include <assert.h>
  2812. /* Override any gcc2 internal prototype to avoid an error. */
  2813. /* We use char because int might match the return type of a gcc2
  2814. builtin and then its argument prototype would still apply. */
  2815. char $ac_func();
  2816. int main() {
  2817. /* The GNU C library defines this for functions which it implements
  2818. to always fail with ENOSYS. Some functions are actually named
  2819. something starting with __ and the normal name is an alias. */
  2820. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2821. choke me
  2822. #else
  2823. $ac_func();
  2824. #endif
  2825. ; return 0; }
  2826. EOF
  2827. if { (eval echo configure:3422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2828. rm -rf conftest*
  2829. eval "ac_cv_func_$ac_func=yes"
  2830. else
  2831. echo "configure: failed program was:" >&5
  2832. cat conftest.$ac_ext >&5
  2833. rm -rf conftest*
  2834. eval "ac_cv_func_$ac_func=no"
  2835. fi
  2836. rm -f conftest*
  2837. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2838. echo "$ac_t""yes" 1>&6
  2839. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2840. cat >> confdefs.h <<EOF
  2841. #define $ac_tr_func 1
  2842. EOF
  2843. else
  2844. echo "$ac_t""no" 1>&6
  2845. fi
  2846. done
  2847. for ac_func in drand48
  2848. do
  2849. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2850. echo "configure:3448: checking for $ac_func" >&5
  2851. cat > conftest.$ac_ext <<EOF
  2852. #line 3451 "configure"
  2853. #include "confdefs.h"
  2854. /* System header to define __stub macros and hopefully few prototypes,
  2855. which can conflict with char $ac_func(); below. */
  2856. #include <assert.h>
  2857. /* Override any gcc2 internal prototype to avoid an error. */
  2858. /* We use char because int might match the return type of a gcc2
  2859. builtin and then its argument prototype would still apply. */
  2860. char $ac_func();
  2861. int main() {
  2862. /* The GNU C library defines this for functions which it implements
  2863. to always fail with ENOSYS. Some functions are actually named
  2864. something starting with __ and the normal name is an alias. */
  2865. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2866. choke me
  2867. #else
  2868. $ac_func();
  2869. #endif
  2870. ; return 0; }
  2871. EOF
  2872. if { (eval echo configure:3474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2873. rm -rf conftest*
  2874. eval "ac_cv_func_$ac_func=yes"
  2875. else
  2876. echo "configure: failed program was:" >&5
  2877. cat conftest.$ac_ext >&5
  2878. rm -rf conftest*
  2879. eval "ac_cv_func_$ac_func=no"
  2880. fi
  2881. rm -f conftest*
  2882. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2883. echo "$ac_t""yes" 1>&6
  2884. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2885. cat >> confdefs.h <<EOF
  2886. #define $ac_tr_func 1
  2887. EOF
  2888. else
  2889. echo "$ac_t""no" 1>&6
  2890. fi
  2891. done
  2892. for ac_func in putenv setenv
  2893. do
  2894. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2895. echo "configure:3500: checking for $ac_func" >&5
  2896. cat > conftest.$ac_ext <<EOF
  2897. #line 3503 "configure"
  2898. #include "confdefs.h"
  2899. /* System header to define __stub macros and hopefully few prototypes,
  2900. which can conflict with char $ac_func(); below. */
  2901. #include <assert.h>
  2902. /* Override any gcc2 internal prototype to avoid an error. */
  2903. /* We use char because int might match the return type of a gcc2
  2904. builtin and then its argument prototype would still apply. */
  2905. char $ac_func();
  2906. int main() {
  2907. /* The GNU C library defines this for functions which it implements
  2908. to always fail with ENOSYS. Some functions are actually named
  2909. something starting with __ and the normal name is an alias. */
  2910. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2911. choke me
  2912. #else
  2913. $ac_func();
  2914. #endif
  2915. ; return 0; }
  2916. EOF
  2917. if { (eval echo configure:3526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2918. rm -rf conftest*
  2919. eval "ac_cv_func_$ac_func=yes"
  2920. else
  2921. echo "configure: failed program was:" >&5
  2922. cat conftest.$ac_ext >&5
  2923. rm -rf conftest*
  2924. eval "ac_cv_func_$ac_func=no"
  2925. fi
  2926. rm -f conftest*
  2927. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2928. echo "$ac_t""yes" 1>&6
  2929. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2930. cat >> confdefs.h <<EOF
  2931. #define $ac_tr_func 1
  2932. EOF
  2933. else
  2934. echo "$ac_t""no" 1>&6
  2935. fi
  2936. done
  2937. for ac_func in nanosleep
  2938. do
  2939. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2940. echo "configure:3552: checking for $ac_func" >&5
  2941. cat > conftest.$ac_ext <<EOF
  2942. #line 3555 "configure"
  2943. #include "confdefs.h"
  2944. /* System header to define __stub macros and hopefully few prototypes,
  2945. which can conflict with char $ac_func(); below. */
  2946. #include <assert.h>
  2947. /* Override any gcc2 internal prototype to avoid an error. */
  2948. /* We use char because int might match the return type of a gcc2
  2949. builtin and then its argument prototype would still apply. */
  2950. char $ac_func();
  2951. int main() {
  2952. /* The GNU C library defines this for functions which it implements
  2953. to always fail with ENOSYS. Some functions are actually named
  2954. something starting with __ and the normal name is an alias. */
  2955. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2956. choke me
  2957. #else
  2958. $ac_func();
  2959. #endif
  2960. ; return 0; }
  2961. EOF
  2962. if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2963. rm -rf conftest*
  2964. eval "ac_cv_func_$ac_func=yes"
  2965. else
  2966. echo "configure: failed program was:" >&5
  2967. cat conftest.$ac_ext >&5
  2968. rm -rf conftest*
  2969. eval "ac_cv_func_$ac_func=no"
  2970. fi
  2971. rm -f conftest*
  2972. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2973. echo "$ac_t""yes" 1>&6
  2974. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2975. cat >> confdefs.h <<EOF
  2976. #define $ac_tr_func 1
  2977. EOF
  2978. else
  2979. echo "$ac_t""no" 1>&6
  2980. fi
  2981. done
  2982. if test "$cross_compiling" != "yes" ; then
  2983. echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
  2984. echo "configure:3603: checking whether setpgrp takes no argument" >&5
  2985. if test "$cross_compiling" = yes; then
  2986. { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
  2987. else
  2988. cat > conftest.$ac_ext <<EOF
  2989. #line 3609 "configure"
  2990. #include "confdefs.h"
  2991. #ifdef HAVE_UNISTD_H
  2992. #include <unistd.h>
  2993. #endif
  2994. /*
  2995. * If this system has a BSD-style setpgrp, which takes arguments, exit
  2996. * successfully.
  2997. */
  2998. main()
  2999. {
  3000. if (setpgrp(1,1) == -1)
  3001. exit(0);
  3002. else
  3003. exit(1);
  3004. }
  3005. EOF
  3006. if { (eval echo configure:3629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  3007. then
  3008. ac_cv_func_setpgrp_void=no
  3009. else
  3010. echo "configure: failed program was:" >&5
  3011. cat conftest.$ac_ext >&5
  3012. rm -fr conftest*
  3013. ac_cv_func_setpgrp_void=yes
  3014. fi
  3015. rm -fr conftest*
  3016. fi
  3017. echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
  3018. if test $ac_cv_func_setpgrp_void = yes; then
  3019. cat >> confdefs.h <<\EOF
  3020. #define SETPGRP_VOID 1
  3021. EOF
  3022. fi
  3023. else
  3024. CROSS_COMPILING=1
  3025. fi
  3026. echo $ac_n "checking for long long int""... $ac_c" 1>&6
  3027. echo "configure:3657: checking for long long int" >&5
  3028. cat > conftest.$ac_ext <<EOF
  3029. #line 3659 "configure"
  3030. #include "confdefs.h"
  3031. int main() {
  3032. long long int x;
  3033. ; return 0; }
  3034. EOF
  3035. if { (eval echo configure:3666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3036. rm -rf conftest*
  3037. echo "$ac_t""yes" 1>&6
  3038. cat >> confdefs.h <<\EOF
  3039. #define HAVE_LONG_LONG_INT 1
  3040. EOF
  3041. else
  3042. echo "configure: failed program was:" >&5
  3043. cat conftest.$ac_ext >&5
  3044. rm -rf conftest*
  3045. echo "$ac_t""no" 1>&6
  3046. fi
  3047. rm -f conftest*
  3048. echo $ac_n "checking for int64_t""... $ac_c" 1>&6
  3049. echo "configure:3686: checking for int64_t" >&5
  3050. cat > conftest.$ac_ext <<EOF
  3051. #line 3688 "configure"
  3052. #include "confdefs.h"
  3053. #include <sys/types.h>
  3054. int main() {
  3055. int64_t x;
  3056. ; return 0; }
  3057. EOF
  3058. if { (eval echo configure:3695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3059. rm -rf conftest*
  3060. echo "$ac_t""yes" 1>&6
  3061. cat >> confdefs.h <<\EOF
  3062. #define HAVE_INT64_T 1
  3063. EOF
  3064. else
  3065. echo "configure: failed program was:" >&5
  3066. cat conftest.$ac_ext >&5
  3067. rm -rf conftest*
  3068. echo "$ac_t""no" 1>&6
  3069. fi
  3070. rm -f conftest*
  3071. echo $ac_n "checking for W11""... $ac_c" 1>&6
  3072. echo "configure:3715: checking for W11" >&5
  3073. case "$enable_w11" in
  3074. yes|no) echo "$ac_t"""$enable_w11"" 1>&6 ;;
  3075. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  3076. esac
  3077. USE_X11=
  3078. USE_W11=
  3079. XLIB=
  3080. XTLIB=
  3081. if test "$enable_w11" = "yes" ; then
  3082. X_CFLAGS=-I${SRCDIR}/display/drivers/windows/libW11
  3083. X_LIBS='-L$(LIBDIR)'
  3084. USE_W11="1"
  3085. USE_X11="1"
  3086. XLIB=-lX11
  3087. CFLAGS="$CFLAGS -D__W98__"
  3088. else
  3089. # If we find X, set shell vars x_includes and x_libraries to the
  3090. # paths, otherwise set no_x=yes.
  3091. # Uses ac_ vars as temps to allow command line to override cache and checks.
  3092. # --without-x overrides everything else, but does not touch the cache.
  3093. echo $ac_n "checking for X""... $ac_c" 1>&6
  3094. echo "configure:3743: checking for X" >&5
  3095. # Check whether --with-x or --without-x was given.
  3096. if test "${with_x+set}" = set; then
  3097. withval="$with_x"
  3098. :
  3099. fi
  3100. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  3101. if test "x$with_x" = xno; then
  3102. # The user explicitly disabled X.
  3103. have_x=disabled
  3104. else
  3105. if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  3106. # Both variables are already set.
  3107. have_x=yes
  3108. else
  3109. # One or both of the vars are not set, and there is no cached value.
  3110. ac_x_includes=NO ac_x_libraries=NO
  3111. rm -fr conftestdir
  3112. if mkdir conftestdir; then
  3113. cd conftestdir
  3114. # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  3115. cat > Imakefile <<'EOF'
  3116. acfindx:
  3117. @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  3118. EOF
  3119. if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  3120. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  3121. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  3122. # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  3123. for ac_extension in a so sl; do
  3124. if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  3125. test -f $ac_im_libdir/libX11.$ac_extension; then
  3126. ac_im_usrlibdir=$ac_im_libdir; break
  3127. fi
  3128. done
  3129. # Screen out bogus values from the imake configuration. They are
  3130. # bogus both because they are the default anyway, and because
  3131. # using them would break gcc on systems where it needs fixed includes.
  3132. case "$ac_im_incroot" in
  3133. /usr/include) ;;
  3134. *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  3135. esac
  3136. case "$ac_im_usrlibdir" in
  3137. /usr/lib | /lib) ;;
  3138. *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  3139. esac
  3140. fi
  3141. cd ..
  3142. rm -fr conftestdir
  3143. fi
  3144. if test "$ac_x_includes" = NO; then
  3145. # Guess where to find include files, by looking for this one X11 .h file.
  3146. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  3147. # First, try using that file with no special directory specified.
  3148. cat > conftest.$ac_ext <<EOF
  3149. #line 3803 "configure"
  3150. #include "confdefs.h"
  3151. #include <$x_direct_test_include>
  3152. EOF
  3153. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3154. { (eval echo configure:3808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3155. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3156. if test -z "$ac_err"; then
  3157. rm -rf conftest*
  3158. # We can compile using X headers with no special include directory.
  3159. ac_x_includes=
  3160. else
  3161. echo "$ac_err" >&5
  3162. echo "configure: failed program was:" >&5
  3163. cat conftest.$ac_ext >&5
  3164. rm -rf conftest*
  3165. # Look for the header file in a standard set of common directories.
  3166. # Check X11 before X11Rn because it is often a symlink to the current release.
  3167. for ac_dir in \
  3168. /usr/X11/include \
  3169. /usr/X11R6/include \
  3170. /usr/X11R5/include \
  3171. /usr/X11R4/include \
  3172. \
  3173. /usr/include/X11 \
  3174. /usr/include/X11R6 \
  3175. /usr/include/X11R5 \
  3176. /usr/include/X11R4 \
  3177. \
  3178. /usr/local/X11/include \
  3179. /usr/local/X11R6/include \
  3180. /usr/local/X11R5/include \
  3181. /usr/local/X11R4/include \
  3182. \
  3183. /usr/local/include/X11 \
  3184. /usr/local/include/X11R6 \
  3185. /usr/local/include/X11R5 \
  3186. /usr/local/include/X11R4 \
  3187. \
  3188. /usr/X386/include \
  3189. /usr/x386/include \
  3190. /usr/XFree86/include/X11 \
  3191. \
  3192. /usr/include \
  3193. /usr/local/include \
  3194. /usr/unsupported/include \
  3195. /usr/athena/include \
  3196. /usr/local/x11r5/include \
  3197. /usr/lpp/Xamples/include \
  3198. \
  3199. /usr/openwin/include \
  3200. /usr/openwin/share/include \
  3201. ; \
  3202. do
  3203. if test -r "$ac_dir/$x_direct_test_include"; then
  3204. ac_x_includes=$ac_dir
  3205. break
  3206. fi
  3207. done
  3208. fi
  3209. rm -f conftest*
  3210. fi # $ac_x_includes = NO
  3211. if test "$ac_x_libraries" = NO; then
  3212. # Check for the libraries.
  3213. test -z "$x_direct_test_library" && x_direct_test_library=Xt
  3214. test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  3215. # See if we find them without any special options.
  3216. # Don't add to $LIBS permanently.
  3217. ac_save_LIBS="$LIBS"
  3218. LIBS="-l$x_direct_test_library $LIBS"
  3219. cat > conftest.$ac_ext <<EOF
  3220. #line 3877 "configure"
  3221. #include "confdefs.h"
  3222. int main() {
  3223. ${x_direct_test_function}()
  3224. ; return 0; }
  3225. EOF
  3226. if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3227. rm -rf conftest*
  3228. LIBS="$ac_save_LIBS"
  3229. # We can link X programs with no special library path.
  3230. ac_x_libraries=
  3231. else
  3232. echo "configure: failed program was:" >&5
  3233. cat conftest.$ac_ext >&5
  3234. rm -rf conftest*
  3235. LIBS="$ac_save_LIBS"
  3236. # First see if replacing the include by lib works.
  3237. # Check X11 before X11Rn because it is often a symlink to the current release.
  3238. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  3239. /usr/X11/lib \
  3240. /usr/X11R6/lib \
  3241. /usr/X11R5/lib \
  3242. /usr/X11R4/lib \
  3243. \
  3244. /usr/lib/X11 \
  3245. /usr/lib/X11R6 \
  3246. /usr/lib/X11R5 \
  3247. /usr/lib/X11R4 \
  3248. \
  3249. /usr/local/X11/lib \
  3250. /usr/local/X11R6/lib \
  3251. /usr/local/X11R5/lib \
  3252. /usr/local/X11R4/lib \
  3253. \
  3254. /usr/local/lib/X11 \
  3255. /usr/local/lib/X11R6 \
  3256. /usr/local/lib/X11R5 \
  3257. /usr/local/lib/X11R4 \
  3258. \
  3259. /usr/X386/lib \
  3260. /usr/x386/lib \
  3261. /usr/XFree86/lib/X11 \
  3262. \
  3263. /usr/lib \
  3264. /usr/local/lib \
  3265. /usr/unsupported/lib \
  3266. /usr/athena/lib \
  3267. /usr/local/x11r5/lib \
  3268. /usr/lpp/Xamples/lib \
  3269. /lib/usr/lib/X11 \
  3270. \
  3271. /usr/openwin/lib \
  3272. /usr/openwin/share/lib \
  3273. ; \
  3274. do
  3275. for ac_extension in a so sl; do
  3276. if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  3277. ac_x_libraries=$ac_dir
  3278. break 2
  3279. fi
  3280. done
  3281. done
  3282. fi
  3283. rm -f conftest*
  3284. fi # $ac_x_libraries = NO
  3285. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  3286. # Didn't find X anywhere. Cache the known absence of X.
  3287. ac_cv_have_x="have_x=no"
  3288. else
  3289. # Record where we found X for the cache.
  3290. ac_cv_have_x="have_x=yes \
  3291. ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  3292. fi
  3293. fi
  3294. eval "$ac_cv_have_x"
  3295. fi # $with_x != no
  3296. if test "$have_x" != yes; then
  3297. echo "$ac_t""$have_x" 1>&6
  3298. no_x=yes
  3299. else
  3300. # If each of the values was on the command line, it overrides each guess.
  3301. test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  3302. test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  3303. # Update the cache value to reflect the command line values.
  3304. ac_cv_have_x="have_x=yes \
  3305. ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  3306. echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  3307. fi
  3308. if test "$no_x" = yes; then
  3309. # Not all programs may use this symbol, but it does not hurt to define it.
  3310. cat >> confdefs.h <<\EOF
  3311. #define X_DISPLAY_MISSING 1
  3312. EOF
  3313. X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  3314. else
  3315. if test -n "$x_includes"; then
  3316. X_CFLAGS="$X_CFLAGS -I$x_includes"
  3317. fi
  3318. # It would also be nice to do this for all -L options, not just this one.
  3319. if test -n "$x_libraries"; then
  3320. X_LIBS="$X_LIBS -L$x_libraries"
  3321. # For Solaris; some versions of Sun CC require a space after -R and
  3322. # others require no space. Words are not sufficient . . . .
  3323. case "`(uname -sr) 2>/dev/null`" in
  3324. "SunOS 5"*)
  3325. echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  3326. echo "configure:3989: checking whether -R must be followed by a space" >&5
  3327. ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  3328. cat > conftest.$ac_ext <<EOF
  3329. #line 3992 "configure"
  3330. #include "confdefs.h"
  3331. int main() {
  3332. ; return 0; }
  3333. EOF
  3334. if { (eval echo configure:3999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3335. rm -rf conftest*
  3336. ac_R_nospace=yes
  3337. else
  3338. echo "configure: failed program was:" >&5
  3339. cat conftest.$ac_ext >&5
  3340. rm -rf conftest*
  3341. ac_R_nospace=no
  3342. fi
  3343. rm -f conftest*
  3344. if test $ac_R_nospace = yes; then
  3345. echo "$ac_t""no" 1>&6
  3346. X_LIBS="$X_LIBS -R$x_libraries"
  3347. else
  3348. LIBS="$ac_xsave_LIBS -R $x_libraries"
  3349. cat > conftest.$ac_ext <<EOF
  3350. #line 4015 "configure"
  3351. #include "confdefs.h"
  3352. int main() {
  3353. ; return 0; }
  3354. EOF
  3355. if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3356. rm -rf conftest*
  3357. ac_R_space=yes
  3358. else
  3359. echo "configure: failed program was:" >&5
  3360. cat conftest.$ac_ext >&5
  3361. rm -rf conftest*
  3362. ac_R_space=no
  3363. fi
  3364. rm -f conftest*
  3365. if test $ac_R_space = yes; then
  3366. echo "$ac_t""yes" 1>&6
  3367. X_LIBS="$X_LIBS -R $x_libraries"
  3368. else
  3369. echo "$ac_t""neither works" 1>&6
  3370. fi
  3371. fi
  3372. LIBS="$ac_xsave_LIBS"
  3373. esac
  3374. fi
  3375. # Check for system-dependent libraries X programs must link with.
  3376. # Do this before checking for the system-independent R6 libraries
  3377. # (-lICE), since we may need -lsocket or whatever for X linking.
  3378. if test "$ISC" = yes; then
  3379. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  3380. else
  3381. # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  3382. # libraries were built with DECnet support. And karl@cs.umb.edu says
  3383. # the Alpha needs dnet_stub (dnet does not exist).
  3384. echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  3385. echo "configure:4054: checking for dnet_ntoa in -ldnet" >&5
  3386. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3387. ac_save_LIBS="$LIBS"
  3388. LIBS="-ldnet $LIBS"
  3389. cat > conftest.$ac_ext <<EOF
  3390. #line 4060 "configure"
  3391. #include "confdefs.h"
  3392. /* Override any gcc2 internal prototype to avoid an error. */
  3393. /* We use char because int might match the return type of a gcc2
  3394. builtin and then its argument prototype would still apply. */
  3395. char dnet_ntoa();
  3396. int main() {
  3397. dnet_ntoa()
  3398. ; return 0; }
  3399. EOF
  3400. if { (eval echo configure:4071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3401. rm -rf conftest*
  3402. eval "ac_cv_lib_$ac_lib_var=yes"
  3403. else
  3404. echo "configure: failed program was:" >&5
  3405. cat conftest.$ac_ext >&5
  3406. rm -rf conftest*
  3407. eval "ac_cv_lib_$ac_lib_var=no"
  3408. fi
  3409. rm -f conftest*
  3410. LIBS="$ac_save_LIBS"
  3411. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3412. echo "$ac_t""yes" 1>&6
  3413. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  3414. else
  3415. echo "$ac_t""no" 1>&6
  3416. fi
  3417. if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  3418. echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  3419. echo "configure:4092: checking for dnet_ntoa in -ldnet_stub" >&5
  3420. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3421. ac_save_LIBS="$LIBS"
  3422. LIBS="-ldnet_stub $LIBS"
  3423. cat > conftest.$ac_ext <<EOF
  3424. #line 4098 "configure"
  3425. #include "confdefs.h"
  3426. /* Override any gcc2 internal prototype to avoid an error. */
  3427. /* We use char because int might match the return type of a gcc2
  3428. builtin and then its argument prototype would still apply. */
  3429. char dnet_ntoa();
  3430. int main() {
  3431. dnet_ntoa()
  3432. ; return 0; }
  3433. EOF
  3434. if { (eval echo configure:4109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3435. rm -rf conftest*
  3436. eval "ac_cv_lib_$ac_lib_var=yes"
  3437. else
  3438. echo "configure: failed program was:" >&5
  3439. cat conftest.$ac_ext >&5
  3440. rm -rf conftest*
  3441. eval "ac_cv_lib_$ac_lib_var=no"
  3442. fi
  3443. rm -f conftest*
  3444. LIBS="$ac_save_LIBS"
  3445. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3446. echo "$ac_t""yes" 1>&6
  3447. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  3448. else
  3449. echo "$ac_t""no" 1>&6
  3450. fi
  3451. fi
  3452. # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  3453. # to get the SysV transport functions.
  3454. # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  3455. # needs -lnsl.
  3456. # The nsl library prevents programs from opening the X display
  3457. # on Irix 5.2, according to dickey@clark.net.
  3458. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  3459. echo "configure:4137: checking for gethostbyname" >&5
  3460. cat > conftest.$ac_ext <<EOF
  3461. #line 4140 "configure"
  3462. #include "confdefs.h"
  3463. /* System header to define __stub macros and hopefully few prototypes,
  3464. which can conflict with char gethostbyname(); below. */
  3465. #include <assert.h>
  3466. /* Override any gcc2 internal prototype to avoid an error. */
  3467. /* We use char because int might match the return type of a gcc2
  3468. builtin and then its argument prototype would still apply. */
  3469. char gethostbyname();
  3470. int main() {
  3471. /* The GNU C library defines this for functions which it implements
  3472. to always fail with ENOSYS. Some functions are actually named
  3473. something starting with __ and the normal name is an alias. */
  3474. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  3475. choke me
  3476. #else
  3477. gethostbyname();
  3478. #endif
  3479. ; return 0; }
  3480. EOF
  3481. if { (eval echo configure:4163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3482. rm -rf conftest*
  3483. eval "ac_cv_func_gethostbyname=yes"
  3484. else
  3485. echo "configure: failed program was:" >&5
  3486. cat conftest.$ac_ext >&5
  3487. rm -rf conftest*
  3488. eval "ac_cv_func_gethostbyname=no"
  3489. fi
  3490. rm -f conftest*
  3491. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  3492. echo "$ac_t""yes" 1>&6
  3493. :
  3494. else
  3495. echo "$ac_t""no" 1>&6
  3496. fi
  3497. if test $ac_cv_func_gethostbyname = no; then
  3498. echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  3499. echo "configure:4183: checking for gethostbyname in -lnsl" >&5
  3500. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  3501. ac_save_LIBS="$LIBS"
  3502. LIBS="-lnsl $LIBS"
  3503. cat > conftest.$ac_ext <<EOF
  3504. #line 4189 "configure"
  3505. #include "confdefs.h"
  3506. /* Override any gcc2 internal prototype to avoid an error. */
  3507. /* We use char because int might match the return type of a gcc2
  3508. builtin and then its argument prototype would still apply. */
  3509. char gethostbyname();
  3510. int main() {
  3511. gethostbyname()
  3512. ; return 0; }
  3513. EOF
  3514. if { (eval echo configure:4200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3515. rm -rf conftest*
  3516. eval "ac_cv_lib_$ac_lib_var=yes"
  3517. else
  3518. echo "configure: failed program was:" >&5
  3519. cat conftest.$ac_ext >&5
  3520. rm -rf conftest*
  3521. eval "ac_cv_lib_$ac_lib_var=no"
  3522. fi
  3523. rm -f conftest*
  3524. LIBS="$ac_save_LIBS"
  3525. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3526. echo "$ac_t""yes" 1>&6
  3527. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  3528. else
  3529. echo "$ac_t""no" 1>&6
  3530. fi
  3531. fi
  3532. # lieder@skyler.mavd.honeywell.com says without -lsocket,
  3533. # socket/setsockopt and other routines are undefined under SCO ODT
  3534. # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
  3535. # on later versions), says simon@lia.di.epfl.ch: it contains
  3536. # gethostby* variants that don't use the nameserver (or something).
  3537. # -lsocket must be given before -lnsl if both are needed.
  3538. # We assume that if connect needs -lnsl, so does gethostbyname.
  3539. echo $ac_n "checking for connect""... $ac_c" 1>&6
  3540. echo "configure:4229: checking for connect" >&5
  3541. cat > conftest.$ac_ext <<EOF
  3542. #line 4232 "configure"
  3543. #include "confdefs.h"
  3544. /* System header to define __stub macros and hopefully few prototypes,
  3545. which can conflict with char connect(); below. */
  3546. #include <assert.h>
  3547. /* Override any gcc2 internal prototype to avoid an error. */
  3548. /* We use char because int might match the return type of a gcc2
  3549. builtin and then its argument prototype would still apply. */
  3550. char connect();
  3551. int main() {
  3552. /* The GNU C library defines this for functions which it implements
  3553. to always fail with ENOSYS. Some functions are actually named
  3554. something starting with __ and the normal name is an alias. */
  3555. #if defined (__stub_connect) || defined (__stub___connect)
  3556. choke me
  3557. #else
  3558. connect();
  3559. #endif
  3560. ; return 0; }
  3561. EOF
  3562. if { (eval echo configure:4255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3563. rm -rf conftest*
  3564. eval "ac_cv_func_connect=yes"
  3565. else
  3566. echo "configure: failed program was:" >&5
  3567. cat conftest.$ac_ext >&5
  3568. rm -rf conftest*
  3569. eval "ac_cv_func_connect=no"
  3570. fi
  3571. rm -f conftest*
  3572. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  3573. echo "$ac_t""yes" 1>&6
  3574. :
  3575. else
  3576. echo "$ac_t""no" 1>&6
  3577. fi
  3578. if test $ac_cv_func_connect = no; then
  3579. echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  3580. echo "configure:4275: checking for connect in -lsocket" >&5
  3581. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  3582. ac_save_LIBS="$LIBS"
  3583. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  3584. cat > conftest.$ac_ext <<EOF
  3585. #line 4281 "configure"
  3586. #include "confdefs.h"
  3587. /* Override any gcc2 internal prototype to avoid an error. */
  3588. /* We use char because int might match the return type of a gcc2
  3589. builtin and then its argument prototype would still apply. */
  3590. char connect();
  3591. int main() {
  3592. connect()
  3593. ; return 0; }
  3594. EOF
  3595. if { (eval echo configure:4292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3596. rm -rf conftest*
  3597. eval "ac_cv_lib_$ac_lib_var=yes"
  3598. else
  3599. echo "configure: failed program was:" >&5
  3600. cat conftest.$ac_ext >&5
  3601. rm -rf conftest*
  3602. eval "ac_cv_lib_$ac_lib_var=no"
  3603. fi
  3604. rm -f conftest*
  3605. LIBS="$ac_save_LIBS"
  3606. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3607. echo "$ac_t""yes" 1>&6
  3608. X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  3609. else
  3610. echo "$ac_t""no" 1>&6
  3611. fi
  3612. fi
  3613. # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  3614. echo $ac_n "checking for remove""... $ac_c" 1>&6
  3615. echo "configure:4315: checking for remove" >&5
  3616. cat > conftest.$ac_ext <<EOF
  3617. #line 4318 "configure"
  3618. #include "confdefs.h"
  3619. /* System header to define __stub macros and hopefully few prototypes,
  3620. which can conflict with char remove(); below. */
  3621. #include <assert.h>
  3622. /* Override any gcc2 internal prototype to avoid an error. */
  3623. /* We use char because int might match the return type of a gcc2
  3624. builtin and then its argument prototype would still apply. */
  3625. char remove();
  3626. int main() {
  3627. /* The GNU C library defines this for functions which it implements
  3628. to always fail with ENOSYS. Some functions are actually named
  3629. something starting with __ and the normal name is an alias. */
  3630. #if defined (__stub_remove) || defined (__stub___remove)
  3631. choke me
  3632. #else
  3633. remove();
  3634. #endif
  3635. ; return 0; }
  3636. EOF
  3637. if { (eval echo configure:4341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3638. rm -rf conftest*
  3639. eval "ac_cv_func_remove=yes"
  3640. else
  3641. echo "configure: failed program was:" >&5
  3642. cat conftest.$ac_ext >&5
  3643. rm -rf conftest*
  3644. eval "ac_cv_func_remove=no"
  3645. fi
  3646. rm -f conftest*
  3647. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  3648. echo "$ac_t""yes" 1>&6
  3649. :
  3650. else
  3651. echo "$ac_t""no" 1>&6
  3652. fi
  3653. if test $ac_cv_func_remove = no; then
  3654. echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  3655. echo "configure:4361: checking for remove in -lposix" >&5
  3656. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  3657. ac_save_LIBS="$LIBS"
  3658. LIBS="-lposix $LIBS"
  3659. cat > conftest.$ac_ext <<EOF
  3660. #line 4367 "configure"
  3661. #include "confdefs.h"
  3662. /* Override any gcc2 internal prototype to avoid an error. */
  3663. /* We use char because int might match the return type of a gcc2
  3664. builtin and then its argument prototype would still apply. */
  3665. char remove();
  3666. int main() {
  3667. remove()
  3668. ; return 0; }
  3669. EOF
  3670. if { (eval echo configure:4378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3671. rm -rf conftest*
  3672. eval "ac_cv_lib_$ac_lib_var=yes"
  3673. else
  3674. echo "configure: failed program was:" >&5
  3675. cat conftest.$ac_ext >&5
  3676. rm -rf conftest*
  3677. eval "ac_cv_lib_$ac_lib_var=no"
  3678. fi
  3679. rm -f conftest*
  3680. LIBS="$ac_save_LIBS"
  3681. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3682. echo "$ac_t""yes" 1>&6
  3683. X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  3684. else
  3685. echo "$ac_t""no" 1>&6
  3686. fi
  3687. fi
  3688. # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  3689. echo $ac_n "checking for shmat""... $ac_c" 1>&6
  3690. echo "configure:4401: checking for shmat" >&5
  3691. cat > conftest.$ac_ext <<EOF
  3692. #line 4404 "configure"
  3693. #include "confdefs.h"
  3694. /* System header to define __stub macros and hopefully few prototypes,
  3695. which can conflict with char shmat(); below. */
  3696. #include <assert.h>
  3697. /* Override any gcc2 internal prototype to avoid an error. */
  3698. /* We use char because int might match the return type of a gcc2
  3699. builtin and then its argument prototype would still apply. */
  3700. char shmat();
  3701. int main() {
  3702. /* The GNU C library defines this for functions which it implements
  3703. to always fail with ENOSYS. Some functions are actually named
  3704. something starting with __ and the normal name is an alias. */
  3705. #if defined (__stub_shmat) || defined (__stub___shmat)
  3706. choke me
  3707. #else
  3708. shmat();
  3709. #endif
  3710. ; return 0; }
  3711. EOF
  3712. if { (eval echo configure:4427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3713. rm -rf conftest*
  3714. eval "ac_cv_func_shmat=yes"
  3715. else
  3716. echo "configure: failed program was:" >&5
  3717. cat conftest.$ac_ext >&5
  3718. rm -rf conftest*
  3719. eval "ac_cv_func_shmat=no"
  3720. fi
  3721. rm -f conftest*
  3722. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  3723. echo "$ac_t""yes" 1>&6
  3724. :
  3725. else
  3726. echo "$ac_t""no" 1>&6
  3727. fi
  3728. if test $ac_cv_func_shmat = no; then
  3729. echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  3730. echo "configure:4447: checking for shmat in -lipc" >&5
  3731. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  3732. ac_save_LIBS="$LIBS"
  3733. LIBS="-lipc $LIBS"
  3734. cat > conftest.$ac_ext <<EOF
  3735. #line 4453 "configure"
  3736. #include "confdefs.h"
  3737. /* Override any gcc2 internal prototype to avoid an error. */
  3738. /* We use char because int might match the return type of a gcc2
  3739. builtin and then its argument prototype would still apply. */
  3740. char shmat();
  3741. int main() {
  3742. shmat()
  3743. ; return 0; }
  3744. EOF
  3745. if { (eval echo configure:4464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3746. rm -rf conftest*
  3747. eval "ac_cv_lib_$ac_lib_var=yes"
  3748. else
  3749. echo "configure: failed program was:" >&5
  3750. cat conftest.$ac_ext >&5
  3751. rm -rf conftest*
  3752. eval "ac_cv_lib_$ac_lib_var=no"
  3753. fi
  3754. rm -f conftest*
  3755. LIBS="$ac_save_LIBS"
  3756. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3757. echo "$ac_t""yes" 1>&6
  3758. X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  3759. else
  3760. echo "$ac_t""no" 1>&6
  3761. fi
  3762. fi
  3763. fi
  3764. # Check for libraries that X11R6 Xt/Xaw programs need.
  3765. ac_save_LDFLAGS="$LDFLAGS"
  3766. test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  3767. # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  3768. # check for ICE first), but we must link in the order -lSM -lICE or
  3769. # we get undefined symbols. So assume we have SM if we have ICE.
  3770. # These have to be linked with before -lX11, unlike the other
  3771. # libraries we check for below, so use a different variable.
  3772. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  3773. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  3774. echo "configure:4496: checking for IceConnectionNumber in -lICE" >&5
  3775. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  3776. ac_save_LIBS="$LIBS"
  3777. LIBS="-lICE $X_EXTRA_LIBS $LIBS"
  3778. cat > conftest.$ac_ext <<EOF
  3779. #line 4502 "configure"
  3780. #include "confdefs.h"
  3781. /* Override any gcc2 internal prototype to avoid an error. */
  3782. /* We use char because int might match the return type of a gcc2
  3783. builtin and then its argument prototype would still apply. */
  3784. char IceConnectionNumber();
  3785. int main() {
  3786. IceConnectionNumber()
  3787. ; return 0; }
  3788. EOF
  3789. if { (eval echo configure:4513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3790. rm -rf conftest*
  3791. eval "ac_cv_lib_$ac_lib_var=yes"
  3792. else
  3793. echo "configure: failed program was:" >&5
  3794. cat conftest.$ac_ext >&5
  3795. rm -rf conftest*
  3796. eval "ac_cv_lib_$ac_lib_var=no"
  3797. fi
  3798. rm -f conftest*
  3799. LIBS="$ac_save_LIBS"
  3800. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3801. echo "$ac_t""yes" 1>&6
  3802. X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  3803. else
  3804. echo "$ac_t""no" 1>&6
  3805. fi
  3806. LDFLAGS="$ac_save_LDFLAGS"
  3807. fi
  3808. if test "$no_x" != "yes"; then
  3809. USE_X11="1"
  3810. XLIB=-lX11
  3811. XTLIB=-lXt
  3812. fi
  3813. fi
  3814. # Note that some systems (FreeBSD for example) need an extra library for
  3815. # cuserid
  3816. ac_save_libs="$LIBS"
  3817. LIBS=""
  3818. echo $ac_n "checking for library containing cuserid""... $ac_c" 1>&6
  3819. echo "configure:4553: checking for library containing cuserid" >&5
  3820. ac_func_search_save_LIBS="$LIBS"
  3821. ac_cv_search_cuserid="no"
  3822. cat > conftest.$ac_ext <<EOF
  3823. #line 4558 "configure"
  3824. #include "confdefs.h"
  3825. /* Override any gcc2 internal prototype to avoid an error. */
  3826. /* We use char because int might match the return type of a gcc2
  3827. builtin and then its argument prototype would still apply. */
  3828. char cuserid();
  3829. int main() {
  3830. cuserid()
  3831. ; return 0; }
  3832. EOF
  3833. if { (eval echo configure:4569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3834. rm -rf conftest*
  3835. ac_cv_search_cuserid="none required"
  3836. else
  3837. echo "configure: failed program was:" >&5
  3838. cat conftest.$ac_ext >&5
  3839. fi
  3840. rm -f conftest*
  3841. test "$ac_cv_search_cuserid" = "no" && for i in compat; do
  3842. LIBS="-l$i $ac_func_search_save_LIBS"
  3843. cat > conftest.$ac_ext <<EOF
  3844. #line 4580 "configure"
  3845. #include "confdefs.h"
  3846. /* Override any gcc2 internal prototype to avoid an error. */
  3847. /* We use char because int might match the return type of a gcc2
  3848. builtin and then its argument prototype would still apply. */
  3849. char cuserid();
  3850. int main() {
  3851. cuserid()
  3852. ; return 0; }
  3853. EOF
  3854. if { (eval echo configure:4591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3855. rm -rf conftest*
  3856. ac_cv_search_cuserid="-l$i"
  3857. break
  3858. else
  3859. echo "configure: failed program was:" >&5
  3860. cat conftest.$ac_ext >&5
  3861. fi
  3862. rm -f conftest*
  3863. done
  3864. LIBS="$ac_func_search_save_LIBS"
  3865. echo "$ac_t""$ac_cv_search_cuserid" 1>&6
  3866. if test "$ac_cv_search_cuserid" != "no"; then
  3867. test "$ac_cv_search_cuserid" = "none required" || LIBS="$ac_cv_search_cuserid $LIBS"
  3868. else :
  3869. fi
  3870. DBMIEXTRALIB="$LIBS"
  3871. LIBS="$ac_save_libs"
  3872. for ac_func in asprintf
  3873. do
  3874. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3875. echo "configure:4617: checking for $ac_func" >&5
  3876. cat > conftest.$ac_ext <<EOF
  3877. #line 4620 "configure"
  3878. #include "confdefs.h"
  3879. /* System header to define __stub macros and hopefully few prototypes,
  3880. which can conflict with char $ac_func(); below. */
  3881. #include <assert.h>
  3882. /* Override any gcc2 internal prototype to avoid an error. */
  3883. /* We use char because int might match the return type of a gcc2
  3884. builtin and then its argument prototype would still apply. */
  3885. char $ac_func();
  3886. int main() {
  3887. /* The GNU C library defines this for functions which it implements
  3888. to always fail with ENOSYS. Some functions are actually named
  3889. something starting with __ and the normal name is an alias. */
  3890. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3891. choke me
  3892. #else
  3893. $ac_func();
  3894. #endif
  3895. ; return 0; }
  3896. EOF
  3897. if { (eval echo configure:4643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3898. rm -rf conftest*
  3899. eval "ac_cv_func_$ac_func=yes"
  3900. else
  3901. echo "configure: failed program was:" >&5
  3902. cat conftest.$ac_ext >&5
  3903. rm -rf conftest*
  3904. eval "ac_cv_func_$ac_func=no"
  3905. fi
  3906. rm -f conftest*
  3907. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3908. echo "$ac_t""yes" 1>&6
  3909. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3910. cat >> confdefs.h <<EOF
  3911. #define $ac_tr_func 1
  3912. EOF
  3913. else
  3914. echo "$ac_t""no" 1>&6
  3915. fi
  3916. done
  3917. # Test if mathlib needs -lm flag or is included with libc
  3918. echo $ac_n "checking for atan""... $ac_c" 1>&6
  3919. echo "configure:4670: checking for atan" >&5
  3920. cat > conftest.$ac_ext <<EOF
  3921. #line 4673 "configure"
  3922. #include "confdefs.h"
  3923. /* System header to define __stub macros and hopefully few prototypes,
  3924. which can conflict with char atan(); below. */
  3925. #include <assert.h>
  3926. /* Override any gcc2 internal prototype to avoid an error. */
  3927. /* We use char because int might match the return type of a gcc2
  3928. builtin and then its argument prototype would still apply. */
  3929. char atan();
  3930. int main() {
  3931. /* The GNU C library defines this for functions which it implements
  3932. to always fail with ENOSYS. Some functions are actually named
  3933. something starting with __ and the normal name is an alias. */
  3934. #if defined (__stub_atan) || defined (__stub___atan)
  3935. choke me
  3936. #else
  3937. atan();
  3938. #endif
  3939. ; return 0; }
  3940. EOF
  3941. if { (eval echo configure:4696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3942. rm -rf conftest*
  3943. eval "ac_cv_func_atan=yes"
  3944. else
  3945. echo "configure: failed program was:" >&5
  3946. cat conftest.$ac_ext >&5
  3947. rm -rf conftest*
  3948. eval "ac_cv_func_atan=no"
  3949. fi
  3950. rm -f conftest*
  3951. if eval "test \"`echo '$ac_cv_func_'atan`\" = yes"; then
  3952. echo "$ac_t""yes" 1>&6
  3953. MATHLIB=
  3954. else
  3955. echo "$ac_t""no" 1>&6
  3956. echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6
  3957. echo "configure:4714: checking for atan in -lm" >&5
  3958. ac_lib_var=`echo m'_'atan | sed 'y%./+-%__p_%'`
  3959. ac_save_LIBS="$LIBS"
  3960. LIBS="-lm $LIBS"
  3961. cat > conftest.$ac_ext <<EOF
  3962. #line 4720 "configure"
  3963. #include "confdefs.h"
  3964. /* Override any gcc2 internal prototype to avoid an error. */
  3965. /* We use char because int might match the return type of a gcc2
  3966. builtin and then its argument prototype would still apply. */
  3967. char atan();
  3968. int main() {
  3969. atan()
  3970. ; return 0; }
  3971. EOF
  3972. if { (eval echo configure:4731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3973. rm -rf conftest*
  3974. eval "ac_cv_lib_$ac_lib_var=yes"
  3975. else
  3976. echo "configure: failed program was:" >&5
  3977. cat conftest.$ac_ext >&5
  3978. rm -rf conftest*
  3979. eval "ac_cv_lib_$ac_lib_var=no"
  3980. fi
  3981. rm -f conftest*
  3982. LIBS="$ac_save_LIBS"
  3983. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3984. echo "$ac_t""yes" 1>&6
  3985. MATHLIB=-lm
  3986. else
  3987. echo "$ac_t""no" 1>&6
  3988. { echo "configure: error: *** Failed check for math library." 1>&2; exit 1; }
  3989. fi
  3990. fi
  3991. echo $ac_n "checking for dlsym""... $ac_c" 1>&6
  3992. echo "configure:4758: checking for dlsym" >&5
  3993. cat > conftest.$ac_ext <<EOF
  3994. #line 4761 "configure"
  3995. #include "confdefs.h"
  3996. /* System header to define __stub macros and hopefully few prototypes,
  3997. which can conflict with char dlsym(); below. */
  3998. #include <assert.h>
  3999. /* Override any gcc2 internal prototype to avoid an error. */
  4000. /* We use char because int might match the return type of a gcc2
  4001. builtin and then its argument prototype would still apply. */
  4002. char dlsym();
  4003. int main() {
  4004. /* The GNU C library defines this for functions which it implements
  4005. to always fail with ENOSYS. Some functions are actually named
  4006. something starting with __ and the normal name is an alias. */
  4007. #if defined (__stub_dlsym) || defined (__stub___dlsym)
  4008. choke me
  4009. #else
  4010. dlsym();
  4011. #endif
  4012. ; return 0; }
  4013. EOF
  4014. if { (eval echo configure:4784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4015. rm -rf conftest*
  4016. eval "ac_cv_func_dlsym=yes"
  4017. else
  4018. echo "configure: failed program was:" >&5
  4019. cat conftest.$ac_ext >&5
  4020. rm -rf conftest*
  4021. eval "ac_cv_func_dlsym=no"
  4022. fi
  4023. rm -f conftest*
  4024. if eval "test \"`echo '$ac_cv_func_'dlsym`\" = yes"; then
  4025. echo "$ac_t""yes" 1>&6
  4026. DLLIB=
  4027. else
  4028. echo "$ac_t""no" 1>&6
  4029. echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
  4030. echo "configure:4802: checking for dlsym in -ldl" >&5
  4031. ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
  4032. ac_save_LIBS="$LIBS"
  4033. LIBS="-ldl $LIBS"
  4034. cat > conftest.$ac_ext <<EOF
  4035. #line 4808 "configure"
  4036. #include "confdefs.h"
  4037. /* Override any gcc2 internal prototype to avoid an error. */
  4038. /* We use char because int might match the return type of a gcc2
  4039. builtin and then its argument prototype would still apply. */
  4040. char dlsym();
  4041. int main() {
  4042. dlsym()
  4043. ; return 0; }
  4044. EOF
  4045. if { (eval echo configure:4819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4046. rm -rf conftest*
  4047. eval "ac_cv_lib_$ac_lib_var=yes"
  4048. else
  4049. echo "configure: failed program was:" >&5
  4050. cat conftest.$ac_ext >&5
  4051. rm -rf conftest*
  4052. eval "ac_cv_lib_$ac_lib_var=no"
  4053. fi
  4054. rm -f conftest*
  4055. LIBS="$ac_save_LIBS"
  4056. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4057. echo "$ac_t""yes" 1>&6
  4058. DLLIB=-ldl
  4059. else
  4060. echo "$ac_t""no" 1>&6
  4061. DLLIB=
  4062. fi
  4063. fi
  4064. echo $ac_n "checking for iconv""... $ac_c" 1>&6
  4065. echo "configure:4846: checking for iconv" >&5
  4066. cat > conftest.$ac_ext <<EOF
  4067. #line 4849 "configure"
  4068. #include "confdefs.h"
  4069. /* System header to define __stub macros and hopefully few prototypes,
  4070. which can conflict with char iconv(); below. */
  4071. #include <assert.h>
  4072. /* Override any gcc2 internal prototype to avoid an error. */
  4073. /* We use char because int might match the return type of a gcc2
  4074. builtin and then its argument prototype would still apply. */
  4075. char iconv();
  4076. int main() {
  4077. /* The GNU C library defines this for functions which it implements
  4078. to always fail with ENOSYS. Some functions are actually named
  4079. something starting with __ and the normal name is an alias. */
  4080. #if defined (__stub_iconv) || defined (__stub___iconv)
  4081. choke me
  4082. #else
  4083. iconv();
  4084. #endif
  4085. ; return 0; }
  4086. EOF
  4087. if { (eval echo configure:4872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4088. rm -rf conftest*
  4089. eval "ac_cv_func_iconv=yes"
  4090. else
  4091. echo "configure: failed program was:" >&5
  4092. cat conftest.$ac_ext >&5
  4093. rm -rf conftest*
  4094. eval "ac_cv_func_iconv=no"
  4095. fi
  4096. rm -f conftest*
  4097. if eval "test \"`echo '$ac_cv_func_'iconv`\" = yes"; then
  4098. echo "$ac_t""yes" 1>&6
  4099. ICONVLIB=
  4100. else
  4101. echo "$ac_t""no" 1>&6
  4102. echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
  4103. echo "configure:4890: checking for iconv in -liconv" >&5
  4104. ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
  4105. ac_save_LIBS="$LIBS"
  4106. LIBS="-liconv $LIBS"
  4107. cat > conftest.$ac_ext <<EOF
  4108. #line 4896 "configure"
  4109. #include "confdefs.h"
  4110. /* Override any gcc2 internal prototype to avoid an error. */
  4111. /* We use char because int might match the return type of a gcc2
  4112. builtin and then its argument prototype would still apply. */
  4113. char iconv();
  4114. int main() {
  4115. iconv()
  4116. ; return 0; }
  4117. EOF
  4118. if { (eval echo configure:4907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4119. rm -rf conftest*
  4120. eval "ac_cv_lib_$ac_lib_var=yes"
  4121. else
  4122. echo "configure: failed program was:" >&5
  4123. cat conftest.$ac_ext >&5
  4124. rm -rf conftest*
  4125. eval "ac_cv_lib_$ac_lib_var=no"
  4126. fi
  4127. rm -f conftest*
  4128. LIBS="$ac_save_LIBS"
  4129. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4130. echo "$ac_t""yes" 1>&6
  4131. ICONVLIB=-liconv
  4132. else
  4133. echo "$ac_t""no" 1>&6
  4134. echo $ac_n "checking for iconv in -lgiconv""... $ac_c" 1>&6
  4135. echo "configure:4926: checking for iconv in -lgiconv" >&5
  4136. ac_lib_var=`echo giconv'_'iconv | sed 'y%./+-%__p_%'`
  4137. ac_save_LIBS="$LIBS"
  4138. LIBS="-lgiconv $LIBS"
  4139. cat > conftest.$ac_ext <<EOF
  4140. #line 4932 "configure"
  4141. #include "confdefs.h"
  4142. /* Override any gcc2 internal prototype to avoid an error. */
  4143. /* We use char because int might match the return type of a gcc2
  4144. builtin and then its argument prototype would still apply. */
  4145. char iconv();
  4146. int main() {
  4147. iconv()
  4148. ; return 0; }
  4149. EOF
  4150. if { (eval echo configure:4943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4151. rm -rf conftest*
  4152. eval "ac_cv_lib_$ac_lib_var=yes"
  4153. else
  4154. echo "configure: failed program was:" >&5
  4155. cat conftest.$ac_ext >&5
  4156. rm -rf conftest*
  4157. eval "ac_cv_lib_$ac_lib_var=no"
  4158. fi
  4159. rm -f conftest*
  4160. LIBS="$ac_save_LIBS"
  4161. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4162. echo "$ac_t""yes" 1>&6
  4163. ICONVLIB=-lgiconv
  4164. else
  4165. echo "$ac_t""no" 1>&6
  4166. echo $ac_n "checking for libiconv""... $ac_c" 1>&6
  4167. echo "configure:4962: checking for libiconv" >&5
  4168. cat > conftest.$ac_ext <<EOF
  4169. #line 4965 "configure"
  4170. #include "confdefs.h"
  4171. /* System header to define __stub macros and hopefully few prototypes,
  4172. which can conflict with char libiconv(); below. */
  4173. #include <assert.h>
  4174. /* Override any gcc2 internal prototype to avoid an error. */
  4175. /* We use char because int might match the return type of a gcc2
  4176. builtin and then its argument prototype would still apply. */
  4177. char libiconv();
  4178. int main() {
  4179. /* The GNU C library defines this for functions which it implements
  4180. to always fail with ENOSYS. Some functions are actually named
  4181. something starting with __ and the normal name is an alias. */
  4182. #if defined (__stub_libiconv) || defined (__stub___libiconv)
  4183. choke me
  4184. #else
  4185. libiconv();
  4186. #endif
  4187. ; return 0; }
  4188. EOF
  4189. if { (eval echo configure:4988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4190. rm -rf conftest*
  4191. eval "ac_cv_func_libiconv=yes"
  4192. else
  4193. echo "configure: failed program was:" >&5
  4194. cat conftest.$ac_ext >&5
  4195. rm -rf conftest*
  4196. eval "ac_cv_func_libiconv=no"
  4197. fi
  4198. rm -f conftest*
  4199. if eval "test \"`echo '$ac_cv_func_'libiconv`\" = yes"; then
  4200. echo "$ac_t""yes" 1>&6
  4201. ICONVLIB=
  4202. else
  4203. echo "$ac_t""no" 1>&6
  4204. echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6
  4205. echo "configure:5006: checking for libiconv in -liconv" >&5
  4206. ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'`
  4207. ac_save_LIBS="$LIBS"
  4208. LIBS="-liconv $LIBS"
  4209. cat > conftest.$ac_ext <<EOF
  4210. #line 5012 "configure"
  4211. #include "confdefs.h"
  4212. /* Override any gcc2 internal prototype to avoid an error. */
  4213. /* We use char because int might match the return type of a gcc2
  4214. builtin and then its argument prototype would still apply. */
  4215. char libiconv();
  4216. int main() {
  4217. libiconv()
  4218. ; return 0; }
  4219. EOF
  4220. if { (eval echo configure:5023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4221. rm -rf conftest*
  4222. eval "ac_cv_lib_$ac_lib_var=yes"
  4223. else
  4224. echo "configure: failed program was:" >&5
  4225. cat conftest.$ac_ext >&5
  4226. rm -rf conftest*
  4227. eval "ac_cv_lib_$ac_lib_var=no"
  4228. fi
  4229. rm -f conftest*
  4230. LIBS="$ac_save_LIBS"
  4231. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4232. echo "$ac_t""yes" 1>&6
  4233. ICONVLIB=-liconv
  4234. else
  4235. echo "$ac_t""no" 1>&6
  4236. echo $ac_n "checking for libiconv in -lgiconv""... $ac_c" 1>&6
  4237. echo "configure:5042: checking for libiconv in -lgiconv" >&5
  4238. ac_lib_var=`echo giconv'_'libiconv | sed 'y%./+-%__p_%'`
  4239. ac_save_LIBS="$LIBS"
  4240. LIBS="-lgiconv $LIBS"
  4241. cat > conftest.$ac_ext <<EOF
  4242. #line 5048 "configure"
  4243. #include "confdefs.h"
  4244. /* Override any gcc2 internal prototype to avoid an error. */
  4245. /* We use char because int might match the return type of a gcc2
  4246. builtin and then its argument prototype would still apply. */
  4247. char libiconv();
  4248. int main() {
  4249. libiconv()
  4250. ; return 0; }
  4251. EOF
  4252. if { (eval echo configure:5059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4253. rm -rf conftest*
  4254. eval "ac_cv_lib_$ac_lib_var=yes"
  4255. else
  4256. echo "configure: failed program was:" >&5
  4257. cat conftest.$ac_ext >&5
  4258. rm -rf conftest*
  4259. eval "ac_cv_lib_$ac_lib_var=no"
  4260. fi
  4261. rm -f conftest*
  4262. LIBS="$ac_save_LIBS"
  4263. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4264. echo "$ac_t""yes" 1>&6
  4265. ICONVLIB=-lgiconv
  4266. else
  4267. echo "$ac_t""no" 1>&6
  4268. echo "configure: warning: *** Unable to locate iconv() function." 1>&2
  4269. ICONVLIB=
  4270. fi
  4271. fi
  4272. fi
  4273. fi
  4274. fi
  4275. fi
  4276. have_socket=1
  4277. echo $ac_n "checking for socket""... $ac_c" 1>&6
  4278. echo "configure:5096: checking for socket" >&5
  4279. cat > conftest.$ac_ext <<EOF
  4280. #line 5099 "configure"
  4281. #include "confdefs.h"
  4282. /* System header to define __stub macros and hopefully few prototypes,
  4283. which can conflict with char socket(); below. */
  4284. #include <assert.h>
  4285. /* Override any gcc2 internal prototype to avoid an error. */
  4286. /* We use char because int might match the return type of a gcc2
  4287. builtin and then its argument prototype would still apply. */
  4288. char socket();
  4289. int main() {
  4290. /* The GNU C library defines this for functions which it implements
  4291. to always fail with ENOSYS. Some functions are actually named
  4292. something starting with __ and the normal name is an alias. */
  4293. #if defined (__stub_socket) || defined (__stub___socket)
  4294. choke me
  4295. #else
  4296. socket();
  4297. #endif
  4298. ; return 0; }
  4299. EOF
  4300. if { (eval echo configure:5122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4301. rm -rf conftest*
  4302. eval "ac_cv_func_socket=yes"
  4303. else
  4304. echo "configure: failed program was:" >&5
  4305. cat conftest.$ac_ext >&5
  4306. rm -rf conftest*
  4307. eval "ac_cv_func_socket=no"
  4308. fi
  4309. rm -f conftest*
  4310. if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
  4311. echo "$ac_t""yes" 1>&6
  4312. SOCKLIB=
  4313. else
  4314. echo "$ac_t""no" 1>&6
  4315. echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
  4316. echo "configure:5140: checking for socket in -lsocket" >&5
  4317. ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
  4318. ac_save_LIBS="$LIBS"
  4319. LIBS="-lsocket $LIBS"
  4320. cat > conftest.$ac_ext <<EOF
  4321. #line 5146 "configure"
  4322. #include "confdefs.h"
  4323. /* Override any gcc2 internal prototype to avoid an error. */
  4324. /* We use char because int might match the return type of a gcc2
  4325. builtin and then its argument prototype would still apply. */
  4326. char socket();
  4327. int main() {
  4328. socket()
  4329. ; return 0; }
  4330. EOF
  4331. if { (eval echo configure:5157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4332. rm -rf conftest*
  4333. eval "ac_cv_lib_$ac_lib_var=yes"
  4334. else
  4335. echo "configure: failed program was:" >&5
  4336. cat conftest.$ac_ext >&5
  4337. rm -rf conftest*
  4338. eval "ac_cv_lib_$ac_lib_var=no"
  4339. fi
  4340. rm -f conftest*
  4341. LIBS="$ac_save_LIBS"
  4342. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4343. echo "$ac_t""yes" 1>&6
  4344. SOCKLIB=-lsocket
  4345. else
  4346. echo "$ac_t""no" 1>&6
  4347. have_socket=0
  4348. echo "configure: warning: *** Unable to locate socket() function." 1>&2
  4349. fi
  4350. fi
  4351. if test "$have_socket" = 1 ; then
  4352. HAVE_SOCKET=1
  4353. cat >> confdefs.h <<\EOF
  4354. #define HAVE_SOCKET 1
  4355. EOF
  4356. else
  4357. HAVE_SOCKET=
  4358. fi
  4359. # Mandatory zlib dependency
  4360. ZLIBLIBPATH=
  4361. ZLIBINCPATH=
  4362. ZLIB=
  4363. # With zlib includes directory
  4364. echo $ac_n "checking for location of zlib includes""... $ac_c" 1>&6
  4365. echo "configure:5205: checking for location of zlib includes" >&5
  4366. case "$with_zlib_includes" in
  4367. y | ye | yes | n | no)
  4368. { echo "configure: error: *** You must supply a directory to --with-zlib-includes." 1>&2; exit 1; }
  4369. ;;
  4370. esac
  4371. echo "$ac_t""$with_zlib_includes" 1>&6
  4372. if test -n "$with_zlib_includes" ; then
  4373. for dir in $with_zlib_includes; do
  4374. if test -d "$dir"; then
  4375. ZLIBINCPATH="$ZLIBINCPATH -I$dir"
  4376. else
  4377. { echo "configure: error: *** zlib includes directory $dir does not exist." 1>&2; exit 1; }
  4378. fi
  4379. done
  4380. fi
  4381. ac_save_cppflags="$CPPFLAGS"
  4382. CPPFLAGS="$ZLIBINCPATH $CPPFLAGS"
  4383. for ac_hdr in zlib.h
  4384. do
  4385. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4386. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4387. echo "configure:5231: checking for $ac_hdr" >&5
  4388. cat > conftest.$ac_ext <<EOF
  4389. #line 5234 "configure"
  4390. #include "confdefs.h"
  4391. #include <$ac_hdr>
  4392. EOF
  4393. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4394. { (eval echo configure:5239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4395. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4396. if test -z "$ac_err"; then
  4397. rm -rf conftest*
  4398. eval "ac_cv_header_$ac_safe=yes"
  4399. else
  4400. echo "$ac_err" >&5
  4401. echo "configure: failed program was:" >&5
  4402. cat conftest.$ac_ext >&5
  4403. rm -rf conftest*
  4404. eval "ac_cv_header_$ac_safe=no"
  4405. fi
  4406. rm -f conftest*
  4407. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4408. echo "$ac_t""yes" 1>&6
  4409. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4410. cat >> confdefs.h <<EOF
  4411. #define $ac_tr_hdr 1
  4412. EOF
  4413. else
  4414. echo "$ac_t""no" 1>&6
  4415. { echo "configure: error: *** Unable to locate zlib includes." 1>&2; exit 1; }
  4416. fi
  4417. done
  4418. CPPFLAGS=$ac_save_cppflags
  4419. # With zlib library directory
  4420. echo $ac_n "checking for location of zlib library""... $ac_c" 1>&6
  4421. echo "configure:5273: checking for location of zlib library" >&5
  4422. case "$with_zlib_libs" in
  4423. y | ye | yes | n | no)
  4424. { echo "configure: error: *** You must supply a directory to --with-zlib-libs." 1>&2; exit 1; }
  4425. ;;
  4426. esac
  4427. echo "$ac_t""$with_zlib_libs" 1>&6
  4428. if test -n "$with_zlib_libs"; then
  4429. for dir in $with_zlib_libs; do
  4430. if test -d "$dir"; then
  4431. ZLIBLIBPATH="$ZLIBLIBPATH -L$dir"
  4432. else
  4433. { echo "configure: error: *** zlib library directory $dir does not exist." 1>&2; exit 1; }
  4434. fi
  4435. done
  4436. fi
  4437. ac_save_ldflags="$LDFLAGS"
  4438. LDFLAGS="$ZLIBLIBPATH $LDFLAGS"
  4439. echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
  4440. echo "configure:5298: checking for deflate in -lz" >&5
  4441. ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
  4442. ac_save_LIBS="$LIBS"
  4443. LIBS="-lz $LIBS"
  4444. cat > conftest.$ac_ext <<EOF
  4445. #line 5304 "configure"
  4446. #include "confdefs.h"
  4447. /* Override any gcc2 internal prototype to avoid an error. */
  4448. /* We use char because int might match the return type of a gcc2
  4449. builtin and then its argument prototype would still apply. */
  4450. char deflate();
  4451. int main() {
  4452. deflate()
  4453. ; return 0; }
  4454. EOF
  4455. if { (eval echo configure:5315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4456. rm -rf conftest*
  4457. eval "ac_cv_lib_$ac_lib_var=yes"
  4458. else
  4459. echo "configure: failed program was:" >&5
  4460. cat conftest.$ac_ext >&5
  4461. rm -rf conftest*
  4462. eval "ac_cv_lib_$ac_lib_var=no"
  4463. fi
  4464. rm -f conftest*
  4465. LIBS="$ac_save_LIBS"
  4466. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4467. echo "$ac_t""yes" 1>&6
  4468. ZLIB="$ZLIB -lz "
  4469. else
  4470. echo "$ac_t""no" 1>&6
  4471. LDFLAGS=${ac_save_ldflags}
  4472. { echo "configure: error: *** Unable to locate zlib library." 1>&2; exit 1; }
  4473. fi
  4474. LDFLAGS=${ac_save_ldflags}
  4475. #
  4476. # Done checking zlib
  4477. # bzip2 support
  4478. BZIP2LIBPATH=
  4479. BZIP2INCPATH=
  4480. BZIP2LIB=
  4481. echo $ac_n "checking whether to use bzlib""... $ac_c" 1>&6
  4482. echo "configure:5361: checking whether to use bzlib" >&5
  4483. echo "$ac_t"""$with_bzlib"" 1>&6
  4484. case "$with_bzlib" in
  4485. "no") USE_BZIP2= ;;
  4486. "yes") USE_BZIP2="1" ;;
  4487. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  4488. esac
  4489. if test -n "$USE_BZIP2"; then
  4490. # With bzip2 includes directory
  4491. echo $ac_n "checking for location of bzlib includes""... $ac_c" 1>&6
  4492. echo "configure:5377: checking for location of bzlib includes" >&5
  4493. case "$with_bzlib_includes" in
  4494. y | ye | yes | n | no)
  4495. { echo "configure: error: *** You must supply a directory to --with-bzlib-includes." 1>&2; exit 1; }
  4496. ;;
  4497. esac
  4498. echo "$ac_t""$with_bzlib_includes" 1>&6
  4499. if test -n "$with_bzlib_includes" ; then
  4500. for dir in $with_bzlib_includes; do
  4501. if test -d "$dir"; then
  4502. BZIP2INCPATH="$BZIP2INCPATH -I$dir"
  4503. else
  4504. { echo "configure: error: *** bzlib includes directory $dir does not exist." 1>&2; exit 1; }
  4505. fi
  4506. done
  4507. fi
  4508. ac_save_cppflags="$CPPFLAGS"
  4509. CPPFLAGS="$BZIP2INCPATH $CPPFLAGS"
  4510. for ac_hdr in bzlib.h
  4511. do
  4512. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4513. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4514. echo "configure:5403: checking for $ac_hdr" >&5
  4515. cat > conftest.$ac_ext <<EOF
  4516. #line 5406 "configure"
  4517. #include "confdefs.h"
  4518. #include <$ac_hdr>
  4519. EOF
  4520. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4521. { (eval echo configure:5411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4522. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4523. if test -z "$ac_err"; then
  4524. rm -rf conftest*
  4525. eval "ac_cv_header_$ac_safe=yes"
  4526. else
  4527. echo "$ac_err" >&5
  4528. echo "configure: failed program was:" >&5
  4529. cat conftest.$ac_ext >&5
  4530. rm -rf conftest*
  4531. eval "ac_cv_header_$ac_safe=no"
  4532. fi
  4533. rm -f conftest*
  4534. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4535. echo "$ac_t""yes" 1>&6
  4536. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4537. cat >> confdefs.h <<EOF
  4538. #define $ac_tr_hdr 1
  4539. EOF
  4540. else
  4541. echo "$ac_t""no" 1>&6
  4542. { echo "configure: error: *** Unable to locate bzlib includes." 1>&2; exit 1; }
  4543. fi
  4544. done
  4545. CPPFLAGS=$ac_save_cppflags
  4546. # With bzip2 library directory
  4547. echo $ac_n "checking for location of bzlib library""... $ac_c" 1>&6
  4548. echo "configure:5445: checking for location of bzlib library" >&5
  4549. case "$with_bzlib_libs" in
  4550. y | ye | yes | n | no)
  4551. { echo "configure: error: *** You must supply a directory to --with-bzlib-libs." 1>&2; exit 1; }
  4552. ;;
  4553. esac
  4554. echo "$ac_t""$with_bzlib_libs" 1>&6
  4555. if test -n "$with_bzlib_libs"; then
  4556. for dir in $with_bzlib_libs; do
  4557. if test -d "$dir"; then
  4558. BZIP2LIBPATH="$BZIP2LIBPATH -L$dir"
  4559. else
  4560. { echo "configure: error: *** bzlib library directory $dir does not exist." 1>&2; exit 1; }
  4561. fi
  4562. done
  4563. fi
  4564. ac_save_ldflags="$LDFLAGS"
  4565. LDFLAGS="$BZIP2LIBPATH $LDFLAGS"
  4566. echo $ac_n "checking for BZ2_bzBuffToBuffCompress in -lbz2""... $ac_c" 1>&6
  4567. echo "configure:5470: checking for BZ2_bzBuffToBuffCompress in -lbz2" >&5
  4568. ac_lib_var=`echo bz2'_'BZ2_bzBuffToBuffCompress | sed 'y%./+-%__p_%'`
  4569. ac_save_LIBS="$LIBS"
  4570. LIBS="-lbz2 $LIBS"
  4571. cat > conftest.$ac_ext <<EOF
  4572. #line 5476 "configure"
  4573. #include "confdefs.h"
  4574. /* Override any gcc2 internal prototype to avoid an error. */
  4575. /* We use char because int might match the return type of a gcc2
  4576. builtin and then its argument prototype would still apply. */
  4577. char BZ2_bzBuffToBuffCompress();
  4578. int main() {
  4579. BZ2_bzBuffToBuffCompress()
  4580. ; return 0; }
  4581. EOF
  4582. if { (eval echo configure:5487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4583. rm -rf conftest*
  4584. eval "ac_cv_lib_$ac_lib_var=yes"
  4585. else
  4586. echo "configure: failed program was:" >&5
  4587. cat conftest.$ac_ext >&5
  4588. rm -rf conftest*
  4589. eval "ac_cv_lib_$ac_lib_var=no"
  4590. fi
  4591. rm -f conftest*
  4592. LIBS="$ac_save_LIBS"
  4593. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4594. echo "$ac_t""yes" 1>&6
  4595. BZIP2LIB="$BZIP2LIB -lbz2 "
  4596. else
  4597. echo "$ac_t""no" 1>&6
  4598. LDFLAGS=${ac_save_ldflags}
  4599. { echo "configure: error: *** Unable to locate bzlib library." 1>&2; exit 1; }
  4600. fi
  4601. LDFLAGS=${ac_save_ldflags}
  4602. #
  4603. fi # $USE_BZIP2
  4604. # Done checking bzip2
  4605. # zstd support
  4606. ZSTDLIBPATH=
  4607. ZSTDINCPATH=
  4608. ZSTDLIB=
  4609. echo $ac_n "checking whether to use zstd""... $ac_c" 1>&6
  4610. echo "configure:5535: checking whether to use zstd" >&5
  4611. echo "$ac_t"""$with_zstd"" 1>&6
  4612. case "$with_zstd" in
  4613. "no") USE_ZSTD= ;;
  4614. "yes") USE_ZSTD="1" ;;
  4615. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  4616. esac
  4617. if test -n "$USE_ZSTD"; then
  4618. # With zstd includes directory
  4619. echo $ac_n "checking for location of zstd includes""... $ac_c" 1>&6
  4620. echo "configure:5551: checking for location of zstd includes" >&5
  4621. case "$with_zstd_includes" in
  4622. y | ye | yes | n | no)
  4623. { echo "configure: error: *** You must supply a directory to --with-zstd-includes." 1>&2; exit 1; }
  4624. ;;
  4625. esac
  4626. echo "$ac_t""$with_zstd_includes" 1>&6
  4627. if test -n "$with_zstd_includes" ; then
  4628. for dir in $with_zstd_includes; do
  4629. if test -d "$dir"; then
  4630. ZSTDINCPATH="$ZSTDINCPATH -I$dir"
  4631. else
  4632. { echo "configure: error: *** zstd includes directory $dir does not exist." 1>&2; exit 1; }
  4633. fi
  4634. done
  4635. fi
  4636. ac_save_cppflags="$CPPFLAGS"
  4637. CPPFLAGS="$ZSTDINCPATH $CPPFLAGS"
  4638. for ac_hdr in zstd.h
  4639. do
  4640. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4641. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4642. echo "configure:5576: checking for $ac_hdr" >&5
  4643. cat > conftest.$ac_ext <<EOF
  4644. #line 5579 "configure"
  4645. #include "confdefs.h"
  4646. #include <$ac_hdr>
  4647. EOF
  4648. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4649. { (eval echo configure:5584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4650. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4651. if test -z "$ac_err"; then
  4652. rm -rf conftest*
  4653. eval "ac_cv_header_$ac_safe=yes"
  4654. else
  4655. echo "$ac_err" >&5
  4656. echo "configure: failed program was:" >&5
  4657. cat conftest.$ac_ext >&5
  4658. rm -rf conftest*
  4659. eval "ac_cv_header_$ac_safe=no"
  4660. fi
  4661. rm -f conftest*
  4662. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4663. echo "$ac_t""yes" 1>&6
  4664. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4665. cat >> confdefs.h <<EOF
  4666. #define $ac_tr_hdr 1
  4667. EOF
  4668. else
  4669. echo "$ac_t""no" 1>&6
  4670. { echo "configure: error: *** Unable to locate zstd includes." 1>&2; exit 1; }
  4671. fi
  4672. done
  4673. CPPFLAGS=$ac_save_cppflags
  4674. # With zstd library directory
  4675. echo $ac_n "checking for location of zstd library""... $ac_c" 1>&6
  4676. echo "configure:5618: checking for location of zstd library" >&5
  4677. case "$with_zstd_libs" in
  4678. y | ye | yes | n | no)
  4679. { echo "configure: error: *** You must supply a directory to --with-zstd-libs." 1>&2; exit 1; }
  4680. ;;
  4681. esac
  4682. echo "$ac_t""$with_zstd_libs" 1>&6
  4683. if test -n "$with_zstd_libs"; then
  4684. for dir in $with_zstd_libs; do
  4685. if test -d "$dir"; then
  4686. ZSTDLIBPATH="$ZSTDLIBPATH -L$dir"
  4687. else
  4688. { echo "configure: error: *** zstd library directory $dir does not exist." 1>&2; exit 1; }
  4689. fi
  4690. done
  4691. fi
  4692. ac_save_ldflags="$LDFLAGS"
  4693. LDFLAGS="$ZSTDLIBPATH $LDFLAGS"
  4694. echo $ac_n "checking for ZSTD_compress in -lzstd""... $ac_c" 1>&6
  4695. echo "configure:5643: checking for ZSTD_compress in -lzstd" >&5
  4696. ac_lib_var=`echo zstd'_'ZSTD_compress | sed 'y%./+-%__p_%'`
  4697. ac_save_LIBS="$LIBS"
  4698. LIBS="-lzstd $LIBS"
  4699. cat > conftest.$ac_ext <<EOF
  4700. #line 5649 "configure"
  4701. #include "confdefs.h"
  4702. /* Override any gcc2 internal prototype to avoid an error. */
  4703. /* We use char because int might match the return type of a gcc2
  4704. builtin and then its argument prototype would still apply. */
  4705. char ZSTD_compress();
  4706. int main() {
  4707. ZSTD_compress()
  4708. ; return 0; }
  4709. EOF
  4710. if { (eval echo configure:5660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4711. rm -rf conftest*
  4712. eval "ac_cv_lib_$ac_lib_var=yes"
  4713. else
  4714. echo "configure: failed program was:" >&5
  4715. cat conftest.$ac_ext >&5
  4716. rm -rf conftest*
  4717. eval "ac_cv_lib_$ac_lib_var=no"
  4718. fi
  4719. rm -f conftest*
  4720. LIBS="$ac_save_LIBS"
  4721. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4722. echo "$ac_t""yes" 1>&6
  4723. ZSTDLIB="$ZSTDLIB -lzstd "
  4724. else
  4725. echo "$ac_t""no" 1>&6
  4726. LDFLAGS=${ac_save_ldflags}
  4727. { echo "configure: error: *** Unable to locate zstd library." 1>&2; exit 1; }
  4728. fi
  4729. LDFLAGS=${ac_save_ldflags}
  4730. #
  4731. fi # $USE_ZSTD
  4732. # Done checking zstd
  4733. # Mandatory PROJ dependency
  4734. PROJINC=
  4735. PROJLIB=
  4736. PROJSHARE=
  4737. PROJ4API=0
  4738. PROJMAJOR=4
  4739. # With PROJ includes directory
  4740. echo $ac_n "checking for location of External PROJ includes""... $ac_c" 1>&6
  4741. echo "configure:5712: checking for location of External PROJ includes" >&5
  4742. case "$with_proj_includes" in
  4743. y | ye | yes | n | no)
  4744. { echo "configure: error: *** You must supply a directory to --with-proj-includes." 1>&2; exit 1; }
  4745. ;;
  4746. esac
  4747. echo "$ac_t""$with_proj_includes" 1>&6
  4748. if test -n "$with_proj_includes" ; then
  4749. for dir in $with_proj_includes; do
  4750. if test -d "$dir"; then
  4751. PROJINC="$PROJINC -I$dir"
  4752. else
  4753. { echo "configure: error: *** External PROJ includes directory $dir does not exist." 1>&2; exit 1; }
  4754. fi
  4755. done
  4756. fi
  4757. # PROJ version check: if proj.h exists, it must be proj 5+
  4758. ac_save_cppflags="$CPPFLAGS"
  4759. CPPFLAGS="$PROJINC $CPPFLAGS"
  4760. for ac_hdr in proj.h
  4761. do
  4762. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4763. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4764. echo "configure:5739: checking for $ac_hdr" >&5
  4765. cat > conftest.$ac_ext <<EOF
  4766. #line 5742 "configure"
  4767. #include "confdefs.h"
  4768. #include <$ac_hdr>
  4769. EOF
  4770. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4771. { (eval echo configure:5747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4772. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4773. if test -z "$ac_err"; then
  4774. rm -rf conftest*
  4775. eval "ac_cv_header_$ac_safe=yes"
  4776. else
  4777. echo "$ac_err" >&5
  4778. echo "configure: failed program was:" >&5
  4779. cat conftest.$ac_ext >&5
  4780. rm -rf conftest*
  4781. eval "ac_cv_header_$ac_safe=no"
  4782. fi
  4783. rm -f conftest*
  4784. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4785. echo "$ac_t""yes" 1>&6
  4786. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4787. cat >> confdefs.h <<EOF
  4788. #define $ac_tr_hdr 1
  4789. EOF
  4790. else
  4791. echo "$ac_t""no" 1>&6
  4792. PROJ4API=1
  4793. fi
  4794. done
  4795. CPPFLAGS=$ac_save_cppflags
  4796. if test $PROJ4API = 0 ; then
  4797. echo $ac_n "checking External PROJ major version""... $ac_c" 1>&6
  4798. echo "configure:5779: checking External PROJ major version" >&5
  4799. ac_save_cppflags="$CPPFLAGS"
  4800. CPPFLAGS="$PROJINC $CPPFLAGS"
  4801. if test "$cross_compiling" = yes; then
  4802. proj_ver_major=0
  4803. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4804. else
  4805. cat > conftest.$ac_ext <<EOF
  4806. #line 5787 "configure"
  4807. #include "confdefs.h"
  4808. #include <stdio.h>
  4809. #include <proj.h>
  4810. int main(void) {
  4811. FILE *fp = fopen("conftestdata","w");
  4812. fprintf(fp, "%d", PROJ_VERSION_MAJOR);
  4813. return 0;
  4814. }
  4815. EOF
  4816. if { (eval echo configure:5799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4817. then
  4818. proj_ver_major=`cat conftestdata`
  4819. echo "$ac_t""$proj_ver_major" 1>&6
  4820. else
  4821. echo "configure: failed program was:" >&5
  4822. cat conftest.$ac_ext >&5
  4823. rm -fr conftest*
  4824. { echo "configure: error: *** Could not determine External PROJ major version." 1>&2; exit 1; }
  4825. fi
  4826. rm -fr conftest*
  4827. fi
  4828. CPPFLAGS=$ac_save_cppflags
  4829. echo $ac_n "checking External PROJ minor version""... $ac_c" 1>&6
  4830. echo "configure:5816: checking External PROJ minor version" >&5
  4831. ac_save_cppflags="$CPPFLAGS"
  4832. CPPFLAGS="$PROJINC $CPPFLAGS"
  4833. if test "$cross_compiling" = yes; then
  4834. proj_ver_minor=0
  4835. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4836. else
  4837. cat > conftest.$ac_ext <<EOF
  4838. #line 5824 "configure"
  4839. #include "confdefs.h"
  4840. #include <stdio.h>
  4841. #include <proj.h>
  4842. int main(void) {
  4843. FILE *fp = fopen("conftestdata","w");
  4844. fprintf(fp, "%d", PROJ_VERSION_MINOR);
  4845. return 0;
  4846. }
  4847. EOF
  4848. if { (eval echo configure:5836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4849. then
  4850. proj_ver_minor=`cat conftestdata`
  4851. echo "$ac_t""$proj_ver_minor" 1>&6
  4852. else
  4853. echo "configure: failed program was:" >&5
  4854. cat conftest.$ac_ext >&5
  4855. rm -fr conftest*
  4856. { echo "configure: error: *** Could not determine External PROJ minor version." 1>&2; exit 1; }
  4857. fi
  4858. rm -fr conftest*
  4859. fi
  4860. CPPFLAGS=$ac_save_cppflags
  4861. echo $ac_n "checking External PROJ patch version""... $ac_c" 1>&6
  4862. echo "configure:5853: checking External PROJ patch version" >&5
  4863. ac_save_cppflags="$CPPFLAGS"
  4864. CPPFLAGS="$PROJINC $CPPFLAGS"
  4865. if test "$cross_compiling" = yes; then
  4866. proj_ver_patch=0
  4867. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4868. else
  4869. cat > conftest.$ac_ext <<EOF
  4870. #line 5861 "configure"
  4871. #include "confdefs.h"
  4872. #include <stdio.h>
  4873. #include <proj.h>
  4874. int main(void) {
  4875. FILE *fp = fopen("conftestdata","w");
  4876. fprintf(fp, "%d", PROJ_VERSION_PATCH);
  4877. return 0;
  4878. }
  4879. EOF
  4880. if { (eval echo configure:5873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4881. then
  4882. proj_ver_patch=`cat conftestdata`
  4883. echo "$ac_t""$proj_ver_patch" 1>&6
  4884. else
  4885. echo "configure: failed program was:" >&5
  4886. cat conftest.$ac_ext >&5
  4887. rm -fr conftest*
  4888. { echo "configure: error: *** Could not determine External PROJ patch version." 1>&2; exit 1; }
  4889. fi
  4890. rm -fr conftest*
  4891. fi
  4892. CPPFLAGS=$ac_save_cppflags
  4893. echo "$ac_t""found PROJ version "${proj_ver_major}.${proj_ver_minor}.${proj_ver_patch}"" 1>&6
  4894. PROJMAJOR=${proj_ver_major}
  4895. # minimum required PROJ 5+ version to use the new PROJ API: 5.1.0
  4896. if test ${proj_ver_major} = 5 && test `expr ${proj_ver_minor} \< 1` = 1 ; then
  4897. echo "configure: warning: At least PROJ version "5.1.0" is required for the new API " 1>&2
  4898. PROJ4API=1
  4899. fi
  4900. else
  4901. echo $ac_n "checking External PROJ.4 version""... $ac_c" 1>&6
  4902. echo "configure:5898: checking External PROJ.4 version" >&5
  4903. ac_save_cppflags="$CPPFLAGS"
  4904. CPPFLAGS="$PROJINC $CPPFLAGS"
  4905. if test "$cross_compiling" = yes; then
  4906. proj_ver=0
  4907. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4908. else
  4909. cat > conftest.$ac_ext <<EOF
  4910. #line 5906 "configure"
  4911. #include "confdefs.h"
  4912. #include <stdio.h>
  4913. #include <proj_api.h>
  4914. int main(void) {
  4915. FILE *fp = fopen("conftestdata","w");
  4916. fprintf(fp, "%d", PJ_VERSION);
  4917. return 0;
  4918. }
  4919. EOF
  4920. if { (eval echo configure:5918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4921. then
  4922. proj_ver=`cat conftestdata`
  4923. echo "$ac_t""$proj_ver" 1>&6
  4924. else
  4925. echo "configure: failed program was:" >&5
  4926. cat conftest.$ac_ext >&5
  4927. rm -fr conftest*
  4928. { echo "configure: error: *** Could not determine External PROJ.4 version." 1>&2; exit 1; }
  4929. fi
  4930. rm -fr conftest*
  4931. fi
  4932. CPPFLAGS=$ac_save_cppflags
  4933. if test `expr ${proj_ver} \>= 600` = 1 ; then
  4934. PROJMAJOR=6
  4935. elif test `expr ${proj_ver} \>= 500` = 1 ; then
  4936. PROJMAJOR=5
  4937. elif test `expr ${proj_ver} \>= 400` = 1 ; then
  4938. PROJMAJOR=4
  4939. fi
  4940. echo "$ac_t""found PROJ version "${proj_ver}"" 1>&6
  4941. fi
  4942. if test $PROJ4API = 0 ; then
  4943. echo "$ac_t""using new PROJ version 5+ API" 1>&6
  4944. # With PROJ library directory
  4945. echo $ac_n "checking for location of External PROJ library""... $ac_c" 1>&6
  4946. echo "configure:5950: checking for location of External PROJ library" >&5
  4947. case "$with_proj_libs" in
  4948. y | ye | yes | n | no)
  4949. { echo "configure: error: *** You must supply a directory to --with-proj-libs." 1>&2; exit 1; }
  4950. ;;
  4951. esac
  4952. echo "$ac_t""$with_proj_libs" 1>&6
  4953. if test -n "$with_proj_libs"; then
  4954. for dir in $with_proj_libs; do
  4955. if test -d "$dir"; then
  4956. PROJLIB="$PROJLIB -L$dir"
  4957. else
  4958. { echo "configure: error: *** External PROJ library directory $dir does not exist." 1>&2; exit 1; }
  4959. fi
  4960. done
  4961. fi
  4962. ac_save_ldflags="$LDFLAGS"
  4963. LDFLAGS="$PROJLIB $LDFLAGS"
  4964. echo $ac_n "checking for proj_pj_info in -lproj""... $ac_c" 1>&6
  4965. echo "configure:5974: checking for proj_pj_info in -lproj" >&5
  4966. ac_lib_var=`echo proj'_'proj_pj_info | sed 'y%./+-%__p_%'`
  4967. ac_save_LIBS="$LIBS"
  4968. LIBS="-lproj $LIBS"
  4969. cat > conftest.$ac_ext <<EOF
  4970. #line 5980 "configure"
  4971. #include "confdefs.h"
  4972. /* Override any gcc2 internal prototype to avoid an error. */
  4973. /* We use char because int might match the return type of a gcc2
  4974. builtin and then its argument prototype would still apply. */
  4975. char proj_pj_info();
  4976. int main() {
  4977. proj_pj_info()
  4978. ; return 0; }
  4979. EOF
  4980. if { (eval echo configure:5991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4981. rm -rf conftest*
  4982. eval "ac_cv_lib_$ac_lib_var=yes"
  4983. else
  4984. echo "configure: failed program was:" >&5
  4985. cat conftest.$ac_ext >&5
  4986. rm -rf conftest*
  4987. eval "ac_cv_lib_$ac_lib_var=no"
  4988. fi
  4989. rm -f conftest*
  4990. LIBS="$ac_save_LIBS"
  4991. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4992. echo "$ac_t""yes" 1>&6
  4993. PROJLIB="$PROJLIB -lproj "
  4994. else
  4995. echo "$ac_t""no" 1>&6
  4996. LDFLAGS=${ac_save_ldflags}
  4997. { echo "configure: error: *** Unable to locate External PROJ library." 1>&2; exit 1; }
  4998. fi
  4999. LDFLAGS=${ac_save_ldflags}
  5000. else
  5001. echo "$ac_t""using old PROJ version 4 API" 1>&6
  5002. cat >> confdefs.h <<\EOF
  5003. #define USE_PROJ4API 1
  5004. EOF
  5005. ac_save_cppflags="$CPPFLAGS"
  5006. CPPFLAGS="$PROJINC $CPPFLAGS"
  5007. for ac_hdr in proj_api.h
  5008. do
  5009. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5010. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5011. echo "configure:6034: checking for $ac_hdr" >&5
  5012. cat > conftest.$ac_ext <<EOF
  5013. #line 6037 "configure"
  5014. #include "confdefs.h"
  5015. #include <$ac_hdr>
  5016. EOF
  5017. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5018. { (eval echo configure:6042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5019. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5020. if test -z "$ac_err"; then
  5021. rm -rf conftest*
  5022. eval "ac_cv_header_$ac_safe=yes"
  5023. else
  5024. echo "$ac_err" >&5
  5025. echo "configure: failed program was:" >&5
  5026. cat conftest.$ac_ext >&5
  5027. rm -rf conftest*
  5028. eval "ac_cv_header_$ac_safe=no"
  5029. fi
  5030. rm -f conftest*
  5031. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5032. echo "$ac_t""yes" 1>&6
  5033. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5034. cat >> confdefs.h <<EOF
  5035. #define $ac_tr_hdr 1
  5036. EOF
  5037. else
  5038. echo "$ac_t""no" 1>&6
  5039. { echo "configure: error: *** Unable to locate External PROJ includes." 1>&2; exit 1; }
  5040. fi
  5041. done
  5042. CPPFLAGS=$ac_save_cppflags
  5043. # PROJ version check for v4.x
  5044. if test "$cross_compiling" = yes; then
  5045. echo "configure: warning: *** Cannot check PROJ.4 version (cross-compiling)." 1>&2
  5046. else
  5047. echo $ac_n "checking External PROJ.4 version""... $ac_c" 1>&6
  5048. echo "configure:6078: checking External PROJ.4 version" >&5
  5049. ac_save_cppflags="$CPPFLAGS"
  5050. CPPFLAGS="$PROJINC $CPPFLAGS"
  5051. if test "$cross_compiling" = yes; then
  5052. proj_ver=0
  5053. echo "$ac_t""unknown (cross-compiling)" 1>&6
  5054. else
  5055. cat > conftest.$ac_ext <<EOF
  5056. #line 6086 "configure"
  5057. #include "confdefs.h"
  5058. #include <stdio.h>
  5059. #include <proj_api.h>
  5060. int main(void) {
  5061. FILE *fp = fopen("conftestdata","w");
  5062. fprintf(fp, "%d", PJ_VERSION);
  5063. return 0;
  5064. }
  5065. EOF
  5066. if { (eval echo configure:6098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  5067. then
  5068. proj_ver=`cat conftestdata`
  5069. echo "$ac_t""$proj_ver" 1>&6
  5070. else
  5071. echo "configure: failed program was:" >&5
  5072. cat conftest.$ac_ext >&5
  5073. rm -fr conftest*
  5074. { echo "configure: error: *** Could not determine External PROJ.4 version." 1>&2; exit 1; }
  5075. fi
  5076. rm -fr conftest*
  5077. fi
  5078. CPPFLAGS=$ac_save_cppflags
  5079. if test `expr ${proj_ver} \< 446` = 1 ; then
  5080. { echo "configure: error: *** PROJ.4.4.6 or later is required." 1>&2; exit 1; }
  5081. fi
  5082. fi
  5083. # With PROJ library directory
  5084. echo $ac_n "checking for location of External PROJ.4 library""... $ac_c" 1>&6
  5085. echo "configure:6123: checking for location of External PROJ.4 library" >&5
  5086. case "$with_proj_libs" in
  5087. y | ye | yes | n | no)
  5088. { echo "configure: error: *** You must supply a directory to --with-proj-libs." 1>&2; exit 1; }
  5089. ;;
  5090. esac
  5091. echo "$ac_t""$with_proj_libs" 1>&6
  5092. if test -n "$with_proj_libs"; then
  5093. for dir in $with_proj_libs; do
  5094. if test -d "$dir"; then
  5095. PROJLIB="$PROJLIB -L$dir"
  5096. else
  5097. { echo "configure: error: *** External PROJ.4 library directory $dir does not exist." 1>&2; exit 1; }
  5098. fi
  5099. done
  5100. fi
  5101. ac_save_ldflags="$LDFLAGS"
  5102. LDFLAGS="$PROJLIB $LDFLAGS"
  5103. echo $ac_n "checking for pj_get_def in -lproj""... $ac_c" 1>&6
  5104. echo "configure:6147: checking for pj_get_def in -lproj" >&5
  5105. ac_lib_var=`echo proj'_'pj_get_def | sed 'y%./+-%__p_%'`
  5106. ac_save_LIBS="$LIBS"
  5107. LIBS="-lproj $LIBS"
  5108. cat > conftest.$ac_ext <<EOF
  5109. #line 6153 "configure"
  5110. #include "confdefs.h"
  5111. /* Override any gcc2 internal prototype to avoid an error. */
  5112. /* We use char because int might match the return type of a gcc2
  5113. builtin and then its argument prototype would still apply. */
  5114. char pj_get_def();
  5115. int main() {
  5116. pj_get_def()
  5117. ; return 0; }
  5118. EOF
  5119. if { (eval echo configure:6164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5120. rm -rf conftest*
  5121. eval "ac_cv_lib_$ac_lib_var=yes"
  5122. else
  5123. echo "configure: failed program was:" >&5
  5124. cat conftest.$ac_ext >&5
  5125. rm -rf conftest*
  5126. eval "ac_cv_lib_$ac_lib_var=no"
  5127. fi
  5128. rm -f conftest*
  5129. LIBS="$ac_save_LIBS"
  5130. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5131. echo "$ac_t""yes" 1>&6
  5132. PROJLIB="$PROJLIB -lproj "
  5133. else
  5134. echo "$ac_t""no" 1>&6
  5135. LDFLAGS=${ac_save_ldflags}
  5136. { echo "configure: error: *** Unable to locate External PROJ.4 library." 1>&2; exit 1; }
  5137. fi
  5138. LDFLAGS=${ac_save_ldflags}
  5139. fi
  5140. # With PROJ share directory
  5141. echo $ac_n "checking for location of External PROJ data files""... $ac_c" 1>&6
  5142. echo "configure:6199: checking for location of External PROJ data files" >&5
  5143. case "$with_proj_share" in
  5144. y | ye | yes | n | no)
  5145. { echo "configure: error: *** You must supply a directory to --with-proj-share." 1>&2; exit 1; }
  5146. ;;
  5147. esac
  5148. echo "$ac_t""$with_proj_share" 1>&6
  5149. if test -n "$with_proj_share" ; then
  5150. if test -d "$with_proj_share"; then
  5151. PROJSHARE="$with_proj_share"
  5152. else
  5153. { echo "configure: error: *** External PROJ data directory $dir does not exist." 1>&2; exit 1; }
  5154. fi
  5155. fi
  5156. if test -z "$PROJSHARE" ; then
  5157. echo "configure: warning: *** External PROJ directory not specified; default will be used" 1>&2
  5158. PROJSHARE=/usr/share/proj
  5159. fi
  5160. # check if share/proj/epsg exists only for PROJ < 6
  5161. if test `expr ${PROJMAJOR} \< 6` = 1 ; then
  5162. # LOC_CHECK_SHARE does not work when cross compiling
  5163. if test "$cross_compiling" = "yes" ; then
  5164. echo $ac_n "checking for epsg""... $ac_c" 1>&6
  5165. echo "configure:6225: checking for epsg" >&5
  5166. echo "$ac_t""unknown (cross-compiling)" 1>&6
  5167. else
  5168. ac_safe=`echo "$PROJSHARE/epsg" | sed 'y%./+-%__p_%'`
  5169. echo $ac_n "checking for $PROJSHARE/epsg""... $ac_c" 1>&6
  5170. echo "configure:6232: checking for $PROJSHARE/epsg" >&5
  5171. if test "$cross_compiling" = yes; then
  5172. { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
  5173. else
  5174. if test -r $PROJSHARE/epsg; then
  5175. eval "ac_cv_file_$ac_safe=yes"
  5176. else
  5177. eval "ac_cv_file_$ac_safe=no"
  5178. fi
  5179. fi
  5180. if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  5181. echo "$ac_t""yes" 1>&6
  5182. :
  5183. else
  5184. echo "$ac_t""no" 1>&6
  5185. echo "configure: warning: *** Unable to locate PROJ data files." 1>&2
  5186. fi
  5187. fi
  5188. fi
  5189. # Done checking PROJ
  5190. # Enable regex option
  5191. echo $ac_n "checking whether to use regex""... $ac_c" 1>&6
  5192. echo "configure:6266: checking whether to use regex" >&5
  5193. echo "$ac_t"""$with_regex"" 1>&6
  5194. case "$with_regex" in
  5195. "no") USE_REGEX= ;;
  5196. "yes") USE_REGEX="1" ;;
  5197. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5198. esac
  5199. REGEXINCPATH=
  5200. REGEXLIBPATH=
  5201. REGEXLIB=
  5202. if test -n "$USE_REGEX"; then
  5203. # With regex includes directory
  5204. echo $ac_n "checking for location of regex includes""... $ac_c" 1>&6
  5205. echo "configure:6286: checking for location of regex includes" >&5
  5206. case "$with_regex_includes" in
  5207. y | ye | yes | n | no)
  5208. { echo "configure: error: *** You must supply a directory to --with-regex-includes." 1>&2; exit 1; }
  5209. ;;
  5210. esac
  5211. echo "$ac_t""$with_regex_includes" 1>&6
  5212. if test -n "$with_regex_includes" ; then
  5213. for dir in $with_regex_includes; do
  5214. if test -d "$dir"; then
  5215. REGEXINCPATH="$REGEXINCPATH -I$dir"
  5216. else
  5217. { echo "configure: error: *** regex includes directory $dir does not exist." 1>&2; exit 1; }
  5218. fi
  5219. done
  5220. fi
  5221. ac_save_cppflags="$CPPFLAGS"
  5222. CPPFLAGS="$REGEXINCPATH $CPPFLAGS"
  5223. for ac_hdr in regex.h
  5224. do
  5225. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5226. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5227. echo "configure:6312: checking for $ac_hdr" >&5
  5228. cat > conftest.$ac_ext <<EOF
  5229. #line 6315 "configure"
  5230. #include "confdefs.h"
  5231. #include <$ac_hdr>
  5232. EOF
  5233. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5234. { (eval echo configure:6320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5235. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5236. if test -z "$ac_err"; then
  5237. rm -rf conftest*
  5238. eval "ac_cv_header_$ac_safe=yes"
  5239. else
  5240. echo "$ac_err" >&5
  5241. echo "configure: failed program was:" >&5
  5242. cat conftest.$ac_ext >&5
  5243. rm -rf conftest*
  5244. eval "ac_cv_header_$ac_safe=no"
  5245. fi
  5246. rm -f conftest*
  5247. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5248. echo "$ac_t""yes" 1>&6
  5249. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5250. cat >> confdefs.h <<EOF
  5251. #define $ac_tr_hdr 1
  5252. EOF
  5253. else
  5254. echo "$ac_t""no" 1>&6
  5255. { echo "configure: error: *** Unable to locate regex includes." 1>&2; exit 1; }
  5256. fi
  5257. done
  5258. CPPFLAGS=$ac_save_cppflags
  5259. # With regex library directory
  5260. echo $ac_n "checking for location of regex library""... $ac_c" 1>&6
  5261. echo "configure:6354: checking for location of regex library" >&5
  5262. case "$with_regex_libs" in
  5263. y | ye | yes | n | no)
  5264. { echo "configure: error: *** You must supply a directory to --with-regex-libs." 1>&2; exit 1; }
  5265. ;;
  5266. esac
  5267. echo "$ac_t""$with_regex_libs" 1>&6
  5268. if test -n "$with_regex_libs"; then
  5269. for dir in $with_regex_libs; do
  5270. if test -d "$dir"; then
  5271. REGEXLIBPATH="$REGEXLIBPATH -L$dir"
  5272. else
  5273. { echo "configure: error: *** regex library directory $dir does not exist." 1>&2; exit 1; }
  5274. fi
  5275. done
  5276. fi
  5277. ac_save_libs="$LIBS"
  5278. ac_save_ldflags="$LDFLAGS"
  5279. LIBS=" $LIBS"
  5280. LDFLAGS=" $LDFLAGS"
  5281. echo $ac_n "checking for regcomp""... $ac_c" 1>&6
  5282. echo "configure:6379: checking for regcomp" >&5
  5283. cat > conftest.$ac_ext <<EOF
  5284. #line 6382 "configure"
  5285. #include "confdefs.h"
  5286. /* System header to define __stub macros and hopefully few prototypes,
  5287. which can conflict with char regcomp(); below. */
  5288. #include <assert.h>
  5289. /* Override any gcc2 internal prototype to avoid an error. */
  5290. /* We use char because int might match the return type of a gcc2
  5291. builtin and then its argument prototype would still apply. */
  5292. char regcomp();
  5293. int main() {
  5294. /* The GNU C library defines this for functions which it implements
  5295. to always fail with ENOSYS. Some functions are actually named
  5296. something starting with __ and the normal name is an alias. */
  5297. #if defined (__stub_regcomp) || defined (__stub___regcomp)
  5298. choke me
  5299. #else
  5300. regcomp();
  5301. #endif
  5302. ; return 0; }
  5303. EOF
  5304. if { (eval echo configure:6405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5305. rm -rf conftest*
  5306. eval "ac_cv_func_regcomp=yes"
  5307. else
  5308. echo "configure: failed program was:" >&5
  5309. cat conftest.$ac_ext >&5
  5310. rm -rf conftest*
  5311. eval "ac_cv_func_regcomp=no"
  5312. fi
  5313. rm -f conftest*
  5314. if eval "test \"`echo '$ac_cv_func_'regcomp`\" = yes"; then
  5315. echo "$ac_t""yes" 1>&6
  5316. REGEXLIB="$REGEXLIB "
  5317. else
  5318. echo "$ac_t""no" 1>&6
  5319. ac_save_ldflags="$LDFLAGS"
  5320. LDFLAGS="$REGEXLIBPATH $LDFLAGS"
  5321. echo $ac_n "checking for regcomp in -lregex""... $ac_c" 1>&6
  5322. echo "configure:6432: checking for regcomp in -lregex" >&5
  5323. ac_lib_var=`echo regex'_'regcomp | sed 'y%./+-%__p_%'`
  5324. ac_save_LIBS="$LIBS"
  5325. LIBS="-lregex $LIBS"
  5326. cat > conftest.$ac_ext <<EOF
  5327. #line 6438 "configure"
  5328. #include "confdefs.h"
  5329. /* Override any gcc2 internal prototype to avoid an error. */
  5330. /* We use char because int might match the return type of a gcc2
  5331. builtin and then its argument prototype would still apply. */
  5332. char regcomp();
  5333. int main() {
  5334. regcomp()
  5335. ; return 0; }
  5336. EOF
  5337. if { (eval echo configure:6449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5338. rm -rf conftest*
  5339. eval "ac_cv_lib_$ac_lib_var=yes"
  5340. else
  5341. echo "configure: failed program was:" >&5
  5342. cat conftest.$ac_ext >&5
  5343. rm -rf conftest*
  5344. eval "ac_cv_lib_$ac_lib_var=no"
  5345. fi
  5346. rm -f conftest*
  5347. LIBS="$ac_save_LIBS"
  5348. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5349. echo "$ac_t""yes" 1>&6
  5350. REGEXLIB="$REGEXLIB -lregex "
  5351. else
  5352. echo "$ac_t""no" 1>&6
  5353. LDFLAGS=${ac_save_ldflags}
  5354. { echo "configure: error: *** Unable to locate regex library." 1>&2; exit 1; }
  5355. fi
  5356. LDFLAGS=${ac_save_ldflags}
  5357. fi
  5358. LIBS=${ac_save_libs}
  5359. LDFLAGS=${ac_save_ldflags}
  5360. fi # $USE_REGEX
  5361. # Done checking regex
  5362. # Enable Readline option
  5363. echo $ac_n "checking whether to use Readline""... $ac_c" 1>&6
  5364. echo "configure:6499: checking whether to use Readline" >&5
  5365. echo "$ac_t"""$with_readline"" 1>&6
  5366. case "$with_readline" in
  5367. "no") USE_READLINE= ;;
  5368. "yes") USE_READLINE="1" ;;
  5369. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5370. esac
  5371. READLINEINCPATH=
  5372. READLINELIBPATH=
  5373. READLINELIB=
  5374. HISTORYLIB=
  5375. if test -n "$USE_READLINE"; then
  5376. # With Readline includes directory
  5377. echo $ac_n "checking for location of Readline includes""... $ac_c" 1>&6
  5378. echo "configure:6520: checking for location of Readline includes" >&5
  5379. case "$with_readline_includes" in
  5380. y | ye | yes | n | no)
  5381. { echo "configure: error: *** You must supply a directory to --with-readline-includes." 1>&2; exit 1; }
  5382. ;;
  5383. esac
  5384. echo "$ac_t""$with_readline_includes" 1>&6
  5385. if test -n "$with_readline_includes" ; then
  5386. for dir in $with_readline_includes; do
  5387. if test -d "$dir"; then
  5388. READLINEINCPATH="$READLINEINCPATH -I$dir"
  5389. else
  5390. { echo "configure: error: *** Readline includes directory $dir does not exist." 1>&2; exit 1; }
  5391. fi
  5392. done
  5393. fi
  5394. ac_save_cppflags="$CPPFLAGS"
  5395. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  5396. for ac_hdr in readline/readline.h
  5397. do
  5398. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5399. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5400. echo "configure:6546: checking for $ac_hdr" >&5
  5401. cat > conftest.$ac_ext <<EOF
  5402. #line 6549 "configure"
  5403. #include "confdefs.h"
  5404. #include <$ac_hdr>
  5405. EOF
  5406. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5407. { (eval echo configure:6554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5408. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5409. if test -z "$ac_err"; then
  5410. rm -rf conftest*
  5411. eval "ac_cv_header_$ac_safe=yes"
  5412. else
  5413. echo "$ac_err" >&5
  5414. echo "configure: failed program was:" >&5
  5415. cat conftest.$ac_ext >&5
  5416. rm -rf conftest*
  5417. eval "ac_cv_header_$ac_safe=no"
  5418. fi
  5419. rm -f conftest*
  5420. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5421. echo "$ac_t""yes" 1>&6
  5422. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5423. cat >> confdefs.h <<EOF
  5424. #define $ac_tr_hdr 1
  5425. EOF
  5426. else
  5427. echo "$ac_t""no" 1>&6
  5428. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  5429. fi
  5430. done
  5431. CPPFLAGS=$ac_save_cppflags
  5432. ac_save_cppflags="$CPPFLAGS"
  5433. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  5434. for ac_hdr in readline/history.h
  5435. do
  5436. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5437. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5438. echo "configure:6590: checking for $ac_hdr" >&5
  5439. cat > conftest.$ac_ext <<EOF
  5440. #line 6593 "configure"
  5441. #include "confdefs.h"
  5442. #include <$ac_hdr>
  5443. EOF
  5444. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5445. { (eval echo configure:6598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5446. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5447. if test -z "$ac_err"; then
  5448. rm -rf conftest*
  5449. eval "ac_cv_header_$ac_safe=yes"
  5450. else
  5451. echo "$ac_err" >&5
  5452. echo "configure: failed program was:" >&5
  5453. cat conftest.$ac_ext >&5
  5454. rm -rf conftest*
  5455. eval "ac_cv_header_$ac_safe=no"
  5456. fi
  5457. rm -f conftest*
  5458. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5459. echo "$ac_t""yes" 1>&6
  5460. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5461. cat >> confdefs.h <<EOF
  5462. #define $ac_tr_hdr 1
  5463. EOF
  5464. else
  5465. echo "$ac_t""no" 1>&6
  5466. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  5467. fi
  5468. done
  5469. CPPFLAGS=$ac_save_cppflags
  5470. # With Readline library directory
  5471. echo $ac_n "checking for location of Readline library""... $ac_c" 1>&6
  5472. echo "configure:6632: checking for location of Readline library" >&5
  5473. case "$with_readline_libs" in
  5474. y | ye | yes | n | no)
  5475. { echo "configure: error: *** You must supply a directory to --with-readline-libs." 1>&2; exit 1; }
  5476. ;;
  5477. esac
  5478. echo "$ac_t""$with_readline_libs" 1>&6
  5479. if test -n "$with_readline_libs"; then
  5480. for dir in $with_readline_libs; do
  5481. if test -d "$dir"; then
  5482. READLINELIBPATH="$READLINELIBPATH -L$dir"
  5483. else
  5484. { echo "configure: error: *** Readline library directory $dir does not exist." 1>&2; exit 1; }
  5485. fi
  5486. done
  5487. fi
  5488. ac_save_ldflags="$LDFLAGS"
  5489. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  5490. echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
  5491. echo "configure:6657: checking for readline in -lreadline" >&5
  5492. ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
  5493. ac_save_LIBS="$LIBS"
  5494. LIBS="-lreadline $LIBS"
  5495. cat > conftest.$ac_ext <<EOF
  5496. #line 6663 "configure"
  5497. #include "confdefs.h"
  5498. /* Override any gcc2 internal prototype to avoid an error. */
  5499. /* We use char because int might match the return type of a gcc2
  5500. builtin and then its argument prototype would still apply. */
  5501. char readline();
  5502. int main() {
  5503. readline()
  5504. ; return 0; }
  5505. EOF
  5506. if { (eval echo configure:6674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5507. rm -rf conftest*
  5508. eval "ac_cv_lib_$ac_lib_var=yes"
  5509. else
  5510. echo "configure: failed program was:" >&5
  5511. cat conftest.$ac_ext >&5
  5512. rm -rf conftest*
  5513. eval "ac_cv_lib_$ac_lib_var=no"
  5514. fi
  5515. rm -f conftest*
  5516. LIBS="$ac_save_LIBS"
  5517. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5518. echo "$ac_t""yes" 1>&6
  5519. READLINELIB="$READLINELIB -lreadline "
  5520. else
  5521. echo "$ac_t""no" 1>&6
  5522. LDFLAGS=${ac_save_ldflags}
  5523. { echo "configure: error: *** Unable to locate Readline library." 1>&2; exit 1; }
  5524. fi
  5525. LDFLAGS=${ac_save_ldflags}
  5526. ac_save_ldflags="$LDFLAGS"
  5527. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  5528. echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
  5529. echo "configure:6709: checking for add_history in -lhistory" >&5
  5530. ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
  5531. ac_save_LIBS="$LIBS"
  5532. LIBS="-lhistory $LIBS"
  5533. cat > conftest.$ac_ext <<EOF
  5534. #line 6715 "configure"
  5535. #include "confdefs.h"
  5536. /* Override any gcc2 internal prototype to avoid an error. */
  5537. /* We use char because int might match the return type of a gcc2
  5538. builtin and then its argument prototype would still apply. */
  5539. char add_history();
  5540. int main() {
  5541. add_history()
  5542. ; return 0; }
  5543. EOF
  5544. if { (eval echo configure:6726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5545. rm -rf conftest*
  5546. eval "ac_cv_lib_$ac_lib_var=yes"
  5547. else
  5548. echo "configure: failed program was:" >&5
  5549. cat conftest.$ac_ext >&5
  5550. rm -rf conftest*
  5551. eval "ac_cv_lib_$ac_lib_var=no"
  5552. fi
  5553. rm -f conftest*
  5554. LIBS="$ac_save_LIBS"
  5555. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5556. echo "$ac_t""yes" 1>&6
  5557. HISTORYLIB="$HISTORYLIB -lhistory "
  5558. else
  5559. echo "$ac_t""no" 1>&6
  5560. LDFLAGS=${ac_save_ldflags}
  5561. { echo "configure: error: *** Unable to locate History library." 1>&2; exit 1; }
  5562. fi
  5563. LDFLAGS=${ac_save_ldflags}
  5564. fi # $USE_READLINE
  5565. # Done checking Readline
  5566. # GDAL option
  5567. echo $ac_n "checking whether to use GDAL""... $ac_c" 1>&6
  5568. echo "configure:6768: checking whether to use GDAL" >&5
  5569. GDAL_LIBS=
  5570. GDAL_CFLAGS=
  5571. USE_GDAL=
  5572. USE_OGR=
  5573. if test "`basename xx/$with_gdal`" = "gdal-config" ; then
  5574. GDAL_CONFIG="$with_gdal"
  5575. fi
  5576. if test "$with_gdal" = "no" ; then
  5577. echo "$ac_t""no" 1>&6
  5578. else
  5579. echo "$ac_t""yes" 1>&6
  5580. # Extract the first word of "gdal-config", so it can be a program name with args.
  5581. set dummy gdal-config; ac_word=$2
  5582. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5583. echo "configure:6786: checking for $ac_word" >&5
  5584. case "$GDAL_CONFIG" in
  5585. /*)
  5586. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a path.
  5587. ;;
  5588. ?:/*)
  5589. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a dos path.
  5590. ;;
  5591. *)
  5592. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5593. ac_dummy="$PATH"
  5594. for ac_dir in $ac_dummy; do
  5595. test -z "$ac_dir" && ac_dir=.
  5596. if test -f $ac_dir/$ac_word; then
  5597. ac_cv_path_GDAL_CONFIG="$ac_dir/$ac_word"
  5598. break
  5599. fi
  5600. done
  5601. IFS="$ac_save_ifs"
  5602. test -z "$ac_cv_path_GDAL_CONFIG" && ac_cv_path_GDAL_CONFIG="no"
  5603. ;;
  5604. esac
  5605. GDAL_CONFIG="$ac_cv_path_GDAL_CONFIG"
  5606. if test -n "$GDAL_CONFIG"; then
  5607. echo "$ac_t""$GDAL_CONFIG" 1>&6
  5608. else
  5609. echo "$ac_t""no" 1>&6
  5610. fi
  5611. if test "$GDAL_CONFIG" = "no" ; then
  5612. { echo "configure: error: *** couldn't find gdal-config" 1>&2; exit 1; }
  5613. fi
  5614. if test "$GDAL_CONFIG" != "" ; then
  5615. GDAL_LIBS=`"$GDAL_CONFIG" --libs`
  5616. GDAL_DEP_LIBS=`"$GDAL_CONFIG" --dep-libs`
  5617. GDAL_CFLAGS=`"$GDAL_CONFIG" --cflags`
  5618. USE_GDAL=1
  5619. if test `"$GDAL_CONFIG" --ogr-enabled` = "yes" ; then
  5620. cat >> confdefs.h <<\EOF
  5621. #define HAVE_OGR 1
  5622. EOF
  5623. USE_OGR=1
  5624. fi
  5625. fi
  5626. GDAL=
  5627. ac_save_libs="$LIBS"
  5628. ac_save_cflags="$CFLAGS"
  5629. LIBS="$LIBS $GDAL_LIBS"
  5630. CFLAGS="$CFLAGS $GDAL_CFLAGS"
  5631. cat > conftest.$ac_ext <<EOF
  5632. #line 6841 "configure"
  5633. #include "confdefs.h"
  5634. #include <gdal.h>
  5635. int main() {
  5636. GDALOpen("foo", GA_ReadOnly);
  5637. ; return 0; }
  5638. EOF
  5639. if { (eval echo configure:6848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5640. :
  5641. else
  5642. echo "configure: failed program was:" >&5
  5643. cat conftest.$ac_ext >&5
  5644. rm -rf conftest*
  5645. LIBS="$LIBS $GDAL_DEP_LIBS"
  5646. cat > conftest.$ac_ext <<EOF
  5647. #line 6857 "configure"
  5648. #include "confdefs.h"
  5649. #include <gdal.h>
  5650. int main() {
  5651. GDALOpen("foo", GA_ReadOnly);
  5652. ; return 0; }
  5653. EOF
  5654. if { (eval echo configure:6864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5655. rm -rf conftest*
  5656. GDAL_LIBS="$GDAL_LIBS $GDAL_DEP_LIBS"
  5657. else
  5658. echo "configure: failed program was:" >&5
  5659. cat conftest.$ac_ext >&5
  5660. rm -rf conftest*
  5661. { echo "configure: error: *** Unable to locate GDAL library." 1>&2; exit 1; }
  5662. fi
  5663. rm -f conftest*
  5664. fi
  5665. rm -f conftest*
  5666. LIBS=${ac_save_libs}
  5667. CFLAGS=${ac_save_cflags}
  5668. cat >> confdefs.h <<\EOF
  5669. #define HAVE_GDAL 1
  5670. EOF
  5671. fi
  5672. # libLAS option
  5673. echo $ac_n "checking whether to use libLAS""... $ac_c" 1>&6
  5674. echo "configure:6896: checking whether to use libLAS" >&5
  5675. LIBLAS_LIBS=
  5676. LIBLAS_CFLAGS=
  5677. USE_LIBLAS=
  5678. if test "`basename xx/$with_liblas`" = "liblas-config" ; then
  5679. LIBLAS_CONFIG="$with_liblas"
  5680. fi
  5681. if test "$with_liblas" = "no" ; then
  5682. echo "$ac_t""no" 1>&6
  5683. else
  5684. echo "$ac_t""yes" 1>&6
  5685. # Extract the first word of "liblas-config", so it can be a program name with args.
  5686. set dummy liblas-config; ac_word=$2
  5687. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5688. echo "configure:6913: checking for $ac_word" >&5
  5689. case "$LIBLAS_CONFIG" in
  5690. /*)
  5691. ac_cv_path_LIBLAS_CONFIG="$LIBLAS_CONFIG" # Let the user override the test with a path.
  5692. ;;
  5693. ?:/*)
  5694. ac_cv_path_LIBLAS_CONFIG="$LIBLAS_CONFIG" # Let the user override the test with a dos path.
  5695. ;;
  5696. *)
  5697. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5698. ac_dummy="$PATH"
  5699. for ac_dir in $ac_dummy; do
  5700. test -z "$ac_dir" && ac_dir=.
  5701. if test -f $ac_dir/$ac_word; then
  5702. ac_cv_path_LIBLAS_CONFIG="$ac_dir/$ac_word"
  5703. break
  5704. fi
  5705. done
  5706. IFS="$ac_save_ifs"
  5707. test -z "$ac_cv_path_LIBLAS_CONFIG" && ac_cv_path_LIBLAS_CONFIG="no"
  5708. ;;
  5709. esac
  5710. LIBLAS_CONFIG="$ac_cv_path_LIBLAS_CONFIG"
  5711. if test -n "$LIBLAS_CONFIG"; then
  5712. echo "$ac_t""$LIBLAS_CONFIG" 1>&6
  5713. else
  5714. echo "$ac_t""no" 1>&6
  5715. fi
  5716. if test "$LIBLAS_CONFIG" = "no" ; then
  5717. { echo "configure: error: *** couldn't find liblas-config" 1>&2; exit 1; }
  5718. fi
  5719. if test "$LIBLAS_CONFIG" != "" ; then
  5720. LIBLAS_LIBS=`"$LIBLAS_CONFIG" --libs`
  5721. LIBLAS_CFLAGS=`"$LIBLAS_CONFIG" --cflags`
  5722. LIBLAS_INC=`"$LIBLAS_CONFIG" --includes`
  5723. USE_LIBLAS=1
  5724. fi
  5725. LIBLAS=
  5726. ac_save_libs="$LIBS"
  5727. ac_save_cflags="$CFLAGS"
  5728. ac_save_cppflags="$CPPFLAGS"
  5729. LIBS="$LIBS $LIBLAS_LIBS"
  5730. CFLAGS="$CFLAGS $LIBLAS_CFLAGS"
  5731. CPPFLAGS="$CPPFLAGS $LIBLAS_INC"
  5732. for ac_hdr in liblas/capi/liblas.h
  5733. do
  5734. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5735. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5736. echo "configure:6966: checking for $ac_hdr" >&5
  5737. cat > conftest.$ac_ext <<EOF
  5738. #line 6969 "configure"
  5739. #include "confdefs.h"
  5740. #include <$ac_hdr>
  5741. EOF
  5742. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5743. { (eval echo configure:6974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5744. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5745. if test -z "$ac_err"; then
  5746. rm -rf conftest*
  5747. eval "ac_cv_header_$ac_safe=yes"
  5748. else
  5749. echo "$ac_err" >&5
  5750. echo "configure: failed program was:" >&5
  5751. cat conftest.$ac_ext >&5
  5752. rm -rf conftest*
  5753. eval "ac_cv_header_$ac_safe=no"
  5754. fi
  5755. rm -f conftest*
  5756. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5757. echo "$ac_t""yes" 1>&6
  5758. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5759. cat >> confdefs.h <<EOF
  5760. #define $ac_tr_hdr 1
  5761. EOF
  5762. else
  5763. echo "$ac_t""no" 1>&6
  5764. fi
  5765. done
  5766. cat > conftest.$ac_ext <<EOF
  5767. #line 7000 "configure"
  5768. #include "confdefs.h"
  5769. #include <liblas/capi/liblas.h>
  5770. int main() {
  5771. LASReader_Create("foo");
  5772. ; return 0; }
  5773. EOF
  5774. if { (eval echo configure:7007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5775. :
  5776. else
  5777. echo "configure: failed program was:" >&5
  5778. cat conftest.$ac_ext >&5
  5779. rm -rf conftest*
  5780. cat > conftest.$ac_ext <<EOF
  5781. #line 7015 "configure"
  5782. #include "confdefs.h"
  5783. #include <liblas/capi/liblas.h>
  5784. int main() {
  5785. LASReader_Create("foo");
  5786. ; return 0; }
  5787. EOF
  5788. if { (eval echo configure:7022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5789. rm -rf conftest*
  5790. LAS_LIBS="$LAS_LIBS"
  5791. else
  5792. echo "configure: failed program was:" >&5
  5793. cat conftest.$ac_ext >&5
  5794. rm -rf conftest*
  5795. { echo "configure: error: *** Unable to locate libLAS library." 1>&2; exit 1; }
  5796. fi
  5797. rm -f conftest*
  5798. fi
  5799. rm -f conftest*
  5800. LIBS=${ac_save_libs}
  5801. CFLAGS=${ac_save_cflags}
  5802. CPPFLAGS=${ac_save_cppflags}
  5803. cat >> confdefs.h <<\EOF
  5804. #define HAVE_LIBLAS 1
  5805. EOF
  5806. fi
  5807. # PDAL option
  5808. echo $ac_n "checking whether to use PDAL""... $ac_c" 1>&6
  5809. echo "configure:7055: checking whether to use PDAL" >&5
  5810. # new and currently used way to switch language to C++
  5811. # AC_LANG_PUSH(C++)
  5812. ac_ext=C
  5813. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  5814. ac_cpp='$CXXCPP $CPPFLAGS'
  5815. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  5816. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  5817. cross_compiling=$ac_cv_prog_cxx_cross
  5818. PDAL_LIBS=
  5819. PDAL_CPPFLAGS=
  5820. USE_PDAL=
  5821. if test "`basename xx/$with_pdal`" = "pdal-config" ; then
  5822. PDAL_CONFIG="$with_pdal"
  5823. fi
  5824. if test "$with_pdal" = "no" ; then
  5825. echo "$ac_t""no" 1>&6
  5826. else
  5827. echo "$ac_t""yes" 1>&6
  5828. # Extract the first word of "pdal-config", so it can be a program name with args.
  5829. set dummy pdal-config; ac_word=$2
  5830. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5831. echo "configure:7083: checking for $ac_word" >&5
  5832. case "$PDAL_CONFIG" in
  5833. /*)
  5834. ac_cv_path_PDAL_CONFIG="$PDAL_CONFIG" # Let the user override the test with a path.
  5835. ;;
  5836. ?:/*)
  5837. ac_cv_path_PDAL_CONFIG="$PDAL_CONFIG" # Let the user override the test with a dos path.
  5838. ;;
  5839. *)
  5840. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5841. ac_dummy="$PATH"
  5842. for ac_dir in $ac_dummy; do
  5843. test -z "$ac_dir" && ac_dir=.
  5844. if test -f $ac_dir/$ac_word; then
  5845. ac_cv_path_PDAL_CONFIG="$ac_dir/$ac_word"
  5846. break
  5847. fi
  5848. done
  5849. IFS="$ac_save_ifs"
  5850. test -z "$ac_cv_path_PDAL_CONFIG" && ac_cv_path_PDAL_CONFIG="no"
  5851. ;;
  5852. esac
  5853. PDAL_CONFIG="$ac_cv_path_PDAL_CONFIG"
  5854. if test -n "$PDAL_CONFIG"; then
  5855. echo "$ac_t""$PDAL_CONFIG" 1>&6
  5856. else
  5857. echo "$ac_t""no" 1>&6
  5858. fi
  5859. if test "$PDAL_CONFIG" = "no" ; then
  5860. { echo "configure: error: *** could not find pdal-config" 1>&2; exit 1; }
  5861. fi
  5862. if test "$PDAL_CONFIG" != "" ; then
  5863. PDAL_LIBS=`"$PDAL_CONFIG" --libs`
  5864. PDAL_CPPFLAGS=`"$PDAL_CONFIG" --cxxflags`
  5865. PDAL_INC=`"$PDAL_CONFIG" --includes`
  5866. USE_PDAL=1
  5867. fi
  5868. PDAL=
  5869. ac_save_libs="$LIBS"
  5870. ac_save_cflags="$CFLAGS"
  5871. ac_save_cppflags="$CPPFLAGS"
  5872. LIBS="$LIBS $PDAL_LIBS"
  5873. CFLAGS="$CFLAGS $PDAL_CFLAGS"
  5874. CPPFLAGS="$CPPFLAGS $PDAL_CPPFLAGS $PDAL_INC"
  5875. cat > conftest.$ac_ext <<EOF
  5876. #line 7133 "configure"
  5877. #include "confdefs.h"
  5878. #include <pdal/PointTable.hpp>
  5879. int main() {
  5880. pdal::PointTable table;
  5881. ; return 0; }
  5882. EOF
  5883. if { (eval echo configure:7140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5884. :
  5885. else
  5886. echo "configure: failed program was:" >&5
  5887. cat conftest.$ac_ext >&5
  5888. rm -rf conftest*
  5889. cat > conftest.$ac_ext <<EOF
  5890. #line 7148 "configure"
  5891. #include "confdefs.h"
  5892. #include <pdal/PointTable.hpp>
  5893. int main() {
  5894. pdal::PointTable table;
  5895. ; return 0; }
  5896. EOF
  5897. if { (eval echo configure:7155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5898. rm -rf conftest*
  5899. PDAL_LIBS="$PDAL_LIBS"
  5900. else
  5901. echo "configure: failed program was:" >&5
  5902. cat conftest.$ac_ext >&5
  5903. rm -rf conftest*
  5904. { echo "configure: error: *** Unable to locate PDAL library." 1>&2; exit 1; }
  5905. fi
  5906. rm -f conftest*
  5907. fi
  5908. rm -f conftest*
  5909. LIBS=${ac_save_libs}
  5910. CFLAGS=${ac_save_cflags}
  5911. CPPFLAGS=${ac_save_cppflags}
  5912. cat >> confdefs.h <<\EOF
  5913. #define HAVE_PDAL 1
  5914. EOF
  5915. fi
  5916. # new and currently used way to switch language back to C
  5917. # AC_LANG_POP(C++)
  5918. ac_ext=c
  5919. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  5920. ac_cpp='$CPP $CPPFLAGS'
  5921. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  5922. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  5923. cross_compiling=$ac_cv_prog_cc_cross
  5924. ac_ext=c
  5925. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  5926. ac_cpp='$CPP $CPPFLAGS'
  5927. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  5928. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  5929. cross_compiling=$ac_cv_prog_cc_cross
  5930. # NetCDF option
  5931. echo $ac_n "checking whether to use NetCDF""... $ac_c" 1>&6
  5932. echo "configure:7205: checking whether to use NetCDF" >&5
  5933. NETCDF_LIBS=
  5934. NETCDF_CFLAGS=
  5935. USE_NETCDF=
  5936. if test "`basename xx/$with_netcdf`" = "nc-config" ; then
  5937. NETCDF_CONFIG="$with_netcdf"
  5938. fi
  5939. if test "$with_netcdf" = "no" ; then
  5940. echo "$ac_t""no" 1>&6
  5941. else
  5942. echo "$ac_t""yes" 1>&6
  5943. # Extract the first word of "nc-config", so it can be a program name with args.
  5944. set dummy nc-config; ac_word=$2
  5945. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5946. echo "configure:7222: checking for $ac_word" >&5
  5947. case "$NETCDF_CONFIG" in
  5948. /*)
  5949. ac_cv_path_NETCDF_CONFIG="$NETCDF_CONFIG" # Let the user override the test with a path.
  5950. ;;
  5951. ?:/*)
  5952. ac_cv_path_NETCDF_CONFIG="$NETCDF_CONFIG" # Let the user override the test with a dos path.
  5953. ;;
  5954. *)
  5955. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5956. ac_dummy="$PATH"
  5957. for ac_dir in $ac_dummy; do
  5958. test -z "$ac_dir" && ac_dir=.
  5959. if test -f $ac_dir/$ac_word; then
  5960. ac_cv_path_NETCDF_CONFIG="$ac_dir/$ac_word"
  5961. break
  5962. fi
  5963. done
  5964. IFS="$ac_save_ifs"
  5965. test -z "$ac_cv_path_NETCDF_CONFIG" && ac_cv_path_NETCDF_CONFIG="no"
  5966. ;;
  5967. esac
  5968. NETCDF_CONFIG="$ac_cv_path_NETCDF_CONFIG"
  5969. if test -n "$NETCDF_CONFIG"; then
  5970. echo "$ac_t""$NETCDF_CONFIG" 1>&6
  5971. else
  5972. echo "$ac_t""no" 1>&6
  5973. fi
  5974. if test "$NETCDF_CONFIG" = "no" ; then
  5975. { echo "configure: error: *** couldn't find nc-config" 1>&2; exit 1; }
  5976. fi
  5977. if test "$NETCDF_CONFIG" != "" ; then
  5978. NETCDF_LIBS=`"$NETCDF_CONFIG" --libs`
  5979. NETCDF_CFLAGS=`"$NETCDF_CONFIG" --cflags`
  5980. USE_NETCDF=1
  5981. fi
  5982. NETCDF=
  5983. ac_save_libs="$LIBS"
  5984. ac_save_cflags="$CFLAGS"
  5985. LIBS="$LIBS $NETCDF_LIBS"
  5986. CFLAGS="$CFLAGS $NETCDF_CFLAGS"
  5987. cat > conftest.$ac_ext <<EOF
  5988. #line 7269 "configure"
  5989. #include "confdefs.h"
  5990. #include <netcdf.h>
  5991. int main() {
  5992. nc_create("foo", NC_CLOBBER, NULL);
  5993. ; return 0; }
  5994. EOF
  5995. if { (eval echo configure:7276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5996. :
  5997. else
  5998. echo "configure: failed program was:" >&5
  5999. cat conftest.$ac_ext >&5
  6000. rm -rf conftest*
  6001. cat > conftest.$ac_ext <<EOF
  6002. #line 7284 "configure"
  6003. #include "confdefs.h"
  6004. #include <netcdf.h>
  6005. int main() {
  6006. nc_create("foo", NC_CLOBBER, NULL);
  6007. ; return 0; }
  6008. EOF
  6009. if { (eval echo configure:7291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6010. rm -rf conftest*
  6011. NETCDF_LIBS="$NETCDF_LIBS"
  6012. else
  6013. echo "configure: failed program was:" >&5
  6014. cat conftest.$ac_ext >&5
  6015. rm -rf conftest*
  6016. { echo "configure: error: *** Unable to locate NetCDF library." 1>&2; exit 1; }
  6017. fi
  6018. rm -f conftest*
  6019. fi
  6020. rm -f conftest*
  6021. LIBS=${ac_save_libs}
  6022. CFLAGS=${ac_save_cflags}
  6023. cat >> confdefs.h <<\EOF
  6024. #define HAVE_NETCDF 1
  6025. EOF
  6026. fi
  6027. # GEOS option
  6028. echo $ac_n "checking whether to use GEOS""... $ac_c" 1>&6
  6029. echo "configure:7322: checking whether to use GEOS" >&5
  6030. GEOS_LIBS=
  6031. GEOS_CFLAGS=
  6032. USE_GEOS=
  6033. # FIXME: "quote" $with_geos ?
  6034. if test "`basename xx/$with_geos`" = "geos-config" ; then
  6035. GEOS_CONFIG="$with_geos"
  6036. fi
  6037. if test "$with_geos" = "no" ; then
  6038. echo "$ac_t""no" 1>&6
  6039. else
  6040. echo "$ac_t""yes" 1>&6
  6041. # Extract the first word of "geos-config", so it can be a program name with args.
  6042. set dummy geos-config; ac_word=$2
  6043. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  6044. echo "configure:7340: checking for $ac_word" >&5
  6045. case "$GEOS_CONFIG" in
  6046. /*)
  6047. ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a path.
  6048. ;;
  6049. ?:/*)
  6050. ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a dos path.
  6051. ;;
  6052. *)
  6053. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  6054. ac_dummy="$PATH"
  6055. for ac_dir in $ac_dummy; do
  6056. test -z "$ac_dir" && ac_dir=.
  6057. if test -f $ac_dir/$ac_word; then
  6058. ac_cv_path_GEOS_CONFIG="$ac_dir/$ac_word"
  6059. break
  6060. fi
  6061. done
  6062. IFS="$ac_save_ifs"
  6063. test -z "$ac_cv_path_GEOS_CONFIG" && ac_cv_path_GEOS_CONFIG="no"
  6064. ;;
  6065. esac
  6066. GEOS_CONFIG="$ac_cv_path_GEOS_CONFIG"
  6067. if test -n "$GEOS_CONFIG"; then
  6068. echo "$ac_t""$GEOS_CONFIG" 1>&6
  6069. else
  6070. echo "$ac_t""no" 1>&6
  6071. fi
  6072. if test "$GEOS_CONFIG" = "no" ; then
  6073. { echo "configure: error: *** couldn't find geos-config" 1>&2; exit 1; }
  6074. fi
  6075. if test "$GEOS_CONFIG" != "" ; then
  6076. GEOS_LIBS=`"$GEOS_CONFIG" --clibs`
  6077. GEOS_CFLAGS=`"$GEOS_CONFIG" --cflags`
  6078. USE_GEOS=1
  6079. fi
  6080. ac_save_cppflags="$CPPFLAGS"
  6081. CPPFLAGS="$GEOS_CFLAGS $CPPFLAGS"
  6082. for ac_hdr in geos_c.h
  6083. do
  6084. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6085. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6086. echo "configure:7388: checking for $ac_hdr" >&5
  6087. cat > conftest.$ac_ext <<EOF
  6088. #line 7391 "configure"
  6089. #include "confdefs.h"
  6090. #include <$ac_hdr>
  6091. EOF
  6092. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6093. { (eval echo configure:7396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6094. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6095. if test -z "$ac_err"; then
  6096. rm -rf conftest*
  6097. eval "ac_cv_header_$ac_safe=yes"
  6098. else
  6099. echo "$ac_err" >&5
  6100. echo "configure: failed program was:" >&5
  6101. cat conftest.$ac_ext >&5
  6102. rm -rf conftest*
  6103. eval "ac_cv_header_$ac_safe=no"
  6104. fi
  6105. rm -f conftest*
  6106. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6107. echo "$ac_t""yes" 1>&6
  6108. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6109. cat >> confdefs.h <<EOF
  6110. #define $ac_tr_hdr 1
  6111. EOF
  6112. else
  6113. echo "$ac_t""no" 1>&6
  6114. { echo "configure: error: *** Unable to locate GEOS includes." 1>&2; exit 1; }
  6115. fi
  6116. done
  6117. CPPFLAGS=$ac_save_cppflags
  6118. ### geos 3.3.6 installs geos_c.lib, see http://osgeo-org.1560.n6.nabble.com/osgeo4w-329-update-geos-to-3-3-6-td5024605.html
  6119. # if test "$MINGW32" = yes ; then
  6120. # LOC_CHECK_LIBS(geos_c_i,initGEOS,GEOS,$GEOS_LIBS,GEOS_LIBS)
  6121. # else
  6122. ac_save_ldflags="$LDFLAGS"
  6123. LDFLAGS="$GEOS_LIBS $LDFLAGS"
  6124. echo $ac_n "checking for initGEOS in -lgeos_c""... $ac_c" 1>&6
  6125. echo "configure:7435: checking for initGEOS in -lgeos_c" >&5
  6126. ac_lib_var=`echo geos_c'_'initGEOS | sed 'y%./+-%__p_%'`
  6127. ac_save_LIBS="$LIBS"
  6128. LIBS="-lgeos_c $LIBS"
  6129. cat > conftest.$ac_ext <<EOF
  6130. #line 7441 "configure"
  6131. #include "confdefs.h"
  6132. /* Override any gcc2 internal prototype to avoid an error. */
  6133. /* We use char because int might match the return type of a gcc2
  6134. builtin and then its argument prototype would still apply. */
  6135. char initGEOS();
  6136. int main() {
  6137. initGEOS()
  6138. ; return 0; }
  6139. EOF
  6140. if { (eval echo configure:7452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6141. rm -rf conftest*
  6142. eval "ac_cv_lib_$ac_lib_var=yes"
  6143. else
  6144. echo "configure: failed program was:" >&5
  6145. cat conftest.$ac_ext >&5
  6146. rm -rf conftest*
  6147. eval "ac_cv_lib_$ac_lib_var=no"
  6148. fi
  6149. rm -f conftest*
  6150. LIBS="$ac_save_LIBS"
  6151. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6152. echo "$ac_t""yes" 1>&6
  6153. GEOS_LIBS="$GEOS_LIBS -lgeos_c "
  6154. else
  6155. echo "$ac_t""no" 1>&6
  6156. LDFLAGS=${ac_save_ldflags}
  6157. { echo "configure: error: *** Unable to locate GEOS library." 1>&2; exit 1; }
  6158. fi
  6159. LDFLAGS=${ac_save_ldflags}
  6160. # fi
  6161. cat >> confdefs.h <<\EOF
  6162. #define HAVE_GEOS 1
  6163. EOF
  6164. fi
  6165. # Enable TIFF option
  6166. echo $ac_n "checking whether to use TIFF""... $ac_c" 1>&6
  6167. echo "configure:7496: checking whether to use TIFF" >&5
  6168. echo "$ac_t"""$with_tiff"" 1>&6
  6169. case "$with_tiff" in
  6170. "no") USE_TIFF= ;;
  6171. "yes") USE_TIFF="1" ;;
  6172. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6173. esac
  6174. TIFF_INCLUDE_DIRS=
  6175. TIFF_LIBRARY_DIRS=
  6176. TIFFLIB=
  6177. if test -n "$USE_TIFF"; then
  6178. # With TIFF includes directory
  6179. echo $ac_n "checking for location of TIFF includes""... $ac_c" 1>&6
  6180. echo "configure:7516: checking for location of TIFF includes" >&5
  6181. case "$with_tiff_includes" in
  6182. y | ye | yes | n | no)
  6183. { echo "configure: error: *** You must supply a directory to --with-tiff-includes." 1>&2; exit 1; }
  6184. ;;
  6185. esac
  6186. echo "$ac_t""$with_tiff_includes" 1>&6
  6187. if test -n "$with_tiff_includes" ; then
  6188. for dir in $with_tiff_includes; do
  6189. if test -d "$dir"; then
  6190. TIFF_INCLUDE_DIRS="$TIFF_INCLUDE_DIRS -I$dir"
  6191. else
  6192. { echo "configure: error: *** TIFF includes directory $dir does not exist." 1>&2; exit 1; }
  6193. fi
  6194. done
  6195. fi
  6196. ac_save_cppflags="$CPPFLAGS"
  6197. CPPFLAGS="$TIFF_INCLUDE_DIRS $CPPFLAGS"
  6198. for ac_hdr in tiffio.h
  6199. do
  6200. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6201. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6202. echo "configure:7542: checking for $ac_hdr" >&5
  6203. cat > conftest.$ac_ext <<EOF
  6204. #line 7545 "configure"
  6205. #include "confdefs.h"
  6206. #include <$ac_hdr>
  6207. EOF
  6208. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6209. { (eval echo configure:7550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6210. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6211. if test -z "$ac_err"; then
  6212. rm -rf conftest*
  6213. eval "ac_cv_header_$ac_safe=yes"
  6214. else
  6215. echo "$ac_err" >&5
  6216. echo "configure: failed program was:" >&5
  6217. cat conftest.$ac_ext >&5
  6218. rm -rf conftest*
  6219. eval "ac_cv_header_$ac_safe=no"
  6220. fi
  6221. rm -f conftest*
  6222. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6223. echo "$ac_t""yes" 1>&6
  6224. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6225. cat >> confdefs.h <<EOF
  6226. #define $ac_tr_hdr 1
  6227. EOF
  6228. else
  6229. echo "$ac_t""no" 1>&6
  6230. { echo "configure: error: *** Unable to locate TIFF includes." 1>&2; exit 1; }
  6231. fi
  6232. done
  6233. CPPFLAGS=$ac_save_cppflags
  6234. # With TIFF library directory
  6235. echo $ac_n "checking for location of TIFF library""... $ac_c" 1>&6
  6236. echo "configure:7584: checking for location of TIFF library" >&5
  6237. case "$with_tiff_libs" in
  6238. y | ye | yes | n | no)
  6239. { echo "configure: error: *** You must supply a directory to --with-tiff-libs." 1>&2; exit 1; }
  6240. ;;
  6241. esac
  6242. echo "$ac_t""$with_tiff_libs" 1>&6
  6243. if test -n "$with_tiff_libs"; then
  6244. for dir in $with_tiff_libs; do
  6245. if test -d "$dir"; then
  6246. TIFF_LIBRARY_DIRS="$TIFF_LIBRARY_DIRS -L$dir"
  6247. else
  6248. { echo "configure: error: *** TIFF library directory $dir does not exist." 1>&2; exit 1; }
  6249. fi
  6250. done
  6251. fi
  6252. ac_save_ldflags="$LDFLAGS"
  6253. LDFLAGS="$TIFF_LIBRARY_DIRS $LDFLAGS"
  6254. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6255. echo "configure:7615: checking for TIFFOpen in -ltiff" >&5
  6256. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6257. ac_save_LIBS="$LIBS"
  6258. LIBS="-ltiff $LIBS"
  6259. cat > conftest.$ac_ext <<EOF
  6260. #line 7621 "configure"
  6261. #include "confdefs.h"
  6262. /* Override any gcc2 internal prototype to avoid an error. */
  6263. /* We use char because int might match the return type of a gcc2
  6264. builtin and then its argument prototype would still apply. */
  6265. char TIFFOpen();
  6266. int main() {
  6267. TIFFOpen()
  6268. ; return 0; }
  6269. EOF
  6270. if { (eval echo configure:7632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6271. rm -rf conftest*
  6272. eval "ac_cv_lib_$ac_lib_var=yes"
  6273. else
  6274. echo "configure: failed program was:" >&5
  6275. cat conftest.$ac_ext >&5
  6276. rm -rf conftest*
  6277. eval "ac_cv_lib_$ac_lib_var=no"
  6278. fi
  6279. rm -f conftest*
  6280. LIBS="$ac_save_LIBS"
  6281. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6282. echo "$ac_t""yes" 1>&6
  6283. TIFFLIB="$TIFFLIB -ltiff "
  6284. else
  6285. echo "$ac_t""no" 1>&6
  6286. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6287. echo "configure:7651: checking for TIFFOpen in -ltiff" >&5
  6288. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6289. ac_save_LIBS="$LIBS"
  6290. LIBS="-ltiff $MATHLIB $LIBS"
  6291. cat > conftest.$ac_ext <<EOF
  6292. #line 7657 "configure"
  6293. #include "confdefs.h"
  6294. /* Override any gcc2 internal prototype to avoid an error. */
  6295. /* We use char because int might match the return type of a gcc2
  6296. builtin and then its argument prototype would still apply. */
  6297. char TIFFOpen();
  6298. int main() {
  6299. TIFFOpen()
  6300. ; return 0; }
  6301. EOF
  6302. if { (eval echo configure:7668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6303. rm -rf conftest*
  6304. eval "ac_cv_lib_$ac_lib_var=yes"
  6305. else
  6306. echo "configure: failed program was:" >&5
  6307. cat conftest.$ac_ext >&5
  6308. rm -rf conftest*
  6309. eval "ac_cv_lib_$ac_lib_var=no"
  6310. fi
  6311. rm -f conftest*
  6312. LIBS="$ac_save_LIBS"
  6313. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6314. echo "$ac_t""yes" 1>&6
  6315. TIFFLIB="$TIFFLIB -ltiff $MATHLIB"
  6316. else
  6317. echo "$ac_t""no" 1>&6
  6318. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6319. echo "configure:7687: checking for TIFFOpen in -ltiff" >&5
  6320. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6321. ac_save_LIBS="$LIBS"
  6322. LIBS="-ltiff $ZLIB $LIBS"
  6323. cat > conftest.$ac_ext <<EOF
  6324. #line 7693 "configure"
  6325. #include "confdefs.h"
  6326. /* Override any gcc2 internal prototype to avoid an error. */
  6327. /* We use char because int might match the return type of a gcc2
  6328. builtin and then its argument prototype would still apply. */
  6329. char TIFFOpen();
  6330. int main() {
  6331. TIFFOpen()
  6332. ; return 0; }
  6333. EOF
  6334. if { (eval echo configure:7704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6335. rm -rf conftest*
  6336. eval "ac_cv_lib_$ac_lib_var=yes"
  6337. else
  6338. echo "configure: failed program was:" >&5
  6339. cat conftest.$ac_ext >&5
  6340. rm -rf conftest*
  6341. eval "ac_cv_lib_$ac_lib_var=no"
  6342. fi
  6343. rm -f conftest*
  6344. LIBS="$ac_save_LIBS"
  6345. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6346. echo "$ac_t""yes" 1>&6
  6347. TIFFLIB="$TIFFLIB -ltiff $ZLIB"
  6348. else
  6349. echo "$ac_t""no" 1>&6
  6350. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6351. echo "configure:7723: checking for TIFFOpen in -ltiff" >&5
  6352. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6353. ac_save_LIBS="$LIBS"
  6354. LIBS="-ltiff $ZLIB $MATHLIB $LIBS"
  6355. cat > conftest.$ac_ext <<EOF
  6356. #line 7729 "configure"
  6357. #include "confdefs.h"
  6358. /* Override any gcc2 internal prototype to avoid an error. */
  6359. /* We use char because int might match the return type of a gcc2
  6360. builtin and then its argument prototype would still apply. */
  6361. char TIFFOpen();
  6362. int main() {
  6363. TIFFOpen()
  6364. ; return 0; }
  6365. EOF
  6366. if { (eval echo configure:7740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6367. rm -rf conftest*
  6368. eval "ac_cv_lib_$ac_lib_var=yes"
  6369. else
  6370. echo "configure: failed program was:" >&5
  6371. cat conftest.$ac_ext >&5
  6372. rm -rf conftest*
  6373. eval "ac_cv_lib_$ac_lib_var=no"
  6374. fi
  6375. rm -f conftest*
  6376. LIBS="$ac_save_LIBS"
  6377. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6378. echo "$ac_t""yes" 1>&6
  6379. TIFFLIB="$TIFFLIB -ltiff $ZLIB $MATHLIB"
  6380. else
  6381. echo "$ac_t""no" 1>&6
  6382. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6383. echo "configure:7759: checking for TIFFOpen in -ltiff" >&5
  6384. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6385. ac_save_LIBS="$LIBS"
  6386. LIBS="-ltiff -ljpeg $LIBS"
  6387. cat > conftest.$ac_ext <<EOF
  6388. #line 7765 "configure"
  6389. #include "confdefs.h"
  6390. /* Override any gcc2 internal prototype to avoid an error. */
  6391. /* We use char because int might match the return type of a gcc2
  6392. builtin and then its argument prototype would still apply. */
  6393. char TIFFOpen();
  6394. int main() {
  6395. TIFFOpen()
  6396. ; return 0; }
  6397. EOF
  6398. if { (eval echo configure:7776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6399. rm -rf conftest*
  6400. eval "ac_cv_lib_$ac_lib_var=yes"
  6401. else
  6402. echo "configure: failed program was:" >&5
  6403. cat conftest.$ac_ext >&5
  6404. rm -rf conftest*
  6405. eval "ac_cv_lib_$ac_lib_var=no"
  6406. fi
  6407. rm -f conftest*
  6408. LIBS="$ac_save_LIBS"
  6409. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6410. echo "$ac_t""yes" 1>&6
  6411. TIFFLIB="$TIFFLIB -ltiff -ljpeg"
  6412. else
  6413. echo "$ac_t""no" 1>&6
  6414. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6415. echo "configure:7795: checking for TIFFOpen in -ltiff" >&5
  6416. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6417. ac_save_LIBS="$LIBS"
  6418. LIBS="-ltiff -ljpeg $MATHLIB $LIBS"
  6419. cat > conftest.$ac_ext <<EOF
  6420. #line 7801 "configure"
  6421. #include "confdefs.h"
  6422. /* Override any gcc2 internal prototype to avoid an error. */
  6423. /* We use char because int might match the return type of a gcc2
  6424. builtin and then its argument prototype would still apply. */
  6425. char TIFFOpen();
  6426. int main() {
  6427. TIFFOpen()
  6428. ; return 0; }
  6429. EOF
  6430. if { (eval echo configure:7812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6431. rm -rf conftest*
  6432. eval "ac_cv_lib_$ac_lib_var=yes"
  6433. else
  6434. echo "configure: failed program was:" >&5
  6435. cat conftest.$ac_ext >&5
  6436. rm -rf conftest*
  6437. eval "ac_cv_lib_$ac_lib_var=no"
  6438. fi
  6439. rm -f conftest*
  6440. LIBS="$ac_save_LIBS"
  6441. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6442. echo "$ac_t""yes" 1>&6
  6443. TIFFLIB="$TIFFLIB -ltiff -ljpeg $MATHLIB"
  6444. else
  6445. echo "$ac_t""no" 1>&6
  6446. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6447. echo "configure:7831: checking for TIFFOpen in -ltiff" >&5
  6448. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6449. ac_save_LIBS="$LIBS"
  6450. LIBS="-ltiff -ljpeg $ZLIB $LIBS"
  6451. cat > conftest.$ac_ext <<EOF
  6452. #line 7837 "configure"
  6453. #include "confdefs.h"
  6454. /* Override any gcc2 internal prototype to avoid an error. */
  6455. /* We use char because int might match the return type of a gcc2
  6456. builtin and then its argument prototype would still apply. */
  6457. char TIFFOpen();
  6458. int main() {
  6459. TIFFOpen()
  6460. ; return 0; }
  6461. EOF
  6462. if { (eval echo configure:7848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6463. rm -rf conftest*
  6464. eval "ac_cv_lib_$ac_lib_var=yes"
  6465. else
  6466. echo "configure: failed program was:" >&5
  6467. cat conftest.$ac_ext >&5
  6468. rm -rf conftest*
  6469. eval "ac_cv_lib_$ac_lib_var=no"
  6470. fi
  6471. rm -f conftest*
  6472. LIBS="$ac_save_LIBS"
  6473. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6474. echo "$ac_t""yes" 1>&6
  6475. TIFFLIB="$TIFFLIB -ltiff -ljpeg $ZLIB"
  6476. else
  6477. echo "$ac_t""no" 1>&6
  6478. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6479. echo "configure:7867: checking for TIFFOpen in -ltiff" >&5
  6480. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6481. ac_save_LIBS="$LIBS"
  6482. LIBS="-ltiff -ljpeg $ZLIB $MATHLIB $LIBS"
  6483. cat > conftest.$ac_ext <<EOF
  6484. #line 7873 "configure"
  6485. #include "confdefs.h"
  6486. /* Override any gcc2 internal prototype to avoid an error. */
  6487. /* We use char because int might match the return type of a gcc2
  6488. builtin and then its argument prototype would still apply. */
  6489. char TIFFOpen();
  6490. int main() {
  6491. TIFFOpen()
  6492. ; return 0; }
  6493. EOF
  6494. if { (eval echo configure:7884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6495. rm -rf conftest*
  6496. eval "ac_cv_lib_$ac_lib_var=yes"
  6497. else
  6498. echo "configure: failed program was:" >&5
  6499. cat conftest.$ac_ext >&5
  6500. rm -rf conftest*
  6501. eval "ac_cv_lib_$ac_lib_var=no"
  6502. fi
  6503. rm -f conftest*
  6504. LIBS="$ac_save_LIBS"
  6505. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6506. echo "$ac_t""yes" 1>&6
  6507. TIFFLIB="$TIFFLIB -ltiff -ljpeg $ZLIB $MATHLIB"
  6508. else
  6509. echo "$ac_t""no" 1>&6
  6510. LDFLAGS=${ac_save_ldflags}
  6511. { echo "configure: error: *** Unable to locate TIFF library." 1>&2; exit 1; }
  6512. fi
  6513. fi
  6514. fi
  6515. fi
  6516. fi
  6517. fi
  6518. fi
  6519. fi
  6520. LDFLAGS=${ac_save_ldflags}
  6521. fi # $USE_TIFF
  6522. # Done checking TIFF
  6523. # Enable PNG option
  6524. echo $ac_n "checking whether to use PNG""... $ac_c" 1>&6
  6525. echo "configure:7982: checking whether to use PNG" >&5
  6526. echo "$ac_t"""$with_png"" 1>&6
  6527. case "$with_png" in
  6528. "no") USE_PNG= ;;
  6529. "yes") USE_PNG="1" ;;
  6530. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6531. esac
  6532. PNGINC=
  6533. PNGLIB=
  6534. if test -n "$USE_PNG"; then
  6535. # With PNG includes directory
  6536. echo $ac_n "checking for location of PNG includes""... $ac_c" 1>&6
  6537. echo "configure:8001: checking for location of PNG includes" >&5
  6538. case "$with_png_includes" in
  6539. y | ye | yes | n | no)
  6540. { echo "configure: error: *** You must supply a directory to --with-png-includes." 1>&2; exit 1; }
  6541. ;;
  6542. esac
  6543. echo "$ac_t""$with_png_includes" 1>&6
  6544. if test -n "$with_png_includes" ; then
  6545. for dir in $with_png_includes; do
  6546. if test -d "$dir"; then
  6547. PNGINC="$PNGINC -I$dir"
  6548. else
  6549. { echo "configure: error: *** PNG includes directory $dir does not exist." 1>&2; exit 1; }
  6550. fi
  6551. done
  6552. fi
  6553. ac_save_cppflags="$CPPFLAGS"
  6554. CPPFLAGS="$PNGINC $CPPFLAGS"
  6555. for ac_hdr in png.h
  6556. do
  6557. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6558. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6559. echo "configure:8027: checking for $ac_hdr" >&5
  6560. cat > conftest.$ac_ext <<EOF
  6561. #line 8030 "configure"
  6562. #include "confdefs.h"
  6563. #include <$ac_hdr>
  6564. EOF
  6565. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6566. { (eval echo configure:8035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6567. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6568. if test -z "$ac_err"; then
  6569. rm -rf conftest*
  6570. eval "ac_cv_header_$ac_safe=yes"
  6571. else
  6572. echo "$ac_err" >&5
  6573. echo "configure: failed program was:" >&5
  6574. cat conftest.$ac_ext >&5
  6575. rm -rf conftest*
  6576. eval "ac_cv_header_$ac_safe=no"
  6577. fi
  6578. rm -f conftest*
  6579. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6580. echo "$ac_t""yes" 1>&6
  6581. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6582. cat >> confdefs.h <<EOF
  6583. #define $ac_tr_hdr 1
  6584. EOF
  6585. else
  6586. echo "$ac_t""no" 1>&6
  6587. { echo "configure: error: *** Unable to locate PNG includes." 1>&2; exit 1; }
  6588. fi
  6589. done
  6590. CPPFLAGS=$ac_save_cppflags
  6591. # With PNG library directory
  6592. echo $ac_n "checking for location of PNG library""... $ac_c" 1>&6
  6593. echo "configure:8069: checking for location of PNG library" >&5
  6594. case "$with_png_libs" in
  6595. y | ye | yes | n | no)
  6596. { echo "configure: error: *** You must supply a directory to --with-png-libs." 1>&2; exit 1; }
  6597. ;;
  6598. esac
  6599. echo "$ac_t""$with_png_libs" 1>&6
  6600. if test -n "$with_png_libs"; then
  6601. for dir in $with_png_libs; do
  6602. if test -d "$dir"; then
  6603. PNGLIB="$PNGLIB -L$dir"
  6604. else
  6605. { echo "configure: error: *** PNG library directory $dir does not exist." 1>&2; exit 1; }
  6606. fi
  6607. done
  6608. fi
  6609. ac_save_ldflags="$LDFLAGS"
  6610. LDFLAGS="$PNGLIB $LDFLAGS"
  6611. echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
  6612. echo "configure:8094: checking for png_read_image in -lpng" >&5
  6613. ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
  6614. ac_save_LIBS="$LIBS"
  6615. LIBS="-lpng $ZLIB $MATHLIB $LIBS"
  6616. cat > conftest.$ac_ext <<EOF
  6617. #line 8100 "configure"
  6618. #include "confdefs.h"
  6619. /* Override any gcc2 internal prototype to avoid an error. */
  6620. /* We use char because int might match the return type of a gcc2
  6621. builtin and then its argument prototype would still apply. */
  6622. char png_read_image();
  6623. int main() {
  6624. png_read_image()
  6625. ; return 0; }
  6626. EOF
  6627. if { (eval echo configure:8111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6628. rm -rf conftest*
  6629. eval "ac_cv_lib_$ac_lib_var=yes"
  6630. else
  6631. echo "configure: failed program was:" >&5
  6632. cat conftest.$ac_ext >&5
  6633. rm -rf conftest*
  6634. eval "ac_cv_lib_$ac_lib_var=no"
  6635. fi
  6636. rm -f conftest*
  6637. LIBS="$ac_save_LIBS"
  6638. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6639. echo "$ac_t""yes" 1>&6
  6640. PNGLIB="$PNGLIB -lpng $ZLIB $MATHLIB"
  6641. else
  6642. echo "$ac_t""no" 1>&6
  6643. LDFLAGS=${ac_save_ldflags}
  6644. { echo "configure: error: *** Unable to locate PNG library." 1>&2; exit 1; }
  6645. fi
  6646. LDFLAGS=${ac_save_ldflags}
  6647. fi # $USE_PNG
  6648. # Done checking PNG
  6649. # Enable PostgreSQL option
  6650. echo $ac_n "checking whether to use PostgreSQL""... $ac_c" 1>&6
  6651. echo "configure:8153: checking whether to use PostgreSQL" >&5
  6652. echo "$ac_t"""$with_postgres"" 1>&6
  6653. case "$with_postgres" in
  6654. "no") USE_POSTGRES= ;;
  6655. "yes") USE_POSTGRES="1" ;;
  6656. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6657. esac
  6658. if test -n "$USE_POSTGRES"; then
  6659. cat >> confdefs.h <<\EOF
  6660. #define HAVE_POSTGRES 1
  6661. EOF
  6662. fi # $USE_POSTGRES
  6663. PQINCPATH=
  6664. PQLIBPATH=
  6665. PQLIB=
  6666. if test -n "$USE_POSTGRES"; then
  6667. # With PostgreSQL includes directory
  6668. echo $ac_n "checking for location of PostgreSQL includes""... $ac_c" 1>&6
  6669. echo "configure:8180: checking for location of PostgreSQL includes" >&5
  6670. case "$with_postgres_includes" in
  6671. y | ye | yes | n | no)
  6672. { echo "configure: error: *** You must supply a directory to --with-postgres-includes." 1>&2; exit 1; }
  6673. ;;
  6674. esac
  6675. echo "$ac_t""$with_postgres_includes" 1>&6
  6676. if test -n "$with_postgres_includes" ; then
  6677. for dir in $with_postgres_includes; do
  6678. if test -d "$dir"; then
  6679. PQINCPATH="$PQINCPATH -I$dir"
  6680. else
  6681. { echo "configure: error: *** PostgreSQL includes directory $dir does not exist." 1>&2; exit 1; }
  6682. fi
  6683. done
  6684. fi
  6685. ac_save_cppflags="$CPPFLAGS"
  6686. CPPFLAGS="$PQINCPATH $CPPFLAGS"
  6687. for ac_hdr in libpq-fe.h
  6688. do
  6689. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6690. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6691. echo "configure:8206: checking for $ac_hdr" >&5
  6692. cat > conftest.$ac_ext <<EOF
  6693. #line 8209 "configure"
  6694. #include "confdefs.h"
  6695. #include <$ac_hdr>
  6696. EOF
  6697. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6698. { (eval echo configure:8214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6699. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6700. if test -z "$ac_err"; then
  6701. rm -rf conftest*
  6702. eval "ac_cv_header_$ac_safe=yes"
  6703. else
  6704. echo "$ac_err" >&5
  6705. echo "configure: failed program was:" >&5
  6706. cat conftest.$ac_ext >&5
  6707. rm -rf conftest*
  6708. eval "ac_cv_header_$ac_safe=no"
  6709. fi
  6710. rm -f conftest*
  6711. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6712. echo "$ac_t""yes" 1>&6
  6713. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6714. cat >> confdefs.h <<EOF
  6715. #define $ac_tr_hdr 1
  6716. EOF
  6717. else
  6718. echo "$ac_t""no" 1>&6
  6719. { echo "configure: error: *** Unable to locate PostgreSQL includes." 1>&2; exit 1; }
  6720. fi
  6721. done
  6722. CPPFLAGS=$ac_save_cppflags
  6723. fi # $USE_POSTGRES
  6724. if test -n "$USE_POSTGRES"; then
  6725. # With PostgreSQL library directory
  6726. echo $ac_n "checking for location of PostgreSQL library""... $ac_c" 1>&6
  6727. echo "configure:8252: checking for location of PostgreSQL library" >&5
  6728. case "$with_postgres_libs" in
  6729. y | ye | yes | n | no)
  6730. { echo "configure: error: *** You must supply a directory to --with-postgres-libs." 1>&2; exit 1; }
  6731. ;;
  6732. esac
  6733. echo "$ac_t""$with_postgres_libs" 1>&6
  6734. if test -n "$with_postgres_libs"; then
  6735. for dir in $with_postgres_libs; do
  6736. if test -d "$dir"; then
  6737. PQLIBPATH="$PQLIBPATH -L$dir"
  6738. else
  6739. { echo "configure: error: *** PostgreSQL library directory $dir does not exist." 1>&2; exit 1; }
  6740. fi
  6741. done
  6742. fi
  6743. ac_save_ldflags="$LDFLAGS"
  6744. LDFLAGS="$PQLIBPATH $LDFLAGS"
  6745. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6746. echo "configure:8281: checking for PQsetdbLogin in -lpq" >&5
  6747. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6748. ac_save_LIBS="$LIBS"
  6749. LIBS="-lpq $LIBS"
  6750. cat > conftest.$ac_ext <<EOF
  6751. #line 8287 "configure"
  6752. #include "confdefs.h"
  6753. /* Override any gcc2 internal prototype to avoid an error. */
  6754. /* We use char because int might match the return type of a gcc2
  6755. builtin and then its argument prototype would still apply. */
  6756. char PQsetdbLogin();
  6757. int main() {
  6758. PQsetdbLogin()
  6759. ; return 0; }
  6760. EOF
  6761. if { (eval echo configure:8298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6762. rm -rf conftest*
  6763. eval "ac_cv_lib_$ac_lib_var=yes"
  6764. else
  6765. echo "configure: failed program was:" >&5
  6766. cat conftest.$ac_ext >&5
  6767. rm -rf conftest*
  6768. eval "ac_cv_lib_$ac_lib_var=no"
  6769. fi
  6770. rm -f conftest*
  6771. LIBS="$ac_save_LIBS"
  6772. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6773. echo "$ac_t""yes" 1>&6
  6774. PQLIB="$PQLIB -lpq "
  6775. else
  6776. echo "$ac_t""no" 1>&6
  6777. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6778. echo "configure:8317: checking for PQsetdbLogin in -lpq" >&5
  6779. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6780. ac_save_LIBS="$LIBS"
  6781. LIBS="-lpq -lssl -lcrypto $LIBS"
  6782. cat > conftest.$ac_ext <<EOF
  6783. #line 8323 "configure"
  6784. #include "confdefs.h"
  6785. /* Override any gcc2 internal prototype to avoid an error. */
  6786. /* We use char because int might match the return type of a gcc2
  6787. builtin and then its argument prototype would still apply. */
  6788. char PQsetdbLogin();
  6789. int main() {
  6790. PQsetdbLogin()
  6791. ; return 0; }
  6792. EOF
  6793. if { (eval echo configure:8334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6794. rm -rf conftest*
  6795. eval "ac_cv_lib_$ac_lib_var=yes"
  6796. else
  6797. echo "configure: failed program was:" >&5
  6798. cat conftest.$ac_ext >&5
  6799. rm -rf conftest*
  6800. eval "ac_cv_lib_$ac_lib_var=no"
  6801. fi
  6802. rm -f conftest*
  6803. LIBS="$ac_save_LIBS"
  6804. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6805. echo "$ac_t""yes" 1>&6
  6806. PQLIB="$PQLIB -lpq -lssl -lcrypto"
  6807. else
  6808. echo "$ac_t""no" 1>&6
  6809. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6810. echo "configure:8353: checking for PQsetdbLogin in -lpq" >&5
  6811. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6812. ac_save_LIBS="$LIBS"
  6813. LIBS="-lpq -lcrypt $LIBS"
  6814. cat > conftest.$ac_ext <<EOF
  6815. #line 8359 "configure"
  6816. #include "confdefs.h"
  6817. /* Override any gcc2 internal prototype to avoid an error. */
  6818. /* We use char because int might match the return type of a gcc2
  6819. builtin and then its argument prototype would still apply. */
  6820. char PQsetdbLogin();
  6821. int main() {
  6822. PQsetdbLogin()
  6823. ; return 0; }
  6824. EOF
  6825. if { (eval echo configure:8370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6826. rm -rf conftest*
  6827. eval "ac_cv_lib_$ac_lib_var=yes"
  6828. else
  6829. echo "configure: failed program was:" >&5
  6830. cat conftest.$ac_ext >&5
  6831. rm -rf conftest*
  6832. eval "ac_cv_lib_$ac_lib_var=no"
  6833. fi
  6834. rm -f conftest*
  6835. LIBS="$ac_save_LIBS"
  6836. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6837. echo "$ac_t""yes" 1>&6
  6838. PQLIB="$PQLIB -lpq -lcrypt"
  6839. else
  6840. echo "$ac_t""no" 1>&6
  6841. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6842. echo "configure:8389: checking for PQsetdbLogin in -lpq" >&5
  6843. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6844. ac_save_LIBS="$LIBS"
  6845. LIBS="-lpq -lcrypt -lssl -lcrypto $LIBS"
  6846. cat > conftest.$ac_ext <<EOF
  6847. #line 8395 "configure"
  6848. #include "confdefs.h"
  6849. /* Override any gcc2 internal prototype to avoid an error. */
  6850. /* We use char because int might match the return type of a gcc2
  6851. builtin and then its argument prototype would still apply. */
  6852. char PQsetdbLogin();
  6853. int main() {
  6854. PQsetdbLogin()
  6855. ; return 0; }
  6856. EOF
  6857. if { (eval echo configure:8406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6858. rm -rf conftest*
  6859. eval "ac_cv_lib_$ac_lib_var=yes"
  6860. else
  6861. echo "configure: failed program was:" >&5
  6862. cat conftest.$ac_ext >&5
  6863. rm -rf conftest*
  6864. eval "ac_cv_lib_$ac_lib_var=no"
  6865. fi
  6866. rm -f conftest*
  6867. LIBS="$ac_save_LIBS"
  6868. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6869. echo "$ac_t""yes" 1>&6
  6870. PQLIB="$PQLIB -lpq -lcrypt -lssl -lcrypto"
  6871. else
  6872. echo "$ac_t""no" 1>&6
  6873. LDFLAGS=${ac_save_ldflags}
  6874. { echo "configure: error: *** Unable to locate PostgreSQL library." 1>&2; exit 1; }
  6875. fi
  6876. fi
  6877. fi
  6878. fi
  6879. LDFLAGS=${ac_save_ldflags}
  6880. ac_save_ldflags="$LDFLAGS"
  6881. LDFLAGS="$LDFLAGS $PQLIBPATH"
  6882. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  6883. echo "configure:8463: checking for PQcmdTuples in -lpq" >&5
  6884. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  6885. ac_save_LIBS="$LIBS"
  6886. LIBS="-lpq $LIBS"
  6887. cat > conftest.$ac_ext <<EOF
  6888. #line 8469 "configure"
  6889. #include "confdefs.h"
  6890. /* Override any gcc2 internal prototype to avoid an error. */
  6891. /* We use char because int might match the return type of a gcc2
  6892. builtin and then its argument prototype would still apply. */
  6893. char PQcmdTuples();
  6894. int main() {
  6895. PQcmdTuples()
  6896. ; return 0; }
  6897. EOF
  6898. if { (eval echo configure:8480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6899. rm -rf conftest*
  6900. eval "ac_cv_lib_$ac_lib_var=yes"
  6901. else
  6902. echo "configure: failed program was:" >&5
  6903. cat conftest.$ac_ext >&5
  6904. rm -rf conftest*
  6905. eval "ac_cv_lib_$ac_lib_var=no"
  6906. fi
  6907. rm -f conftest*
  6908. LIBS="$ac_save_LIBS"
  6909. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6910. echo "$ac_t""yes" 1>&6
  6911. cat >> confdefs.h <<\EOF
  6912. #define HAVE_PQCMDTUPLES 1
  6913. EOF
  6914. else
  6915. echo "$ac_t""no" 1>&6
  6916. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  6917. echo "configure:8502: checking for PQcmdTuples in -lpq" >&5
  6918. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  6919. ac_save_LIBS="$LIBS"
  6920. LIBS="-lpq -lcrypt $LIBS"
  6921. cat > conftest.$ac_ext <<EOF
  6922. #line 8508 "configure"
  6923. #include "confdefs.h"
  6924. /* Override any gcc2 internal prototype to avoid an error. */
  6925. /* We use char because int might match the return type of a gcc2
  6926. builtin and then its argument prototype would still apply. */
  6927. char PQcmdTuples();
  6928. int main() {
  6929. PQcmdTuples()
  6930. ; return 0; }
  6931. EOF
  6932. if { (eval echo configure:8519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6933. rm -rf conftest*
  6934. eval "ac_cv_lib_$ac_lib_var=yes"
  6935. else
  6936. echo "configure: failed program was:" >&5
  6937. cat conftest.$ac_ext >&5
  6938. rm -rf conftest*
  6939. eval "ac_cv_lib_$ac_lib_var=no"
  6940. fi
  6941. rm -f conftest*
  6942. LIBS="$ac_save_LIBS"
  6943. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6944. echo "$ac_t""yes" 1>&6
  6945. cat >> confdefs.h <<\EOF
  6946. #define HAVE_PQCMDTUPLES 1
  6947. EOF
  6948. else
  6949. echo "$ac_t""no" 1>&6
  6950. fi
  6951. fi
  6952. LDFLAGS="${ac_save_ldflags}"
  6953. fi # $USE_POSTGRES
  6954. # Done checking PostgreSQL
  6955. # Enable MySQL option
  6956. echo $ac_n "checking whether to use MySQL""... $ac_c" 1>&6
  6957. echo "configure:8562: checking whether to use MySQL" >&5
  6958. echo "$ac_t"""$with_mysql"" 1>&6
  6959. case "$with_mysql" in
  6960. "no") USE_MYSQL= ;;
  6961. "yes") USE_MYSQL="1" ;;
  6962. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6963. esac
  6964. MYSQLINCPATH=
  6965. MYSQLLIBPATH=
  6966. MYSQLLIB=
  6967. if test -n "$USE_MYSQL"; then
  6968. # With MySQL includes directory
  6969. echo $ac_n "checking for location of MySQL includes""... $ac_c" 1>&6
  6970. echo "configure:8582: checking for location of MySQL includes" >&5
  6971. case "$with_mysql_includes" in
  6972. y | ye | yes | n | no)
  6973. { echo "configure: error: *** You must supply a directory to --with-mysql-includes." 1>&2; exit 1; }
  6974. ;;
  6975. esac
  6976. echo "$ac_t""$with_mysql_includes" 1>&6
  6977. if test -n "$with_mysql_includes" ; then
  6978. for dir in $with_mysql_includes; do
  6979. if test -d "$dir"; then
  6980. MYSQLINCPATH="$MYSQLINCPATH -I$dir"
  6981. else
  6982. { echo "configure: error: *** MySQL includes directory $dir does not exist." 1>&2; exit 1; }
  6983. fi
  6984. done
  6985. fi
  6986. ac_save_cppflags="$CPPFLAGS"
  6987. CPPFLAGS="$MYSQLINCPATH $CPPFLAGS"
  6988. for ac_hdr in mysql.h
  6989. do
  6990. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6991. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6992. echo "configure:8608: checking for $ac_hdr" >&5
  6993. cat > conftest.$ac_ext <<EOF
  6994. #line 8611 "configure"
  6995. #include "confdefs.h"
  6996. #include <$ac_hdr>
  6997. EOF
  6998. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6999. { (eval echo configure:8616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7000. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7001. if test -z "$ac_err"; then
  7002. rm -rf conftest*
  7003. eval "ac_cv_header_$ac_safe=yes"
  7004. else
  7005. echo "$ac_err" >&5
  7006. echo "configure: failed program was:" >&5
  7007. cat conftest.$ac_ext >&5
  7008. rm -rf conftest*
  7009. eval "ac_cv_header_$ac_safe=no"
  7010. fi
  7011. rm -f conftest*
  7012. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7013. echo "$ac_t""yes" 1>&6
  7014. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7015. cat >> confdefs.h <<EOF
  7016. #define $ac_tr_hdr 1
  7017. EOF
  7018. else
  7019. echo "$ac_t""no" 1>&6
  7020. { echo "configure: error: *** Unable to locate MySQL includes." 1>&2; exit 1; }
  7021. fi
  7022. done
  7023. CPPFLAGS=$ac_save_cppflags
  7024. fi # $USE_MYSQL
  7025. if test -n "$USE_MYSQL"; then
  7026. # With MySQL library directory
  7027. echo $ac_n "checking for location of MySQL library""... $ac_c" 1>&6
  7028. echo "configure:8653: checking for location of MySQL library" >&5
  7029. case "$with_mysql_libs" in
  7030. y | ye | yes | n | no)
  7031. { echo "configure: error: *** You must supply a directory to --with-mysql-libs." 1>&2; exit 1; }
  7032. ;;
  7033. esac
  7034. echo "$ac_t""$with_mysql_libs" 1>&6
  7035. if test -n "$with_mysql_libs"; then
  7036. for dir in $with_mysql_libs; do
  7037. if test -d "$dir"; then
  7038. MYSQLLIBPATH="$MYSQLLIBPATH -L$dir"
  7039. else
  7040. { echo "configure: error: *** MySQL library directory $dir does not exist." 1>&2; exit 1; }
  7041. fi
  7042. done
  7043. fi
  7044. ac_save_ldflags="$LDFLAGS"
  7045. LDFLAGS="$MYSQLLIBPATH $LDFLAGS"
  7046. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7047. echo "configure:8684: checking for mysql_query in -lmysqlclient" >&5
  7048. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7049. ac_save_LIBS="$LIBS"
  7050. LIBS="-lmysqlclient $LIBS"
  7051. cat > conftest.$ac_ext <<EOF
  7052. #line 8690 "configure"
  7053. #include "confdefs.h"
  7054. /* Override any gcc2 internal prototype to avoid an error. */
  7055. /* We use char because int might match the return type of a gcc2
  7056. builtin and then its argument prototype would still apply. */
  7057. char mysql_query();
  7058. int main() {
  7059. mysql_query()
  7060. ; return 0; }
  7061. EOF
  7062. if { (eval echo configure:8701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7063. rm -rf conftest*
  7064. eval "ac_cv_lib_$ac_lib_var=yes"
  7065. else
  7066. echo "configure: failed program was:" >&5
  7067. cat conftest.$ac_ext >&5
  7068. rm -rf conftest*
  7069. eval "ac_cv_lib_$ac_lib_var=no"
  7070. fi
  7071. rm -f conftest*
  7072. LIBS="$ac_save_LIBS"
  7073. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7074. echo "$ac_t""yes" 1>&6
  7075. MYSQLLIB="$MYSQLLIB -lmysqlclient "
  7076. else
  7077. echo "$ac_t""no" 1>&6
  7078. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7079. echo "configure:8720: checking for mysql_query in -lmysqlclient" >&5
  7080. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7081. ac_save_LIBS="$LIBS"
  7082. LIBS="-lmysqlclient $MATHLIB $LIBS"
  7083. cat > conftest.$ac_ext <<EOF
  7084. #line 8726 "configure"
  7085. #include "confdefs.h"
  7086. /* Override any gcc2 internal prototype to avoid an error. */
  7087. /* We use char because int might match the return type of a gcc2
  7088. builtin and then its argument prototype would still apply. */
  7089. char mysql_query();
  7090. int main() {
  7091. mysql_query()
  7092. ; return 0; }
  7093. EOF
  7094. if { (eval echo configure:8737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7095. rm -rf conftest*
  7096. eval "ac_cv_lib_$ac_lib_var=yes"
  7097. else
  7098. echo "configure: failed program was:" >&5
  7099. cat conftest.$ac_ext >&5
  7100. rm -rf conftest*
  7101. eval "ac_cv_lib_$ac_lib_var=no"
  7102. fi
  7103. rm -f conftest*
  7104. LIBS="$ac_save_LIBS"
  7105. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7106. echo "$ac_t""yes" 1>&6
  7107. MYSQLLIB="$MYSQLLIB -lmysqlclient $MATHLIB"
  7108. else
  7109. echo "$ac_t""no" 1>&6
  7110. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7111. echo "configure:8756: checking for mysql_query in -lmysqlclient" >&5
  7112. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7113. ac_save_LIBS="$LIBS"
  7114. LIBS="-lmysqlclient $SOCKLIB $LIBS"
  7115. cat > conftest.$ac_ext <<EOF
  7116. #line 8762 "configure"
  7117. #include "confdefs.h"
  7118. /* Override any gcc2 internal prototype to avoid an error. */
  7119. /* We use char because int might match the return type of a gcc2
  7120. builtin and then its argument prototype would still apply. */
  7121. char mysql_query();
  7122. int main() {
  7123. mysql_query()
  7124. ; return 0; }
  7125. EOF
  7126. if { (eval echo configure:8773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7127. rm -rf conftest*
  7128. eval "ac_cv_lib_$ac_lib_var=yes"
  7129. else
  7130. echo "configure: failed program was:" >&5
  7131. cat conftest.$ac_ext >&5
  7132. rm -rf conftest*
  7133. eval "ac_cv_lib_$ac_lib_var=no"
  7134. fi
  7135. rm -f conftest*
  7136. LIBS="$ac_save_LIBS"
  7137. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7138. echo "$ac_t""yes" 1>&6
  7139. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB"
  7140. else
  7141. echo "$ac_t""no" 1>&6
  7142. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7143. echo "configure:8792: checking for mysql_query in -lmysqlclient" >&5
  7144. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7145. ac_save_LIBS="$LIBS"
  7146. LIBS="-lmysqlclient $SOCKLIB $MATHLIB $LIBS"
  7147. cat > conftest.$ac_ext <<EOF
  7148. #line 8798 "configure"
  7149. #include "confdefs.h"
  7150. /* Override any gcc2 internal prototype to avoid an error. */
  7151. /* We use char because int might match the return type of a gcc2
  7152. builtin and then its argument prototype would still apply. */
  7153. char mysql_query();
  7154. int main() {
  7155. mysql_query()
  7156. ; return 0; }
  7157. EOF
  7158. if { (eval echo configure:8809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7159. rm -rf conftest*
  7160. eval "ac_cv_lib_$ac_lib_var=yes"
  7161. else
  7162. echo "configure: failed program was:" >&5
  7163. cat conftest.$ac_ext >&5
  7164. rm -rf conftest*
  7165. eval "ac_cv_lib_$ac_lib_var=no"
  7166. fi
  7167. rm -f conftest*
  7168. LIBS="$ac_save_LIBS"
  7169. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7170. echo "$ac_t""yes" 1>&6
  7171. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB $MATHLIB"
  7172. else
  7173. echo "$ac_t""no" 1>&6
  7174. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7175. echo "configure:8828: checking for mysql_query in -lmysqlclient" >&5
  7176. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7177. ac_save_LIBS="$LIBS"
  7178. LIBS="-lmysqlclient $ZLIB $LIBS"
  7179. cat > conftest.$ac_ext <<EOF
  7180. #line 8834 "configure"
  7181. #include "confdefs.h"
  7182. /* Override any gcc2 internal prototype to avoid an error. */
  7183. /* We use char because int might match the return type of a gcc2
  7184. builtin and then its argument prototype would still apply. */
  7185. char mysql_query();
  7186. int main() {
  7187. mysql_query()
  7188. ; return 0; }
  7189. EOF
  7190. if { (eval echo configure:8845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7191. rm -rf conftest*
  7192. eval "ac_cv_lib_$ac_lib_var=yes"
  7193. else
  7194. echo "configure: failed program was:" >&5
  7195. cat conftest.$ac_ext >&5
  7196. rm -rf conftest*
  7197. eval "ac_cv_lib_$ac_lib_var=no"
  7198. fi
  7199. rm -f conftest*
  7200. LIBS="$ac_save_LIBS"
  7201. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7202. echo "$ac_t""yes" 1>&6
  7203. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB"
  7204. else
  7205. echo "$ac_t""no" 1>&6
  7206. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7207. echo "configure:8864: checking for mysql_query in -lmysqlclient" >&5
  7208. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7209. ac_save_LIBS="$LIBS"
  7210. LIBS="-lmysqlclient $ZLIB $MATHLIB $LIBS"
  7211. cat > conftest.$ac_ext <<EOF
  7212. #line 8870 "configure"
  7213. #include "confdefs.h"
  7214. /* Override any gcc2 internal prototype to avoid an error. */
  7215. /* We use char because int might match the return type of a gcc2
  7216. builtin and then its argument prototype would still apply. */
  7217. char mysql_query();
  7218. int main() {
  7219. mysql_query()
  7220. ; return 0; }
  7221. EOF
  7222. if { (eval echo configure:8881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7223. rm -rf conftest*
  7224. eval "ac_cv_lib_$ac_lib_var=yes"
  7225. else
  7226. echo "configure: failed program was:" >&5
  7227. cat conftest.$ac_ext >&5
  7228. rm -rf conftest*
  7229. eval "ac_cv_lib_$ac_lib_var=no"
  7230. fi
  7231. rm -f conftest*
  7232. LIBS="$ac_save_LIBS"
  7233. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7234. echo "$ac_t""yes" 1>&6
  7235. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $MATHLIB"
  7236. else
  7237. echo "$ac_t""no" 1>&6
  7238. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7239. echo "configure:8900: checking for mysql_query in -lmysqlclient" >&5
  7240. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7241. ac_save_LIBS="$LIBS"
  7242. LIBS="-lmysqlclient $ZLIB $SOCKLIB $LIBS"
  7243. cat > conftest.$ac_ext <<EOF
  7244. #line 8906 "configure"
  7245. #include "confdefs.h"
  7246. /* Override any gcc2 internal prototype to avoid an error. */
  7247. /* We use char because int might match the return type of a gcc2
  7248. builtin and then its argument prototype would still apply. */
  7249. char mysql_query();
  7250. int main() {
  7251. mysql_query()
  7252. ; return 0; }
  7253. EOF
  7254. if { (eval echo configure:8917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7255. rm -rf conftest*
  7256. eval "ac_cv_lib_$ac_lib_var=yes"
  7257. else
  7258. echo "configure: failed program was:" >&5
  7259. cat conftest.$ac_ext >&5
  7260. rm -rf conftest*
  7261. eval "ac_cv_lib_$ac_lib_var=no"
  7262. fi
  7263. rm -f conftest*
  7264. LIBS="$ac_save_LIBS"
  7265. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7266. echo "$ac_t""yes" 1>&6
  7267. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB"
  7268. else
  7269. echo "$ac_t""no" 1>&6
  7270. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7271. echo "configure:8936: checking for mysql_query in -lmysqlclient" >&5
  7272. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7273. ac_save_LIBS="$LIBS"
  7274. LIBS="-lmysqlclient $ZLIB $SOCKLIB $MATHLIB $LIBS"
  7275. cat > conftest.$ac_ext <<EOF
  7276. #line 8942 "configure"
  7277. #include "confdefs.h"
  7278. /* Override any gcc2 internal prototype to avoid an error. */
  7279. /* We use char because int might match the return type of a gcc2
  7280. builtin and then its argument prototype would still apply. */
  7281. char mysql_query();
  7282. int main() {
  7283. mysql_query()
  7284. ; return 0; }
  7285. EOF
  7286. if { (eval echo configure:8953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7287. rm -rf conftest*
  7288. eval "ac_cv_lib_$ac_lib_var=yes"
  7289. else
  7290. echo "configure: failed program was:" >&5
  7291. cat conftest.$ac_ext >&5
  7292. rm -rf conftest*
  7293. eval "ac_cv_lib_$ac_lib_var=no"
  7294. fi
  7295. rm -f conftest*
  7296. LIBS="$ac_save_LIBS"
  7297. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7298. echo "$ac_t""yes" 1>&6
  7299. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB $MATHLIB"
  7300. else
  7301. echo "$ac_t""no" 1>&6
  7302. LDFLAGS=${ac_save_ldflags}
  7303. { echo "configure: error: *** Unable to locate MySQL library." 1>&2; exit 1; }
  7304. fi
  7305. fi
  7306. fi
  7307. fi
  7308. fi
  7309. fi
  7310. fi
  7311. fi
  7312. LDFLAGS=${ac_save_ldflags}
  7313. # Check for libmysqld (for embedded version of the driver)
  7314. # Extract the first word of "mysql_config", so it can be a program name with args.
  7315. set dummy mysql_config; ac_word=$2
  7316. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  7317. echo "configure:9043: checking for $ac_word" >&5
  7318. case "$MYSQLD_CONFIG" in
  7319. /*)
  7320. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a path.
  7321. ;;
  7322. ?:/*)
  7323. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a dos path.
  7324. ;;
  7325. *)
  7326. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  7327. ac_dummy="$PATH"
  7328. for ac_dir in $ac_dummy; do
  7329. test -z "$ac_dir" && ac_dir=.
  7330. if test -f $ac_dir/$ac_word; then
  7331. ac_cv_path_MYSQLD_CONFIG="$ac_dir/$ac_word"
  7332. break
  7333. fi
  7334. done
  7335. IFS="$ac_save_ifs"
  7336. test -z "$ac_cv_path_MYSQLD_CONFIG" && ac_cv_path_MYSQLD_CONFIG="no"
  7337. ;;
  7338. esac
  7339. MYSQLD_CONFIG="$ac_cv_path_MYSQLD_CONFIG"
  7340. if test -n "$MYSQLD_CONFIG"; then
  7341. echo "$ac_t""$MYSQLD_CONFIG" 1>&6
  7342. else
  7343. echo "$ac_t""no" 1>&6
  7344. fi
  7345. if test "$MYSQLD_CONFIG" = "no" ; then
  7346. { echo "configure: error: *** couldn't find mysql_config" 1>&2; exit 1; }
  7347. fi
  7348. if test "$MYSQLD_CONFIG" != "" ; then
  7349. ac_ext=C
  7350. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  7351. ac_cpp='$CXXCPP $CPPFLAGS'
  7352. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  7353. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  7354. cross_compiling=$ac_cv_prog_cxx_cross
  7355. ac_save_libs="$LIBS"
  7356. MYSQLDLIB=`"$MYSQLD_CONFIG" --libmysqld-libs`
  7357. LIBS="$MYSQLDLIB $LIBS"
  7358. echo $ac_n "checking for mysql_server_init""... $ac_c" 1>&6
  7359. echo "configure:9092: checking for mysql_server_init" >&5
  7360. cat > conftest.$ac_ext <<EOF
  7361. #line 9095 "configure"
  7362. #include "confdefs.h"
  7363. /* System header to define __stub macros and hopefully few prototypes,
  7364. which can conflict with char mysql_server_init(); below. */
  7365. #include <assert.h>
  7366. /* Override any gcc2 internal prototype to avoid an error. */
  7367. #ifdef __cplusplus
  7368. extern "C"
  7369. #endif
  7370. /* We use char because int might match the return type of a gcc2
  7371. builtin and then its argument prototype would still apply. */
  7372. char mysql_server_init();
  7373. int main() {
  7374. /* The GNU C library defines this for functions which it implements
  7375. to always fail with ENOSYS. Some functions are actually named
  7376. something starting with __ and the normal name is an alias. */
  7377. #if defined (__stub_mysql_server_init) || defined (__stub___mysql_server_init)
  7378. choke me
  7379. #else
  7380. mysql_server_init();
  7381. #endif
  7382. ; return 0; }
  7383. EOF
  7384. if { (eval echo configure:9121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7385. rm -rf conftest*
  7386. eval "ac_cv_func_mysql_server_init=yes"
  7387. else
  7388. echo "configure: failed program was:" >&5
  7389. cat conftest.$ac_ext >&5
  7390. rm -rf conftest*
  7391. eval "ac_cv_func_mysql_server_init=no"
  7392. fi
  7393. rm -f conftest*
  7394. if eval "test \"`echo '$ac_cv_func_'mysql_server_init`\" = yes"; then
  7395. echo "$ac_t""yes" 1>&6
  7396. :
  7397. else
  7398. echo "$ac_t""no" 1>&6
  7399. MYSQLDLIB="";
  7400. echo "configure: warning: libmysqld not found" 1>&2
  7401. fi
  7402. LIBS=$ac_save_libs
  7403. ac_ext=c
  7404. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  7405. ac_cpp='$CPP $CPPFLAGS'
  7406. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  7407. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  7408. cross_compiling=$ac_cv_prog_cc_cross
  7409. ac_ext=c
  7410. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  7411. ac_cpp='$CPP $CPPFLAGS'
  7412. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  7413. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  7414. cross_compiling=$ac_cv_prog_cc_cross
  7415. fi
  7416. fi # $USE_MYSQL
  7417. # Done checking MySQL
  7418. # Enable SQLite option
  7419. echo $ac_n "checking whether to use SQLite""... $ac_c" 1>&6
  7420. echo "configure:9173: checking whether to use SQLite" >&5
  7421. echo "$ac_t"""$with_sqlite"" 1>&6
  7422. case "$with_sqlite" in
  7423. "no") USE_SQLITE= ;;
  7424. "yes") USE_SQLITE="1" ;;
  7425. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  7426. esac
  7427. SQLITEINCPATH=
  7428. SQLITELIBPATH=
  7429. SQLITELIB=
  7430. if test -n "$USE_SQLITE"; then
  7431. # With SQLite includes directory
  7432. echo $ac_n "checking for location of SQLite includes""... $ac_c" 1>&6
  7433. echo "configure:9193: checking for location of SQLite includes" >&5
  7434. case "$with_sqlite_includes" in
  7435. y | ye | yes | n | no)
  7436. { echo "configure: error: *** You must supply a directory to --with-sqlite-includes." 1>&2; exit 1; }
  7437. ;;
  7438. esac
  7439. echo "$ac_t""$with_sqlite_includes" 1>&6
  7440. if test -n "$with_sqlite_includes" ; then
  7441. for dir in $with_sqlite_includes; do
  7442. if test -d "$dir"; then
  7443. SQLITEINCPATH="$SQLITEINCPATH -I$dir"
  7444. else
  7445. { echo "configure: error: *** SQLite includes directory $dir does not exist." 1>&2; exit 1; }
  7446. fi
  7447. done
  7448. fi
  7449. ac_save_cppflags="$CPPFLAGS"
  7450. CPPFLAGS="$SQLITEINCPATH $CPPFLAGS"
  7451. for ac_hdr in sqlite3.h
  7452. do
  7453. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7454. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7455. echo "configure:9219: checking for $ac_hdr" >&5
  7456. cat > conftest.$ac_ext <<EOF
  7457. #line 9222 "configure"
  7458. #include "confdefs.h"
  7459. #include <$ac_hdr>
  7460. EOF
  7461. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7462. { (eval echo configure:9227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7463. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7464. if test -z "$ac_err"; then
  7465. rm -rf conftest*
  7466. eval "ac_cv_header_$ac_safe=yes"
  7467. else
  7468. echo "$ac_err" >&5
  7469. echo "configure: failed program was:" >&5
  7470. cat conftest.$ac_ext >&5
  7471. rm -rf conftest*
  7472. eval "ac_cv_header_$ac_safe=no"
  7473. fi
  7474. rm -f conftest*
  7475. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7476. echo "$ac_t""yes" 1>&6
  7477. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7478. cat >> confdefs.h <<EOF
  7479. #define $ac_tr_hdr 1
  7480. EOF
  7481. else
  7482. echo "$ac_t""no" 1>&6
  7483. { echo "configure: error: *** Unable to locate SQLite includes." 1>&2; exit 1; }
  7484. fi
  7485. done
  7486. CPPFLAGS=$ac_save_cppflags
  7487. cat >> confdefs.h <<\EOF
  7488. #define HAVE_SQLITE 1
  7489. EOF
  7490. fi # $USE_SQLITE
  7491. if test -n "$USE_SQLITE"; then
  7492. # With SQLite library directory
  7493. echo $ac_n "checking for location of SQLite library""... $ac_c" 1>&6
  7494. echo "configure:9270: checking for location of SQLite library" >&5
  7495. case "$with_sqlite_libs" in
  7496. y | ye | yes | n | no)
  7497. { echo "configure: error: *** You must supply a directory to --with-sqlite-libs." 1>&2; exit 1; }
  7498. ;;
  7499. esac
  7500. echo "$ac_t""$with_sqlite_libs" 1>&6
  7501. if test -n "$with_sqlite_libs"; then
  7502. for dir in $with_sqlite_libs; do
  7503. if test -d "$dir"; then
  7504. SQLITELIBPATH="$SQLITELIBPATH -L$dir"
  7505. else
  7506. { echo "configure: error: *** SQLite library directory $dir does not exist." 1>&2; exit 1; }
  7507. fi
  7508. done
  7509. fi
  7510. ac_save_ldflags="$LDFLAGS"
  7511. LDFLAGS="$SQLITELIBPATH $LDFLAGS"
  7512. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7513. echo "configure:9299: checking for sqlite3_open in -lsqlite3" >&5
  7514. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7515. ac_save_LIBS="$LIBS"
  7516. LIBS="-lsqlite3 $LIBS"
  7517. cat > conftest.$ac_ext <<EOF
  7518. #line 9305 "configure"
  7519. #include "confdefs.h"
  7520. /* Override any gcc2 internal prototype to avoid an error. */
  7521. /* We use char because int might match the return type of a gcc2
  7522. builtin and then its argument prototype would still apply. */
  7523. char sqlite3_open();
  7524. int main() {
  7525. sqlite3_open()
  7526. ; return 0; }
  7527. EOF
  7528. if { (eval echo configure:9316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7529. rm -rf conftest*
  7530. eval "ac_cv_lib_$ac_lib_var=yes"
  7531. else
  7532. echo "configure: failed program was:" >&5
  7533. cat conftest.$ac_ext >&5
  7534. rm -rf conftest*
  7535. eval "ac_cv_lib_$ac_lib_var=no"
  7536. fi
  7537. rm -f conftest*
  7538. LIBS="$ac_save_LIBS"
  7539. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7540. echo "$ac_t""yes" 1>&6
  7541. SQLITELIB="$SQLITELIB -lsqlite3 "
  7542. else
  7543. echo "$ac_t""no" 1>&6
  7544. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7545. echo "configure:9335: checking for sqlite3_open in -lsqlite3" >&5
  7546. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7547. ac_save_LIBS="$LIBS"
  7548. LIBS="-lsqlite3 $DLLIB $LIBS"
  7549. cat > conftest.$ac_ext <<EOF
  7550. #line 9341 "configure"
  7551. #include "confdefs.h"
  7552. /* Override any gcc2 internal prototype to avoid an error. */
  7553. /* We use char because int might match the return type of a gcc2
  7554. builtin and then its argument prototype would still apply. */
  7555. char sqlite3_open();
  7556. int main() {
  7557. sqlite3_open()
  7558. ; return 0; }
  7559. EOF
  7560. if { (eval echo configure:9352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7561. rm -rf conftest*
  7562. eval "ac_cv_lib_$ac_lib_var=yes"
  7563. else
  7564. echo "configure: failed program was:" >&5
  7565. cat conftest.$ac_ext >&5
  7566. rm -rf conftest*
  7567. eval "ac_cv_lib_$ac_lib_var=no"
  7568. fi
  7569. rm -f conftest*
  7570. LIBS="$ac_save_LIBS"
  7571. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7572. echo "$ac_t""yes" 1>&6
  7573. SQLITELIB="$SQLITELIB -lsqlite3 $DLLIB"
  7574. else
  7575. echo "$ac_t""no" 1>&6
  7576. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7577. echo "configure:9371: checking for sqlite3_open in -lsqlite3" >&5
  7578. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7579. ac_save_LIBS="$LIBS"
  7580. LIBS="-lsqlite3 $MATHLIB $LIBS"
  7581. cat > conftest.$ac_ext <<EOF
  7582. #line 9377 "configure"
  7583. #include "confdefs.h"
  7584. /* Override any gcc2 internal prototype to avoid an error. */
  7585. /* We use char because int might match the return type of a gcc2
  7586. builtin and then its argument prototype would still apply. */
  7587. char sqlite3_open();
  7588. int main() {
  7589. sqlite3_open()
  7590. ; return 0; }
  7591. EOF
  7592. if { (eval echo configure:9388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7593. rm -rf conftest*
  7594. eval "ac_cv_lib_$ac_lib_var=yes"
  7595. else
  7596. echo "configure: failed program was:" >&5
  7597. cat conftest.$ac_ext >&5
  7598. rm -rf conftest*
  7599. eval "ac_cv_lib_$ac_lib_var=no"
  7600. fi
  7601. rm -f conftest*
  7602. LIBS="$ac_save_LIBS"
  7603. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7604. echo "$ac_t""yes" 1>&6
  7605. SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB"
  7606. else
  7607. echo "$ac_t""no" 1>&6
  7608. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7609. echo "configure:9407: checking for sqlite3_open in -lsqlite3" >&5
  7610. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7611. ac_save_LIBS="$LIBS"
  7612. LIBS="-lsqlite3 $MATHLIB $DLLIB $LIBS"
  7613. cat > conftest.$ac_ext <<EOF
  7614. #line 9413 "configure"
  7615. #include "confdefs.h"
  7616. /* Override any gcc2 internal prototype to avoid an error. */
  7617. /* We use char because int might match the return type of a gcc2
  7618. builtin and then its argument prototype would still apply. */
  7619. char sqlite3_open();
  7620. int main() {
  7621. sqlite3_open()
  7622. ; return 0; }
  7623. EOF
  7624. if { (eval echo configure:9424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7625. rm -rf conftest*
  7626. eval "ac_cv_lib_$ac_lib_var=yes"
  7627. else
  7628. echo "configure: failed program was:" >&5
  7629. cat conftest.$ac_ext >&5
  7630. rm -rf conftest*
  7631. eval "ac_cv_lib_$ac_lib_var=no"
  7632. fi
  7633. rm -f conftest*
  7634. LIBS="$ac_save_LIBS"
  7635. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7636. echo "$ac_t""yes" 1>&6
  7637. SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB $DLLIB"
  7638. else
  7639. echo "$ac_t""no" 1>&6
  7640. LDFLAGS=${ac_save_ldflags}
  7641. { echo "configure: error: *** Unable to locate SQLite library." 1>&2; exit 1; }
  7642. fi
  7643. fi
  7644. fi
  7645. fi
  7646. LDFLAGS=${ac_save_ldflags}
  7647. fi # $USE_SQLITE
  7648. # Done checking SQLite
  7649. # Enable OpenGL option
  7650. OPENGLINC=
  7651. OPENGLLIB=
  7652. OPENGLULIB=
  7653. USE_OPENGL=
  7654. OPENGL_X11=
  7655. OPENGL_AQUA=
  7656. OPENGL_WINDOWS=
  7657. echo $ac_n "checking whether to use OpenGL""... $ac_c" 1>&6
  7658. echo "configure:9499: checking whether to use OpenGL" >&5
  7659. echo "$ac_t"""$with_opengl"" 1>&6
  7660. case "$with_opengl" in
  7661. n|no)
  7662. OPENGL_TYPE=none
  7663. ;;
  7664. y|yes|x|x11|glx)
  7665. OPENGL_TYPE=X11
  7666. USE_OPENGL=1
  7667. OPENGL_X11=1
  7668. ;;
  7669. aqua|mac|osx|macosx|agl)
  7670. OPENGL_TYPE=Aqua
  7671. USE_OPENGL=1
  7672. OPENGL_AQUA=1
  7673. ;;
  7674. win|windows|mswin|wgl)
  7675. OPENGL_TYPE=Windows
  7676. USE_OPENGL=1
  7677. OPENGL_WINDOWS=1
  7678. ;;
  7679. *)
  7680. { echo "configure: error: *** Valid arguments for --with-opengl= are yes,no,x11,aqua,windows." 1>&2; exit 1; }
  7681. ;;
  7682. esac
  7683. if test -n "$USE_OPENGL" ; then
  7684. if test "$OPENGL_X11" = 1 ; then
  7685. # With OpenGL includes directory
  7686. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  7687. echo "configure:9533: checking for location of OpenGL includes" >&5
  7688. case "$with_opengl_includes" in
  7689. y | ye | yes | n | no)
  7690. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  7691. ;;
  7692. esac
  7693. echo "$ac_t""$with_opengl_includes" 1>&6
  7694. if test -n "$with_opengl_includes" ; then
  7695. for dir in $with_opengl_includes; do
  7696. if test -d "$dir"; then
  7697. OPENGLINC="$OPENGLINC -I$dir"
  7698. else
  7699. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  7700. fi
  7701. done
  7702. fi
  7703. ac_save_cppflags="$CPPFLAGS"
  7704. CPPFLAGS="$OPENGLINC $X_CFLAGS $CPPFLAGS"
  7705. for ac_hdr in GL/gl.h GL/glu.h
  7706. do
  7707. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7708. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7709. echo "configure:9559: checking for $ac_hdr" >&5
  7710. cat > conftest.$ac_ext <<EOF
  7711. #line 9562 "configure"
  7712. #include "confdefs.h"
  7713. #include <$ac_hdr>
  7714. EOF
  7715. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7716. { (eval echo configure:9567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7717. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7718. if test -z "$ac_err"; then
  7719. rm -rf conftest*
  7720. eval "ac_cv_header_$ac_safe=yes"
  7721. else
  7722. echo "$ac_err" >&5
  7723. echo "configure: failed program was:" >&5
  7724. cat conftest.$ac_ext >&5
  7725. rm -rf conftest*
  7726. eval "ac_cv_header_$ac_safe=no"
  7727. fi
  7728. rm -f conftest*
  7729. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7730. echo "$ac_t""yes" 1>&6
  7731. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7732. cat >> confdefs.h <<EOF
  7733. #define $ac_tr_hdr 1
  7734. EOF
  7735. else
  7736. echo "$ac_t""no" 1>&6
  7737. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  7738. fi
  7739. done
  7740. CPPFLAGS=$ac_save_cppflags
  7741. # With OpenGL library directory
  7742. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  7743. echo "configure:9601: checking for location of OpenGL library" >&5
  7744. case "$with_opengl_libs" in
  7745. y | ye | yes | n | no)
  7746. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  7747. ;;
  7748. esac
  7749. echo "$ac_t""$with_opengl_libs" 1>&6
  7750. if test -n "$with_opengl_libs"; then
  7751. for dir in $with_opengl_libs; do
  7752. if test -d "$dir"; then
  7753. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  7754. else
  7755. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  7756. fi
  7757. done
  7758. fi
  7759. ac_save_ldflags="$LDFLAGS"
  7760. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  7761. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7762. echo "configure:9630: checking for glBegin in -lGL" >&5
  7763. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7764. ac_save_LIBS="$LIBS"
  7765. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  7766. cat > conftest.$ac_ext <<EOF
  7767. #line 9636 "configure"
  7768. #include "confdefs.h"
  7769. /* Override any gcc2 internal prototype to avoid an error. */
  7770. /* We use char because int might match the return type of a gcc2
  7771. builtin and then its argument prototype would still apply. */
  7772. char glBegin();
  7773. int main() {
  7774. glBegin()
  7775. ; return 0; }
  7776. EOF
  7777. if { (eval echo configure:9647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7778. rm -rf conftest*
  7779. eval "ac_cv_lib_$ac_lib_var=yes"
  7780. else
  7781. echo "configure: failed program was:" >&5
  7782. cat conftest.$ac_ext >&5
  7783. rm -rf conftest*
  7784. eval "ac_cv_lib_$ac_lib_var=no"
  7785. fi
  7786. rm -f conftest*
  7787. LIBS="$ac_save_LIBS"
  7788. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7789. echo "$ac_t""yes" 1>&6
  7790. OPENGLLIB="$OPENGLLIB -lGL "
  7791. else
  7792. echo "$ac_t""no" 1>&6
  7793. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7794. echo "configure:9666: checking for glBegin in -lGL" >&5
  7795. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7796. ac_save_LIBS="$LIBS"
  7797. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lXext $LIBS"
  7798. cat > conftest.$ac_ext <<EOF
  7799. #line 9672 "configure"
  7800. #include "confdefs.h"
  7801. /* Override any gcc2 internal prototype to avoid an error. */
  7802. /* We use char because int might match the return type of a gcc2
  7803. builtin and then its argument prototype would still apply. */
  7804. char glBegin();
  7805. int main() {
  7806. glBegin()
  7807. ; return 0; }
  7808. EOF
  7809. if { (eval echo configure:9683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7810. rm -rf conftest*
  7811. eval "ac_cv_lib_$ac_lib_var=yes"
  7812. else
  7813. echo "configure: failed program was:" >&5
  7814. cat conftest.$ac_ext >&5
  7815. rm -rf conftest*
  7816. eval "ac_cv_lib_$ac_lib_var=no"
  7817. fi
  7818. rm -f conftest*
  7819. LIBS="$ac_save_LIBS"
  7820. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7821. echo "$ac_t""yes" 1>&6
  7822. OPENGLLIB="$OPENGLLIB -lGL -lXext"
  7823. else
  7824. echo "$ac_t""no" 1>&6
  7825. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7826. echo "configure:9702: checking for glBegin in -lGL" >&5
  7827. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7828. ac_save_LIBS="$LIBS"
  7829. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread $LIBS"
  7830. cat > conftest.$ac_ext <<EOF
  7831. #line 9708 "configure"
  7832. #include "confdefs.h"
  7833. /* Override any gcc2 internal prototype to avoid an error. */
  7834. /* We use char because int might match the return type of a gcc2
  7835. builtin and then its argument prototype would still apply. */
  7836. char glBegin();
  7837. int main() {
  7838. glBegin()
  7839. ; return 0; }
  7840. EOF
  7841. if { (eval echo configure:9719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7842. rm -rf conftest*
  7843. eval "ac_cv_lib_$ac_lib_var=yes"
  7844. else
  7845. echo "configure: failed program was:" >&5
  7846. cat conftest.$ac_ext >&5
  7847. rm -rf conftest*
  7848. eval "ac_cv_lib_$ac_lib_var=no"
  7849. fi
  7850. rm -f conftest*
  7851. LIBS="$ac_save_LIBS"
  7852. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7853. echo "$ac_t""yes" 1>&6
  7854. OPENGLLIB="$OPENGLLIB -lGL -lpthread"
  7855. else
  7856. echo "$ac_t""no" 1>&6
  7857. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7858. echo "configure:9738: checking for glBegin in -lGL" >&5
  7859. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7860. ac_save_LIBS="$LIBS"
  7861. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread -lXext $LIBS"
  7862. cat > conftest.$ac_ext <<EOF
  7863. #line 9744 "configure"
  7864. #include "confdefs.h"
  7865. /* Override any gcc2 internal prototype to avoid an error. */
  7866. /* We use char because int might match the return type of a gcc2
  7867. builtin and then its argument prototype would still apply. */
  7868. char glBegin();
  7869. int main() {
  7870. glBegin()
  7871. ; return 0; }
  7872. EOF
  7873. if { (eval echo configure:9755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7874. rm -rf conftest*
  7875. eval "ac_cv_lib_$ac_lib_var=yes"
  7876. else
  7877. echo "configure: failed program was:" >&5
  7878. cat conftest.$ac_ext >&5
  7879. rm -rf conftest*
  7880. eval "ac_cv_lib_$ac_lib_var=no"
  7881. fi
  7882. rm -f conftest*
  7883. LIBS="$ac_save_LIBS"
  7884. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7885. echo "$ac_t""yes" 1>&6
  7886. OPENGLLIB="$OPENGLLIB -lGL -lpthread -lXext"
  7887. else
  7888. echo "$ac_t""no" 1>&6
  7889. LDFLAGS=${ac_save_ldflags}
  7890. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  7891. fi
  7892. fi
  7893. fi
  7894. fi
  7895. LDFLAGS=${ac_save_ldflags}
  7896. ac_save_ldflags="$LDFLAGS"
  7897. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  7898. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  7899. echo "configure:9817: checking for gluBeginCurve in -lGLU" >&5
  7900. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  7901. ac_save_LIBS="$LIBS"
  7902. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  7903. cat > conftest.$ac_ext <<EOF
  7904. #line 9823 "configure"
  7905. #include "confdefs.h"
  7906. /* Override any gcc2 internal prototype to avoid an error. */
  7907. /* We use char because int might match the return type of a gcc2
  7908. builtin and then its argument prototype would still apply. */
  7909. char gluBeginCurve();
  7910. int main() {
  7911. gluBeginCurve()
  7912. ; return 0; }
  7913. EOF
  7914. if { (eval echo configure:9834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7915. rm -rf conftest*
  7916. eval "ac_cv_lib_$ac_lib_var=yes"
  7917. else
  7918. echo "configure: failed program was:" >&5
  7919. cat conftest.$ac_ext >&5
  7920. rm -rf conftest*
  7921. eval "ac_cv_lib_$ac_lib_var=no"
  7922. fi
  7923. rm -f conftest*
  7924. LIBS="$ac_save_LIBS"
  7925. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7926. echo "$ac_t""yes" 1>&6
  7927. OPENGLULIB="$OPENGLULIB -lGLU "
  7928. else
  7929. echo "$ac_t""no" 1>&6
  7930. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  7931. echo "configure:9853: checking for gluBeginCurve in -lGLU" >&5
  7932. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  7933. ac_save_LIBS="$LIBS"
  7934. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lstdc++ $LIBS"
  7935. cat > conftest.$ac_ext <<EOF
  7936. #line 9859 "configure"
  7937. #include "confdefs.h"
  7938. /* Override any gcc2 internal prototype to avoid an error. */
  7939. /* We use char because int might match the return type of a gcc2
  7940. builtin and then its argument prototype would still apply. */
  7941. char gluBeginCurve();
  7942. int main() {
  7943. gluBeginCurve()
  7944. ; return 0; }
  7945. EOF
  7946. if { (eval echo configure:9870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7947. rm -rf conftest*
  7948. eval "ac_cv_lib_$ac_lib_var=yes"
  7949. else
  7950. echo "configure: failed program was:" >&5
  7951. cat conftest.$ac_ext >&5
  7952. rm -rf conftest*
  7953. eval "ac_cv_lib_$ac_lib_var=no"
  7954. fi
  7955. rm -f conftest*
  7956. LIBS="$ac_save_LIBS"
  7957. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7958. echo "$ac_t""yes" 1>&6
  7959. OPENGLULIB="$OPENGLULIB -lGLU -lstdc++"
  7960. else
  7961. echo "$ac_t""no" 1>&6
  7962. LDFLAGS=${ac_save_ldflags}
  7963. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  7964. fi
  7965. fi
  7966. LDFLAGS=${ac_save_ldflags}
  7967. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  7968. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  7969. ac_save_libs="$LIBS"
  7970. ac_save_ldflags="$LDFLAGS"
  7971. LIBS=" $OPENGLLIB $LIBS"
  7972. LDFLAGS=" $LDFLAGS"
  7973. echo $ac_n "checking for glXCreatePbuffer""... $ac_c" 1>&6
  7974. echo "configure:9917: checking for glXCreatePbuffer" >&5
  7975. cat > conftest.$ac_ext <<EOF
  7976. #line 9920 "configure"
  7977. #include "confdefs.h"
  7978. /* System header to define __stub macros and hopefully few prototypes,
  7979. which can conflict with char glXCreatePbuffer(); below. */
  7980. #include <assert.h>
  7981. /* Override any gcc2 internal prototype to avoid an error. */
  7982. /* We use char because int might match the return type of a gcc2
  7983. builtin and then its argument prototype would still apply. */
  7984. char glXCreatePbuffer();
  7985. int main() {
  7986. /* The GNU C library defines this for functions which it implements
  7987. to always fail with ENOSYS. Some functions are actually named
  7988. something starting with __ and the normal name is an alias. */
  7989. #if defined (__stub_glXCreatePbuffer) || defined (__stub___glXCreatePbuffer)
  7990. choke me
  7991. #else
  7992. glXCreatePbuffer();
  7993. #endif
  7994. ; return 0; }
  7995. EOF
  7996. if { (eval echo configure:9943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7997. rm -rf conftest*
  7998. eval "ac_cv_func_glXCreatePbuffer=yes"
  7999. else
  8000. echo "configure: failed program was:" >&5
  8001. cat conftest.$ac_ext >&5
  8002. rm -rf conftest*
  8003. eval "ac_cv_func_glXCreatePbuffer=no"
  8004. fi
  8005. rm -f conftest*
  8006. if eval "test \"`echo '$ac_cv_func_'glXCreatePbuffer`\" = yes"; then
  8007. echo "$ac_t""yes" 1>&6
  8008. cat >> confdefs.h <<\EOF
  8009. #define HAVE_PBUFFERS 1
  8010. EOF
  8011. else
  8012. echo "$ac_t""no" 1>&6
  8013. { echo "configure: error: *** Unable to locate glXCreatePbuffer." 1>&2; exit 1; }
  8014. fi
  8015. LIBS=${ac_save_libs}
  8016. LDFLAGS=${ac_save_ldflags}
  8017. ac_save_libs="$LIBS"
  8018. ac_save_ldflags="$LDFLAGS"
  8019. LIBS=" $OPENGLLIB $LIBS"
  8020. LDFLAGS=" $LDFLAGS"
  8021. echo $ac_n "checking for glXCreateGLXPixmap""... $ac_c" 1>&6
  8022. echo "configure:9980: checking for glXCreateGLXPixmap" >&5
  8023. cat > conftest.$ac_ext <<EOF
  8024. #line 9983 "configure"
  8025. #include "confdefs.h"
  8026. /* System header to define __stub macros and hopefully few prototypes,
  8027. which can conflict with char glXCreateGLXPixmap(); below. */
  8028. #include <assert.h>
  8029. /* Override any gcc2 internal prototype to avoid an error. */
  8030. /* We use char because int might match the return type of a gcc2
  8031. builtin and then its argument prototype would still apply. */
  8032. char glXCreateGLXPixmap();
  8033. int main() {
  8034. /* The GNU C library defines this for functions which it implements
  8035. to always fail with ENOSYS. Some functions are actually named
  8036. something starting with __ and the normal name is an alias. */
  8037. #if defined (__stub_glXCreateGLXPixmap) || defined (__stub___glXCreateGLXPixmap)
  8038. choke me
  8039. #else
  8040. glXCreateGLXPixmap();
  8041. #endif
  8042. ; return 0; }
  8043. EOF
  8044. if { (eval echo configure:10006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8045. rm -rf conftest*
  8046. eval "ac_cv_func_glXCreateGLXPixmap=yes"
  8047. else
  8048. echo "configure: failed program was:" >&5
  8049. cat conftest.$ac_ext >&5
  8050. rm -rf conftest*
  8051. eval "ac_cv_func_glXCreateGLXPixmap=no"
  8052. fi
  8053. rm -f conftest*
  8054. if eval "test \"`echo '$ac_cv_func_'glXCreateGLXPixmap`\" = yes"; then
  8055. echo "$ac_t""yes" 1>&6
  8056. cat >> confdefs.h <<\EOF
  8057. #define HAVE_PIXMAPS 1
  8058. EOF
  8059. else
  8060. echo "$ac_t""no" 1>&6
  8061. { echo "configure: error: *** Unable to locate glXCreateGLXPixmap." 1>&2; exit 1; }
  8062. fi
  8063. LIBS=${ac_save_libs}
  8064. LDFLAGS=${ac_save_ldflags}
  8065. cat >> confdefs.h <<\EOF
  8066. #define OPENGL_X11 1
  8067. EOF
  8068. fi # $OPENGL_X11
  8069. if test "$OPENGL_AQUA" = 1 ; then
  8070. echo $ac_n "checking for location of OpenGL framework""... $ac_c" 1>&6
  8071. echo "configure:10049: checking for location of OpenGL framework" >&5
  8072. case "$with_opengl_framework" in
  8073. y | ye | yes | n | no)
  8074. { echo "configure: error: *** You must supply a directory to --with-opengl-framework." 1>&2; exit 1; }
  8075. ;;
  8076. esac
  8077. echo "$ac_t""$with_opengl_framework" 1>&6
  8078. if test -n "$with_opengl_framework"; then
  8079. if test -d $with_opengl_framework; then
  8080. OPENGLPATH="$OPENGLPATH -F$with_opengl_framework"
  8081. else
  8082. { echo "configure: error: *** OpenGL framework directory $dir does not exist." 1>&2; exit 1; }
  8083. fi
  8084. fi
  8085. ac_save_cppflags="$CPPFLAGS"
  8086. CPPFLAGS="$OPENGLPATH $CPPFLAGS"
  8087. for ac_hdr in OpenGL/gl.h OpenGL/glu.h
  8088. do
  8089. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8090. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8091. echo "configure:10073: checking for $ac_hdr" >&5
  8092. cat > conftest.$ac_ext <<EOF
  8093. #line 10076 "configure"
  8094. #include "confdefs.h"
  8095. #include <$ac_hdr>
  8096. EOF
  8097. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8098. { (eval echo configure:10081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8099. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8100. if test -z "$ac_err"; then
  8101. rm -rf conftest*
  8102. eval "ac_cv_header_$ac_safe=yes"
  8103. else
  8104. echo "$ac_err" >&5
  8105. echo "configure: failed program was:" >&5
  8106. cat conftest.$ac_ext >&5
  8107. rm -rf conftest*
  8108. eval "ac_cv_header_$ac_safe=no"
  8109. fi
  8110. rm -f conftest*
  8111. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8112. echo "$ac_t""yes" 1>&6
  8113. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8114. cat >> confdefs.h <<EOF
  8115. #define $ac_tr_hdr 1
  8116. EOF
  8117. else
  8118. echo "$ac_t""no" 1>&6
  8119. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  8120. fi
  8121. done
  8122. CPPFLAGS=$ac_save_cppflags
  8123. ac_save_libs="$LIBS"
  8124. ac_save_ldflags="$LDFLAGS"
  8125. LIBS="-framework OpenGL -framework AGL -framework ApplicationServices $LIBS"
  8126. LDFLAGS="$OPENGLPATH $LDFLAGS"
  8127. echo $ac_n "checking for glBegin""... $ac_c" 1>&6
  8128. echo "configure:10117: checking for glBegin" >&5
  8129. cat > conftest.$ac_ext <<EOF
  8130. #line 10120 "configure"
  8131. #include "confdefs.h"
  8132. /* System header to define __stub macros and hopefully few prototypes,
  8133. which can conflict with char glBegin(); below. */
  8134. #include <assert.h>
  8135. /* Override any gcc2 internal prototype to avoid an error. */
  8136. /* We use char because int might match the return type of a gcc2
  8137. builtin and then its argument prototype would still apply. */
  8138. char glBegin();
  8139. int main() {
  8140. /* The GNU C library defines this for functions which it implements
  8141. to always fail with ENOSYS. Some functions are actually named
  8142. something starting with __ and the normal name is an alias. */
  8143. #if defined (__stub_glBegin) || defined (__stub___glBegin)
  8144. choke me
  8145. #else
  8146. glBegin();
  8147. #endif
  8148. ; return 0; }
  8149. EOF
  8150. if { (eval echo configure:10143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8151. rm -rf conftest*
  8152. eval "ac_cv_func_glBegin=yes"
  8153. else
  8154. echo "configure: failed program was:" >&5
  8155. cat conftest.$ac_ext >&5
  8156. rm -rf conftest*
  8157. eval "ac_cv_func_glBegin=no"
  8158. fi
  8159. rm -f conftest*
  8160. if eval "test \"`echo '$ac_cv_func_'glBegin`\" = yes"; then
  8161. echo "$ac_t""yes" 1>&6
  8162. OPENGLLIB="$OPENGLLIB -framework OpenGL -framework AGL -framework ApplicationServices"
  8163. else
  8164. echo "$ac_t""no" 1>&6
  8165. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  8166. fi
  8167. LIBS=${ac_save_libs}
  8168. LDFLAGS=${ac_save_ldflags}
  8169. ac_save_libs="$LIBS"
  8170. ac_save_ldflags="$LDFLAGS"
  8171. LIBS=" $OPENGLLIB $LIBS"
  8172. LDFLAGS="$OPENGLPATH $LDFLAGS"
  8173. echo $ac_n "checking for gluBeginCurve""... $ac_c" 1>&6
  8174. echo "configure:10180: checking for gluBeginCurve" >&5
  8175. cat > conftest.$ac_ext <<EOF
  8176. #line 10183 "configure"
  8177. #include "confdefs.h"
  8178. /* System header to define __stub macros and hopefully few prototypes,
  8179. which can conflict with char gluBeginCurve(); below. */
  8180. #include <assert.h>
  8181. /* Override any gcc2 internal prototype to avoid an error. */
  8182. /* We use char because int might match the return type of a gcc2
  8183. builtin and then its argument prototype would still apply. */
  8184. char gluBeginCurve();
  8185. int main() {
  8186. /* The GNU C library defines this for functions which it implements
  8187. to always fail with ENOSYS. Some functions are actually named
  8188. something starting with __ and the normal name is an alias. */
  8189. #if defined (__stub_gluBeginCurve) || defined (__stub___gluBeginCurve)
  8190. choke me
  8191. #else
  8192. gluBeginCurve();
  8193. #endif
  8194. ; return 0; }
  8195. EOF
  8196. if { (eval echo configure:10206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8197. rm -rf conftest*
  8198. eval "ac_cv_func_gluBeginCurve=yes"
  8199. else
  8200. echo "configure: failed program was:" >&5
  8201. cat conftest.$ac_ext >&5
  8202. rm -rf conftest*
  8203. eval "ac_cv_func_gluBeginCurve=no"
  8204. fi
  8205. rm -f conftest*
  8206. if eval "test \"`echo '$ac_cv_func_'gluBeginCurve`\" = yes"; then
  8207. echo "$ac_t""yes" 1>&6
  8208. OPENGLLIB="$OPENGLLIB "
  8209. else
  8210. echo "$ac_t""no" 1>&6
  8211. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  8212. fi
  8213. LIBS=${ac_save_libs}
  8214. LDFLAGS=${ac_save_ldflags}
  8215. OPENGLINC="$OPENGLPATH"
  8216. OPENGLLIBPATH="$OPENGLPATH"
  8217. cat >> confdefs.h <<\EOF
  8218. #define OPENGL_AQUA 1
  8219. EOF
  8220. fi # $OPENGL_AQUA
  8221. if test "$OPENGL_WINDOWS" = 1 ; then
  8222. # With OpenGL includes directory
  8223. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  8224. echo "configure:10254: checking for location of OpenGL includes" >&5
  8225. case "$with_opengl_includes" in
  8226. y | ye | yes | n | no)
  8227. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  8228. ;;
  8229. esac
  8230. echo "$ac_t""$with_opengl_includes" 1>&6
  8231. if test -n "$with_opengl_includes" ; then
  8232. for dir in $with_opengl_includes; do
  8233. if test -d "$dir"; then
  8234. OPENGLINC="$OPENGLINC -I$dir"
  8235. else
  8236. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  8237. fi
  8238. done
  8239. fi
  8240. ac_save_cppflags="$CPPFLAGS"
  8241. CPPFLAGS="$OPENGLINC $CPPFLAGS"
  8242. for ac_hdr in GL/gl.h GL/glu.h
  8243. do
  8244. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8245. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8246. echo "configure:10280: checking for $ac_hdr" >&5
  8247. cat > conftest.$ac_ext <<EOF
  8248. #line 10283 "configure"
  8249. #include "confdefs.h"
  8250. #include <$ac_hdr>
  8251. EOF
  8252. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8253. { (eval echo configure:10288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8254. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8255. if test -z "$ac_err"; then
  8256. rm -rf conftest*
  8257. eval "ac_cv_header_$ac_safe=yes"
  8258. else
  8259. echo "$ac_err" >&5
  8260. echo "configure: failed program was:" >&5
  8261. cat conftest.$ac_ext >&5
  8262. rm -rf conftest*
  8263. eval "ac_cv_header_$ac_safe=no"
  8264. fi
  8265. rm -f conftest*
  8266. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8267. echo "$ac_t""yes" 1>&6
  8268. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8269. cat >> confdefs.h <<EOF
  8270. #define $ac_tr_hdr 1
  8271. EOF
  8272. else
  8273. echo "$ac_t""no" 1>&6
  8274. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  8275. fi
  8276. done
  8277. CPPFLAGS=$ac_save_cppflags
  8278. # With OpenGL library directory
  8279. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  8280. echo "configure:10322: checking for location of OpenGL library" >&5
  8281. case "$with_opengl_libs" in
  8282. y | ye | yes | n | no)
  8283. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  8284. ;;
  8285. esac
  8286. echo "$ac_t""$with_opengl_libs" 1>&6
  8287. if test -n "$with_opengl_libs"; then
  8288. for dir in $with_opengl_libs; do
  8289. if test -d "$dir"; then
  8290. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  8291. else
  8292. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  8293. fi
  8294. done
  8295. fi
  8296. ac_save_cflags="$CFLAGS"
  8297. CFLAGS="$CFLAGS $OPENGLINC"
  8298. ac_save_ldflags="$LDFLAGS"
  8299. ac_save_libs="$LIBS"
  8300. echo $ac_n "checking for OpenGL library""... $ac_c" 1>&6
  8301. echo "configure:10347: checking for OpenGL library" >&5
  8302. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  8303. LIBS="-lopengl32 "
  8304. cat > conftest.$ac_ext <<EOF
  8305. #line 10351 "configure"
  8306. #include "confdefs.h"
  8307. #include <GL/gl.h>
  8308. int main() {
  8309. glEnd();
  8310. ; return 0; }
  8311. EOF
  8312. if { (eval echo configure:10358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8313. rm -rf conftest*
  8314. echo "$ac_t""found" 1>&6
  8315. OPENGLLIB="$OPENGLLIB -lopengl32 "
  8316. else
  8317. echo "configure: failed program was:" >&5
  8318. cat conftest.$ac_ext >&5
  8319. rm -rf conftest*
  8320. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  8321. fi
  8322. rm -f conftest*
  8323. LIBS=${ac_save_libs}
  8324. LDFLAGS=${ac_save_ldflags}
  8325. ac_save_ldflags="$LDFLAGS"
  8326. ac_save_libs="$LIBS"
  8327. echo $ac_n "checking for GLU library""... $ac_c" 1>&6
  8328. echo "configure:10382: checking for GLU library" >&5
  8329. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  8330. LIBS="-lglu32 $OPENGLLIB "
  8331. cat > conftest.$ac_ext <<EOF
  8332. #line 10386 "configure"
  8333. #include "confdefs.h"
  8334. #include <GL/glu.h>
  8335. int main() {
  8336. gluNewQuadric();
  8337. ; return 0; }
  8338. EOF
  8339. if { (eval echo configure:10393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8340. rm -rf conftest*
  8341. echo "$ac_t""found" 1>&6
  8342. OPENGLULIB="$OPENGLULIB -lglu32 "
  8343. else
  8344. echo "configure: failed program was:" >&5
  8345. cat conftest.$ac_ext >&5
  8346. rm -rf conftest*
  8347. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  8348. fi
  8349. rm -f conftest*
  8350. LIBS=${ac_save_libs}
  8351. LDFLAGS=${ac_save_ldflags}
  8352. CFLAGS="${ac_save_cflags}"
  8353. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  8354. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  8355. cat >> confdefs.h <<\EOF
  8356. #define OPENGL_WINDOWS 1
  8357. EOF
  8358. fi # $OPENGL_WINDOWS
  8359. fi # $USE_OPENGL
  8360. # Done checking OpenGL
  8361. # Enable ODBC option
  8362. echo $ac_n "checking whether to use ODBC""... $ac_c" 1>&6
  8363. echo "configure:10442: checking whether to use ODBC" >&5
  8364. echo "$ac_t"""$with_odbc"" 1>&6
  8365. case "$with_odbc" in
  8366. "no") USE_ODBC= ;;
  8367. "yes") USE_ODBC="1" ;;
  8368. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8369. esac
  8370. ODBCINC=
  8371. ODBCLIB=
  8372. if test -n "$USE_ODBC"; then
  8373. # With ODBC includes directory
  8374. echo $ac_n "checking for location of ODBC includes""... $ac_c" 1>&6
  8375. echo "configure:10461: checking for location of ODBC includes" >&5
  8376. case "$with_odbc_includes" in
  8377. y | ye | yes | n | no)
  8378. { echo "configure: error: *** You must supply a directory to --with-odbc-includes." 1>&2; exit 1; }
  8379. ;;
  8380. esac
  8381. echo "$ac_t""$with_odbc_includes" 1>&6
  8382. if test -n "$with_odbc_includes" ; then
  8383. for dir in $with_odbc_includes; do
  8384. if test -d "$dir"; then
  8385. ODBCINC="$ODBCINC -I$dir"
  8386. else
  8387. { echo "configure: error: *** ODBC includes directory $dir does not exist." 1>&2; exit 1; }
  8388. fi
  8389. done
  8390. fi
  8391. ac_save_cppflags="$CPPFLAGS"
  8392. CPPFLAGS="$ODBCINC $CPPFLAGS"
  8393. for ac_hdr in sql.h
  8394. do
  8395. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8396. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8397. echo "configure:10487: checking for $ac_hdr" >&5
  8398. cat > conftest.$ac_ext <<EOF
  8399. #line 10490 "configure"
  8400. #include "confdefs.h"
  8401. #include <$ac_hdr>
  8402. EOF
  8403. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8404. { (eval echo configure:10495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8405. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8406. if test -z "$ac_err"; then
  8407. rm -rf conftest*
  8408. eval "ac_cv_header_$ac_safe=yes"
  8409. else
  8410. echo "$ac_err" >&5
  8411. echo "configure: failed program was:" >&5
  8412. cat conftest.$ac_ext >&5
  8413. rm -rf conftest*
  8414. eval "ac_cv_header_$ac_safe=no"
  8415. fi
  8416. rm -f conftest*
  8417. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8418. echo "$ac_t""yes" 1>&6
  8419. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8420. cat >> confdefs.h <<EOF
  8421. #define $ac_tr_hdr 1
  8422. EOF
  8423. else
  8424. echo "$ac_t""no" 1>&6
  8425. { echo "configure: error: *** Unable to locate ODBC includes." 1>&2; exit 1; }
  8426. fi
  8427. done
  8428. CPPFLAGS=$ac_save_cppflags
  8429. # With ODBC library directory
  8430. echo $ac_n "checking for location of ODBC library""... $ac_c" 1>&6
  8431. echo "configure:10529: checking for location of ODBC library" >&5
  8432. case "$with_odbc_libs" in
  8433. y | ye | yes | n | no)
  8434. { echo "configure: error: *** You must supply a directory to --with-odbc-libs." 1>&2; exit 1; }
  8435. ;;
  8436. esac
  8437. echo "$ac_t""$with_odbc_libs" 1>&6
  8438. if test -n "$with_odbc_libs"; then
  8439. for dir in $with_odbc_libs; do
  8440. if test -d "$dir"; then
  8441. ODBCLIB="$ODBCLIB -L$dir"
  8442. else
  8443. { echo "configure: error: *** ODBC library directory $dir does not exist." 1>&2; exit 1; }
  8444. fi
  8445. done
  8446. fi
  8447. ac_save_ldflags="$LDFLAGS"
  8448. LDFLAGS="$ODBCLIB $LDFLAGS"
  8449. echo $ac_n "checking for SQLConnect in -lodbc""... $ac_c" 1>&6
  8450. echo "configure:10554: checking for SQLConnect in -lodbc" >&5
  8451. ac_lib_var=`echo odbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  8452. ac_save_LIBS="$LIBS"
  8453. LIBS="-lodbc $ICONVLIB $LIBS"
  8454. cat > conftest.$ac_ext <<EOF
  8455. #line 10560 "configure"
  8456. #include "confdefs.h"
  8457. /* Override any gcc2 internal prototype to avoid an error. */
  8458. /* We use char because int might match the return type of a gcc2
  8459. builtin and then its argument prototype would still apply. */
  8460. char SQLConnect();
  8461. int main() {
  8462. SQLConnect()
  8463. ; return 0; }
  8464. EOF
  8465. if { (eval echo configure:10571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8466. rm -rf conftest*
  8467. eval "ac_cv_lib_$ac_lib_var=yes"
  8468. else
  8469. echo "configure: failed program was:" >&5
  8470. cat conftest.$ac_ext >&5
  8471. rm -rf conftest*
  8472. eval "ac_cv_lib_$ac_lib_var=no"
  8473. fi
  8474. rm -f conftest*
  8475. LIBS="$ac_save_LIBS"
  8476. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8477. echo "$ac_t""yes" 1>&6
  8478. ODBCLIB="$ODBCLIB -lodbc "
  8479. else
  8480. echo "$ac_t""no" 1>&6
  8481. LDFLAGS=${ac_save_ldflags}
  8482. ac_save_ldflags="$LDFLAGS"
  8483. LDFLAGS="$ODBCLIB $LDFLAGS"
  8484. echo $ac_n "checking for SQLConnect in -liodbc""... $ac_c" 1>&6
  8485. echo "configure:10596: checking for SQLConnect in -liodbc" >&5
  8486. ac_lib_var=`echo iodbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  8487. ac_save_LIBS="$LIBS"
  8488. LIBS="-liodbc $LIBS"
  8489. cat > conftest.$ac_ext <<EOF
  8490. #line 10602 "configure"
  8491. #include "confdefs.h"
  8492. /* Override any gcc2 internal prototype to avoid an error. */
  8493. /* We use char because int might match the return type of a gcc2
  8494. builtin and then its argument prototype would still apply. */
  8495. char SQLConnect();
  8496. int main() {
  8497. SQLConnect()
  8498. ; return 0; }
  8499. EOF
  8500. if { (eval echo configure:10613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8501. rm -rf conftest*
  8502. eval "ac_cv_lib_$ac_lib_var=yes"
  8503. else
  8504. echo "configure: failed program was:" >&5
  8505. cat conftest.$ac_ext >&5
  8506. rm -rf conftest*
  8507. eval "ac_cv_lib_$ac_lib_var=no"
  8508. fi
  8509. rm -f conftest*
  8510. LIBS="$ac_save_LIBS"
  8511. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8512. echo "$ac_t""yes" 1>&6
  8513. ODBCLIB="$ODBCLIB -liodbc "
  8514. else
  8515. echo "$ac_t""no" 1>&6
  8516. LDFLAGS=${ac_save_ldflags}
  8517. ac_save_cflags="$CFLAGS"
  8518. CFLAGS="$CFLAGS $ODBCINC"
  8519. ac_save_ldflags="$LDFLAGS"
  8520. ac_save_libs="$LIBS"
  8521. echo $ac_n "checking for ODBC library""... $ac_c" 1>&6
  8522. echo "configure:10638: checking for ODBC library" >&5
  8523. LDFLAGS="$ODBCLIB $LDFLAGS"
  8524. LIBS="-lodbc32 "
  8525. cat > conftest.$ac_ext <<EOF
  8526. #line 10642 "configure"
  8527. #include "confdefs.h"
  8528. #include <windows.h>
  8529. #include <sql.h>
  8530. int main() {
  8531. SQLAllocEnv((SQLHENV *)0);
  8532. ; return 0; }
  8533. EOF
  8534. if { (eval echo configure:10650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8535. rm -rf conftest*
  8536. echo "$ac_t""found" 1>&6
  8537. ODBCLIB="$ODBCLIB -lodbc32 "
  8538. else
  8539. echo "configure: failed program was:" >&5
  8540. cat conftest.$ac_ext >&5
  8541. rm -rf conftest*
  8542. { echo "configure: error: *** Unable to locate ODBC library." 1>&2; exit 1; }
  8543. fi
  8544. rm -f conftest*
  8545. LIBS=${ac_save_libs}
  8546. LDFLAGS=${ac_save_ldflags}
  8547. CFLAGS="${ac_save_cflags}"
  8548. fi
  8549. LDFLAGS=${ac_save_ldflags}
  8550. fi
  8551. LDFLAGS=${ac_save_ldflags}
  8552. fi # $USE_ODBC
  8553. # Done checking ODBC
  8554. # Enable FFTW option
  8555. echo $ac_n "checking whether to use FFTW""... $ac_c" 1>&6
  8556. echo "configure:10699: checking whether to use FFTW" >&5
  8557. echo "$ac_t"""$with_fftw"" 1>&6
  8558. case "$with_fftw" in
  8559. "no") USE_FFTW= ;;
  8560. "yes") USE_FFTW="1" ;;
  8561. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8562. esac
  8563. FFTWINC=
  8564. FFTWLIB=
  8565. if test -n "$USE_FFTW"; then
  8566. # With FFTW includes directory
  8567. echo $ac_n "checking for location of FFTW includes""... $ac_c" 1>&6
  8568. echo "configure:10718: checking for location of FFTW includes" >&5
  8569. case "$with_fftw_includes" in
  8570. y | ye | yes | n | no)
  8571. { echo "configure: error: *** You must supply a directory to --with-fftw-includes." 1>&2; exit 1; }
  8572. ;;
  8573. esac
  8574. echo "$ac_t""$with_fftw_includes" 1>&6
  8575. if test -n "$with_fftw_includes" ; then
  8576. for dir in $with_fftw_includes; do
  8577. if test -d "$dir"; then
  8578. FFTWINC="$FFTWINC -I$dir"
  8579. else
  8580. { echo "configure: error: *** FFTW includes directory $dir does not exist." 1>&2; exit 1; }
  8581. fi
  8582. done
  8583. fi
  8584. ac_save_cppflags="$CPPFLAGS"
  8585. CPPFLAGS="$FFTWINC $CPPFLAGS"
  8586. for ac_hdr in fftw3.h
  8587. do
  8588. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8589. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8590. echo "configure:10744: checking for $ac_hdr" >&5
  8591. cat > conftest.$ac_ext <<EOF
  8592. #line 10747 "configure"
  8593. #include "confdefs.h"
  8594. #include <$ac_hdr>
  8595. EOF
  8596. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8597. { (eval echo configure:10752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8598. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8599. if test -z "$ac_err"; then
  8600. rm -rf conftest*
  8601. eval "ac_cv_header_$ac_safe=yes"
  8602. else
  8603. echo "$ac_err" >&5
  8604. echo "configure: failed program was:" >&5
  8605. cat conftest.$ac_ext >&5
  8606. rm -rf conftest*
  8607. eval "ac_cv_header_$ac_safe=no"
  8608. fi
  8609. rm -f conftest*
  8610. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8611. echo "$ac_t""yes" 1>&6
  8612. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8613. cat >> confdefs.h <<EOF
  8614. #define $ac_tr_hdr 1
  8615. EOF
  8616. else
  8617. echo "$ac_t""no" 1>&6
  8618. ac_save_cppflags="$CPPFLAGS"
  8619. CPPFLAGS=" $CPPFLAGS"
  8620. for ac_hdr in fftw.h
  8621. do
  8622. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8623. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8624. echo "configure:10780: checking for $ac_hdr" >&5
  8625. cat > conftest.$ac_ext <<EOF
  8626. #line 10783 "configure"
  8627. #include "confdefs.h"
  8628. #include <$ac_hdr>
  8629. EOF
  8630. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8631. { (eval echo configure:10788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8632. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8633. if test -z "$ac_err"; then
  8634. rm -rf conftest*
  8635. eval "ac_cv_header_$ac_safe=yes"
  8636. else
  8637. echo "$ac_err" >&5
  8638. echo "configure: failed program was:" >&5
  8639. cat conftest.$ac_ext >&5
  8640. rm -rf conftest*
  8641. eval "ac_cv_header_$ac_safe=no"
  8642. fi
  8643. rm -f conftest*
  8644. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8645. echo "$ac_t""yes" 1>&6
  8646. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8647. cat >> confdefs.h <<EOF
  8648. #define $ac_tr_hdr 1
  8649. EOF
  8650. else
  8651. echo "$ac_t""no" 1>&6
  8652. ac_save_cppflags="$CPPFLAGS"
  8653. CPPFLAGS=" $CPPFLAGS"
  8654. for ac_hdr in dfftw.h
  8655. do
  8656. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8657. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8658. echo "configure:10816: checking for $ac_hdr" >&5
  8659. cat > conftest.$ac_ext <<EOF
  8660. #line 10819 "configure"
  8661. #include "confdefs.h"
  8662. #include <$ac_hdr>
  8663. EOF
  8664. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8665. { (eval echo configure:10824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8666. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8667. if test -z "$ac_err"; then
  8668. rm -rf conftest*
  8669. eval "ac_cv_header_$ac_safe=yes"
  8670. else
  8671. echo "$ac_err" >&5
  8672. echo "configure: failed program was:" >&5
  8673. cat conftest.$ac_ext >&5
  8674. rm -rf conftest*
  8675. eval "ac_cv_header_$ac_safe=no"
  8676. fi
  8677. rm -f conftest*
  8678. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8679. echo "$ac_t""yes" 1>&6
  8680. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8681. cat >> confdefs.h <<EOF
  8682. #define $ac_tr_hdr 1
  8683. EOF
  8684. else
  8685. echo "$ac_t""no" 1>&6
  8686. { echo "configure: error: *** Unable to locate FFTW includes." 1>&2; exit 1; }
  8687. fi
  8688. done
  8689. CPPFLAGS=$ac_save_cppflags
  8690. fi
  8691. done
  8692. CPPFLAGS=$ac_save_cppflags
  8693. fi
  8694. done
  8695. CPPFLAGS=$ac_save_cppflags
  8696. # With FFTW library directory
  8697. echo $ac_n "checking for location of FFTW library""... $ac_c" 1>&6
  8698. echo "configure:10870: checking for location of FFTW library" >&5
  8699. case "$with_fftw_libs" in
  8700. y | ye | yes | n | no)
  8701. { echo "configure: error: *** You must supply a directory to --with-fftw-libs." 1>&2; exit 1; }
  8702. ;;
  8703. esac
  8704. echo "$ac_t""$with_fftw_libs" 1>&6
  8705. if test -n "$with_fftw_libs"; then
  8706. for dir in $with_fftw_libs; do
  8707. if test -d "$dir"; then
  8708. FFTWLIB="$FFTWLIB -L$dir"
  8709. else
  8710. { echo "configure: error: *** FFTW library directory $dir does not exist." 1>&2; exit 1; }
  8711. fi
  8712. done
  8713. fi
  8714. ac_save_ldflags="$LDFLAGS"
  8715. LDFLAGS="$FFTWLIB $LDFLAGS"
  8716. echo $ac_n "checking for fftw_execute in -lfftw3""... $ac_c" 1>&6
  8717. echo "configure:10895: checking for fftw_execute in -lfftw3" >&5
  8718. ac_lib_var=`echo fftw3'_'fftw_execute | sed 'y%./+-%__p_%'`
  8719. ac_save_LIBS="$LIBS"
  8720. LIBS="-lfftw3 $MATHLIB $LIBS"
  8721. cat > conftest.$ac_ext <<EOF
  8722. #line 10901 "configure"
  8723. #include "confdefs.h"
  8724. /* Override any gcc2 internal prototype to avoid an error. */
  8725. /* We use char because int might match the return type of a gcc2
  8726. builtin and then its argument prototype would still apply. */
  8727. char fftw_execute();
  8728. int main() {
  8729. fftw_execute()
  8730. ; return 0; }
  8731. EOF
  8732. if { (eval echo configure:10912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8733. rm -rf conftest*
  8734. eval "ac_cv_lib_$ac_lib_var=yes"
  8735. else
  8736. echo "configure: failed program was:" >&5
  8737. cat conftest.$ac_ext >&5
  8738. rm -rf conftest*
  8739. eval "ac_cv_lib_$ac_lib_var=no"
  8740. fi
  8741. rm -f conftest*
  8742. LIBS="$ac_save_LIBS"
  8743. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8744. echo "$ac_t""yes" 1>&6
  8745. FFTWLIB="$FFTWLIB -lfftw3 $MATHLIB"
  8746. else
  8747. echo "$ac_t""no" 1>&6
  8748. LDFLAGS=${ac_save_ldflags}
  8749. ac_save_ldflags="$LDFLAGS"
  8750. LDFLAGS="$FFTWLIB $LDFLAGS"
  8751. echo $ac_n "checking for fftwnd_one in -lfftw""... $ac_c" 1>&6
  8752. echo "configure:10937: checking for fftwnd_one in -lfftw" >&5
  8753. ac_lib_var=`echo fftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  8754. ac_save_LIBS="$LIBS"
  8755. LIBS="-lfftw $MATHLIB $LIBS"
  8756. cat > conftest.$ac_ext <<EOF
  8757. #line 10943 "configure"
  8758. #include "confdefs.h"
  8759. /* Override any gcc2 internal prototype to avoid an error. */
  8760. /* We use char because int might match the return type of a gcc2
  8761. builtin and then its argument prototype would still apply. */
  8762. char fftwnd_one();
  8763. int main() {
  8764. fftwnd_one()
  8765. ; return 0; }
  8766. EOF
  8767. if { (eval echo configure:10954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8768. rm -rf conftest*
  8769. eval "ac_cv_lib_$ac_lib_var=yes"
  8770. else
  8771. echo "configure: failed program was:" >&5
  8772. cat conftest.$ac_ext >&5
  8773. rm -rf conftest*
  8774. eval "ac_cv_lib_$ac_lib_var=no"
  8775. fi
  8776. rm -f conftest*
  8777. LIBS="$ac_save_LIBS"
  8778. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8779. echo "$ac_t""yes" 1>&6
  8780. FFTWLIB="$FFTWLIB -lfftw $MATHLIB"
  8781. else
  8782. echo "$ac_t""no" 1>&6
  8783. LDFLAGS=${ac_save_ldflags}
  8784. ac_save_ldflags="$LDFLAGS"
  8785. LDFLAGS="$FFTWLIB $LDFLAGS"
  8786. echo $ac_n "checking for fftwnd_one in -ldfftw""... $ac_c" 1>&6
  8787. echo "configure:10979: checking for fftwnd_one in -ldfftw" >&5
  8788. ac_lib_var=`echo dfftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  8789. ac_save_LIBS="$LIBS"
  8790. LIBS="-ldfftw $MATHLIB $LIBS"
  8791. cat > conftest.$ac_ext <<EOF
  8792. #line 10985 "configure"
  8793. #include "confdefs.h"
  8794. /* Override any gcc2 internal prototype to avoid an error. */
  8795. /* We use char because int might match the return type of a gcc2
  8796. builtin and then its argument prototype would still apply. */
  8797. char fftwnd_one();
  8798. int main() {
  8799. fftwnd_one()
  8800. ; return 0; }
  8801. EOF
  8802. if { (eval echo configure:10996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8803. rm -rf conftest*
  8804. eval "ac_cv_lib_$ac_lib_var=yes"
  8805. else
  8806. echo "configure: failed program was:" >&5
  8807. cat conftest.$ac_ext >&5
  8808. rm -rf conftest*
  8809. eval "ac_cv_lib_$ac_lib_var=no"
  8810. fi
  8811. rm -f conftest*
  8812. LIBS="$ac_save_LIBS"
  8813. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8814. echo "$ac_t""yes" 1>&6
  8815. FFTWLIB="$FFTWLIB -ldfftw $MATHLIB"
  8816. else
  8817. echo "$ac_t""no" 1>&6
  8818. LDFLAGS=${ac_save_ldflags}
  8819. { echo "configure: error: *** Unable to locate FFTW library." 1>&2; exit 1; }
  8820. fi
  8821. LDFLAGS=${ac_save_ldflags}
  8822. fi
  8823. LDFLAGS=${ac_save_ldflags}
  8824. fi
  8825. LDFLAGS=${ac_save_ldflags}
  8826. fi # $USE_FFTW
  8827. # Done checking FFTW
  8828. # Enable BLAS option
  8829. echo $ac_n "checking whether to use BLAS""... $ac_c" 1>&6
  8830. echo "configure:11053: checking whether to use BLAS" >&5
  8831. echo "$ac_t"""$with_blas"" 1>&6
  8832. case "$with_blas" in
  8833. "no") USE_BLAS= ;;
  8834. "yes") USE_BLAS="1" ;;
  8835. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8836. esac
  8837. BLASLIB=
  8838. BLASINC=
  8839. if test -n "$USE_BLAS"; then
  8840. # With BLAS includes directory
  8841. # BLAS doesn't have includes (FORTRAN library)
  8842. # With BLAS library directory
  8843. echo $ac_n "checking for location of BLAS includes""... $ac_c" 1>&6
  8844. echo "configure:11074: checking for location of BLAS includes" >&5
  8845. case "$with_blas_includes" in
  8846. y | ye | yes | n | no)
  8847. { echo "configure: error: *** You must supply a directory to --with-blas-includes." 1>&2; exit 1; }
  8848. ;;
  8849. esac
  8850. echo "$ac_t""$with_blas_includes" 1>&6
  8851. if test -n "$with_blas_includes" ; then
  8852. for dir in $with_blas_includes; do
  8853. if test -d "$dir"; then
  8854. BLASINC="$BLASINC -I$dir"
  8855. else
  8856. { echo "configure: error: *** BLAS includes directory $dir does not exist." 1>&2; exit 1; }
  8857. fi
  8858. done
  8859. fi
  8860. echo $ac_n "checking for location of BLAS library""... $ac_c" 1>&6
  8861. echo "configure:11094: checking for location of BLAS library" >&5
  8862. case "$with_blas_libs" in
  8863. y | ye | yes | n | no)
  8864. { echo "configure: error: *** You must supply a directory to --with-blas-libs." 1>&2; exit 1; }
  8865. ;;
  8866. esac
  8867. echo "$ac_t""$with_blas_libs" 1>&6
  8868. if test -n "$with_blas_libs"; then
  8869. for dir in $with_blas_libs; do
  8870. if test -d "$dir"; then
  8871. BLASLIB="$BLASLIB -L$dir"
  8872. else
  8873. { echo "configure: error: *** BLAS library directory $dir does not exist." 1>&2; exit 1; }
  8874. fi
  8875. done
  8876. fi
  8877. # See if cblas.h exists (CBLAS,ATLAS,others)
  8878. save_CPPFLAGS="$CPPFLAGS"
  8879. CPPFLAGS="$BLASINC $CPPFLAGS"
  8880. for ac_hdr in cblas.h
  8881. do
  8882. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8883. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8884. echo "configure:11120: checking for $ac_hdr" >&5
  8885. cat > conftest.$ac_ext <<EOF
  8886. #line 11123 "configure"
  8887. #include "confdefs.h"
  8888. #include <$ac_hdr>
  8889. EOF
  8890. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8891. { (eval echo configure:11128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8892. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8893. if test -z "$ac_err"; then
  8894. rm -rf conftest*
  8895. eval "ac_cv_header_$ac_safe=yes"
  8896. else
  8897. echo "$ac_err" >&5
  8898. echo "configure: failed program was:" >&5
  8899. cat conftest.$ac_ext >&5
  8900. rm -rf conftest*
  8901. eval "ac_cv_header_$ac_safe=no"
  8902. fi
  8903. rm -f conftest*
  8904. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8905. echo "$ac_t""yes" 1>&6
  8906. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8907. cat >> confdefs.h <<EOF
  8908. #define $ac_tr_hdr 1
  8909. EOF
  8910. else
  8911. echo "$ac_t""no" 1>&6
  8912. fi
  8913. done
  8914. CPPFLAGS="$save_CPPFLAGS"
  8915. ac_save_ldflags="$LDFLAGS"
  8916. LDFLAGS="$BLASLIB $LDFLAGS"
  8917. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  8918. echo "configure:11163: checking for dnrm2_ in -lblas" >&5
  8919. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  8920. ac_save_LIBS="$LIBS"
  8921. LIBS="-lblas $MATHLIB $LIBS"
  8922. cat > conftest.$ac_ext <<EOF
  8923. #line 11169 "configure"
  8924. #include "confdefs.h"
  8925. /* Override any gcc2 internal prototype to avoid an error. */
  8926. /* We use char because int might match the return type of a gcc2
  8927. builtin and then its argument prototype would still apply. */
  8928. char dnrm2_();
  8929. int main() {
  8930. dnrm2_()
  8931. ; return 0; }
  8932. EOF
  8933. if { (eval echo configure:11180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8934. rm -rf conftest*
  8935. eval "ac_cv_lib_$ac_lib_var=yes"
  8936. else
  8937. echo "configure: failed program was:" >&5
  8938. cat conftest.$ac_ext >&5
  8939. rm -rf conftest*
  8940. eval "ac_cv_lib_$ac_lib_var=no"
  8941. fi
  8942. rm -f conftest*
  8943. LIBS="$ac_save_LIBS"
  8944. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8945. echo "$ac_t""yes" 1>&6
  8946. BLASLIB="$BLASLIB -lblas "
  8947. else
  8948. echo "$ac_t""no" 1>&6
  8949. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  8950. echo "configure:11199: checking for dnrm2_ in -lblas" >&5
  8951. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  8952. ac_save_LIBS="$LIBS"
  8953. LIBS="-lblas $MATHLIB -lg2c $LIBS"
  8954. cat > conftest.$ac_ext <<EOF
  8955. #line 11205 "configure"
  8956. #include "confdefs.h"
  8957. /* Override any gcc2 internal prototype to avoid an error. */
  8958. /* We use char because int might match the return type of a gcc2
  8959. builtin and then its argument prototype would still apply. */
  8960. char dnrm2_();
  8961. int main() {
  8962. dnrm2_()
  8963. ; return 0; }
  8964. EOF
  8965. if { (eval echo configure:11216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8966. rm -rf conftest*
  8967. eval "ac_cv_lib_$ac_lib_var=yes"
  8968. else
  8969. echo "configure: failed program was:" >&5
  8970. cat conftest.$ac_ext >&5
  8971. rm -rf conftest*
  8972. eval "ac_cv_lib_$ac_lib_var=no"
  8973. fi
  8974. rm -f conftest*
  8975. LIBS="$ac_save_LIBS"
  8976. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8977. echo "$ac_t""yes" 1>&6
  8978. BLASLIB="$BLASLIB -lblas -lg2c"
  8979. else
  8980. echo "$ac_t""no" 1>&6
  8981. LDFLAGS=${ac_save_ldflags}
  8982. { echo "configure: error: *** Unable to locate BLAS library." 1>&2; exit 1; }
  8983. fi
  8984. fi
  8985. LDFLAGS=${ac_save_ldflags}
  8986. blas_ok=no
  8987. # Check for ATLAS
  8988. save_LDFLAGS="$LDFLAGS"
  8989. LDFLAGS="$BLASLIB $LDFLAGS"
  8990. echo $ac_n "checking for ATL_xerbla in -latlas""... $ac_c" 1>&6
  8991. echo "configure:11260: checking for ATL_xerbla in -latlas" >&5
  8992. ac_lib_var=`echo atlas'_'ATL_xerbla | sed 'y%./+-%__p_%'`
  8993. ac_save_LIBS="$LIBS"
  8994. LIBS="-latlas $LIBS"
  8995. cat > conftest.$ac_ext <<EOF
  8996. #line 11266 "configure"
  8997. #include "confdefs.h"
  8998. /* Override any gcc2 internal prototype to avoid an error. */
  8999. /* We use char because int might match the return type of a gcc2
  9000. builtin and then its argument prototype would still apply. */
  9001. char ATL_xerbla();
  9002. int main() {
  9003. ATL_xerbla()
  9004. ; return 0; }
  9005. EOF
  9006. if { (eval echo configure:11277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9007. rm -rf conftest*
  9008. eval "ac_cv_lib_$ac_lib_var=yes"
  9009. else
  9010. echo "configure: failed program was:" >&5
  9011. cat conftest.$ac_ext >&5
  9012. rm -rf conftest*
  9013. eval "ac_cv_lib_$ac_lib_var=no"
  9014. fi
  9015. rm -f conftest*
  9016. LIBS="$ac_save_LIBS"
  9017. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9018. echo "$ac_t""yes" 1>&6
  9019. echo $ac_n "checking for sgemm_ in -lf77blas""... $ac_c" 1>&6
  9020. echo "configure:11292: checking for sgemm_ in -lf77blas" >&5
  9021. ac_lib_var=`echo f77blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9022. ac_save_LIBS="$LIBS"
  9023. LIBS="-lf77blas -latlas $LIBS"
  9024. cat > conftest.$ac_ext <<EOF
  9025. #line 11298 "configure"
  9026. #include "confdefs.h"
  9027. /* Override any gcc2 internal prototype to avoid an error. */
  9028. /* We use char because int might match the return type of a gcc2
  9029. builtin and then its argument prototype would still apply. */
  9030. char sgemm_();
  9031. int main() {
  9032. sgemm_()
  9033. ; return 0; }
  9034. EOF
  9035. if { (eval echo configure:11309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9036. rm -rf conftest*
  9037. eval "ac_cv_lib_$ac_lib_var=yes"
  9038. else
  9039. echo "configure: failed program was:" >&5
  9040. cat conftest.$ac_ext >&5
  9041. rm -rf conftest*
  9042. eval "ac_cv_lib_$ac_lib_var=no"
  9043. fi
  9044. rm -f conftest*
  9045. LIBS="$ac_save_LIBS"
  9046. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9047. echo "$ac_t""yes" 1>&6
  9048. echo $ac_n "checking for cblas_dgemm in -lcblas""... $ac_c" 1>&6
  9049. echo "configure:11324: checking for cblas_dgemm in -lcblas" >&5
  9050. ac_lib_var=`echo cblas'_'cblas_dgemm | sed 'y%./+-%__p_%'`
  9051. ac_save_LIBS="$LIBS"
  9052. LIBS="-lcblas -lf77blas -latlas $LIBS"
  9053. cat > conftest.$ac_ext <<EOF
  9054. #line 11330 "configure"
  9055. #include "confdefs.h"
  9056. /* Override any gcc2 internal prototype to avoid an error. */
  9057. /* We use char because int might match the return type of a gcc2
  9058. builtin and then its argument prototype would still apply. */
  9059. char cblas_dgemm();
  9060. int main() {
  9061. cblas_dgemm()
  9062. ; return 0; }
  9063. EOF
  9064. if { (eval echo configure:11341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9065. rm -rf conftest*
  9066. eval "ac_cv_lib_$ac_lib_var=yes"
  9067. else
  9068. echo "configure: failed program was:" >&5
  9069. cat conftest.$ac_ext >&5
  9070. rm -rf conftest*
  9071. eval "ac_cv_lib_$ac_lib_var=no"
  9072. fi
  9073. rm -f conftest*
  9074. LIBS="$ac_save_LIBS"
  9075. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9076. echo "$ac_t""yes" 1>&6
  9077. blas_ok=yes; BLASLIB="-lcblas -lf77blas -latlas"
  9078. else
  9079. echo "$ac_t""no" 1>&6
  9080. fi
  9081. else
  9082. echo "$ac_t""no" 1>&6
  9083. fi
  9084. else
  9085. echo "$ac_t""no" 1>&6
  9086. fi
  9087. LDFLAGS="$save_LDFLAGS"
  9088. # Do we have ATLAS?
  9089. if test $blas_ok = yes; then
  9090. cat >> confdefs.h <<\EOF
  9091. #define HAVE_LIBATLAS 1
  9092. EOF
  9093. fi
  9094. # BLAS in Apple vecLib framework? (Mac OS-X)
  9095. # not dependent on APP build
  9096. #if test -n "$MACOSX_APP"; then
  9097. if test $blas_ok = no; then
  9098. vlib_flags="-framework vecLib"
  9099. save_LIBS="$LIBS"
  9100. LIBS="$vlib_flags $LIBS"
  9101. echo $ac_n "checking for sgemm in $vlib_flags""... $ac_c" 1>&6
  9102. echo "configure:11387: checking for sgemm in $vlib_flags" >&5
  9103. cat > conftest.$ac_ext <<EOF
  9104. #line 11389 "configure"
  9105. #include "confdefs.h"
  9106. int main() {
  9107. sgemm
  9108. ; return 0; }
  9109. EOF
  9110. if { (eval echo configure:11396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9111. rm -rf conftest*
  9112. blas_ok=yes; BLASLIB="$vlib_flags"
  9113. else
  9114. echo "configure: failed program was:" >&5
  9115. cat conftest.$ac_ext >&5
  9116. rm -rf conftest*
  9117. BLASLIB=""
  9118. fi
  9119. rm -f conftest*
  9120. echo "$ac_t""$blas_ok" 1>&6
  9121. LIBS="$save_LIBS"
  9122. fi
  9123. #fi # $MACOSX_APP
  9124. # BLAS in PhiPACK libraries? (requires generic BLAS, too)
  9125. if test $blas_ok = no; then
  9126. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  9127. echo "configure:11414: checking for sgemm_ in -lblas" >&5
  9128. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9129. ac_save_LIBS="$LIBS"
  9130. LIBS="-lblas $LIBS"
  9131. cat > conftest.$ac_ext <<EOF
  9132. #line 11420 "configure"
  9133. #include "confdefs.h"
  9134. /* Override any gcc2 internal prototype to avoid an error. */
  9135. /* We use char because int might match the return type of a gcc2
  9136. builtin and then its argument prototype would still apply. */
  9137. char sgemm_();
  9138. int main() {
  9139. sgemm_()
  9140. ; return 0; }
  9141. EOF
  9142. if { (eval echo configure:11431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9143. rm -rf conftest*
  9144. eval "ac_cv_lib_$ac_lib_var=yes"
  9145. else
  9146. echo "configure: failed program was:" >&5
  9147. cat conftest.$ac_ext >&5
  9148. rm -rf conftest*
  9149. eval "ac_cv_lib_$ac_lib_var=no"
  9150. fi
  9151. rm -f conftest*
  9152. LIBS="$ac_save_LIBS"
  9153. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9154. echo "$ac_t""yes" 1>&6
  9155. echo $ac_n "checking for dgemm_ in -ldgemm""... $ac_c" 1>&6
  9156. echo "configure:11446: checking for dgemm_ in -ldgemm" >&5
  9157. ac_lib_var=`echo dgemm'_'dgemm_ | sed 'y%./+-%__p_%'`
  9158. ac_save_LIBS="$LIBS"
  9159. LIBS="-ldgemm -lblas $LIBS"
  9160. cat > conftest.$ac_ext <<EOF
  9161. #line 11452 "configure"
  9162. #include "confdefs.h"
  9163. /* Override any gcc2 internal prototype to avoid an error. */
  9164. /* We use char because int might match the return type of a gcc2
  9165. builtin and then its argument prototype would still apply. */
  9166. char dgemm_();
  9167. int main() {
  9168. dgemm_()
  9169. ; return 0; }
  9170. EOF
  9171. if { (eval echo configure:11463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9172. rm -rf conftest*
  9173. eval "ac_cv_lib_$ac_lib_var=yes"
  9174. else
  9175. echo "configure: failed program was:" >&5
  9176. cat conftest.$ac_ext >&5
  9177. rm -rf conftest*
  9178. eval "ac_cv_lib_$ac_lib_var=no"
  9179. fi
  9180. rm -f conftest*
  9181. LIBS="$ac_save_LIBS"
  9182. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9183. echo "$ac_t""yes" 1>&6
  9184. echo $ac_n "checking for sgemm_ in -lsgemm""... $ac_c" 1>&6
  9185. echo "configure:11478: checking for sgemm_ in -lsgemm" >&5
  9186. ac_lib_var=`echo sgemm'_'sgemm_ | sed 'y%./+-%__p_%'`
  9187. ac_save_LIBS="$LIBS"
  9188. LIBS="-lsgemm -lblas $LIBS"
  9189. cat > conftest.$ac_ext <<EOF
  9190. #line 11484 "configure"
  9191. #include "confdefs.h"
  9192. /* Override any gcc2 internal prototype to avoid an error. */
  9193. /* We use char because int might match the return type of a gcc2
  9194. builtin and then its argument prototype would still apply. */
  9195. char sgemm_();
  9196. int main() {
  9197. sgemm_()
  9198. ; return 0; }
  9199. EOF
  9200. if { (eval echo configure:11495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9201. rm -rf conftest*
  9202. eval "ac_cv_lib_$ac_lib_var=yes"
  9203. else
  9204. echo "configure: failed program was:" >&5
  9205. cat conftest.$ac_ext >&5
  9206. rm -rf conftest*
  9207. eval "ac_cv_lib_$ac_lib_var=no"
  9208. fi
  9209. rm -f conftest*
  9210. LIBS="$ac_save_LIBS"
  9211. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9212. echo "$ac_t""yes" 1>&6
  9213. blas_ok=yes; BLASLIB="-lsgemm -ldgemm -lblas"
  9214. else
  9215. echo "$ac_t""no" 1>&6
  9216. fi
  9217. else
  9218. echo "$ac_t""no" 1>&6
  9219. fi
  9220. else
  9221. echo "$ac_t""no" 1>&6
  9222. fi
  9223. fi
  9224. # BLAS in Sun Performance library?
  9225. if test $blas_ok = no; then
  9226. if test "x$GCC" != xyes; then # only works with Sun CC
  9227. echo $ac_n "checking for acosp in -lsunmath""... $ac_c" 1>&6
  9228. echo "configure:11529: checking for acosp in -lsunmath" >&5
  9229. ac_lib_var=`echo sunmath'_'acosp | sed 'y%./+-%__p_%'`
  9230. ac_save_LIBS="$LIBS"
  9231. LIBS="-lsunmath $LIBS"
  9232. cat > conftest.$ac_ext <<EOF
  9233. #line 11535 "configure"
  9234. #include "confdefs.h"
  9235. /* Override any gcc2 internal prototype to avoid an error. */
  9236. /* We use char because int might match the return type of a gcc2
  9237. builtin and then its argument prototype would still apply. */
  9238. char acosp();
  9239. int main() {
  9240. acosp()
  9241. ; return 0; }
  9242. EOF
  9243. if { (eval echo configure:11546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9244. rm -rf conftest*
  9245. eval "ac_cv_lib_$ac_lib_var=yes"
  9246. else
  9247. echo "configure: failed program was:" >&5
  9248. cat conftest.$ac_ext >&5
  9249. rm -rf conftest*
  9250. eval "ac_cv_lib_$ac_lib_var=no"
  9251. fi
  9252. rm -f conftest*
  9253. LIBS="$ac_save_LIBS"
  9254. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9255. echo "$ac_t""yes" 1>&6
  9256. echo $ac_n "checking for sgemm_ in -lsunperf""... $ac_c" 1>&6
  9257. echo "configure:11561: checking for sgemm_ in -lsunperf" >&5
  9258. ac_lib_var=`echo sunperf'_'sgemm_ | sed 'y%./+-%__p_%'`
  9259. ac_save_LIBS="$LIBS"
  9260. LIBS="-lsunperf -lsunmath $LIBS"
  9261. cat > conftest.$ac_ext <<EOF
  9262. #line 11567 "configure"
  9263. #include "confdefs.h"
  9264. /* Override any gcc2 internal prototype to avoid an error. */
  9265. /* We use char because int might match the return type of a gcc2
  9266. builtin and then its argument prototype would still apply. */
  9267. char sgemm_();
  9268. int main() {
  9269. sgemm_()
  9270. ; return 0; }
  9271. EOF
  9272. if { (eval echo configure:11578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9273. rm -rf conftest*
  9274. eval "ac_cv_lib_$ac_lib_var=yes"
  9275. else
  9276. echo "configure: failed program was:" >&5
  9277. cat conftest.$ac_ext >&5
  9278. rm -rf conftest*
  9279. eval "ac_cv_lib_$ac_lib_var=no"
  9280. fi
  9281. rm -f conftest*
  9282. LIBS="$ac_save_LIBS"
  9283. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9284. echo "$ac_t""yes" 1>&6
  9285. blas_ok=yes; BLASLIB="-xlic_lib=sunperf -lsunmath"
  9286. else
  9287. echo "$ac_t""no" 1>&6
  9288. fi
  9289. else
  9290. echo "$ac_t""no" 1>&6
  9291. fi
  9292. fi
  9293. fi
  9294. # Generic BLAS library
  9295. if test $blas_ok = no; then
  9296. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  9297. echo "configure:11608: checking for sgemm_ in -lblas" >&5
  9298. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9299. ac_save_LIBS="$LIBS"
  9300. LIBS="-lblas $LIBS"
  9301. cat > conftest.$ac_ext <<EOF
  9302. #line 11614 "configure"
  9303. #include "confdefs.h"
  9304. /* Override any gcc2 internal prototype to avoid an error. */
  9305. /* We use char because int might match the return type of a gcc2
  9306. builtin and then its argument prototype would still apply. */
  9307. char sgemm_();
  9308. int main() {
  9309. sgemm_()
  9310. ; return 0; }
  9311. EOF
  9312. if { (eval echo configure:11625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9313. rm -rf conftest*
  9314. eval "ac_cv_lib_$ac_lib_var=yes"
  9315. else
  9316. echo "configure: failed program was:" >&5
  9317. cat conftest.$ac_ext >&5
  9318. rm -rf conftest*
  9319. eval "ac_cv_lib_$ac_lib_var=no"
  9320. fi
  9321. rm -f conftest*
  9322. LIBS="$ac_save_LIBS"
  9323. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9324. echo "$ac_t""yes" 1>&6
  9325. blas_ok=yes; BLASLIB="-lblas"
  9326. else
  9327. echo "$ac_t""no" 1>&6
  9328. fi
  9329. fi
  9330. if test $blas_ok = yes; then
  9331. cat >> confdefs.h <<\EOF
  9332. #define HAVE_LIBBLAS 1
  9333. EOF
  9334. fi
  9335. fi # $USE_BLAS
  9336. # Done checking BLAS
  9337. # Enable LAPACK option
  9338. echo $ac_n "checking whether to use LAPACK""... $ac_c" 1>&6
  9339. echo "configure:11664: checking whether to use LAPACK" >&5
  9340. echo "$ac_t"""$with_lapack"" 1>&6
  9341. case "$with_lapack" in
  9342. "no") USE_LAPACK= ;;
  9343. "yes") USE_LAPACK="1" ;;
  9344. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9345. esac
  9346. LAPACKLIB=
  9347. LAPACKINC=
  9348. # LAPACK is useless without BLAS
  9349. if test -n "$USE_BLAS"; then
  9350. if test -n "$USE_LAPACK"; then
  9351. # With LAPACK includes directory
  9352. # LAPACK doesn't have includes (FORTRAN library)
  9353. # With LAPACK library directory
  9354. lapack_ok=no
  9355. echo $ac_n "checking for location of LAPACK includes""... $ac_c" 1>&6
  9356. echo "configure:11689: checking for location of LAPACK includes" >&5
  9357. case "$with_lapack_includes" in
  9358. y | ye | yes | n | no)
  9359. { echo "configure: error: *** You must supply a directory to --with-lapack-includes." 1>&2; exit 1; }
  9360. ;;
  9361. esac
  9362. echo "$ac_t""$with_lapack_includes" 1>&6
  9363. if test -n "$with_lapack_includes" ; then
  9364. for dir in $with_lapack_includes; do
  9365. if test -d "$dir"; then
  9366. LAPACKINC="$LAPACKINC -I$dir"
  9367. else
  9368. { echo "configure: error: *** LAPACK includes directory $dir does not exist." 1>&2; exit 1; }
  9369. fi
  9370. done
  9371. fi
  9372. echo $ac_n "checking for location of LAPACK library""... $ac_c" 1>&6
  9373. echo "configure:11709: checking for location of LAPACK library" >&5
  9374. case "$with_lapack_libs" in
  9375. y | ye | yes | n | no)
  9376. { echo "configure: error: *** You must supply a directory to --with-lapack-libs." 1>&2; exit 1; }
  9377. ;;
  9378. esac
  9379. echo "$ac_t""$with_lapack_libs" 1>&6
  9380. if test -n "$with_lapack_libs"; then
  9381. for dir in $with_lapack_libs; do
  9382. if test -d "$dir"; then
  9383. LAPACKLIB="$LAPACKLIB -L$dir"
  9384. else
  9385. { echo "configure: error: *** LAPACK library directory $dir does not exist." 1>&2; exit 1; }
  9386. fi
  9387. done
  9388. fi
  9389. # See if clapack.h exists (ATLAS)
  9390. save_CPPFLAGS="$CPPFLAGS"
  9391. CPPFLAGS="$LAPACKINC $CPPFLAGS"
  9392. for ac_hdr in clapack.h
  9393. do
  9394. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9395. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9396. echo "configure:11735: checking for $ac_hdr" >&5
  9397. cat > conftest.$ac_ext <<EOF
  9398. #line 11738 "configure"
  9399. #include "confdefs.h"
  9400. #include <$ac_hdr>
  9401. EOF
  9402. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9403. { (eval echo configure:11743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9404. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9405. if test -z "$ac_err"; then
  9406. rm -rf conftest*
  9407. eval "ac_cv_header_$ac_safe=yes"
  9408. else
  9409. echo "$ac_err" >&5
  9410. echo "configure: failed program was:" >&5
  9411. cat conftest.$ac_ext >&5
  9412. rm -rf conftest*
  9413. eval "ac_cv_header_$ac_safe=no"
  9414. fi
  9415. rm -f conftest*
  9416. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9417. echo "$ac_t""yes" 1>&6
  9418. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9419. cat >> confdefs.h <<EOF
  9420. #define $ac_tr_hdr 1
  9421. EOF
  9422. else
  9423. echo "$ac_t""no" 1>&6
  9424. fi
  9425. done
  9426. CPPFLAGS="$save_CPPFLAGS"
  9427. # LAPACK linked to by default?
  9428. if test lapack_ok=no; then
  9429. save_LIBS="$LIBS"; LIBS="$LIBS $BLASLIB $MATHLIB $FLIBS"
  9430. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  9431. echo $ac_n "checking for dsegv_""... $ac_c" 1>&6
  9432. echo "configure:11775: checking for dsegv_" >&5
  9433. cat > conftest.$ac_ext <<EOF
  9434. #line 11778 "configure"
  9435. #include "confdefs.h"
  9436. /* System header to define __stub macros and hopefully few prototypes,
  9437. which can conflict with char dsegv_(); below. */
  9438. #include <assert.h>
  9439. /* Override any gcc2 internal prototype to avoid an error. */
  9440. /* We use char because int might match the return type of a gcc2
  9441. builtin and then its argument prototype would still apply. */
  9442. char dsegv_();
  9443. int main() {
  9444. /* The GNU C library defines this for functions which it implements
  9445. to always fail with ENOSYS. Some functions are actually named
  9446. something starting with __ and the normal name is an alias. */
  9447. #if defined (__stub_dsegv_) || defined (__stub___dsegv_)
  9448. choke me
  9449. #else
  9450. dsegv_();
  9451. #endif
  9452. ; return 0; }
  9453. EOF
  9454. if { (eval echo configure:11801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9455. rm -rf conftest*
  9456. eval "ac_cv_func_dsegv_=yes"
  9457. else
  9458. echo "configure: failed program was:" >&5
  9459. cat conftest.$ac_ext >&5
  9460. rm -rf conftest*
  9461. eval "ac_cv_func_dsegv_=no"
  9462. fi
  9463. rm -f conftest*
  9464. if eval "test \"`echo '$ac_cv_func_'dsegv_`\" = yes"; then
  9465. echo "$ac_t""yes" 1>&6
  9466. lapack_ok=yes
  9467. else
  9468. echo "$ac_t""no" 1>&6
  9469. fi
  9470. LIBS="$save_LIBS"
  9471. LDFLAGS="$save_LDFLAGS"
  9472. fi
  9473. # Generic LAPACK library?
  9474. if test $lapack_ok = no; then
  9475. save_libs="$LIBS"; LIBS="$BLASLIB $MATHLIB $LIBS"
  9476. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  9477. echo $ac_n "checking for desgv_ in -llapack""... $ac_c" 1>&6
  9478. echo "configure:11828: checking for desgv_ in -llapack" >&5
  9479. ac_lib_var=`echo lapack'_'desgv_ | sed 'y%./+-%__p_%'`
  9480. ac_save_LIBS="$LIBS"
  9481. LIBS="-llapack $FLIBS $LIBS"
  9482. cat > conftest.$ac_ext <<EOF
  9483. #line 11834 "configure"
  9484. #include "confdefs.h"
  9485. /* Override any gcc2 internal prototype to avoid an error. */
  9486. /* We use char because int might match the return type of a gcc2
  9487. builtin and then its argument prototype would still apply. */
  9488. char desgv_();
  9489. int main() {
  9490. desgv_()
  9491. ; return 0; }
  9492. EOF
  9493. if { (eval echo configure:11845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9494. rm -rf conftest*
  9495. eval "ac_cv_lib_$ac_lib_var=yes"
  9496. else
  9497. echo "configure: failed program was:" >&5
  9498. cat conftest.$ac_ext >&5
  9499. rm -rf conftest*
  9500. eval "ac_cv_lib_$ac_lib_var=no"
  9501. fi
  9502. rm -f conftest*
  9503. LIBS="$ac_save_LIBS"
  9504. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9505. echo "$ac_t""yes" 1>&6
  9506. lapack_ok=yes; LAPACKLIB="-llapack"
  9507. else
  9508. echo "$ac_t""no" 1>&6
  9509. fi
  9510. LIBS="$save_LIBS"
  9511. LDFLAGS="$save_LDFLAGS"
  9512. fi
  9513. if test $lapack_ok = no; then
  9514. ac_save_ldflags="$LDFLAGS"
  9515. LDFLAGS="$LAPACKLIB $LDFLAGS"
  9516. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  9517. echo "configure:11877: checking for dgesv_ in -llapack" >&5
  9518. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  9519. ac_save_LIBS="$LIBS"
  9520. LIBS="-llapack $BLASLIB $MATHLIB $LIBS"
  9521. cat > conftest.$ac_ext <<EOF
  9522. #line 11883 "configure"
  9523. #include "confdefs.h"
  9524. /* Override any gcc2 internal prototype to avoid an error. */
  9525. /* We use char because int might match the return type of a gcc2
  9526. builtin and then its argument prototype would still apply. */
  9527. char dgesv_();
  9528. int main() {
  9529. dgesv_()
  9530. ; return 0; }
  9531. EOF
  9532. if { (eval echo configure:11894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9533. rm -rf conftest*
  9534. eval "ac_cv_lib_$ac_lib_var=yes"
  9535. else
  9536. echo "configure: failed program was:" >&5
  9537. cat conftest.$ac_ext >&5
  9538. rm -rf conftest*
  9539. eval "ac_cv_lib_$ac_lib_var=no"
  9540. fi
  9541. rm -f conftest*
  9542. LIBS="$ac_save_LIBS"
  9543. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9544. echo "$ac_t""yes" 1>&6
  9545. LAPACKLIB="$LAPACKLIB -llapack "
  9546. else
  9547. echo "$ac_t""no" 1>&6
  9548. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  9549. echo "configure:11913: checking for dgesv_ in -llapack" >&5
  9550. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  9551. ac_save_LIBS="$LIBS"
  9552. LIBS="-llapack $BLASLIB $MATHLIB -lg2c $LIBS"
  9553. cat > conftest.$ac_ext <<EOF
  9554. #line 11919 "configure"
  9555. #include "confdefs.h"
  9556. /* Override any gcc2 internal prototype to avoid an error. */
  9557. /* We use char because int might match the return type of a gcc2
  9558. builtin and then its argument prototype would still apply. */
  9559. char dgesv_();
  9560. int main() {
  9561. dgesv_()
  9562. ; return 0; }
  9563. EOF
  9564. if { (eval echo configure:11930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9565. rm -rf conftest*
  9566. eval "ac_cv_lib_$ac_lib_var=yes"
  9567. else
  9568. echo "configure: failed program was:" >&5
  9569. cat conftest.$ac_ext >&5
  9570. rm -rf conftest*
  9571. eval "ac_cv_lib_$ac_lib_var=no"
  9572. fi
  9573. rm -f conftest*
  9574. LIBS="$ac_save_LIBS"
  9575. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9576. echo "$ac_t""yes" 1>&6
  9577. LAPACKLIB="$LAPACKLIB -llapack -lg2c"
  9578. else
  9579. echo "$ac_t""no" 1>&6
  9580. LDFLAGS=${ac_save_ldflags}
  9581. { echo "configure: error: *** Unable to locate LAPACK library." 1>&2; exit 1; }
  9582. fi
  9583. fi
  9584. LDFLAGS=${ac_save_ldflags}
  9585. fi
  9586. cat >> confdefs.h <<\EOF
  9587. #define HAVE_LIBLAPACK 1
  9588. EOF
  9589. fi # $USE_LAPACK
  9590. fi # $USE_BLAS
  9591. # Done checking LAPACK
  9592. # Enable Cairo display driver option
  9593. echo $ac_n "checking whether to use Cairo""... $ac_c" 1>&6
  9594. echo "configure:11986: checking whether to use Cairo" >&5
  9595. echo "$ac_t"""$with_cairo"" 1>&6
  9596. case "$with_cairo" in
  9597. "no") USE_CAIRO= ;;
  9598. "yes") USE_CAIRO="1" ;;
  9599. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9600. esac
  9601. CAIROINC=
  9602. CAIROLIB=
  9603. if test -n "$USE_CAIRO"; then
  9604. cairo="cairo"
  9605. pkgs="cairo-ft cairo-fc cairo-pdf cairo-ps cairo-svg fontconfig"
  9606. if test -n "$USE_X11"; then
  9607. pkgs="$pkgs cairo-xlib cairo-xlib-xrender"
  9608. fi
  9609. for pkg in $pkgs ; do
  9610. if $PKG_CONFIG --exists $pkg ; then
  9611. cairo="$cairo $pkg"
  9612. fi
  9613. done
  9614. # With Cairo includes directory
  9615. #FIXME: somehow quote dirs with spaces in $cairo ?
  9616. CAIROINC=`$PKG_CONFIG --cflags $cairo`
  9617. echo $ac_n "checking for location of cairo includes""... $ac_c" 1>&6
  9618. echo "configure:12018: checking for location of cairo includes" >&5
  9619. case "$with_cairo_includes" in
  9620. y | ye | yes | n | no)
  9621. { echo "configure: error: *** You must supply a directory to --with-cairo-includes." 1>&2; exit 1; }
  9622. ;;
  9623. esac
  9624. echo "$ac_t""$with_cairo_includes" 1>&6
  9625. if test -n "$with_cairo_includes" ; then
  9626. for dir in $with_cairo_includes; do
  9627. if test -d "$dir"; then
  9628. CAIROINC="$CAIROINC -I$dir"
  9629. else
  9630. { echo "configure: error: *** cairo includes directory $dir does not exist." 1>&2; exit 1; }
  9631. fi
  9632. done
  9633. fi
  9634. ac_save_cppflags="$CPPFLAGS"
  9635. CPPFLAGS="$CAIROINC $CPPFLAGS"
  9636. for ac_hdr in cairo.h
  9637. do
  9638. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9639. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9640. echo "configure:12044: checking for $ac_hdr" >&5
  9641. cat > conftest.$ac_ext <<EOF
  9642. #line 12047 "configure"
  9643. #include "confdefs.h"
  9644. #include <$ac_hdr>
  9645. EOF
  9646. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9647. { (eval echo configure:12052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9648. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9649. if test -z "$ac_err"; then
  9650. rm -rf conftest*
  9651. eval "ac_cv_header_$ac_safe=yes"
  9652. else
  9653. echo "$ac_err" >&5
  9654. echo "configure: failed program was:" >&5
  9655. cat conftest.$ac_ext >&5
  9656. rm -rf conftest*
  9657. eval "ac_cv_header_$ac_safe=no"
  9658. fi
  9659. rm -f conftest*
  9660. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9661. echo "$ac_t""yes" 1>&6
  9662. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9663. cat >> confdefs.h <<EOF
  9664. #define $ac_tr_hdr 1
  9665. EOF
  9666. else
  9667. echo "$ac_t""no" 1>&6
  9668. { echo "configure: error: *** Unable to locate Cairo includes." 1>&2; exit 1; }
  9669. fi
  9670. done
  9671. CPPFLAGS=$ac_save_cppflags
  9672. # With Cairo library directory
  9673. CAIROLIB=`$PKG_CONFIG --libs $cairo`
  9674. echo $ac_n "checking for location of cairo library""... $ac_c" 1>&6
  9675. echo "configure:12088: checking for location of cairo library" >&5
  9676. case "$with_cairo_libs" in
  9677. y | ye | yes | n | no)
  9678. { echo "configure: error: *** You must supply a directory to --with-cairo-libs." 1>&2; exit 1; }
  9679. ;;
  9680. esac
  9681. echo "$ac_t""$with_cairo_libs" 1>&6
  9682. if test -n "$with_cairo_libs"; then
  9683. for dir in $with_cairo_libs; do
  9684. if test -d "$dir"; then
  9685. CAIROLIB="$CAIROLIB -L$dir"
  9686. else
  9687. { echo "configure: error: *** cairo library directory $dir does not exist." 1>&2; exit 1; }
  9688. fi
  9689. done
  9690. fi
  9691. echo $ac_n "checking for cairo linking flags""... $ac_c" 1>&6
  9692. echo "configure:12108: checking for cairo linking flags" >&5
  9693. case "$with_cairo_ldflags" in
  9694. y | ye | yes | n | no)
  9695. { echo "configure: error: *** You must supply a directory to --with-cairo-ldflags." 1>&2; exit 1; }
  9696. ;;
  9697. esac
  9698. echo "$ac_t""$with_cairo_ldflags" 1>&6
  9699. CAIROLIB="$CAIROLIB $with_cairo_ldflags"
  9700. ac_save_libs="$LIBS"
  9701. ac_save_ldflags="$LDFLAGS"
  9702. LIBS=" $CAIROLIB $LIBS"
  9703. LDFLAGS=" $LDFLAGS"
  9704. echo $ac_n "checking for cairo_create""... $ac_c" 1>&6
  9705. echo "configure:12124: checking for cairo_create" >&5
  9706. cat > conftest.$ac_ext <<EOF
  9707. #line 12127 "configure"
  9708. #include "confdefs.h"
  9709. /* System header to define __stub macros and hopefully few prototypes,
  9710. which can conflict with char cairo_create(); below. */
  9711. #include <assert.h>
  9712. /* Override any gcc2 internal prototype to avoid an error. */
  9713. /* We use char because int might match the return type of a gcc2
  9714. builtin and then its argument prototype would still apply. */
  9715. char cairo_create();
  9716. int main() {
  9717. /* The GNU C library defines this for functions which it implements
  9718. to always fail with ENOSYS. Some functions are actually named
  9719. something starting with __ and the normal name is an alias. */
  9720. #if defined (__stub_cairo_create) || defined (__stub___cairo_create)
  9721. choke me
  9722. #else
  9723. cairo_create();
  9724. #endif
  9725. ; return 0; }
  9726. EOF
  9727. if { (eval echo configure:12150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9728. rm -rf conftest*
  9729. eval "ac_cv_func_cairo_create=yes"
  9730. else
  9731. echo "configure: failed program was:" >&5
  9732. cat conftest.$ac_ext >&5
  9733. rm -rf conftest*
  9734. eval "ac_cv_func_cairo_create=no"
  9735. fi
  9736. rm -f conftest*
  9737. if eval "test \"`echo '$ac_cv_func_'cairo_create`\" = yes"; then
  9738. echo "$ac_t""yes" 1>&6
  9739. :
  9740. else
  9741. echo "$ac_t""no" 1>&6
  9742. { echo "configure: error: *** Unable to locate cairo_create." 1>&2; exit 1; }
  9743. fi
  9744. LIBS=${ac_save_libs}
  9745. LDFLAGS=${ac_save_ldflags}
  9746. ac_save_libs="$LIBS"
  9747. ac_save_ldflags="$LDFLAGS"
  9748. LIBS=" $CAIROLIB $LIBS"
  9749. LDFLAGS=" $LDFLAGS"
  9750. echo $ac_n "checking for cairo_xlib_surface_create_with_xrender_format""... $ac_c" 1>&6
  9751. echo "configure:12184: checking for cairo_xlib_surface_create_with_xrender_format" >&5
  9752. cat > conftest.$ac_ext <<EOF
  9753. #line 12187 "configure"
  9754. #include "confdefs.h"
  9755. /* System header to define __stub macros and hopefully few prototypes,
  9756. which can conflict with char cairo_xlib_surface_create_with_xrender_format(); below. */
  9757. #include <assert.h>
  9758. /* Override any gcc2 internal prototype to avoid an error. */
  9759. /* We use char because int might match the return type of a gcc2
  9760. builtin and then its argument prototype would still apply. */
  9761. char cairo_xlib_surface_create_with_xrender_format();
  9762. int main() {
  9763. /* The GNU C library defines this for functions which it implements
  9764. to always fail with ENOSYS. Some functions are actually named
  9765. something starting with __ and the normal name is an alias. */
  9766. #if defined (__stub_cairo_xlib_surface_create_with_xrender_format) || defined (__stub___cairo_xlib_surface_create_with_xrender_format)
  9767. choke me
  9768. #else
  9769. cairo_xlib_surface_create_with_xrender_format();
  9770. #endif
  9771. ; return 0; }
  9772. EOF
  9773. if { (eval echo configure:12210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9774. rm -rf conftest*
  9775. eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=yes"
  9776. else
  9777. echo "configure: failed program was:" >&5
  9778. cat conftest.$ac_ext >&5
  9779. rm -rf conftest*
  9780. eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=no"
  9781. fi
  9782. rm -f conftest*
  9783. if eval "test \"`echo '$ac_cv_func_'cairo_xlib_surface_create_with_xrender_format`\" = yes"; then
  9784. echo "$ac_t""yes" 1>&6
  9785. CAIRO_HAS_XRENDER=1
  9786. else
  9787. echo "$ac_t""no" 1>&6
  9788. CAIRO_HAS_XRENDER=
  9789. fi
  9790. LIBS=${ac_save_libs}
  9791. LDFLAGS=${ac_save_ldflags}
  9792. ac_save_libs="$LIBS"
  9793. ac_save_ldflags="$LDFLAGS"
  9794. LIBS=" $CAIROLIB $LIBS"
  9795. LDFLAGS=" $LDFLAGS"
  9796. echo $ac_n "checking for cairo_xlib_surface_get_xrender_format""... $ac_c" 1>&6
  9797. echo "configure:12243: checking for cairo_xlib_surface_get_xrender_format" >&5
  9798. cat > conftest.$ac_ext <<EOF
  9799. #line 12246 "configure"
  9800. #include "confdefs.h"
  9801. /* System header to define __stub macros and hopefully few prototypes,
  9802. which can conflict with char cairo_xlib_surface_get_xrender_format(); below. */
  9803. #include <assert.h>
  9804. /* Override any gcc2 internal prototype to avoid an error. */
  9805. /* We use char because int might match the return type of a gcc2
  9806. builtin and then its argument prototype would still apply. */
  9807. char cairo_xlib_surface_get_xrender_format();
  9808. int main() {
  9809. /* The GNU C library defines this for functions which it implements
  9810. to always fail with ENOSYS. Some functions are actually named
  9811. something starting with __ and the normal name is an alias. */
  9812. #if defined (__stub_cairo_xlib_surface_get_xrender_format) || defined (__stub___cairo_xlib_surface_get_xrender_format)
  9813. choke me
  9814. #else
  9815. cairo_xlib_surface_get_xrender_format();
  9816. #endif
  9817. ; return 0; }
  9818. EOF
  9819. if { (eval echo configure:12269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9820. rm -rf conftest*
  9821. eval "ac_cv_func_cairo_xlib_surface_get_xrender_format=yes"
  9822. else
  9823. echo "configure: failed program was:" >&5
  9824. cat conftest.$ac_ext >&5
  9825. rm -rf conftest*
  9826. eval "ac_cv_func_cairo_xlib_surface_get_xrender_format=no"
  9827. fi
  9828. rm -f conftest*
  9829. if eval "test \"`echo '$ac_cv_func_'cairo_xlib_surface_get_xrender_format`\" = yes"; then
  9830. echo "$ac_t""yes" 1>&6
  9831. CAIRO_HAS_XRENDER_SURFACE=1
  9832. else
  9833. echo "$ac_t""no" 1>&6
  9834. CAIRO_HAS_XRENDER_SURFACE=
  9835. fi
  9836. LIBS=${ac_save_libs}
  9837. LDFLAGS=${ac_save_ldflags}
  9838. CAIROLIB="$CAIROLIB $CAIROLDFLAGS"
  9839. fi # $USE_CAIRO
  9840. # Done checking Cairo
  9841. # Enable FreeType option
  9842. echo $ac_n "checking whether to use FreeType""... $ac_c" 1>&6
  9843. echo "configure:12311: checking whether to use FreeType" >&5
  9844. echo "$ac_t"""$with_freetype"" 1>&6
  9845. case "$with_freetype" in
  9846. "no") USE_FREETYPE= ;;
  9847. "yes") USE_FREETYPE="1" ;;
  9848. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9849. esac
  9850. FTINC=
  9851. FTLIB=
  9852. if test -n "$USE_FREETYPE"; then
  9853. # With FreeType includes directory
  9854. echo $ac_n "checking for location of FreeType includes""... $ac_c" 1>&6
  9855. echo "configure:12330: checking for location of FreeType includes" >&5
  9856. case "$with_freetype_includes" in
  9857. y | ye | yes | n | no)
  9858. { echo "configure: error: *** You must supply a directory to --with-freetype-includes." 1>&2; exit 1; }
  9859. ;;
  9860. esac
  9861. echo "$ac_t""$with_freetype_includes" 1>&6
  9862. if test -n "$with_freetype_includes" ; then
  9863. for dir in $with_freetype_includes; do
  9864. if test -d "$dir"; then
  9865. FTINC="$FTINC -I$dir"
  9866. else
  9867. { echo "configure: error: *** FreeType includes directory $dir does not exist." 1>&2; exit 1; }
  9868. fi
  9869. done
  9870. fi
  9871. ac_save_cppflags="$CPPFLAGS"
  9872. CPPFLAGS="$FTINC $CPPFLAGS"
  9873. for ac_hdr in ft2build.h
  9874. do
  9875. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9876. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9877. echo "configure:12356: checking for $ac_hdr" >&5
  9878. cat > conftest.$ac_ext <<EOF
  9879. #line 12359 "configure"
  9880. #include "confdefs.h"
  9881. #include <$ac_hdr>
  9882. EOF
  9883. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9884. { (eval echo configure:12364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9885. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9886. if test -z "$ac_err"; then
  9887. rm -rf conftest*
  9888. eval "ac_cv_header_$ac_safe=yes"
  9889. else
  9890. echo "$ac_err" >&5
  9891. echo "configure: failed program was:" >&5
  9892. cat conftest.$ac_ext >&5
  9893. rm -rf conftest*
  9894. eval "ac_cv_header_$ac_safe=no"
  9895. fi
  9896. rm -f conftest*
  9897. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9898. echo "$ac_t""yes" 1>&6
  9899. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9900. cat >> confdefs.h <<EOF
  9901. #define $ac_tr_hdr 1
  9902. EOF
  9903. else
  9904. echo "$ac_t""no" 1>&6
  9905. { echo "configure: error: *** Unable to locate FreeType includes." 1>&2; exit 1; }
  9906. fi
  9907. done
  9908. CPPFLAGS=$ac_save_cppflags
  9909. # With FreeType library directory
  9910. echo $ac_n "checking for location of FreeType library""... $ac_c" 1>&6
  9911. echo "configure:12398: checking for location of FreeType library" >&5
  9912. case "$with_freetype_libs" in
  9913. y | ye | yes | n | no)
  9914. { echo "configure: error: *** You must supply a directory to --with-freetype-libs." 1>&2; exit 1; }
  9915. ;;
  9916. esac
  9917. echo "$ac_t""$with_freetype_libs" 1>&6
  9918. if test -n "$with_freetype_libs"; then
  9919. for dir in $with_freetype_libs; do
  9920. if test -d "$dir"; then
  9921. FTLIB="$FTLIB -L$dir"
  9922. else
  9923. { echo "configure: error: *** FreeType library directory $dir does not exist." 1>&2; exit 1; }
  9924. fi
  9925. done
  9926. fi
  9927. ac_save_ldflags="$LDFLAGS"
  9928. LDFLAGS="$FTLIB $LDFLAGS"
  9929. echo $ac_n "checking for FT_Init_FreeType in -lfreetype""... $ac_c" 1>&6
  9930. echo "configure:12423: checking for FT_Init_FreeType in -lfreetype" >&5
  9931. ac_lib_var=`echo freetype'_'FT_Init_FreeType | sed 'y%./+-%__p_%'`
  9932. ac_save_LIBS="$LIBS"
  9933. LIBS="-lfreetype $LIBS"
  9934. cat > conftest.$ac_ext <<EOF
  9935. #line 12429 "configure"
  9936. #include "confdefs.h"
  9937. /* Override any gcc2 internal prototype to avoid an error. */
  9938. /* We use char because int might match the return type of a gcc2
  9939. builtin and then its argument prototype would still apply. */
  9940. char FT_Init_FreeType();
  9941. int main() {
  9942. FT_Init_FreeType()
  9943. ; return 0; }
  9944. EOF
  9945. if { (eval echo configure:12440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9946. rm -rf conftest*
  9947. eval "ac_cv_lib_$ac_lib_var=yes"
  9948. else
  9949. echo "configure: failed program was:" >&5
  9950. cat conftest.$ac_ext >&5
  9951. rm -rf conftest*
  9952. eval "ac_cv_lib_$ac_lib_var=no"
  9953. fi
  9954. rm -f conftest*
  9955. LIBS="$ac_save_LIBS"
  9956. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9957. echo "$ac_t""yes" 1>&6
  9958. FTLIB="$FTLIB -lfreetype "
  9959. else
  9960. echo "$ac_t""no" 1>&6
  9961. LDFLAGS=${ac_save_ldflags}
  9962. { echo "configure: error: *** Unable to locate FreeType library." 1>&2; exit 1; }
  9963. fi
  9964. LDFLAGS=${ac_save_ldflags}
  9965. fi # $USE_FREETYPE
  9966. # Done checking FreeType
  9967. # Enable NLS option
  9968. echo $ac_n "checking whether to use NLS""... $ac_c" 1>&6
  9969. echo "configure:12481: checking whether to use NLS" >&5
  9970. echo "$ac_t"""$with_nls"" 1>&6
  9971. case "$with_nls" in
  9972. "no") USE_NLS= ;;
  9973. "yes") USE_NLS="1" ;;
  9974. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9975. esac
  9976. INTLLIB=
  9977. HAVE_NLS=
  9978. if test -n "${USE_NLS}" ; then
  9979. cat >> confdefs.h <<\EOF
  9980. #define USE_NLS 1
  9981. EOF
  9982. echo $ac_n "checking for gettext""... $ac_c" 1>&6
  9983. echo "configure:12501: checking for gettext" >&5
  9984. cat > conftest.$ac_ext <<EOF
  9985. #line 12504 "configure"
  9986. #include "confdefs.h"
  9987. /* System header to define __stub macros and hopefully few prototypes,
  9988. which can conflict with char gettext(); below. */
  9989. #include <assert.h>
  9990. /* Override any gcc2 internal prototype to avoid an error. */
  9991. /* We use char because int might match the return type of a gcc2
  9992. builtin and then its argument prototype would still apply. */
  9993. char gettext();
  9994. int main() {
  9995. /* The GNU C library defines this for functions which it implements
  9996. to always fail with ENOSYS. Some functions are actually named
  9997. something starting with __ and the normal name is an alias. */
  9998. #if defined (__stub_gettext) || defined (__stub___gettext)
  9999. choke me
  10000. #else
  10001. gettext();
  10002. #endif
  10003. ; return 0; }
  10004. EOF
  10005. if { (eval echo configure:12527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10006. rm -rf conftest*
  10007. eval "ac_cv_func_gettext=yes"
  10008. else
  10009. echo "configure: failed program was:" >&5
  10010. cat conftest.$ac_ext >&5
  10011. rm -rf conftest*
  10012. eval "ac_cv_func_gettext=no"
  10013. fi
  10014. rm -f conftest*
  10015. if eval "test \"`echo '$ac_cv_func_'gettext`\" = yes"; then
  10016. echo "$ac_t""yes" 1>&6
  10017. INTLLIB=
  10018. else
  10019. echo "$ac_t""no" 1>&6
  10020. echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
  10021. echo "configure:12545: checking for gettext in -lintl" >&5
  10022. ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
  10023. ac_save_LIBS="$LIBS"
  10024. LIBS="-lintl $LIBS"
  10025. cat > conftest.$ac_ext <<EOF
  10026. #line 12551 "configure"
  10027. #include "confdefs.h"
  10028. /* Override any gcc2 internal prototype to avoid an error. */
  10029. /* We use char because int might match the return type of a gcc2
  10030. builtin and then its argument prototype would still apply. */
  10031. char gettext();
  10032. int main() {
  10033. gettext()
  10034. ; return 0; }
  10035. EOF
  10036. if { (eval echo configure:12562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10037. rm -rf conftest*
  10038. eval "ac_cv_lib_$ac_lib_var=yes"
  10039. else
  10040. echo "configure: failed program was:" >&5
  10041. cat conftest.$ac_ext >&5
  10042. rm -rf conftest*
  10043. eval "ac_cv_lib_$ac_lib_var=no"
  10044. fi
  10045. rm -f conftest*
  10046. LIBS="$ac_save_LIBS"
  10047. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10048. echo "$ac_t""yes" 1>&6
  10049. INTLLIB=-lintl
  10050. else
  10051. echo "$ac_t""no" 1>&6
  10052. { echo "configure: error: *** Unable to locate gettext() function." 1>&2; exit 1; }
  10053. fi
  10054. fi
  10055. HAVE_NLS=1
  10056. fi
  10057. # Enable C++ option
  10058. echo $ac_n "checking whether to use C++""... $ac_c" 1>&6
  10059. echo "configure:12597: checking whether to use C++" >&5
  10060. echo "$ac_t"""$with_cxx"" 1>&6
  10061. case "$with_cxx" in
  10062. "no") USE_CXX= ;;
  10063. "yes") USE_CXX="1" ;;
  10064. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10065. esac
  10066. if test -n "$USE_CXX"; then
  10067. for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
  10068. do
  10069. # Extract the first word of "$ac_prog", so it can be a program name with args.
  10070. set dummy $ac_prog; ac_word=$2
  10071. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  10072. echo "configure:12613: checking for $ac_word" >&5
  10073. if test -n "$CXX"; then
  10074. ac_cv_prog_CXX="$CXX" # Let the user override the test.
  10075. else
  10076. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  10077. ac_dummy="$PATH"
  10078. for ac_dir in $ac_dummy; do
  10079. test -z "$ac_dir" && ac_dir=.
  10080. if test -f $ac_dir/$ac_word; then
  10081. ac_cv_prog_CXX="$ac_prog"
  10082. break
  10083. fi
  10084. done
  10085. IFS="$ac_save_ifs"
  10086. fi
  10087. CXX="$ac_cv_prog_CXX"
  10088. if test -n "$CXX"; then
  10089. echo "$ac_t""$CXX" 1>&6
  10090. else
  10091. echo "$ac_t""no" 1>&6
  10092. fi
  10093. test -n "$CXX" && break
  10094. done
  10095. test -n "$CXX" || CXX="gcc"
  10096. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  10097. echo "configure:12642: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
  10098. ac_ext=C
  10099. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  10100. ac_cpp='$CXXCPP $CPPFLAGS'
  10101. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  10102. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  10103. cross_compiling=$ac_cv_prog_cxx_cross
  10104. cat > conftest.$ac_ext << EOF
  10105. #line 12653 "configure"
  10106. #include "confdefs.h"
  10107. int main(){return(0);}
  10108. EOF
  10109. if { (eval echo configure:12658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10110. ac_cv_prog_cxx_works=yes
  10111. # If we can't run a trivial program, we are probably using a cross compiler.
  10112. if (./conftest; exit) 2>/dev/null; then
  10113. ac_cv_prog_cxx_cross=no
  10114. else
  10115. ac_cv_prog_cxx_cross=yes
  10116. fi
  10117. else
  10118. echo "configure: failed program was:" >&5
  10119. cat conftest.$ac_ext >&5
  10120. ac_cv_prog_cxx_works=no
  10121. fi
  10122. rm -fr conftest*
  10123. ac_ext=c
  10124. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  10125. ac_cpp='$CPP $CPPFLAGS'
  10126. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  10127. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  10128. cross_compiling=$ac_cv_prog_cc_cross
  10129. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  10130. if test $ac_cv_prog_cxx_works = no; then
  10131. { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
  10132. fi
  10133. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  10134. echo "configure:12684: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  10135. echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
  10136. cross_compiling=$ac_cv_prog_cxx_cross
  10137. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  10138. echo "configure:12689: checking whether we are using GNU C++" >&5
  10139. cat > conftest.C <<EOF
  10140. #ifdef __GNUC__
  10141. yes;
  10142. #endif
  10143. EOF
  10144. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:12696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  10145. ac_cv_prog_gxx=yes
  10146. else
  10147. ac_cv_prog_gxx=no
  10148. fi
  10149. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  10150. if test $ac_cv_prog_gxx = yes; then
  10151. GXX=yes
  10152. else
  10153. GXX=
  10154. fi
  10155. ac_test_CXXFLAGS="${CXXFLAGS+set}"
  10156. ac_save_CXXFLAGS="$CXXFLAGS"
  10157. CXXFLAGS=
  10158. echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  10159. echo "configure:12714: checking whether ${CXX-g++} accepts -g" >&5
  10160. echo 'void f(){}' > conftest.cc
  10161. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  10162. ac_cv_prog_cxx_g=yes
  10163. else
  10164. ac_cv_prog_cxx_g=no
  10165. fi
  10166. rm -f conftest*
  10167. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  10168. if test "$ac_test_CXXFLAGS" = set; then
  10169. CXXFLAGS="$ac_save_CXXFLAGS"
  10170. elif test $ac_cv_prog_cxx_g = yes; then
  10171. if test "$GXX" = yes; then
  10172. CXXFLAGS="-g -O2"
  10173. else
  10174. CXXFLAGS="-g"
  10175. fi
  10176. else
  10177. if test "$GXX" = yes; then
  10178. CXXFLAGS="-O2"
  10179. else
  10180. CXXFLAGS=
  10181. fi
  10182. fi
  10183. else
  10184. CXX=
  10185. CXXFLAGS=
  10186. fi
  10187. # Done checking C++
  10188. # Enable openDWG option
  10189. echo $ac_n "checking whether to use openDWG""... $ac_c" 1>&6
  10190. echo "configure:12755: checking whether to use openDWG" >&5
  10191. echo "$ac_t"""$with_opendwg"" 1>&6
  10192. case "$with_opendwg" in
  10193. "no") USE_OPENDWG= ;;
  10194. "yes") USE_OPENDWG="1" ;;
  10195. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10196. esac
  10197. OPENDWGINCPATH=
  10198. OPENDWGLIBPATH=
  10199. OPENDWGLIB=
  10200. if test -n "${USE_OPENDWG}"; then
  10201. # With OPENDWG includes directory
  10202. echo $ac_n "checking for location of openDGW includes""... $ac_c" 1>&6
  10203. echo "configure:12775: checking for location of openDGW includes" >&5
  10204. case "$with_opendwg_includes" in
  10205. y | ye | yes | n | no)
  10206. { echo "configure: error: *** You must supply a directory to --with-opendwg-includes." 1>&2; exit 1; }
  10207. ;;
  10208. esac
  10209. echo "$ac_t""$with_opendwg_includes" 1>&6
  10210. if test -n "$with_opendwg_includes" ; then
  10211. for dir in $with_opendwg_includes; do
  10212. if test -d "$dir"; then
  10213. OPENDWGINCPATH="$OPENDWGINCPATH -I$dir"
  10214. else
  10215. { echo "configure: error: *** openDGW includes directory $dir does not exist." 1>&2; exit 1; }
  10216. fi
  10217. done
  10218. fi
  10219. ac_save_cppflags="$CPPFLAGS"
  10220. CPPFLAGS="$OPENDWGINCPATH $CPPFLAGS"
  10221. for ac_hdr in ad2.h
  10222. do
  10223. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10224. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10225. echo "configure:12801: checking for $ac_hdr" >&5
  10226. cat > conftest.$ac_ext <<EOF
  10227. #line 12804 "configure"
  10228. #include "confdefs.h"
  10229. #include <$ac_hdr>
  10230. EOF
  10231. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10232. { (eval echo configure:12809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10233. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10234. if test -z "$ac_err"; then
  10235. rm -rf conftest*
  10236. eval "ac_cv_header_$ac_safe=yes"
  10237. else
  10238. echo "$ac_err" >&5
  10239. echo "configure: failed program was:" >&5
  10240. cat conftest.$ac_ext >&5
  10241. rm -rf conftest*
  10242. eval "ac_cv_header_$ac_safe=no"
  10243. fi
  10244. rm -f conftest*
  10245. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10246. echo "$ac_t""yes" 1>&6
  10247. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10248. cat >> confdefs.h <<EOF
  10249. #define $ac_tr_hdr 1
  10250. EOF
  10251. else
  10252. echo "$ac_t""no" 1>&6
  10253. { echo "configure: error: *** Unable to locate openDWG includes." 1>&2; exit 1; }
  10254. fi
  10255. done
  10256. CPPFLAGS=$ac_save_cppflags
  10257. # With OPENDWG library directory
  10258. echo $ac_n "checking for location of openDWG library""... $ac_c" 1>&6
  10259. echo "configure:12843: checking for location of openDWG library" >&5
  10260. case "$with_opendwg_libs" in
  10261. y | ye | yes | n | no)
  10262. { echo "configure: error: *** You must supply a directory to --with-opendwg-libs." 1>&2; exit 1; }
  10263. ;;
  10264. esac
  10265. echo "$ac_t""$with_opendwg_libs" 1>&6
  10266. if test -n "$with_opendwg_libs"; then
  10267. for dir in $with_opendwg_libs; do
  10268. if test -d "$dir"; then
  10269. OPENDWGLIBPATH="$OPENDWGLIBPATH -L$dir"
  10270. else
  10271. { echo "configure: error: *** openDWG library directory $dir does not exist." 1>&2; exit 1; }
  10272. fi
  10273. done
  10274. fi
  10275. #search for ad2.a, ad3.a ... in openDWG toolkit directory:
  10276. #FIX ME how to program this test??
  10277. #LOC_CHECK_LIBS(ad?.a,adSeekLayer,openDWG,$OPENDWGLIBPATH,OPENDWGLIB,,)
  10278. #
  10279. #for now hack (but working):
  10280. TRUEOPENDWGLIBPATH=`echo "$OPENDWGLIBPATH" | cut -b3-`
  10281. adlib=`ls -1 "$TRUEOPENDWGLIBPATH"/ad?.a | tail -1`
  10282. OPENDWGLIB="$adlib"
  10283. fi # $USE_OPENDWG
  10284. # Done checking OPENDWG
  10285. # Enable pthread option
  10286. echo $ac_n "checking whether to use POSIX threads""... $ac_c" 1>&6
  10287. echo "configure:12884: checking whether to use POSIX threads" >&5
  10288. echo "$ac_t"""$with_pthread"" 1>&6
  10289. case "$with_pthread" in
  10290. "no") USE_PTHREAD= ;;
  10291. "yes") USE_PTHREAD="1" ;;
  10292. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10293. esac
  10294. PTHREADINCPATH=
  10295. PTHREADLIBPATH=
  10296. PTHREADLIB=
  10297. if test -n "$USE_PTHREAD"; then
  10298. # With pthread includes directory
  10299. echo $ac_n "checking for location of POSIX threads includes""... $ac_c" 1>&6
  10300. echo "configure:12904: checking for location of POSIX threads includes" >&5
  10301. case "$with_pthread_includes" in
  10302. y | ye | yes | n | no)
  10303. { echo "configure: error: *** You must supply a directory to --with-pthread-includes." 1>&2; exit 1; }
  10304. ;;
  10305. esac
  10306. echo "$ac_t""$with_pthread_includes" 1>&6
  10307. if test -n "$with_pthread_includes" ; then
  10308. for dir in $with_pthread_includes; do
  10309. if test -d "$dir"; then
  10310. PTHREADINCPATH="$PTHREADINCPATH -I$dir"
  10311. else
  10312. { echo "configure: error: *** POSIX threads includes directory $dir does not exist." 1>&2; exit 1; }
  10313. fi
  10314. done
  10315. fi
  10316. ac_save_cppflags="$CPPFLAGS"
  10317. CPPFLAGS="$PTHREADINCPATH $CPPFLAGS"
  10318. for ac_hdr in pthread.h
  10319. do
  10320. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10321. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10322. echo "configure:12930: checking for $ac_hdr" >&5
  10323. cat > conftest.$ac_ext <<EOF
  10324. #line 12933 "configure"
  10325. #include "confdefs.h"
  10326. #include <$ac_hdr>
  10327. EOF
  10328. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10329. { (eval echo configure:12938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10330. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10331. if test -z "$ac_err"; then
  10332. rm -rf conftest*
  10333. eval "ac_cv_header_$ac_safe=yes"
  10334. else
  10335. echo "$ac_err" >&5
  10336. echo "configure: failed program was:" >&5
  10337. cat conftest.$ac_ext >&5
  10338. rm -rf conftest*
  10339. eval "ac_cv_header_$ac_safe=no"
  10340. fi
  10341. rm -f conftest*
  10342. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10343. echo "$ac_t""yes" 1>&6
  10344. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10345. cat >> confdefs.h <<EOF
  10346. #define $ac_tr_hdr 1
  10347. EOF
  10348. else
  10349. echo "$ac_t""no" 1>&6
  10350. { echo "configure: error: *** Unable to locate POSIX threads includes." 1>&2; exit 1; }
  10351. fi
  10352. done
  10353. CPPFLAGS=$ac_save_cppflags
  10354. # With pthread library directory
  10355. echo $ac_n "checking for location of POSIX threads library""... $ac_c" 1>&6
  10356. echo "configure:12972: checking for location of POSIX threads library" >&5
  10357. case "$with_pthread_libs" in
  10358. y | ye | yes | n | no)
  10359. { echo "configure: error: *** You must supply a directory to --with-pthread-libs." 1>&2; exit 1; }
  10360. ;;
  10361. esac
  10362. echo "$ac_t""$with_pthread_libs" 1>&6
  10363. if test -n "$with_pthread_libs"; then
  10364. for dir in $with_pthread_libs; do
  10365. if test -d "$dir"; then
  10366. PTHREADLIBPATH="$PTHREADLIBPATH -L$dir"
  10367. else
  10368. { echo "configure: error: *** POSIX threads library directory $dir does not exist." 1>&2; exit 1; }
  10369. fi
  10370. done
  10371. fi
  10372. ac_save_libs="$LIBS"
  10373. ac_save_ldflags="$LDFLAGS"
  10374. LIBS=" $LIBS"
  10375. LDFLAGS=" $LDFLAGS"
  10376. echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
  10377. echo "configure:12997: checking for pthread_create" >&5
  10378. cat > conftest.$ac_ext <<EOF
  10379. #line 13000 "configure"
  10380. #include "confdefs.h"
  10381. /* System header to define __stub macros and hopefully few prototypes,
  10382. which can conflict with char pthread_create(); below. */
  10383. #include <assert.h>
  10384. /* Override any gcc2 internal prototype to avoid an error. */
  10385. /* We use char because int might match the return type of a gcc2
  10386. builtin and then its argument prototype would still apply. */
  10387. char pthread_create();
  10388. int main() {
  10389. /* The GNU C library defines this for functions which it implements
  10390. to always fail with ENOSYS. Some functions are actually named
  10391. something starting with __ and the normal name is an alias. */
  10392. #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
  10393. choke me
  10394. #else
  10395. pthread_create();
  10396. #endif
  10397. ; return 0; }
  10398. EOF
  10399. if { (eval echo configure:13023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10400. rm -rf conftest*
  10401. eval "ac_cv_func_pthread_create=yes"
  10402. else
  10403. echo "configure: failed program was:" >&5
  10404. cat conftest.$ac_ext >&5
  10405. rm -rf conftest*
  10406. eval "ac_cv_func_pthread_create=no"
  10407. fi
  10408. rm -f conftest*
  10409. if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
  10410. echo "$ac_t""yes" 1>&6
  10411. PTHREADLIB="$PTHREADLIB "
  10412. else
  10413. echo "$ac_t""no" 1>&6
  10414. ac_save_ldflags="$LDFLAGS"
  10415. LDFLAGS="$PTHREADLIBPATH $LDFLAGS"
  10416. echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
  10417. echo "configure:13050: checking for pthread_create in -lpthread" >&5
  10418. ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
  10419. ac_save_LIBS="$LIBS"
  10420. LIBS="-lpthread $LIBS"
  10421. cat > conftest.$ac_ext <<EOF
  10422. #line 13056 "configure"
  10423. #include "confdefs.h"
  10424. /* Override any gcc2 internal prototype to avoid an error. */
  10425. /* We use char because int might match the return type of a gcc2
  10426. builtin and then its argument prototype would still apply. */
  10427. char pthread_create();
  10428. int main() {
  10429. pthread_create()
  10430. ; return 0; }
  10431. EOF
  10432. if { (eval echo configure:13067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10433. rm -rf conftest*
  10434. eval "ac_cv_lib_$ac_lib_var=yes"
  10435. else
  10436. echo "configure: failed program was:" >&5
  10437. cat conftest.$ac_ext >&5
  10438. rm -rf conftest*
  10439. eval "ac_cv_lib_$ac_lib_var=no"
  10440. fi
  10441. rm -f conftest*
  10442. LIBS="$ac_save_LIBS"
  10443. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10444. echo "$ac_t""yes" 1>&6
  10445. PTHREADLIB="$PTHREADLIB -lpthread "
  10446. else
  10447. echo "$ac_t""no" 1>&6
  10448. LDFLAGS=${ac_save_ldflags}
  10449. { echo "configure: error: *** Unable to locate POSIX threads library." 1>&2; exit 1; }
  10450. fi
  10451. LDFLAGS=${ac_save_ldflags}
  10452. fi
  10453. LIBS=${ac_save_libs}
  10454. LDFLAGS=${ac_save_ldflags}
  10455. fi # $USE_PTHREAD
  10456. # Done checking pthread
  10457. # Enable OpenMP option
  10458. echo $ac_n "checking whether to use OpenMP""... $ac_c" 1>&6
  10459. echo "configure:13117: checking whether to use OpenMP" >&5
  10460. echo "$ac_t"""$with_openmp"" 1>&6
  10461. case "$with_openmp" in
  10462. "no") USE_OPENMP= ;;
  10463. "yes") USE_OPENMP="1" ;;
  10464. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10465. esac
  10466. OMPINCPATH=
  10467. OMPLIBPATH=
  10468. OMPLIB=
  10469. OMPCFLAGS=
  10470. if test -n "$USE_OPENMP"; then
  10471. # With OpenMP includes directory
  10472. echo $ac_n "checking for location of OpenMP includes""... $ac_c" 1>&6
  10473. echo "configure:13138: checking for location of OpenMP includes" >&5
  10474. case "$with_openmp_includes" in
  10475. y | ye | yes | n | no)
  10476. { echo "configure: error: *** You must supply a directory to --with-openmp-includes." 1>&2; exit 1; }
  10477. ;;
  10478. esac
  10479. echo "$ac_t""$with_openmp_includes" 1>&6
  10480. if test -n "$with_openmp_includes" ; then
  10481. for dir in $with_openmp_includes; do
  10482. if test -d "$dir"; then
  10483. OMPINCPATH="$OMPINCPATH -I$dir"
  10484. else
  10485. { echo "configure: error: *** OpenMP includes directory $dir does not exist." 1>&2; exit 1; }
  10486. fi
  10487. done
  10488. fi
  10489. ac_save_cppflags="$CPPFLAGS"
  10490. CPPFLAGS="$OMPINCPATH $CPPFLAGS"
  10491. for ac_hdr in omp.h
  10492. do
  10493. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10494. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10495. echo "configure:13164: checking for $ac_hdr" >&5
  10496. cat > conftest.$ac_ext <<EOF
  10497. #line 13167 "configure"
  10498. #include "confdefs.h"
  10499. #include <$ac_hdr>
  10500. EOF
  10501. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10502. { (eval echo configure:13172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10503. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10504. if test -z "$ac_err"; then
  10505. rm -rf conftest*
  10506. eval "ac_cv_header_$ac_safe=yes"
  10507. else
  10508. echo "$ac_err" >&5
  10509. echo "configure: failed program was:" >&5
  10510. cat conftest.$ac_ext >&5
  10511. rm -rf conftest*
  10512. eval "ac_cv_header_$ac_safe=no"
  10513. fi
  10514. rm -f conftest*
  10515. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10516. echo "$ac_t""yes" 1>&6
  10517. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10518. cat >> confdefs.h <<EOF
  10519. #define $ac_tr_hdr 1
  10520. EOF
  10521. else
  10522. echo "$ac_t""no" 1>&6
  10523. { echo "configure: error: *** Unable to locate OpenMP includes." 1>&2; exit 1; }
  10524. fi
  10525. done
  10526. CPPFLAGS=$ac_save_cppflags
  10527. # With OpenMP library directory
  10528. # GCC et al.: -lgomp
  10529. # Solaris cc: -lmtsk
  10530. # AIX xlc: -lxlsmp
  10531. # SGI IRIX 6.5 MIPSpro C/C++: -lmp
  10532. echo $ac_n "checking for location of OpenMP library""... $ac_c" 1>&6
  10533. echo "configure:13210: checking for location of OpenMP library" >&5
  10534. case "$with_openmp_libs" in
  10535. y | ye | yes | n | no)
  10536. { echo "configure: error: *** You must supply a directory to --with-openmp-libs." 1>&2; exit 1; }
  10537. ;;
  10538. esac
  10539. echo "$ac_t""$with_openmp_libs" 1>&6
  10540. if test -n "$with_openmp_libs"; then
  10541. for dir in $with_openmp_libs; do
  10542. if test -d "$dir"; then
  10543. OMPLIBPATH="$OMPLIBPATH -L$dir"
  10544. else
  10545. { echo "configure: error: *** OpenMP library directory $dir does not exist." 1>&2; exit 1; }
  10546. fi
  10547. done
  10548. fi
  10549. ac_save_libs="$LIBS"
  10550. ac_save_ldflags="$LDFLAGS"
  10551. LIBS=" $LIBS"
  10552. LDFLAGS=" $LDFLAGS"
  10553. echo $ac_n "checking for GOMP_parallel_start""... $ac_c" 1>&6
  10554. echo "configure:13235: checking for GOMP_parallel_start" >&5
  10555. cat > conftest.$ac_ext <<EOF
  10556. #line 13238 "configure"
  10557. #include "confdefs.h"
  10558. /* System header to define __stub macros and hopefully few prototypes,
  10559. which can conflict with char GOMP_parallel_start(); below. */
  10560. #include <assert.h>
  10561. /* Override any gcc2 internal prototype to avoid an error. */
  10562. /* We use char because int might match the return type of a gcc2
  10563. builtin and then its argument prototype would still apply. */
  10564. char GOMP_parallel_start();
  10565. int main() {
  10566. /* The GNU C library defines this for functions which it implements
  10567. to always fail with ENOSYS. Some functions are actually named
  10568. something starting with __ and the normal name is an alias. */
  10569. #if defined (__stub_GOMP_parallel_start) || defined (__stub___GOMP_parallel_start)
  10570. choke me
  10571. #else
  10572. GOMP_parallel_start();
  10573. #endif
  10574. ; return 0; }
  10575. EOF
  10576. if { (eval echo configure:13261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10577. rm -rf conftest*
  10578. eval "ac_cv_func_GOMP_parallel_start=yes"
  10579. else
  10580. echo "configure: failed program was:" >&5
  10581. cat conftest.$ac_ext >&5
  10582. rm -rf conftest*
  10583. eval "ac_cv_func_GOMP_parallel_start=no"
  10584. fi
  10585. rm -f conftest*
  10586. if eval "test \"`echo '$ac_cv_func_'GOMP_parallel_start`\" = yes"; then
  10587. echo "$ac_t""yes" 1>&6
  10588. OMPLIB="$OMPLIB "
  10589. else
  10590. echo "$ac_t""no" 1>&6
  10591. ac_save_ldflags="$LDFLAGS"
  10592. LDFLAGS="$OMPLIBPATH $LDFLAGS"
  10593. echo $ac_n "checking for GOMP_parallel_start in -lgomp""... $ac_c" 1>&6
  10594. echo "configure:13288: checking for GOMP_parallel_start in -lgomp" >&5
  10595. ac_lib_var=`echo gomp'_'GOMP_parallel_start | sed 'y%./+-%__p_%'`
  10596. ac_save_LIBS="$LIBS"
  10597. LIBS="-lgomp $LIBS"
  10598. cat > conftest.$ac_ext <<EOF
  10599. #line 13294 "configure"
  10600. #include "confdefs.h"
  10601. /* Override any gcc2 internal prototype to avoid an error. */
  10602. /* We use char because int might match the return type of a gcc2
  10603. builtin and then its argument prototype would still apply. */
  10604. char GOMP_parallel_start();
  10605. int main() {
  10606. GOMP_parallel_start()
  10607. ; return 0; }
  10608. EOF
  10609. if { (eval echo configure:13305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10610. rm -rf conftest*
  10611. eval "ac_cv_lib_$ac_lib_var=yes"
  10612. else
  10613. echo "configure: failed program was:" >&5
  10614. cat conftest.$ac_ext >&5
  10615. rm -rf conftest*
  10616. eval "ac_cv_lib_$ac_lib_var=no"
  10617. fi
  10618. rm -f conftest*
  10619. LIBS="$ac_save_LIBS"
  10620. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10621. echo "$ac_t""yes" 1>&6
  10622. OMPLIB="$OMPLIB -lgomp "
  10623. else
  10624. echo "$ac_t""no" 1>&6
  10625. LDFLAGS=${ac_save_ldflags}
  10626. { echo "configure: error: *** Unable to locate OpenMP library." 1>&2; exit 1; }
  10627. fi
  10628. LDFLAGS=${ac_save_ldflags}
  10629. fi
  10630. LIBS=${ac_save_libs}
  10631. LDFLAGS=${ac_save_ldflags}
  10632. # compiler dependent
  10633. #if test ${CC} = "gcc" ; then
  10634. if test x$GCC = xyes ; then
  10635. # GNU C compiler (>= 4.2.1)
  10636. OMPCFLAGS=-fopenmp
  10637. elif test ${CC} = "icc" ; then
  10638. # Intel compiler
  10639. OMPCFLAGS=-openmp
  10640. elif test ${CC} = "opencc" ; then
  10641. # AMD's x86 Open64 compiler
  10642. OMPCFLAGS=-mp
  10643. elif test ${CC} = "pgcc" ; then
  10644. # Portland Group's compiler
  10645. OMPCFLAGS=-mp
  10646. # ... anybody else?
  10647. fi
  10648. # try to build a test program with "$CC $OMPCLFAGS" to confirm it works
  10649. #...how?
  10650. #echo "int main() {return 0;}" > test.c
  10651. #$CC $OMPCLFAGS test.c -o test
  10652. fi # $USE_OPENMP
  10653. # Done checking OpenMP
  10654. # Enable OpenCL option
  10655. echo $ac_n "checking whether to use OpenCL""... $ac_c" 1>&6
  10656. echo "configure:13378: checking whether to use OpenCL" >&5
  10657. echo "$ac_t"""$with_opencl"" 1>&6
  10658. case "$with_opencl" in
  10659. "no") USE_OPENCL= ;;
  10660. "yes") USE_OPENCL="1" ;;
  10661. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10662. esac
  10663. OCLINCPATH=
  10664. OCLLIBPATH=
  10665. OCLLIB=
  10666. if test -n "$USE_OPENCL"; then
  10667. # With OpenCL includes directory
  10668. echo $ac_n "checking for location of OpenCL includes""... $ac_c" 1>&6
  10669. echo "configure:13398: checking for location of OpenCL includes" >&5
  10670. case "$with_opencl_includes" in
  10671. y | ye | yes | n | no)
  10672. { echo "configure: error: *** You must supply a directory to --with-opencl-includes." 1>&2; exit 1; }
  10673. ;;
  10674. esac
  10675. echo "$ac_t""$with_opencl_includes" 1>&6
  10676. if test -n "$with_opencl_includes" ; then
  10677. for dir in $with_opencl_includes; do
  10678. if test -d "$dir"; then
  10679. OCLINCPATH="$OCLINCPATH -I$dir"
  10680. else
  10681. { echo "configure: error: *** OpenCL includes directory $dir does not exist." 1>&2; exit 1; }
  10682. fi
  10683. done
  10684. fi
  10685. if test -n "$MACOSX_APP" ; then
  10686. ac_save_cppflags="$CPPFLAGS"
  10687. CPPFLAGS="$OCLINCPATH $CPPFLAGS"
  10688. for ac_hdr in OpenCL/opencl.h
  10689. do
  10690. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10691. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10692. echo "configure:13425: checking for $ac_hdr" >&5
  10693. cat > conftest.$ac_ext <<EOF
  10694. #line 13428 "configure"
  10695. #include "confdefs.h"
  10696. #include <$ac_hdr>
  10697. EOF
  10698. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10699. { (eval echo configure:13433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10700. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10701. if test -z "$ac_err"; then
  10702. rm -rf conftest*
  10703. eval "ac_cv_header_$ac_safe=yes"
  10704. else
  10705. echo "$ac_err" >&5
  10706. echo "configure: failed program was:" >&5
  10707. cat conftest.$ac_ext >&5
  10708. rm -rf conftest*
  10709. eval "ac_cv_header_$ac_safe=no"
  10710. fi
  10711. rm -f conftest*
  10712. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10713. echo "$ac_t""yes" 1>&6
  10714. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10715. cat >> confdefs.h <<EOF
  10716. #define $ac_tr_hdr 1
  10717. EOF
  10718. else
  10719. echo "$ac_t""no" 1>&6
  10720. { echo "configure: error: *** Unable to locate OpenCL includes." 1>&2; exit 1; }
  10721. fi
  10722. done
  10723. CPPFLAGS=$ac_save_cppflags
  10724. # With OpenCL library directory
  10725. ### FIXME: ###
  10726. #LOC_CHECK_FRAMEWORK_PATH(opencl,OpenCL,OPENCLPATH)
  10727. # last term in following would become ',$OPENCLPATH)' if above is uncommented
  10728. ac_save_libs="$LIBS"
  10729. ac_save_ldflags="$LDFLAGS"
  10730. LIBS="-framework OpenCL $LIBS"
  10731. LDFLAGS=" $LDFLAGS"
  10732. echo $ac_n "checking for clGetPlatformInfo""... $ac_c" 1>&6
  10733. echo "configure:13473: checking for clGetPlatformInfo" >&5
  10734. cat > conftest.$ac_ext <<EOF
  10735. #line 13476 "configure"
  10736. #include "confdefs.h"
  10737. /* System header to define __stub macros and hopefully few prototypes,
  10738. which can conflict with char clGetPlatformInfo(); below. */
  10739. #include <assert.h>
  10740. /* Override any gcc2 internal prototype to avoid an error. */
  10741. /* We use char because int might match the return type of a gcc2
  10742. builtin and then its argument prototype would still apply. */
  10743. char clGetPlatformInfo();
  10744. int main() {
  10745. /* The GNU C library defines this for functions which it implements
  10746. to always fail with ENOSYS. Some functions are actually named
  10747. something starting with __ and the normal name is an alias. */
  10748. #if defined (__stub_clGetPlatformInfo) || defined (__stub___clGetPlatformInfo)
  10749. choke me
  10750. #else
  10751. clGetPlatformInfo();
  10752. #endif
  10753. ; return 0; }
  10754. EOF
  10755. if { (eval echo configure:13499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10756. rm -rf conftest*
  10757. eval "ac_cv_func_clGetPlatformInfo=yes"
  10758. else
  10759. echo "configure: failed program was:" >&5
  10760. cat conftest.$ac_ext >&5
  10761. rm -rf conftest*
  10762. eval "ac_cv_func_clGetPlatformInfo=no"
  10763. fi
  10764. rm -f conftest*
  10765. if eval "test \"`echo '$ac_cv_func_'clGetPlatformInfo`\" = yes"; then
  10766. echo "$ac_t""yes" 1>&6
  10767. OCLLIB="$OCLLIB -framework OpenCL"
  10768. else
  10769. echo "$ac_t""no" 1>&6
  10770. { echo "configure: error: *** Unable to locate OpenCL library." 1>&2; exit 1; }
  10771. fi
  10772. LIBS=${ac_save_libs}
  10773. LDFLAGS=${ac_save_ldflags}
  10774. else
  10775. ac_save_cppflags="$CPPFLAGS"
  10776. CPPFLAGS="$OCLINCPATH $CPPFLAGS"
  10777. for ac_hdr in CL/cl.h
  10778. do
  10779. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10780. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10781. echo "configure:13538: checking for $ac_hdr" >&5
  10782. cat > conftest.$ac_ext <<EOF
  10783. #line 13541 "configure"
  10784. #include "confdefs.h"
  10785. #include <$ac_hdr>
  10786. EOF
  10787. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10788. { (eval echo configure:13546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10789. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10790. if test -z "$ac_err"; then
  10791. rm -rf conftest*
  10792. eval "ac_cv_header_$ac_safe=yes"
  10793. else
  10794. echo "$ac_err" >&5
  10795. echo "configure: failed program was:" >&5
  10796. cat conftest.$ac_ext >&5
  10797. rm -rf conftest*
  10798. eval "ac_cv_header_$ac_safe=no"
  10799. fi
  10800. rm -f conftest*
  10801. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10802. echo "$ac_t""yes" 1>&6
  10803. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10804. cat >> confdefs.h <<EOF
  10805. #define $ac_tr_hdr 1
  10806. EOF
  10807. else
  10808. echo "$ac_t""no" 1>&6
  10809. { echo "configure: error: *** Unable to locate OpenCL includes." 1>&2; exit 1; }
  10810. fi
  10811. done
  10812. CPPFLAGS=$ac_save_cppflags
  10813. # With OpenCL library directory
  10814. echo $ac_n "checking for location of OpenCL library""... $ac_c" 1>&6
  10815. echo "configure:13579: checking for location of OpenCL library" >&5
  10816. case "$with_opencl_libs" in
  10817. y | ye | yes | n | no)
  10818. { echo "configure: error: *** You must supply a directory to --with-opencl-libs." 1>&2; exit 1; }
  10819. ;;
  10820. esac
  10821. echo "$ac_t""$with_opencl_libs" 1>&6
  10822. if test -n "$with_opencl_libs"; then
  10823. for dir in $with_opencl_libs; do
  10824. if test -d "$dir"; then
  10825. OCLLIBPATH="$OCLLIBPATH -L$dir"
  10826. else
  10827. { echo "configure: error: *** OpenCL library directory $dir does not exist." 1>&2; exit 1; }
  10828. fi
  10829. done
  10830. fi
  10831. ac_save_ldflags="$LDFLAGS"
  10832. LDFLAGS="$OCLLIBPATH $LDFLAGS"
  10833. echo $ac_n "checking for clGetPlatformInfo in -lOpenCL""... $ac_c" 1>&6
  10834. echo "configure:13603: checking for clGetPlatformInfo in -lOpenCL" >&5
  10835. ac_lib_var=`echo OpenCL'_'clGetPlatformInfo | sed 'y%./+-%__p_%'`
  10836. ac_save_LIBS="$LIBS"
  10837. LIBS="-lOpenCL $LIBS"
  10838. cat > conftest.$ac_ext <<EOF
  10839. #line 13609 "configure"
  10840. #include "confdefs.h"
  10841. /* Override any gcc2 internal prototype to avoid an error. */
  10842. /* We use char because int might match the return type of a gcc2
  10843. builtin and then its argument prototype would still apply. */
  10844. char clGetPlatformInfo();
  10845. int main() {
  10846. clGetPlatformInfo()
  10847. ; return 0; }
  10848. EOF
  10849. if { (eval echo configure:13620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10850. rm -rf conftest*
  10851. eval "ac_cv_lib_$ac_lib_var=yes"
  10852. else
  10853. echo "configure: failed program was:" >&5
  10854. cat conftest.$ac_ext >&5
  10855. rm -rf conftest*
  10856. eval "ac_cv_lib_$ac_lib_var=no"
  10857. fi
  10858. rm -f conftest*
  10859. LIBS="$ac_save_LIBS"
  10860. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10861. echo "$ac_t""yes" 1>&6
  10862. OCLLIB="$OCLLIB -lOpenCL "
  10863. else
  10864. echo "$ac_t""no" 1>&6
  10865. LDFLAGS=${ac_save_ldflags}
  10866. { echo "configure: error: *** Unable to locate OpenCL library." 1>&2; exit 1; }
  10867. fi
  10868. LDFLAGS=${ac_save_ldflags}
  10869. # expanded symbol check: yes? no?
  10870. #LOC_CHECK_FUNC(clGetPlatformInfo,OpenCL functions,OCLLIB,,,,,[
  10871. #LOC_CHECK_LIBS(OpenCL,clGetPlatformInfo,OpenCL,$OCLLIBPATH,OCLLIB,,,)
  10872. #])
  10873. fi
  10874. fi # $USE_OPENCL
  10875. # Done checking OpenCL
  10876. # Enable LFS (from cdr-tools, tar, and autoconf 2.68)
  10877. # Check whether --enable-largefile or --disable-largefile was given.
  10878. if test "${enable_largefile+set}" = set; then
  10879. enableval="$enable_largefile"
  10880. :
  10881. fi
  10882. LFS_CFLAGS=
  10883. if test "$enable_largefile" != no; then
  10884. ac_save_cflags=$CFLAGS
  10885. if test "`which getconf 2>&5`" ; then
  10886. LFS_CFLAGS=`getconf LFS_CFLAGS 2>&5`
  10887. CFLAGS="$LFS_CFLAGS $ac_save_cflags"
  10888. fi
  10889. echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
  10890. echo "configure:13680: checking for special C compiler options needed for large files" >&5
  10891. ac_cv_sys_largefile_CC=no
  10892. largefile_cc_opt=""
  10893. if test "$GCC" != yes; then
  10894. # IRIX 6.2 and later do not support large files by default,
  10895. # so use the C compiler's -n32 option if that helps.
  10896. cat > conftest.$ac_ext <<EOF
  10897. #line 13688 "configure"
  10898. #include "confdefs.h"
  10899. #include <sys/types.h>
  10900. /* Check that off_t can represent 2**63 - 1 correctly.
  10901. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  10902. since some C++ compilers masquerading as C compilers
  10903. incorrectly reject 9223372036854775807. */
  10904. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  10905. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  10906. && LARGE_OFF_T % 2147483647 == 1)
  10907. ? 1 : -1];
  10908. int main() {
  10909. ; return 0; }
  10910. EOF
  10911. if { (eval echo configure:13704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10912. :
  10913. else
  10914. echo "configure: failed program was:" >&5
  10915. cat conftest.$ac_ext >&5
  10916. rm -rf conftest*
  10917. ac_save_CC="${CC-cc}"
  10918. CC="$CC -n32"
  10919. cat > conftest.$ac_ext <<EOF
  10920. #line 13713 "configure"
  10921. #include "confdefs.h"
  10922. #include <sys/types.h>
  10923. /* Check that off_t can represent 2**63 - 1 correctly.
  10924. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  10925. since some C++ compilers masquerading as C compilers
  10926. incorrectly reject 9223372036854775807. */
  10927. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  10928. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  10929. && LARGE_OFF_T % 2147483647 == 1)
  10930. ? 1 : -1];
  10931. int main() {
  10932. ; return 0; }
  10933. EOF
  10934. if { (eval echo configure:13729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10935. rm -rf conftest*
  10936. ac_cv_sys_largefile_CC=' -n32'
  10937. else
  10938. echo "configure: failed program was:" >&5
  10939. cat conftest.$ac_ext >&5
  10940. fi
  10941. rm -f conftest*
  10942. CC="$ac_save_CC"
  10943. fi
  10944. rm -f conftest*
  10945. fi
  10946. echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
  10947. if test "$ac_cv_sys_largefile_CC" != no; then
  10948. CC="$CC$ac_cv_sys_largefile_CC"
  10949. largefile_cc_opt="$ac_cv_sys_largefile_CC"
  10950. if test "$LFS_CFLAGS" ; then
  10951. LFS_CFLAGS="$LFS_CFLAGS $ac_cv_sys_largefile_CC"
  10952. else
  10953. LFS_CFLAGS="$ac_cv_sys_largefile_CC"
  10954. CFLAGS="$LFS_CFLAGS $ac_save_cflags"
  10955. fi
  10956. fi
  10957. echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
  10958. echo "configure:13756: checking for _FILE_OFFSET_BITS value needed for large files" >&5
  10959. ac_cv_sys_file_offset_bits=no
  10960. cat > conftest.$ac_ext <<EOF
  10961. #line 13760 "configure"
  10962. #include "confdefs.h"
  10963. #include <sys/types.h>
  10964. /* Check that off_t can represent 2**63 - 1 correctly.
  10965. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  10966. since some C++ compilers masquerading as C compilers
  10967. incorrectly reject 9223372036854775807. */
  10968. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  10969. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  10970. && LARGE_OFF_T % 2147483647 == 1)
  10971. ? 1 : -1];
  10972. int main() {
  10973. ; return 0; }
  10974. EOF
  10975. if { (eval echo configure:13776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10976. :
  10977. else
  10978. echo "configure: failed program was:" >&5
  10979. cat conftest.$ac_ext >&5
  10980. rm -rf conftest*
  10981. cat > conftest.$ac_ext <<EOF
  10982. #line 13783 "configure"
  10983. #include "confdefs.h"
  10984. #define _FILE_OFFSET_BITS 64
  10985. #include <sys/types.h>
  10986. /* Check that off_t can represent 2**63 - 1 correctly.
  10987. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  10988. since some C++ compilers masquerading as C compilers
  10989. incorrectly reject 9223372036854775807. */
  10990. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  10991. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  10992. && LARGE_OFF_T % 2147483647 == 1)
  10993. ? 1 : -1];
  10994. int main() {
  10995. ; return 0; }
  10996. EOF
  10997. if { (eval echo configure:13801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10998. rm -rf conftest*
  10999. ac_cv_sys_file_offset_bits=64
  11000. else
  11001. echo "configure: failed program was:" >&5
  11002. cat conftest.$ac_ext >&5
  11003. fi
  11004. rm -f conftest*
  11005. fi
  11006. rm -f conftest*
  11007. echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
  11008. if test "$ac_cv_sys_file_offset_bits" != no; then
  11009. cat >> confdefs.h <<EOF
  11010. #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
  11011. EOF
  11012. if test "$LFS_CFLAGS" ; then
  11013. LFS_CFLAGS="$LFS_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
  11014. else
  11015. LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
  11016. fi
  11017. fi
  11018. echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
  11019. echo "configure:13827: checking for _LARGE_FILES value needed for large files" >&5
  11020. ac_cv_sys_large_files=no
  11021. cat > conftest.$ac_ext <<EOF
  11022. #line 13831 "configure"
  11023. #include "confdefs.h"
  11024. #include <sys/types.h>
  11025. /* Check that off_t can represent 2**63 - 1 correctly.
  11026. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11027. since some C++ compilers masquerading as C compilers
  11028. incorrectly reject 9223372036854775807. */
  11029. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11030. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11031. && LARGE_OFF_T % 2147483647 == 1)
  11032. ? 1 : -1];
  11033. int main() {
  11034. ; return 0; }
  11035. EOF
  11036. if { (eval echo configure:13847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11037. :
  11038. else
  11039. echo "configure: failed program was:" >&5
  11040. cat conftest.$ac_ext >&5
  11041. rm -rf conftest*
  11042. cat > conftest.$ac_ext <<EOF
  11043. #line 13854 "configure"
  11044. #include "confdefs.h"
  11045. #define _LARGE_FILES 1
  11046. #include <sys/types.h>
  11047. /* Check that off_t can represent 2**63 - 1 correctly.
  11048. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11049. since some C++ compilers masquerading as C compilers
  11050. incorrectly reject 9223372036854775807. */
  11051. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11052. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11053. && LARGE_OFF_T % 2147483647 == 1)
  11054. ? 1 : -1];
  11055. int main() {
  11056. ; return 0; }
  11057. EOF
  11058. if { (eval echo configure:13872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11059. rm -rf conftest*
  11060. ac_cv_sys_large_files=1
  11061. else
  11062. echo "configure: failed program was:" >&5
  11063. cat conftest.$ac_ext >&5
  11064. fi
  11065. rm -f conftest*
  11066. fi
  11067. rm -f conftest*
  11068. echo "$ac_t""$ac_cv_sys_large_files" 1>&6
  11069. if test "$ac_cv_sys_large_files" != no; then
  11070. cat >> confdefs.h <<EOF
  11071. #define _LARGE_FILES $ac_cv_sys_large_files
  11072. EOF
  11073. if test "$LFS_CFLAGS" ; then
  11074. LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files"
  11075. else
  11076. LFS_CFLAGS="-D_LARGE_FILES=$ac_cv_sys_large_files"
  11077. fi
  11078. fi
  11079. echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
  11080. echo "configure:13898: checking for _LARGEFILE_SOURCE value needed for large files" >&5
  11081. ac_cv_sys_largefile_source=no
  11082. cat > conftest.$ac_ext <<EOF
  11083. #line 13902 "configure"
  11084. #include "confdefs.h"
  11085. #include <stdio.h>
  11086. int main() {
  11087. return !fseeko;
  11088. ; return 0; }
  11089. EOF
  11090. if { (eval echo configure:13909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11091. :
  11092. else
  11093. echo "configure: failed program was:" >&5
  11094. cat conftest.$ac_ext >&5
  11095. rm -rf conftest*
  11096. cat > conftest.$ac_ext <<EOF
  11097. #line 13916 "configure"
  11098. #include "confdefs.h"
  11099. #define _LARGEFILE_SOURCE 1
  11100. #include <stdio.h>
  11101. int main() {
  11102. return !fseeko;
  11103. ; return 0; }
  11104. EOF
  11105. if { (eval echo configure:13925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11106. rm -rf conftest*
  11107. ac_cv_sys_largefile_source=1
  11108. else
  11109. echo "configure: failed program was:" >&5
  11110. cat conftest.$ac_ext >&5
  11111. fi
  11112. rm -f conftest*
  11113. fi
  11114. rm -f conftest*
  11115. echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
  11116. if test "$ac_cv_sys_largefile_source" != no; then
  11117. cat >> confdefs.h <<EOF
  11118. #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
  11119. EOF
  11120. if test "$LFS_CFLAGS" ; then
  11121. LFS_CFLAGS="$LFS_CFLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
  11122. else
  11123. LFS_CFLAGS="-D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
  11124. fi
  11125. fi
  11126. CFLAGS=$ac_save_cflags
  11127. fi
  11128. ac_save_cflags=${CFLAGS}
  11129. CFLAGS="$LFS_CFLAGS ${ac_save_cflags}"
  11130. echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
  11131. echo "configure:13957: checking for _LARGEFILE_SOURCE value needed for large files" >&5
  11132. ac_cv_sys_largefile_source=no
  11133. cat > conftest.$ac_ext <<EOF
  11134. #line 13961 "configure"
  11135. #include "confdefs.h"
  11136. #include <stdio.h>
  11137. int main() {
  11138. return !fseeko;
  11139. ; return 0; }
  11140. EOF
  11141. if { (eval echo configure:13968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11142. :
  11143. else
  11144. echo "configure: failed program was:" >&5
  11145. cat conftest.$ac_ext >&5
  11146. rm -rf conftest*
  11147. cat > conftest.$ac_ext <<EOF
  11148. #line 13975 "configure"
  11149. #include "confdefs.h"
  11150. #define _LARGEFILE_SOURCE 1
  11151. #include <stdio.h>
  11152. int main() {
  11153. return !fseeko;
  11154. ; return 0; }
  11155. EOF
  11156. if { (eval echo configure:13984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11157. rm -rf conftest*
  11158. ac_cv_sys_largefile_source=1
  11159. else
  11160. echo "configure: failed program was:" >&5
  11161. cat conftest.$ac_ext >&5
  11162. fi
  11163. rm -f conftest*
  11164. fi
  11165. rm -f conftest*
  11166. echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
  11167. if test "$ac_cv_sys_largefile_source" != no; then
  11168. cat >> confdefs.h <<EOF
  11169. #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
  11170. EOF
  11171. if test "$LFS_CFLAGS" ; then
  11172. LFS_CFLAGS="$LFS_CFLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
  11173. else
  11174. LFS_CFLAGS="-D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
  11175. fi
  11176. fi
  11177. # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
  11178. # in glibc 2.1.3, but that breaks too many other things.
  11179. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
  11180. echo $ac_n "checking for fseeko""... $ac_c" 1>&6
  11181. echo "configure:14014: checking for fseeko" >&5
  11182. ac_cv_func_fseeko=no
  11183. cat > conftest.$ac_ext <<EOF
  11184. #line 14018 "configure"
  11185. #include "confdefs.h"
  11186. #include <stdio.h>
  11187. int main() {
  11188. return fseeko && fseeko (stdin, 0, 0);
  11189. ; return 0; }
  11190. EOF
  11191. if { (eval echo configure:14025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11192. rm -rf conftest*
  11193. ac_cv_func_fseeko=yes
  11194. else
  11195. echo "configure: failed program was:" >&5
  11196. cat conftest.$ac_ext >&5
  11197. fi
  11198. rm -f conftest*
  11199. echo "$ac_t""$ac_cv_func_fseeko" 1>&6
  11200. if test $ac_cv_func_fseeko != no; then
  11201. cat >> confdefs.h <<\EOF
  11202. #define HAVE_FSEEKO 1
  11203. EOF
  11204. fi
  11205. echo $ac_n "checking if system supports Large Files at all""... $ac_c" 1>&6
  11206. echo "configure:14042: checking if system supports Large Files at all" >&5
  11207. cat > conftest.$ac_ext <<EOF
  11208. #line 14045 "configure"
  11209. #include "confdefs.h"
  11210. #include <stdio.h>
  11211. #include <sys/types.h>
  11212. int main() {
  11213. /*
  11214. * Check that off_t can represent 2**63 - 1 correctly.
  11215. * We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11216. * since some C++ compilers masquerading as C compilers
  11217. * incorrectly reject 9223372036854775807.
  11218. *
  11219. * For MinGW, off64_t should be used and __MSVCRT_VERSION__ >= 0x0601
  11220. * (msvcrt.dll version 6.10 or higher) is needed for _fstat64 and _stat64.
  11221. */
  11222. #ifdef __MINGW32__
  11223. # define LARGE_OFF_T (((off64_t) 1 << 62) - 1 + ((off64_t) 1 << 62))
  11224. #else
  11225. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11226. #endif
  11227. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11228. && LARGE_OFF_T % 2147483647 == 1)
  11229. ? 1 : -1];
  11230. #ifdef __MINGW32__
  11231. return !fseeko64;
  11232. return !ftello64;
  11233. #else
  11234. return !fseeko;
  11235. return !ftello;
  11236. #endif
  11237. ; return 0; }
  11238. EOF
  11239. if { (eval echo configure:14077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11240. rm -rf conftest*
  11241. ac_cv_largefiles=yes
  11242. else
  11243. echo "configure: failed program was:" >&5
  11244. cat conftest.$ac_ext >&5
  11245. rm -rf conftest*
  11246. ac_cv_largefiles=no
  11247. fi
  11248. rm -f conftest*
  11249. echo "$ac_t""$ac_cv_largefiles" 1>&6
  11250. if test $ac_cv_largefiles = yes; then
  11251. cat >> confdefs.h <<\EOF
  11252. #define HAVE_LARGEFILES 1
  11253. EOF
  11254. USE_LARGEFILES=1
  11255. else
  11256. USE_LARGEFILES=
  11257. LFS_CFLAGS=
  11258. fi
  11259. CFLAGS=${ac_save_cflags}
  11260. # Done large file support
  11261. USE_TERMIO=
  11262. STRIPFLAG=
  11263. GRASS_HOME="${DSTDIR}"
  11264. trap '' 1 2 15
  11265. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  11266. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  11267. # Let make expand exec_prefix.
  11268. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  11269. # Any assignment to VPATH causes Sun make to only execute
  11270. # the first set of double-colon rules, so remove it if not needed.
  11271. # If there is a colon in the path, we need to keep it.
  11272. if test "x$srcdir" = x.; then
  11273. ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
  11274. fi
  11275. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  11276. DEFS=-DHAVE_CONFIG_H
  11277. # Without the "./", some shells look in PATH for config.status.
  11278. : ${CONFIG_STATUS=./config.status}
  11279. echo creating $CONFIG_STATUS
  11280. rm -f $CONFIG_STATUS
  11281. cat > $CONFIG_STATUS <<EOF
  11282. #! /bin/sh
  11283. # Generated automatically by configure.
  11284. # Run this file to recreate the current configuration.
  11285. # This directory was configured as follows,
  11286. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  11287. #
  11288. # $0 $ac_configure_args
  11289. #
  11290. # Compiler output produced by configure, useful for debugging
  11291. # configure, is in ./config.log if it exists.
  11292. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  11293. for ac_option
  11294. do
  11295. case "\$ac_option" in
  11296. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  11297. echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  11298. exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  11299. -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  11300. echo "$CONFIG_STATUS generated by autoconf version 2.13"
  11301. exit 0 ;;
  11302. -help | --help | --hel | --he | --h)
  11303. echo "\$ac_cs_usage"; exit 0 ;;
  11304. *) echo "\$ac_cs_usage"; exit 1 ;;
  11305. esac
  11306. done
  11307. ac_given_srcdir=$srcdir
  11308. ac_given_INSTALL="$INSTALL"
  11309. trap 'rm -fr `echo "include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/version.h grass.pc include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  11310. EOF
  11311. cat >> $CONFIG_STATUS <<EOF
  11312. # Protect against being on the right side of a sed subst in config.status.
  11313. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  11314. s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  11315. $ac_vpsub
  11316. $extrasub
  11317. s%@SHELL@%$SHELL%g
  11318. s%@CFLAGS@%$CFLAGS%g
  11319. s%@CPPFLAGS@%$CPPFLAGS%g
  11320. s%@CXXFLAGS@%$CXXFLAGS%g
  11321. s%@FFLAGS@%$FFLAGS%g
  11322. s%@DEFS@%$DEFS%g
  11323. s%@LDFLAGS@%$LDFLAGS%g
  11324. s%@LIBS@%$LIBS%g
  11325. s%@exec_prefix@%$exec_prefix%g
  11326. s%@prefix@%$prefix%g
  11327. s%@program_transform_name@%$program_transform_name%g
  11328. s%@bindir@%$bindir%g
  11329. s%@sbindir@%$sbindir%g
  11330. s%@libexecdir@%$libexecdir%g
  11331. s%@datadir@%$datadir%g
  11332. s%@sysconfdir@%$sysconfdir%g
  11333. s%@sharedstatedir@%$sharedstatedir%g
  11334. s%@localstatedir@%$localstatedir%g
  11335. s%@libdir@%$libdir%g
  11336. s%@includedir@%$includedir%g
  11337. s%@oldincludedir@%$oldincludedir%g
  11338. s%@infodir@%$infodir%g
  11339. s%@mandir@%$mandir%g
  11340. s%@host@%$host%g
  11341. s%@host_alias@%$host_alias%g
  11342. s%@host_cpu@%$host_cpu%g
  11343. s%@host_vendor@%$host_vendor%g
  11344. s%@host_os@%$host_os%g
  11345. s%@CC@%$CC%g
  11346. s%@EXEEXT@%$EXEEXT%g
  11347. s%@MINGW32@%$MINGW32%g
  11348. s%@WINDRES@%$WINDRES%g
  11349. s%@BINDIR@%$BINDIR%g
  11350. s%@pwd@%$pwd%g
  11351. s%@SRCDIR@%$SRCDIR%g
  11352. s%@DSTDIR@%$DSTDIR%g
  11353. s%@ARCH@%$ARCH%g
  11354. s%@GISBASE@%$GISBASE%g
  11355. s%@GRASS_BIN@%$GRASS_BIN%g
  11356. s%@GIT@%$GIT%g
  11357. s%@GRASS_VERSION_FILE@%$GRASS_VERSION_FILE%g
  11358. s%@GRASS_VERSION_MAJOR@%$GRASS_VERSION_MAJOR%g
  11359. s%@GRASS_VERSION_MINOR@%$GRASS_VERSION_MINOR%g
  11360. s%@GRASS_VERSION_RELEASE@%$GRASS_VERSION_RELEASE%g
  11361. s%@GRASS_VERSION_NUMBER@%$GRASS_VERSION_NUMBER%g
  11362. s%@GRASS_VERSION_DATE@%$GRASS_VERSION_DATE%g
  11363. s%@GRASS_VERSION_GIT@%$GRASS_VERSION_GIT%g
  11364. s%@NAME_VER@%$NAME_VER%g
  11365. s%@LIB_VER@%$LIB_VER%g
  11366. s%@MACOSX_APP@%$MACOSX_APP%g
  11367. s%@MACOSX_ARCHS@%$MACOSX_ARCHS%g
  11368. s%@MACOSX_SDK@%$MACOSX_SDK%g
  11369. s%@INSTDIR@%$INSTDIR%g
  11370. s%@GRASS_LIBRARY_TYPE@%$GRASS_LIBRARY_TYPE%g
  11371. s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g
  11372. s%@LD_LIBRARY_PATH_VAR@%$LD_LIBRARY_PATH_VAR%g
  11373. s%@SHLIB_LD@%$SHLIB_LD%g
  11374. s%@SHLIB_LD_FLAGS@%$SHLIB_LD_FLAGS%g
  11375. s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
  11376. s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
  11377. s%@STLIB_LD@%$STLIB_LD%g
  11378. s%@STLIB_SUFFIX@%$STLIB_SUFFIX%g
  11379. s%@INCLUDE_DIRS@%$INCLUDE_DIRS%g
  11380. s%@LIBRARY_DIRS@%$LIBRARY_DIRS%g
  11381. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  11382. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  11383. s%@INSTALL_DATA@%$INSTALL_DATA%g
  11384. s%@LEX@%$LEX%g
  11385. s%@LEXLIB@%$LEXLIB%g
  11386. s%@LEXPATH@%$LEXPATH%g
  11387. s%@YACC@%$YACC%g
  11388. s%@YACCPATH@%$YACCPATH%g
  11389. s%@RANLIB@%$RANLIB%g
  11390. s%@AR@%$AR%g
  11391. s%@ENV@%$ENV%g
  11392. s%@PERL@%$PERL%g
  11393. s%@CPP@%$CPP%g
  11394. s%@CROSS_COMPILING@%$CROSS_COMPILING%g
  11395. s%@X_CFLAGS@%$X_CFLAGS%g
  11396. s%@X_LIBS@%$X_LIBS%g
  11397. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  11398. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  11399. s%@XLIB@%$XLIB%g
  11400. s%@XTLIB@%$XTLIB%g
  11401. s%@USE_X11@%$USE_X11%g
  11402. s%@DBMIEXTRALIB@%$DBMIEXTRALIB%g
  11403. s%@HAVE_ASPRINTF@%$HAVE_ASPRINTF%g
  11404. s%@MATHLIB@%$MATHLIB%g
  11405. s%@DLLIB@%$DLLIB%g
  11406. s%@ICONVLIB@%$ICONVLIB%g
  11407. s%@SOCKLIB@%$SOCKLIB%g
  11408. s%@HAVE_SOCKET@%$HAVE_SOCKET%g
  11409. s%@ZLIBINCPATH@%$ZLIBINCPATH%g
  11410. s%@ZLIBLIBPATH@%$ZLIBLIBPATH%g
  11411. s%@ZLIB@%$ZLIB%g
  11412. s%@BZIP2INCPATH@%$BZIP2INCPATH%g
  11413. s%@BZIP2LIBPATH@%$BZIP2LIBPATH%g
  11414. s%@BZIP2LIB@%$BZIP2LIB%g
  11415. s%@ZSTDINCPATH@%$ZSTDINCPATH%g
  11416. s%@ZSTDLIBPATH@%$ZSTDLIBPATH%g
  11417. s%@ZSTDLIB@%$ZSTDLIB%g
  11418. s%@PROJINC@%$PROJINC%g
  11419. s%@PROJLIB@%$PROJLIB%g
  11420. s%@PROJSHARE@%$PROJSHARE%g
  11421. s%@REGEXINCPATH@%$REGEXINCPATH%g
  11422. s%@REGEXLIBPATH@%$REGEXLIBPATH%g
  11423. s%@REGEXLIB@%$REGEXLIB%g
  11424. s%@USE_REGEX@%$USE_REGEX%g
  11425. s%@READLINEINCPATH@%$READLINEINCPATH%g
  11426. s%@READLINELIBPATH@%$READLINELIBPATH%g
  11427. s%@READLINELIB@%$READLINELIB%g
  11428. s%@HISTORYLIB@%$HISTORYLIB%g
  11429. s%@GDAL_CONFIG@%$GDAL_CONFIG%g
  11430. s%@GDAL_LIBS@%$GDAL_LIBS%g
  11431. s%@GDAL_CFLAGS@%$GDAL_CFLAGS%g
  11432. s%@USE_GDAL@%$USE_GDAL%g
  11433. s%@USE_OGR@%$USE_OGR%g
  11434. s%@LIBLAS_CONFIG@%$LIBLAS_CONFIG%g
  11435. s%@LIBLAS_LIBS@%$LIBLAS_LIBS%g
  11436. s%@LIBLAS_CFLAGS@%$LIBLAS_CFLAGS%g
  11437. s%@LIBLAS_INC@%$LIBLAS_INC%g
  11438. s%@USE_LIBLAS@%$USE_LIBLAS%g
  11439. s%@PDAL_CONFIG@%$PDAL_CONFIG%g
  11440. s%@PDAL_LIBS@%$PDAL_LIBS%g
  11441. s%@PDAL_CPPFLAGS@%$PDAL_CPPFLAGS%g
  11442. s%@PDAL_INC@%$PDAL_INC%g
  11443. s%@USE_PDAL@%$USE_PDAL%g
  11444. s%@NETCDF_CONFIG@%$NETCDF_CONFIG%g
  11445. s%@NETCDF_LIBS@%$NETCDF_LIBS%g
  11446. s%@NETCDF_CFLAGS@%$NETCDF_CFLAGS%g
  11447. s%@USE_NETCDF@%$USE_NETCDF%g
  11448. s%@GEOS_CONFIG@%$GEOS_CONFIG%g
  11449. s%@GEOS_LIBS@%$GEOS_LIBS%g
  11450. s%@GEOS_CFLAGS@%$GEOS_CFLAGS%g
  11451. s%@USE_GEOS@%$USE_GEOS%g
  11452. s%@TIFF_INCLUDE_DIRS@%$TIFF_INCLUDE_DIRS%g
  11453. s%@TIFF_LIBRARY_DIRS@%$TIFF_LIBRARY_DIRS%g
  11454. s%@TIFFLIB@%$TIFFLIB%g
  11455. s%@PNGINC@%$PNGINC%g
  11456. s%@PNGLIB@%$PNGLIB%g
  11457. s%@USE_PNG@%$USE_PNG%g
  11458. s%@USE_POSTGRES@%$USE_POSTGRES%g
  11459. s%@PQINCPATH@%$PQINCPATH%g
  11460. s%@PQLIBPATH@%$PQLIBPATH%g
  11461. s%@PQLIB@%$PQLIB%g
  11462. s%@MYSQLD_CONFIG@%$MYSQLD_CONFIG%g
  11463. s%@USE_MYSQL@%$USE_MYSQL%g
  11464. s%@MYSQLINCPATH@%$MYSQLINCPATH%g
  11465. s%@MYSQLLIBPATH@%$MYSQLLIBPATH%g
  11466. s%@MYSQLLIB@%$MYSQLLIB%g
  11467. s%@MYSQLDLIB@%$MYSQLDLIB%g
  11468. s%@USE_SQLITE@%$USE_SQLITE%g
  11469. s%@SQLITEINCPATH@%$SQLITEINCPATH%g
  11470. s%@SQLITELIBPATH@%$SQLITELIBPATH%g
  11471. s%@SQLITELIB@%$SQLITELIB%g
  11472. s%@USE_OPENGL@%$USE_OPENGL%g
  11473. s%@OPENGL_X11@%$OPENGL_X11%g
  11474. s%@OPENGL_AQUA@%$OPENGL_AQUA%g
  11475. s%@OPENGL_WINDOWS@%$OPENGL_WINDOWS%g
  11476. s%@OPENGLINC@%$OPENGLINC%g
  11477. s%@OPENGLLIB@%$OPENGLLIB%g
  11478. s%@OPENGLULIB@%$OPENGLULIB%g
  11479. s%@ODBCINC@%$ODBCINC%g
  11480. s%@ODBCLIB@%$ODBCLIB%g
  11481. s%@FFTWINC@%$FFTWINC%g
  11482. s%@FFTWLIB@%$FFTWLIB%g
  11483. s%@BLASLIB@%$BLASLIB%g
  11484. s%@BLASINC@%$BLASINC%g
  11485. s%@LAPACKLIB@%$LAPACKLIB%g
  11486. s%@LAPACKINC@%$LAPACKINC%g
  11487. s%@CAIRO_HAS_XRENDER@%$CAIRO_HAS_XRENDER%g
  11488. s%@CAIRO_HAS_XRENDER_SURFACE@%$CAIRO_HAS_XRENDER_SURFACE%g
  11489. s%@CAIROINC@%$CAIROINC%g
  11490. s%@CAIROLIB@%$CAIROLIB%g
  11491. s%@USE_CAIRO@%$USE_CAIRO%g
  11492. s%@FTINC@%$FTINC%g
  11493. s%@FTLIB@%$FTLIB%g
  11494. s%@INTLLIB@%$INTLLIB%g
  11495. s%@HAVE_NLS@%$HAVE_NLS%g
  11496. s%@CXX@%$CXX%g
  11497. s%@OPENDWGINCPATH@%$OPENDWGINCPATH%g
  11498. s%@OPENDWGLIBPATH@%$OPENDWGLIBPATH%g
  11499. s%@OPENDWGLIB@%$OPENDWGLIB%g
  11500. s%@USE_OPENDWG@%$USE_OPENDWG%g
  11501. s%@PTHREADINCPATH@%$PTHREADINCPATH%g
  11502. s%@PTHREADLIBPATH@%$PTHREADLIBPATH%g
  11503. s%@PTHREADLIB@%$PTHREADLIB%g
  11504. s%@USE_PTHREAD@%$USE_PTHREAD%g
  11505. s%@OMPINCPATH@%$OMPINCPATH%g
  11506. s%@OMPLIBPATH@%$OMPLIBPATH%g
  11507. s%@OMPLIB@%$OMPLIB%g
  11508. s%@OMPCFLAGS@%$OMPCFLAGS%g
  11509. s%@USE_OPENMP@%$USE_OPENMP%g
  11510. s%@OCLINCPATH@%$OCLINCPATH%g
  11511. s%@OCLLIBPATH@%$OCLLIBPATH%g
  11512. s%@OCLLIB@%$OCLLIB%g
  11513. s%@USE_OPENCL@%$USE_OPENCL%g
  11514. s%@USE_LARGEFILES@%$USE_LARGEFILES%g
  11515. s%@LFS_CFLAGS@%$LFS_CFLAGS%g
  11516. s%@USE_TERMIO@%$USE_TERMIO%g
  11517. s%@STRIPFLAG@%$STRIPFLAG%g
  11518. s%@GRASS_HOME@%$GRASS_HOME%g
  11519. CEOF
  11520. EOF
  11521. cat >> $CONFIG_STATUS <<\EOF
  11522. # Split the substitutions into bite-sized pieces for seds with
  11523. # small command number limits, like on Digital OSF/1 and HP-UX.
  11524. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  11525. ac_file=1 # Number of current file.
  11526. ac_beg=1 # First line for current file.
  11527. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  11528. ac_more_lines=:
  11529. ac_sed_cmds=""
  11530. while $ac_more_lines; do
  11531. if test $ac_beg -gt 1; then
  11532. sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  11533. else
  11534. sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  11535. fi
  11536. if test ! -s conftest.s$ac_file; then
  11537. ac_more_lines=false
  11538. rm -f conftest.s$ac_file
  11539. else
  11540. if test -z "$ac_sed_cmds"; then
  11541. ac_sed_cmds="sed -f conftest.s$ac_file"
  11542. else
  11543. ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  11544. fi
  11545. ac_file=`expr $ac_file + 1`
  11546. ac_beg=$ac_end
  11547. ac_end=`expr $ac_end + $ac_max_sed_cmds`
  11548. fi
  11549. done
  11550. if test -z "$ac_sed_cmds"; then
  11551. ac_sed_cmds=cat
  11552. fi
  11553. EOF
  11554. cat >> $CONFIG_STATUS <<EOF
  11555. CONFIG_FILES=\${CONFIG_FILES-"include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/version.h grass.pc"}
  11556. EOF
  11557. cat >> $CONFIG_STATUS <<\EOF
  11558. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  11559. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  11560. case "$ac_file" in
  11561. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  11562. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  11563. *) ac_file_in="${ac_file}.in" ;;
  11564. esac
  11565. # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  11566. # Remove last slash and all that follows it. Not all systems have dirname.
  11567. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  11568. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  11569. # The file is in a subdirectory.
  11570. test ! -d "$ac_dir" && mkdir "$ac_dir"
  11571. ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  11572. # A "../" for each directory in $ac_dir_suffix.
  11573. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  11574. else
  11575. ac_dir_suffix= ac_dots=
  11576. fi
  11577. case "$ac_given_srcdir" in
  11578. .) srcdir=.
  11579. if test -z "$ac_dots"; then top_srcdir=.
  11580. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  11581. /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  11582. *) # Relative path.
  11583. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  11584. top_srcdir="$ac_dots$ac_given_srcdir" ;;
  11585. esac
  11586. case "$ac_given_INSTALL" in
  11587. [/$]*) INSTALL="$ac_given_INSTALL" ;;
  11588. *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  11589. esac
  11590. echo creating "$ac_file"
  11591. rm -f "$ac_file"
  11592. configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  11593. case "$ac_file" in
  11594. *Makefile*) ac_comsub="1i\\
  11595. # $configure_input" ;;
  11596. *) ac_comsub= ;;
  11597. esac
  11598. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  11599. sed -e "$ac_comsub
  11600. s%@configure_input@%$configure_input%g
  11601. s%@srcdir@%$srcdir%g
  11602. s%@top_srcdir@%$top_srcdir%g
  11603. s%@INSTALL@%$INSTALL%g
  11604. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  11605. fi; done
  11606. rm -f conftest.s*
  11607. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  11608. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  11609. #
  11610. # ac_d sets the value in "#define NAME VALUE" lines.
  11611. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
  11612. ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
  11613. ac_dC='\3'
  11614. ac_dD='%g'
  11615. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  11616. ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  11617. ac_uB='\([ ]\)%\1#\2define\3'
  11618. ac_uC=' '
  11619. ac_uD='\4%g'
  11620. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  11621. ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  11622. ac_eB='$%\1#\2define\3'
  11623. ac_eC=' '
  11624. ac_eD='%g'
  11625. if test "${CONFIG_HEADERS+set}" != set; then
  11626. EOF
  11627. cat >> $CONFIG_STATUS <<EOF
  11628. CONFIG_HEADERS="include/config.h"
  11629. EOF
  11630. cat >> $CONFIG_STATUS <<\EOF
  11631. fi
  11632. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  11633. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  11634. case "$ac_file" in
  11635. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  11636. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  11637. *) ac_file_in="${ac_file}.in" ;;
  11638. esac
  11639. echo creating $ac_file
  11640. rm -f conftest.frag conftest.in conftest.out
  11641. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  11642. cat $ac_file_inputs > conftest.in
  11643. EOF
  11644. # Transform confdefs.h into a sed script conftest.vals that substitutes
  11645. # the proper values into config.h.in to produce config.h. And first:
  11646. # Protect against being on the right side of a sed subst in config.status.
  11647. # Protect against being in an unquoted here document in config.status.
  11648. rm -f conftest.vals
  11649. cat > conftest.hdr <<\EOF
  11650. s/[\\&%]/\\&/g
  11651. s%[\\$`]%\\&%g
  11652. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  11653. s%ac_d%ac_u%gp
  11654. s%ac_u%ac_e%gp
  11655. EOF
  11656. sed -n -f conftest.hdr confdefs.h > conftest.vals
  11657. rm -f conftest.hdr
  11658. # This sed command replaces #undef with comments. This is necessary, for
  11659. # example, in the case of _POSIX_SOURCE, which is predefined and required
  11660. # on some systems where configure will not decide to define it.
  11661. cat >> conftest.vals <<\EOF
  11662. s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  11663. EOF
  11664. # Break up conftest.vals because some shells have a limit on
  11665. # the size of here documents, and old seds have small limits too.
  11666. rm -f conftest.tail
  11667. while :
  11668. do
  11669. ac_lines=`grep -c . conftest.vals`
  11670. # grep -c gives empty output for an empty file on some AIX systems.
  11671. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  11672. # Write a limited-size here document to conftest.frag.
  11673. echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  11674. sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  11675. echo 'CEOF
  11676. sed -f conftest.frag conftest.in > conftest.out
  11677. rm -f conftest.in
  11678. mv conftest.out conftest.in
  11679. ' >> $CONFIG_STATUS
  11680. sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  11681. rm -f conftest.vals
  11682. mv conftest.tail conftest.vals
  11683. done
  11684. rm -f conftest.vals
  11685. cat >> $CONFIG_STATUS <<\EOF
  11686. rm -f conftest.frag conftest.h
  11687. echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
  11688. cat conftest.in >> conftest.h
  11689. rm -f conftest.in
  11690. if cmp -s $ac_file conftest.h 2>/dev/null; then
  11691. echo "$ac_file is unchanged"
  11692. rm -f conftest.h
  11693. else
  11694. # Remove last slash and all that follows it. Not all systems have dirname.
  11695. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  11696. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  11697. # The file is in a subdirectory.
  11698. test ! -d "$ac_dir" && mkdir "$ac_dir"
  11699. fi
  11700. rm -f $ac_file
  11701. mv conftest.h $ac_file
  11702. fi
  11703. fi; done
  11704. EOF
  11705. cat >> $CONFIG_STATUS <<EOF
  11706. EOF
  11707. cat >> $CONFIG_STATUS <<\EOF
  11708. exit 0
  11709. EOF
  11710. chmod +x $CONFIG_STATUS
  11711. rm -fr confdefs* $ac_clean_files
  11712. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  11713. echo "Copying config.status to config.status.${ARCH}"
  11714. cp -f config.status config.status.${ARCH}
  11715. # Display configuration status
  11716. echo ""
  11717. echo "GRASS is now configured for: ${host}"
  11718. echo ""
  11719. echo " Source directory: ${SRCDIR}"
  11720. echo " Build directory: ${DSTDIR}"
  11721. echo " Installation directory: ${INSTDIR}"
  11722. echo " Startup script in directory:${bindir}"
  11723. echo " C compiler: ${CC} ${CFLAGS}"
  11724. echo " C++ compiler: ${CXX} ${CXXFLAGS}"
  11725. echo " Building shared libraries: ${shared_ok}"
  11726. echo " OpenGL platform: ${OPENGL_TYPE}"
  11727. echo ""
  11728. echo " MacOSX application: `if test -n "${MACOSX_APP}" ; then echo yes ; else echo no ; fi`"
  11729. echo " MacOSX architectures: ${MACOSX_ARCHS}"
  11730. echo " MacOSX SDK: ${MACOSX_SDK}"
  11731. echo ""
  11732. echo " BLAS support: `if test -n "${USE_BLAS}" ; then echo yes ; else echo no ; fi`"
  11733. echo " BZIP2 support: `if test -n "${USE_BZIP2}" ; then echo yes ; else echo no ; fi`"
  11734. echo " C++ support: `if test -n "${USE_CXX}" ; then echo yes ; else echo no ; fi`"
  11735. echo " Cairo support: `if test -n "${USE_CAIRO}" ; then echo yes ; else echo no ; fi`"
  11736. echo " DWG support: `if test -n "${USE_OPENDWG}" ; then echo yes ; else echo no ; fi`"
  11737. echo " FFTW support: `if test -n "${USE_FFTW}" ; then echo yes ; else echo no ; fi`"
  11738. echo " FreeType support: `if test -n "${USE_FREETYPE}" ; then echo yes ; else echo no ; fi`"
  11739. echo " GDAL support: `if test -n "${USE_GDAL}" ; then echo yes ; else echo no ; fi`"
  11740. echo " GEOS support: `if test -n "${USE_GEOS}" ; then echo yes ; else echo no ; fi`"
  11741. echo " LAPACK support: `if test -n "${USE_LAPACK}" ; then echo yes ; else echo no ; fi`"
  11742. echo " Large File support (LFS): `if test -n "${USE_LARGEFILES}" ; then echo yes ; else echo no ; fi`"
  11743. echo " libLAS support: `if test -n "${USE_LIBLAS}" ; then echo yes ; else echo no ; fi`"
  11744. echo " MySQL support: `if test -n "${USE_MYSQL}" ; then echo yes ; else echo no ; fi`"
  11745. echo " NetCDF support: `if test -n "${USE_NETCDF}" ; then echo yes ; else echo no ; fi`"
  11746. echo " NLS support: `if test -n "${USE_NLS}" ; then echo yes ; else echo no ; fi`"
  11747. echo " ODBC support: `if test -n "${USE_ODBC}" ; then echo yes ; else echo no ; fi`"
  11748. echo " OGR support: `if test -n "${USE_OGR}" ; then echo yes ; else echo no ; fi`"
  11749. echo " OpenCL support: `if test -n "${USE_OPENCL}" ; then echo yes ; else echo no ; fi`"
  11750. echo " OpenGL support: `if test -n "${USE_OPENGL}" ; then echo yes ; else echo no ; fi`"
  11751. echo " OpenMP support: `if test -n "${USE_OPENMP}" ; then echo yes ; else echo no ; fi`"
  11752. echo " PDAL support: `if test -n "${USE_PDAL}" ; then echo yes ; else echo no ; fi`"
  11753. echo " PNG support: `if test -n "${USE_PNG}" ; then echo yes ; else echo no ; fi`"
  11754. echo " POSIX thread support: `if test -n "${USE_PTHREAD}" ; then echo yes ; else echo no ; fi`"
  11755. echo " PostgreSQL support: `if test -n "${USE_POSTGRES}" ; then echo yes ; else echo no ; fi`"
  11756. echo " Readline support: `if test -n "${USE_READLINE}" ; then echo yes ; else echo no ; fi`"
  11757. echo " Regex support: `if test -n "${USE_REGEX}" ; then echo yes ; else echo no ; fi`"
  11758. echo " SQLite support: `if test -n "${USE_SQLITE}" ; then echo yes ; else echo no ; fi`"
  11759. echo " TIFF support: `if test -n "${USE_TIFF}" ; then echo yes ; else echo no ; fi`"
  11760. echo " X11 support: `if test -n "${USE_X11}" ; then echo yes ; else echo no ; fi`"
  11761. echo " Zstandard support: `if test -n "${USE_ZSTD}" ; then echo yes ; else echo no ; fi`"
  11762. echo ""
  11763. # remove when the new PROJ API is stable
  11764. if test $PROJ4API = 0 ; then
  11765. echo "$ac_t"" using new PROJ 5+ API" 1>&6
  11766. else
  11767. echo "$ac_t"" using old PROJ 4 API" 1>&6
  11768. fi
  11769. echo ""