configure 374 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629
  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: no)"
  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. # Check for full floating-point support, including Infinity and NaN
  959. IEEEFLAG=
  960. echo $ac_n "checking for full floating-point support""... $ac_c" 1>&6
  961. echo "configure:1071: checking for full floating-point support" >&5
  962. if test "$cross_compiling" = yes; then
  963. echo "$ac_t""unknown (cross-compiling)" 1>&6
  964. echo $ac_n "checking whether "cc -mieee" works""... $ac_c" 1>&6
  965. echo "configure:1076: checking whether "cc -mieee" works" >&5
  966. ac_save_cflags=${CFLAGS}
  967. CFLAGS="$CFLAGS -mieee"
  968. cat > conftest.$ac_ext <<EOF
  969. #line 1080 "configure"
  970. #include "confdefs.h"
  971. int main() {
  972. ; return 0; }
  973. EOF
  974. if { (eval echo configure:1087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  975. rm -rf conftest*
  976. echo "$ac_t""yes" 1>&6
  977. IEEEFLAG="-mieee"
  978. else
  979. echo "configure: failed program was:" >&5
  980. cat conftest.$ac_ext >&5
  981. rm -rf conftest*
  982. echo "$ac_t""no" 1>&6
  983. fi
  984. rm -f conftest*
  985. CFLAGS=${ac_save_cflags}
  986. else
  987. cat > conftest.$ac_ext <<EOF
  988. #line 1103 "configure"
  989. #include "confdefs.h"
  990. #include <float.h>
  991. int main(void) {
  992. double one = 1.0;
  993. double zero = 0.0;
  994. if (one/zero > DBL_MAX) /* infinity */
  995. if (zero/zero != zero/zero) /* NaN */
  996. return 0;
  997. return 1;
  998. }
  999. EOF
  1000. if { (eval echo configure:1117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1001. then
  1002. echo "$ac_t""yes" 1>&6
  1003. else
  1004. echo "configure: failed program was:" >&5
  1005. cat conftest.$ac_ext >&5
  1006. rm -fr conftest*
  1007. echo "$ac_t""no" 1>&6
  1008. ac_save_cflags=${CFLAGS}
  1009. CFLAGS=-mieee
  1010. echo $ac_n "checking for full floating-point support with -mieee""... $ac_c" 1>&6
  1011. echo "configure:1130: checking for full floating-point support with -mieee" >&5
  1012. if test "$cross_compiling" = yes; then
  1013. echo "$ac_t""unknown (cross-compiling)" 1>&6
  1014. { echo "configure: error: *** INTERNAL CONFIGURE ERROR" 1>&2; exit 1; }
  1015. else
  1016. cat > conftest.$ac_ext <<EOF
  1017. #line 1137 "configure"
  1018. #include "confdefs.h"
  1019. #include <float.h>
  1020. int main(void) {
  1021. double one = 1.0;
  1022. double zero = 0.0;
  1023. if (one/zero > DBL_MAX) /* infinity */
  1024. if (zero/zero != zero/zero) /* NaN */
  1025. return 0;
  1026. return 1;
  1027. }
  1028. EOF
  1029. if { (eval echo configure:1151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1030. then
  1031. echo "$ac_t""yes" 1>&6
  1032. IEEEFLAG="-mieee"
  1033. else
  1034. echo "configure: failed program was:" >&5
  1035. cat conftest.$ac_ext >&5
  1036. rm -fr conftest*
  1037. echo "$ac_t""no" 1>&6
  1038. echo "configure: warning: *** Incomplete floating-point support." 1>&2
  1039. fi
  1040. rm -fr conftest*
  1041. fi
  1042. CFLAGS=${ac_save_cflags}
  1043. fi
  1044. rm -fr conftest*
  1045. fi
  1046. CFLAGS="$CFLAGS $IEEEFLAG"
  1047. # Set BINDIR
  1048. if test -n "${bindir}"; then
  1049. BINDIR="${bindir}"
  1050. else
  1051. BINDIR=/usr/local/bin
  1052. fi
  1053. # Set SRCDIR and DSTDIR
  1054. # Extract the first word of "pwd", so it can be a program name with args.
  1055. set dummy pwd; ac_word=$2
  1056. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1057. echo "configure:1188: checking for $ac_word" >&5
  1058. case "$pwd" in
  1059. /*)
  1060. ac_cv_path_pwd="$pwd" # Let the user override the test with a path.
  1061. ;;
  1062. ?:/*)
  1063. ac_cv_path_pwd="$pwd" # Let the user override the test with a dos path.
  1064. ;;
  1065. *)
  1066. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1067. ac_dummy="$PATH"
  1068. for ac_dir in $ac_dummy; do
  1069. test -z "$ac_dir" && ac_dir=.
  1070. if test -f $ac_dir/$ac_word; then
  1071. ac_cv_path_pwd="$ac_dir/$ac_word"
  1072. break
  1073. fi
  1074. done
  1075. IFS="$ac_save_ifs"
  1076. test -z "$ac_cv_path_pwd" && ac_cv_path_pwd="pwd"
  1077. ;;
  1078. esac
  1079. pwd="$ac_cv_path_pwd"
  1080. if test -n "$pwd"; then
  1081. echo "$ac_t""$pwd" 1>&6
  1082. else
  1083. echo "$ac_t""no" 1>&6
  1084. fi
  1085. if test "$MINGW32" = yes ; then
  1086. winpwd="pwd -W"
  1087. else
  1088. winpwd="$pwd"
  1089. fi
  1090. echo $ac_n "checking for source directory""... $ac_c" 1>&6
  1091. echo "configure:1226: checking for source directory" >&5
  1092. if test -z "$srcdir" ; then
  1093. SRCDIR=`$pwd`
  1094. else
  1095. SRCDIR=`(cd "$srcdir" ; $pwd)`
  1096. fi
  1097. echo "$ac_t"""$SRCDIR"" 1>&6
  1098. echo $ac_n "checking for build directory""... $ac_c" 1>&6
  1099. echo "configure:1237: checking for build directory" >&5
  1100. DSTDIR=`$pwd`
  1101. WINDSTDIR=`$winpwd`
  1102. echo "$ac_t"""$DSTDIR"" 1>&6
  1103. # Set ARCH
  1104. ARCH=
  1105. if test -z "${host}"; then
  1106. ARCH="unknown"
  1107. else
  1108. ARCH="${host}"
  1109. fi
  1110. # Use absolute path for aux directory so that install-sh works
  1111. ac_aux_dir=
  1112. for ac_dir in "$SRCDIR" $srcdir/"$SRCDIR"; do
  1113. if test -f $ac_dir/install-sh; then
  1114. ac_aux_dir=$ac_dir
  1115. ac_install_sh="$ac_aux_dir/install-sh -c"
  1116. break
  1117. elif test -f $ac_dir/install.sh; then
  1118. ac_aux_dir=$ac_dir
  1119. ac_install_sh="$ac_aux_dir/install.sh -c"
  1120. break
  1121. fi
  1122. done
  1123. if test -z "$ac_aux_dir"; then
  1124. { echo "configure: error: can not find install-sh or install.sh in "$SRCDIR" $srcdir/"$SRCDIR"" 1>&2; exit 1; }
  1125. fi
  1126. ac_config_guess=$ac_aux_dir/config.guess
  1127. ac_config_sub=$ac_aux_dir/config.sub
  1128. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  1129. # Set GISBASE and GRASS_BIN
  1130. GISBASE="${WINDSTDIR}/dist.${ARCH}"
  1131. GRASS_BIN="${DSTDIR}/bin.${ARCH}"
  1132. # Set GRASS_VERSION_*
  1133. GRASS_VERSION_FILE=include/VERSION
  1134. GRASS_VERSION_MAJOR=`sed -n 1p "${GRASS_VERSION_FILE}"`
  1135. GRASS_VERSION_MINOR=`sed -n 2p "${GRASS_VERSION_FILE}"`
  1136. GRASS_VERSION_RELEASE=`sed -n 3p "${GRASS_VERSION_FILE}"`
  1137. GRASS_VERSION_DATE=`sed -n 4p "${GRASS_VERSION_FILE}"`
  1138. GRASS_VERSION_NUMBER=`echo ${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}`
  1139. NAME_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/\..*//'`
  1140. LIB_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/^\([0-9.]*\).*$/\1/'`
  1141. GRASS_VERSION_SVN="exported"
  1142. # Extract the first word of "svnversion", so it can be a program name with args.
  1143. set dummy svnversion; ac_word=$2
  1144. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1145. echo "configure:1305: checking for $ac_word" >&5
  1146. case "$SVN_VERSION" in
  1147. /*)
  1148. ac_cv_path_SVN_VERSION="$SVN_VERSION" # Let the user override the test with a path.
  1149. ;;
  1150. ?:/*)
  1151. ac_cv_path_SVN_VERSION="$SVN_VERSION" # Let the user override the test with a dos path.
  1152. ;;
  1153. *)
  1154. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1155. ac_dummy="$PATH"
  1156. for ac_dir in $ac_dummy; do
  1157. test -z "$ac_dir" && ac_dir=.
  1158. if test -f $ac_dir/$ac_word; then
  1159. ac_cv_path_SVN_VERSION="$ac_dir/$ac_word"
  1160. break
  1161. fi
  1162. done
  1163. IFS="$ac_save_ifs"
  1164. test -z "$ac_cv_path_SVN_VERSION" && ac_cv_path_SVN_VERSION="no"
  1165. ;;
  1166. esac
  1167. SVN_VERSION="$ac_cv_path_SVN_VERSION"
  1168. if test -n "$SVN_VERSION"; then
  1169. echo "$ac_t""$SVN_VERSION" 1>&6
  1170. else
  1171. echo "$ac_t""no" 1>&6
  1172. fi
  1173. if test "$SVN_VERSION" != "no" ; then
  1174. GRASS_VERSION_SVN=`$SVN_VERSION -c | cut -f2 -d:`
  1175. if test "$GRASS_VERSION_SVN" = "exported" -o "$GRASS_VERSION_SVN" = "Unversioned directory" ; then
  1176. GRASS_VERSION_SVN="exported"
  1177. else
  1178. GRASS_VERSION_SVN="r$GRASS_VERSION_SVN"
  1179. fi
  1180. fi
  1181. # Check for MacOSX App
  1182. # Check whether --enable-macosx-app or --disable-macosx-app was given.
  1183. if test "${enable_macosx_app+set}" = set; then
  1184. enableval="$enable_macosx_app"
  1185. :
  1186. else
  1187. enable_macosx_app=no
  1188. fi
  1189. echo $ac_n "checking for MacOSX App""... $ac_c" 1>&6
  1190. echo "configure:1366: checking for MacOSX App" >&5
  1191. case "$enable_macosx_app" in
  1192. yes) MACOSX_APP=1 ;;
  1193. no) MACOSX_APP= ;;
  1194. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  1195. esac
  1196. echo "$ac_t"""$enable_macosx_app"" 1>&6
  1197. # Check for MacOSX archs
  1198. echo $ac_n "checking for MacOSX architectures""... $ac_c" 1>&6
  1199. echo "configure:1378: checking for MacOSX architectures" >&5
  1200. MACOSX_ARCHS=
  1201. if test -z "$with_macosx_archs" ; then
  1202. echo "$ac_t""no" 1>&6
  1203. else
  1204. for a in $with_macosx_archs
  1205. do
  1206. # check if valid arch?
  1207. case "$a" in
  1208. i386|ppc|x86_64|ppc64)
  1209. MACOSX_ARCHS="$MACOSX_ARCHS -arch $a"
  1210. ;;
  1211. esac
  1212. done
  1213. echo "$ac_t""$MACOSX_ARCHS" 1>&6
  1214. LDFLAGS="$LDFLAGS $MACOSX_ARCHS"
  1215. CFLAGS="$CFLAGS $MACOSX_ARCHS"
  1216. CXXFLAGS="$CXXFLAGS $MACOSX_ARCHS"
  1217. fi
  1218. # Done checking MacOSX archs
  1219. # Check for MacOSX SDK
  1220. echo $ac_n "checking for MacOSX SDK""... $ac_c" 1>&6
  1221. echo "configure:1407: checking for MacOSX SDK" >&5
  1222. MACOSX_SDK=
  1223. if test -z "$with_macosx_sdk" ; then
  1224. echo "$ac_t""no" 1>&6
  1225. else
  1226. ac_safe=`echo "$with_macosx_sdk/SDKSettings.plist" | sed 'y%./+-%__p_%'`
  1227. echo $ac_n "checking for $with_macosx_sdk/SDKSettings.plist""... $ac_c" 1>&6
  1228. echo "configure:1417: checking for $with_macosx_sdk/SDKSettings.plist" >&5
  1229. if test "$cross_compiling" = yes; then
  1230. { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
  1231. else
  1232. if test -r $with_macosx_sdk/SDKSettings.plist; then
  1233. eval "ac_cv_file_$ac_safe=yes"
  1234. else
  1235. eval "ac_cv_file_$ac_safe=no"
  1236. fi
  1237. fi
  1238. if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  1239. echo "$ac_t""yes" 1>&6
  1240. MACOSX_SDK="-isysroot $with_macosx_sdk"
  1241. else
  1242. echo "$ac_t""no" 1>&6
  1243. { echo "configure: error: *** specified SDK does not exist or is not a SDK" 1>&2; exit 1; }
  1244. fi
  1245. LDFLAGS="$LDFLAGS $MACOSX_SDK"
  1246. CFLAGS="$CFLAGS $MACOSX_SDK"
  1247. CXXFLAGS="$CXXFLAGS $MACOSX_SDK"
  1248. fi
  1249. # Done checking MacOSX SDK
  1250. # Set INST_DIR
  1251. if test -n "$MACOSX_APP" ; then
  1252. INSTDIR='${prefix}'"/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app/Contents/MacOS"
  1253. else
  1254. INSTDIR='${prefix}'"/grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}"
  1255. fi
  1256. # Get flags for building shared libraries
  1257. echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
  1258. echo "configure:1461: checking how to build libraries" >&5
  1259. # Check whether --enable-shared or --disable-shared was given.
  1260. if test "${enable_shared+set}" = set; then
  1261. enableval="$enable_shared"
  1262. shared_ok=$enableval
  1263. else
  1264. shared_ok=yes
  1265. fi
  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 "$shared_ok" = "yes" ; then
  1273. echo "$ac_t""shared" 1>&6
  1274. SHARED_BUILD=1
  1275. GRASS_LIBRARY_TYPE='shlib'
  1276. else
  1277. echo "$ac_t""static" 1>&6
  1278. SHARED_BUILD=0
  1279. cat >> confdefs.h <<\EOF
  1280. #define STATIC_BUILD 1
  1281. EOF
  1282. GRASS_LIBRARY_TYPE='stlib'
  1283. fi
  1284. ac_save_ldflags="$LDFLAGS"
  1285. SHLIB_CFLAGS=""
  1286. SHLIB_LD_FLAGS=""
  1287. SHLIB_SUFFIX=""
  1288. SHLIB_LD=""
  1289. STLIB_LD='${AR} cr'
  1290. STLIB_SUFFIX='.a'
  1291. GRASS_TRIM_DOTS='`echo ${LIB_VER} | tr -d .`'
  1292. GRASS_LIB_VERSIONS_OK=ok
  1293. LDFLAGS=""
  1294. LD_SEARCH_FLAGS=""
  1295. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1296. case $host in
  1297. *-linux-* | *-gnu* | *-kfreebsd*-gnu)
  1298. SHLIB_CFLAGS="-fPIC"
  1299. SHLIB_LD_FLAGS="-Wl,-soname,\$(notdir \$@)"
  1300. SHLIB_SUFFIX=".so"
  1301. SHLIB_LD="${CC} -shared"
  1302. LDFLAGS="-Wl,--export-dynamic"
  1303. LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
  1304. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1305. ;;
  1306. *-pc-cygwin)
  1307. SHLIB_SUFFIX=".dll"
  1308. SHLIB_LD="${CC} -shared"
  1309. LDFLAGS="-Wl,--export-dynamic"
  1310. LD_LIBRARY_PATH_VAR="PATH"
  1311. ;;
  1312. *-pc-mingw32 | *-w64-mingw32 | *-pc-msys)
  1313. SHLIB_SUFFIX=".dll"
  1314. SHLIB_LD="${CC} -shared"
  1315. LDFLAGS="-Wl,--export-dynamic,--enable-runtime-pseudo-reloc"
  1316. LD_LIBRARY_PATH_VAR="PATH"
  1317. ;;
  1318. *-apple-darwin*)
  1319. SHLIB_CFLAGS="-fno-common"
  1320. SHLIB_SUFFIX=".dylib"
  1321. 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}"
  1322. LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
  1323. ;;
  1324. *-sun-solaris*)
  1325. # Note: If _REENTRANT isn't defined, then Solaris
  1326. # won't define thread-safe library routines.
  1327. cat >> confdefs.h <<\EOF
  1328. #define _REENTRANT 1
  1329. EOF
  1330. cat >> confdefs.h <<\EOF
  1331. #define _POSIX_PTHREAD_SEMANTICS 1
  1332. EOF
  1333. # Note: need the LIBS below, otherwise Tk won't find Tcl's
  1334. # symbols when dynamically loaded into tclsh.
  1335. if test "$GCC" = "yes" ; then
  1336. SHLIB_CFLAGS="-fPIC"
  1337. SHLIB_LD="$CC -shared"
  1338. LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1339. else
  1340. SHLIB_CFLAGS="-KPIC"
  1341. SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1342. LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1343. fi
  1344. SHLIB_SUFFIX=".so"
  1345. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1346. ;;
  1347. *-solaris2*)
  1348. # Note: Solaris is as of 2010 Oracle Solaris, not Sun Solaris
  1349. # Oracle Solaris derives from Solaris 2
  1350. # derives from SunOS 5
  1351. # derives from UNIX System V Release 4
  1352. # Note: If _REENTRANT isn't defined, then Solaris
  1353. # won't define thread-safe library routines.
  1354. cat >> confdefs.h <<\EOF
  1355. #define _REENTRANT 1
  1356. EOF
  1357. cat >> confdefs.h <<\EOF
  1358. #define _POSIX_PTHREAD_SEMANTICS 1
  1359. EOF
  1360. # Note: need the LIBS below, otherwise Tk won't find Tcl's
  1361. # symbols when dynamically loaded into tclsh.
  1362. if test "$GCC" = "yes" ; then
  1363. SHLIB_CFLAGS="-fPIC"
  1364. SHLIB_LD="$CC -shared"
  1365. LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1366. else
  1367. SHLIB_CFLAGS="-KPIC"
  1368. SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1369. LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1370. fi
  1371. SHLIB_SUFFIX=".so"
  1372. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1373. ;;
  1374. *-freebsd*)
  1375. # NOTE: only FreeBSD 4+ is supported
  1376. # FreeBSD 3.* and greater have ELF.
  1377. SHLIB_CFLAGS="-fPIC"
  1378. #SHLIB_LD="ld -Bshareable -x"
  1379. SHLIB_LD="${CC} -shared"
  1380. SHLIB_SUFFIX=".so"
  1381. LDFLAGS="-Wl,--export-dynamic"
  1382. #LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1383. LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
  1384. # TODO: add optional pthread support with any combination of:
  1385. # CFLAGS="$CFLAGS -pthread"
  1386. # LDFLAGS="$LDFLAGS -lpthread"
  1387. # AC_DEFINE(_REENTRANT)
  1388. # AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
  1389. ;;
  1390. *-netbsd*)
  1391. # NetBSD has ELF.
  1392. SHLIB_CFLAGS="-fPIC"
  1393. SHLIB_LD="${CC} -shared"
  1394. SHLIB_LD_LIBS="${LIBS}"
  1395. LDFLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
  1396. SHLIB_LD_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
  1397. LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -L${LIB_RUNTIME_DIR}'
  1398. # some older NetBSD versions do not handle version numbers with dots.
  1399. #STLIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
  1400. #SHLIB_SUFFIX='${GRASS_TRIM_DOTS}.so'
  1401. #GRASS_LIB_VERSIONS_OK=nodots
  1402. # NetBSD 6 does handle version numbers with dots.
  1403. STLIB_SUFFIX=".a"
  1404. SHLIB_SUFFIX=".so"
  1405. # TODO: add optional pthread support with any combination of:
  1406. # CFLAGS="$CFLAGS -pthread"
  1407. # LDFLAGS="$LDFLAGS -lpthread"
  1408. # AC_DEFINE(_REENTRANT)
  1409. # AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
  1410. ;;
  1411. *aix*)
  1412. # NOTE: do we need to support aix < 6 ?
  1413. LIBS="$LIBS -lc"
  1414. SHLIB_CFLAGS=""
  1415. LDFLAGS=""
  1416. if test "$GCC" = "yes" ; then
  1417. SHLIB_CFLAGS="-fPIC"
  1418. SHLIB_LD="$CC -shared"
  1419. LD_SEARCH_FLAGS='-Wl,-bsvr4,-R,${LIB_RUNTIME_DIR}'
  1420. else
  1421. # assume xlc
  1422. SHLIB_CFLAGS="-qmkshrobj"
  1423. SHLIB_LD="$CC -shared"
  1424. LD_SEARCH_FLAGS='-Wl,-bsvr4,-R,${LIB_RUNTIME_DIR}'
  1425. fi
  1426. SHLIB_SUFFIX=".so"
  1427. LD_LIBRARY_PATH_VAR="LIBPATH"
  1428. GRASS_NEEDS_EXP_FILE=1
  1429. GRASS_EXPORT_FILE_SUFFIX='${LIB_VER}.exp'
  1430. ;;
  1431. *)
  1432. { echo "configure: error: ***Unknown platform: $host***" 1>&2; exit 1; }
  1433. ;;
  1434. esac
  1435. LDFLAGS="${ac_save_ldflags} $LDFLAGS"
  1436. # Enable options
  1437. # Check whether --enable-w11 or --disable-w11 was given.
  1438. if test "${enable_w11+set}" = set; then
  1439. enableval="$enable_w11"
  1440. :
  1441. else
  1442. enable_w11=no
  1443. fi
  1444. # With options
  1445. # Check whether --with-cxx or --without-cxx was given.
  1446. if test "${with_cxx+set}" = set; then
  1447. withval="$with_cxx"
  1448. :
  1449. else
  1450. with_cxx=yes
  1451. fi
  1452. #LOC_ARG_WITH(g77, GNU Fortran 77, no)
  1453. # Check whether --with-macosx-archs or --without-macosx-archs was given.
  1454. if test "${with_macosx_archs+set}" = set; then
  1455. withval="$with_macosx_archs"
  1456. :
  1457. else
  1458. with_macosx_archs="no"
  1459. fi
  1460. # Check whether --with-macosx-sdk or --without-macosx-sdk was given.
  1461. if test "${with_macosx_sdk+set}" = set; then
  1462. withval="$with_macosx_sdk"
  1463. :
  1464. else
  1465. with_macosx_sdk="no"
  1466. fi
  1467. # Check whether --with-tiff or --without-tiff was given.
  1468. if test "${with_tiff+set}" = set; then
  1469. withval="$with_tiff"
  1470. :
  1471. else
  1472. with_tiff=yes
  1473. fi
  1474. # Check whether --with-png or --without-png was given.
  1475. if test "${with_png+set}" = set; then
  1476. withval="$with_png"
  1477. :
  1478. else
  1479. with_png=yes
  1480. fi
  1481. # Check whether --with-postgres or --without-postgres was given.
  1482. if test "${with_postgres+set}" = set; then
  1483. withval="$with_postgres"
  1484. :
  1485. else
  1486. with_postgres=no
  1487. fi
  1488. # Check whether --with-mysql or --without-mysql was given.
  1489. if test "${with_mysql+set}" = set; then
  1490. withval="$with_mysql"
  1491. :
  1492. else
  1493. with_mysql=no
  1494. fi
  1495. # Check whether --with-sqlite or --without-sqlite was given.
  1496. if test "${with_sqlite+set}" = set; then
  1497. withval="$with_sqlite"
  1498. :
  1499. else
  1500. with_sqlite=yes
  1501. fi
  1502. # Check whether --with-opengl or --without-opengl was given.
  1503. if test "${with_opengl+set}" = set; then
  1504. withval="$with_opengl"
  1505. :
  1506. else
  1507. with_opengl=yes
  1508. fi
  1509. # Check whether --with-odbc or --without-odbc was given.
  1510. if test "${with_odbc+set}" = set; then
  1511. withval="$with_odbc"
  1512. :
  1513. else
  1514. with_odbc=no
  1515. fi
  1516. # Check whether --with-fftw or --without-fftw was given.
  1517. if test "${with_fftw+set}" = set; then
  1518. withval="$with_fftw"
  1519. :
  1520. else
  1521. with_fftw=yes
  1522. fi
  1523. # Check whether --with-blas or --without-blas was given.
  1524. if test "${with_blas+set}" = set; then
  1525. withval="$with_blas"
  1526. :
  1527. else
  1528. with_blas=no
  1529. fi
  1530. # Check whether --with-lapack or --without-lapack was given.
  1531. if test "${with_lapack+set}" = set; then
  1532. withval="$with_lapack"
  1533. :
  1534. else
  1535. with_lapack=no
  1536. fi
  1537. # Check whether --with-cairo or --without-cairo was given.
  1538. if test "${with_cairo+set}" = set; then
  1539. withval="$with_cairo"
  1540. :
  1541. else
  1542. with_cairo=yes
  1543. fi
  1544. # Check whether --with-freetype or --without-freetype was given.
  1545. if test "${with_freetype+set}" = set; then
  1546. withval="$with_freetype"
  1547. :
  1548. else
  1549. with_freetype=yes
  1550. fi
  1551. # Check whether --with-nls or --without-nls was given.
  1552. if test "${with_nls+set}" = set; then
  1553. withval="$with_nls"
  1554. :
  1555. else
  1556. with_nls=no
  1557. fi
  1558. # Check whether --with-readline or --without-readline was given.
  1559. if test "${with_readline+set}" = set; then
  1560. withval="$with_readline"
  1561. :
  1562. else
  1563. with_readline=no
  1564. fi
  1565. # Check whether --with-opendwg or --without-opendwg was given.
  1566. if test "${with_opendwg+set}" = set; then
  1567. withval="$with_opendwg"
  1568. :
  1569. else
  1570. with_opendwg=no
  1571. fi
  1572. # Check whether --with-regex or --without-regex was given.
  1573. if test "${with_regex+set}" = set; then
  1574. withval="$with_regex"
  1575. :
  1576. else
  1577. with_regex=yes
  1578. fi
  1579. # Check whether --with-pthread or --without-pthread was given.
  1580. if test "${with_pthread+set}" = set; then
  1581. withval="$with_pthread"
  1582. :
  1583. else
  1584. with_pthread=no
  1585. fi
  1586. # Check whether --with-openmp or --without-openmp was given.
  1587. if test "${with_openmp+set}" = set; then
  1588. withval="$with_openmp"
  1589. :
  1590. else
  1591. with_openmp=no
  1592. fi
  1593. # Check whether --with-opencl or --without-opencl was given.
  1594. if test "${with_opencl+set}" = set; then
  1595. withval="$with_opencl"
  1596. :
  1597. else
  1598. with_opencl=no
  1599. fi
  1600. # Check whether --with-bzlib or --without-bzlib was given.
  1601. if test "${with_bzlib+set}" = set; then
  1602. withval="$with_bzlib"
  1603. :
  1604. else
  1605. with_bzlib=no
  1606. fi
  1607. # Check whether --with-zstd or --without-zstd was given.
  1608. if test "${with_zstd+set}" = set; then
  1609. withval="$with_zstd"
  1610. :
  1611. else
  1612. with_zstd=no
  1613. fi
  1614. # Check whether --with-gdal or --without-gdal was given.
  1615. if test "${with_gdal+set}" = set; then
  1616. withval="$with_gdal"
  1617. :
  1618. fi
  1619. # Check whether --with-liblas or --without-liblas was given.
  1620. if test "${with_liblas+set}" = set; then
  1621. withval="$with_liblas"
  1622. :
  1623. else
  1624. with_liblas="no"
  1625. fi
  1626. # Check whether --with-pdal or --without-pdal was given.
  1627. if test "${with_pdal+set}" = set; then
  1628. withval="$with_pdal"
  1629. :
  1630. else
  1631. with_pdal="no"
  1632. fi
  1633. # Check whether --with-wxwidgets or --without-wxwidgets was given.
  1634. if test "${with_wxwidgets+set}" = set; then
  1635. withval="$with_wxwidgets"
  1636. :
  1637. else
  1638. with_wxwidgets="no"
  1639. fi
  1640. # Check whether --with-netcdf or --without-netcdf was given.
  1641. if test "${with_netcdf+set}" = set; then
  1642. withval="$with_netcdf"
  1643. :
  1644. else
  1645. with_netcdf="no"
  1646. fi
  1647. # With includes and libs options
  1648. # Check whether --with-geos or --without-geos was given.
  1649. if test "${with_geos+set}" = set; then
  1650. withval="$with_geos"
  1651. :
  1652. else
  1653. with_geos="no"
  1654. fi
  1655. # Check whether --with-includes or --without-includes was given.
  1656. if test "${with_includes+set}" = set; then
  1657. withval="$with_includes"
  1658. :
  1659. fi
  1660. # Check whether --with-libs or --without-libs was given.
  1661. if test "${with_libs+set}" = set; then
  1662. withval="$with_libs"
  1663. :
  1664. fi
  1665. # Check whether --with-zlib-includes or --without-zlib-includes was given.
  1666. if test "${with_zlib_includes+set}" = set; then
  1667. withval="$with_zlib_includes"
  1668. :
  1669. fi
  1670. # Check whether --with-zlib-libs or --without-zlib-libs was given.
  1671. if test "${with_zlib_libs+set}" = set; then
  1672. withval="$with_zlib_libs"
  1673. :
  1674. fi
  1675. # Check whether --with-bzlib-includes or --without-bzlib-includes was given.
  1676. if test "${with_bzlib_includes+set}" = set; then
  1677. withval="$with_bzlib_includes"
  1678. :
  1679. fi
  1680. # Check whether --with-bzlib-libs or --without-bzlib-libs was given.
  1681. if test "${with_bzlib_libs+set}" = set; then
  1682. withval="$with_bzlib_libs"
  1683. :
  1684. fi
  1685. # Check whether --with-zstd-includes or --without-zstd-includes was given.
  1686. if test "${with_zstd_includes+set}" = set; then
  1687. withval="$with_zstd_includes"
  1688. :
  1689. fi
  1690. # Check whether --with-zstd-libs or --without-zstd-libs was given.
  1691. if test "${with_zstd_libs+set}" = set; then
  1692. withval="$with_zstd_libs"
  1693. :
  1694. fi
  1695. # Check whether --with-readline-includes or --without-readline-includes was given.
  1696. if test "${with_readline_includes+set}" = set; then
  1697. withval="$with_readline_includes"
  1698. :
  1699. fi
  1700. # Check whether --with-readline-libs or --without-readline-libs was given.
  1701. if test "${with_readline_libs+set}" = set; then
  1702. withval="$with_readline_libs"
  1703. :
  1704. fi
  1705. # Check whether --with-tiff-includes or --without-tiff-includes was given.
  1706. if test "${with_tiff_includes+set}" = set; then
  1707. withval="$with_tiff_includes"
  1708. :
  1709. fi
  1710. # Check whether --with-tiff-libs or --without-tiff-libs was given.
  1711. if test "${with_tiff_libs+set}" = set; then
  1712. withval="$with_tiff_libs"
  1713. :
  1714. fi
  1715. # Check whether --with-png-includes or --without-png-includes was given.
  1716. if test "${with_png_includes+set}" = set; then
  1717. withval="$with_png_includes"
  1718. :
  1719. fi
  1720. # Check whether --with-png-libs or --without-png-libs was given.
  1721. if test "${with_png_libs+set}" = set; then
  1722. withval="$with_png_libs"
  1723. :
  1724. fi
  1725. # Check whether --with-postgres-includes or --without-postgres-includes was given.
  1726. if test "${with_postgres_includes+set}" = set; then
  1727. withval="$with_postgres_includes"
  1728. :
  1729. fi
  1730. # Check whether --with-postgres-libs or --without-postgres-libs was given.
  1731. if test "${with_postgres_libs+set}" = set; then
  1732. withval="$with_postgres_libs"
  1733. :
  1734. fi
  1735. # Check whether --with-mysql-includes or --without-mysql-includes was given.
  1736. if test "${with_mysql_includes+set}" = set; then
  1737. withval="$with_mysql_includes"
  1738. :
  1739. fi
  1740. # Check whether --with-mysql-libs or --without-mysql-libs was given.
  1741. if test "${with_mysql_libs+set}" = set; then
  1742. withval="$with_mysql_libs"
  1743. :
  1744. fi
  1745. # Check whether --with-sqlite-includes or --without-sqlite-includes was given.
  1746. if test "${with_sqlite_includes+set}" = set; then
  1747. withval="$with_sqlite_includes"
  1748. :
  1749. fi
  1750. # Check whether --with-sqlite-libs or --without-sqlite-libs was given.
  1751. if test "${with_sqlite_libs+set}" = set; then
  1752. withval="$with_sqlite_libs"
  1753. :
  1754. fi
  1755. # Check whether --with-opengl-includes or --without-opengl-includes was given.
  1756. if test "${with_opengl_includes+set}" = set; then
  1757. withval="$with_opengl_includes"
  1758. :
  1759. fi
  1760. # Check whether --with-opengl-libs or --without-opengl-libs was given.
  1761. if test "${with_opengl_libs+set}" = set; then
  1762. withval="$with_opengl_libs"
  1763. :
  1764. fi
  1765. # Check whether --with-opengl-framework or --without-opengl-framework was given.
  1766. if test "${with_opengl_framework+set}" = set; then
  1767. withval="$with_opengl_framework"
  1768. :
  1769. fi
  1770. # Check whether --with-odbc-includes or --without-odbc-includes was given.
  1771. if test "${with_odbc_includes+set}" = set; then
  1772. withval="$with_odbc_includes"
  1773. :
  1774. fi
  1775. # Check whether --with-odbc-libs or --without-odbc-libs was given.
  1776. if test "${with_odbc_libs+set}" = set; then
  1777. withval="$with_odbc_libs"
  1778. :
  1779. fi
  1780. # Check whether --with-fftw-includes or --without-fftw-includes was given.
  1781. if test "${with_fftw_includes+set}" = set; then
  1782. withval="$with_fftw_includes"
  1783. :
  1784. fi
  1785. # Check whether --with-fftw-libs or --without-fftw-libs was given.
  1786. if test "${with_fftw_libs+set}" = set; then
  1787. withval="$with_fftw_libs"
  1788. :
  1789. fi
  1790. # Check whether --with-blas-includes or --without-blas-includes was given.
  1791. if test "${with_blas_includes+set}" = set; then
  1792. withval="$with_blas_includes"
  1793. :
  1794. fi
  1795. # Check whether --with-blas-libs or --without-blas-libs was given.
  1796. if test "${with_blas_libs+set}" = set; then
  1797. withval="$with_blas_libs"
  1798. :
  1799. fi
  1800. # Check whether --with-lapack-includes or --without-lapack-includes was given.
  1801. if test "${with_lapack_includes+set}" = set; then
  1802. withval="$with_lapack_includes"
  1803. :
  1804. fi
  1805. # Check whether --with-lapack-libs or --without-lapack-libs was given.
  1806. if test "${with_lapack_libs+set}" = set; then
  1807. withval="$with_lapack_libs"
  1808. :
  1809. fi
  1810. # Check whether --with-cairo-includes or --without-cairo-includes was given.
  1811. if test "${with_cairo_includes+set}" = set; then
  1812. withval="$with_cairo_includes"
  1813. :
  1814. fi
  1815. # Check whether --with-cairo-libs or --without-cairo-libs was given.
  1816. if test "${with_cairo_libs+set}" = set; then
  1817. withval="$with_cairo_libs"
  1818. :
  1819. fi
  1820. # Check whether --with-cairo-ldflags or --without-cairo-ldflags was given.
  1821. if test "${with_cairo_ldflags+set}" = set; then
  1822. withval="$with_cairo_ldflags"
  1823. :
  1824. fi
  1825. # Check whether --with-freetype-includes or --without-freetype-includes was given.
  1826. if test "${with_freetype_includes+set}" = set; then
  1827. withval="$with_freetype_includes"
  1828. :
  1829. fi
  1830. # Check whether --with-freetype-libs or --without-freetype-libs was given.
  1831. if test "${with_freetype_libs+set}" = set; then
  1832. withval="$with_freetype_libs"
  1833. :
  1834. fi
  1835. # Check whether --with-proj-includes or --without-proj-includes was given.
  1836. if test "${with_proj_includes+set}" = set; then
  1837. withval="$with_proj_includes"
  1838. :
  1839. fi
  1840. # Check whether --with-proj-libs or --without-proj-libs was given.
  1841. if test "${with_proj_libs+set}" = set; then
  1842. withval="$with_proj_libs"
  1843. :
  1844. fi
  1845. # Check whether --with-proj-share or --without-proj-share was given.
  1846. if test "${with_proj_share+set}" = set; then
  1847. withval="$with_proj_share"
  1848. :
  1849. fi
  1850. # Check whether --with-opendwg-includes or --without-opendwg-includes was given.
  1851. if test "${with_opendwg_includes+set}" = set; then
  1852. withval="$with_opendwg_includes"
  1853. :
  1854. fi
  1855. # Check whether --with-opendwg-libs or --without-opendwg-libs was given.
  1856. if test "${with_opendwg_libs+set}" = set; then
  1857. withval="$with_opendwg_libs"
  1858. :
  1859. fi
  1860. # Check whether --with-regex-includes or --without-regex-includes was given.
  1861. if test "${with_regex_includes+set}" = set; then
  1862. withval="$with_regex_includes"
  1863. :
  1864. fi
  1865. # Check whether --with-regex-libs or --without-regex-libs was given.
  1866. if test "${with_regex_libs+set}" = set; then
  1867. withval="$with_regex_libs"
  1868. :
  1869. fi
  1870. # Check whether --with-pthread-includes or --without-pthread-includes was given.
  1871. if test "${with_pthread_includes+set}" = set; then
  1872. withval="$with_pthread_includes"
  1873. :
  1874. fi
  1875. # Check whether --with-pthread-libs or --without-pthread-libs was given.
  1876. if test "${with_pthread_libs+set}" = set; then
  1877. withval="$with_pthread_libs"
  1878. :
  1879. fi
  1880. # Check whether --with-openmp-includes or --without-openmp-includes was given.
  1881. if test "${with_openmp_includes+set}" = set; then
  1882. withval="$with_openmp_includes"
  1883. :
  1884. fi
  1885. # Check whether --with-openmp-libs or --without-openmp-libs was given.
  1886. if test "${with_openmp_libs+set}" = set; then
  1887. withval="$with_openmp_libs"
  1888. :
  1889. fi
  1890. # Check whether --with-opencl-includes or --without-opencl-includes was given.
  1891. if test "${with_opencl_includes+set}" = set; then
  1892. withval="$with_opencl_includes"
  1893. :
  1894. fi
  1895. # Check whether --with-opencl-libs or --without-opencl-libs was given.
  1896. if test "${with_opencl_libs+set}" = set; then
  1897. withval="$with_opencl_libs"
  1898. :
  1899. fi
  1900. #LOC_ARG_WITH_FRAMEWORK(opencl, OpenCL)
  1901. # Put this early on so CPPFLAGS and LDFLAGS have any additional dirs
  1902. # With includes option
  1903. # Handle Fortran compiler choice
  1904. #LOC_CHECK_USE(g77, GNU Fortran 77, USE_G77)
  1905. # Done checking fortran
  1906. echo $ac_n "checking for additional include dirs""... $ac_c" 1>&6
  1907. echo "configure:2394: checking for additional include dirs" >&5
  1908. case "$with_includes" in
  1909. y | ye | yes | n | no)
  1910. { echo "configure: error: *** You must supply a directory to list --with-includes." 1>&2; exit 1; }
  1911. ;;
  1912. esac
  1913. echo "$ac_t""$with_includes" 1>&6
  1914. if test -n "$with_includes"; then
  1915. for dir in $with_includes; do
  1916. if test -d "$dir"; then
  1917. INCLUDE_DIRS="$INCLUDE_DIRS -I$dir"
  1918. else
  1919. { echo "configure: error: *** Include directory $dir does not exist." 1>&2; exit 1; }
  1920. fi
  1921. done
  1922. CPPFLAGS="$CPPFLAGS $INCLUDE_DIRS"
  1923. fi
  1924. # With libs option
  1925. echo $ac_n "checking for additional library dirs""... $ac_c" 1>&6
  1926. echo "configure:2417: checking for additional library dirs" >&5
  1927. case "$with_libs" in
  1928. y | ye | yes | n | no)
  1929. { echo "configure: error: *** You must supply a directory list to --with-libs." 1>&2; exit 1; }
  1930. ;;
  1931. esac
  1932. echo "$ac_t""$with_libs" 1>&6
  1933. if test -n "$with_libs"; then
  1934. for dir in $with_libs; do
  1935. if test -d "$dir"; then
  1936. LIBRARY_DIRS="$LIBRARY_DIRS -L$dir"
  1937. else
  1938. { echo "configure: error: *** Library directory $dir does not exist." 1>&2; exit 1; }
  1939. fi
  1940. done
  1941. LDFLAGS="$LDFLAGS $LIBRARY_DIRS"
  1942. fi
  1943. # Programs and standard headers, libraries, functions
  1944. # Find a good install program. We prefer a C program (faster),
  1945. # so one script is as good as another. But avoid the broken or
  1946. # incompatible versions:
  1947. # SysV /etc/install, /usr/sbin/install
  1948. # SunOS /usr/etc/install
  1949. # IRIX /sbin/install
  1950. # AIX /bin/install
  1951. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  1952. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  1953. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  1954. # ./install, which can be erroneously created by make from ./install.sh.
  1955. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  1956. echo "configure:2451: checking for a BSD compatible install" >&5
  1957. if test -z "$INSTALL"; then
  1958. IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
  1959. for ac_dir in $PATH; do
  1960. # Account for people who put trailing slashes in PATH elements.
  1961. case "$ac_dir/" in
  1962. /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  1963. *)
  1964. # OSF1 and SCO ODT 3.0 have their own names for install.
  1965. # Don't use installbsd from OSF since it installs stuff as root
  1966. # by default.
  1967. for ac_prog in ginstall scoinst install; do
  1968. if test -f $ac_dir/$ac_prog; then
  1969. if test $ac_prog = install &&
  1970. grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1971. # AIX install. It has an incompatible calling convention.
  1972. :
  1973. else
  1974. ac_cv_path_install="$ac_dir/$ac_prog -c"
  1975. break 2
  1976. fi
  1977. fi
  1978. done
  1979. ;;
  1980. esac
  1981. done
  1982. IFS="$ac_save_IFS"
  1983. if test "${ac_cv_path_install+set}" = set; then
  1984. INSTALL="$ac_cv_path_install"
  1985. else
  1986. # As a last resort, use the slow shell script. We don't cache a
  1987. # path for INSTALL within a source directory, because that will
  1988. # break other packages using the cache if that directory is
  1989. # removed, or if the path is relative.
  1990. INSTALL="$ac_install_sh"
  1991. fi
  1992. fi
  1993. echo "$ac_t""$INSTALL" 1>&6
  1994. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1995. # It thinks the first close brace ends the variable substitution.
  1996. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1997. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  1998. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1999. # Extract the first word of "flex", so it can be a program name with args.
  2000. set dummy flex; ac_word=$2
  2001. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2002. echo "configure:2504: checking for $ac_word" >&5
  2003. if test -n "$LEX"; then
  2004. ac_cv_prog_LEX="$LEX" # Let the user override the test.
  2005. else
  2006. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2007. ac_dummy="$PATH"
  2008. for ac_dir in $ac_dummy; do
  2009. test -z "$ac_dir" && ac_dir=.
  2010. if test -f $ac_dir/$ac_word; then
  2011. ac_cv_prog_LEX="flex"
  2012. break
  2013. fi
  2014. done
  2015. IFS="$ac_save_ifs"
  2016. test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
  2017. fi
  2018. LEX="$ac_cv_prog_LEX"
  2019. if test -n "$LEX"; then
  2020. echo "$ac_t""$LEX" 1>&6
  2021. else
  2022. echo "$ac_t""no" 1>&6
  2023. fi
  2024. if test -z "$LEXLIB"
  2025. then
  2026. case "$LEX" in
  2027. flex*) ac_lib=fl ;;
  2028. *) ac_lib=l ;;
  2029. esac
  2030. echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
  2031. echo "configure:2535: checking for yywrap in -l$ac_lib" >&5
  2032. ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
  2033. ac_save_LIBS="$LIBS"
  2034. LIBS="-l$ac_lib $LIBS"
  2035. cat > conftest.$ac_ext <<EOF
  2036. #line 2541 "configure"
  2037. #include "confdefs.h"
  2038. /* Override any gcc2 internal prototype to avoid an error. */
  2039. /* We use char because int might match the return type of a gcc2
  2040. builtin and then its argument prototype would still apply. */
  2041. char yywrap();
  2042. int main() {
  2043. yywrap()
  2044. ; return 0; }
  2045. EOF
  2046. if { (eval echo configure:2552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2047. rm -rf conftest*
  2048. eval "ac_cv_lib_$ac_lib_var=yes"
  2049. else
  2050. echo "configure: failed program was:" >&5
  2051. cat conftest.$ac_ext >&5
  2052. rm -rf conftest*
  2053. eval "ac_cv_lib_$ac_lib_var=no"
  2054. fi
  2055. rm -f conftest*
  2056. LIBS="$ac_save_LIBS"
  2057. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2058. echo "$ac_t""yes" 1>&6
  2059. LEXLIB="-l$ac_lib"
  2060. else
  2061. echo "$ac_t""no" 1>&6
  2062. fi
  2063. fi
  2064. if test "$LEX" = "lex"; then
  2065. # Extract the first word of "lex", so it can be a program name with args.
  2066. set dummy lex; ac_word=$2
  2067. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2068. echo "configure:2577: checking for $ac_word" >&5
  2069. case "$LEXPATH" in
  2070. /*)
  2071. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a path.
  2072. ;;
  2073. ?:/*)
  2074. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a dos path.
  2075. ;;
  2076. *)
  2077. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2078. ac_dummy="$PATH"
  2079. for ac_dir in $ac_dummy; do
  2080. test -z "$ac_dir" && ac_dir=.
  2081. if test -f $ac_dir/$ac_word; then
  2082. ac_cv_path_LEXPATH="$ac_dir/$ac_word"
  2083. break
  2084. fi
  2085. done
  2086. IFS="$ac_save_ifs"
  2087. test -z "$ac_cv_path_LEXPATH" && ac_cv_path_LEXPATH="no"
  2088. ;;
  2089. esac
  2090. LEXPATH="$ac_cv_path_LEXPATH"
  2091. if test -n "$LEXPATH"; then
  2092. echo "$ac_t""$LEXPATH" 1>&6
  2093. else
  2094. echo "$ac_t""no" 1>&6
  2095. fi
  2096. if test "$LEXPATH" = "no"; then
  2097. { echo "configure: error: *** Unable to locate lex." 1>&2; exit 1; }
  2098. fi
  2099. fi
  2100. for ac_prog in 'bison -y' byacc
  2101. do
  2102. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2103. set dummy $ac_prog; ac_word=$2
  2104. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2105. echo "configure:2617: checking for $ac_word" >&5
  2106. if test -n "$YACC"; then
  2107. ac_cv_prog_YACC="$YACC" # Let the user override the test.
  2108. else
  2109. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2110. ac_dummy="$PATH"
  2111. for ac_dir in $ac_dummy; do
  2112. test -z "$ac_dir" && ac_dir=.
  2113. if test -f $ac_dir/$ac_word; then
  2114. ac_cv_prog_YACC="$ac_prog"
  2115. break
  2116. fi
  2117. done
  2118. IFS="$ac_save_ifs"
  2119. fi
  2120. YACC="$ac_cv_prog_YACC"
  2121. if test -n "$YACC"; then
  2122. echo "$ac_t""$YACC" 1>&6
  2123. else
  2124. echo "$ac_t""no" 1>&6
  2125. fi
  2126. test -n "$YACC" && break
  2127. done
  2128. test -n "$YACC" || YACC="yacc"
  2129. if test "$YACC" = "yacc"; then
  2130. # Extract the first word of "yacc", so it can be a program name with args.
  2131. set dummy yacc; ac_word=$2
  2132. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2133. echo "configure:2648: checking for $ac_word" >&5
  2134. case "$YACCPATH" in
  2135. /*)
  2136. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a path.
  2137. ;;
  2138. ?:/*)
  2139. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a dos path.
  2140. ;;
  2141. *)
  2142. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2143. ac_dummy="$PATH"
  2144. for ac_dir in $ac_dummy; do
  2145. test -z "$ac_dir" && ac_dir=.
  2146. if test -f $ac_dir/$ac_word; then
  2147. ac_cv_path_YACCPATH="$ac_dir/$ac_word"
  2148. break
  2149. fi
  2150. done
  2151. IFS="$ac_save_ifs"
  2152. test -z "$ac_cv_path_YACCPATH" && ac_cv_path_YACCPATH="no"
  2153. ;;
  2154. esac
  2155. YACCPATH="$ac_cv_path_YACCPATH"
  2156. if test -n "$YACCPATH"; then
  2157. echo "$ac_t""$YACCPATH" 1>&6
  2158. else
  2159. echo "$ac_t""no" 1>&6
  2160. fi
  2161. if test "$YACCPATH" = "no"; then
  2162. { echo "configure: error: *** Unable to locate yacc." 1>&2; exit 1; }
  2163. fi
  2164. fi
  2165. # Extract the first word of "ranlib", so it can be a program name with args.
  2166. set dummy ranlib; ac_word=$2
  2167. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2168. echo "configure:2686: checking for $ac_word" >&5
  2169. if test -n "$RANLIB"; then
  2170. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  2171. else
  2172. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2173. ac_dummy="$PATH"
  2174. for ac_dir in $ac_dummy; do
  2175. test -z "$ac_dir" && ac_dir=.
  2176. if test -f $ac_dir/$ac_word; then
  2177. ac_cv_prog_RANLIB="ranlib"
  2178. break
  2179. fi
  2180. done
  2181. IFS="$ac_save_ifs"
  2182. test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  2183. fi
  2184. RANLIB="$ac_cv_prog_RANLIB"
  2185. if test -n "$RANLIB"; then
  2186. echo "$ac_t""$RANLIB" 1>&6
  2187. else
  2188. echo "$ac_t""no" 1>&6
  2189. fi
  2190. for ac_prog in ar
  2191. do
  2192. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2193. set dummy $ac_prog; ac_word=$2
  2194. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2195. echo "configure:2715: checking for $ac_word" >&5
  2196. if test -n "$AR"; then
  2197. ac_cv_prog_AR="$AR" # Let the user override the test.
  2198. else
  2199. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2200. ac_dummy="$PATH"
  2201. for ac_dir in $ac_dummy; do
  2202. test -z "$ac_dir" && ac_dir=.
  2203. if test -f $ac_dir/$ac_word; then
  2204. ac_cv_prog_AR="$ac_prog"
  2205. break
  2206. fi
  2207. done
  2208. IFS="$ac_save_ifs"
  2209. fi
  2210. AR="$ac_cv_prog_AR"
  2211. if test -n "$AR"; then
  2212. echo "$ac_t""$AR" 1>&6
  2213. else
  2214. echo "$ac_t""no" 1>&6
  2215. fi
  2216. test -n "$AR" && break
  2217. done
  2218. for ac_prog in env
  2219. do
  2220. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2221. set dummy $ac_prog; ac_word=$2
  2222. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2223. echo "configure:2746: checking for $ac_word" >&5
  2224. if test -n "$ENV"; then
  2225. ac_cv_prog_ENV="$ENV" # Let the user override the test.
  2226. else
  2227. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2228. ac_dummy="$PATH"
  2229. for ac_dir in $ac_dummy; do
  2230. test -z "$ac_dir" && ac_dir=.
  2231. if test -f $ac_dir/$ac_word; then
  2232. ac_cv_prog_ENV="$ac_prog"
  2233. break
  2234. fi
  2235. done
  2236. IFS="$ac_save_ifs"
  2237. fi
  2238. ENV="$ac_cv_prog_ENV"
  2239. if test -n "$ENV"; then
  2240. echo "$ac_t""$ENV" 1>&6
  2241. else
  2242. echo "$ac_t""no" 1>&6
  2243. fi
  2244. test -n "$ENV" && break
  2245. done
  2246. # Extract the first word of "perl", so it can be a program name with args.
  2247. set dummy perl; ac_word=$2
  2248. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2249. echo "configure:2775: checking for $ac_word" >&5
  2250. case "$PERL" in
  2251. /*)
  2252. ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  2253. ;;
  2254. ?:/*)
  2255. ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
  2256. ;;
  2257. *)
  2258. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2259. ac_dummy="$PATH"
  2260. for ac_dir in $ac_dummy; do
  2261. test -z "$ac_dir" && ac_dir=.
  2262. if test -f $ac_dir/$ac_word; then
  2263. ac_cv_path_PERL="$ac_dir/$ac_word"
  2264. break
  2265. fi
  2266. done
  2267. IFS="$ac_save_ifs"
  2268. test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
  2269. ;;
  2270. esac
  2271. PERL="$ac_cv_path_PERL"
  2272. if test -n "$PERL"; then
  2273. echo "$ac_t""$PERL" 1>&6
  2274. else
  2275. echo "$ac_t""no" 1>&6
  2276. fi
  2277. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  2278. echo "configure:2806: checking how to run the C preprocessor" >&5
  2279. # On Suns, sometimes $CPP names a directory.
  2280. if test -n "$CPP" && test -d "$CPP"; then
  2281. CPP=
  2282. fi
  2283. if test -z "$CPP"; then
  2284. # This must be in double quotes, not single quotes, because CPP may get
  2285. # substituted into the Makefile and "${CC-cc}" will confuse make.
  2286. CPP="${CC-cc} -E"
  2287. # On the NeXT, cc -E runs the code through the compiler's parser,
  2288. # not just through cpp.
  2289. cat > conftest.$ac_ext <<EOF
  2290. #line 2819 "configure"
  2291. #include "confdefs.h"
  2292. #include <assert.h>
  2293. Syntax Error
  2294. EOF
  2295. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2296. { (eval echo configure:2825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2297. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2298. if test -z "$ac_err"; then
  2299. :
  2300. else
  2301. echo "$ac_err" >&5
  2302. echo "configure: failed program was:" >&5
  2303. cat conftest.$ac_ext >&5
  2304. rm -rf conftest*
  2305. CPP="${CC-cc} -E -traditional-cpp"
  2306. cat > conftest.$ac_ext <<EOF
  2307. #line 2836 "configure"
  2308. #include "confdefs.h"
  2309. #include <assert.h>
  2310. Syntax Error
  2311. EOF
  2312. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2313. { (eval echo configure:2842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2314. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2315. if test -z "$ac_err"; then
  2316. :
  2317. else
  2318. echo "$ac_err" >&5
  2319. echo "configure: failed program was:" >&5
  2320. cat conftest.$ac_ext >&5
  2321. rm -rf conftest*
  2322. CPP="${CC-cc} -nologo -E"
  2323. cat > conftest.$ac_ext <<EOF
  2324. #line 2853 "configure"
  2325. #include "confdefs.h"
  2326. #include <assert.h>
  2327. Syntax Error
  2328. EOF
  2329. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2330. { (eval echo configure:2859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2331. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2332. if test -z "$ac_err"; then
  2333. :
  2334. else
  2335. echo "$ac_err" >&5
  2336. echo "configure: failed program was:" >&5
  2337. cat conftest.$ac_ext >&5
  2338. rm -rf conftest*
  2339. CPP=/lib/cpp
  2340. fi
  2341. rm -f conftest*
  2342. fi
  2343. rm -f conftest*
  2344. fi
  2345. rm -f conftest*
  2346. ac_cv_prog_CPP="$CPP"
  2347. CPP="$ac_cv_prog_CPP"
  2348. else
  2349. ac_cv_prog_CPP="$CPP"
  2350. fi
  2351. echo "$ac_t""$CPP" 1>&6
  2352. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  2353. echo "configure:2883: checking for ANSI C header files" >&5
  2354. cat > conftest.$ac_ext <<EOF
  2355. #line 2886 "configure"
  2356. #include "confdefs.h"
  2357. #include <stdlib.h>
  2358. #include <stdarg.h>
  2359. #include <string.h>
  2360. #include <float.h>
  2361. EOF
  2362. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2363. { (eval echo configure:2894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2364. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2365. if test -z "$ac_err"; then
  2366. rm -rf conftest*
  2367. ac_cv_header_stdc=yes
  2368. else
  2369. echo "$ac_err" >&5
  2370. echo "configure: failed program was:" >&5
  2371. cat conftest.$ac_ext >&5
  2372. rm -rf conftest*
  2373. ac_cv_header_stdc=no
  2374. fi
  2375. rm -f conftest*
  2376. if test $ac_cv_header_stdc = yes; then
  2377. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  2378. cat > conftest.$ac_ext <<EOF
  2379. #line 2911 "configure"
  2380. #include "confdefs.h"
  2381. #include <string.h>
  2382. EOF
  2383. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2384. egrep "memchr" >/dev/null 2>&1; then
  2385. :
  2386. else
  2387. rm -rf conftest*
  2388. ac_cv_header_stdc=no
  2389. fi
  2390. rm -f conftest*
  2391. fi
  2392. if test $ac_cv_header_stdc = yes; then
  2393. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  2394. cat > conftest.$ac_ext <<EOF
  2395. #line 2929 "configure"
  2396. #include "confdefs.h"
  2397. #include <stdlib.h>
  2398. EOF
  2399. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2400. egrep "free" >/dev/null 2>&1; then
  2401. :
  2402. else
  2403. rm -rf conftest*
  2404. ac_cv_header_stdc=no
  2405. fi
  2406. rm -f conftest*
  2407. fi
  2408. if test $ac_cv_header_stdc = yes; then
  2409. # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  2410. if test "$cross_compiling" = yes; then
  2411. :
  2412. else
  2413. cat > conftest.$ac_ext <<EOF
  2414. #line 2950 "configure"
  2415. #include "confdefs.h"
  2416. #include <ctype.h>
  2417. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  2418. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  2419. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  2420. int main () { int i; for (i = 0; i < 256; i++)
  2421. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  2422. exit (0); }
  2423. EOF
  2424. if { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2425. then
  2426. :
  2427. else
  2428. echo "configure: failed program was:" >&5
  2429. cat conftest.$ac_ext >&5
  2430. rm -fr conftest*
  2431. ac_cv_header_stdc=no
  2432. fi
  2433. rm -fr conftest*
  2434. fi
  2435. fi
  2436. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  2437. if test $ac_cv_header_stdc = yes; then
  2438. cat >> confdefs.h <<\EOF
  2439. #define STDC_HEADERS 1
  2440. EOF
  2441. fi
  2442. #AC_CHECK_HEADERS(curses.h limits.h termio.h termios.h unistd.h values.h)
  2443. for ac_hdr in limits.h termio.h termios.h unistd.h values.h f2c.h g2c.h
  2444. do
  2445. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2446. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2447. echo "configure:2988: checking for $ac_hdr" >&5
  2448. cat > conftest.$ac_ext <<EOF
  2449. #line 2991 "configure"
  2450. #include "confdefs.h"
  2451. #include <$ac_hdr>
  2452. EOF
  2453. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2454. { (eval echo configure:2996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2455. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2456. if test -z "$ac_err"; then
  2457. rm -rf conftest*
  2458. eval "ac_cv_header_$ac_safe=yes"
  2459. else
  2460. echo "$ac_err" >&5
  2461. echo "configure: failed program was:" >&5
  2462. cat conftest.$ac_ext >&5
  2463. rm -rf conftest*
  2464. eval "ac_cv_header_$ac_safe=no"
  2465. fi
  2466. rm -f conftest*
  2467. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2468. echo "$ac_t""yes" 1>&6
  2469. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2470. cat >> confdefs.h <<EOF
  2471. #define $ac_tr_hdr 1
  2472. EOF
  2473. else
  2474. echo "$ac_t""no" 1>&6
  2475. fi
  2476. done
  2477. for ac_hdr in sys/ioctl.h sys/mtio.h sys/resource.h sys/time.h
  2478. do
  2479. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2480. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2481. echo "configure:3025: checking for $ac_hdr" >&5
  2482. cat > conftest.$ac_ext <<EOF
  2483. #line 3028 "configure"
  2484. #include "confdefs.h"
  2485. #include <$ac_hdr>
  2486. EOF
  2487. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2488. { (eval echo configure:3033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2489. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2490. if test -z "$ac_err"; then
  2491. rm -rf conftest*
  2492. eval "ac_cv_header_$ac_safe=yes"
  2493. else
  2494. echo "$ac_err" >&5
  2495. echo "configure: failed program was:" >&5
  2496. cat conftest.$ac_ext >&5
  2497. rm -rf conftest*
  2498. eval "ac_cv_header_$ac_safe=no"
  2499. fi
  2500. rm -f conftest*
  2501. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2502. echo "$ac_t""yes" 1>&6
  2503. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2504. cat >> confdefs.h <<EOF
  2505. #define $ac_tr_hdr 1
  2506. EOF
  2507. else
  2508. echo "$ac_t""no" 1>&6
  2509. fi
  2510. done
  2511. for ac_hdr in sys/timeb.h sys/types.h sys/utsname.h
  2512. do
  2513. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2514. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2515. echo "configure:3062: checking for $ac_hdr" >&5
  2516. cat > conftest.$ac_ext <<EOF
  2517. #line 3065 "configure"
  2518. #include "confdefs.h"
  2519. #include <$ac_hdr>
  2520. EOF
  2521. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2522. { (eval echo configure:3070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2523. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2524. if test -z "$ac_err"; then
  2525. rm -rf conftest*
  2526. eval "ac_cv_header_$ac_safe=yes"
  2527. else
  2528. echo "$ac_err" >&5
  2529. echo "configure: failed program was:" >&5
  2530. cat conftest.$ac_ext >&5
  2531. rm -rf conftest*
  2532. eval "ac_cv_header_$ac_safe=no"
  2533. fi
  2534. rm -f conftest*
  2535. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2536. echo "$ac_t""yes" 1>&6
  2537. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2538. cat >> confdefs.h <<EOF
  2539. #define $ac_tr_hdr 1
  2540. EOF
  2541. else
  2542. echo "$ac_t""no" 1>&6
  2543. fi
  2544. done
  2545. for ac_hdr in libintl.h iconv.h
  2546. do
  2547. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2548. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2549. echo "configure:3099: checking for $ac_hdr" >&5
  2550. cat > conftest.$ac_ext <<EOF
  2551. #line 3102 "configure"
  2552. #include "confdefs.h"
  2553. #include <$ac_hdr>
  2554. EOF
  2555. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2556. { (eval echo configure:3107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2557. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2558. if test -z "$ac_err"; then
  2559. rm -rf conftest*
  2560. eval "ac_cv_header_$ac_safe=yes"
  2561. else
  2562. echo "$ac_err" >&5
  2563. echo "configure: failed program was:" >&5
  2564. cat conftest.$ac_ext >&5
  2565. rm -rf conftest*
  2566. eval "ac_cv_header_$ac_safe=no"
  2567. fi
  2568. rm -f conftest*
  2569. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2570. echo "$ac_t""yes" 1>&6
  2571. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2572. cat >> confdefs.h <<EOF
  2573. #define $ac_tr_hdr 1
  2574. EOF
  2575. else
  2576. echo "$ac_t""no" 1>&6
  2577. fi
  2578. done
  2579. for ac_hdr in langinfo.h
  2580. do
  2581. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2582. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2583. echo "configure:3136: checking for $ac_hdr" >&5
  2584. cat > conftest.$ac_ext <<EOF
  2585. #line 3139 "configure"
  2586. #include "confdefs.h"
  2587. #include <$ac_hdr>
  2588. EOF
  2589. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2590. { (eval echo configure:3144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2591. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2592. if test -z "$ac_err"; then
  2593. rm -rf conftest*
  2594. eval "ac_cv_header_$ac_safe=yes"
  2595. else
  2596. echo "$ac_err" >&5
  2597. echo "configure: failed program was:" >&5
  2598. cat conftest.$ac_ext >&5
  2599. rm -rf conftest*
  2600. eval "ac_cv_header_$ac_safe=no"
  2601. fi
  2602. rm -f conftest*
  2603. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2604. echo "$ac_t""yes" 1>&6
  2605. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2606. cat >> confdefs.h <<EOF
  2607. #define $ac_tr_hdr 1
  2608. EOF
  2609. else
  2610. echo "$ac_t""no" 1>&6
  2611. fi
  2612. done
  2613. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  2614. echo "configure:3170: checking whether time.h and sys/time.h may both be included" >&5
  2615. cat > conftest.$ac_ext <<EOF
  2616. #line 3173 "configure"
  2617. #include "confdefs.h"
  2618. #include <sys/types.h>
  2619. #include <sys/time.h>
  2620. #include <time.h>
  2621. int main() {
  2622. struct tm *tp;
  2623. ; return 0; }
  2624. EOF
  2625. if { (eval echo configure:3182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2626. rm -rf conftest*
  2627. ac_cv_header_time=yes
  2628. else
  2629. echo "configure: failed program was:" >&5
  2630. cat conftest.$ac_ext >&5
  2631. rm -rf conftest*
  2632. ac_cv_header_time=no
  2633. fi
  2634. rm -f conftest*
  2635. echo "$ac_t""$ac_cv_header_time" 1>&6
  2636. if test $ac_cv_header_time = yes; then
  2637. cat >> confdefs.h <<\EOF
  2638. #define TIME_WITH_SYS_TIME 1
  2639. EOF
  2640. fi
  2641. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  2642. echo "configure:3202: checking for off_t" >&5
  2643. cat > conftest.$ac_ext <<EOF
  2644. #line 3205 "configure"
  2645. #include "confdefs.h"
  2646. #include <sys/types.h>
  2647. #if STDC_HEADERS
  2648. #include <stdlib.h>
  2649. #include <stddef.h>
  2650. #endif
  2651. EOF
  2652. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2653. egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2654. rm -rf conftest*
  2655. ac_cv_type_off_t=yes
  2656. else
  2657. rm -rf conftest*
  2658. ac_cv_type_off_t=no
  2659. fi
  2660. rm -f conftest*
  2661. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  2662. if test $ac_cv_type_off_t = no; then
  2663. cat >> confdefs.h <<\EOF
  2664. #define off_t long
  2665. EOF
  2666. fi
  2667. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  2668. echo "configure:3232: checking for uid_t in sys/types.h" >&5
  2669. cat > conftest.$ac_ext <<EOF
  2670. #line 3235 "configure"
  2671. #include "confdefs.h"
  2672. #include <sys/types.h>
  2673. EOF
  2674. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2675. egrep "uid_t" >/dev/null 2>&1; then
  2676. rm -rf conftest*
  2677. ac_cv_type_uid_t=yes
  2678. else
  2679. rm -rf conftest*
  2680. ac_cv_type_uid_t=no
  2681. fi
  2682. rm -f conftest*
  2683. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  2684. if test $ac_cv_type_uid_t = no; then
  2685. cat >> confdefs.h <<\EOF
  2686. #define uid_t int
  2687. EOF
  2688. cat >> confdefs.h <<\EOF
  2689. #define gid_t int
  2690. EOF
  2691. fi
  2692. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  2693. echo "configure:3263: checking return type of signal handlers" >&5
  2694. cat > conftest.$ac_ext <<EOF
  2695. #line 3266 "configure"
  2696. #include "confdefs.h"
  2697. #include <sys/types.h>
  2698. #include <signal.h>
  2699. #ifdef signal
  2700. #undef signal
  2701. #endif
  2702. #ifdef __cplusplus
  2703. extern "C" void (*signal (int, void (*)(int)))(int);
  2704. #else
  2705. void (*signal ()) ();
  2706. #endif
  2707. int main() {
  2708. int i;
  2709. ; return 0; }
  2710. EOF
  2711. if { (eval echo configure:3283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2712. rm -rf conftest*
  2713. ac_cv_type_signal=void
  2714. else
  2715. echo "configure: failed program was:" >&5
  2716. cat conftest.$ac_ext >&5
  2717. rm -rf conftest*
  2718. ac_cv_type_signal=int
  2719. fi
  2720. rm -f conftest*
  2721. echo "$ac_t""$ac_cv_type_signal" 1>&6
  2722. cat >> confdefs.h <<EOF
  2723. #define RETSIGTYPE $ac_cv_type_signal
  2724. EOF
  2725. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  2726. echo "configure:3301: checking for Cygwin environment" >&5
  2727. cat > conftest.$ac_ext <<EOF
  2728. #line 3304 "configure"
  2729. #include "confdefs.h"
  2730. int main() {
  2731. #ifndef __CYGWIN__
  2732. #define __CYGWIN__ __CYGWIN32__
  2733. #endif
  2734. return __CYGWIN__;
  2735. ; return 0; }
  2736. EOF
  2737. if { (eval echo configure:3315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2738. rm -rf conftest*
  2739. ac_cv_cygwin=yes
  2740. else
  2741. echo "configure: failed program was:" >&5
  2742. cat conftest.$ac_ext >&5
  2743. rm -rf conftest*
  2744. ac_cv_cygwin=no
  2745. fi
  2746. rm -f conftest*
  2747. rm -f conftest*
  2748. echo "$ac_t""$ac_cv_cygwin" 1>&6
  2749. CYGWIN=
  2750. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  2751. for ac_func in ftime gethostname gettimeofday lseek nice time uname
  2752. do
  2753. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2754. echo "configure:3333: checking for $ac_func" >&5
  2755. cat > conftest.$ac_ext <<EOF
  2756. #line 3336 "configure"
  2757. #include "confdefs.h"
  2758. /* System header to define __stub macros and hopefully few prototypes,
  2759. which can conflict with char $ac_func(); below. */
  2760. #include <assert.h>
  2761. /* Override any gcc2 internal prototype to avoid an error. */
  2762. /* We use char because int might match the return type of a gcc2
  2763. builtin and then its argument prototype would still apply. */
  2764. char $ac_func();
  2765. int main() {
  2766. /* The GNU C library defines this for functions which it implements
  2767. to always fail with ENOSYS. Some functions are actually named
  2768. something starting with __ and the normal name is an alias. */
  2769. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2770. choke me
  2771. #else
  2772. $ac_func();
  2773. #endif
  2774. ; return 0; }
  2775. EOF
  2776. if { (eval echo configure:3359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2777. rm -rf conftest*
  2778. eval "ac_cv_func_$ac_func=yes"
  2779. else
  2780. echo "configure: failed program was:" >&5
  2781. cat conftest.$ac_ext >&5
  2782. rm -rf conftest*
  2783. eval "ac_cv_func_$ac_func=no"
  2784. fi
  2785. rm -f conftest*
  2786. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2787. echo "$ac_t""yes" 1>&6
  2788. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2789. cat >> confdefs.h <<EOF
  2790. #define $ac_tr_func 1
  2791. EOF
  2792. else
  2793. echo "$ac_t""no" 1>&6
  2794. fi
  2795. done
  2796. for ac_func in seteuid setpriority setreuid setruid
  2797. do
  2798. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2799. echo "configure:3385: checking for $ac_func" >&5
  2800. cat > conftest.$ac_ext <<EOF
  2801. #line 3388 "configure"
  2802. #include "confdefs.h"
  2803. /* System header to define __stub macros and hopefully few prototypes,
  2804. which can conflict with char $ac_func(); below. */
  2805. #include <assert.h>
  2806. /* Override any gcc2 internal prototype to avoid an error. */
  2807. /* We use char because int might match the return type of a gcc2
  2808. builtin and then its argument prototype would still apply. */
  2809. char $ac_func();
  2810. int main() {
  2811. /* The GNU C library defines this for functions which it implements
  2812. to always fail with ENOSYS. Some functions are actually named
  2813. something starting with __ and the normal name is an alias. */
  2814. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2815. choke me
  2816. #else
  2817. $ac_func();
  2818. #endif
  2819. ; return 0; }
  2820. EOF
  2821. if { (eval echo configure:3411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2822. rm -rf conftest*
  2823. eval "ac_cv_func_$ac_func=yes"
  2824. else
  2825. echo "configure: failed program was:" >&5
  2826. cat conftest.$ac_ext >&5
  2827. rm -rf conftest*
  2828. eval "ac_cv_func_$ac_func=no"
  2829. fi
  2830. rm -f conftest*
  2831. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2832. echo "$ac_t""yes" 1>&6
  2833. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2834. cat >> confdefs.h <<EOF
  2835. #define $ac_tr_func 1
  2836. EOF
  2837. else
  2838. echo "$ac_t""no" 1>&6
  2839. fi
  2840. done
  2841. for ac_func in drand48
  2842. do
  2843. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2844. echo "configure:3437: checking for $ac_func" >&5
  2845. cat > conftest.$ac_ext <<EOF
  2846. #line 3440 "configure"
  2847. #include "confdefs.h"
  2848. /* System header to define __stub macros and hopefully few prototypes,
  2849. which can conflict with char $ac_func(); below. */
  2850. #include <assert.h>
  2851. /* Override any gcc2 internal prototype to avoid an error. */
  2852. /* We use char because int might match the return type of a gcc2
  2853. builtin and then its argument prototype would still apply. */
  2854. char $ac_func();
  2855. int main() {
  2856. /* The GNU C library defines this for functions which it implements
  2857. to always fail with ENOSYS. Some functions are actually named
  2858. something starting with __ and the normal name is an alias. */
  2859. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2860. choke me
  2861. #else
  2862. $ac_func();
  2863. #endif
  2864. ; return 0; }
  2865. EOF
  2866. if { (eval echo configure:3463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2867. rm -rf conftest*
  2868. eval "ac_cv_func_$ac_func=yes"
  2869. else
  2870. echo "configure: failed program was:" >&5
  2871. cat conftest.$ac_ext >&5
  2872. rm -rf conftest*
  2873. eval "ac_cv_func_$ac_func=no"
  2874. fi
  2875. rm -f conftest*
  2876. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2877. echo "$ac_t""yes" 1>&6
  2878. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2879. cat >> confdefs.h <<EOF
  2880. #define $ac_tr_func 1
  2881. EOF
  2882. else
  2883. echo "$ac_t""no" 1>&6
  2884. fi
  2885. done
  2886. for ac_func in putenv setenv
  2887. do
  2888. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2889. echo "configure:3489: checking for $ac_func" >&5
  2890. cat > conftest.$ac_ext <<EOF
  2891. #line 3492 "configure"
  2892. #include "confdefs.h"
  2893. /* System header to define __stub macros and hopefully few prototypes,
  2894. which can conflict with char $ac_func(); below. */
  2895. #include <assert.h>
  2896. /* Override any gcc2 internal prototype to avoid an error. */
  2897. /* We use char because int might match the return type of a gcc2
  2898. builtin and then its argument prototype would still apply. */
  2899. char $ac_func();
  2900. int main() {
  2901. /* The GNU C library defines this for functions which it implements
  2902. to always fail with ENOSYS. Some functions are actually named
  2903. something starting with __ and the normal name is an alias. */
  2904. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2905. choke me
  2906. #else
  2907. $ac_func();
  2908. #endif
  2909. ; return 0; }
  2910. EOF
  2911. if { (eval echo configure:3515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2912. rm -rf conftest*
  2913. eval "ac_cv_func_$ac_func=yes"
  2914. else
  2915. echo "configure: failed program was:" >&5
  2916. cat conftest.$ac_ext >&5
  2917. rm -rf conftest*
  2918. eval "ac_cv_func_$ac_func=no"
  2919. fi
  2920. rm -f conftest*
  2921. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2922. echo "$ac_t""yes" 1>&6
  2923. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2924. cat >> confdefs.h <<EOF
  2925. #define $ac_tr_func 1
  2926. EOF
  2927. else
  2928. echo "$ac_t""no" 1>&6
  2929. fi
  2930. done
  2931. for ac_func in nanosleep
  2932. do
  2933. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2934. echo "configure:3541: checking for $ac_func" >&5
  2935. cat > conftest.$ac_ext <<EOF
  2936. #line 3544 "configure"
  2937. #include "confdefs.h"
  2938. /* System header to define __stub macros and hopefully few prototypes,
  2939. which can conflict with char $ac_func(); below. */
  2940. #include <assert.h>
  2941. /* Override any gcc2 internal prototype to avoid an error. */
  2942. /* We use char because int might match the return type of a gcc2
  2943. builtin and then its argument prototype would still apply. */
  2944. char $ac_func();
  2945. int main() {
  2946. /* The GNU C library defines this for functions which it implements
  2947. to always fail with ENOSYS. Some functions are actually named
  2948. something starting with __ and the normal name is an alias. */
  2949. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2950. choke me
  2951. #else
  2952. $ac_func();
  2953. #endif
  2954. ; return 0; }
  2955. EOF
  2956. if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2957. rm -rf conftest*
  2958. eval "ac_cv_func_$ac_func=yes"
  2959. else
  2960. echo "configure: failed program was:" >&5
  2961. cat conftest.$ac_ext >&5
  2962. rm -rf conftest*
  2963. eval "ac_cv_func_$ac_func=no"
  2964. fi
  2965. rm -f conftest*
  2966. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2967. echo "$ac_t""yes" 1>&6
  2968. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2969. cat >> confdefs.h <<EOF
  2970. #define $ac_tr_func 1
  2971. EOF
  2972. else
  2973. echo "$ac_t""no" 1>&6
  2974. fi
  2975. done
  2976. if test "$cross_compiling" != "yes" ; then
  2977. echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
  2978. echo "configure:3592: checking whether setpgrp takes no argument" >&5
  2979. if test "$cross_compiling" = yes; then
  2980. { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
  2981. else
  2982. cat > conftest.$ac_ext <<EOF
  2983. #line 3598 "configure"
  2984. #include "confdefs.h"
  2985. #ifdef HAVE_UNISTD_H
  2986. #include <unistd.h>
  2987. #endif
  2988. /*
  2989. * If this system has a BSD-style setpgrp, which takes arguments, exit
  2990. * successfully.
  2991. */
  2992. main()
  2993. {
  2994. if (setpgrp(1,1) == -1)
  2995. exit(0);
  2996. else
  2997. exit(1);
  2998. }
  2999. EOF
  3000. if { (eval echo configure:3618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  3001. then
  3002. ac_cv_func_setpgrp_void=no
  3003. else
  3004. echo "configure: failed program was:" >&5
  3005. cat conftest.$ac_ext >&5
  3006. rm -fr conftest*
  3007. ac_cv_func_setpgrp_void=yes
  3008. fi
  3009. rm -fr conftest*
  3010. fi
  3011. echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
  3012. if test $ac_cv_func_setpgrp_void = yes; then
  3013. cat >> confdefs.h <<\EOF
  3014. #define SETPGRP_VOID 1
  3015. EOF
  3016. fi
  3017. else
  3018. CROSS_COMPILING=1
  3019. fi
  3020. echo $ac_n "checking for long long int""... $ac_c" 1>&6
  3021. echo "configure:3646: checking for long long int" >&5
  3022. cat > conftest.$ac_ext <<EOF
  3023. #line 3648 "configure"
  3024. #include "confdefs.h"
  3025. int main() {
  3026. long long int x;
  3027. ; return 0; }
  3028. EOF
  3029. if { (eval echo configure:3655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3030. rm -rf conftest*
  3031. echo "$ac_t""yes" 1>&6
  3032. cat >> confdefs.h <<\EOF
  3033. #define HAVE_LONG_LONG_INT 1
  3034. EOF
  3035. else
  3036. echo "configure: failed program was:" >&5
  3037. cat conftest.$ac_ext >&5
  3038. rm -rf conftest*
  3039. echo "$ac_t""no" 1>&6
  3040. fi
  3041. rm -f conftest*
  3042. echo $ac_n "checking for int64_t""... $ac_c" 1>&6
  3043. echo "configure:3675: checking for int64_t" >&5
  3044. cat > conftest.$ac_ext <<EOF
  3045. #line 3677 "configure"
  3046. #include "confdefs.h"
  3047. #include <sys/types.h>
  3048. int main() {
  3049. int64_t x;
  3050. ; return 0; }
  3051. EOF
  3052. if { (eval echo configure:3684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3053. rm -rf conftest*
  3054. echo "$ac_t""yes" 1>&6
  3055. cat >> confdefs.h <<\EOF
  3056. #define HAVE_INT64_T 1
  3057. EOF
  3058. else
  3059. echo "configure: failed program was:" >&5
  3060. cat conftest.$ac_ext >&5
  3061. rm -rf conftest*
  3062. echo "$ac_t""no" 1>&6
  3063. fi
  3064. rm -f conftest*
  3065. echo $ac_n "checking for W11""... $ac_c" 1>&6
  3066. echo "configure:3704: checking for W11" >&5
  3067. case "$enable_w11" in
  3068. yes|no) echo "$ac_t"""$enable_w11"" 1>&6 ;;
  3069. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  3070. esac
  3071. USE_X11=
  3072. USE_W11=
  3073. XLIB=
  3074. XTLIB=
  3075. if test "$enable_w11" = "yes" ; then
  3076. X_CFLAGS=-I${SRCDIR}/display/drivers/windows/libW11
  3077. X_LIBS='-L$(LIBDIR)'
  3078. USE_W11="1"
  3079. USE_X11="1"
  3080. XLIB=-lX11
  3081. CFLAGS="$CFLAGS -D__W98__"
  3082. else
  3083. # If we find X, set shell vars x_includes and x_libraries to the
  3084. # paths, otherwise set no_x=yes.
  3085. # Uses ac_ vars as temps to allow command line to override cache and checks.
  3086. # --without-x overrides everything else, but does not touch the cache.
  3087. echo $ac_n "checking for X""... $ac_c" 1>&6
  3088. echo "configure:3732: checking for X" >&5
  3089. # Check whether --with-x or --without-x was given.
  3090. if test "${with_x+set}" = set; then
  3091. withval="$with_x"
  3092. :
  3093. fi
  3094. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  3095. if test "x$with_x" = xno; then
  3096. # The user explicitly disabled X.
  3097. have_x=disabled
  3098. else
  3099. if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  3100. # Both variables are already set.
  3101. have_x=yes
  3102. else
  3103. # One or both of the vars are not set, and there is no cached value.
  3104. ac_x_includes=NO ac_x_libraries=NO
  3105. rm -fr conftestdir
  3106. if mkdir conftestdir; then
  3107. cd conftestdir
  3108. # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  3109. cat > Imakefile <<'EOF'
  3110. acfindx:
  3111. @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  3112. EOF
  3113. if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  3114. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  3115. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  3116. # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  3117. for ac_extension in a so sl; do
  3118. if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  3119. test -f $ac_im_libdir/libX11.$ac_extension; then
  3120. ac_im_usrlibdir=$ac_im_libdir; break
  3121. fi
  3122. done
  3123. # Screen out bogus values from the imake configuration. They are
  3124. # bogus both because they are the default anyway, and because
  3125. # using them would break gcc on systems where it needs fixed includes.
  3126. case "$ac_im_incroot" in
  3127. /usr/include) ;;
  3128. *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  3129. esac
  3130. case "$ac_im_usrlibdir" in
  3131. /usr/lib | /lib) ;;
  3132. *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  3133. esac
  3134. fi
  3135. cd ..
  3136. rm -fr conftestdir
  3137. fi
  3138. if test "$ac_x_includes" = NO; then
  3139. # Guess where to find include files, by looking for this one X11 .h file.
  3140. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  3141. # First, try using that file with no special directory specified.
  3142. cat > conftest.$ac_ext <<EOF
  3143. #line 3792 "configure"
  3144. #include "confdefs.h"
  3145. #include <$x_direct_test_include>
  3146. EOF
  3147. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3148. { (eval echo configure:3797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3149. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3150. if test -z "$ac_err"; then
  3151. rm -rf conftest*
  3152. # We can compile using X headers with no special include directory.
  3153. ac_x_includes=
  3154. else
  3155. echo "$ac_err" >&5
  3156. echo "configure: failed program was:" >&5
  3157. cat conftest.$ac_ext >&5
  3158. rm -rf conftest*
  3159. # Look for the header file in a standard set of common directories.
  3160. # Check X11 before X11Rn because it is often a symlink to the current release.
  3161. for ac_dir in \
  3162. /usr/X11/include \
  3163. /usr/X11R6/include \
  3164. /usr/X11R5/include \
  3165. /usr/X11R4/include \
  3166. \
  3167. /usr/include/X11 \
  3168. /usr/include/X11R6 \
  3169. /usr/include/X11R5 \
  3170. /usr/include/X11R4 \
  3171. \
  3172. /usr/local/X11/include \
  3173. /usr/local/X11R6/include \
  3174. /usr/local/X11R5/include \
  3175. /usr/local/X11R4/include \
  3176. \
  3177. /usr/local/include/X11 \
  3178. /usr/local/include/X11R6 \
  3179. /usr/local/include/X11R5 \
  3180. /usr/local/include/X11R4 \
  3181. \
  3182. /usr/X386/include \
  3183. /usr/x386/include \
  3184. /usr/XFree86/include/X11 \
  3185. \
  3186. /usr/include \
  3187. /usr/local/include \
  3188. /usr/unsupported/include \
  3189. /usr/athena/include \
  3190. /usr/local/x11r5/include \
  3191. /usr/lpp/Xamples/include \
  3192. \
  3193. /usr/openwin/include \
  3194. /usr/openwin/share/include \
  3195. ; \
  3196. do
  3197. if test -r "$ac_dir/$x_direct_test_include"; then
  3198. ac_x_includes=$ac_dir
  3199. break
  3200. fi
  3201. done
  3202. fi
  3203. rm -f conftest*
  3204. fi # $ac_x_includes = NO
  3205. if test "$ac_x_libraries" = NO; then
  3206. # Check for the libraries.
  3207. test -z "$x_direct_test_library" && x_direct_test_library=Xt
  3208. test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  3209. # See if we find them without any special options.
  3210. # Don't add to $LIBS permanently.
  3211. ac_save_LIBS="$LIBS"
  3212. LIBS="-l$x_direct_test_library $LIBS"
  3213. cat > conftest.$ac_ext <<EOF
  3214. #line 3866 "configure"
  3215. #include "confdefs.h"
  3216. int main() {
  3217. ${x_direct_test_function}()
  3218. ; return 0; }
  3219. EOF
  3220. if { (eval echo configure:3873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3221. rm -rf conftest*
  3222. LIBS="$ac_save_LIBS"
  3223. # We can link X programs with no special library path.
  3224. ac_x_libraries=
  3225. else
  3226. echo "configure: failed program was:" >&5
  3227. cat conftest.$ac_ext >&5
  3228. rm -rf conftest*
  3229. LIBS="$ac_save_LIBS"
  3230. # First see if replacing the include by lib works.
  3231. # Check X11 before X11Rn because it is often a symlink to the current release.
  3232. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  3233. /usr/X11/lib \
  3234. /usr/X11R6/lib \
  3235. /usr/X11R5/lib \
  3236. /usr/X11R4/lib \
  3237. \
  3238. /usr/lib/X11 \
  3239. /usr/lib/X11R6 \
  3240. /usr/lib/X11R5 \
  3241. /usr/lib/X11R4 \
  3242. \
  3243. /usr/local/X11/lib \
  3244. /usr/local/X11R6/lib \
  3245. /usr/local/X11R5/lib \
  3246. /usr/local/X11R4/lib \
  3247. \
  3248. /usr/local/lib/X11 \
  3249. /usr/local/lib/X11R6 \
  3250. /usr/local/lib/X11R5 \
  3251. /usr/local/lib/X11R4 \
  3252. \
  3253. /usr/X386/lib \
  3254. /usr/x386/lib \
  3255. /usr/XFree86/lib/X11 \
  3256. \
  3257. /usr/lib \
  3258. /usr/local/lib \
  3259. /usr/unsupported/lib \
  3260. /usr/athena/lib \
  3261. /usr/local/x11r5/lib \
  3262. /usr/lpp/Xamples/lib \
  3263. /lib/usr/lib/X11 \
  3264. \
  3265. /usr/openwin/lib \
  3266. /usr/openwin/share/lib \
  3267. ; \
  3268. do
  3269. for ac_extension in a so sl; do
  3270. if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  3271. ac_x_libraries=$ac_dir
  3272. break 2
  3273. fi
  3274. done
  3275. done
  3276. fi
  3277. rm -f conftest*
  3278. fi # $ac_x_libraries = NO
  3279. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  3280. # Didn't find X anywhere. Cache the known absence of X.
  3281. ac_cv_have_x="have_x=no"
  3282. else
  3283. # Record where we found X for the cache.
  3284. ac_cv_have_x="have_x=yes \
  3285. ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  3286. fi
  3287. fi
  3288. eval "$ac_cv_have_x"
  3289. fi # $with_x != no
  3290. if test "$have_x" != yes; then
  3291. echo "$ac_t""$have_x" 1>&6
  3292. no_x=yes
  3293. else
  3294. # If each of the values was on the command line, it overrides each guess.
  3295. test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  3296. test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  3297. # Update the cache value to reflect the command line values.
  3298. ac_cv_have_x="have_x=yes \
  3299. ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  3300. echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  3301. fi
  3302. if test "$no_x" = yes; then
  3303. # Not all programs may use this symbol, but it does not hurt to define it.
  3304. cat >> confdefs.h <<\EOF
  3305. #define X_DISPLAY_MISSING 1
  3306. EOF
  3307. X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  3308. else
  3309. if test -n "$x_includes"; then
  3310. X_CFLAGS="$X_CFLAGS -I$x_includes"
  3311. fi
  3312. # It would also be nice to do this for all -L options, not just this one.
  3313. if test -n "$x_libraries"; then
  3314. X_LIBS="$X_LIBS -L$x_libraries"
  3315. # For Solaris; some versions of Sun CC require a space after -R and
  3316. # others require no space. Words are not sufficient . . . .
  3317. case "`(uname -sr) 2>/dev/null`" in
  3318. "SunOS 5"*)
  3319. echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  3320. echo "configure:3978: checking whether -R must be followed by a space" >&5
  3321. ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  3322. cat > conftest.$ac_ext <<EOF
  3323. #line 3981 "configure"
  3324. #include "confdefs.h"
  3325. int main() {
  3326. ; return 0; }
  3327. EOF
  3328. if { (eval echo configure:3988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3329. rm -rf conftest*
  3330. ac_R_nospace=yes
  3331. else
  3332. echo "configure: failed program was:" >&5
  3333. cat conftest.$ac_ext >&5
  3334. rm -rf conftest*
  3335. ac_R_nospace=no
  3336. fi
  3337. rm -f conftest*
  3338. if test $ac_R_nospace = yes; then
  3339. echo "$ac_t""no" 1>&6
  3340. X_LIBS="$X_LIBS -R$x_libraries"
  3341. else
  3342. LIBS="$ac_xsave_LIBS -R $x_libraries"
  3343. cat > conftest.$ac_ext <<EOF
  3344. #line 4004 "configure"
  3345. #include "confdefs.h"
  3346. int main() {
  3347. ; return 0; }
  3348. EOF
  3349. if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3350. rm -rf conftest*
  3351. ac_R_space=yes
  3352. else
  3353. echo "configure: failed program was:" >&5
  3354. cat conftest.$ac_ext >&5
  3355. rm -rf conftest*
  3356. ac_R_space=no
  3357. fi
  3358. rm -f conftest*
  3359. if test $ac_R_space = yes; then
  3360. echo "$ac_t""yes" 1>&6
  3361. X_LIBS="$X_LIBS -R $x_libraries"
  3362. else
  3363. echo "$ac_t""neither works" 1>&6
  3364. fi
  3365. fi
  3366. LIBS="$ac_xsave_LIBS"
  3367. esac
  3368. fi
  3369. # Check for system-dependent libraries X programs must link with.
  3370. # Do this before checking for the system-independent R6 libraries
  3371. # (-lICE), since we may need -lsocket or whatever for X linking.
  3372. if test "$ISC" = yes; then
  3373. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  3374. else
  3375. # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  3376. # libraries were built with DECnet support. And karl@cs.umb.edu says
  3377. # the Alpha needs dnet_stub (dnet does not exist).
  3378. echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  3379. echo "configure:4043: checking for dnet_ntoa in -ldnet" >&5
  3380. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3381. ac_save_LIBS="$LIBS"
  3382. LIBS="-ldnet $LIBS"
  3383. cat > conftest.$ac_ext <<EOF
  3384. #line 4049 "configure"
  3385. #include "confdefs.h"
  3386. /* Override any gcc2 internal prototype to avoid an error. */
  3387. /* We use char because int might match the return type of a gcc2
  3388. builtin and then its argument prototype would still apply. */
  3389. char dnet_ntoa();
  3390. int main() {
  3391. dnet_ntoa()
  3392. ; return 0; }
  3393. EOF
  3394. if { (eval echo configure:4060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3395. rm -rf conftest*
  3396. eval "ac_cv_lib_$ac_lib_var=yes"
  3397. else
  3398. echo "configure: failed program was:" >&5
  3399. cat conftest.$ac_ext >&5
  3400. rm -rf conftest*
  3401. eval "ac_cv_lib_$ac_lib_var=no"
  3402. fi
  3403. rm -f conftest*
  3404. LIBS="$ac_save_LIBS"
  3405. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3406. echo "$ac_t""yes" 1>&6
  3407. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  3408. else
  3409. echo "$ac_t""no" 1>&6
  3410. fi
  3411. if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  3412. echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  3413. echo "configure:4081: checking for dnet_ntoa in -ldnet_stub" >&5
  3414. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3415. ac_save_LIBS="$LIBS"
  3416. LIBS="-ldnet_stub $LIBS"
  3417. cat > conftest.$ac_ext <<EOF
  3418. #line 4087 "configure"
  3419. #include "confdefs.h"
  3420. /* Override any gcc2 internal prototype to avoid an error. */
  3421. /* We use char because int might match the return type of a gcc2
  3422. builtin and then its argument prototype would still apply. */
  3423. char dnet_ntoa();
  3424. int main() {
  3425. dnet_ntoa()
  3426. ; return 0; }
  3427. EOF
  3428. if { (eval echo configure:4098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3429. rm -rf conftest*
  3430. eval "ac_cv_lib_$ac_lib_var=yes"
  3431. else
  3432. echo "configure: failed program was:" >&5
  3433. cat conftest.$ac_ext >&5
  3434. rm -rf conftest*
  3435. eval "ac_cv_lib_$ac_lib_var=no"
  3436. fi
  3437. rm -f conftest*
  3438. LIBS="$ac_save_LIBS"
  3439. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3440. echo "$ac_t""yes" 1>&6
  3441. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  3442. else
  3443. echo "$ac_t""no" 1>&6
  3444. fi
  3445. fi
  3446. # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  3447. # to get the SysV transport functions.
  3448. # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  3449. # needs -lnsl.
  3450. # The nsl library prevents programs from opening the X display
  3451. # on Irix 5.2, according to dickey@clark.net.
  3452. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  3453. echo "configure:4126: checking for gethostbyname" >&5
  3454. cat > conftest.$ac_ext <<EOF
  3455. #line 4129 "configure"
  3456. #include "confdefs.h"
  3457. /* System header to define __stub macros and hopefully few prototypes,
  3458. which can conflict with char gethostbyname(); below. */
  3459. #include <assert.h>
  3460. /* Override any gcc2 internal prototype to avoid an error. */
  3461. /* We use char because int might match the return type of a gcc2
  3462. builtin and then its argument prototype would still apply. */
  3463. char gethostbyname();
  3464. int main() {
  3465. /* The GNU C library defines this for functions which it implements
  3466. to always fail with ENOSYS. Some functions are actually named
  3467. something starting with __ and the normal name is an alias. */
  3468. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  3469. choke me
  3470. #else
  3471. gethostbyname();
  3472. #endif
  3473. ; return 0; }
  3474. EOF
  3475. if { (eval echo configure:4152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3476. rm -rf conftest*
  3477. eval "ac_cv_func_gethostbyname=yes"
  3478. else
  3479. echo "configure: failed program was:" >&5
  3480. cat conftest.$ac_ext >&5
  3481. rm -rf conftest*
  3482. eval "ac_cv_func_gethostbyname=no"
  3483. fi
  3484. rm -f conftest*
  3485. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  3486. echo "$ac_t""yes" 1>&6
  3487. :
  3488. else
  3489. echo "$ac_t""no" 1>&6
  3490. fi
  3491. if test $ac_cv_func_gethostbyname = no; then
  3492. echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  3493. echo "configure:4172: checking for gethostbyname in -lnsl" >&5
  3494. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  3495. ac_save_LIBS="$LIBS"
  3496. LIBS="-lnsl $LIBS"
  3497. cat > conftest.$ac_ext <<EOF
  3498. #line 4178 "configure"
  3499. #include "confdefs.h"
  3500. /* Override any gcc2 internal prototype to avoid an error. */
  3501. /* We use char because int might match the return type of a gcc2
  3502. builtin and then its argument prototype would still apply. */
  3503. char gethostbyname();
  3504. int main() {
  3505. gethostbyname()
  3506. ; return 0; }
  3507. EOF
  3508. if { (eval echo configure:4189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3509. rm -rf conftest*
  3510. eval "ac_cv_lib_$ac_lib_var=yes"
  3511. else
  3512. echo "configure: failed program was:" >&5
  3513. cat conftest.$ac_ext >&5
  3514. rm -rf conftest*
  3515. eval "ac_cv_lib_$ac_lib_var=no"
  3516. fi
  3517. rm -f conftest*
  3518. LIBS="$ac_save_LIBS"
  3519. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3520. echo "$ac_t""yes" 1>&6
  3521. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  3522. else
  3523. echo "$ac_t""no" 1>&6
  3524. fi
  3525. fi
  3526. # lieder@skyler.mavd.honeywell.com says without -lsocket,
  3527. # socket/setsockopt and other routines are undefined under SCO ODT
  3528. # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
  3529. # on later versions), says simon@lia.di.epfl.ch: it contains
  3530. # gethostby* variants that don't use the nameserver (or something).
  3531. # -lsocket must be given before -lnsl if both are needed.
  3532. # We assume that if connect needs -lnsl, so does gethostbyname.
  3533. echo $ac_n "checking for connect""... $ac_c" 1>&6
  3534. echo "configure:4218: checking for connect" >&5
  3535. cat > conftest.$ac_ext <<EOF
  3536. #line 4221 "configure"
  3537. #include "confdefs.h"
  3538. /* System header to define __stub macros and hopefully few prototypes,
  3539. which can conflict with char connect(); below. */
  3540. #include <assert.h>
  3541. /* Override any gcc2 internal prototype to avoid an error. */
  3542. /* We use char because int might match the return type of a gcc2
  3543. builtin and then its argument prototype would still apply. */
  3544. char connect();
  3545. int main() {
  3546. /* The GNU C library defines this for functions which it implements
  3547. to always fail with ENOSYS. Some functions are actually named
  3548. something starting with __ and the normal name is an alias. */
  3549. #if defined (__stub_connect) || defined (__stub___connect)
  3550. choke me
  3551. #else
  3552. connect();
  3553. #endif
  3554. ; return 0; }
  3555. EOF
  3556. if { (eval echo configure:4244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3557. rm -rf conftest*
  3558. eval "ac_cv_func_connect=yes"
  3559. else
  3560. echo "configure: failed program was:" >&5
  3561. cat conftest.$ac_ext >&5
  3562. rm -rf conftest*
  3563. eval "ac_cv_func_connect=no"
  3564. fi
  3565. rm -f conftest*
  3566. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  3567. echo "$ac_t""yes" 1>&6
  3568. :
  3569. else
  3570. echo "$ac_t""no" 1>&6
  3571. fi
  3572. if test $ac_cv_func_connect = no; then
  3573. echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  3574. echo "configure:4264: checking for connect in -lsocket" >&5
  3575. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  3576. ac_save_LIBS="$LIBS"
  3577. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  3578. cat > conftest.$ac_ext <<EOF
  3579. #line 4270 "configure"
  3580. #include "confdefs.h"
  3581. /* Override any gcc2 internal prototype to avoid an error. */
  3582. /* We use char because int might match the return type of a gcc2
  3583. builtin and then its argument prototype would still apply. */
  3584. char connect();
  3585. int main() {
  3586. connect()
  3587. ; return 0; }
  3588. EOF
  3589. if { (eval echo configure:4281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3590. rm -rf conftest*
  3591. eval "ac_cv_lib_$ac_lib_var=yes"
  3592. else
  3593. echo "configure: failed program was:" >&5
  3594. cat conftest.$ac_ext >&5
  3595. rm -rf conftest*
  3596. eval "ac_cv_lib_$ac_lib_var=no"
  3597. fi
  3598. rm -f conftest*
  3599. LIBS="$ac_save_LIBS"
  3600. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3601. echo "$ac_t""yes" 1>&6
  3602. X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  3603. else
  3604. echo "$ac_t""no" 1>&6
  3605. fi
  3606. fi
  3607. # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  3608. echo $ac_n "checking for remove""... $ac_c" 1>&6
  3609. echo "configure:4304: checking for remove" >&5
  3610. cat > conftest.$ac_ext <<EOF
  3611. #line 4307 "configure"
  3612. #include "confdefs.h"
  3613. /* System header to define __stub macros and hopefully few prototypes,
  3614. which can conflict with char remove(); below. */
  3615. #include <assert.h>
  3616. /* Override any gcc2 internal prototype to avoid an error. */
  3617. /* We use char because int might match the return type of a gcc2
  3618. builtin and then its argument prototype would still apply. */
  3619. char remove();
  3620. int main() {
  3621. /* The GNU C library defines this for functions which it implements
  3622. to always fail with ENOSYS. Some functions are actually named
  3623. something starting with __ and the normal name is an alias. */
  3624. #if defined (__stub_remove) || defined (__stub___remove)
  3625. choke me
  3626. #else
  3627. remove();
  3628. #endif
  3629. ; return 0; }
  3630. EOF
  3631. if { (eval echo configure:4330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3632. rm -rf conftest*
  3633. eval "ac_cv_func_remove=yes"
  3634. else
  3635. echo "configure: failed program was:" >&5
  3636. cat conftest.$ac_ext >&5
  3637. rm -rf conftest*
  3638. eval "ac_cv_func_remove=no"
  3639. fi
  3640. rm -f conftest*
  3641. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  3642. echo "$ac_t""yes" 1>&6
  3643. :
  3644. else
  3645. echo "$ac_t""no" 1>&6
  3646. fi
  3647. if test $ac_cv_func_remove = no; then
  3648. echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  3649. echo "configure:4350: checking for remove in -lposix" >&5
  3650. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  3651. ac_save_LIBS="$LIBS"
  3652. LIBS="-lposix $LIBS"
  3653. cat > conftest.$ac_ext <<EOF
  3654. #line 4356 "configure"
  3655. #include "confdefs.h"
  3656. /* Override any gcc2 internal prototype to avoid an error. */
  3657. /* We use char because int might match the return type of a gcc2
  3658. builtin and then its argument prototype would still apply. */
  3659. char remove();
  3660. int main() {
  3661. remove()
  3662. ; return 0; }
  3663. EOF
  3664. if { (eval echo configure:4367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3665. rm -rf conftest*
  3666. eval "ac_cv_lib_$ac_lib_var=yes"
  3667. else
  3668. echo "configure: failed program was:" >&5
  3669. cat conftest.$ac_ext >&5
  3670. rm -rf conftest*
  3671. eval "ac_cv_lib_$ac_lib_var=no"
  3672. fi
  3673. rm -f conftest*
  3674. LIBS="$ac_save_LIBS"
  3675. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3676. echo "$ac_t""yes" 1>&6
  3677. X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  3678. else
  3679. echo "$ac_t""no" 1>&6
  3680. fi
  3681. fi
  3682. # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  3683. echo $ac_n "checking for shmat""... $ac_c" 1>&6
  3684. echo "configure:4390: checking for shmat" >&5
  3685. cat > conftest.$ac_ext <<EOF
  3686. #line 4393 "configure"
  3687. #include "confdefs.h"
  3688. /* System header to define __stub macros and hopefully few prototypes,
  3689. which can conflict with char shmat(); below. */
  3690. #include <assert.h>
  3691. /* Override any gcc2 internal prototype to avoid an error. */
  3692. /* We use char because int might match the return type of a gcc2
  3693. builtin and then its argument prototype would still apply. */
  3694. char shmat();
  3695. int main() {
  3696. /* The GNU C library defines this for functions which it implements
  3697. to always fail with ENOSYS. Some functions are actually named
  3698. something starting with __ and the normal name is an alias. */
  3699. #if defined (__stub_shmat) || defined (__stub___shmat)
  3700. choke me
  3701. #else
  3702. shmat();
  3703. #endif
  3704. ; return 0; }
  3705. EOF
  3706. if { (eval echo configure:4416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3707. rm -rf conftest*
  3708. eval "ac_cv_func_shmat=yes"
  3709. else
  3710. echo "configure: failed program was:" >&5
  3711. cat conftest.$ac_ext >&5
  3712. rm -rf conftest*
  3713. eval "ac_cv_func_shmat=no"
  3714. fi
  3715. rm -f conftest*
  3716. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  3717. echo "$ac_t""yes" 1>&6
  3718. :
  3719. else
  3720. echo "$ac_t""no" 1>&6
  3721. fi
  3722. if test $ac_cv_func_shmat = no; then
  3723. echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  3724. echo "configure:4436: checking for shmat in -lipc" >&5
  3725. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  3726. ac_save_LIBS="$LIBS"
  3727. LIBS="-lipc $LIBS"
  3728. cat > conftest.$ac_ext <<EOF
  3729. #line 4442 "configure"
  3730. #include "confdefs.h"
  3731. /* Override any gcc2 internal prototype to avoid an error. */
  3732. /* We use char because int might match the return type of a gcc2
  3733. builtin and then its argument prototype would still apply. */
  3734. char shmat();
  3735. int main() {
  3736. shmat()
  3737. ; return 0; }
  3738. EOF
  3739. if { (eval echo configure:4453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3740. rm -rf conftest*
  3741. eval "ac_cv_lib_$ac_lib_var=yes"
  3742. else
  3743. echo "configure: failed program was:" >&5
  3744. cat conftest.$ac_ext >&5
  3745. rm -rf conftest*
  3746. eval "ac_cv_lib_$ac_lib_var=no"
  3747. fi
  3748. rm -f conftest*
  3749. LIBS="$ac_save_LIBS"
  3750. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3751. echo "$ac_t""yes" 1>&6
  3752. X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  3753. else
  3754. echo "$ac_t""no" 1>&6
  3755. fi
  3756. fi
  3757. fi
  3758. # Check for libraries that X11R6 Xt/Xaw programs need.
  3759. ac_save_LDFLAGS="$LDFLAGS"
  3760. test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  3761. # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  3762. # check for ICE first), but we must link in the order -lSM -lICE or
  3763. # we get undefined symbols. So assume we have SM if we have ICE.
  3764. # These have to be linked with before -lX11, unlike the other
  3765. # libraries we check for below, so use a different variable.
  3766. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  3767. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  3768. echo "configure:4485: checking for IceConnectionNumber in -lICE" >&5
  3769. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  3770. ac_save_LIBS="$LIBS"
  3771. LIBS="-lICE $X_EXTRA_LIBS $LIBS"
  3772. cat > conftest.$ac_ext <<EOF
  3773. #line 4491 "configure"
  3774. #include "confdefs.h"
  3775. /* Override any gcc2 internal prototype to avoid an error. */
  3776. /* We use char because int might match the return type of a gcc2
  3777. builtin and then its argument prototype would still apply. */
  3778. char IceConnectionNumber();
  3779. int main() {
  3780. IceConnectionNumber()
  3781. ; return 0; }
  3782. EOF
  3783. if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3784. rm -rf conftest*
  3785. eval "ac_cv_lib_$ac_lib_var=yes"
  3786. else
  3787. echo "configure: failed program was:" >&5
  3788. cat conftest.$ac_ext >&5
  3789. rm -rf conftest*
  3790. eval "ac_cv_lib_$ac_lib_var=no"
  3791. fi
  3792. rm -f conftest*
  3793. LIBS="$ac_save_LIBS"
  3794. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3795. echo "$ac_t""yes" 1>&6
  3796. X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  3797. else
  3798. echo "$ac_t""no" 1>&6
  3799. fi
  3800. LDFLAGS="$ac_save_LDFLAGS"
  3801. fi
  3802. if test "$no_x" != "yes"; then
  3803. USE_X11="1"
  3804. XLIB=-lX11
  3805. XTLIB=-lXt
  3806. fi
  3807. fi
  3808. # Note that some systems (FreeBSD for example) need an extra library for
  3809. # cuserid
  3810. ac_save_libs="$LIBS"
  3811. LIBS=""
  3812. echo $ac_n "checking for library containing cuserid""... $ac_c" 1>&6
  3813. echo "configure:4542: checking for library containing cuserid" >&5
  3814. ac_func_search_save_LIBS="$LIBS"
  3815. ac_cv_search_cuserid="no"
  3816. cat > conftest.$ac_ext <<EOF
  3817. #line 4547 "configure"
  3818. #include "confdefs.h"
  3819. /* Override any gcc2 internal prototype to avoid an error. */
  3820. /* We use char because int might match the return type of a gcc2
  3821. builtin and then its argument prototype would still apply. */
  3822. char cuserid();
  3823. int main() {
  3824. cuserid()
  3825. ; return 0; }
  3826. EOF
  3827. if { (eval echo configure:4558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3828. rm -rf conftest*
  3829. ac_cv_search_cuserid="none required"
  3830. else
  3831. echo "configure: failed program was:" >&5
  3832. cat conftest.$ac_ext >&5
  3833. fi
  3834. rm -f conftest*
  3835. test "$ac_cv_search_cuserid" = "no" && for i in compat; do
  3836. LIBS="-l$i $ac_func_search_save_LIBS"
  3837. cat > conftest.$ac_ext <<EOF
  3838. #line 4569 "configure"
  3839. #include "confdefs.h"
  3840. /* Override any gcc2 internal prototype to avoid an error. */
  3841. /* We use char because int might match the return type of a gcc2
  3842. builtin and then its argument prototype would still apply. */
  3843. char cuserid();
  3844. int main() {
  3845. cuserid()
  3846. ; return 0; }
  3847. EOF
  3848. if { (eval echo configure:4580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3849. rm -rf conftest*
  3850. ac_cv_search_cuserid="-l$i"
  3851. break
  3852. else
  3853. echo "configure: failed program was:" >&5
  3854. cat conftest.$ac_ext >&5
  3855. fi
  3856. rm -f conftest*
  3857. done
  3858. LIBS="$ac_func_search_save_LIBS"
  3859. echo "$ac_t""$ac_cv_search_cuserid" 1>&6
  3860. if test "$ac_cv_search_cuserid" != "no"; then
  3861. test "$ac_cv_search_cuserid" = "none required" || LIBS="$ac_cv_search_cuserid $LIBS"
  3862. else :
  3863. fi
  3864. DBMIEXTRALIB="$LIBS"
  3865. LIBS="$ac_save_libs"
  3866. for ac_func in asprintf
  3867. do
  3868. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3869. echo "configure:4606: checking for $ac_func" >&5
  3870. cat > conftest.$ac_ext <<EOF
  3871. #line 4609 "configure"
  3872. #include "confdefs.h"
  3873. /* System header to define __stub macros and hopefully few prototypes,
  3874. which can conflict with char $ac_func(); below. */
  3875. #include <assert.h>
  3876. /* Override any gcc2 internal prototype to avoid an error. */
  3877. /* We use char because int might match the return type of a gcc2
  3878. builtin and then its argument prototype would still apply. */
  3879. char $ac_func();
  3880. int main() {
  3881. /* The GNU C library defines this for functions which it implements
  3882. to always fail with ENOSYS. Some functions are actually named
  3883. something starting with __ and the normal name is an alias. */
  3884. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3885. choke me
  3886. #else
  3887. $ac_func();
  3888. #endif
  3889. ; return 0; }
  3890. EOF
  3891. if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3892. rm -rf conftest*
  3893. eval "ac_cv_func_$ac_func=yes"
  3894. else
  3895. echo "configure: failed program was:" >&5
  3896. cat conftest.$ac_ext >&5
  3897. rm -rf conftest*
  3898. eval "ac_cv_func_$ac_func=no"
  3899. fi
  3900. rm -f conftest*
  3901. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3902. echo "$ac_t""yes" 1>&6
  3903. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3904. cat >> confdefs.h <<EOF
  3905. #define $ac_tr_func 1
  3906. EOF
  3907. else
  3908. echo "$ac_t""no" 1>&6
  3909. fi
  3910. done
  3911. # Test if mathlib needs -lm flag or is included with libc
  3912. echo $ac_n "checking for atan""... $ac_c" 1>&6
  3913. echo "configure:4659: checking for atan" >&5
  3914. cat > conftest.$ac_ext <<EOF
  3915. #line 4662 "configure"
  3916. #include "confdefs.h"
  3917. /* System header to define __stub macros and hopefully few prototypes,
  3918. which can conflict with char atan(); below. */
  3919. #include <assert.h>
  3920. /* Override any gcc2 internal prototype to avoid an error. */
  3921. /* We use char because int might match the return type of a gcc2
  3922. builtin and then its argument prototype would still apply. */
  3923. char atan();
  3924. int main() {
  3925. /* The GNU C library defines this for functions which it implements
  3926. to always fail with ENOSYS. Some functions are actually named
  3927. something starting with __ and the normal name is an alias. */
  3928. #if defined (__stub_atan) || defined (__stub___atan)
  3929. choke me
  3930. #else
  3931. atan();
  3932. #endif
  3933. ; return 0; }
  3934. EOF
  3935. if { (eval echo configure:4685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3936. rm -rf conftest*
  3937. eval "ac_cv_func_atan=yes"
  3938. else
  3939. echo "configure: failed program was:" >&5
  3940. cat conftest.$ac_ext >&5
  3941. rm -rf conftest*
  3942. eval "ac_cv_func_atan=no"
  3943. fi
  3944. rm -f conftest*
  3945. if eval "test \"`echo '$ac_cv_func_'atan`\" = yes"; then
  3946. echo "$ac_t""yes" 1>&6
  3947. MATHLIB=
  3948. else
  3949. echo "$ac_t""no" 1>&6
  3950. echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6
  3951. echo "configure:4703: checking for atan in -lm" >&5
  3952. ac_lib_var=`echo m'_'atan | sed 'y%./+-%__p_%'`
  3953. ac_save_LIBS="$LIBS"
  3954. LIBS="-lm $LIBS"
  3955. cat > conftest.$ac_ext <<EOF
  3956. #line 4709 "configure"
  3957. #include "confdefs.h"
  3958. /* Override any gcc2 internal prototype to avoid an error. */
  3959. /* We use char because int might match the return type of a gcc2
  3960. builtin and then its argument prototype would still apply. */
  3961. char atan();
  3962. int main() {
  3963. atan()
  3964. ; return 0; }
  3965. EOF
  3966. if { (eval echo configure:4720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3967. rm -rf conftest*
  3968. eval "ac_cv_lib_$ac_lib_var=yes"
  3969. else
  3970. echo "configure: failed program was:" >&5
  3971. cat conftest.$ac_ext >&5
  3972. rm -rf conftest*
  3973. eval "ac_cv_lib_$ac_lib_var=no"
  3974. fi
  3975. rm -f conftest*
  3976. LIBS="$ac_save_LIBS"
  3977. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3978. echo "$ac_t""yes" 1>&6
  3979. MATHLIB=-lm
  3980. else
  3981. echo "$ac_t""no" 1>&6
  3982. { echo "configure: error: *** Failed check for math library." 1>&2; exit 1; }
  3983. fi
  3984. fi
  3985. echo $ac_n "checking for dlsym""... $ac_c" 1>&6
  3986. echo "configure:4747: checking for dlsym" >&5
  3987. cat > conftest.$ac_ext <<EOF
  3988. #line 4750 "configure"
  3989. #include "confdefs.h"
  3990. /* System header to define __stub macros and hopefully few prototypes,
  3991. which can conflict with char dlsym(); below. */
  3992. #include <assert.h>
  3993. /* Override any gcc2 internal prototype to avoid an error. */
  3994. /* We use char because int might match the return type of a gcc2
  3995. builtin and then its argument prototype would still apply. */
  3996. char dlsym();
  3997. int main() {
  3998. /* The GNU C library defines this for functions which it implements
  3999. to always fail with ENOSYS. Some functions are actually named
  4000. something starting with __ and the normal name is an alias. */
  4001. #if defined (__stub_dlsym) || defined (__stub___dlsym)
  4002. choke me
  4003. #else
  4004. dlsym();
  4005. #endif
  4006. ; return 0; }
  4007. EOF
  4008. if { (eval echo configure:4773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4009. rm -rf conftest*
  4010. eval "ac_cv_func_dlsym=yes"
  4011. else
  4012. echo "configure: failed program was:" >&5
  4013. cat conftest.$ac_ext >&5
  4014. rm -rf conftest*
  4015. eval "ac_cv_func_dlsym=no"
  4016. fi
  4017. rm -f conftest*
  4018. if eval "test \"`echo '$ac_cv_func_'dlsym`\" = yes"; then
  4019. echo "$ac_t""yes" 1>&6
  4020. DLLIB=
  4021. else
  4022. echo "$ac_t""no" 1>&6
  4023. echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
  4024. echo "configure:4791: checking for dlsym in -ldl" >&5
  4025. ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
  4026. ac_save_LIBS="$LIBS"
  4027. LIBS="-ldl $LIBS"
  4028. cat > conftest.$ac_ext <<EOF
  4029. #line 4797 "configure"
  4030. #include "confdefs.h"
  4031. /* Override any gcc2 internal prototype to avoid an error. */
  4032. /* We use char because int might match the return type of a gcc2
  4033. builtin and then its argument prototype would still apply. */
  4034. char dlsym();
  4035. int main() {
  4036. dlsym()
  4037. ; return 0; }
  4038. EOF
  4039. if { (eval echo configure:4808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4040. rm -rf conftest*
  4041. eval "ac_cv_lib_$ac_lib_var=yes"
  4042. else
  4043. echo "configure: failed program was:" >&5
  4044. cat conftest.$ac_ext >&5
  4045. rm -rf conftest*
  4046. eval "ac_cv_lib_$ac_lib_var=no"
  4047. fi
  4048. rm -f conftest*
  4049. LIBS="$ac_save_LIBS"
  4050. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4051. echo "$ac_t""yes" 1>&6
  4052. DLLIB=-ldl
  4053. else
  4054. echo "$ac_t""no" 1>&6
  4055. DLLIB=
  4056. fi
  4057. fi
  4058. echo $ac_n "checking for iconv""... $ac_c" 1>&6
  4059. echo "configure:4835: checking for iconv" >&5
  4060. cat > conftest.$ac_ext <<EOF
  4061. #line 4838 "configure"
  4062. #include "confdefs.h"
  4063. /* System header to define __stub macros and hopefully few prototypes,
  4064. which can conflict with char iconv(); below. */
  4065. #include <assert.h>
  4066. /* Override any gcc2 internal prototype to avoid an error. */
  4067. /* We use char because int might match the return type of a gcc2
  4068. builtin and then its argument prototype would still apply. */
  4069. char iconv();
  4070. int main() {
  4071. /* The GNU C library defines this for functions which it implements
  4072. to always fail with ENOSYS. Some functions are actually named
  4073. something starting with __ and the normal name is an alias. */
  4074. #if defined (__stub_iconv) || defined (__stub___iconv)
  4075. choke me
  4076. #else
  4077. iconv();
  4078. #endif
  4079. ; return 0; }
  4080. EOF
  4081. if { (eval echo configure:4861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4082. rm -rf conftest*
  4083. eval "ac_cv_func_iconv=yes"
  4084. else
  4085. echo "configure: failed program was:" >&5
  4086. cat conftest.$ac_ext >&5
  4087. rm -rf conftest*
  4088. eval "ac_cv_func_iconv=no"
  4089. fi
  4090. rm -f conftest*
  4091. if eval "test \"`echo '$ac_cv_func_'iconv`\" = yes"; then
  4092. echo "$ac_t""yes" 1>&6
  4093. ICONVLIB=
  4094. else
  4095. echo "$ac_t""no" 1>&6
  4096. echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
  4097. echo "configure:4879: checking for iconv in -liconv" >&5
  4098. ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
  4099. ac_save_LIBS="$LIBS"
  4100. LIBS="-liconv $LIBS"
  4101. cat > conftest.$ac_ext <<EOF
  4102. #line 4885 "configure"
  4103. #include "confdefs.h"
  4104. /* Override any gcc2 internal prototype to avoid an error. */
  4105. /* We use char because int might match the return type of a gcc2
  4106. builtin and then its argument prototype would still apply. */
  4107. char iconv();
  4108. int main() {
  4109. iconv()
  4110. ; return 0; }
  4111. EOF
  4112. if { (eval echo configure:4896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4113. rm -rf conftest*
  4114. eval "ac_cv_lib_$ac_lib_var=yes"
  4115. else
  4116. echo "configure: failed program was:" >&5
  4117. cat conftest.$ac_ext >&5
  4118. rm -rf conftest*
  4119. eval "ac_cv_lib_$ac_lib_var=no"
  4120. fi
  4121. rm -f conftest*
  4122. LIBS="$ac_save_LIBS"
  4123. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4124. echo "$ac_t""yes" 1>&6
  4125. ICONVLIB=-liconv
  4126. else
  4127. echo "$ac_t""no" 1>&6
  4128. echo $ac_n "checking for iconv in -lgiconv""... $ac_c" 1>&6
  4129. echo "configure:4915: checking for iconv in -lgiconv" >&5
  4130. ac_lib_var=`echo giconv'_'iconv | sed 'y%./+-%__p_%'`
  4131. ac_save_LIBS="$LIBS"
  4132. LIBS="-lgiconv $LIBS"
  4133. cat > conftest.$ac_ext <<EOF
  4134. #line 4921 "configure"
  4135. #include "confdefs.h"
  4136. /* Override any gcc2 internal prototype to avoid an error. */
  4137. /* We use char because int might match the return type of a gcc2
  4138. builtin and then its argument prototype would still apply. */
  4139. char iconv();
  4140. int main() {
  4141. iconv()
  4142. ; return 0; }
  4143. EOF
  4144. if { (eval echo configure:4932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4145. rm -rf conftest*
  4146. eval "ac_cv_lib_$ac_lib_var=yes"
  4147. else
  4148. echo "configure: failed program was:" >&5
  4149. cat conftest.$ac_ext >&5
  4150. rm -rf conftest*
  4151. eval "ac_cv_lib_$ac_lib_var=no"
  4152. fi
  4153. rm -f conftest*
  4154. LIBS="$ac_save_LIBS"
  4155. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4156. echo "$ac_t""yes" 1>&6
  4157. ICONVLIB=-lgiconv
  4158. else
  4159. echo "$ac_t""no" 1>&6
  4160. echo $ac_n "checking for libiconv""... $ac_c" 1>&6
  4161. echo "configure:4951: checking for libiconv" >&5
  4162. cat > conftest.$ac_ext <<EOF
  4163. #line 4954 "configure"
  4164. #include "confdefs.h"
  4165. /* System header to define __stub macros and hopefully few prototypes,
  4166. which can conflict with char libiconv(); below. */
  4167. #include <assert.h>
  4168. /* Override any gcc2 internal prototype to avoid an error. */
  4169. /* We use char because int might match the return type of a gcc2
  4170. builtin and then its argument prototype would still apply. */
  4171. char libiconv();
  4172. int main() {
  4173. /* The GNU C library defines this for functions which it implements
  4174. to always fail with ENOSYS. Some functions are actually named
  4175. something starting with __ and the normal name is an alias. */
  4176. #if defined (__stub_libiconv) || defined (__stub___libiconv)
  4177. choke me
  4178. #else
  4179. libiconv();
  4180. #endif
  4181. ; return 0; }
  4182. EOF
  4183. if { (eval echo configure:4977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4184. rm -rf conftest*
  4185. eval "ac_cv_func_libiconv=yes"
  4186. else
  4187. echo "configure: failed program was:" >&5
  4188. cat conftest.$ac_ext >&5
  4189. rm -rf conftest*
  4190. eval "ac_cv_func_libiconv=no"
  4191. fi
  4192. rm -f conftest*
  4193. if eval "test \"`echo '$ac_cv_func_'libiconv`\" = yes"; then
  4194. echo "$ac_t""yes" 1>&6
  4195. ICONVLIB=
  4196. else
  4197. echo "$ac_t""no" 1>&6
  4198. echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6
  4199. echo "configure:4995: checking for libiconv in -liconv" >&5
  4200. ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'`
  4201. ac_save_LIBS="$LIBS"
  4202. LIBS="-liconv $LIBS"
  4203. cat > conftest.$ac_ext <<EOF
  4204. #line 5001 "configure"
  4205. #include "confdefs.h"
  4206. /* Override any gcc2 internal prototype to avoid an error. */
  4207. /* We use char because int might match the return type of a gcc2
  4208. builtin and then its argument prototype would still apply. */
  4209. char libiconv();
  4210. int main() {
  4211. libiconv()
  4212. ; return 0; }
  4213. EOF
  4214. if { (eval echo configure:5012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4215. rm -rf conftest*
  4216. eval "ac_cv_lib_$ac_lib_var=yes"
  4217. else
  4218. echo "configure: failed program was:" >&5
  4219. cat conftest.$ac_ext >&5
  4220. rm -rf conftest*
  4221. eval "ac_cv_lib_$ac_lib_var=no"
  4222. fi
  4223. rm -f conftest*
  4224. LIBS="$ac_save_LIBS"
  4225. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4226. echo "$ac_t""yes" 1>&6
  4227. ICONVLIB=-liconv
  4228. else
  4229. echo "$ac_t""no" 1>&6
  4230. echo $ac_n "checking for libiconv in -lgiconv""... $ac_c" 1>&6
  4231. echo "configure:5031: checking for libiconv in -lgiconv" >&5
  4232. ac_lib_var=`echo giconv'_'libiconv | sed 'y%./+-%__p_%'`
  4233. ac_save_LIBS="$LIBS"
  4234. LIBS="-lgiconv $LIBS"
  4235. cat > conftest.$ac_ext <<EOF
  4236. #line 5037 "configure"
  4237. #include "confdefs.h"
  4238. /* Override any gcc2 internal prototype to avoid an error. */
  4239. /* We use char because int might match the return type of a gcc2
  4240. builtin and then its argument prototype would still apply. */
  4241. char libiconv();
  4242. int main() {
  4243. libiconv()
  4244. ; return 0; }
  4245. EOF
  4246. if { (eval echo configure:5048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4247. rm -rf conftest*
  4248. eval "ac_cv_lib_$ac_lib_var=yes"
  4249. else
  4250. echo "configure: failed program was:" >&5
  4251. cat conftest.$ac_ext >&5
  4252. rm -rf conftest*
  4253. eval "ac_cv_lib_$ac_lib_var=no"
  4254. fi
  4255. rm -f conftest*
  4256. LIBS="$ac_save_LIBS"
  4257. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4258. echo "$ac_t""yes" 1>&6
  4259. ICONVLIB=-lgiconv
  4260. else
  4261. echo "$ac_t""no" 1>&6
  4262. echo "configure: warning: *** Unable to locate iconv() function." 1>&2
  4263. ICONVLIB=
  4264. fi
  4265. fi
  4266. fi
  4267. fi
  4268. fi
  4269. fi
  4270. have_socket=1
  4271. echo $ac_n "checking for socket""... $ac_c" 1>&6
  4272. echo "configure:5085: checking for socket" >&5
  4273. cat > conftest.$ac_ext <<EOF
  4274. #line 5088 "configure"
  4275. #include "confdefs.h"
  4276. /* System header to define __stub macros and hopefully few prototypes,
  4277. which can conflict with char socket(); below. */
  4278. #include <assert.h>
  4279. /* Override any gcc2 internal prototype to avoid an error. */
  4280. /* We use char because int might match the return type of a gcc2
  4281. builtin and then its argument prototype would still apply. */
  4282. char socket();
  4283. int main() {
  4284. /* The GNU C library defines this for functions which it implements
  4285. to always fail with ENOSYS. Some functions are actually named
  4286. something starting with __ and the normal name is an alias. */
  4287. #if defined (__stub_socket) || defined (__stub___socket)
  4288. choke me
  4289. #else
  4290. socket();
  4291. #endif
  4292. ; return 0; }
  4293. EOF
  4294. if { (eval echo configure:5111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4295. rm -rf conftest*
  4296. eval "ac_cv_func_socket=yes"
  4297. else
  4298. echo "configure: failed program was:" >&5
  4299. cat conftest.$ac_ext >&5
  4300. rm -rf conftest*
  4301. eval "ac_cv_func_socket=no"
  4302. fi
  4303. rm -f conftest*
  4304. if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
  4305. echo "$ac_t""yes" 1>&6
  4306. SOCKLIB=
  4307. else
  4308. echo "$ac_t""no" 1>&6
  4309. echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
  4310. echo "configure:5129: checking for socket in -lsocket" >&5
  4311. ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
  4312. ac_save_LIBS="$LIBS"
  4313. LIBS="-lsocket $LIBS"
  4314. cat > conftest.$ac_ext <<EOF
  4315. #line 5135 "configure"
  4316. #include "confdefs.h"
  4317. /* Override any gcc2 internal prototype to avoid an error. */
  4318. /* We use char because int might match the return type of a gcc2
  4319. builtin and then its argument prototype would still apply. */
  4320. char socket();
  4321. int main() {
  4322. socket()
  4323. ; return 0; }
  4324. EOF
  4325. if { (eval echo configure:5146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4326. rm -rf conftest*
  4327. eval "ac_cv_lib_$ac_lib_var=yes"
  4328. else
  4329. echo "configure: failed program was:" >&5
  4330. cat conftest.$ac_ext >&5
  4331. rm -rf conftest*
  4332. eval "ac_cv_lib_$ac_lib_var=no"
  4333. fi
  4334. rm -f conftest*
  4335. LIBS="$ac_save_LIBS"
  4336. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4337. echo "$ac_t""yes" 1>&6
  4338. SOCKLIB=-lsocket
  4339. else
  4340. echo "$ac_t""no" 1>&6
  4341. have_socket=0
  4342. echo "configure: warning: *** Unable to locate socket() function." 1>&2
  4343. fi
  4344. fi
  4345. if test "$have_socket" = 1 ; then
  4346. HAVE_SOCKET=1
  4347. cat >> confdefs.h <<\EOF
  4348. #define HAVE_SOCKET 1
  4349. EOF
  4350. else
  4351. HAVE_SOCKET=
  4352. fi
  4353. # Mandatory zlib dependency
  4354. ZLIBLIBPATH=
  4355. ZLIBINCPATH=
  4356. ZLIB=
  4357. # With zlib includes directory
  4358. echo $ac_n "checking for location of zlib includes""... $ac_c" 1>&6
  4359. echo "configure:5194: checking for location of zlib includes" >&5
  4360. case "$with_zlib_includes" in
  4361. y | ye | yes | n | no)
  4362. { echo "configure: error: *** You must supply a directory to --with-zlib-includes." 1>&2; exit 1; }
  4363. ;;
  4364. esac
  4365. echo "$ac_t""$with_zlib_includes" 1>&6
  4366. if test -n "$with_zlib_includes" ; then
  4367. for dir in $with_zlib_includes; do
  4368. if test -d "$dir"; then
  4369. ZLIBINCPATH="$ZLIBINCPATH -I$dir"
  4370. else
  4371. { echo "configure: error: *** zlib includes directory $dir does not exist." 1>&2; exit 1; }
  4372. fi
  4373. done
  4374. fi
  4375. ac_save_cppflags="$CPPFLAGS"
  4376. CPPFLAGS="$ZLIBINCPATH $CPPFLAGS"
  4377. for ac_hdr in zlib.h
  4378. do
  4379. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4380. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4381. echo "configure:5220: checking for $ac_hdr" >&5
  4382. cat > conftest.$ac_ext <<EOF
  4383. #line 5223 "configure"
  4384. #include "confdefs.h"
  4385. #include <$ac_hdr>
  4386. EOF
  4387. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4388. { (eval echo configure:5228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4389. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4390. if test -z "$ac_err"; then
  4391. rm -rf conftest*
  4392. eval "ac_cv_header_$ac_safe=yes"
  4393. else
  4394. echo "$ac_err" >&5
  4395. echo "configure: failed program was:" >&5
  4396. cat conftest.$ac_ext >&5
  4397. rm -rf conftest*
  4398. eval "ac_cv_header_$ac_safe=no"
  4399. fi
  4400. rm -f conftest*
  4401. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4402. echo "$ac_t""yes" 1>&6
  4403. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4404. cat >> confdefs.h <<EOF
  4405. #define $ac_tr_hdr 1
  4406. EOF
  4407. else
  4408. echo "$ac_t""no" 1>&6
  4409. { echo "configure: error: *** Unable to locate zlib includes." 1>&2; exit 1; }
  4410. fi
  4411. done
  4412. CPPFLAGS=$ac_save_cppflags
  4413. # With zlib library directory
  4414. echo $ac_n "checking for location of zlib library""... $ac_c" 1>&6
  4415. echo "configure:5262: checking for location of zlib library" >&5
  4416. case "$with_zlib_libs" in
  4417. y | ye | yes | n | no)
  4418. { echo "configure: error: *** You must supply a directory to --with-zlib-libs." 1>&2; exit 1; }
  4419. ;;
  4420. esac
  4421. echo "$ac_t""$with_zlib_libs" 1>&6
  4422. if test -n "$with_zlib_libs"; then
  4423. for dir in $with_zlib_libs; do
  4424. if test -d "$dir"; then
  4425. ZLIBLIBPATH="$ZLIBLIBPATH -L$dir"
  4426. else
  4427. { echo "configure: error: *** zlib library directory $dir does not exist." 1>&2; exit 1; }
  4428. fi
  4429. done
  4430. fi
  4431. ac_save_ldflags="$LDFLAGS"
  4432. LDFLAGS="$ZLIBLIBPATH $LDFLAGS"
  4433. echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
  4434. echo "configure:5287: checking for deflate in -lz" >&5
  4435. ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
  4436. ac_save_LIBS="$LIBS"
  4437. LIBS="-lz $LIBS"
  4438. cat > conftest.$ac_ext <<EOF
  4439. #line 5293 "configure"
  4440. #include "confdefs.h"
  4441. /* Override any gcc2 internal prototype to avoid an error. */
  4442. /* We use char because int might match the return type of a gcc2
  4443. builtin and then its argument prototype would still apply. */
  4444. char deflate();
  4445. int main() {
  4446. deflate()
  4447. ; return 0; }
  4448. EOF
  4449. if { (eval echo configure:5304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4450. rm -rf conftest*
  4451. eval "ac_cv_lib_$ac_lib_var=yes"
  4452. else
  4453. echo "configure: failed program was:" >&5
  4454. cat conftest.$ac_ext >&5
  4455. rm -rf conftest*
  4456. eval "ac_cv_lib_$ac_lib_var=no"
  4457. fi
  4458. rm -f conftest*
  4459. LIBS="$ac_save_LIBS"
  4460. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4461. echo "$ac_t""yes" 1>&6
  4462. ZLIB="$ZLIB -lz "
  4463. else
  4464. echo "$ac_t""no" 1>&6
  4465. LDFLAGS=${ac_save_ldflags}
  4466. { echo "configure: error: *** Unable to locate zlib library." 1>&2; exit 1; }
  4467. fi
  4468. LDFLAGS=${ac_save_ldflags}
  4469. #
  4470. # Done checking zlib
  4471. # bzip2 support
  4472. BZIP2LIBPATH=
  4473. BZIP2INCPATH=
  4474. BZIP2LIB=
  4475. echo $ac_n "checking whether to use bzlib""... $ac_c" 1>&6
  4476. echo "configure:5350: checking whether to use bzlib" >&5
  4477. echo "$ac_t"""$with_bzlib"" 1>&6
  4478. case "$with_bzlib" in
  4479. "no") USE_BZIP2= ;;
  4480. "yes") USE_BZIP2="1" ;;
  4481. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  4482. esac
  4483. if test -n "$USE_BZIP2"; then
  4484. # With bzip2 includes directory
  4485. echo $ac_n "checking for location of bzlib includes""... $ac_c" 1>&6
  4486. echo "configure:5366: checking for location of bzlib includes" >&5
  4487. case "$with_bzlib_includes" in
  4488. y | ye | yes | n | no)
  4489. { echo "configure: error: *** You must supply a directory to --with-bzlib-includes." 1>&2; exit 1; }
  4490. ;;
  4491. esac
  4492. echo "$ac_t""$with_bzlib_includes" 1>&6
  4493. if test -n "$with_bzlib_includes" ; then
  4494. for dir in $with_bzlib_includes; do
  4495. if test -d "$dir"; then
  4496. BZIP2INCPATH="$BZIP2INCPATH -I$dir"
  4497. else
  4498. { echo "configure: error: *** bzlib includes directory $dir does not exist." 1>&2; exit 1; }
  4499. fi
  4500. done
  4501. fi
  4502. ac_save_cppflags="$CPPFLAGS"
  4503. CPPFLAGS="$BZIP2INCPATH $CPPFLAGS"
  4504. for ac_hdr in bzlib.h
  4505. do
  4506. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4507. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4508. echo "configure:5392: checking for $ac_hdr" >&5
  4509. cat > conftest.$ac_ext <<EOF
  4510. #line 5395 "configure"
  4511. #include "confdefs.h"
  4512. #include <$ac_hdr>
  4513. EOF
  4514. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4515. { (eval echo configure:5400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4516. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4517. if test -z "$ac_err"; then
  4518. rm -rf conftest*
  4519. eval "ac_cv_header_$ac_safe=yes"
  4520. else
  4521. echo "$ac_err" >&5
  4522. echo "configure: failed program was:" >&5
  4523. cat conftest.$ac_ext >&5
  4524. rm -rf conftest*
  4525. eval "ac_cv_header_$ac_safe=no"
  4526. fi
  4527. rm -f conftest*
  4528. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4529. echo "$ac_t""yes" 1>&6
  4530. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4531. cat >> confdefs.h <<EOF
  4532. #define $ac_tr_hdr 1
  4533. EOF
  4534. else
  4535. echo "$ac_t""no" 1>&6
  4536. { echo "configure: error: *** Unable to locate bzlib includes." 1>&2; exit 1; }
  4537. fi
  4538. done
  4539. CPPFLAGS=$ac_save_cppflags
  4540. # With bzip2 library directory
  4541. echo $ac_n "checking for location of bzlib library""... $ac_c" 1>&6
  4542. echo "configure:5434: checking for location of bzlib library" >&5
  4543. case "$with_bzlib_libs" in
  4544. y | ye | yes | n | no)
  4545. { echo "configure: error: *** You must supply a directory to --with-bzlib-libs." 1>&2; exit 1; }
  4546. ;;
  4547. esac
  4548. echo "$ac_t""$with_bzlib_libs" 1>&6
  4549. if test -n "$with_bzlib_libs"; then
  4550. for dir in $with_bzlib_libs; do
  4551. if test -d "$dir"; then
  4552. BZIP2LIBPATH="$BZIP2LIBPATH -L$dir"
  4553. else
  4554. { echo "configure: error: *** bzlib library directory $dir does not exist." 1>&2; exit 1; }
  4555. fi
  4556. done
  4557. fi
  4558. ac_save_ldflags="$LDFLAGS"
  4559. LDFLAGS="$BZIP2LIBPATH $LDFLAGS"
  4560. echo $ac_n "checking for BZ2_bzBuffToBuffCompress in -lbz2""... $ac_c" 1>&6
  4561. echo "configure:5459: checking for BZ2_bzBuffToBuffCompress in -lbz2" >&5
  4562. ac_lib_var=`echo bz2'_'BZ2_bzBuffToBuffCompress | sed 'y%./+-%__p_%'`
  4563. ac_save_LIBS="$LIBS"
  4564. LIBS="-lbz2 $LIBS"
  4565. cat > conftest.$ac_ext <<EOF
  4566. #line 5465 "configure"
  4567. #include "confdefs.h"
  4568. /* Override any gcc2 internal prototype to avoid an error. */
  4569. /* We use char because int might match the return type of a gcc2
  4570. builtin and then its argument prototype would still apply. */
  4571. char BZ2_bzBuffToBuffCompress();
  4572. int main() {
  4573. BZ2_bzBuffToBuffCompress()
  4574. ; return 0; }
  4575. EOF
  4576. if { (eval echo configure:5476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4577. rm -rf conftest*
  4578. eval "ac_cv_lib_$ac_lib_var=yes"
  4579. else
  4580. echo "configure: failed program was:" >&5
  4581. cat conftest.$ac_ext >&5
  4582. rm -rf conftest*
  4583. eval "ac_cv_lib_$ac_lib_var=no"
  4584. fi
  4585. rm -f conftest*
  4586. LIBS="$ac_save_LIBS"
  4587. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4588. echo "$ac_t""yes" 1>&6
  4589. BZIP2LIB="$BZIP2LIB -lbz2 "
  4590. else
  4591. echo "$ac_t""no" 1>&6
  4592. LDFLAGS=${ac_save_ldflags}
  4593. { echo "configure: error: *** Unable to locate bzlib library." 1>&2; exit 1; }
  4594. fi
  4595. LDFLAGS=${ac_save_ldflags}
  4596. #
  4597. fi # $USE_BZIP2
  4598. # Done checking bzip2
  4599. # zstd support
  4600. ZSTDLIBPATH=
  4601. ZSTDINCPATH=
  4602. ZSTDLIB=
  4603. echo $ac_n "checking whether to use zstd""... $ac_c" 1>&6
  4604. echo "configure:5524: checking whether to use zstd" >&5
  4605. echo "$ac_t"""$with_zstd"" 1>&6
  4606. case "$with_zstd" in
  4607. "no") USE_ZSTD= ;;
  4608. "yes") USE_ZSTD="1" ;;
  4609. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  4610. esac
  4611. if test -n "$USE_ZSTD"; then
  4612. # With zstd includes directory
  4613. echo $ac_n "checking for location of zstd includes""... $ac_c" 1>&6
  4614. echo "configure:5540: checking for location of zstd includes" >&5
  4615. case "$with_zstd_includes" in
  4616. y | ye | yes | n | no)
  4617. { echo "configure: error: *** You must supply a directory to --with-zstd-includes." 1>&2; exit 1; }
  4618. ;;
  4619. esac
  4620. echo "$ac_t""$with_zstd_includes" 1>&6
  4621. if test -n "$with_zstd_includes" ; then
  4622. for dir in $with_zstd_includes; do
  4623. if test -d "$dir"; then
  4624. ZSTDINCPATH="$ZSTDINCPATH -I$dir"
  4625. else
  4626. { echo "configure: error: *** zstd includes directory $dir does not exist." 1>&2; exit 1; }
  4627. fi
  4628. done
  4629. fi
  4630. ac_save_cppflags="$CPPFLAGS"
  4631. CPPFLAGS="$ZSTDINCPATH $CPPFLAGS"
  4632. for ac_hdr in zstd.h
  4633. do
  4634. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4635. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4636. echo "configure:5565: checking for $ac_hdr" >&5
  4637. cat > conftest.$ac_ext <<EOF
  4638. #line 5568 "configure"
  4639. #include "confdefs.h"
  4640. #include <$ac_hdr>
  4641. EOF
  4642. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4643. { (eval echo configure:5573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4644. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4645. if test -z "$ac_err"; then
  4646. rm -rf conftest*
  4647. eval "ac_cv_header_$ac_safe=yes"
  4648. else
  4649. echo "$ac_err" >&5
  4650. echo "configure: failed program was:" >&5
  4651. cat conftest.$ac_ext >&5
  4652. rm -rf conftest*
  4653. eval "ac_cv_header_$ac_safe=no"
  4654. fi
  4655. rm -f conftest*
  4656. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4657. echo "$ac_t""yes" 1>&6
  4658. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4659. cat >> confdefs.h <<EOF
  4660. #define $ac_tr_hdr 1
  4661. EOF
  4662. else
  4663. echo "$ac_t""no" 1>&6
  4664. { echo "configure: error: *** Unable to locate zstd includes." 1>&2; exit 1; }
  4665. fi
  4666. done
  4667. CPPFLAGS=$ac_save_cppflags
  4668. # With zstd library directory
  4669. echo $ac_n "checking for location of zstd library""... $ac_c" 1>&6
  4670. echo "configure:5607: checking for location of zstd library" >&5
  4671. case "$with_zstd_libs" in
  4672. y | ye | yes | n | no)
  4673. { echo "configure: error: *** You must supply a directory to --with-zstd-libs." 1>&2; exit 1; }
  4674. ;;
  4675. esac
  4676. echo "$ac_t""$with_zstd_libs" 1>&6
  4677. if test -n "$with_zstd_libs"; then
  4678. for dir in $with_zstd_libs; do
  4679. if test -d "$dir"; then
  4680. ZSTDLIBPATH="$ZSTDLIBPATH -L$dir"
  4681. else
  4682. { echo "configure: error: *** zstd library directory $dir does not exist." 1>&2; exit 1; }
  4683. fi
  4684. done
  4685. fi
  4686. ac_save_ldflags="$LDFLAGS"
  4687. LDFLAGS="$ZSTDLIBPATH $LDFLAGS"
  4688. echo $ac_n "checking for ZSTD_compress in -lzstd""... $ac_c" 1>&6
  4689. echo "configure:5632: checking for ZSTD_compress in -lzstd" >&5
  4690. ac_lib_var=`echo zstd'_'ZSTD_compress | sed 'y%./+-%__p_%'`
  4691. ac_save_LIBS="$LIBS"
  4692. LIBS="-lzstd $LIBS"
  4693. cat > conftest.$ac_ext <<EOF
  4694. #line 5638 "configure"
  4695. #include "confdefs.h"
  4696. /* Override any gcc2 internal prototype to avoid an error. */
  4697. /* We use char because int might match the return type of a gcc2
  4698. builtin and then its argument prototype would still apply. */
  4699. char ZSTD_compress();
  4700. int main() {
  4701. ZSTD_compress()
  4702. ; return 0; }
  4703. EOF
  4704. if { (eval echo configure:5649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4705. rm -rf conftest*
  4706. eval "ac_cv_lib_$ac_lib_var=yes"
  4707. else
  4708. echo "configure: failed program was:" >&5
  4709. cat conftest.$ac_ext >&5
  4710. rm -rf conftest*
  4711. eval "ac_cv_lib_$ac_lib_var=no"
  4712. fi
  4713. rm -f conftest*
  4714. LIBS="$ac_save_LIBS"
  4715. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4716. echo "$ac_t""yes" 1>&6
  4717. ZSTDLIB="$ZSTDLIB -lzstd "
  4718. else
  4719. echo "$ac_t""no" 1>&6
  4720. LDFLAGS=${ac_save_ldflags}
  4721. { echo "configure: error: *** Unable to locate zstd library." 1>&2; exit 1; }
  4722. fi
  4723. LDFLAGS=${ac_save_ldflags}
  4724. #
  4725. fi # $USE_ZSTD
  4726. # Done checking zstd
  4727. # Mandatory PROJ dependency
  4728. PROJINC=
  4729. PROJLIB=
  4730. PROJSHARE=
  4731. PROJ4API=0
  4732. # With PROJ includes directory
  4733. echo $ac_n "checking for location of External PROJ includes""... $ac_c" 1>&6
  4734. echo "configure:5700: checking for location of External PROJ includes" >&5
  4735. case "$with_proj_includes" in
  4736. y | ye | yes | n | no)
  4737. { echo "configure: error: *** You must supply a directory to --with-proj-includes." 1>&2; exit 1; }
  4738. ;;
  4739. esac
  4740. echo "$ac_t""$with_proj_includes" 1>&6
  4741. if test -n "$with_proj_includes" ; then
  4742. for dir in $with_proj_includes; do
  4743. if test -d "$dir"; then
  4744. PROJINC="$PROJINC -I$dir"
  4745. else
  4746. { echo "configure: error: *** External PROJ includes directory $dir does not exist." 1>&2; exit 1; }
  4747. fi
  4748. done
  4749. fi
  4750. # PROJ version check: if proj.h exists, it must be proj 5+
  4751. ac_save_cppflags="$CPPFLAGS"
  4752. CPPFLAGS="$PROJINC $CPPFLAGS"
  4753. for ac_hdr in proj.h
  4754. do
  4755. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4756. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4757. echo "configure:5727: checking for $ac_hdr" >&5
  4758. cat > conftest.$ac_ext <<EOF
  4759. #line 5730 "configure"
  4760. #include "confdefs.h"
  4761. #include <$ac_hdr>
  4762. EOF
  4763. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4764. { (eval echo configure:5735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4765. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4766. if test -z "$ac_err"; then
  4767. rm -rf conftest*
  4768. eval "ac_cv_header_$ac_safe=yes"
  4769. else
  4770. echo "$ac_err" >&5
  4771. echo "configure: failed program was:" >&5
  4772. cat conftest.$ac_ext >&5
  4773. rm -rf conftest*
  4774. eval "ac_cv_header_$ac_safe=no"
  4775. fi
  4776. rm -f conftest*
  4777. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4778. echo "$ac_t""yes" 1>&6
  4779. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4780. cat >> confdefs.h <<EOF
  4781. #define $ac_tr_hdr 1
  4782. EOF
  4783. else
  4784. echo "$ac_t""no" 1>&6
  4785. PROJ4API=1
  4786. fi
  4787. done
  4788. CPPFLAGS=$ac_save_cppflags
  4789. if test $PROJ4API = 0 ; then
  4790. echo "$ac_t""using new PROJ version 5+ API" 1>&6
  4791. # With PROJ library directory
  4792. echo $ac_n "checking for location of External PROJ library""... $ac_c" 1>&6
  4793. echo "configure:5771: checking for location of External PROJ library" >&5
  4794. case "$with_proj_libs" in
  4795. y | ye | yes | n | no)
  4796. { echo "configure: error: *** You must supply a directory to --with-proj-libs." 1>&2; exit 1; }
  4797. ;;
  4798. esac
  4799. echo "$ac_t""$with_proj_libs" 1>&6
  4800. if test -n "$with_proj_libs"; then
  4801. for dir in $with_proj_libs; do
  4802. if test -d "$dir"; then
  4803. PROJLIB="$PROJLIB -L$dir"
  4804. else
  4805. { echo "configure: error: *** External PROJ library directory $dir does not exist." 1>&2; exit 1; }
  4806. fi
  4807. done
  4808. fi
  4809. ac_save_ldflags="$LDFLAGS"
  4810. LDFLAGS="$PROJLIB $LDFLAGS"
  4811. echo $ac_n "checking for proj_pj_info in -lproj""... $ac_c" 1>&6
  4812. echo "configure:5795: checking for proj_pj_info in -lproj" >&5
  4813. ac_lib_var=`echo proj'_'proj_pj_info | sed 'y%./+-%__p_%'`
  4814. ac_save_LIBS="$LIBS"
  4815. LIBS="-lproj $LIBS"
  4816. cat > conftest.$ac_ext <<EOF
  4817. #line 5801 "configure"
  4818. #include "confdefs.h"
  4819. /* Override any gcc2 internal prototype to avoid an error. */
  4820. /* We use char because int might match the return type of a gcc2
  4821. builtin and then its argument prototype would still apply. */
  4822. char proj_pj_info();
  4823. int main() {
  4824. proj_pj_info()
  4825. ; return 0; }
  4826. EOF
  4827. if { (eval echo configure:5812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4828. rm -rf conftest*
  4829. eval "ac_cv_lib_$ac_lib_var=yes"
  4830. else
  4831. echo "configure: failed program was:" >&5
  4832. cat conftest.$ac_ext >&5
  4833. rm -rf conftest*
  4834. eval "ac_cv_lib_$ac_lib_var=no"
  4835. fi
  4836. rm -f conftest*
  4837. LIBS="$ac_save_LIBS"
  4838. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4839. echo "$ac_t""yes" 1>&6
  4840. PROJLIB="$PROJLIB -lproj "
  4841. else
  4842. echo "$ac_t""no" 1>&6
  4843. LDFLAGS=${ac_save_ldflags}
  4844. { echo "configure: error: *** Unable to locate External PROJ library." 1>&2; exit 1; }
  4845. fi
  4846. LDFLAGS=${ac_save_ldflags}
  4847. else
  4848. echo "$ac_t""using old PROJ version 4 API" 1>&6
  4849. ac_save_cppflags="$CPPFLAGS"
  4850. CPPFLAGS="$PROJINC $CPPFLAGS"
  4851. for ac_hdr in proj_api.h
  4852. do
  4853. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4854. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4855. echo "configure:5851: checking for $ac_hdr" >&5
  4856. cat > conftest.$ac_ext <<EOF
  4857. #line 5854 "configure"
  4858. #include "confdefs.h"
  4859. #include <$ac_hdr>
  4860. EOF
  4861. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4862. { (eval echo configure:5859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4863. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4864. if test -z "$ac_err"; then
  4865. rm -rf conftest*
  4866. eval "ac_cv_header_$ac_safe=yes"
  4867. else
  4868. echo "$ac_err" >&5
  4869. echo "configure: failed program was:" >&5
  4870. cat conftest.$ac_ext >&5
  4871. rm -rf conftest*
  4872. eval "ac_cv_header_$ac_safe=no"
  4873. fi
  4874. rm -f conftest*
  4875. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4876. echo "$ac_t""yes" 1>&6
  4877. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4878. cat >> confdefs.h <<EOF
  4879. #define $ac_tr_hdr 1
  4880. EOF
  4881. else
  4882. echo "$ac_t""no" 1>&6
  4883. { echo "configure: error: *** Unable to locate External PROJ includes." 1>&2; exit 1; }
  4884. fi
  4885. done
  4886. CPPFLAGS=$ac_save_cppflags
  4887. # PROJ version check for v4.x
  4888. if test "$cross_compiling" = yes; then
  4889. echo "configure: warning: *** Cannot check PROJ.4 version (cross-compiling)." 1>&2
  4890. else
  4891. echo $ac_n "checking External PROJ.4 version""... $ac_c" 1>&6
  4892. echo "configure:5895: checking External PROJ.4 version" >&5
  4893. ac_save_cppflags="$CPPFLAGS"
  4894. CPPFLAGS="$PROJINC $CPPFLAGS"
  4895. if test "$cross_compiling" = yes; then
  4896. proj_ver=0
  4897. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4898. else
  4899. cat > conftest.$ac_ext <<EOF
  4900. #line 5903 "configure"
  4901. #include "confdefs.h"
  4902. #include <stdio.h>
  4903. #include <proj_api.h>
  4904. int main(void) {
  4905. FILE *fp = fopen("conftestdata","w");
  4906. fprintf(fp, "%d", PJ_VERSION);
  4907. return 0;
  4908. }
  4909. EOF
  4910. if { (eval echo configure:5915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4911. then
  4912. proj_ver=`cat conftestdata`
  4913. echo "$ac_t""$proj_ver" 1>&6
  4914. else
  4915. echo "configure: failed program was:" >&5
  4916. cat conftest.$ac_ext >&5
  4917. rm -fr conftest*
  4918. { echo "configure: error: *** Could not determine External PROJ.4 version." 1>&2; exit 1; }
  4919. fi
  4920. rm -fr conftest*
  4921. fi
  4922. CPPFLAGS=$ac_save_cppflags
  4923. if test `expr "$proj_ver" \< 446` = 1 ; then
  4924. { echo "configure: error: *** PROJ.4.4.6 or later is required." 1>&2; exit 1; }
  4925. fi
  4926. fi
  4927. # With PROJ library directory
  4928. echo $ac_n "checking for location of External PROJ.4 library""... $ac_c" 1>&6
  4929. echo "configure:5940: checking for location of External PROJ.4 library" >&5
  4930. case "$with_proj_libs" in
  4931. y | ye | yes | n | no)
  4932. { echo "configure: error: *** You must supply a directory to --with-proj-libs." 1>&2; exit 1; }
  4933. ;;
  4934. esac
  4935. echo "$ac_t""$with_proj_libs" 1>&6
  4936. if test -n "$with_proj_libs"; then
  4937. for dir in $with_proj_libs; do
  4938. if test -d "$dir"; then
  4939. PROJLIB="$PROJLIB -L$dir"
  4940. else
  4941. { echo "configure: error: *** External PROJ.4 library directory $dir does not exist." 1>&2; exit 1; }
  4942. fi
  4943. done
  4944. fi
  4945. ac_save_ldflags="$LDFLAGS"
  4946. LDFLAGS="$PROJLIB $LDFLAGS"
  4947. echo $ac_n "checking for pj_get_def in -lproj""... $ac_c" 1>&6
  4948. echo "configure:5964: checking for pj_get_def in -lproj" >&5
  4949. ac_lib_var=`echo proj'_'pj_get_def | sed 'y%./+-%__p_%'`
  4950. ac_save_LIBS="$LIBS"
  4951. LIBS="-lproj $LIBS"
  4952. cat > conftest.$ac_ext <<EOF
  4953. #line 5970 "configure"
  4954. #include "confdefs.h"
  4955. /* Override any gcc2 internal prototype to avoid an error. */
  4956. /* We use char because int might match the return type of a gcc2
  4957. builtin and then its argument prototype would still apply. */
  4958. char pj_get_def();
  4959. int main() {
  4960. pj_get_def()
  4961. ; return 0; }
  4962. EOF
  4963. if { (eval echo configure:5981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4964. rm -rf conftest*
  4965. eval "ac_cv_lib_$ac_lib_var=yes"
  4966. else
  4967. echo "configure: failed program was:" >&5
  4968. cat conftest.$ac_ext >&5
  4969. rm -rf conftest*
  4970. eval "ac_cv_lib_$ac_lib_var=no"
  4971. fi
  4972. rm -f conftest*
  4973. LIBS="$ac_save_LIBS"
  4974. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4975. echo "$ac_t""yes" 1>&6
  4976. PROJLIB="$PROJLIB -lproj "
  4977. else
  4978. echo "$ac_t""no" 1>&6
  4979. LDFLAGS=${ac_save_ldflags}
  4980. { echo "configure: error: *** Unable to locate External PROJ.4 library." 1>&2; exit 1; }
  4981. fi
  4982. LDFLAGS=${ac_save_ldflags}
  4983. fi
  4984. # With PROJ share directory
  4985. echo $ac_n "checking for location of External PROJ data files""... $ac_c" 1>&6
  4986. echo "configure:6016: checking for location of External PROJ data files" >&5
  4987. case "$with_proj_share" in
  4988. y | ye | yes | n | no)
  4989. { echo "configure: error: *** You must supply a directory to --with-proj-share." 1>&2; exit 1; }
  4990. ;;
  4991. esac
  4992. echo "$ac_t""$with_proj_share" 1>&6
  4993. if test -n "$with_proj_share" ; then
  4994. if test -d "$with_proj_share"; then
  4995. PROJSHARE="$with_proj_share"
  4996. else
  4997. { echo "configure: error: *** External PROJ data directory $dir does not exist." 1>&2; exit 1; }
  4998. fi
  4999. fi
  5000. if test -z "$PROJSHARE" ; then
  5001. echo "configure: warning: *** External PROJ directory not specified; default will be used" 1>&2
  5002. PROJSHARE=/usr/share/proj
  5003. fi
  5004. # LOC_CHECK_SHARE does not work when cross compiling
  5005. if test "$cross_compiling" = "yes" ; then
  5006. echo $ac_n "checking for epsg""... $ac_c" 1>&6
  5007. echo "configure:6040: checking for epsg" >&5
  5008. echo "$ac_t""unknown (cross-compiling)" 1>&6
  5009. else
  5010. ac_safe=`echo "$PROJSHARE/epsg" | sed 'y%./+-%__p_%'`
  5011. echo $ac_n "checking for $PROJSHARE/epsg""... $ac_c" 1>&6
  5012. echo "configure:6047: checking for $PROJSHARE/epsg" >&5
  5013. if test "$cross_compiling" = yes; then
  5014. { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
  5015. else
  5016. if test -r $PROJSHARE/epsg; then
  5017. eval "ac_cv_file_$ac_safe=yes"
  5018. else
  5019. eval "ac_cv_file_$ac_safe=no"
  5020. fi
  5021. fi
  5022. if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  5023. echo "$ac_t""yes" 1>&6
  5024. :
  5025. else
  5026. echo "$ac_t""no" 1>&6
  5027. echo "configure: warning: *** Unable to locate PROJ data files." 1>&2
  5028. fi
  5029. fi
  5030. # nad2bin needs to be in path for installing datum gridshift files
  5031. # Extract the first word of "nad2bin", so it can be a program name with args.
  5032. set dummy nad2bin; ac_word=$2
  5033. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5034. echo "configure:6079: checking for $ac_word" >&5
  5035. case "$NAD2BIN" in
  5036. /*)
  5037. ac_cv_path_NAD2BIN="$NAD2BIN" # Let the user override the test with a path.
  5038. ;;
  5039. ?:/*)
  5040. ac_cv_path_NAD2BIN="$NAD2BIN" # Let the user override the test with a dos path.
  5041. ;;
  5042. *)
  5043. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5044. ac_dummy="$PATH"
  5045. for ac_dir in $ac_dummy; do
  5046. test -z "$ac_dir" && ac_dir=.
  5047. if test -f $ac_dir/$ac_word; then
  5048. ac_cv_path_NAD2BIN="$ac_dir/$ac_word"
  5049. break
  5050. fi
  5051. done
  5052. IFS="$ac_save_ifs"
  5053. test -z "$ac_cv_path_NAD2BIN" && ac_cv_path_NAD2BIN="no"
  5054. ;;
  5055. esac
  5056. NAD2BIN="$ac_cv_path_NAD2BIN"
  5057. if test -n "$NAD2BIN"; then
  5058. echo "$ac_t""$NAD2BIN" 1>&6
  5059. else
  5060. echo "$ac_t""no" 1>&6
  5061. fi
  5062. if test "$NAD2BIN" = "no"; then
  5063. { echo "configure: error: *** Unable to locate nad2bin (needs to be in PATH)." 1>&2; exit 1; }
  5064. fi
  5065. # Done checking PROJ
  5066. # Enable regex option
  5067. echo $ac_n "checking whether to use regex""... $ac_c" 1>&6
  5068. echo "configure:6119: checking whether to use regex" >&5
  5069. echo "$ac_t"""$with_regex"" 1>&6
  5070. case "$with_regex" in
  5071. "no") USE_REGEX= ;;
  5072. "yes") USE_REGEX="1" ;;
  5073. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5074. esac
  5075. REGEXINCPATH=
  5076. REGEXLIBPATH=
  5077. REGEXLIB=
  5078. if test -n "$USE_REGEX"; then
  5079. # With regex includes directory
  5080. echo $ac_n "checking for location of regex includes""... $ac_c" 1>&6
  5081. echo "configure:6139: checking for location of regex includes" >&5
  5082. case "$with_regex_includes" in
  5083. y | ye | yes | n | no)
  5084. { echo "configure: error: *** You must supply a directory to --with-regex-includes." 1>&2; exit 1; }
  5085. ;;
  5086. esac
  5087. echo "$ac_t""$with_regex_includes" 1>&6
  5088. if test -n "$with_regex_includes" ; then
  5089. for dir in $with_regex_includes; do
  5090. if test -d "$dir"; then
  5091. REGEXINCPATH="$REGEXINCPATH -I$dir"
  5092. else
  5093. { echo "configure: error: *** regex includes directory $dir does not exist." 1>&2; exit 1; }
  5094. fi
  5095. done
  5096. fi
  5097. ac_save_cppflags="$CPPFLAGS"
  5098. CPPFLAGS="$REGEXINCPATH $CPPFLAGS"
  5099. for ac_hdr in regex.h
  5100. do
  5101. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5102. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5103. echo "configure:6165: checking for $ac_hdr" >&5
  5104. cat > conftest.$ac_ext <<EOF
  5105. #line 6168 "configure"
  5106. #include "confdefs.h"
  5107. #include <$ac_hdr>
  5108. EOF
  5109. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5110. { (eval echo configure:6173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5111. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5112. if test -z "$ac_err"; then
  5113. rm -rf conftest*
  5114. eval "ac_cv_header_$ac_safe=yes"
  5115. else
  5116. echo "$ac_err" >&5
  5117. echo "configure: failed program was:" >&5
  5118. cat conftest.$ac_ext >&5
  5119. rm -rf conftest*
  5120. eval "ac_cv_header_$ac_safe=no"
  5121. fi
  5122. rm -f conftest*
  5123. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5124. echo "$ac_t""yes" 1>&6
  5125. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5126. cat >> confdefs.h <<EOF
  5127. #define $ac_tr_hdr 1
  5128. EOF
  5129. else
  5130. echo "$ac_t""no" 1>&6
  5131. { echo "configure: error: *** Unable to locate regex includes." 1>&2; exit 1; }
  5132. fi
  5133. done
  5134. CPPFLAGS=$ac_save_cppflags
  5135. # With regex library directory
  5136. echo $ac_n "checking for location of regex library""... $ac_c" 1>&6
  5137. echo "configure:6207: checking for location of regex library" >&5
  5138. case "$with_regex_libs" in
  5139. y | ye | yes | n | no)
  5140. { echo "configure: error: *** You must supply a directory to --with-regex-libs." 1>&2; exit 1; }
  5141. ;;
  5142. esac
  5143. echo "$ac_t""$with_regex_libs" 1>&6
  5144. if test -n "$with_regex_libs"; then
  5145. for dir in $with_regex_libs; do
  5146. if test -d "$dir"; then
  5147. REGEXLIBPATH="$REGEXLIBPATH -L$dir"
  5148. else
  5149. { echo "configure: error: *** regex library directory $dir does not exist." 1>&2; exit 1; }
  5150. fi
  5151. done
  5152. fi
  5153. ac_save_libs="$LIBS"
  5154. ac_save_ldflags="$LDFLAGS"
  5155. LIBS=" $LIBS"
  5156. LDFLAGS=" $LDFLAGS"
  5157. echo $ac_n "checking for regcomp""... $ac_c" 1>&6
  5158. echo "configure:6232: checking for regcomp" >&5
  5159. cat > conftest.$ac_ext <<EOF
  5160. #line 6235 "configure"
  5161. #include "confdefs.h"
  5162. /* System header to define __stub macros and hopefully few prototypes,
  5163. which can conflict with char regcomp(); below. */
  5164. #include <assert.h>
  5165. /* Override any gcc2 internal prototype to avoid an error. */
  5166. /* We use char because int might match the return type of a gcc2
  5167. builtin and then its argument prototype would still apply. */
  5168. char regcomp();
  5169. int main() {
  5170. /* The GNU C library defines this for functions which it implements
  5171. to always fail with ENOSYS. Some functions are actually named
  5172. something starting with __ and the normal name is an alias. */
  5173. #if defined (__stub_regcomp) || defined (__stub___regcomp)
  5174. choke me
  5175. #else
  5176. regcomp();
  5177. #endif
  5178. ; return 0; }
  5179. EOF
  5180. if { (eval echo configure:6258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5181. rm -rf conftest*
  5182. eval "ac_cv_func_regcomp=yes"
  5183. else
  5184. echo "configure: failed program was:" >&5
  5185. cat conftest.$ac_ext >&5
  5186. rm -rf conftest*
  5187. eval "ac_cv_func_regcomp=no"
  5188. fi
  5189. rm -f conftest*
  5190. if eval "test \"`echo '$ac_cv_func_'regcomp`\" = yes"; then
  5191. echo "$ac_t""yes" 1>&6
  5192. REGEXLIB="$REGEXLIB "
  5193. else
  5194. echo "$ac_t""no" 1>&6
  5195. ac_save_ldflags="$LDFLAGS"
  5196. LDFLAGS="$REGEXLIBPATH $LDFLAGS"
  5197. echo $ac_n "checking for regcomp in -lregex""... $ac_c" 1>&6
  5198. echo "configure:6285: checking for regcomp in -lregex" >&5
  5199. ac_lib_var=`echo regex'_'regcomp | sed 'y%./+-%__p_%'`
  5200. ac_save_LIBS="$LIBS"
  5201. LIBS="-lregex $LIBS"
  5202. cat > conftest.$ac_ext <<EOF
  5203. #line 6291 "configure"
  5204. #include "confdefs.h"
  5205. /* Override any gcc2 internal prototype to avoid an error. */
  5206. /* We use char because int might match the return type of a gcc2
  5207. builtin and then its argument prototype would still apply. */
  5208. char regcomp();
  5209. int main() {
  5210. regcomp()
  5211. ; return 0; }
  5212. EOF
  5213. if { (eval echo configure:6302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5214. rm -rf conftest*
  5215. eval "ac_cv_lib_$ac_lib_var=yes"
  5216. else
  5217. echo "configure: failed program was:" >&5
  5218. cat conftest.$ac_ext >&5
  5219. rm -rf conftest*
  5220. eval "ac_cv_lib_$ac_lib_var=no"
  5221. fi
  5222. rm -f conftest*
  5223. LIBS="$ac_save_LIBS"
  5224. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5225. echo "$ac_t""yes" 1>&6
  5226. REGEXLIB="$REGEXLIB -lregex "
  5227. else
  5228. echo "$ac_t""no" 1>&6
  5229. LDFLAGS=${ac_save_ldflags}
  5230. { echo "configure: error: *** Unable to locate regex library." 1>&2; exit 1; }
  5231. fi
  5232. LDFLAGS=${ac_save_ldflags}
  5233. fi
  5234. LIBS=${ac_save_libs}
  5235. LDFLAGS=${ac_save_ldflags}
  5236. fi # $USE_REGEX
  5237. # Done checking regex
  5238. # Enable Readline option
  5239. echo $ac_n "checking whether to use Readline""... $ac_c" 1>&6
  5240. echo "configure:6352: checking whether to use Readline" >&5
  5241. echo "$ac_t"""$with_readline"" 1>&6
  5242. case "$with_readline" in
  5243. "no") USE_READLINE= ;;
  5244. "yes") USE_READLINE="1" ;;
  5245. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5246. esac
  5247. READLINEINCPATH=
  5248. READLINELIBPATH=
  5249. READLINELIB=
  5250. HISTORYLIB=
  5251. if test -n "$USE_READLINE"; then
  5252. # With Readline includes directory
  5253. echo $ac_n "checking for location of Readline includes""... $ac_c" 1>&6
  5254. echo "configure:6373: checking for location of Readline includes" >&5
  5255. case "$with_readline_includes" in
  5256. y | ye | yes | n | no)
  5257. { echo "configure: error: *** You must supply a directory to --with-readline-includes." 1>&2; exit 1; }
  5258. ;;
  5259. esac
  5260. echo "$ac_t""$with_readline_includes" 1>&6
  5261. if test -n "$with_readline_includes" ; then
  5262. for dir in $with_readline_includes; do
  5263. if test -d "$dir"; then
  5264. READLINEINCPATH="$READLINEINCPATH -I$dir"
  5265. else
  5266. { echo "configure: error: *** Readline includes directory $dir does not exist." 1>&2; exit 1; }
  5267. fi
  5268. done
  5269. fi
  5270. ac_save_cppflags="$CPPFLAGS"
  5271. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  5272. for ac_hdr in readline/readline.h
  5273. do
  5274. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5275. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5276. echo "configure:6399: checking for $ac_hdr" >&5
  5277. cat > conftest.$ac_ext <<EOF
  5278. #line 6402 "configure"
  5279. #include "confdefs.h"
  5280. #include <$ac_hdr>
  5281. EOF
  5282. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5283. { (eval echo configure:6407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5284. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5285. if test -z "$ac_err"; then
  5286. rm -rf conftest*
  5287. eval "ac_cv_header_$ac_safe=yes"
  5288. else
  5289. echo "$ac_err" >&5
  5290. echo "configure: failed program was:" >&5
  5291. cat conftest.$ac_ext >&5
  5292. rm -rf conftest*
  5293. eval "ac_cv_header_$ac_safe=no"
  5294. fi
  5295. rm -f conftest*
  5296. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5297. echo "$ac_t""yes" 1>&6
  5298. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5299. cat >> confdefs.h <<EOF
  5300. #define $ac_tr_hdr 1
  5301. EOF
  5302. else
  5303. echo "$ac_t""no" 1>&6
  5304. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  5305. fi
  5306. done
  5307. CPPFLAGS=$ac_save_cppflags
  5308. ac_save_cppflags="$CPPFLAGS"
  5309. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  5310. for ac_hdr in readline/history.h
  5311. do
  5312. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5313. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5314. echo "configure:6443: checking for $ac_hdr" >&5
  5315. cat > conftest.$ac_ext <<EOF
  5316. #line 6446 "configure"
  5317. #include "confdefs.h"
  5318. #include <$ac_hdr>
  5319. EOF
  5320. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5321. { (eval echo configure:6451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5322. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5323. if test -z "$ac_err"; then
  5324. rm -rf conftest*
  5325. eval "ac_cv_header_$ac_safe=yes"
  5326. else
  5327. echo "$ac_err" >&5
  5328. echo "configure: failed program was:" >&5
  5329. cat conftest.$ac_ext >&5
  5330. rm -rf conftest*
  5331. eval "ac_cv_header_$ac_safe=no"
  5332. fi
  5333. rm -f conftest*
  5334. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5335. echo "$ac_t""yes" 1>&6
  5336. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5337. cat >> confdefs.h <<EOF
  5338. #define $ac_tr_hdr 1
  5339. EOF
  5340. else
  5341. echo "$ac_t""no" 1>&6
  5342. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  5343. fi
  5344. done
  5345. CPPFLAGS=$ac_save_cppflags
  5346. # With Readline library directory
  5347. echo $ac_n "checking for location of Readline library""... $ac_c" 1>&6
  5348. echo "configure:6485: checking for location of Readline library" >&5
  5349. case "$with_readline_libs" in
  5350. y | ye | yes | n | no)
  5351. { echo "configure: error: *** You must supply a directory to --with-readline-libs." 1>&2; exit 1; }
  5352. ;;
  5353. esac
  5354. echo "$ac_t""$with_readline_libs" 1>&6
  5355. if test -n "$with_readline_libs"; then
  5356. for dir in $with_readline_libs; do
  5357. if test -d "$dir"; then
  5358. READLINELIBPATH="$READLINELIBPATH -L$dir"
  5359. else
  5360. { echo "configure: error: *** Readline library directory $dir does not exist." 1>&2; exit 1; }
  5361. fi
  5362. done
  5363. fi
  5364. ac_save_ldflags="$LDFLAGS"
  5365. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  5366. echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
  5367. echo "configure:6510: checking for readline in -lreadline" >&5
  5368. ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
  5369. ac_save_LIBS="$LIBS"
  5370. LIBS="-lreadline $LIBS"
  5371. cat > conftest.$ac_ext <<EOF
  5372. #line 6516 "configure"
  5373. #include "confdefs.h"
  5374. /* Override any gcc2 internal prototype to avoid an error. */
  5375. /* We use char because int might match the return type of a gcc2
  5376. builtin and then its argument prototype would still apply. */
  5377. char readline();
  5378. int main() {
  5379. readline()
  5380. ; return 0; }
  5381. EOF
  5382. if { (eval echo configure:6527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5383. rm -rf conftest*
  5384. eval "ac_cv_lib_$ac_lib_var=yes"
  5385. else
  5386. echo "configure: failed program was:" >&5
  5387. cat conftest.$ac_ext >&5
  5388. rm -rf conftest*
  5389. eval "ac_cv_lib_$ac_lib_var=no"
  5390. fi
  5391. rm -f conftest*
  5392. LIBS="$ac_save_LIBS"
  5393. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5394. echo "$ac_t""yes" 1>&6
  5395. READLINELIB="$READLINELIB -lreadline "
  5396. else
  5397. echo "$ac_t""no" 1>&6
  5398. LDFLAGS=${ac_save_ldflags}
  5399. { echo "configure: error: *** Unable to locate Readline library." 1>&2; exit 1; }
  5400. fi
  5401. LDFLAGS=${ac_save_ldflags}
  5402. ac_save_ldflags="$LDFLAGS"
  5403. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  5404. echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
  5405. echo "configure:6562: checking for add_history in -lhistory" >&5
  5406. ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
  5407. ac_save_LIBS="$LIBS"
  5408. LIBS="-lhistory $LIBS"
  5409. cat > conftest.$ac_ext <<EOF
  5410. #line 6568 "configure"
  5411. #include "confdefs.h"
  5412. /* Override any gcc2 internal prototype to avoid an error. */
  5413. /* We use char because int might match the return type of a gcc2
  5414. builtin and then its argument prototype would still apply. */
  5415. char add_history();
  5416. int main() {
  5417. add_history()
  5418. ; return 0; }
  5419. EOF
  5420. if { (eval echo configure:6579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5421. rm -rf conftest*
  5422. eval "ac_cv_lib_$ac_lib_var=yes"
  5423. else
  5424. echo "configure: failed program was:" >&5
  5425. cat conftest.$ac_ext >&5
  5426. rm -rf conftest*
  5427. eval "ac_cv_lib_$ac_lib_var=no"
  5428. fi
  5429. rm -f conftest*
  5430. LIBS="$ac_save_LIBS"
  5431. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5432. echo "$ac_t""yes" 1>&6
  5433. HISTORYLIB="$HISTORYLIB -lhistory "
  5434. else
  5435. echo "$ac_t""no" 1>&6
  5436. LDFLAGS=${ac_save_ldflags}
  5437. { echo "configure: error: *** Unable to locate History library." 1>&2; exit 1; }
  5438. fi
  5439. LDFLAGS=${ac_save_ldflags}
  5440. fi # $USE_READLINE
  5441. # Done checking Readline
  5442. # GDAL option
  5443. echo $ac_n "checking whether to use GDAL""... $ac_c" 1>&6
  5444. echo "configure:6621: checking whether to use GDAL" >&5
  5445. GDAL_LIBS=
  5446. GDAL_CFLAGS=
  5447. USE_GDAL=
  5448. USE_OGR=
  5449. if test "`basename xx/$with_gdal`" = "gdal-config" ; then
  5450. GDAL_CONFIG="$with_gdal"
  5451. fi
  5452. if test "$with_gdal" = "no" ; then
  5453. echo "$ac_t""no" 1>&6
  5454. else
  5455. echo "$ac_t""yes" 1>&6
  5456. # Extract the first word of "gdal-config", so it can be a program name with args.
  5457. set dummy gdal-config; ac_word=$2
  5458. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5459. echo "configure:6639: checking for $ac_word" >&5
  5460. case "$GDAL_CONFIG" in
  5461. /*)
  5462. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a path.
  5463. ;;
  5464. ?:/*)
  5465. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a dos path.
  5466. ;;
  5467. *)
  5468. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5469. ac_dummy="$PATH"
  5470. for ac_dir in $ac_dummy; do
  5471. test -z "$ac_dir" && ac_dir=.
  5472. if test -f $ac_dir/$ac_word; then
  5473. ac_cv_path_GDAL_CONFIG="$ac_dir/$ac_word"
  5474. break
  5475. fi
  5476. done
  5477. IFS="$ac_save_ifs"
  5478. test -z "$ac_cv_path_GDAL_CONFIG" && ac_cv_path_GDAL_CONFIG="no"
  5479. ;;
  5480. esac
  5481. GDAL_CONFIG="$ac_cv_path_GDAL_CONFIG"
  5482. if test -n "$GDAL_CONFIG"; then
  5483. echo "$ac_t""$GDAL_CONFIG" 1>&6
  5484. else
  5485. echo "$ac_t""no" 1>&6
  5486. fi
  5487. if test "$GDAL_CONFIG" = "no" ; then
  5488. { echo "configure: error: *** couldn't find gdal-config" 1>&2; exit 1; }
  5489. fi
  5490. if test "$GDAL_CONFIG" != "" ; then
  5491. GDAL_LIBS=`"$GDAL_CONFIG" --libs`
  5492. GDAL_DEP_LIBS=`"$GDAL_CONFIG" --dep-libs`
  5493. GDAL_CFLAGS=`"$GDAL_CONFIG" --cflags`
  5494. USE_GDAL=1
  5495. if test `"$GDAL_CONFIG" --ogr-enabled` = "yes" ; then
  5496. cat >> confdefs.h <<\EOF
  5497. #define HAVE_OGR 1
  5498. EOF
  5499. USE_OGR=1
  5500. fi
  5501. fi
  5502. GDAL=
  5503. ac_save_libs="$LIBS"
  5504. ac_save_cflags="$CFLAGS"
  5505. LIBS="$LIBS $GDAL_LIBS"
  5506. CFLAGS="$CFLAGS $GDAL_CFLAGS"
  5507. cat > conftest.$ac_ext <<EOF
  5508. #line 6694 "configure"
  5509. #include "confdefs.h"
  5510. #include <gdal.h>
  5511. int main() {
  5512. GDALOpen("foo", GA_ReadOnly);
  5513. ; return 0; }
  5514. EOF
  5515. if { (eval echo configure:6701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5516. :
  5517. else
  5518. echo "configure: failed program was:" >&5
  5519. cat conftest.$ac_ext >&5
  5520. rm -rf conftest*
  5521. LIBS="$LIBS $GDAL_DEP_LIBS"
  5522. cat > conftest.$ac_ext <<EOF
  5523. #line 6710 "configure"
  5524. #include "confdefs.h"
  5525. #include <gdal.h>
  5526. int main() {
  5527. GDALOpen("foo", GA_ReadOnly);
  5528. ; return 0; }
  5529. EOF
  5530. if { (eval echo configure:6717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5531. rm -rf conftest*
  5532. GDAL_LIBS="$GDAL_LIBS $GDAL_DEP_LIBS"
  5533. else
  5534. echo "configure: failed program was:" >&5
  5535. cat conftest.$ac_ext >&5
  5536. rm -rf conftest*
  5537. { echo "configure: error: *** Unable to locate GDAL library." 1>&2; exit 1; }
  5538. fi
  5539. rm -f conftest*
  5540. fi
  5541. rm -f conftest*
  5542. LIBS=${ac_save_libs}
  5543. CFLAGS=${ac_save_cflags}
  5544. cat >> confdefs.h <<\EOF
  5545. #define HAVE_GDAL 1
  5546. EOF
  5547. fi
  5548. # libLAS option
  5549. echo $ac_n "checking whether to use libLAS""... $ac_c" 1>&6
  5550. echo "configure:6749: checking whether to use libLAS" >&5
  5551. LIBLAS_LIBS=
  5552. LIBLAS_CFLAGS=
  5553. USE_LIBLAS=
  5554. if test "`basename xx/$with_liblas`" = "liblas-config" ; then
  5555. LIBLAS_CONFIG="$with_liblas"
  5556. fi
  5557. if test "$with_liblas" = "no" ; then
  5558. echo "$ac_t""no" 1>&6
  5559. else
  5560. echo "$ac_t""yes" 1>&6
  5561. # Extract the first word of "liblas-config", so it can be a program name with args.
  5562. set dummy liblas-config; ac_word=$2
  5563. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5564. echo "configure:6766: checking for $ac_word" >&5
  5565. case "$LIBLAS_CONFIG" in
  5566. /*)
  5567. ac_cv_path_LIBLAS_CONFIG="$LIBLAS_CONFIG" # Let the user override the test with a path.
  5568. ;;
  5569. ?:/*)
  5570. ac_cv_path_LIBLAS_CONFIG="$LIBLAS_CONFIG" # Let the user override the test with a dos path.
  5571. ;;
  5572. *)
  5573. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5574. ac_dummy="$PATH"
  5575. for ac_dir in $ac_dummy; do
  5576. test -z "$ac_dir" && ac_dir=.
  5577. if test -f $ac_dir/$ac_word; then
  5578. ac_cv_path_LIBLAS_CONFIG="$ac_dir/$ac_word"
  5579. break
  5580. fi
  5581. done
  5582. IFS="$ac_save_ifs"
  5583. test -z "$ac_cv_path_LIBLAS_CONFIG" && ac_cv_path_LIBLAS_CONFIG="no"
  5584. ;;
  5585. esac
  5586. LIBLAS_CONFIG="$ac_cv_path_LIBLAS_CONFIG"
  5587. if test -n "$LIBLAS_CONFIG"; then
  5588. echo "$ac_t""$LIBLAS_CONFIG" 1>&6
  5589. else
  5590. echo "$ac_t""no" 1>&6
  5591. fi
  5592. if test "$LIBLAS_CONFIG" = "no" ; then
  5593. { echo "configure: error: *** couldn't find liblas-config" 1>&2; exit 1; }
  5594. fi
  5595. if test "$LIBLAS_CONFIG" != "" ; then
  5596. LIBLAS_LIBS=`"$LIBLAS_CONFIG" --libs`
  5597. LIBLAS_CFLAGS=`"$LIBLAS_CONFIG" --cflags`
  5598. LIBLAS_INC=`"$LIBLAS_CONFIG" --includes`
  5599. USE_LIBLAS=1
  5600. fi
  5601. LIBLAS=
  5602. ac_save_libs="$LIBS"
  5603. ac_save_cflags="$CFLAGS"
  5604. ac_save_cppflags="$CPPFLAGS"
  5605. LIBS="$LIBS $LIBLAS_LIBS"
  5606. CFLAGS="$CFLAGS $LIBLAS_CFLAGS"
  5607. CPPFLAGS="$CPPFLAGS $LIBLAS_INC"
  5608. for ac_hdr in liblas/capi/liblas.h
  5609. do
  5610. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5611. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5612. echo "configure:6819: checking for $ac_hdr" >&5
  5613. cat > conftest.$ac_ext <<EOF
  5614. #line 6822 "configure"
  5615. #include "confdefs.h"
  5616. #include <$ac_hdr>
  5617. EOF
  5618. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5619. { (eval echo configure:6827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5620. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5621. if test -z "$ac_err"; then
  5622. rm -rf conftest*
  5623. eval "ac_cv_header_$ac_safe=yes"
  5624. else
  5625. echo "$ac_err" >&5
  5626. echo "configure: failed program was:" >&5
  5627. cat conftest.$ac_ext >&5
  5628. rm -rf conftest*
  5629. eval "ac_cv_header_$ac_safe=no"
  5630. fi
  5631. rm -f conftest*
  5632. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5633. echo "$ac_t""yes" 1>&6
  5634. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5635. cat >> confdefs.h <<EOF
  5636. #define $ac_tr_hdr 1
  5637. EOF
  5638. else
  5639. echo "$ac_t""no" 1>&6
  5640. fi
  5641. done
  5642. cat > conftest.$ac_ext <<EOF
  5643. #line 6853 "configure"
  5644. #include "confdefs.h"
  5645. #include <liblas/capi/liblas.h>
  5646. int main() {
  5647. LASReader_Create("foo");
  5648. ; return 0; }
  5649. EOF
  5650. if { (eval echo configure:6860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5651. :
  5652. else
  5653. echo "configure: failed program was:" >&5
  5654. cat conftest.$ac_ext >&5
  5655. rm -rf conftest*
  5656. cat > conftest.$ac_ext <<EOF
  5657. #line 6868 "configure"
  5658. #include "confdefs.h"
  5659. #include <liblas/capi/liblas.h>
  5660. int main() {
  5661. LASReader_Create("foo");
  5662. ; return 0; }
  5663. EOF
  5664. if { (eval echo configure:6875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5665. rm -rf conftest*
  5666. LAS_LIBS="$LAS_LIBS"
  5667. else
  5668. echo "configure: failed program was:" >&5
  5669. cat conftest.$ac_ext >&5
  5670. rm -rf conftest*
  5671. { echo "configure: error: *** Unable to locate libLAS library." 1>&2; exit 1; }
  5672. fi
  5673. rm -f conftest*
  5674. fi
  5675. rm -f conftest*
  5676. LIBS=${ac_save_libs}
  5677. CFLAGS=${ac_save_cflags}
  5678. CPPFLAGS=${ac_save_cppflags}
  5679. cat >> confdefs.h <<\EOF
  5680. #define HAVE_LIBLAS 1
  5681. EOF
  5682. fi
  5683. # PDAL option
  5684. echo $ac_n "checking whether to use PDAL""... $ac_c" 1>&6
  5685. echo "configure:6908: checking whether to use PDAL" >&5
  5686. # new and currently used way to switch language to C++
  5687. # AC_LANG_PUSH(C++)
  5688. ac_ext=C
  5689. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  5690. ac_cpp='$CXXCPP $CPPFLAGS'
  5691. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  5692. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  5693. cross_compiling=$ac_cv_prog_cxx_cross
  5694. PDAL_LIBS=
  5695. PDAL_CPPFLAGS=
  5696. USE_PDAL=
  5697. if test "`basename xx/$with_pdal`" = "pdal-config" ; then
  5698. PDAL_CONFIG="$with_pdal"
  5699. fi
  5700. if test "$with_pdal" = "no" ; then
  5701. echo "$ac_t""no" 1>&6
  5702. else
  5703. echo "$ac_t""yes" 1>&6
  5704. # Extract the first word of "pdal-config", so it can be a program name with args.
  5705. set dummy pdal-config; ac_word=$2
  5706. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5707. echo "configure:6936: checking for $ac_word" >&5
  5708. case "$PDAL_CONFIG" in
  5709. /*)
  5710. ac_cv_path_PDAL_CONFIG="$PDAL_CONFIG" # Let the user override the test with a path.
  5711. ;;
  5712. ?:/*)
  5713. ac_cv_path_PDAL_CONFIG="$PDAL_CONFIG" # Let the user override the test with a dos path.
  5714. ;;
  5715. *)
  5716. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5717. ac_dummy="$PATH"
  5718. for ac_dir in $ac_dummy; do
  5719. test -z "$ac_dir" && ac_dir=.
  5720. if test -f $ac_dir/$ac_word; then
  5721. ac_cv_path_PDAL_CONFIG="$ac_dir/$ac_word"
  5722. break
  5723. fi
  5724. done
  5725. IFS="$ac_save_ifs"
  5726. test -z "$ac_cv_path_PDAL_CONFIG" && ac_cv_path_PDAL_CONFIG="no"
  5727. ;;
  5728. esac
  5729. PDAL_CONFIG="$ac_cv_path_PDAL_CONFIG"
  5730. if test -n "$PDAL_CONFIG"; then
  5731. echo "$ac_t""$PDAL_CONFIG" 1>&6
  5732. else
  5733. echo "$ac_t""no" 1>&6
  5734. fi
  5735. if test "$PDAL_CONFIG" = "no" ; then
  5736. { echo "configure: error: *** could not find pdal-config" 1>&2; exit 1; }
  5737. fi
  5738. if test "$PDAL_CONFIG" != "" ; then
  5739. PDAL_LIBS=`"$PDAL_CONFIG" --libs`
  5740. PDAL_CPPFLAGS=`"$PDAL_CONFIG" --cxxflags`
  5741. PDAL_INC=`"$PDAL_CONFIG" --includes`
  5742. USE_PDAL=1
  5743. fi
  5744. PDAL=
  5745. ac_save_libs="$LIBS"
  5746. ac_save_cflags="$CFLAGS"
  5747. ac_save_cppflags="$CPPFLAGS"
  5748. LIBS="$LIBS $PDAL_LIBS"
  5749. CFLAGS="$CFLAGS $PDAL_CFLAGS"
  5750. CPPFLAGS="$CPPFLAGS $PDAL_CPPFLAGS $PDAL_INC"
  5751. cat > conftest.$ac_ext <<EOF
  5752. #line 6986 "configure"
  5753. #include "confdefs.h"
  5754. #include <pdal/PointTable.hpp>
  5755. int main() {
  5756. pdal::PointTable table;
  5757. ; return 0; }
  5758. EOF
  5759. if { (eval echo configure:6993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5760. :
  5761. else
  5762. echo "configure: failed program was:" >&5
  5763. cat conftest.$ac_ext >&5
  5764. rm -rf conftest*
  5765. cat > conftest.$ac_ext <<EOF
  5766. #line 7001 "configure"
  5767. #include "confdefs.h"
  5768. #include <pdal/PointTable.hpp>
  5769. int main() {
  5770. pdal::PointTable table;
  5771. ; return 0; }
  5772. EOF
  5773. if { (eval echo configure:7008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5774. rm -rf conftest*
  5775. PDAL_LIBS="$PDAL_LIBS"
  5776. else
  5777. echo "configure: failed program was:" >&5
  5778. cat conftest.$ac_ext >&5
  5779. rm -rf conftest*
  5780. { echo "configure: error: *** Unable to locate PDAL library." 1>&2; exit 1; }
  5781. fi
  5782. rm -f conftest*
  5783. fi
  5784. rm -f conftest*
  5785. LIBS=${ac_save_libs}
  5786. CFLAGS=${ac_save_cflags}
  5787. CPPFLAGS=${ac_save_cppflags}
  5788. cat >> confdefs.h <<\EOF
  5789. #define HAVE_PDAL 1
  5790. EOF
  5791. fi
  5792. # new and currently used way to switch language back to C
  5793. # AC_LANG_POP(C++)
  5794. ac_ext=c
  5795. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  5796. ac_cpp='$CPP $CPPFLAGS'
  5797. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  5798. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  5799. cross_compiling=$ac_cv_prog_cc_cross
  5800. ac_ext=c
  5801. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  5802. ac_cpp='$CPP $CPPFLAGS'
  5803. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  5804. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  5805. cross_compiling=$ac_cv_prog_cc_cross
  5806. # NetCDF option
  5807. echo $ac_n "checking whether to use NetCDF""... $ac_c" 1>&6
  5808. echo "configure:7058: checking whether to use NetCDF" >&5
  5809. NETCDF_LIBS=
  5810. NETCDF_CFLAGS=
  5811. USE_NETCDF=
  5812. if test "`basename xx/$with_netcdf`" = "nc-config" ; then
  5813. NETCDF_CONFIG="$with_netcdf"
  5814. fi
  5815. if test "$with_netcdf" = "no" ; then
  5816. echo "$ac_t""no" 1>&6
  5817. else
  5818. echo "$ac_t""yes" 1>&6
  5819. # Extract the first word of "nc-config", so it can be a program name with args.
  5820. set dummy nc-config; ac_word=$2
  5821. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5822. echo "configure:7075: checking for $ac_word" >&5
  5823. case "$NETCDF_CONFIG" in
  5824. /*)
  5825. ac_cv_path_NETCDF_CONFIG="$NETCDF_CONFIG" # Let the user override the test with a path.
  5826. ;;
  5827. ?:/*)
  5828. ac_cv_path_NETCDF_CONFIG="$NETCDF_CONFIG" # Let the user override the test with a dos path.
  5829. ;;
  5830. *)
  5831. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5832. ac_dummy="$PATH"
  5833. for ac_dir in $ac_dummy; do
  5834. test -z "$ac_dir" && ac_dir=.
  5835. if test -f $ac_dir/$ac_word; then
  5836. ac_cv_path_NETCDF_CONFIG="$ac_dir/$ac_word"
  5837. break
  5838. fi
  5839. done
  5840. IFS="$ac_save_ifs"
  5841. test -z "$ac_cv_path_NETCDF_CONFIG" && ac_cv_path_NETCDF_CONFIG="no"
  5842. ;;
  5843. esac
  5844. NETCDF_CONFIG="$ac_cv_path_NETCDF_CONFIG"
  5845. if test -n "$NETCDF_CONFIG"; then
  5846. echo "$ac_t""$NETCDF_CONFIG" 1>&6
  5847. else
  5848. echo "$ac_t""no" 1>&6
  5849. fi
  5850. if test "$NETCDF_CONFIG" = "no" ; then
  5851. { echo "configure: error: *** couldn't find nc-config" 1>&2; exit 1; }
  5852. fi
  5853. if test "$NETCDF_CONFIG" != "" ; then
  5854. NETCDF_LIBS=`"$NETCDF_CONFIG" --libs`
  5855. NETCDF_CFLAGS=`"$NETCDF_CONFIG" --cflags`
  5856. USE_NETCDF=1
  5857. fi
  5858. NETCDF=
  5859. ac_save_libs="$LIBS"
  5860. ac_save_cflags="$CFLAGS"
  5861. LIBS="$LIBS $NETCDF_LIBS"
  5862. CFLAGS="$CFLAGS $NETCDF_CFLAGS"
  5863. cat > conftest.$ac_ext <<EOF
  5864. #line 7122 "configure"
  5865. #include "confdefs.h"
  5866. #include <netcdf.h>
  5867. int main() {
  5868. nc_create("foo", NC_CLOBBER, NULL);
  5869. ; return 0; }
  5870. EOF
  5871. if { (eval echo configure:7129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5872. :
  5873. else
  5874. echo "configure: failed program was:" >&5
  5875. cat conftest.$ac_ext >&5
  5876. rm -rf conftest*
  5877. cat > conftest.$ac_ext <<EOF
  5878. #line 7137 "configure"
  5879. #include "confdefs.h"
  5880. #include <netcdf.h>
  5881. int main() {
  5882. nc_create("foo", NC_CLOBBER, NULL);
  5883. ; return 0; }
  5884. EOF
  5885. if { (eval echo configure:7144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5886. rm -rf conftest*
  5887. NETCDF_LIBS="$NETCDF_LIBS"
  5888. else
  5889. echo "configure: failed program was:" >&5
  5890. cat conftest.$ac_ext >&5
  5891. rm -rf conftest*
  5892. { echo "configure: error: *** Unable to locate NetCDF library." 1>&2; exit 1; }
  5893. fi
  5894. rm -f conftest*
  5895. fi
  5896. rm -f conftest*
  5897. LIBS=${ac_save_libs}
  5898. CFLAGS=${ac_save_cflags}
  5899. cat >> confdefs.h <<\EOF
  5900. #define HAVE_NETCDF 1
  5901. EOF
  5902. fi
  5903. # GEOS option
  5904. echo $ac_n "checking whether to use GEOS""... $ac_c" 1>&6
  5905. echo "configure:7175: checking whether to use GEOS" >&5
  5906. GEOS_LIBS=
  5907. GEOS_CFLAGS=
  5908. USE_GEOS=
  5909. # FIXME: "quote" $with_geos ?
  5910. if test "`basename xx/$with_geos`" = "geos-config" ; then
  5911. GEOS_CONFIG="$with_geos"
  5912. fi
  5913. if test "$with_geos" = "no" ; then
  5914. echo "$ac_t""no" 1>&6
  5915. else
  5916. echo "$ac_t""yes" 1>&6
  5917. # Extract the first word of "geos-config", so it can be a program name with args.
  5918. set dummy geos-config; ac_word=$2
  5919. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5920. echo "configure:7193: checking for $ac_word" >&5
  5921. case "$GEOS_CONFIG" in
  5922. /*)
  5923. ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a path.
  5924. ;;
  5925. ?:/*)
  5926. ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a dos path.
  5927. ;;
  5928. *)
  5929. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5930. ac_dummy="$PATH"
  5931. for ac_dir in $ac_dummy; do
  5932. test -z "$ac_dir" && ac_dir=.
  5933. if test -f $ac_dir/$ac_word; then
  5934. ac_cv_path_GEOS_CONFIG="$ac_dir/$ac_word"
  5935. break
  5936. fi
  5937. done
  5938. IFS="$ac_save_ifs"
  5939. test -z "$ac_cv_path_GEOS_CONFIG" && ac_cv_path_GEOS_CONFIG="no"
  5940. ;;
  5941. esac
  5942. GEOS_CONFIG="$ac_cv_path_GEOS_CONFIG"
  5943. if test -n "$GEOS_CONFIG"; then
  5944. echo "$ac_t""$GEOS_CONFIG" 1>&6
  5945. else
  5946. echo "$ac_t""no" 1>&6
  5947. fi
  5948. if test "$GEOS_CONFIG" = "no" ; then
  5949. { echo "configure: error: *** couldn't find geos-config" 1>&2; exit 1; }
  5950. fi
  5951. if test "$GEOS_CONFIG" != "" ; then
  5952. GEOS_LIBS=`"$GEOS_CONFIG" --clibs`
  5953. GEOS_CFLAGS=`"$GEOS_CONFIG" --cflags`
  5954. USE_GEOS=1
  5955. fi
  5956. ac_save_cppflags="$CPPFLAGS"
  5957. CPPFLAGS="$GEOS_CFLAGS $CPPFLAGS"
  5958. for ac_hdr in geos_c.h
  5959. do
  5960. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5961. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5962. echo "configure:7241: checking for $ac_hdr" >&5
  5963. cat > conftest.$ac_ext <<EOF
  5964. #line 7244 "configure"
  5965. #include "confdefs.h"
  5966. #include <$ac_hdr>
  5967. EOF
  5968. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5969. { (eval echo configure:7249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5970. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5971. if test -z "$ac_err"; then
  5972. rm -rf conftest*
  5973. eval "ac_cv_header_$ac_safe=yes"
  5974. else
  5975. echo "$ac_err" >&5
  5976. echo "configure: failed program was:" >&5
  5977. cat conftest.$ac_ext >&5
  5978. rm -rf conftest*
  5979. eval "ac_cv_header_$ac_safe=no"
  5980. fi
  5981. rm -f conftest*
  5982. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5983. echo "$ac_t""yes" 1>&6
  5984. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5985. cat >> confdefs.h <<EOF
  5986. #define $ac_tr_hdr 1
  5987. EOF
  5988. else
  5989. echo "$ac_t""no" 1>&6
  5990. { echo "configure: error: *** Unable to locate GEOS includes." 1>&2; exit 1; }
  5991. fi
  5992. done
  5993. CPPFLAGS=$ac_save_cppflags
  5994. ### 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
  5995. # if test "$MINGW32" = yes ; then
  5996. # LOC_CHECK_LIBS(geos_c_i,initGEOS,GEOS,$GEOS_LIBS,GEOS_LIBS)
  5997. # else
  5998. ac_save_ldflags="$LDFLAGS"
  5999. LDFLAGS="$GEOS_LIBS $LDFLAGS"
  6000. echo $ac_n "checking for initGEOS in -lgeos_c""... $ac_c" 1>&6
  6001. echo "configure:7288: checking for initGEOS in -lgeos_c" >&5
  6002. ac_lib_var=`echo geos_c'_'initGEOS | sed 'y%./+-%__p_%'`
  6003. ac_save_LIBS="$LIBS"
  6004. LIBS="-lgeos_c $LIBS"
  6005. cat > conftest.$ac_ext <<EOF
  6006. #line 7294 "configure"
  6007. #include "confdefs.h"
  6008. /* Override any gcc2 internal prototype to avoid an error. */
  6009. /* We use char because int might match the return type of a gcc2
  6010. builtin and then its argument prototype would still apply. */
  6011. char initGEOS();
  6012. int main() {
  6013. initGEOS()
  6014. ; return 0; }
  6015. EOF
  6016. if { (eval echo configure:7305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6017. rm -rf conftest*
  6018. eval "ac_cv_lib_$ac_lib_var=yes"
  6019. else
  6020. echo "configure: failed program was:" >&5
  6021. cat conftest.$ac_ext >&5
  6022. rm -rf conftest*
  6023. eval "ac_cv_lib_$ac_lib_var=no"
  6024. fi
  6025. rm -f conftest*
  6026. LIBS="$ac_save_LIBS"
  6027. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6028. echo "$ac_t""yes" 1>&6
  6029. GEOS_LIBS="$GEOS_LIBS -lgeos_c "
  6030. else
  6031. echo "$ac_t""no" 1>&6
  6032. LDFLAGS=${ac_save_ldflags}
  6033. { echo "configure: error: *** Unable to locate GEOS library." 1>&2; exit 1; }
  6034. fi
  6035. LDFLAGS=${ac_save_ldflags}
  6036. # fi
  6037. cat >> confdefs.h <<\EOF
  6038. #define HAVE_GEOS 1
  6039. EOF
  6040. fi
  6041. # Enable TIFF option
  6042. echo $ac_n "checking whether to use TIFF""... $ac_c" 1>&6
  6043. echo "configure:7349: checking whether to use TIFF" >&5
  6044. echo "$ac_t"""$with_tiff"" 1>&6
  6045. case "$with_tiff" in
  6046. "no") USE_TIFF= ;;
  6047. "yes") USE_TIFF="1" ;;
  6048. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6049. esac
  6050. TIFF_INCLUDE_DIRS=
  6051. TIFF_LIBRARY_DIRS=
  6052. TIFFLIB=
  6053. if test -n "$USE_TIFF"; then
  6054. # With TIFF includes directory
  6055. echo $ac_n "checking for location of TIFF includes""... $ac_c" 1>&6
  6056. echo "configure:7369: checking for location of TIFF includes" >&5
  6057. case "$with_tiff_includes" in
  6058. y | ye | yes | n | no)
  6059. { echo "configure: error: *** You must supply a directory to --with-tiff-includes." 1>&2; exit 1; }
  6060. ;;
  6061. esac
  6062. echo "$ac_t""$with_tiff_includes" 1>&6
  6063. if test -n "$with_tiff_includes" ; then
  6064. for dir in $with_tiff_includes; do
  6065. if test -d "$dir"; then
  6066. TIFF_INCLUDE_DIRS="$TIFF_INCLUDE_DIRS -I$dir"
  6067. else
  6068. { echo "configure: error: *** TIFF includes directory $dir does not exist." 1>&2; exit 1; }
  6069. fi
  6070. done
  6071. fi
  6072. ac_save_cppflags="$CPPFLAGS"
  6073. CPPFLAGS="$TIFF_INCLUDE_DIRS $CPPFLAGS"
  6074. for ac_hdr in tiffio.h
  6075. do
  6076. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6077. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6078. echo "configure:7395: checking for $ac_hdr" >&5
  6079. cat > conftest.$ac_ext <<EOF
  6080. #line 7398 "configure"
  6081. #include "confdefs.h"
  6082. #include <$ac_hdr>
  6083. EOF
  6084. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6085. { (eval echo configure:7403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6086. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6087. if test -z "$ac_err"; then
  6088. rm -rf conftest*
  6089. eval "ac_cv_header_$ac_safe=yes"
  6090. else
  6091. echo "$ac_err" >&5
  6092. echo "configure: failed program was:" >&5
  6093. cat conftest.$ac_ext >&5
  6094. rm -rf conftest*
  6095. eval "ac_cv_header_$ac_safe=no"
  6096. fi
  6097. rm -f conftest*
  6098. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6099. echo "$ac_t""yes" 1>&6
  6100. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6101. cat >> confdefs.h <<EOF
  6102. #define $ac_tr_hdr 1
  6103. EOF
  6104. else
  6105. echo "$ac_t""no" 1>&6
  6106. { echo "configure: error: *** Unable to locate TIFF includes." 1>&2; exit 1; }
  6107. fi
  6108. done
  6109. CPPFLAGS=$ac_save_cppflags
  6110. # With TIFF library directory
  6111. echo $ac_n "checking for location of TIFF library""... $ac_c" 1>&6
  6112. echo "configure:7437: checking for location of TIFF library" >&5
  6113. case "$with_tiff_libs" in
  6114. y | ye | yes | n | no)
  6115. { echo "configure: error: *** You must supply a directory to --with-tiff-libs." 1>&2; exit 1; }
  6116. ;;
  6117. esac
  6118. echo "$ac_t""$with_tiff_libs" 1>&6
  6119. if test -n "$with_tiff_libs"; then
  6120. for dir in $with_tiff_libs; do
  6121. if test -d "$dir"; then
  6122. TIFF_LIBRARY_DIRS="$TIFF_LIBRARY_DIRS -L$dir"
  6123. else
  6124. { echo "configure: error: *** TIFF library directory $dir does not exist." 1>&2; exit 1; }
  6125. fi
  6126. done
  6127. fi
  6128. ac_save_ldflags="$LDFLAGS"
  6129. LDFLAGS="$TIFF_LIBRARY_DIRS $LDFLAGS"
  6130. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6131. echo "configure:7468: checking for TIFFOpen in -ltiff" >&5
  6132. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6133. ac_save_LIBS="$LIBS"
  6134. LIBS="-ltiff $LIBS"
  6135. cat > conftest.$ac_ext <<EOF
  6136. #line 7474 "configure"
  6137. #include "confdefs.h"
  6138. /* Override any gcc2 internal prototype to avoid an error. */
  6139. /* We use char because int might match the return type of a gcc2
  6140. builtin and then its argument prototype would still apply. */
  6141. char TIFFOpen();
  6142. int main() {
  6143. TIFFOpen()
  6144. ; return 0; }
  6145. EOF
  6146. if { (eval echo configure:7485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6147. rm -rf conftest*
  6148. eval "ac_cv_lib_$ac_lib_var=yes"
  6149. else
  6150. echo "configure: failed program was:" >&5
  6151. cat conftest.$ac_ext >&5
  6152. rm -rf conftest*
  6153. eval "ac_cv_lib_$ac_lib_var=no"
  6154. fi
  6155. rm -f conftest*
  6156. LIBS="$ac_save_LIBS"
  6157. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6158. echo "$ac_t""yes" 1>&6
  6159. TIFFLIB="$TIFFLIB -ltiff "
  6160. else
  6161. echo "$ac_t""no" 1>&6
  6162. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6163. echo "configure:7504: checking for TIFFOpen in -ltiff" >&5
  6164. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6165. ac_save_LIBS="$LIBS"
  6166. LIBS="-ltiff $MATHLIB $LIBS"
  6167. cat > conftest.$ac_ext <<EOF
  6168. #line 7510 "configure"
  6169. #include "confdefs.h"
  6170. /* Override any gcc2 internal prototype to avoid an error. */
  6171. /* We use char because int might match the return type of a gcc2
  6172. builtin and then its argument prototype would still apply. */
  6173. char TIFFOpen();
  6174. int main() {
  6175. TIFFOpen()
  6176. ; return 0; }
  6177. EOF
  6178. if { (eval echo configure:7521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6179. rm -rf conftest*
  6180. eval "ac_cv_lib_$ac_lib_var=yes"
  6181. else
  6182. echo "configure: failed program was:" >&5
  6183. cat conftest.$ac_ext >&5
  6184. rm -rf conftest*
  6185. eval "ac_cv_lib_$ac_lib_var=no"
  6186. fi
  6187. rm -f conftest*
  6188. LIBS="$ac_save_LIBS"
  6189. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6190. echo "$ac_t""yes" 1>&6
  6191. TIFFLIB="$TIFFLIB -ltiff $MATHLIB"
  6192. else
  6193. echo "$ac_t""no" 1>&6
  6194. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6195. echo "configure:7540: checking for TIFFOpen in -ltiff" >&5
  6196. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6197. ac_save_LIBS="$LIBS"
  6198. LIBS="-ltiff $ZLIB $LIBS"
  6199. cat > conftest.$ac_ext <<EOF
  6200. #line 7546 "configure"
  6201. #include "confdefs.h"
  6202. /* Override any gcc2 internal prototype to avoid an error. */
  6203. /* We use char because int might match the return type of a gcc2
  6204. builtin and then its argument prototype would still apply. */
  6205. char TIFFOpen();
  6206. int main() {
  6207. TIFFOpen()
  6208. ; return 0; }
  6209. EOF
  6210. if { (eval echo configure:7557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6211. rm -rf conftest*
  6212. eval "ac_cv_lib_$ac_lib_var=yes"
  6213. else
  6214. echo "configure: failed program was:" >&5
  6215. cat conftest.$ac_ext >&5
  6216. rm -rf conftest*
  6217. eval "ac_cv_lib_$ac_lib_var=no"
  6218. fi
  6219. rm -f conftest*
  6220. LIBS="$ac_save_LIBS"
  6221. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6222. echo "$ac_t""yes" 1>&6
  6223. TIFFLIB="$TIFFLIB -ltiff $ZLIB"
  6224. else
  6225. echo "$ac_t""no" 1>&6
  6226. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6227. echo "configure:7576: checking for TIFFOpen in -ltiff" >&5
  6228. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6229. ac_save_LIBS="$LIBS"
  6230. LIBS="-ltiff $ZLIB $MATHLIB $LIBS"
  6231. cat > conftest.$ac_ext <<EOF
  6232. #line 7582 "configure"
  6233. #include "confdefs.h"
  6234. /* Override any gcc2 internal prototype to avoid an error. */
  6235. /* We use char because int might match the return type of a gcc2
  6236. builtin and then its argument prototype would still apply. */
  6237. char TIFFOpen();
  6238. int main() {
  6239. TIFFOpen()
  6240. ; return 0; }
  6241. EOF
  6242. if { (eval echo configure:7593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6243. rm -rf conftest*
  6244. eval "ac_cv_lib_$ac_lib_var=yes"
  6245. else
  6246. echo "configure: failed program was:" >&5
  6247. cat conftest.$ac_ext >&5
  6248. rm -rf conftest*
  6249. eval "ac_cv_lib_$ac_lib_var=no"
  6250. fi
  6251. rm -f conftest*
  6252. LIBS="$ac_save_LIBS"
  6253. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6254. echo "$ac_t""yes" 1>&6
  6255. TIFFLIB="$TIFFLIB -ltiff $ZLIB $MATHLIB"
  6256. else
  6257. echo "$ac_t""no" 1>&6
  6258. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6259. echo "configure:7612: checking for TIFFOpen in -ltiff" >&5
  6260. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6261. ac_save_LIBS="$LIBS"
  6262. LIBS="-ltiff -ljpeg $LIBS"
  6263. cat > conftest.$ac_ext <<EOF
  6264. #line 7618 "configure"
  6265. #include "confdefs.h"
  6266. /* Override any gcc2 internal prototype to avoid an error. */
  6267. /* We use char because int might match the return type of a gcc2
  6268. builtin and then its argument prototype would still apply. */
  6269. char TIFFOpen();
  6270. int main() {
  6271. TIFFOpen()
  6272. ; return 0; }
  6273. EOF
  6274. if { (eval echo configure:7629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6275. rm -rf conftest*
  6276. eval "ac_cv_lib_$ac_lib_var=yes"
  6277. else
  6278. echo "configure: failed program was:" >&5
  6279. cat conftest.$ac_ext >&5
  6280. rm -rf conftest*
  6281. eval "ac_cv_lib_$ac_lib_var=no"
  6282. fi
  6283. rm -f conftest*
  6284. LIBS="$ac_save_LIBS"
  6285. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6286. echo "$ac_t""yes" 1>&6
  6287. TIFFLIB="$TIFFLIB -ltiff -ljpeg"
  6288. else
  6289. echo "$ac_t""no" 1>&6
  6290. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6291. echo "configure:7648: checking for TIFFOpen in -ltiff" >&5
  6292. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6293. ac_save_LIBS="$LIBS"
  6294. LIBS="-ltiff -ljpeg $MATHLIB $LIBS"
  6295. cat > conftest.$ac_ext <<EOF
  6296. #line 7654 "configure"
  6297. #include "confdefs.h"
  6298. /* Override any gcc2 internal prototype to avoid an error. */
  6299. /* We use char because int might match the return type of a gcc2
  6300. builtin and then its argument prototype would still apply. */
  6301. char TIFFOpen();
  6302. int main() {
  6303. TIFFOpen()
  6304. ; return 0; }
  6305. EOF
  6306. if { (eval echo configure:7665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6307. rm -rf conftest*
  6308. eval "ac_cv_lib_$ac_lib_var=yes"
  6309. else
  6310. echo "configure: failed program was:" >&5
  6311. cat conftest.$ac_ext >&5
  6312. rm -rf conftest*
  6313. eval "ac_cv_lib_$ac_lib_var=no"
  6314. fi
  6315. rm -f conftest*
  6316. LIBS="$ac_save_LIBS"
  6317. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6318. echo "$ac_t""yes" 1>&6
  6319. TIFFLIB="$TIFFLIB -ltiff -ljpeg $MATHLIB"
  6320. else
  6321. echo "$ac_t""no" 1>&6
  6322. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6323. echo "configure:7684: checking for TIFFOpen in -ltiff" >&5
  6324. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6325. ac_save_LIBS="$LIBS"
  6326. LIBS="-ltiff -ljpeg $ZLIB $LIBS"
  6327. cat > conftest.$ac_ext <<EOF
  6328. #line 7690 "configure"
  6329. #include "confdefs.h"
  6330. /* Override any gcc2 internal prototype to avoid an error. */
  6331. /* We use char because int might match the return type of a gcc2
  6332. builtin and then its argument prototype would still apply. */
  6333. char TIFFOpen();
  6334. int main() {
  6335. TIFFOpen()
  6336. ; return 0; }
  6337. EOF
  6338. if { (eval echo configure:7701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6339. rm -rf conftest*
  6340. eval "ac_cv_lib_$ac_lib_var=yes"
  6341. else
  6342. echo "configure: failed program was:" >&5
  6343. cat conftest.$ac_ext >&5
  6344. rm -rf conftest*
  6345. eval "ac_cv_lib_$ac_lib_var=no"
  6346. fi
  6347. rm -f conftest*
  6348. LIBS="$ac_save_LIBS"
  6349. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6350. echo "$ac_t""yes" 1>&6
  6351. TIFFLIB="$TIFFLIB -ltiff -ljpeg $ZLIB"
  6352. else
  6353. echo "$ac_t""no" 1>&6
  6354. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6355. echo "configure:7720: checking for TIFFOpen in -ltiff" >&5
  6356. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6357. ac_save_LIBS="$LIBS"
  6358. LIBS="-ltiff -ljpeg $ZLIB $MATHLIB $LIBS"
  6359. cat > conftest.$ac_ext <<EOF
  6360. #line 7726 "configure"
  6361. #include "confdefs.h"
  6362. /* Override any gcc2 internal prototype to avoid an error. */
  6363. /* We use char because int might match the return type of a gcc2
  6364. builtin and then its argument prototype would still apply. */
  6365. char TIFFOpen();
  6366. int main() {
  6367. TIFFOpen()
  6368. ; return 0; }
  6369. EOF
  6370. if { (eval echo configure:7737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6371. rm -rf conftest*
  6372. eval "ac_cv_lib_$ac_lib_var=yes"
  6373. else
  6374. echo "configure: failed program was:" >&5
  6375. cat conftest.$ac_ext >&5
  6376. rm -rf conftest*
  6377. eval "ac_cv_lib_$ac_lib_var=no"
  6378. fi
  6379. rm -f conftest*
  6380. LIBS="$ac_save_LIBS"
  6381. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6382. echo "$ac_t""yes" 1>&6
  6383. TIFFLIB="$TIFFLIB -ltiff -ljpeg $ZLIB $MATHLIB"
  6384. else
  6385. echo "$ac_t""no" 1>&6
  6386. LDFLAGS=${ac_save_ldflags}
  6387. { echo "configure: error: *** Unable to locate TIFF library." 1>&2; exit 1; }
  6388. fi
  6389. fi
  6390. fi
  6391. fi
  6392. fi
  6393. fi
  6394. fi
  6395. fi
  6396. LDFLAGS=${ac_save_ldflags}
  6397. fi # $USE_TIFF
  6398. # Done checking TIFF
  6399. # Enable PNG option
  6400. echo $ac_n "checking whether to use PNG""... $ac_c" 1>&6
  6401. echo "configure:7835: checking whether to use PNG" >&5
  6402. echo "$ac_t"""$with_png"" 1>&6
  6403. case "$with_png" in
  6404. "no") USE_PNG= ;;
  6405. "yes") USE_PNG="1" ;;
  6406. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6407. esac
  6408. PNGINC=
  6409. PNGLIB=
  6410. if test -n "$USE_PNG"; then
  6411. # With PNG includes directory
  6412. echo $ac_n "checking for location of PNG includes""... $ac_c" 1>&6
  6413. echo "configure:7854: checking for location of PNG includes" >&5
  6414. case "$with_png_includes" in
  6415. y | ye | yes | n | no)
  6416. { echo "configure: error: *** You must supply a directory to --with-png-includes." 1>&2; exit 1; }
  6417. ;;
  6418. esac
  6419. echo "$ac_t""$with_png_includes" 1>&6
  6420. if test -n "$with_png_includes" ; then
  6421. for dir in $with_png_includes; do
  6422. if test -d "$dir"; then
  6423. PNGINC="$PNGINC -I$dir"
  6424. else
  6425. { echo "configure: error: *** PNG includes directory $dir does not exist." 1>&2; exit 1; }
  6426. fi
  6427. done
  6428. fi
  6429. ac_save_cppflags="$CPPFLAGS"
  6430. CPPFLAGS="$PNGINC $CPPFLAGS"
  6431. for ac_hdr in png.h
  6432. do
  6433. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6434. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6435. echo "configure:7880: checking for $ac_hdr" >&5
  6436. cat > conftest.$ac_ext <<EOF
  6437. #line 7883 "configure"
  6438. #include "confdefs.h"
  6439. #include <$ac_hdr>
  6440. EOF
  6441. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6442. { (eval echo configure:7888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6443. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6444. if test -z "$ac_err"; then
  6445. rm -rf conftest*
  6446. eval "ac_cv_header_$ac_safe=yes"
  6447. else
  6448. echo "$ac_err" >&5
  6449. echo "configure: failed program was:" >&5
  6450. cat conftest.$ac_ext >&5
  6451. rm -rf conftest*
  6452. eval "ac_cv_header_$ac_safe=no"
  6453. fi
  6454. rm -f conftest*
  6455. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6456. echo "$ac_t""yes" 1>&6
  6457. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6458. cat >> confdefs.h <<EOF
  6459. #define $ac_tr_hdr 1
  6460. EOF
  6461. else
  6462. echo "$ac_t""no" 1>&6
  6463. { echo "configure: error: *** Unable to locate PNG includes." 1>&2; exit 1; }
  6464. fi
  6465. done
  6466. CPPFLAGS=$ac_save_cppflags
  6467. # With PNG library directory
  6468. echo $ac_n "checking for location of PNG library""... $ac_c" 1>&6
  6469. echo "configure:7922: checking for location of PNG library" >&5
  6470. case "$with_png_libs" in
  6471. y | ye | yes | n | no)
  6472. { echo "configure: error: *** You must supply a directory to --with-png-libs." 1>&2; exit 1; }
  6473. ;;
  6474. esac
  6475. echo "$ac_t""$with_png_libs" 1>&6
  6476. if test -n "$with_png_libs"; then
  6477. for dir in $with_png_libs; do
  6478. if test -d "$dir"; then
  6479. PNGLIB="$PNGLIB -L$dir"
  6480. else
  6481. { echo "configure: error: *** PNG library directory $dir does not exist." 1>&2; exit 1; }
  6482. fi
  6483. done
  6484. fi
  6485. ac_save_ldflags="$LDFLAGS"
  6486. LDFLAGS="$PNGLIB $LDFLAGS"
  6487. echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
  6488. echo "configure:7947: checking for png_read_image in -lpng" >&5
  6489. ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
  6490. ac_save_LIBS="$LIBS"
  6491. LIBS="-lpng $ZLIB $MATHLIB $LIBS"
  6492. cat > conftest.$ac_ext <<EOF
  6493. #line 7953 "configure"
  6494. #include "confdefs.h"
  6495. /* Override any gcc2 internal prototype to avoid an error. */
  6496. /* We use char because int might match the return type of a gcc2
  6497. builtin and then its argument prototype would still apply. */
  6498. char png_read_image();
  6499. int main() {
  6500. png_read_image()
  6501. ; return 0; }
  6502. EOF
  6503. if { (eval echo configure:7964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6504. rm -rf conftest*
  6505. eval "ac_cv_lib_$ac_lib_var=yes"
  6506. else
  6507. echo "configure: failed program was:" >&5
  6508. cat conftest.$ac_ext >&5
  6509. rm -rf conftest*
  6510. eval "ac_cv_lib_$ac_lib_var=no"
  6511. fi
  6512. rm -f conftest*
  6513. LIBS="$ac_save_LIBS"
  6514. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6515. echo "$ac_t""yes" 1>&6
  6516. PNGLIB="$PNGLIB -lpng $ZLIB $MATHLIB"
  6517. else
  6518. echo "$ac_t""no" 1>&6
  6519. LDFLAGS=${ac_save_ldflags}
  6520. { echo "configure: error: *** Unable to locate PNG library." 1>&2; exit 1; }
  6521. fi
  6522. LDFLAGS=${ac_save_ldflags}
  6523. fi # $USE_PNG
  6524. # Done checking PNG
  6525. # Enable PostgreSQL option
  6526. echo $ac_n "checking whether to use PostgreSQL""... $ac_c" 1>&6
  6527. echo "configure:8006: checking whether to use PostgreSQL" >&5
  6528. echo "$ac_t"""$with_postgres"" 1>&6
  6529. case "$with_postgres" in
  6530. "no") USE_POSTGRES= ;;
  6531. "yes") USE_POSTGRES="1" ;;
  6532. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6533. esac
  6534. if test -n "$USE_POSTGRES"; then
  6535. cat >> confdefs.h <<\EOF
  6536. #define HAVE_POSTGRES 1
  6537. EOF
  6538. fi # $USE_POSTGRES
  6539. PQINCPATH=
  6540. PQLIBPATH=
  6541. PQLIB=
  6542. if test -n "$USE_POSTGRES"; then
  6543. # With PostgreSQL includes directory
  6544. echo $ac_n "checking for location of PostgreSQL includes""... $ac_c" 1>&6
  6545. echo "configure:8033: checking for location of PostgreSQL includes" >&5
  6546. case "$with_postgres_includes" in
  6547. y | ye | yes | n | no)
  6548. { echo "configure: error: *** You must supply a directory to --with-postgres-includes." 1>&2; exit 1; }
  6549. ;;
  6550. esac
  6551. echo "$ac_t""$with_postgres_includes" 1>&6
  6552. if test -n "$with_postgres_includes" ; then
  6553. for dir in $with_postgres_includes; do
  6554. if test -d "$dir"; then
  6555. PQINCPATH="$PQINCPATH -I$dir"
  6556. else
  6557. { echo "configure: error: *** PostgreSQL includes directory $dir does not exist." 1>&2; exit 1; }
  6558. fi
  6559. done
  6560. fi
  6561. ac_save_cppflags="$CPPFLAGS"
  6562. CPPFLAGS="$PQINCPATH $CPPFLAGS"
  6563. for ac_hdr in libpq-fe.h
  6564. do
  6565. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6566. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6567. echo "configure:8059: checking for $ac_hdr" >&5
  6568. cat > conftest.$ac_ext <<EOF
  6569. #line 8062 "configure"
  6570. #include "confdefs.h"
  6571. #include <$ac_hdr>
  6572. EOF
  6573. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6574. { (eval echo configure:8067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6575. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6576. if test -z "$ac_err"; then
  6577. rm -rf conftest*
  6578. eval "ac_cv_header_$ac_safe=yes"
  6579. else
  6580. echo "$ac_err" >&5
  6581. echo "configure: failed program was:" >&5
  6582. cat conftest.$ac_ext >&5
  6583. rm -rf conftest*
  6584. eval "ac_cv_header_$ac_safe=no"
  6585. fi
  6586. rm -f conftest*
  6587. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6588. echo "$ac_t""yes" 1>&6
  6589. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6590. cat >> confdefs.h <<EOF
  6591. #define $ac_tr_hdr 1
  6592. EOF
  6593. else
  6594. echo "$ac_t""no" 1>&6
  6595. { echo "configure: error: *** Unable to locate PostgreSQL includes." 1>&2; exit 1; }
  6596. fi
  6597. done
  6598. CPPFLAGS=$ac_save_cppflags
  6599. fi # $USE_POSTGRES
  6600. if test -n "$USE_POSTGRES"; then
  6601. # With PostgreSQL library directory
  6602. echo $ac_n "checking for location of PostgreSQL library""... $ac_c" 1>&6
  6603. echo "configure:8105: checking for location of PostgreSQL library" >&5
  6604. case "$with_postgres_libs" in
  6605. y | ye | yes | n | no)
  6606. { echo "configure: error: *** You must supply a directory to --with-postgres-libs." 1>&2; exit 1; }
  6607. ;;
  6608. esac
  6609. echo "$ac_t""$with_postgres_libs" 1>&6
  6610. if test -n "$with_postgres_libs"; then
  6611. for dir in $with_postgres_libs; do
  6612. if test -d "$dir"; then
  6613. PQLIBPATH="$PQLIBPATH -L$dir"
  6614. else
  6615. { echo "configure: error: *** PostgreSQL library directory $dir does not exist." 1>&2; exit 1; }
  6616. fi
  6617. done
  6618. fi
  6619. ac_save_ldflags="$LDFLAGS"
  6620. LDFLAGS="$PQLIBPATH $LDFLAGS"
  6621. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6622. echo "configure:8134: checking for PQsetdbLogin in -lpq" >&5
  6623. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6624. ac_save_LIBS="$LIBS"
  6625. LIBS="-lpq $LIBS"
  6626. cat > conftest.$ac_ext <<EOF
  6627. #line 8140 "configure"
  6628. #include "confdefs.h"
  6629. /* Override any gcc2 internal prototype to avoid an error. */
  6630. /* We use char because int might match the return type of a gcc2
  6631. builtin and then its argument prototype would still apply. */
  6632. char PQsetdbLogin();
  6633. int main() {
  6634. PQsetdbLogin()
  6635. ; return 0; }
  6636. EOF
  6637. if { (eval echo configure:8151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6638. rm -rf conftest*
  6639. eval "ac_cv_lib_$ac_lib_var=yes"
  6640. else
  6641. echo "configure: failed program was:" >&5
  6642. cat conftest.$ac_ext >&5
  6643. rm -rf conftest*
  6644. eval "ac_cv_lib_$ac_lib_var=no"
  6645. fi
  6646. rm -f conftest*
  6647. LIBS="$ac_save_LIBS"
  6648. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6649. echo "$ac_t""yes" 1>&6
  6650. PQLIB="$PQLIB -lpq "
  6651. else
  6652. echo "$ac_t""no" 1>&6
  6653. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6654. echo "configure:8170: checking for PQsetdbLogin in -lpq" >&5
  6655. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6656. ac_save_LIBS="$LIBS"
  6657. LIBS="-lpq -lssl -lcrypto $LIBS"
  6658. cat > conftest.$ac_ext <<EOF
  6659. #line 8176 "configure"
  6660. #include "confdefs.h"
  6661. /* Override any gcc2 internal prototype to avoid an error. */
  6662. /* We use char because int might match the return type of a gcc2
  6663. builtin and then its argument prototype would still apply. */
  6664. char PQsetdbLogin();
  6665. int main() {
  6666. PQsetdbLogin()
  6667. ; return 0; }
  6668. EOF
  6669. if { (eval echo configure:8187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6670. rm -rf conftest*
  6671. eval "ac_cv_lib_$ac_lib_var=yes"
  6672. else
  6673. echo "configure: failed program was:" >&5
  6674. cat conftest.$ac_ext >&5
  6675. rm -rf conftest*
  6676. eval "ac_cv_lib_$ac_lib_var=no"
  6677. fi
  6678. rm -f conftest*
  6679. LIBS="$ac_save_LIBS"
  6680. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6681. echo "$ac_t""yes" 1>&6
  6682. PQLIB="$PQLIB -lpq -lssl -lcrypto"
  6683. else
  6684. echo "$ac_t""no" 1>&6
  6685. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6686. echo "configure:8206: checking for PQsetdbLogin in -lpq" >&5
  6687. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6688. ac_save_LIBS="$LIBS"
  6689. LIBS="-lpq -lcrypt $LIBS"
  6690. cat > conftest.$ac_ext <<EOF
  6691. #line 8212 "configure"
  6692. #include "confdefs.h"
  6693. /* Override any gcc2 internal prototype to avoid an error. */
  6694. /* We use char because int might match the return type of a gcc2
  6695. builtin and then its argument prototype would still apply. */
  6696. char PQsetdbLogin();
  6697. int main() {
  6698. PQsetdbLogin()
  6699. ; return 0; }
  6700. EOF
  6701. if { (eval echo configure:8223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6702. rm -rf conftest*
  6703. eval "ac_cv_lib_$ac_lib_var=yes"
  6704. else
  6705. echo "configure: failed program was:" >&5
  6706. cat conftest.$ac_ext >&5
  6707. rm -rf conftest*
  6708. eval "ac_cv_lib_$ac_lib_var=no"
  6709. fi
  6710. rm -f conftest*
  6711. LIBS="$ac_save_LIBS"
  6712. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6713. echo "$ac_t""yes" 1>&6
  6714. PQLIB="$PQLIB -lpq -lcrypt"
  6715. else
  6716. echo "$ac_t""no" 1>&6
  6717. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6718. echo "configure:8242: checking for PQsetdbLogin in -lpq" >&5
  6719. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6720. ac_save_LIBS="$LIBS"
  6721. LIBS="-lpq -lcrypt -lssl -lcrypto $LIBS"
  6722. cat > conftest.$ac_ext <<EOF
  6723. #line 8248 "configure"
  6724. #include "confdefs.h"
  6725. /* Override any gcc2 internal prototype to avoid an error. */
  6726. /* We use char because int might match the return type of a gcc2
  6727. builtin and then its argument prototype would still apply. */
  6728. char PQsetdbLogin();
  6729. int main() {
  6730. PQsetdbLogin()
  6731. ; return 0; }
  6732. EOF
  6733. if { (eval echo configure:8259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6734. rm -rf conftest*
  6735. eval "ac_cv_lib_$ac_lib_var=yes"
  6736. else
  6737. echo "configure: failed program was:" >&5
  6738. cat conftest.$ac_ext >&5
  6739. rm -rf conftest*
  6740. eval "ac_cv_lib_$ac_lib_var=no"
  6741. fi
  6742. rm -f conftest*
  6743. LIBS="$ac_save_LIBS"
  6744. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6745. echo "$ac_t""yes" 1>&6
  6746. PQLIB="$PQLIB -lpq -lcrypt -lssl -lcrypto"
  6747. else
  6748. echo "$ac_t""no" 1>&6
  6749. LDFLAGS=${ac_save_ldflags}
  6750. { echo "configure: error: *** Unable to locate PostgreSQL library." 1>&2; exit 1; }
  6751. fi
  6752. fi
  6753. fi
  6754. fi
  6755. LDFLAGS=${ac_save_ldflags}
  6756. ac_save_ldflags="$LDFLAGS"
  6757. LDFLAGS="$LDFLAGS $PQLIBPATH"
  6758. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  6759. echo "configure:8316: checking for PQcmdTuples in -lpq" >&5
  6760. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  6761. ac_save_LIBS="$LIBS"
  6762. LIBS="-lpq $LIBS"
  6763. cat > conftest.$ac_ext <<EOF
  6764. #line 8322 "configure"
  6765. #include "confdefs.h"
  6766. /* Override any gcc2 internal prototype to avoid an error. */
  6767. /* We use char because int might match the return type of a gcc2
  6768. builtin and then its argument prototype would still apply. */
  6769. char PQcmdTuples();
  6770. int main() {
  6771. PQcmdTuples()
  6772. ; return 0; }
  6773. EOF
  6774. if { (eval echo configure:8333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6775. rm -rf conftest*
  6776. eval "ac_cv_lib_$ac_lib_var=yes"
  6777. else
  6778. echo "configure: failed program was:" >&5
  6779. cat conftest.$ac_ext >&5
  6780. rm -rf conftest*
  6781. eval "ac_cv_lib_$ac_lib_var=no"
  6782. fi
  6783. rm -f conftest*
  6784. LIBS="$ac_save_LIBS"
  6785. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6786. echo "$ac_t""yes" 1>&6
  6787. cat >> confdefs.h <<\EOF
  6788. #define HAVE_PQCMDTUPLES 1
  6789. EOF
  6790. else
  6791. echo "$ac_t""no" 1>&6
  6792. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  6793. echo "configure:8355: checking for PQcmdTuples in -lpq" >&5
  6794. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  6795. ac_save_LIBS="$LIBS"
  6796. LIBS="-lpq -lcrypt $LIBS"
  6797. cat > conftest.$ac_ext <<EOF
  6798. #line 8361 "configure"
  6799. #include "confdefs.h"
  6800. /* Override any gcc2 internal prototype to avoid an error. */
  6801. /* We use char because int might match the return type of a gcc2
  6802. builtin and then its argument prototype would still apply. */
  6803. char PQcmdTuples();
  6804. int main() {
  6805. PQcmdTuples()
  6806. ; return 0; }
  6807. EOF
  6808. if { (eval echo configure:8372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6809. rm -rf conftest*
  6810. eval "ac_cv_lib_$ac_lib_var=yes"
  6811. else
  6812. echo "configure: failed program was:" >&5
  6813. cat conftest.$ac_ext >&5
  6814. rm -rf conftest*
  6815. eval "ac_cv_lib_$ac_lib_var=no"
  6816. fi
  6817. rm -f conftest*
  6818. LIBS="$ac_save_LIBS"
  6819. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6820. echo "$ac_t""yes" 1>&6
  6821. cat >> confdefs.h <<\EOF
  6822. #define HAVE_PQCMDTUPLES 1
  6823. EOF
  6824. else
  6825. echo "$ac_t""no" 1>&6
  6826. fi
  6827. fi
  6828. LDFLAGS="${ac_save_ldflags}"
  6829. fi # $USE_POSTGRES
  6830. # Done checking PostgreSQL
  6831. # Enable MySQL option
  6832. echo $ac_n "checking whether to use MySQL""... $ac_c" 1>&6
  6833. echo "configure:8415: checking whether to use MySQL" >&5
  6834. echo "$ac_t"""$with_mysql"" 1>&6
  6835. case "$with_mysql" in
  6836. "no") USE_MYSQL= ;;
  6837. "yes") USE_MYSQL="1" ;;
  6838. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6839. esac
  6840. MYSQLINCPATH=
  6841. MYSQLLIBPATH=
  6842. MYSQLLIB=
  6843. if test -n "$USE_MYSQL"; then
  6844. # With MySQL includes directory
  6845. echo $ac_n "checking for location of MySQL includes""... $ac_c" 1>&6
  6846. echo "configure:8435: checking for location of MySQL includes" >&5
  6847. case "$with_mysql_includes" in
  6848. y | ye | yes | n | no)
  6849. { echo "configure: error: *** You must supply a directory to --with-mysql-includes." 1>&2; exit 1; }
  6850. ;;
  6851. esac
  6852. echo "$ac_t""$with_mysql_includes" 1>&6
  6853. if test -n "$with_mysql_includes" ; then
  6854. for dir in $with_mysql_includes; do
  6855. if test -d "$dir"; then
  6856. MYSQLINCPATH="$MYSQLINCPATH -I$dir"
  6857. else
  6858. { echo "configure: error: *** MySQL includes directory $dir does not exist." 1>&2; exit 1; }
  6859. fi
  6860. done
  6861. fi
  6862. ac_save_cppflags="$CPPFLAGS"
  6863. CPPFLAGS="$MYSQLINCPATH $CPPFLAGS"
  6864. for ac_hdr in mysql.h
  6865. do
  6866. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6867. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6868. echo "configure:8461: checking for $ac_hdr" >&5
  6869. cat > conftest.$ac_ext <<EOF
  6870. #line 8464 "configure"
  6871. #include "confdefs.h"
  6872. #include <$ac_hdr>
  6873. EOF
  6874. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6875. { (eval echo configure:8469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6876. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6877. if test -z "$ac_err"; then
  6878. rm -rf conftest*
  6879. eval "ac_cv_header_$ac_safe=yes"
  6880. else
  6881. echo "$ac_err" >&5
  6882. echo "configure: failed program was:" >&5
  6883. cat conftest.$ac_ext >&5
  6884. rm -rf conftest*
  6885. eval "ac_cv_header_$ac_safe=no"
  6886. fi
  6887. rm -f conftest*
  6888. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6889. echo "$ac_t""yes" 1>&6
  6890. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6891. cat >> confdefs.h <<EOF
  6892. #define $ac_tr_hdr 1
  6893. EOF
  6894. else
  6895. echo "$ac_t""no" 1>&6
  6896. { echo "configure: error: *** Unable to locate MySQL includes." 1>&2; exit 1; }
  6897. fi
  6898. done
  6899. CPPFLAGS=$ac_save_cppflags
  6900. fi # $USE_MYSQL
  6901. if test -n "$USE_MYSQL"; then
  6902. # With MySQL library directory
  6903. echo $ac_n "checking for location of MySQL library""... $ac_c" 1>&6
  6904. echo "configure:8506: checking for location of MySQL library" >&5
  6905. case "$with_mysql_libs" in
  6906. y | ye | yes | n | no)
  6907. { echo "configure: error: *** You must supply a directory to --with-mysql-libs." 1>&2; exit 1; }
  6908. ;;
  6909. esac
  6910. echo "$ac_t""$with_mysql_libs" 1>&6
  6911. if test -n "$with_mysql_libs"; then
  6912. for dir in $with_mysql_libs; do
  6913. if test -d "$dir"; then
  6914. MYSQLLIBPATH="$MYSQLLIBPATH -L$dir"
  6915. else
  6916. { echo "configure: error: *** MySQL library directory $dir does not exist." 1>&2; exit 1; }
  6917. fi
  6918. done
  6919. fi
  6920. ac_save_ldflags="$LDFLAGS"
  6921. LDFLAGS="$MYSQLLIBPATH $LDFLAGS"
  6922. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6923. echo "configure:8537: checking for mysql_query in -lmysqlclient" >&5
  6924. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6925. ac_save_LIBS="$LIBS"
  6926. LIBS="-lmysqlclient $LIBS"
  6927. cat > conftest.$ac_ext <<EOF
  6928. #line 8543 "configure"
  6929. #include "confdefs.h"
  6930. /* Override any gcc2 internal prototype to avoid an error. */
  6931. /* We use char because int might match the return type of a gcc2
  6932. builtin and then its argument prototype would still apply. */
  6933. char mysql_query();
  6934. int main() {
  6935. mysql_query()
  6936. ; return 0; }
  6937. EOF
  6938. if { (eval echo configure:8554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6939. rm -rf conftest*
  6940. eval "ac_cv_lib_$ac_lib_var=yes"
  6941. else
  6942. echo "configure: failed program was:" >&5
  6943. cat conftest.$ac_ext >&5
  6944. rm -rf conftest*
  6945. eval "ac_cv_lib_$ac_lib_var=no"
  6946. fi
  6947. rm -f conftest*
  6948. LIBS="$ac_save_LIBS"
  6949. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6950. echo "$ac_t""yes" 1>&6
  6951. MYSQLLIB="$MYSQLLIB -lmysqlclient "
  6952. else
  6953. echo "$ac_t""no" 1>&6
  6954. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6955. echo "configure:8573: checking for mysql_query in -lmysqlclient" >&5
  6956. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6957. ac_save_LIBS="$LIBS"
  6958. LIBS="-lmysqlclient $MATHLIB $LIBS"
  6959. cat > conftest.$ac_ext <<EOF
  6960. #line 8579 "configure"
  6961. #include "confdefs.h"
  6962. /* Override any gcc2 internal prototype to avoid an error. */
  6963. /* We use char because int might match the return type of a gcc2
  6964. builtin and then its argument prototype would still apply. */
  6965. char mysql_query();
  6966. int main() {
  6967. mysql_query()
  6968. ; return 0; }
  6969. EOF
  6970. if { (eval echo configure:8590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6971. rm -rf conftest*
  6972. eval "ac_cv_lib_$ac_lib_var=yes"
  6973. else
  6974. echo "configure: failed program was:" >&5
  6975. cat conftest.$ac_ext >&5
  6976. rm -rf conftest*
  6977. eval "ac_cv_lib_$ac_lib_var=no"
  6978. fi
  6979. rm -f conftest*
  6980. LIBS="$ac_save_LIBS"
  6981. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6982. echo "$ac_t""yes" 1>&6
  6983. MYSQLLIB="$MYSQLLIB -lmysqlclient $MATHLIB"
  6984. else
  6985. echo "$ac_t""no" 1>&6
  6986. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6987. echo "configure:8609: checking for mysql_query in -lmysqlclient" >&5
  6988. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6989. ac_save_LIBS="$LIBS"
  6990. LIBS="-lmysqlclient $SOCKLIB $LIBS"
  6991. cat > conftest.$ac_ext <<EOF
  6992. #line 8615 "configure"
  6993. #include "confdefs.h"
  6994. /* Override any gcc2 internal prototype to avoid an error. */
  6995. /* We use char because int might match the return type of a gcc2
  6996. builtin and then its argument prototype would still apply. */
  6997. char mysql_query();
  6998. int main() {
  6999. mysql_query()
  7000. ; return 0; }
  7001. EOF
  7002. if { (eval echo configure:8626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7003. rm -rf conftest*
  7004. eval "ac_cv_lib_$ac_lib_var=yes"
  7005. else
  7006. echo "configure: failed program was:" >&5
  7007. cat conftest.$ac_ext >&5
  7008. rm -rf conftest*
  7009. eval "ac_cv_lib_$ac_lib_var=no"
  7010. fi
  7011. rm -f conftest*
  7012. LIBS="$ac_save_LIBS"
  7013. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7014. echo "$ac_t""yes" 1>&6
  7015. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB"
  7016. else
  7017. echo "$ac_t""no" 1>&6
  7018. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7019. echo "configure:8645: checking for mysql_query in -lmysqlclient" >&5
  7020. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7021. ac_save_LIBS="$LIBS"
  7022. LIBS="-lmysqlclient $SOCKLIB $MATHLIB $LIBS"
  7023. cat > conftest.$ac_ext <<EOF
  7024. #line 8651 "configure"
  7025. #include "confdefs.h"
  7026. /* Override any gcc2 internal prototype to avoid an error. */
  7027. /* We use char because int might match the return type of a gcc2
  7028. builtin and then its argument prototype would still apply. */
  7029. char mysql_query();
  7030. int main() {
  7031. mysql_query()
  7032. ; return 0; }
  7033. EOF
  7034. if { (eval echo configure:8662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7035. rm -rf conftest*
  7036. eval "ac_cv_lib_$ac_lib_var=yes"
  7037. else
  7038. echo "configure: failed program was:" >&5
  7039. cat conftest.$ac_ext >&5
  7040. rm -rf conftest*
  7041. eval "ac_cv_lib_$ac_lib_var=no"
  7042. fi
  7043. rm -f conftest*
  7044. LIBS="$ac_save_LIBS"
  7045. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7046. echo "$ac_t""yes" 1>&6
  7047. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB $MATHLIB"
  7048. else
  7049. echo "$ac_t""no" 1>&6
  7050. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7051. echo "configure:8681: checking for mysql_query in -lmysqlclient" >&5
  7052. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7053. ac_save_LIBS="$LIBS"
  7054. LIBS="-lmysqlclient $ZLIB $LIBS"
  7055. cat > conftest.$ac_ext <<EOF
  7056. #line 8687 "configure"
  7057. #include "confdefs.h"
  7058. /* Override any gcc2 internal prototype to avoid an error. */
  7059. /* We use char because int might match the return type of a gcc2
  7060. builtin and then its argument prototype would still apply. */
  7061. char mysql_query();
  7062. int main() {
  7063. mysql_query()
  7064. ; return 0; }
  7065. EOF
  7066. if { (eval echo configure:8698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7067. rm -rf conftest*
  7068. eval "ac_cv_lib_$ac_lib_var=yes"
  7069. else
  7070. echo "configure: failed program was:" >&5
  7071. cat conftest.$ac_ext >&5
  7072. rm -rf conftest*
  7073. eval "ac_cv_lib_$ac_lib_var=no"
  7074. fi
  7075. rm -f conftest*
  7076. LIBS="$ac_save_LIBS"
  7077. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7078. echo "$ac_t""yes" 1>&6
  7079. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB"
  7080. else
  7081. echo "$ac_t""no" 1>&6
  7082. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7083. echo "configure:8717: checking for mysql_query in -lmysqlclient" >&5
  7084. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7085. ac_save_LIBS="$LIBS"
  7086. LIBS="-lmysqlclient $ZLIB $MATHLIB $LIBS"
  7087. cat > conftest.$ac_ext <<EOF
  7088. #line 8723 "configure"
  7089. #include "confdefs.h"
  7090. /* Override any gcc2 internal prototype to avoid an error. */
  7091. /* We use char because int might match the return type of a gcc2
  7092. builtin and then its argument prototype would still apply. */
  7093. char mysql_query();
  7094. int main() {
  7095. mysql_query()
  7096. ; return 0; }
  7097. EOF
  7098. if { (eval echo configure:8734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7099. rm -rf conftest*
  7100. eval "ac_cv_lib_$ac_lib_var=yes"
  7101. else
  7102. echo "configure: failed program was:" >&5
  7103. cat conftest.$ac_ext >&5
  7104. rm -rf conftest*
  7105. eval "ac_cv_lib_$ac_lib_var=no"
  7106. fi
  7107. rm -f conftest*
  7108. LIBS="$ac_save_LIBS"
  7109. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7110. echo "$ac_t""yes" 1>&6
  7111. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $MATHLIB"
  7112. else
  7113. echo "$ac_t""no" 1>&6
  7114. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7115. echo "configure:8753: checking for mysql_query in -lmysqlclient" >&5
  7116. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7117. ac_save_LIBS="$LIBS"
  7118. LIBS="-lmysqlclient $ZLIB $SOCKLIB $LIBS"
  7119. cat > conftest.$ac_ext <<EOF
  7120. #line 8759 "configure"
  7121. #include "confdefs.h"
  7122. /* Override any gcc2 internal prototype to avoid an error. */
  7123. /* We use char because int might match the return type of a gcc2
  7124. builtin and then its argument prototype would still apply. */
  7125. char mysql_query();
  7126. int main() {
  7127. mysql_query()
  7128. ; return 0; }
  7129. EOF
  7130. if { (eval echo configure:8770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7131. rm -rf conftest*
  7132. eval "ac_cv_lib_$ac_lib_var=yes"
  7133. else
  7134. echo "configure: failed program was:" >&5
  7135. cat conftest.$ac_ext >&5
  7136. rm -rf conftest*
  7137. eval "ac_cv_lib_$ac_lib_var=no"
  7138. fi
  7139. rm -f conftest*
  7140. LIBS="$ac_save_LIBS"
  7141. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7142. echo "$ac_t""yes" 1>&6
  7143. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB"
  7144. else
  7145. echo "$ac_t""no" 1>&6
  7146. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7147. echo "configure:8789: checking for mysql_query in -lmysqlclient" >&5
  7148. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7149. ac_save_LIBS="$LIBS"
  7150. LIBS="-lmysqlclient $ZLIB $SOCKLIB $MATHLIB $LIBS"
  7151. cat > conftest.$ac_ext <<EOF
  7152. #line 8795 "configure"
  7153. #include "confdefs.h"
  7154. /* Override any gcc2 internal prototype to avoid an error. */
  7155. /* We use char because int might match the return type of a gcc2
  7156. builtin and then its argument prototype would still apply. */
  7157. char mysql_query();
  7158. int main() {
  7159. mysql_query()
  7160. ; return 0; }
  7161. EOF
  7162. if { (eval echo configure:8806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7163. rm -rf conftest*
  7164. eval "ac_cv_lib_$ac_lib_var=yes"
  7165. else
  7166. echo "configure: failed program was:" >&5
  7167. cat conftest.$ac_ext >&5
  7168. rm -rf conftest*
  7169. eval "ac_cv_lib_$ac_lib_var=no"
  7170. fi
  7171. rm -f conftest*
  7172. LIBS="$ac_save_LIBS"
  7173. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7174. echo "$ac_t""yes" 1>&6
  7175. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB $MATHLIB"
  7176. else
  7177. echo "$ac_t""no" 1>&6
  7178. LDFLAGS=${ac_save_ldflags}
  7179. { echo "configure: error: *** Unable to locate MySQL library." 1>&2; exit 1; }
  7180. fi
  7181. fi
  7182. fi
  7183. fi
  7184. fi
  7185. fi
  7186. fi
  7187. fi
  7188. LDFLAGS=${ac_save_ldflags}
  7189. # Check for libmysqld (for embedded version of the driver)
  7190. # Extract the first word of "mysql_config", so it can be a program name with args.
  7191. set dummy mysql_config; ac_word=$2
  7192. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  7193. echo "configure:8896: checking for $ac_word" >&5
  7194. case "$MYSQLD_CONFIG" in
  7195. /*)
  7196. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a path.
  7197. ;;
  7198. ?:/*)
  7199. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a dos path.
  7200. ;;
  7201. *)
  7202. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  7203. ac_dummy="$PATH"
  7204. for ac_dir in $ac_dummy; do
  7205. test -z "$ac_dir" && ac_dir=.
  7206. if test -f $ac_dir/$ac_word; then
  7207. ac_cv_path_MYSQLD_CONFIG="$ac_dir/$ac_word"
  7208. break
  7209. fi
  7210. done
  7211. IFS="$ac_save_ifs"
  7212. test -z "$ac_cv_path_MYSQLD_CONFIG" && ac_cv_path_MYSQLD_CONFIG="no"
  7213. ;;
  7214. esac
  7215. MYSQLD_CONFIG="$ac_cv_path_MYSQLD_CONFIG"
  7216. if test -n "$MYSQLD_CONFIG"; then
  7217. echo "$ac_t""$MYSQLD_CONFIG" 1>&6
  7218. else
  7219. echo "$ac_t""no" 1>&6
  7220. fi
  7221. if test "$MYSQLD_CONFIG" = "no" ; then
  7222. { echo "configure: error: *** couldn't find mysql_config" 1>&2; exit 1; }
  7223. fi
  7224. if test "$MYSQLD_CONFIG" != "" ; then
  7225. ac_ext=C
  7226. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  7227. ac_cpp='$CXXCPP $CPPFLAGS'
  7228. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  7229. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  7230. cross_compiling=$ac_cv_prog_cxx_cross
  7231. ac_save_libs="$LIBS"
  7232. MYSQLDLIB=`"$MYSQLD_CONFIG" --libmysqld-libs`
  7233. LIBS="$MYSQLDLIB $LIBS"
  7234. echo $ac_n "checking for mysql_server_init""... $ac_c" 1>&6
  7235. echo "configure:8945: checking for mysql_server_init" >&5
  7236. cat > conftest.$ac_ext <<EOF
  7237. #line 8948 "configure"
  7238. #include "confdefs.h"
  7239. /* System header to define __stub macros and hopefully few prototypes,
  7240. which can conflict with char mysql_server_init(); below. */
  7241. #include <assert.h>
  7242. /* Override any gcc2 internal prototype to avoid an error. */
  7243. #ifdef __cplusplus
  7244. extern "C"
  7245. #endif
  7246. /* We use char because int might match the return type of a gcc2
  7247. builtin and then its argument prototype would still apply. */
  7248. char mysql_server_init();
  7249. int main() {
  7250. /* The GNU C library defines this for functions which it implements
  7251. to always fail with ENOSYS. Some functions are actually named
  7252. something starting with __ and the normal name is an alias. */
  7253. #if defined (__stub_mysql_server_init) || defined (__stub___mysql_server_init)
  7254. choke me
  7255. #else
  7256. mysql_server_init();
  7257. #endif
  7258. ; return 0; }
  7259. EOF
  7260. if { (eval echo configure:8974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7261. rm -rf conftest*
  7262. eval "ac_cv_func_mysql_server_init=yes"
  7263. else
  7264. echo "configure: failed program was:" >&5
  7265. cat conftest.$ac_ext >&5
  7266. rm -rf conftest*
  7267. eval "ac_cv_func_mysql_server_init=no"
  7268. fi
  7269. rm -f conftest*
  7270. if eval "test \"`echo '$ac_cv_func_'mysql_server_init`\" = yes"; then
  7271. echo "$ac_t""yes" 1>&6
  7272. :
  7273. else
  7274. echo "$ac_t""no" 1>&6
  7275. MYSQLDLIB="";
  7276. echo "configure: warning: libmysqld not found" 1>&2
  7277. fi
  7278. LIBS=$ac_save_libs
  7279. ac_ext=c
  7280. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  7281. ac_cpp='$CPP $CPPFLAGS'
  7282. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  7283. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  7284. cross_compiling=$ac_cv_prog_cc_cross
  7285. ac_ext=c
  7286. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  7287. ac_cpp='$CPP $CPPFLAGS'
  7288. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  7289. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  7290. cross_compiling=$ac_cv_prog_cc_cross
  7291. fi
  7292. fi # $USE_MYSQL
  7293. # Done checking MySQL
  7294. # Enable SQLite option
  7295. echo $ac_n "checking whether to use SQLite""... $ac_c" 1>&6
  7296. echo "configure:9026: checking whether to use SQLite" >&5
  7297. echo "$ac_t"""$with_sqlite"" 1>&6
  7298. case "$with_sqlite" in
  7299. "no") USE_SQLITE= ;;
  7300. "yes") USE_SQLITE="1" ;;
  7301. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  7302. esac
  7303. SQLITEINCPATH=
  7304. SQLITELIBPATH=
  7305. SQLITELIB=
  7306. if test -n "$USE_SQLITE"; then
  7307. # With SQLite includes directory
  7308. echo $ac_n "checking for location of SQLite includes""... $ac_c" 1>&6
  7309. echo "configure:9046: checking for location of SQLite includes" >&5
  7310. case "$with_sqlite_includes" in
  7311. y | ye | yes | n | no)
  7312. { echo "configure: error: *** You must supply a directory to --with-sqlite-includes." 1>&2; exit 1; }
  7313. ;;
  7314. esac
  7315. echo "$ac_t""$with_sqlite_includes" 1>&6
  7316. if test -n "$with_sqlite_includes" ; then
  7317. for dir in $with_sqlite_includes; do
  7318. if test -d "$dir"; then
  7319. SQLITEINCPATH="$SQLITEINCPATH -I$dir"
  7320. else
  7321. { echo "configure: error: *** SQLite includes directory $dir does not exist." 1>&2; exit 1; }
  7322. fi
  7323. done
  7324. fi
  7325. ac_save_cppflags="$CPPFLAGS"
  7326. CPPFLAGS="$SQLITEINCPATH $CPPFLAGS"
  7327. for ac_hdr in sqlite3.h
  7328. do
  7329. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7330. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7331. echo "configure:9072: checking for $ac_hdr" >&5
  7332. cat > conftest.$ac_ext <<EOF
  7333. #line 9075 "configure"
  7334. #include "confdefs.h"
  7335. #include <$ac_hdr>
  7336. EOF
  7337. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7338. { (eval echo configure:9080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7339. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7340. if test -z "$ac_err"; then
  7341. rm -rf conftest*
  7342. eval "ac_cv_header_$ac_safe=yes"
  7343. else
  7344. echo "$ac_err" >&5
  7345. echo "configure: failed program was:" >&5
  7346. cat conftest.$ac_ext >&5
  7347. rm -rf conftest*
  7348. eval "ac_cv_header_$ac_safe=no"
  7349. fi
  7350. rm -f conftest*
  7351. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7352. echo "$ac_t""yes" 1>&6
  7353. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7354. cat >> confdefs.h <<EOF
  7355. #define $ac_tr_hdr 1
  7356. EOF
  7357. else
  7358. echo "$ac_t""no" 1>&6
  7359. { echo "configure: error: *** Unable to locate SQLite includes." 1>&2; exit 1; }
  7360. fi
  7361. done
  7362. CPPFLAGS=$ac_save_cppflags
  7363. cat >> confdefs.h <<\EOF
  7364. #define HAVE_SQLITE 1
  7365. EOF
  7366. fi # $USE_SQLITE
  7367. if test -n "$USE_SQLITE"; then
  7368. # With SQLite library directory
  7369. echo $ac_n "checking for location of SQLite library""... $ac_c" 1>&6
  7370. echo "configure:9123: checking for location of SQLite library" >&5
  7371. case "$with_sqlite_libs" in
  7372. y | ye | yes | n | no)
  7373. { echo "configure: error: *** You must supply a directory to --with-sqlite-libs." 1>&2; exit 1; }
  7374. ;;
  7375. esac
  7376. echo "$ac_t""$with_sqlite_libs" 1>&6
  7377. if test -n "$with_sqlite_libs"; then
  7378. for dir in $with_sqlite_libs; do
  7379. if test -d "$dir"; then
  7380. SQLITELIBPATH="$SQLITELIBPATH -L$dir"
  7381. else
  7382. { echo "configure: error: *** SQLite library directory $dir does not exist." 1>&2; exit 1; }
  7383. fi
  7384. done
  7385. fi
  7386. ac_save_ldflags="$LDFLAGS"
  7387. LDFLAGS="$SQLITELIBPATH $LDFLAGS"
  7388. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7389. echo "configure:9152: checking for sqlite3_open in -lsqlite3" >&5
  7390. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7391. ac_save_LIBS="$LIBS"
  7392. LIBS="-lsqlite3 $LIBS"
  7393. cat > conftest.$ac_ext <<EOF
  7394. #line 9158 "configure"
  7395. #include "confdefs.h"
  7396. /* Override any gcc2 internal prototype to avoid an error. */
  7397. /* We use char because int might match the return type of a gcc2
  7398. builtin and then its argument prototype would still apply. */
  7399. char sqlite3_open();
  7400. int main() {
  7401. sqlite3_open()
  7402. ; return 0; }
  7403. EOF
  7404. if { (eval echo configure:9169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7405. rm -rf conftest*
  7406. eval "ac_cv_lib_$ac_lib_var=yes"
  7407. else
  7408. echo "configure: failed program was:" >&5
  7409. cat conftest.$ac_ext >&5
  7410. rm -rf conftest*
  7411. eval "ac_cv_lib_$ac_lib_var=no"
  7412. fi
  7413. rm -f conftest*
  7414. LIBS="$ac_save_LIBS"
  7415. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7416. echo "$ac_t""yes" 1>&6
  7417. SQLITELIB="$SQLITELIB -lsqlite3 "
  7418. else
  7419. echo "$ac_t""no" 1>&6
  7420. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7421. echo "configure:9188: checking for sqlite3_open in -lsqlite3" >&5
  7422. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7423. ac_save_LIBS="$LIBS"
  7424. LIBS="-lsqlite3 $DLLIB $LIBS"
  7425. cat > conftest.$ac_ext <<EOF
  7426. #line 9194 "configure"
  7427. #include "confdefs.h"
  7428. /* Override any gcc2 internal prototype to avoid an error. */
  7429. /* We use char because int might match the return type of a gcc2
  7430. builtin and then its argument prototype would still apply. */
  7431. char sqlite3_open();
  7432. int main() {
  7433. sqlite3_open()
  7434. ; return 0; }
  7435. EOF
  7436. if { (eval echo configure:9205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7437. rm -rf conftest*
  7438. eval "ac_cv_lib_$ac_lib_var=yes"
  7439. else
  7440. echo "configure: failed program was:" >&5
  7441. cat conftest.$ac_ext >&5
  7442. rm -rf conftest*
  7443. eval "ac_cv_lib_$ac_lib_var=no"
  7444. fi
  7445. rm -f conftest*
  7446. LIBS="$ac_save_LIBS"
  7447. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7448. echo "$ac_t""yes" 1>&6
  7449. SQLITELIB="$SQLITELIB -lsqlite3 $DLLIB"
  7450. else
  7451. echo "$ac_t""no" 1>&6
  7452. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7453. echo "configure:9224: checking for sqlite3_open in -lsqlite3" >&5
  7454. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7455. ac_save_LIBS="$LIBS"
  7456. LIBS="-lsqlite3 $MATHLIB $LIBS"
  7457. cat > conftest.$ac_ext <<EOF
  7458. #line 9230 "configure"
  7459. #include "confdefs.h"
  7460. /* Override any gcc2 internal prototype to avoid an error. */
  7461. /* We use char because int might match the return type of a gcc2
  7462. builtin and then its argument prototype would still apply. */
  7463. char sqlite3_open();
  7464. int main() {
  7465. sqlite3_open()
  7466. ; return 0; }
  7467. EOF
  7468. if { (eval echo configure:9241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7469. rm -rf conftest*
  7470. eval "ac_cv_lib_$ac_lib_var=yes"
  7471. else
  7472. echo "configure: failed program was:" >&5
  7473. cat conftest.$ac_ext >&5
  7474. rm -rf conftest*
  7475. eval "ac_cv_lib_$ac_lib_var=no"
  7476. fi
  7477. rm -f conftest*
  7478. LIBS="$ac_save_LIBS"
  7479. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7480. echo "$ac_t""yes" 1>&6
  7481. SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB"
  7482. else
  7483. echo "$ac_t""no" 1>&6
  7484. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7485. echo "configure:9260: checking for sqlite3_open in -lsqlite3" >&5
  7486. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7487. ac_save_LIBS="$LIBS"
  7488. LIBS="-lsqlite3 $MATHLIB $DLLIB $LIBS"
  7489. cat > conftest.$ac_ext <<EOF
  7490. #line 9266 "configure"
  7491. #include "confdefs.h"
  7492. /* Override any gcc2 internal prototype to avoid an error. */
  7493. /* We use char because int might match the return type of a gcc2
  7494. builtin and then its argument prototype would still apply. */
  7495. char sqlite3_open();
  7496. int main() {
  7497. sqlite3_open()
  7498. ; return 0; }
  7499. EOF
  7500. if { (eval echo configure:9277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7501. rm -rf conftest*
  7502. eval "ac_cv_lib_$ac_lib_var=yes"
  7503. else
  7504. echo "configure: failed program was:" >&5
  7505. cat conftest.$ac_ext >&5
  7506. rm -rf conftest*
  7507. eval "ac_cv_lib_$ac_lib_var=no"
  7508. fi
  7509. rm -f conftest*
  7510. LIBS="$ac_save_LIBS"
  7511. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7512. echo "$ac_t""yes" 1>&6
  7513. SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB $DLLIB"
  7514. else
  7515. echo "$ac_t""no" 1>&6
  7516. LDFLAGS=${ac_save_ldflags}
  7517. { echo "configure: error: *** Unable to locate SQLite library." 1>&2; exit 1; }
  7518. fi
  7519. fi
  7520. fi
  7521. fi
  7522. LDFLAGS=${ac_save_ldflags}
  7523. fi # $USE_SQLITE
  7524. # Done checking SQLite
  7525. # Enable OpenGL option
  7526. OPENGLINC=
  7527. OPENGLLIB=
  7528. OPENGLULIB=
  7529. USE_OPENGL=
  7530. OPENGL_X11=
  7531. OPENGL_AQUA=
  7532. OPENGL_WINDOWS=
  7533. echo $ac_n "checking whether to use OpenGL""... $ac_c" 1>&6
  7534. echo "configure:9352: checking whether to use OpenGL" >&5
  7535. echo "$ac_t"""$with_opengl"" 1>&6
  7536. case "$with_opengl" in
  7537. n|no)
  7538. OPENGL_TYPE=none
  7539. ;;
  7540. y|yes|x|x11|glx)
  7541. OPENGL_TYPE=X11
  7542. USE_OPENGL=1
  7543. OPENGL_X11=1
  7544. ;;
  7545. aqua|mac|osx|macosx|agl)
  7546. OPENGL_TYPE=Aqua
  7547. USE_OPENGL=1
  7548. OPENGL_AQUA=1
  7549. ;;
  7550. win|windows|mswin|wgl)
  7551. OPENGL_TYPE=Windows
  7552. USE_OPENGL=1
  7553. OPENGL_WINDOWS=1
  7554. ;;
  7555. *)
  7556. { echo "configure: error: *** Valid arguments for --with-opengl= are yes,no,x11,aqua,windows." 1>&2; exit 1; }
  7557. ;;
  7558. esac
  7559. if test -n "$USE_OPENGL" ; then
  7560. if test "$OPENGL_X11" = 1 ; then
  7561. # With OpenGL includes directory
  7562. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  7563. echo "configure:9386: checking for location of OpenGL includes" >&5
  7564. case "$with_opengl_includes" in
  7565. y | ye | yes | n | no)
  7566. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  7567. ;;
  7568. esac
  7569. echo "$ac_t""$with_opengl_includes" 1>&6
  7570. if test -n "$with_opengl_includes" ; then
  7571. for dir in $with_opengl_includes; do
  7572. if test -d "$dir"; then
  7573. OPENGLINC="$OPENGLINC -I$dir"
  7574. else
  7575. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  7576. fi
  7577. done
  7578. fi
  7579. ac_save_cppflags="$CPPFLAGS"
  7580. CPPFLAGS="$OPENGLINC $X_CFLAGS $CPPFLAGS"
  7581. for ac_hdr in GL/gl.h GL/glu.h
  7582. do
  7583. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7584. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7585. echo "configure:9412: checking for $ac_hdr" >&5
  7586. cat > conftest.$ac_ext <<EOF
  7587. #line 9415 "configure"
  7588. #include "confdefs.h"
  7589. #include <$ac_hdr>
  7590. EOF
  7591. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7592. { (eval echo configure:9420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7593. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7594. if test -z "$ac_err"; then
  7595. rm -rf conftest*
  7596. eval "ac_cv_header_$ac_safe=yes"
  7597. else
  7598. echo "$ac_err" >&5
  7599. echo "configure: failed program was:" >&5
  7600. cat conftest.$ac_ext >&5
  7601. rm -rf conftest*
  7602. eval "ac_cv_header_$ac_safe=no"
  7603. fi
  7604. rm -f conftest*
  7605. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7606. echo "$ac_t""yes" 1>&6
  7607. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7608. cat >> confdefs.h <<EOF
  7609. #define $ac_tr_hdr 1
  7610. EOF
  7611. else
  7612. echo "$ac_t""no" 1>&6
  7613. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  7614. fi
  7615. done
  7616. CPPFLAGS=$ac_save_cppflags
  7617. # With OpenGL library directory
  7618. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  7619. echo "configure:9454: checking for location of OpenGL library" >&5
  7620. case "$with_opengl_libs" in
  7621. y | ye | yes | n | no)
  7622. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  7623. ;;
  7624. esac
  7625. echo "$ac_t""$with_opengl_libs" 1>&6
  7626. if test -n "$with_opengl_libs"; then
  7627. for dir in $with_opengl_libs; do
  7628. if test -d "$dir"; then
  7629. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  7630. else
  7631. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  7632. fi
  7633. done
  7634. fi
  7635. ac_save_ldflags="$LDFLAGS"
  7636. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  7637. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7638. echo "configure:9483: checking for glBegin in -lGL" >&5
  7639. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7640. ac_save_LIBS="$LIBS"
  7641. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  7642. cat > conftest.$ac_ext <<EOF
  7643. #line 9489 "configure"
  7644. #include "confdefs.h"
  7645. /* Override any gcc2 internal prototype to avoid an error. */
  7646. /* We use char because int might match the return type of a gcc2
  7647. builtin and then its argument prototype would still apply. */
  7648. char glBegin();
  7649. int main() {
  7650. glBegin()
  7651. ; return 0; }
  7652. EOF
  7653. if { (eval echo configure:9500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7654. rm -rf conftest*
  7655. eval "ac_cv_lib_$ac_lib_var=yes"
  7656. else
  7657. echo "configure: failed program was:" >&5
  7658. cat conftest.$ac_ext >&5
  7659. rm -rf conftest*
  7660. eval "ac_cv_lib_$ac_lib_var=no"
  7661. fi
  7662. rm -f conftest*
  7663. LIBS="$ac_save_LIBS"
  7664. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7665. echo "$ac_t""yes" 1>&6
  7666. OPENGLLIB="$OPENGLLIB -lGL "
  7667. else
  7668. echo "$ac_t""no" 1>&6
  7669. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7670. echo "configure:9519: checking for glBegin in -lGL" >&5
  7671. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7672. ac_save_LIBS="$LIBS"
  7673. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lXext $LIBS"
  7674. cat > conftest.$ac_ext <<EOF
  7675. #line 9525 "configure"
  7676. #include "confdefs.h"
  7677. /* Override any gcc2 internal prototype to avoid an error. */
  7678. /* We use char because int might match the return type of a gcc2
  7679. builtin and then its argument prototype would still apply. */
  7680. char glBegin();
  7681. int main() {
  7682. glBegin()
  7683. ; return 0; }
  7684. EOF
  7685. if { (eval echo configure:9536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7686. rm -rf conftest*
  7687. eval "ac_cv_lib_$ac_lib_var=yes"
  7688. else
  7689. echo "configure: failed program was:" >&5
  7690. cat conftest.$ac_ext >&5
  7691. rm -rf conftest*
  7692. eval "ac_cv_lib_$ac_lib_var=no"
  7693. fi
  7694. rm -f conftest*
  7695. LIBS="$ac_save_LIBS"
  7696. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7697. echo "$ac_t""yes" 1>&6
  7698. OPENGLLIB="$OPENGLLIB -lGL -lXext"
  7699. else
  7700. echo "$ac_t""no" 1>&6
  7701. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7702. echo "configure:9555: checking for glBegin in -lGL" >&5
  7703. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7704. ac_save_LIBS="$LIBS"
  7705. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread $LIBS"
  7706. cat > conftest.$ac_ext <<EOF
  7707. #line 9561 "configure"
  7708. #include "confdefs.h"
  7709. /* Override any gcc2 internal prototype to avoid an error. */
  7710. /* We use char because int might match the return type of a gcc2
  7711. builtin and then its argument prototype would still apply. */
  7712. char glBegin();
  7713. int main() {
  7714. glBegin()
  7715. ; return 0; }
  7716. EOF
  7717. if { (eval echo configure:9572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7718. rm -rf conftest*
  7719. eval "ac_cv_lib_$ac_lib_var=yes"
  7720. else
  7721. echo "configure: failed program was:" >&5
  7722. cat conftest.$ac_ext >&5
  7723. rm -rf conftest*
  7724. eval "ac_cv_lib_$ac_lib_var=no"
  7725. fi
  7726. rm -f conftest*
  7727. LIBS="$ac_save_LIBS"
  7728. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7729. echo "$ac_t""yes" 1>&6
  7730. OPENGLLIB="$OPENGLLIB -lGL -lpthread"
  7731. else
  7732. echo "$ac_t""no" 1>&6
  7733. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7734. echo "configure:9591: checking for glBegin in -lGL" >&5
  7735. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7736. ac_save_LIBS="$LIBS"
  7737. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread -lXext $LIBS"
  7738. cat > conftest.$ac_ext <<EOF
  7739. #line 9597 "configure"
  7740. #include "confdefs.h"
  7741. /* Override any gcc2 internal prototype to avoid an error. */
  7742. /* We use char because int might match the return type of a gcc2
  7743. builtin and then its argument prototype would still apply. */
  7744. char glBegin();
  7745. int main() {
  7746. glBegin()
  7747. ; return 0; }
  7748. EOF
  7749. if { (eval echo configure:9608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7750. rm -rf conftest*
  7751. eval "ac_cv_lib_$ac_lib_var=yes"
  7752. else
  7753. echo "configure: failed program was:" >&5
  7754. cat conftest.$ac_ext >&5
  7755. rm -rf conftest*
  7756. eval "ac_cv_lib_$ac_lib_var=no"
  7757. fi
  7758. rm -f conftest*
  7759. LIBS="$ac_save_LIBS"
  7760. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7761. echo "$ac_t""yes" 1>&6
  7762. OPENGLLIB="$OPENGLLIB -lGL -lpthread -lXext"
  7763. else
  7764. echo "$ac_t""no" 1>&6
  7765. LDFLAGS=${ac_save_ldflags}
  7766. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  7767. fi
  7768. fi
  7769. fi
  7770. fi
  7771. LDFLAGS=${ac_save_ldflags}
  7772. ac_save_ldflags="$LDFLAGS"
  7773. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  7774. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  7775. echo "configure:9670: checking for gluBeginCurve in -lGLU" >&5
  7776. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  7777. ac_save_LIBS="$LIBS"
  7778. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  7779. cat > conftest.$ac_ext <<EOF
  7780. #line 9676 "configure"
  7781. #include "confdefs.h"
  7782. /* Override any gcc2 internal prototype to avoid an error. */
  7783. /* We use char because int might match the return type of a gcc2
  7784. builtin and then its argument prototype would still apply. */
  7785. char gluBeginCurve();
  7786. int main() {
  7787. gluBeginCurve()
  7788. ; return 0; }
  7789. EOF
  7790. if { (eval echo configure:9687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7791. rm -rf conftest*
  7792. eval "ac_cv_lib_$ac_lib_var=yes"
  7793. else
  7794. echo "configure: failed program was:" >&5
  7795. cat conftest.$ac_ext >&5
  7796. rm -rf conftest*
  7797. eval "ac_cv_lib_$ac_lib_var=no"
  7798. fi
  7799. rm -f conftest*
  7800. LIBS="$ac_save_LIBS"
  7801. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7802. echo "$ac_t""yes" 1>&6
  7803. OPENGLULIB="$OPENGLULIB -lGLU "
  7804. else
  7805. echo "$ac_t""no" 1>&6
  7806. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  7807. echo "configure:9706: checking for gluBeginCurve in -lGLU" >&5
  7808. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  7809. ac_save_LIBS="$LIBS"
  7810. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lstdc++ $LIBS"
  7811. cat > conftest.$ac_ext <<EOF
  7812. #line 9712 "configure"
  7813. #include "confdefs.h"
  7814. /* Override any gcc2 internal prototype to avoid an error. */
  7815. /* We use char because int might match the return type of a gcc2
  7816. builtin and then its argument prototype would still apply. */
  7817. char gluBeginCurve();
  7818. int main() {
  7819. gluBeginCurve()
  7820. ; return 0; }
  7821. EOF
  7822. if { (eval echo configure:9723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7823. rm -rf conftest*
  7824. eval "ac_cv_lib_$ac_lib_var=yes"
  7825. else
  7826. echo "configure: failed program was:" >&5
  7827. cat conftest.$ac_ext >&5
  7828. rm -rf conftest*
  7829. eval "ac_cv_lib_$ac_lib_var=no"
  7830. fi
  7831. rm -f conftest*
  7832. LIBS="$ac_save_LIBS"
  7833. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7834. echo "$ac_t""yes" 1>&6
  7835. OPENGLULIB="$OPENGLULIB -lGLU -lstdc++"
  7836. else
  7837. echo "$ac_t""no" 1>&6
  7838. LDFLAGS=${ac_save_ldflags}
  7839. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  7840. fi
  7841. fi
  7842. LDFLAGS=${ac_save_ldflags}
  7843. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  7844. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  7845. ac_save_libs="$LIBS"
  7846. ac_save_ldflags="$LDFLAGS"
  7847. LIBS=" $OPENGLLIB $LIBS"
  7848. LDFLAGS=" $LDFLAGS"
  7849. echo $ac_n "checking for glXCreatePbuffer""... $ac_c" 1>&6
  7850. echo "configure:9770: checking for glXCreatePbuffer" >&5
  7851. cat > conftest.$ac_ext <<EOF
  7852. #line 9773 "configure"
  7853. #include "confdefs.h"
  7854. /* System header to define __stub macros and hopefully few prototypes,
  7855. which can conflict with char glXCreatePbuffer(); below. */
  7856. #include <assert.h>
  7857. /* Override any gcc2 internal prototype to avoid an error. */
  7858. /* We use char because int might match the return type of a gcc2
  7859. builtin and then its argument prototype would still apply. */
  7860. char glXCreatePbuffer();
  7861. int main() {
  7862. /* The GNU C library defines this for functions which it implements
  7863. to always fail with ENOSYS. Some functions are actually named
  7864. something starting with __ and the normal name is an alias. */
  7865. #if defined (__stub_glXCreatePbuffer) || defined (__stub___glXCreatePbuffer)
  7866. choke me
  7867. #else
  7868. glXCreatePbuffer();
  7869. #endif
  7870. ; return 0; }
  7871. EOF
  7872. if { (eval echo configure:9796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7873. rm -rf conftest*
  7874. eval "ac_cv_func_glXCreatePbuffer=yes"
  7875. else
  7876. echo "configure: failed program was:" >&5
  7877. cat conftest.$ac_ext >&5
  7878. rm -rf conftest*
  7879. eval "ac_cv_func_glXCreatePbuffer=no"
  7880. fi
  7881. rm -f conftest*
  7882. if eval "test \"`echo '$ac_cv_func_'glXCreatePbuffer`\" = yes"; then
  7883. echo "$ac_t""yes" 1>&6
  7884. cat >> confdefs.h <<\EOF
  7885. #define HAVE_PBUFFERS 1
  7886. EOF
  7887. else
  7888. echo "$ac_t""no" 1>&6
  7889. { echo "configure: error: *** Unable to locate glXCreatePbuffer." 1>&2; exit 1; }
  7890. fi
  7891. LIBS=${ac_save_libs}
  7892. LDFLAGS=${ac_save_ldflags}
  7893. ac_save_libs="$LIBS"
  7894. ac_save_ldflags="$LDFLAGS"
  7895. LIBS=" $OPENGLLIB $LIBS"
  7896. LDFLAGS=" $LDFLAGS"
  7897. echo $ac_n "checking for glXCreateGLXPixmap""... $ac_c" 1>&6
  7898. echo "configure:9833: checking for glXCreateGLXPixmap" >&5
  7899. cat > conftest.$ac_ext <<EOF
  7900. #line 9836 "configure"
  7901. #include "confdefs.h"
  7902. /* System header to define __stub macros and hopefully few prototypes,
  7903. which can conflict with char glXCreateGLXPixmap(); below. */
  7904. #include <assert.h>
  7905. /* Override any gcc2 internal prototype to avoid an error. */
  7906. /* We use char because int might match the return type of a gcc2
  7907. builtin and then its argument prototype would still apply. */
  7908. char glXCreateGLXPixmap();
  7909. int main() {
  7910. /* The GNU C library defines this for functions which it implements
  7911. to always fail with ENOSYS. Some functions are actually named
  7912. something starting with __ and the normal name is an alias. */
  7913. #if defined (__stub_glXCreateGLXPixmap) || defined (__stub___glXCreateGLXPixmap)
  7914. choke me
  7915. #else
  7916. glXCreateGLXPixmap();
  7917. #endif
  7918. ; return 0; }
  7919. EOF
  7920. if { (eval echo configure:9859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7921. rm -rf conftest*
  7922. eval "ac_cv_func_glXCreateGLXPixmap=yes"
  7923. else
  7924. echo "configure: failed program was:" >&5
  7925. cat conftest.$ac_ext >&5
  7926. rm -rf conftest*
  7927. eval "ac_cv_func_glXCreateGLXPixmap=no"
  7928. fi
  7929. rm -f conftest*
  7930. if eval "test \"`echo '$ac_cv_func_'glXCreateGLXPixmap`\" = yes"; then
  7931. echo "$ac_t""yes" 1>&6
  7932. cat >> confdefs.h <<\EOF
  7933. #define HAVE_PIXMAPS 1
  7934. EOF
  7935. else
  7936. echo "$ac_t""no" 1>&6
  7937. { echo "configure: error: *** Unable to locate glXCreateGLXPixmap." 1>&2; exit 1; }
  7938. fi
  7939. LIBS=${ac_save_libs}
  7940. LDFLAGS=${ac_save_ldflags}
  7941. cat >> confdefs.h <<\EOF
  7942. #define OPENGL_X11 1
  7943. EOF
  7944. fi # $OPENGL_X11
  7945. if test "$OPENGL_AQUA" = 1 ; then
  7946. echo $ac_n "checking for location of OpenGL framework""... $ac_c" 1>&6
  7947. echo "configure:9902: checking for location of OpenGL framework" >&5
  7948. case "$with_opengl_framework" in
  7949. y | ye | yes | n | no)
  7950. { echo "configure: error: *** You must supply a directory to --with-opengl-framework." 1>&2; exit 1; }
  7951. ;;
  7952. esac
  7953. echo "$ac_t""$with_opengl_framework" 1>&6
  7954. if test -n "$with_opengl_framework"; then
  7955. if test -d $with_opengl_framework; then
  7956. OPENGLPATH="$OPENGLPATH -F$with_opengl_framework"
  7957. else
  7958. { echo "configure: error: *** OpenGL framework directory $dir does not exist." 1>&2; exit 1; }
  7959. fi
  7960. fi
  7961. ac_save_cppflags="$CPPFLAGS"
  7962. CPPFLAGS="$OPENGLPATH $CPPFLAGS"
  7963. for ac_hdr in OpenGL/gl.h OpenGL/glu.h
  7964. do
  7965. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7966. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7967. echo "configure:9926: checking for $ac_hdr" >&5
  7968. cat > conftest.$ac_ext <<EOF
  7969. #line 9929 "configure"
  7970. #include "confdefs.h"
  7971. #include <$ac_hdr>
  7972. EOF
  7973. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7974. { (eval echo configure:9934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7975. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7976. if test -z "$ac_err"; then
  7977. rm -rf conftest*
  7978. eval "ac_cv_header_$ac_safe=yes"
  7979. else
  7980. echo "$ac_err" >&5
  7981. echo "configure: failed program was:" >&5
  7982. cat conftest.$ac_ext >&5
  7983. rm -rf conftest*
  7984. eval "ac_cv_header_$ac_safe=no"
  7985. fi
  7986. rm -f conftest*
  7987. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7988. echo "$ac_t""yes" 1>&6
  7989. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7990. cat >> confdefs.h <<EOF
  7991. #define $ac_tr_hdr 1
  7992. EOF
  7993. else
  7994. echo "$ac_t""no" 1>&6
  7995. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  7996. fi
  7997. done
  7998. CPPFLAGS=$ac_save_cppflags
  7999. ac_save_libs="$LIBS"
  8000. ac_save_ldflags="$LDFLAGS"
  8001. LIBS="-framework OpenGL -framework AGL -framework ApplicationServices $LIBS"
  8002. LDFLAGS="$OPENGLPATH $LDFLAGS"
  8003. echo $ac_n "checking for glBegin""... $ac_c" 1>&6
  8004. echo "configure:9970: checking for glBegin" >&5
  8005. cat > conftest.$ac_ext <<EOF
  8006. #line 9973 "configure"
  8007. #include "confdefs.h"
  8008. /* System header to define __stub macros and hopefully few prototypes,
  8009. which can conflict with char glBegin(); below. */
  8010. #include <assert.h>
  8011. /* Override any gcc2 internal prototype to avoid an error. */
  8012. /* We use char because int might match the return type of a gcc2
  8013. builtin and then its argument prototype would still apply. */
  8014. char glBegin();
  8015. int main() {
  8016. /* The GNU C library defines this for functions which it implements
  8017. to always fail with ENOSYS. Some functions are actually named
  8018. something starting with __ and the normal name is an alias. */
  8019. #if defined (__stub_glBegin) || defined (__stub___glBegin)
  8020. choke me
  8021. #else
  8022. glBegin();
  8023. #endif
  8024. ; return 0; }
  8025. EOF
  8026. if { (eval echo configure:9996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8027. rm -rf conftest*
  8028. eval "ac_cv_func_glBegin=yes"
  8029. else
  8030. echo "configure: failed program was:" >&5
  8031. cat conftest.$ac_ext >&5
  8032. rm -rf conftest*
  8033. eval "ac_cv_func_glBegin=no"
  8034. fi
  8035. rm -f conftest*
  8036. if eval "test \"`echo '$ac_cv_func_'glBegin`\" = yes"; then
  8037. echo "$ac_t""yes" 1>&6
  8038. OPENGLLIB="$OPENGLLIB -framework OpenGL -framework AGL -framework ApplicationServices"
  8039. else
  8040. echo "$ac_t""no" 1>&6
  8041. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  8042. fi
  8043. LIBS=${ac_save_libs}
  8044. LDFLAGS=${ac_save_ldflags}
  8045. ac_save_libs="$LIBS"
  8046. ac_save_ldflags="$LDFLAGS"
  8047. LIBS=" $OPENGLLIB $LIBS"
  8048. LDFLAGS="$OPENGLPATH $LDFLAGS"
  8049. echo $ac_n "checking for gluBeginCurve""... $ac_c" 1>&6
  8050. echo "configure:10033: checking for gluBeginCurve" >&5
  8051. cat > conftest.$ac_ext <<EOF
  8052. #line 10036 "configure"
  8053. #include "confdefs.h"
  8054. /* System header to define __stub macros and hopefully few prototypes,
  8055. which can conflict with char gluBeginCurve(); below. */
  8056. #include <assert.h>
  8057. /* Override any gcc2 internal prototype to avoid an error. */
  8058. /* We use char because int might match the return type of a gcc2
  8059. builtin and then its argument prototype would still apply. */
  8060. char gluBeginCurve();
  8061. int main() {
  8062. /* The GNU C library defines this for functions which it implements
  8063. to always fail with ENOSYS. Some functions are actually named
  8064. something starting with __ and the normal name is an alias. */
  8065. #if defined (__stub_gluBeginCurve) || defined (__stub___gluBeginCurve)
  8066. choke me
  8067. #else
  8068. gluBeginCurve();
  8069. #endif
  8070. ; return 0; }
  8071. EOF
  8072. if { (eval echo configure:10059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8073. rm -rf conftest*
  8074. eval "ac_cv_func_gluBeginCurve=yes"
  8075. else
  8076. echo "configure: failed program was:" >&5
  8077. cat conftest.$ac_ext >&5
  8078. rm -rf conftest*
  8079. eval "ac_cv_func_gluBeginCurve=no"
  8080. fi
  8081. rm -f conftest*
  8082. if eval "test \"`echo '$ac_cv_func_'gluBeginCurve`\" = yes"; then
  8083. echo "$ac_t""yes" 1>&6
  8084. OPENGLLIB="$OPENGLLIB "
  8085. else
  8086. echo "$ac_t""no" 1>&6
  8087. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  8088. fi
  8089. LIBS=${ac_save_libs}
  8090. LDFLAGS=${ac_save_ldflags}
  8091. OPENGLINC="$OPENGLPATH"
  8092. OPENGLLIBPATH="$OPENGLPATH"
  8093. cat >> confdefs.h <<\EOF
  8094. #define OPENGL_AQUA 1
  8095. EOF
  8096. fi # $OPENGL_AQUA
  8097. if test "$OPENGL_WINDOWS" = 1 ; then
  8098. # With OpenGL includes directory
  8099. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  8100. echo "configure:10107: checking for location of OpenGL includes" >&5
  8101. case "$with_opengl_includes" in
  8102. y | ye | yes | n | no)
  8103. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  8104. ;;
  8105. esac
  8106. echo "$ac_t""$with_opengl_includes" 1>&6
  8107. if test -n "$with_opengl_includes" ; then
  8108. for dir in $with_opengl_includes; do
  8109. if test -d "$dir"; then
  8110. OPENGLINC="$OPENGLINC -I$dir"
  8111. else
  8112. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  8113. fi
  8114. done
  8115. fi
  8116. ac_save_cppflags="$CPPFLAGS"
  8117. CPPFLAGS="$OPENGLINC $CPPFLAGS"
  8118. for ac_hdr in GL/gl.h GL/glu.h
  8119. do
  8120. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8121. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8122. echo "configure:10133: checking for $ac_hdr" >&5
  8123. cat > conftest.$ac_ext <<EOF
  8124. #line 10136 "configure"
  8125. #include "confdefs.h"
  8126. #include <$ac_hdr>
  8127. EOF
  8128. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8129. { (eval echo configure:10141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8130. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8131. if test -z "$ac_err"; then
  8132. rm -rf conftest*
  8133. eval "ac_cv_header_$ac_safe=yes"
  8134. else
  8135. echo "$ac_err" >&5
  8136. echo "configure: failed program was:" >&5
  8137. cat conftest.$ac_ext >&5
  8138. rm -rf conftest*
  8139. eval "ac_cv_header_$ac_safe=no"
  8140. fi
  8141. rm -f conftest*
  8142. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8143. echo "$ac_t""yes" 1>&6
  8144. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8145. cat >> confdefs.h <<EOF
  8146. #define $ac_tr_hdr 1
  8147. EOF
  8148. else
  8149. echo "$ac_t""no" 1>&6
  8150. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  8151. fi
  8152. done
  8153. CPPFLAGS=$ac_save_cppflags
  8154. # With OpenGL library directory
  8155. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  8156. echo "configure:10175: checking for location of OpenGL library" >&5
  8157. case "$with_opengl_libs" in
  8158. y | ye | yes | n | no)
  8159. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  8160. ;;
  8161. esac
  8162. echo "$ac_t""$with_opengl_libs" 1>&6
  8163. if test -n "$with_opengl_libs"; then
  8164. for dir in $with_opengl_libs; do
  8165. if test -d "$dir"; then
  8166. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  8167. else
  8168. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  8169. fi
  8170. done
  8171. fi
  8172. ac_save_cflags="$CFLAGS"
  8173. CFLAGS="$CFLAGS $OPENGLINC"
  8174. ac_save_ldflags="$LDFLAGS"
  8175. ac_save_libs="$LIBS"
  8176. echo $ac_n "checking for OpenGL library""... $ac_c" 1>&6
  8177. echo "configure:10200: checking for OpenGL library" >&5
  8178. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  8179. LIBS="-lopengl32 "
  8180. cat > conftest.$ac_ext <<EOF
  8181. #line 10204 "configure"
  8182. #include "confdefs.h"
  8183. #include <GL/gl.h>
  8184. int main() {
  8185. glEnd();
  8186. ; return 0; }
  8187. EOF
  8188. if { (eval echo configure:10211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8189. rm -rf conftest*
  8190. echo "$ac_t""found" 1>&6
  8191. OPENGLLIB="$OPENGLLIB -lopengl32 "
  8192. else
  8193. echo "configure: failed program was:" >&5
  8194. cat conftest.$ac_ext >&5
  8195. rm -rf conftest*
  8196. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  8197. fi
  8198. rm -f conftest*
  8199. LIBS=${ac_save_libs}
  8200. LDFLAGS=${ac_save_ldflags}
  8201. ac_save_ldflags="$LDFLAGS"
  8202. ac_save_libs="$LIBS"
  8203. echo $ac_n "checking for GLU library""... $ac_c" 1>&6
  8204. echo "configure:10235: checking for GLU library" >&5
  8205. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  8206. LIBS="-lglu32 $OPENGLLIB "
  8207. cat > conftest.$ac_ext <<EOF
  8208. #line 10239 "configure"
  8209. #include "confdefs.h"
  8210. #include <GL/glu.h>
  8211. int main() {
  8212. gluNewQuadric();
  8213. ; return 0; }
  8214. EOF
  8215. if { (eval echo configure:10246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8216. rm -rf conftest*
  8217. echo "$ac_t""found" 1>&6
  8218. OPENGLULIB="$OPENGLULIB -lglu32 "
  8219. else
  8220. echo "configure: failed program was:" >&5
  8221. cat conftest.$ac_ext >&5
  8222. rm -rf conftest*
  8223. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  8224. fi
  8225. rm -f conftest*
  8226. LIBS=${ac_save_libs}
  8227. LDFLAGS=${ac_save_ldflags}
  8228. CFLAGS="${ac_save_cflags}"
  8229. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  8230. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  8231. cat >> confdefs.h <<\EOF
  8232. #define OPENGL_WINDOWS 1
  8233. EOF
  8234. fi # $OPENGL_WINDOWS
  8235. fi # $USE_OPENGL
  8236. # Done checking OpenGL
  8237. # Enable ODBC option
  8238. echo $ac_n "checking whether to use ODBC""... $ac_c" 1>&6
  8239. echo "configure:10295: checking whether to use ODBC" >&5
  8240. echo "$ac_t"""$with_odbc"" 1>&6
  8241. case "$with_odbc" in
  8242. "no") USE_ODBC= ;;
  8243. "yes") USE_ODBC="1" ;;
  8244. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8245. esac
  8246. ODBCINC=
  8247. ODBCLIB=
  8248. if test -n "$USE_ODBC"; then
  8249. # With ODBC includes directory
  8250. echo $ac_n "checking for location of ODBC includes""... $ac_c" 1>&6
  8251. echo "configure:10314: checking for location of ODBC includes" >&5
  8252. case "$with_odbc_includes" in
  8253. y | ye | yes | n | no)
  8254. { echo "configure: error: *** You must supply a directory to --with-odbc-includes." 1>&2; exit 1; }
  8255. ;;
  8256. esac
  8257. echo "$ac_t""$with_odbc_includes" 1>&6
  8258. if test -n "$with_odbc_includes" ; then
  8259. for dir in $with_odbc_includes; do
  8260. if test -d "$dir"; then
  8261. ODBCINC="$ODBCINC -I$dir"
  8262. else
  8263. { echo "configure: error: *** ODBC includes directory $dir does not exist." 1>&2; exit 1; }
  8264. fi
  8265. done
  8266. fi
  8267. ac_save_cppflags="$CPPFLAGS"
  8268. CPPFLAGS="$ODBCINC $CPPFLAGS"
  8269. for ac_hdr in sql.h
  8270. do
  8271. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8272. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8273. echo "configure:10340: checking for $ac_hdr" >&5
  8274. cat > conftest.$ac_ext <<EOF
  8275. #line 10343 "configure"
  8276. #include "confdefs.h"
  8277. #include <$ac_hdr>
  8278. EOF
  8279. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8280. { (eval echo configure:10348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8281. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8282. if test -z "$ac_err"; then
  8283. rm -rf conftest*
  8284. eval "ac_cv_header_$ac_safe=yes"
  8285. else
  8286. echo "$ac_err" >&5
  8287. echo "configure: failed program was:" >&5
  8288. cat conftest.$ac_ext >&5
  8289. rm -rf conftest*
  8290. eval "ac_cv_header_$ac_safe=no"
  8291. fi
  8292. rm -f conftest*
  8293. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8294. echo "$ac_t""yes" 1>&6
  8295. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8296. cat >> confdefs.h <<EOF
  8297. #define $ac_tr_hdr 1
  8298. EOF
  8299. else
  8300. echo "$ac_t""no" 1>&6
  8301. { echo "configure: error: *** Unable to locate ODBC includes." 1>&2; exit 1; }
  8302. fi
  8303. done
  8304. CPPFLAGS=$ac_save_cppflags
  8305. # With ODBC library directory
  8306. echo $ac_n "checking for location of ODBC library""... $ac_c" 1>&6
  8307. echo "configure:10382: checking for location of ODBC library" >&5
  8308. case "$with_odbc_libs" in
  8309. y | ye | yes | n | no)
  8310. { echo "configure: error: *** You must supply a directory to --with-odbc-libs." 1>&2; exit 1; }
  8311. ;;
  8312. esac
  8313. echo "$ac_t""$with_odbc_libs" 1>&6
  8314. if test -n "$with_odbc_libs"; then
  8315. for dir in $with_odbc_libs; do
  8316. if test -d "$dir"; then
  8317. ODBCLIB="$ODBCLIB -L$dir"
  8318. else
  8319. { echo "configure: error: *** ODBC library directory $dir does not exist." 1>&2; exit 1; }
  8320. fi
  8321. done
  8322. fi
  8323. ac_save_ldflags="$LDFLAGS"
  8324. LDFLAGS="$ODBCLIB $LDFLAGS"
  8325. echo $ac_n "checking for SQLConnect in -lodbc""... $ac_c" 1>&6
  8326. echo "configure:10407: checking for SQLConnect in -lodbc" >&5
  8327. ac_lib_var=`echo odbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  8328. ac_save_LIBS="$LIBS"
  8329. LIBS="-lodbc $ICONVLIB $LIBS"
  8330. cat > conftest.$ac_ext <<EOF
  8331. #line 10413 "configure"
  8332. #include "confdefs.h"
  8333. /* Override any gcc2 internal prototype to avoid an error. */
  8334. /* We use char because int might match the return type of a gcc2
  8335. builtin and then its argument prototype would still apply. */
  8336. char SQLConnect();
  8337. int main() {
  8338. SQLConnect()
  8339. ; return 0; }
  8340. EOF
  8341. if { (eval echo configure:10424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8342. rm -rf conftest*
  8343. eval "ac_cv_lib_$ac_lib_var=yes"
  8344. else
  8345. echo "configure: failed program was:" >&5
  8346. cat conftest.$ac_ext >&5
  8347. rm -rf conftest*
  8348. eval "ac_cv_lib_$ac_lib_var=no"
  8349. fi
  8350. rm -f conftest*
  8351. LIBS="$ac_save_LIBS"
  8352. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8353. echo "$ac_t""yes" 1>&6
  8354. ODBCLIB="$ODBCLIB -lodbc "
  8355. else
  8356. echo "$ac_t""no" 1>&6
  8357. LDFLAGS=${ac_save_ldflags}
  8358. ac_save_ldflags="$LDFLAGS"
  8359. LDFLAGS="$ODBCLIB $LDFLAGS"
  8360. echo $ac_n "checking for SQLConnect in -liodbc""... $ac_c" 1>&6
  8361. echo "configure:10449: checking for SQLConnect in -liodbc" >&5
  8362. ac_lib_var=`echo iodbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  8363. ac_save_LIBS="$LIBS"
  8364. LIBS="-liodbc $LIBS"
  8365. cat > conftest.$ac_ext <<EOF
  8366. #line 10455 "configure"
  8367. #include "confdefs.h"
  8368. /* Override any gcc2 internal prototype to avoid an error. */
  8369. /* We use char because int might match the return type of a gcc2
  8370. builtin and then its argument prototype would still apply. */
  8371. char SQLConnect();
  8372. int main() {
  8373. SQLConnect()
  8374. ; return 0; }
  8375. EOF
  8376. if { (eval echo configure:10466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8377. rm -rf conftest*
  8378. eval "ac_cv_lib_$ac_lib_var=yes"
  8379. else
  8380. echo "configure: failed program was:" >&5
  8381. cat conftest.$ac_ext >&5
  8382. rm -rf conftest*
  8383. eval "ac_cv_lib_$ac_lib_var=no"
  8384. fi
  8385. rm -f conftest*
  8386. LIBS="$ac_save_LIBS"
  8387. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8388. echo "$ac_t""yes" 1>&6
  8389. ODBCLIB="$ODBCLIB -liodbc "
  8390. else
  8391. echo "$ac_t""no" 1>&6
  8392. LDFLAGS=${ac_save_ldflags}
  8393. ac_save_cflags="$CFLAGS"
  8394. CFLAGS="$CFLAGS $ODBCINC"
  8395. ac_save_ldflags="$LDFLAGS"
  8396. ac_save_libs="$LIBS"
  8397. echo $ac_n "checking for ODBC library""... $ac_c" 1>&6
  8398. echo "configure:10491: checking for ODBC library" >&5
  8399. LDFLAGS="$ODBCLIB $LDFLAGS"
  8400. LIBS="-lodbc32 "
  8401. cat > conftest.$ac_ext <<EOF
  8402. #line 10495 "configure"
  8403. #include "confdefs.h"
  8404. #include <windows.h>
  8405. #include <sql.h>
  8406. int main() {
  8407. SQLAllocEnv((SQLHENV *)0);
  8408. ; return 0; }
  8409. EOF
  8410. if { (eval echo configure:10503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8411. rm -rf conftest*
  8412. echo "$ac_t""found" 1>&6
  8413. ODBCLIB="$ODBCLIB -lodbc32 "
  8414. else
  8415. echo "configure: failed program was:" >&5
  8416. cat conftest.$ac_ext >&5
  8417. rm -rf conftest*
  8418. { echo "configure: error: *** Unable to locate ODBC library." 1>&2; exit 1; }
  8419. fi
  8420. rm -f conftest*
  8421. LIBS=${ac_save_libs}
  8422. LDFLAGS=${ac_save_ldflags}
  8423. CFLAGS="${ac_save_cflags}"
  8424. fi
  8425. LDFLAGS=${ac_save_ldflags}
  8426. fi
  8427. LDFLAGS=${ac_save_ldflags}
  8428. fi # $USE_ODBC
  8429. # Done checking ODBC
  8430. # Enable FFTW option
  8431. echo $ac_n "checking whether to use FFTW""... $ac_c" 1>&6
  8432. echo "configure:10552: checking whether to use FFTW" >&5
  8433. echo "$ac_t"""$with_fftw"" 1>&6
  8434. case "$with_fftw" in
  8435. "no") USE_FFTW= ;;
  8436. "yes") USE_FFTW="1" ;;
  8437. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8438. esac
  8439. FFTWINC=
  8440. FFTWLIB=
  8441. if test -n "$USE_FFTW"; then
  8442. # With FFTW includes directory
  8443. echo $ac_n "checking for location of FFTW includes""... $ac_c" 1>&6
  8444. echo "configure:10571: checking for location of FFTW includes" >&5
  8445. case "$with_fftw_includes" in
  8446. y | ye | yes | n | no)
  8447. { echo "configure: error: *** You must supply a directory to --with-fftw-includes." 1>&2; exit 1; }
  8448. ;;
  8449. esac
  8450. echo "$ac_t""$with_fftw_includes" 1>&6
  8451. if test -n "$with_fftw_includes" ; then
  8452. for dir in $with_fftw_includes; do
  8453. if test -d "$dir"; then
  8454. FFTWINC="$FFTWINC -I$dir"
  8455. else
  8456. { echo "configure: error: *** FFTW includes directory $dir does not exist." 1>&2; exit 1; }
  8457. fi
  8458. done
  8459. fi
  8460. ac_save_cppflags="$CPPFLAGS"
  8461. CPPFLAGS="$FFTWINC $CPPFLAGS"
  8462. for ac_hdr in fftw3.h
  8463. do
  8464. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8465. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8466. echo "configure:10597: checking for $ac_hdr" >&5
  8467. cat > conftest.$ac_ext <<EOF
  8468. #line 10600 "configure"
  8469. #include "confdefs.h"
  8470. #include <$ac_hdr>
  8471. EOF
  8472. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8473. { (eval echo configure:10605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8474. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8475. if test -z "$ac_err"; then
  8476. rm -rf conftest*
  8477. eval "ac_cv_header_$ac_safe=yes"
  8478. else
  8479. echo "$ac_err" >&5
  8480. echo "configure: failed program was:" >&5
  8481. cat conftest.$ac_ext >&5
  8482. rm -rf conftest*
  8483. eval "ac_cv_header_$ac_safe=no"
  8484. fi
  8485. rm -f conftest*
  8486. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8487. echo "$ac_t""yes" 1>&6
  8488. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8489. cat >> confdefs.h <<EOF
  8490. #define $ac_tr_hdr 1
  8491. EOF
  8492. else
  8493. echo "$ac_t""no" 1>&6
  8494. ac_save_cppflags="$CPPFLAGS"
  8495. CPPFLAGS=" $CPPFLAGS"
  8496. for ac_hdr in fftw.h
  8497. do
  8498. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8499. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8500. echo "configure:10633: checking for $ac_hdr" >&5
  8501. cat > conftest.$ac_ext <<EOF
  8502. #line 10636 "configure"
  8503. #include "confdefs.h"
  8504. #include <$ac_hdr>
  8505. EOF
  8506. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8507. { (eval echo configure:10641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8508. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8509. if test -z "$ac_err"; then
  8510. rm -rf conftest*
  8511. eval "ac_cv_header_$ac_safe=yes"
  8512. else
  8513. echo "$ac_err" >&5
  8514. echo "configure: failed program was:" >&5
  8515. cat conftest.$ac_ext >&5
  8516. rm -rf conftest*
  8517. eval "ac_cv_header_$ac_safe=no"
  8518. fi
  8519. rm -f conftest*
  8520. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8521. echo "$ac_t""yes" 1>&6
  8522. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8523. cat >> confdefs.h <<EOF
  8524. #define $ac_tr_hdr 1
  8525. EOF
  8526. else
  8527. echo "$ac_t""no" 1>&6
  8528. ac_save_cppflags="$CPPFLAGS"
  8529. CPPFLAGS=" $CPPFLAGS"
  8530. for ac_hdr in dfftw.h
  8531. do
  8532. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8533. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8534. echo "configure:10669: checking for $ac_hdr" >&5
  8535. cat > conftest.$ac_ext <<EOF
  8536. #line 10672 "configure"
  8537. #include "confdefs.h"
  8538. #include <$ac_hdr>
  8539. EOF
  8540. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8541. { (eval echo configure:10677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8542. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8543. if test -z "$ac_err"; then
  8544. rm -rf conftest*
  8545. eval "ac_cv_header_$ac_safe=yes"
  8546. else
  8547. echo "$ac_err" >&5
  8548. echo "configure: failed program was:" >&5
  8549. cat conftest.$ac_ext >&5
  8550. rm -rf conftest*
  8551. eval "ac_cv_header_$ac_safe=no"
  8552. fi
  8553. rm -f conftest*
  8554. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8555. echo "$ac_t""yes" 1>&6
  8556. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8557. cat >> confdefs.h <<EOF
  8558. #define $ac_tr_hdr 1
  8559. EOF
  8560. else
  8561. echo "$ac_t""no" 1>&6
  8562. { echo "configure: error: *** Unable to locate FFTW includes." 1>&2; exit 1; }
  8563. fi
  8564. done
  8565. CPPFLAGS=$ac_save_cppflags
  8566. fi
  8567. done
  8568. CPPFLAGS=$ac_save_cppflags
  8569. fi
  8570. done
  8571. CPPFLAGS=$ac_save_cppflags
  8572. # With FFTW library directory
  8573. echo $ac_n "checking for location of FFTW library""... $ac_c" 1>&6
  8574. echo "configure:10723: checking for location of FFTW library" >&5
  8575. case "$with_fftw_libs" in
  8576. y | ye | yes | n | no)
  8577. { echo "configure: error: *** You must supply a directory to --with-fftw-libs." 1>&2; exit 1; }
  8578. ;;
  8579. esac
  8580. echo "$ac_t""$with_fftw_libs" 1>&6
  8581. if test -n "$with_fftw_libs"; then
  8582. for dir in $with_fftw_libs; do
  8583. if test -d "$dir"; then
  8584. FFTWLIB="$FFTWLIB -L$dir"
  8585. else
  8586. { echo "configure: error: *** FFTW library directory $dir does not exist." 1>&2; exit 1; }
  8587. fi
  8588. done
  8589. fi
  8590. ac_save_ldflags="$LDFLAGS"
  8591. LDFLAGS="$FFTWLIB $LDFLAGS"
  8592. echo $ac_n "checking for fftw_execute in -lfftw3""... $ac_c" 1>&6
  8593. echo "configure:10748: checking for fftw_execute in -lfftw3" >&5
  8594. ac_lib_var=`echo fftw3'_'fftw_execute | sed 'y%./+-%__p_%'`
  8595. ac_save_LIBS="$LIBS"
  8596. LIBS="-lfftw3 $MATHLIB $LIBS"
  8597. cat > conftest.$ac_ext <<EOF
  8598. #line 10754 "configure"
  8599. #include "confdefs.h"
  8600. /* Override any gcc2 internal prototype to avoid an error. */
  8601. /* We use char because int might match the return type of a gcc2
  8602. builtin and then its argument prototype would still apply. */
  8603. char fftw_execute();
  8604. int main() {
  8605. fftw_execute()
  8606. ; return 0; }
  8607. EOF
  8608. if { (eval echo configure:10765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8609. rm -rf conftest*
  8610. eval "ac_cv_lib_$ac_lib_var=yes"
  8611. else
  8612. echo "configure: failed program was:" >&5
  8613. cat conftest.$ac_ext >&5
  8614. rm -rf conftest*
  8615. eval "ac_cv_lib_$ac_lib_var=no"
  8616. fi
  8617. rm -f conftest*
  8618. LIBS="$ac_save_LIBS"
  8619. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8620. echo "$ac_t""yes" 1>&6
  8621. FFTWLIB="$FFTWLIB -lfftw3 $MATHLIB"
  8622. else
  8623. echo "$ac_t""no" 1>&6
  8624. LDFLAGS=${ac_save_ldflags}
  8625. ac_save_ldflags="$LDFLAGS"
  8626. LDFLAGS="$FFTWLIB $LDFLAGS"
  8627. echo $ac_n "checking for fftwnd_one in -lfftw""... $ac_c" 1>&6
  8628. echo "configure:10790: checking for fftwnd_one in -lfftw" >&5
  8629. ac_lib_var=`echo fftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  8630. ac_save_LIBS="$LIBS"
  8631. LIBS="-lfftw $MATHLIB $LIBS"
  8632. cat > conftest.$ac_ext <<EOF
  8633. #line 10796 "configure"
  8634. #include "confdefs.h"
  8635. /* Override any gcc2 internal prototype to avoid an error. */
  8636. /* We use char because int might match the return type of a gcc2
  8637. builtin and then its argument prototype would still apply. */
  8638. char fftwnd_one();
  8639. int main() {
  8640. fftwnd_one()
  8641. ; return 0; }
  8642. EOF
  8643. if { (eval echo configure:10807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8644. rm -rf conftest*
  8645. eval "ac_cv_lib_$ac_lib_var=yes"
  8646. else
  8647. echo "configure: failed program was:" >&5
  8648. cat conftest.$ac_ext >&5
  8649. rm -rf conftest*
  8650. eval "ac_cv_lib_$ac_lib_var=no"
  8651. fi
  8652. rm -f conftest*
  8653. LIBS="$ac_save_LIBS"
  8654. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8655. echo "$ac_t""yes" 1>&6
  8656. FFTWLIB="$FFTWLIB -lfftw $MATHLIB"
  8657. else
  8658. echo "$ac_t""no" 1>&6
  8659. LDFLAGS=${ac_save_ldflags}
  8660. ac_save_ldflags="$LDFLAGS"
  8661. LDFLAGS="$FFTWLIB $LDFLAGS"
  8662. echo $ac_n "checking for fftwnd_one in -ldfftw""... $ac_c" 1>&6
  8663. echo "configure:10832: checking for fftwnd_one in -ldfftw" >&5
  8664. ac_lib_var=`echo dfftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  8665. ac_save_LIBS="$LIBS"
  8666. LIBS="-ldfftw $MATHLIB $LIBS"
  8667. cat > conftest.$ac_ext <<EOF
  8668. #line 10838 "configure"
  8669. #include "confdefs.h"
  8670. /* Override any gcc2 internal prototype to avoid an error. */
  8671. /* We use char because int might match the return type of a gcc2
  8672. builtin and then its argument prototype would still apply. */
  8673. char fftwnd_one();
  8674. int main() {
  8675. fftwnd_one()
  8676. ; return 0; }
  8677. EOF
  8678. if { (eval echo configure:10849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8679. rm -rf conftest*
  8680. eval "ac_cv_lib_$ac_lib_var=yes"
  8681. else
  8682. echo "configure: failed program was:" >&5
  8683. cat conftest.$ac_ext >&5
  8684. rm -rf conftest*
  8685. eval "ac_cv_lib_$ac_lib_var=no"
  8686. fi
  8687. rm -f conftest*
  8688. LIBS="$ac_save_LIBS"
  8689. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8690. echo "$ac_t""yes" 1>&6
  8691. FFTWLIB="$FFTWLIB -ldfftw $MATHLIB"
  8692. else
  8693. echo "$ac_t""no" 1>&6
  8694. LDFLAGS=${ac_save_ldflags}
  8695. { echo "configure: error: *** Unable to locate FFTW library." 1>&2; exit 1; }
  8696. fi
  8697. LDFLAGS=${ac_save_ldflags}
  8698. fi
  8699. LDFLAGS=${ac_save_ldflags}
  8700. fi
  8701. LDFLAGS=${ac_save_ldflags}
  8702. fi # $USE_FFTW
  8703. # Done checking FFTW
  8704. # Enable BLAS option
  8705. echo $ac_n "checking whether to use BLAS""... $ac_c" 1>&6
  8706. echo "configure:10906: checking whether to use BLAS" >&5
  8707. echo "$ac_t"""$with_blas"" 1>&6
  8708. case "$with_blas" in
  8709. "no") USE_BLAS= ;;
  8710. "yes") USE_BLAS="1" ;;
  8711. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8712. esac
  8713. BLASLIB=
  8714. BLASINC=
  8715. if test -n "$USE_BLAS"; then
  8716. # With BLAS includes directory
  8717. # BLAS doesn't have includes (FORTRAN library)
  8718. # With BLAS library directory
  8719. echo $ac_n "checking for location of BLAS includes""... $ac_c" 1>&6
  8720. echo "configure:10927: checking for location of BLAS includes" >&5
  8721. case "$with_blas_includes" in
  8722. y | ye | yes | n | no)
  8723. { echo "configure: error: *** You must supply a directory to --with-blas-includes." 1>&2; exit 1; }
  8724. ;;
  8725. esac
  8726. echo "$ac_t""$with_blas_includes" 1>&6
  8727. if test -n "$with_blas_includes" ; then
  8728. for dir in $with_blas_includes; do
  8729. if test -d "$dir"; then
  8730. BLASINC="$BLASINC -I$dir"
  8731. else
  8732. { echo "configure: error: *** BLAS includes directory $dir does not exist." 1>&2; exit 1; }
  8733. fi
  8734. done
  8735. fi
  8736. echo $ac_n "checking for location of BLAS library""... $ac_c" 1>&6
  8737. echo "configure:10947: checking for location of BLAS library" >&5
  8738. case "$with_blas_libs" in
  8739. y | ye | yes | n | no)
  8740. { echo "configure: error: *** You must supply a directory to --with-blas-libs." 1>&2; exit 1; }
  8741. ;;
  8742. esac
  8743. echo "$ac_t""$with_blas_libs" 1>&6
  8744. if test -n "$with_blas_libs"; then
  8745. for dir in $with_blas_libs; do
  8746. if test -d "$dir"; then
  8747. BLASLIB="$BLASLIB -L$dir"
  8748. else
  8749. { echo "configure: error: *** BLAS library directory $dir does not exist." 1>&2; exit 1; }
  8750. fi
  8751. done
  8752. fi
  8753. # See if cblas.h exists (CBLAS,ATLAS,others)
  8754. save_CPPFLAGS="$CPPFLAGS"
  8755. CPPFLAGS="$BLASINC $CPPFLAGS"
  8756. for ac_hdr in cblas.h
  8757. do
  8758. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8759. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8760. echo "configure:10973: checking for $ac_hdr" >&5
  8761. cat > conftest.$ac_ext <<EOF
  8762. #line 10976 "configure"
  8763. #include "confdefs.h"
  8764. #include <$ac_hdr>
  8765. EOF
  8766. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8767. { (eval echo configure:10981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8768. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8769. if test -z "$ac_err"; then
  8770. rm -rf conftest*
  8771. eval "ac_cv_header_$ac_safe=yes"
  8772. else
  8773. echo "$ac_err" >&5
  8774. echo "configure: failed program was:" >&5
  8775. cat conftest.$ac_ext >&5
  8776. rm -rf conftest*
  8777. eval "ac_cv_header_$ac_safe=no"
  8778. fi
  8779. rm -f conftest*
  8780. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8781. echo "$ac_t""yes" 1>&6
  8782. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8783. cat >> confdefs.h <<EOF
  8784. #define $ac_tr_hdr 1
  8785. EOF
  8786. else
  8787. echo "$ac_t""no" 1>&6
  8788. fi
  8789. done
  8790. CPPFLAGS="$save_CPPFLAGS"
  8791. ac_save_ldflags="$LDFLAGS"
  8792. LDFLAGS="$BLASLIB $LDFLAGS"
  8793. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  8794. echo "configure:11016: checking for dnrm2_ in -lblas" >&5
  8795. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  8796. ac_save_LIBS="$LIBS"
  8797. LIBS="-lblas $MATHLIB $LIBS"
  8798. cat > conftest.$ac_ext <<EOF
  8799. #line 11022 "configure"
  8800. #include "confdefs.h"
  8801. /* Override any gcc2 internal prototype to avoid an error. */
  8802. /* We use char because int might match the return type of a gcc2
  8803. builtin and then its argument prototype would still apply. */
  8804. char dnrm2_();
  8805. int main() {
  8806. dnrm2_()
  8807. ; return 0; }
  8808. EOF
  8809. if { (eval echo configure:11033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8810. rm -rf conftest*
  8811. eval "ac_cv_lib_$ac_lib_var=yes"
  8812. else
  8813. echo "configure: failed program was:" >&5
  8814. cat conftest.$ac_ext >&5
  8815. rm -rf conftest*
  8816. eval "ac_cv_lib_$ac_lib_var=no"
  8817. fi
  8818. rm -f conftest*
  8819. LIBS="$ac_save_LIBS"
  8820. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8821. echo "$ac_t""yes" 1>&6
  8822. BLASLIB="$BLASLIB -lblas "
  8823. else
  8824. echo "$ac_t""no" 1>&6
  8825. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  8826. echo "configure:11052: checking for dnrm2_ in -lblas" >&5
  8827. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  8828. ac_save_LIBS="$LIBS"
  8829. LIBS="-lblas $MATHLIB -lg2c $LIBS"
  8830. cat > conftest.$ac_ext <<EOF
  8831. #line 11058 "configure"
  8832. #include "confdefs.h"
  8833. /* Override any gcc2 internal prototype to avoid an error. */
  8834. /* We use char because int might match the return type of a gcc2
  8835. builtin and then its argument prototype would still apply. */
  8836. char dnrm2_();
  8837. int main() {
  8838. dnrm2_()
  8839. ; return 0; }
  8840. EOF
  8841. if { (eval echo configure:11069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8842. rm -rf conftest*
  8843. eval "ac_cv_lib_$ac_lib_var=yes"
  8844. else
  8845. echo "configure: failed program was:" >&5
  8846. cat conftest.$ac_ext >&5
  8847. rm -rf conftest*
  8848. eval "ac_cv_lib_$ac_lib_var=no"
  8849. fi
  8850. rm -f conftest*
  8851. LIBS="$ac_save_LIBS"
  8852. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8853. echo "$ac_t""yes" 1>&6
  8854. BLASLIB="$BLASLIB -lblas -lg2c"
  8855. else
  8856. echo "$ac_t""no" 1>&6
  8857. LDFLAGS=${ac_save_ldflags}
  8858. { echo "configure: error: *** Unable to locate BLAS library." 1>&2; exit 1; }
  8859. fi
  8860. fi
  8861. LDFLAGS=${ac_save_ldflags}
  8862. blas_ok=no
  8863. # Check for ATLAS
  8864. save_LDFLAGS="$LDFLAGS"
  8865. LDFLAGS="$BLASLIB $LDFLAGS"
  8866. echo $ac_n "checking for ATL_xerbla in -latlas""... $ac_c" 1>&6
  8867. echo "configure:11113: checking for ATL_xerbla in -latlas" >&5
  8868. ac_lib_var=`echo atlas'_'ATL_xerbla | sed 'y%./+-%__p_%'`
  8869. ac_save_LIBS="$LIBS"
  8870. LIBS="-latlas $LIBS"
  8871. cat > conftest.$ac_ext <<EOF
  8872. #line 11119 "configure"
  8873. #include "confdefs.h"
  8874. /* Override any gcc2 internal prototype to avoid an error. */
  8875. /* We use char because int might match the return type of a gcc2
  8876. builtin and then its argument prototype would still apply. */
  8877. char ATL_xerbla();
  8878. int main() {
  8879. ATL_xerbla()
  8880. ; return 0; }
  8881. EOF
  8882. if { (eval echo configure:11130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8883. rm -rf conftest*
  8884. eval "ac_cv_lib_$ac_lib_var=yes"
  8885. else
  8886. echo "configure: failed program was:" >&5
  8887. cat conftest.$ac_ext >&5
  8888. rm -rf conftest*
  8889. eval "ac_cv_lib_$ac_lib_var=no"
  8890. fi
  8891. rm -f conftest*
  8892. LIBS="$ac_save_LIBS"
  8893. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8894. echo "$ac_t""yes" 1>&6
  8895. echo $ac_n "checking for sgemm_ in -lf77blas""... $ac_c" 1>&6
  8896. echo "configure:11145: checking for sgemm_ in -lf77blas" >&5
  8897. ac_lib_var=`echo f77blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  8898. ac_save_LIBS="$LIBS"
  8899. LIBS="-lf77blas -latlas $LIBS"
  8900. cat > conftest.$ac_ext <<EOF
  8901. #line 11151 "configure"
  8902. #include "confdefs.h"
  8903. /* Override any gcc2 internal prototype to avoid an error. */
  8904. /* We use char because int might match the return type of a gcc2
  8905. builtin and then its argument prototype would still apply. */
  8906. char sgemm_();
  8907. int main() {
  8908. sgemm_()
  8909. ; return 0; }
  8910. EOF
  8911. if { (eval echo configure:11162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8912. rm -rf conftest*
  8913. eval "ac_cv_lib_$ac_lib_var=yes"
  8914. else
  8915. echo "configure: failed program was:" >&5
  8916. cat conftest.$ac_ext >&5
  8917. rm -rf conftest*
  8918. eval "ac_cv_lib_$ac_lib_var=no"
  8919. fi
  8920. rm -f conftest*
  8921. LIBS="$ac_save_LIBS"
  8922. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8923. echo "$ac_t""yes" 1>&6
  8924. echo $ac_n "checking for cblas_dgemm in -lcblas""... $ac_c" 1>&6
  8925. echo "configure:11177: checking for cblas_dgemm in -lcblas" >&5
  8926. ac_lib_var=`echo cblas'_'cblas_dgemm | sed 'y%./+-%__p_%'`
  8927. ac_save_LIBS="$LIBS"
  8928. LIBS="-lcblas -lf77blas -latlas $LIBS"
  8929. cat > conftest.$ac_ext <<EOF
  8930. #line 11183 "configure"
  8931. #include "confdefs.h"
  8932. /* Override any gcc2 internal prototype to avoid an error. */
  8933. /* We use char because int might match the return type of a gcc2
  8934. builtin and then its argument prototype would still apply. */
  8935. char cblas_dgemm();
  8936. int main() {
  8937. cblas_dgemm()
  8938. ; return 0; }
  8939. EOF
  8940. if { (eval echo configure:11194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8941. rm -rf conftest*
  8942. eval "ac_cv_lib_$ac_lib_var=yes"
  8943. else
  8944. echo "configure: failed program was:" >&5
  8945. cat conftest.$ac_ext >&5
  8946. rm -rf conftest*
  8947. eval "ac_cv_lib_$ac_lib_var=no"
  8948. fi
  8949. rm -f conftest*
  8950. LIBS="$ac_save_LIBS"
  8951. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8952. echo "$ac_t""yes" 1>&6
  8953. blas_ok=yes; BLASLIB="-lcblas -lf77blas -latlas"
  8954. else
  8955. echo "$ac_t""no" 1>&6
  8956. fi
  8957. else
  8958. echo "$ac_t""no" 1>&6
  8959. fi
  8960. else
  8961. echo "$ac_t""no" 1>&6
  8962. fi
  8963. LDFLAGS="$save_LDFLAGS"
  8964. # Do we have ATLAS?
  8965. if test $blas_ok = yes; then
  8966. cat >> confdefs.h <<\EOF
  8967. #define HAVE_LIBATLAS 1
  8968. EOF
  8969. fi
  8970. # BLAS in Apple vecLib framework? (Mac OS-X)
  8971. # not dependent on APP build
  8972. #if test -n "$MACOSX_APP"; then
  8973. if test $blas_ok = no; then
  8974. vlib_flags="-framework vecLib"
  8975. save_LIBS="$LIBS"
  8976. LIBS="$vlib_flags $LIBS"
  8977. echo $ac_n "checking for sgemm in $vlib_flags""... $ac_c" 1>&6
  8978. echo "configure:11240: checking for sgemm in $vlib_flags" >&5
  8979. cat > conftest.$ac_ext <<EOF
  8980. #line 11242 "configure"
  8981. #include "confdefs.h"
  8982. int main() {
  8983. sgemm
  8984. ; return 0; }
  8985. EOF
  8986. if { (eval echo configure:11249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8987. rm -rf conftest*
  8988. blas_ok=yes; BLASLIB="$vlib_flags"
  8989. else
  8990. echo "configure: failed program was:" >&5
  8991. cat conftest.$ac_ext >&5
  8992. rm -rf conftest*
  8993. BLASLIB=""
  8994. fi
  8995. rm -f conftest*
  8996. echo "$ac_t""$blas_ok" 1>&6
  8997. LIBS="$save_LIBS"
  8998. fi
  8999. #fi # $MACOSX_APP
  9000. # BLAS in PhiPACK libraries? (requires generic BLAS, too)
  9001. if test $blas_ok = no; then
  9002. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  9003. echo "configure:11267: checking for sgemm_ in -lblas" >&5
  9004. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9005. ac_save_LIBS="$LIBS"
  9006. LIBS="-lblas $LIBS"
  9007. cat > conftest.$ac_ext <<EOF
  9008. #line 11273 "configure"
  9009. #include "confdefs.h"
  9010. /* Override any gcc2 internal prototype to avoid an error. */
  9011. /* We use char because int might match the return type of a gcc2
  9012. builtin and then its argument prototype would still apply. */
  9013. char sgemm_();
  9014. int main() {
  9015. sgemm_()
  9016. ; return 0; }
  9017. EOF
  9018. if { (eval echo configure:11284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9019. rm -rf conftest*
  9020. eval "ac_cv_lib_$ac_lib_var=yes"
  9021. else
  9022. echo "configure: failed program was:" >&5
  9023. cat conftest.$ac_ext >&5
  9024. rm -rf conftest*
  9025. eval "ac_cv_lib_$ac_lib_var=no"
  9026. fi
  9027. rm -f conftest*
  9028. LIBS="$ac_save_LIBS"
  9029. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9030. echo "$ac_t""yes" 1>&6
  9031. echo $ac_n "checking for dgemm_ in -ldgemm""... $ac_c" 1>&6
  9032. echo "configure:11299: checking for dgemm_ in -ldgemm" >&5
  9033. ac_lib_var=`echo dgemm'_'dgemm_ | sed 'y%./+-%__p_%'`
  9034. ac_save_LIBS="$LIBS"
  9035. LIBS="-ldgemm -lblas $LIBS"
  9036. cat > conftest.$ac_ext <<EOF
  9037. #line 11305 "configure"
  9038. #include "confdefs.h"
  9039. /* Override any gcc2 internal prototype to avoid an error. */
  9040. /* We use char because int might match the return type of a gcc2
  9041. builtin and then its argument prototype would still apply. */
  9042. char dgemm_();
  9043. int main() {
  9044. dgemm_()
  9045. ; return 0; }
  9046. EOF
  9047. if { (eval echo configure:11316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9048. rm -rf conftest*
  9049. eval "ac_cv_lib_$ac_lib_var=yes"
  9050. else
  9051. echo "configure: failed program was:" >&5
  9052. cat conftest.$ac_ext >&5
  9053. rm -rf conftest*
  9054. eval "ac_cv_lib_$ac_lib_var=no"
  9055. fi
  9056. rm -f conftest*
  9057. LIBS="$ac_save_LIBS"
  9058. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9059. echo "$ac_t""yes" 1>&6
  9060. echo $ac_n "checking for sgemm_ in -lsgemm""... $ac_c" 1>&6
  9061. echo "configure:11331: checking for sgemm_ in -lsgemm" >&5
  9062. ac_lib_var=`echo sgemm'_'sgemm_ | sed 'y%./+-%__p_%'`
  9063. ac_save_LIBS="$LIBS"
  9064. LIBS="-lsgemm -lblas $LIBS"
  9065. cat > conftest.$ac_ext <<EOF
  9066. #line 11337 "configure"
  9067. #include "confdefs.h"
  9068. /* Override any gcc2 internal prototype to avoid an error. */
  9069. /* We use char because int might match the return type of a gcc2
  9070. builtin and then its argument prototype would still apply. */
  9071. char sgemm_();
  9072. int main() {
  9073. sgemm_()
  9074. ; return 0; }
  9075. EOF
  9076. if { (eval echo configure:11348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9077. rm -rf conftest*
  9078. eval "ac_cv_lib_$ac_lib_var=yes"
  9079. else
  9080. echo "configure: failed program was:" >&5
  9081. cat conftest.$ac_ext >&5
  9082. rm -rf conftest*
  9083. eval "ac_cv_lib_$ac_lib_var=no"
  9084. fi
  9085. rm -f conftest*
  9086. LIBS="$ac_save_LIBS"
  9087. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9088. echo "$ac_t""yes" 1>&6
  9089. blas_ok=yes; BLASLIB="-lsgemm -ldgemm -lblas"
  9090. else
  9091. echo "$ac_t""no" 1>&6
  9092. fi
  9093. else
  9094. echo "$ac_t""no" 1>&6
  9095. fi
  9096. else
  9097. echo "$ac_t""no" 1>&6
  9098. fi
  9099. fi
  9100. # BLAS in Sun Performance library?
  9101. if test $blas_ok = no; then
  9102. if test "x$GCC" != xyes; then # only works with Sun CC
  9103. echo $ac_n "checking for acosp in -lsunmath""... $ac_c" 1>&6
  9104. echo "configure:11382: checking for acosp in -lsunmath" >&5
  9105. ac_lib_var=`echo sunmath'_'acosp | sed 'y%./+-%__p_%'`
  9106. ac_save_LIBS="$LIBS"
  9107. LIBS="-lsunmath $LIBS"
  9108. cat > conftest.$ac_ext <<EOF
  9109. #line 11388 "configure"
  9110. #include "confdefs.h"
  9111. /* Override any gcc2 internal prototype to avoid an error. */
  9112. /* We use char because int might match the return type of a gcc2
  9113. builtin and then its argument prototype would still apply. */
  9114. char acosp();
  9115. int main() {
  9116. acosp()
  9117. ; return 0; }
  9118. EOF
  9119. if { (eval echo configure:11399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9120. rm -rf conftest*
  9121. eval "ac_cv_lib_$ac_lib_var=yes"
  9122. else
  9123. echo "configure: failed program was:" >&5
  9124. cat conftest.$ac_ext >&5
  9125. rm -rf conftest*
  9126. eval "ac_cv_lib_$ac_lib_var=no"
  9127. fi
  9128. rm -f conftest*
  9129. LIBS="$ac_save_LIBS"
  9130. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9131. echo "$ac_t""yes" 1>&6
  9132. echo $ac_n "checking for sgemm_ in -lsunperf""... $ac_c" 1>&6
  9133. echo "configure:11414: checking for sgemm_ in -lsunperf" >&5
  9134. ac_lib_var=`echo sunperf'_'sgemm_ | sed 'y%./+-%__p_%'`
  9135. ac_save_LIBS="$LIBS"
  9136. LIBS="-lsunperf -lsunmath $LIBS"
  9137. cat > conftest.$ac_ext <<EOF
  9138. #line 11420 "configure"
  9139. #include "confdefs.h"
  9140. /* Override any gcc2 internal prototype to avoid an error. */
  9141. /* We use char because int might match the return type of a gcc2
  9142. builtin and then its argument prototype would still apply. */
  9143. char sgemm_();
  9144. int main() {
  9145. sgemm_()
  9146. ; return 0; }
  9147. EOF
  9148. if { (eval echo configure:11431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9149. rm -rf conftest*
  9150. eval "ac_cv_lib_$ac_lib_var=yes"
  9151. else
  9152. echo "configure: failed program was:" >&5
  9153. cat conftest.$ac_ext >&5
  9154. rm -rf conftest*
  9155. eval "ac_cv_lib_$ac_lib_var=no"
  9156. fi
  9157. rm -f conftest*
  9158. LIBS="$ac_save_LIBS"
  9159. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9160. echo "$ac_t""yes" 1>&6
  9161. blas_ok=yes; BLASLIB="-xlic_lib=sunperf -lsunmath"
  9162. else
  9163. echo "$ac_t""no" 1>&6
  9164. fi
  9165. else
  9166. echo "$ac_t""no" 1>&6
  9167. fi
  9168. fi
  9169. fi
  9170. # Generic BLAS library
  9171. if test $blas_ok = no; then
  9172. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  9173. echo "configure:11461: checking for sgemm_ in -lblas" >&5
  9174. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9175. ac_save_LIBS="$LIBS"
  9176. LIBS="-lblas $LIBS"
  9177. cat > conftest.$ac_ext <<EOF
  9178. #line 11467 "configure"
  9179. #include "confdefs.h"
  9180. /* Override any gcc2 internal prototype to avoid an error. */
  9181. /* We use char because int might match the return type of a gcc2
  9182. builtin and then its argument prototype would still apply. */
  9183. char sgemm_();
  9184. int main() {
  9185. sgemm_()
  9186. ; return 0; }
  9187. EOF
  9188. if { (eval echo configure:11478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9189. rm -rf conftest*
  9190. eval "ac_cv_lib_$ac_lib_var=yes"
  9191. else
  9192. echo "configure: failed program was:" >&5
  9193. cat conftest.$ac_ext >&5
  9194. rm -rf conftest*
  9195. eval "ac_cv_lib_$ac_lib_var=no"
  9196. fi
  9197. rm -f conftest*
  9198. LIBS="$ac_save_LIBS"
  9199. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9200. echo "$ac_t""yes" 1>&6
  9201. blas_ok=yes; BLASLIB="-lblas"
  9202. else
  9203. echo "$ac_t""no" 1>&6
  9204. fi
  9205. fi
  9206. if test $blas_ok = yes; then
  9207. cat >> confdefs.h <<\EOF
  9208. #define HAVE_LIBBLAS 1
  9209. EOF
  9210. fi
  9211. fi # $USE_BLAS
  9212. # Done checking BLAS
  9213. # Enable LAPACK option
  9214. echo $ac_n "checking whether to use LAPACK""... $ac_c" 1>&6
  9215. echo "configure:11517: checking whether to use LAPACK" >&5
  9216. echo "$ac_t"""$with_lapack"" 1>&6
  9217. case "$with_lapack" in
  9218. "no") USE_LAPACK= ;;
  9219. "yes") USE_LAPACK="1" ;;
  9220. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9221. esac
  9222. LAPACKLIB=
  9223. LAPACKINC=
  9224. # LAPACK is useless without BLAS
  9225. if test -n "$USE_BLAS"; then
  9226. if test -n "$USE_LAPACK"; then
  9227. # With LAPACK includes directory
  9228. # LAPACK doesn't have includes (FORTRAN library)
  9229. # With LAPACK library directory
  9230. lapack_ok=no
  9231. echo $ac_n "checking for location of LAPACK includes""... $ac_c" 1>&6
  9232. echo "configure:11542: checking for location of LAPACK includes" >&5
  9233. case "$with_lapack_includes" in
  9234. y | ye | yes | n | no)
  9235. { echo "configure: error: *** You must supply a directory to --with-lapack-includes." 1>&2; exit 1; }
  9236. ;;
  9237. esac
  9238. echo "$ac_t""$with_lapack_includes" 1>&6
  9239. if test -n "$with_lapack_includes" ; then
  9240. for dir in $with_lapack_includes; do
  9241. if test -d "$dir"; then
  9242. LAPACKINC="$LAPACKINC -I$dir"
  9243. else
  9244. { echo "configure: error: *** LAPACK includes directory $dir does not exist." 1>&2; exit 1; }
  9245. fi
  9246. done
  9247. fi
  9248. echo $ac_n "checking for location of LAPACK library""... $ac_c" 1>&6
  9249. echo "configure:11562: checking for location of LAPACK library" >&5
  9250. case "$with_lapack_libs" in
  9251. y | ye | yes | n | no)
  9252. { echo "configure: error: *** You must supply a directory to --with-lapack-libs." 1>&2; exit 1; }
  9253. ;;
  9254. esac
  9255. echo "$ac_t""$with_lapack_libs" 1>&6
  9256. if test -n "$with_lapack_libs"; then
  9257. for dir in $with_lapack_libs; do
  9258. if test -d "$dir"; then
  9259. LAPACKLIB="$LAPACKLIB -L$dir"
  9260. else
  9261. { echo "configure: error: *** LAPACK library directory $dir does not exist." 1>&2; exit 1; }
  9262. fi
  9263. done
  9264. fi
  9265. # See if clapack.h exists (ATLAS)
  9266. save_CPPFLAGS="$CPPFLAGS"
  9267. CPPFLAGS="$LAPACKINC $CPPFLAGS"
  9268. for ac_hdr in clapack.h
  9269. do
  9270. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9271. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9272. echo "configure:11588: checking for $ac_hdr" >&5
  9273. cat > conftest.$ac_ext <<EOF
  9274. #line 11591 "configure"
  9275. #include "confdefs.h"
  9276. #include <$ac_hdr>
  9277. EOF
  9278. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9279. { (eval echo configure:11596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9280. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9281. if test -z "$ac_err"; then
  9282. rm -rf conftest*
  9283. eval "ac_cv_header_$ac_safe=yes"
  9284. else
  9285. echo "$ac_err" >&5
  9286. echo "configure: failed program was:" >&5
  9287. cat conftest.$ac_ext >&5
  9288. rm -rf conftest*
  9289. eval "ac_cv_header_$ac_safe=no"
  9290. fi
  9291. rm -f conftest*
  9292. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9293. echo "$ac_t""yes" 1>&6
  9294. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9295. cat >> confdefs.h <<EOF
  9296. #define $ac_tr_hdr 1
  9297. EOF
  9298. else
  9299. echo "$ac_t""no" 1>&6
  9300. fi
  9301. done
  9302. CPPFLAGS="$save_CPPFLAGS"
  9303. # LAPACK linked to by default?
  9304. if test lapack_ok=no; then
  9305. save_LIBS="$LIBS"; LIBS="$LIBS $BLASLIB $MATHLIB $FLIBS"
  9306. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  9307. echo $ac_n "checking for dsegv_""... $ac_c" 1>&6
  9308. echo "configure:11628: checking for dsegv_" >&5
  9309. cat > conftest.$ac_ext <<EOF
  9310. #line 11631 "configure"
  9311. #include "confdefs.h"
  9312. /* System header to define __stub macros and hopefully few prototypes,
  9313. which can conflict with char dsegv_(); below. */
  9314. #include <assert.h>
  9315. /* Override any gcc2 internal prototype to avoid an error. */
  9316. /* We use char because int might match the return type of a gcc2
  9317. builtin and then its argument prototype would still apply. */
  9318. char dsegv_();
  9319. int main() {
  9320. /* The GNU C library defines this for functions which it implements
  9321. to always fail with ENOSYS. Some functions are actually named
  9322. something starting with __ and the normal name is an alias. */
  9323. #if defined (__stub_dsegv_) || defined (__stub___dsegv_)
  9324. choke me
  9325. #else
  9326. dsegv_();
  9327. #endif
  9328. ; return 0; }
  9329. EOF
  9330. if { (eval echo configure:11654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9331. rm -rf conftest*
  9332. eval "ac_cv_func_dsegv_=yes"
  9333. else
  9334. echo "configure: failed program was:" >&5
  9335. cat conftest.$ac_ext >&5
  9336. rm -rf conftest*
  9337. eval "ac_cv_func_dsegv_=no"
  9338. fi
  9339. rm -f conftest*
  9340. if eval "test \"`echo '$ac_cv_func_'dsegv_`\" = yes"; then
  9341. echo "$ac_t""yes" 1>&6
  9342. lapack_ok=yes
  9343. else
  9344. echo "$ac_t""no" 1>&6
  9345. fi
  9346. LIBS="$save_LIBS"
  9347. LDFLAGS="$save_LDFLAGS"
  9348. fi
  9349. # Generic LAPACK library?
  9350. if test $lapack_ok = no; then
  9351. save_libs="$LIBS"; LIBS="$BLASLIB $MATHLIB $LIBS"
  9352. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  9353. echo $ac_n "checking for desgv_ in -llapack""... $ac_c" 1>&6
  9354. echo "configure:11681: checking for desgv_ in -llapack" >&5
  9355. ac_lib_var=`echo lapack'_'desgv_ | sed 'y%./+-%__p_%'`
  9356. ac_save_LIBS="$LIBS"
  9357. LIBS="-llapack $FLIBS $LIBS"
  9358. cat > conftest.$ac_ext <<EOF
  9359. #line 11687 "configure"
  9360. #include "confdefs.h"
  9361. /* Override any gcc2 internal prototype to avoid an error. */
  9362. /* We use char because int might match the return type of a gcc2
  9363. builtin and then its argument prototype would still apply. */
  9364. char desgv_();
  9365. int main() {
  9366. desgv_()
  9367. ; return 0; }
  9368. EOF
  9369. if { (eval echo configure:11698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9370. rm -rf conftest*
  9371. eval "ac_cv_lib_$ac_lib_var=yes"
  9372. else
  9373. echo "configure: failed program was:" >&5
  9374. cat conftest.$ac_ext >&5
  9375. rm -rf conftest*
  9376. eval "ac_cv_lib_$ac_lib_var=no"
  9377. fi
  9378. rm -f conftest*
  9379. LIBS="$ac_save_LIBS"
  9380. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9381. echo "$ac_t""yes" 1>&6
  9382. lapack_ok=yes; LAPACKLIB="-llapack"
  9383. else
  9384. echo "$ac_t""no" 1>&6
  9385. fi
  9386. LIBS="$save_LIBS"
  9387. LDFLAGS="$save_LDFLAGS"
  9388. fi
  9389. if test $lapack_ok = no; then
  9390. ac_save_ldflags="$LDFLAGS"
  9391. LDFLAGS="$LAPACKLIB $LDFLAGS"
  9392. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  9393. echo "configure:11730: checking for dgesv_ in -llapack" >&5
  9394. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  9395. ac_save_LIBS="$LIBS"
  9396. LIBS="-llapack $BLASLIB $MATHLIB $LIBS"
  9397. cat > conftest.$ac_ext <<EOF
  9398. #line 11736 "configure"
  9399. #include "confdefs.h"
  9400. /* Override any gcc2 internal prototype to avoid an error. */
  9401. /* We use char because int might match the return type of a gcc2
  9402. builtin and then its argument prototype would still apply. */
  9403. char dgesv_();
  9404. int main() {
  9405. dgesv_()
  9406. ; return 0; }
  9407. EOF
  9408. if { (eval echo configure:11747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9409. rm -rf conftest*
  9410. eval "ac_cv_lib_$ac_lib_var=yes"
  9411. else
  9412. echo "configure: failed program was:" >&5
  9413. cat conftest.$ac_ext >&5
  9414. rm -rf conftest*
  9415. eval "ac_cv_lib_$ac_lib_var=no"
  9416. fi
  9417. rm -f conftest*
  9418. LIBS="$ac_save_LIBS"
  9419. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9420. echo "$ac_t""yes" 1>&6
  9421. LAPACKLIB="$LAPACKLIB -llapack "
  9422. else
  9423. echo "$ac_t""no" 1>&6
  9424. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  9425. echo "configure:11766: checking for dgesv_ in -llapack" >&5
  9426. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  9427. ac_save_LIBS="$LIBS"
  9428. LIBS="-llapack $BLASLIB $MATHLIB -lg2c $LIBS"
  9429. cat > conftest.$ac_ext <<EOF
  9430. #line 11772 "configure"
  9431. #include "confdefs.h"
  9432. /* Override any gcc2 internal prototype to avoid an error. */
  9433. /* We use char because int might match the return type of a gcc2
  9434. builtin and then its argument prototype would still apply. */
  9435. char dgesv_();
  9436. int main() {
  9437. dgesv_()
  9438. ; return 0; }
  9439. EOF
  9440. if { (eval echo configure:11783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9441. rm -rf conftest*
  9442. eval "ac_cv_lib_$ac_lib_var=yes"
  9443. else
  9444. echo "configure: failed program was:" >&5
  9445. cat conftest.$ac_ext >&5
  9446. rm -rf conftest*
  9447. eval "ac_cv_lib_$ac_lib_var=no"
  9448. fi
  9449. rm -f conftest*
  9450. LIBS="$ac_save_LIBS"
  9451. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9452. echo "$ac_t""yes" 1>&6
  9453. LAPACKLIB="$LAPACKLIB -llapack -lg2c"
  9454. else
  9455. echo "$ac_t""no" 1>&6
  9456. LDFLAGS=${ac_save_ldflags}
  9457. { echo "configure: error: *** Unable to locate LAPACK library." 1>&2; exit 1; }
  9458. fi
  9459. fi
  9460. LDFLAGS=${ac_save_ldflags}
  9461. fi
  9462. cat >> confdefs.h <<\EOF
  9463. #define HAVE_LIBLAPACK 1
  9464. EOF
  9465. fi # $USE_LAPACK
  9466. fi # $USE_BLAS
  9467. # Done checking LAPACK
  9468. # Enable Cairo display driver option
  9469. echo $ac_n "checking whether to use Cairo""... $ac_c" 1>&6
  9470. echo "configure:11839: checking whether to use Cairo" >&5
  9471. echo "$ac_t"""$with_cairo"" 1>&6
  9472. case "$with_cairo" in
  9473. "no") USE_CAIRO= ;;
  9474. "yes") USE_CAIRO="1" ;;
  9475. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9476. esac
  9477. CAIROINC=
  9478. CAIROLIB=
  9479. if test -n "$USE_CAIRO"; then
  9480. cairo="cairo"
  9481. pkgs="cairo-ft cairo-fc cairo-pdf cairo-ps cairo-svg fontconfig"
  9482. if test -n "$USE_X11"; then
  9483. pkgs="$pkgs cairo-xlib cairo-xlib-xrender"
  9484. fi
  9485. for pkg in $pkgs ; do
  9486. if pkg-config --exists $pkg ; then
  9487. cairo="$cairo $pkg"
  9488. fi
  9489. done
  9490. # With Cairo includes directory
  9491. #FIXME: somehow quote dirs with spaces in $cairo ?
  9492. CAIROINC=`pkg-config --cflags $cairo`
  9493. echo $ac_n "checking for location of cairo includes""... $ac_c" 1>&6
  9494. echo "configure:11871: checking for location of cairo includes" >&5
  9495. case "$with_cairo_includes" in
  9496. y | ye | yes | n | no)
  9497. { echo "configure: error: *** You must supply a directory to --with-cairo-includes." 1>&2; exit 1; }
  9498. ;;
  9499. esac
  9500. echo "$ac_t""$with_cairo_includes" 1>&6
  9501. if test -n "$with_cairo_includes" ; then
  9502. for dir in $with_cairo_includes; do
  9503. if test -d "$dir"; then
  9504. CAIROINC="$CAIROINC -I$dir"
  9505. else
  9506. { echo "configure: error: *** cairo includes directory $dir does not exist." 1>&2; exit 1; }
  9507. fi
  9508. done
  9509. fi
  9510. ac_save_cppflags="$CPPFLAGS"
  9511. CPPFLAGS="$CAIROINC $CPPFLAGS"
  9512. for ac_hdr in cairo.h
  9513. do
  9514. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9515. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9516. echo "configure:11897: checking for $ac_hdr" >&5
  9517. cat > conftest.$ac_ext <<EOF
  9518. #line 11900 "configure"
  9519. #include "confdefs.h"
  9520. #include <$ac_hdr>
  9521. EOF
  9522. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9523. { (eval echo configure:11905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9524. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9525. if test -z "$ac_err"; then
  9526. rm -rf conftest*
  9527. eval "ac_cv_header_$ac_safe=yes"
  9528. else
  9529. echo "$ac_err" >&5
  9530. echo "configure: failed program was:" >&5
  9531. cat conftest.$ac_ext >&5
  9532. rm -rf conftest*
  9533. eval "ac_cv_header_$ac_safe=no"
  9534. fi
  9535. rm -f conftest*
  9536. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9537. echo "$ac_t""yes" 1>&6
  9538. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9539. cat >> confdefs.h <<EOF
  9540. #define $ac_tr_hdr 1
  9541. EOF
  9542. else
  9543. echo "$ac_t""no" 1>&6
  9544. { echo "configure: error: *** Unable to locate Cairo includes." 1>&2; exit 1; }
  9545. fi
  9546. done
  9547. CPPFLAGS=$ac_save_cppflags
  9548. # With Cairo library directory
  9549. CAIROLIB=`pkg-config --libs $cairo`
  9550. echo $ac_n "checking for location of cairo library""... $ac_c" 1>&6
  9551. echo "configure:11941: checking for location of cairo library" >&5
  9552. case "$with_cairo_libs" in
  9553. y | ye | yes | n | no)
  9554. { echo "configure: error: *** You must supply a directory to --with-cairo-libs." 1>&2; exit 1; }
  9555. ;;
  9556. esac
  9557. echo "$ac_t""$with_cairo_libs" 1>&6
  9558. if test -n "$with_cairo_libs"; then
  9559. for dir in $with_cairo_libs; do
  9560. if test -d "$dir"; then
  9561. CAIROLIB="$CAIROLIB -L$dir"
  9562. else
  9563. { echo "configure: error: *** cairo library directory $dir does not exist." 1>&2; exit 1; }
  9564. fi
  9565. done
  9566. fi
  9567. echo $ac_n "checking for cairo linking flags""... $ac_c" 1>&6
  9568. echo "configure:11961: checking for cairo linking flags" >&5
  9569. case "$with_cairo_ldflags" in
  9570. y | ye | yes | n | no)
  9571. { echo "configure: error: *** You must supply a directory to --with-cairo-ldflags." 1>&2; exit 1; }
  9572. ;;
  9573. esac
  9574. echo "$ac_t""$with_cairo_ldflags" 1>&6
  9575. CAIROLIB="$CAIROLIB $with_cairo_ldflags"
  9576. ac_save_libs="$LIBS"
  9577. ac_save_ldflags="$LDFLAGS"
  9578. LIBS=" $CAIROLIB $LIBS"
  9579. LDFLAGS=" $LDFLAGS"
  9580. echo $ac_n "checking for cairo_create""... $ac_c" 1>&6
  9581. echo "configure:11977: checking for cairo_create" >&5
  9582. cat > conftest.$ac_ext <<EOF
  9583. #line 11980 "configure"
  9584. #include "confdefs.h"
  9585. /* System header to define __stub macros and hopefully few prototypes,
  9586. which can conflict with char cairo_create(); below. */
  9587. #include <assert.h>
  9588. /* Override any gcc2 internal prototype to avoid an error. */
  9589. /* We use char because int might match the return type of a gcc2
  9590. builtin and then its argument prototype would still apply. */
  9591. char cairo_create();
  9592. int main() {
  9593. /* The GNU C library defines this for functions which it implements
  9594. to always fail with ENOSYS. Some functions are actually named
  9595. something starting with __ and the normal name is an alias. */
  9596. #if defined (__stub_cairo_create) || defined (__stub___cairo_create)
  9597. choke me
  9598. #else
  9599. cairo_create();
  9600. #endif
  9601. ; return 0; }
  9602. EOF
  9603. if { (eval echo configure:12003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9604. rm -rf conftest*
  9605. eval "ac_cv_func_cairo_create=yes"
  9606. else
  9607. echo "configure: failed program was:" >&5
  9608. cat conftest.$ac_ext >&5
  9609. rm -rf conftest*
  9610. eval "ac_cv_func_cairo_create=no"
  9611. fi
  9612. rm -f conftest*
  9613. if eval "test \"`echo '$ac_cv_func_'cairo_create`\" = yes"; then
  9614. echo "$ac_t""yes" 1>&6
  9615. :
  9616. else
  9617. echo "$ac_t""no" 1>&6
  9618. { echo "configure: error: *** Unable to locate cairo_create." 1>&2; exit 1; }
  9619. fi
  9620. LIBS=${ac_save_libs}
  9621. LDFLAGS=${ac_save_ldflags}
  9622. ac_save_libs="$LIBS"
  9623. ac_save_ldflags="$LDFLAGS"
  9624. LIBS=" $CAIROLIB $LIBS"
  9625. LDFLAGS=" $LDFLAGS"
  9626. echo $ac_n "checking for cairo_xlib_surface_create_with_xrender_format""... $ac_c" 1>&6
  9627. echo "configure:12037: checking for cairo_xlib_surface_create_with_xrender_format" >&5
  9628. cat > conftest.$ac_ext <<EOF
  9629. #line 12040 "configure"
  9630. #include "confdefs.h"
  9631. /* System header to define __stub macros and hopefully few prototypes,
  9632. which can conflict with char cairo_xlib_surface_create_with_xrender_format(); below. */
  9633. #include <assert.h>
  9634. /* Override any gcc2 internal prototype to avoid an error. */
  9635. /* We use char because int might match the return type of a gcc2
  9636. builtin and then its argument prototype would still apply. */
  9637. char cairo_xlib_surface_create_with_xrender_format();
  9638. int main() {
  9639. /* The GNU C library defines this for functions which it implements
  9640. to always fail with ENOSYS. Some functions are actually named
  9641. something starting with __ and the normal name is an alias. */
  9642. #if defined (__stub_cairo_xlib_surface_create_with_xrender_format) || defined (__stub___cairo_xlib_surface_create_with_xrender_format)
  9643. choke me
  9644. #else
  9645. cairo_xlib_surface_create_with_xrender_format();
  9646. #endif
  9647. ; return 0; }
  9648. EOF
  9649. if { (eval echo configure:12063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9650. rm -rf conftest*
  9651. eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=yes"
  9652. else
  9653. echo "configure: failed program was:" >&5
  9654. cat conftest.$ac_ext >&5
  9655. rm -rf conftest*
  9656. eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=no"
  9657. fi
  9658. rm -f conftest*
  9659. if eval "test \"`echo '$ac_cv_func_'cairo_xlib_surface_create_with_xrender_format`\" = yes"; then
  9660. echo "$ac_t""yes" 1>&6
  9661. CAIRO_HAS_XRENDER=1
  9662. else
  9663. echo "$ac_t""no" 1>&6
  9664. CAIRO_HAS_XRENDER=
  9665. fi
  9666. LIBS=${ac_save_libs}
  9667. LDFLAGS=${ac_save_ldflags}
  9668. ac_save_libs="$LIBS"
  9669. ac_save_ldflags="$LDFLAGS"
  9670. LIBS=" $CAIROLIB $LIBS"
  9671. LDFLAGS=" $LDFLAGS"
  9672. echo $ac_n "checking for cairo_xlib_surface_get_xrender_format""... $ac_c" 1>&6
  9673. echo "configure:12096: checking for cairo_xlib_surface_get_xrender_format" >&5
  9674. cat > conftest.$ac_ext <<EOF
  9675. #line 12099 "configure"
  9676. #include "confdefs.h"
  9677. /* System header to define __stub macros and hopefully few prototypes,
  9678. which can conflict with char cairo_xlib_surface_get_xrender_format(); below. */
  9679. #include <assert.h>
  9680. /* Override any gcc2 internal prototype to avoid an error. */
  9681. /* We use char because int might match the return type of a gcc2
  9682. builtin and then its argument prototype would still apply. */
  9683. char cairo_xlib_surface_get_xrender_format();
  9684. int main() {
  9685. /* The GNU C library defines this for functions which it implements
  9686. to always fail with ENOSYS. Some functions are actually named
  9687. something starting with __ and the normal name is an alias. */
  9688. #if defined (__stub_cairo_xlib_surface_get_xrender_format) || defined (__stub___cairo_xlib_surface_get_xrender_format)
  9689. choke me
  9690. #else
  9691. cairo_xlib_surface_get_xrender_format();
  9692. #endif
  9693. ; return 0; }
  9694. EOF
  9695. if { (eval echo configure:12122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9696. rm -rf conftest*
  9697. eval "ac_cv_func_cairo_xlib_surface_get_xrender_format=yes"
  9698. else
  9699. echo "configure: failed program was:" >&5
  9700. cat conftest.$ac_ext >&5
  9701. rm -rf conftest*
  9702. eval "ac_cv_func_cairo_xlib_surface_get_xrender_format=no"
  9703. fi
  9704. rm -f conftest*
  9705. if eval "test \"`echo '$ac_cv_func_'cairo_xlib_surface_get_xrender_format`\" = yes"; then
  9706. echo "$ac_t""yes" 1>&6
  9707. CAIRO_HAS_XRENDER_SURFACE=1
  9708. else
  9709. echo "$ac_t""no" 1>&6
  9710. CAIRO_HAS_XRENDER_SURFACE=
  9711. fi
  9712. LIBS=${ac_save_libs}
  9713. LDFLAGS=${ac_save_ldflags}
  9714. CAIROLIB="$CAIROLIB $CAIROLDFLAGS"
  9715. fi # $USE_CAIRO
  9716. # Done checking Cairo
  9717. # Enable FreeType option
  9718. echo $ac_n "checking whether to use FreeType""... $ac_c" 1>&6
  9719. echo "configure:12164: checking whether to use FreeType" >&5
  9720. echo "$ac_t"""$with_freetype"" 1>&6
  9721. case "$with_freetype" in
  9722. "no") USE_FREETYPE= ;;
  9723. "yes") USE_FREETYPE="1" ;;
  9724. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9725. esac
  9726. FTINC=
  9727. FTLIB=
  9728. if test -n "$USE_FREETYPE"; then
  9729. # With FreeType includes directory
  9730. echo $ac_n "checking for location of FreeType includes""... $ac_c" 1>&6
  9731. echo "configure:12183: checking for location of FreeType includes" >&5
  9732. case "$with_freetype_includes" in
  9733. y | ye | yes | n | no)
  9734. { echo "configure: error: *** You must supply a directory to --with-freetype-includes." 1>&2; exit 1; }
  9735. ;;
  9736. esac
  9737. echo "$ac_t""$with_freetype_includes" 1>&6
  9738. if test -n "$with_freetype_includes" ; then
  9739. for dir in $with_freetype_includes; do
  9740. if test -d "$dir"; then
  9741. FTINC="$FTINC -I$dir"
  9742. else
  9743. { echo "configure: error: *** FreeType includes directory $dir does not exist." 1>&2; exit 1; }
  9744. fi
  9745. done
  9746. fi
  9747. ac_save_cppflags="$CPPFLAGS"
  9748. CPPFLAGS="$FTINC $CPPFLAGS"
  9749. for ac_hdr in ft2build.h
  9750. do
  9751. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9752. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9753. echo "configure:12209: checking for $ac_hdr" >&5
  9754. cat > conftest.$ac_ext <<EOF
  9755. #line 12212 "configure"
  9756. #include "confdefs.h"
  9757. #include <$ac_hdr>
  9758. EOF
  9759. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9760. { (eval echo configure:12217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9761. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9762. if test -z "$ac_err"; then
  9763. rm -rf conftest*
  9764. eval "ac_cv_header_$ac_safe=yes"
  9765. else
  9766. echo "$ac_err" >&5
  9767. echo "configure: failed program was:" >&5
  9768. cat conftest.$ac_ext >&5
  9769. rm -rf conftest*
  9770. eval "ac_cv_header_$ac_safe=no"
  9771. fi
  9772. rm -f conftest*
  9773. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9774. echo "$ac_t""yes" 1>&6
  9775. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9776. cat >> confdefs.h <<EOF
  9777. #define $ac_tr_hdr 1
  9778. EOF
  9779. else
  9780. echo "$ac_t""no" 1>&6
  9781. { echo "configure: error: *** Unable to locate FreeType includes." 1>&2; exit 1; }
  9782. fi
  9783. done
  9784. CPPFLAGS=$ac_save_cppflags
  9785. # With FreeType library directory
  9786. echo $ac_n "checking for location of FreeType library""... $ac_c" 1>&6
  9787. echo "configure:12251: checking for location of FreeType library" >&5
  9788. case "$with_freetype_libs" in
  9789. y | ye | yes | n | no)
  9790. { echo "configure: error: *** You must supply a directory to --with-freetype-libs." 1>&2; exit 1; }
  9791. ;;
  9792. esac
  9793. echo "$ac_t""$with_freetype_libs" 1>&6
  9794. if test -n "$with_freetype_libs"; then
  9795. for dir in $with_freetype_libs; do
  9796. if test -d "$dir"; then
  9797. FTLIB="$FTLIB -L$dir"
  9798. else
  9799. { echo "configure: error: *** FreeType library directory $dir does not exist." 1>&2; exit 1; }
  9800. fi
  9801. done
  9802. fi
  9803. ac_save_ldflags="$LDFLAGS"
  9804. LDFLAGS="$FTLIB $LDFLAGS"
  9805. echo $ac_n "checking for FT_Init_FreeType in -lfreetype""... $ac_c" 1>&6
  9806. echo "configure:12276: checking for FT_Init_FreeType in -lfreetype" >&5
  9807. ac_lib_var=`echo freetype'_'FT_Init_FreeType | sed 'y%./+-%__p_%'`
  9808. ac_save_LIBS="$LIBS"
  9809. LIBS="-lfreetype $LIBS"
  9810. cat > conftest.$ac_ext <<EOF
  9811. #line 12282 "configure"
  9812. #include "confdefs.h"
  9813. /* Override any gcc2 internal prototype to avoid an error. */
  9814. /* We use char because int might match the return type of a gcc2
  9815. builtin and then its argument prototype would still apply. */
  9816. char FT_Init_FreeType();
  9817. int main() {
  9818. FT_Init_FreeType()
  9819. ; return 0; }
  9820. EOF
  9821. if { (eval echo configure:12293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9822. rm -rf conftest*
  9823. eval "ac_cv_lib_$ac_lib_var=yes"
  9824. else
  9825. echo "configure: failed program was:" >&5
  9826. cat conftest.$ac_ext >&5
  9827. rm -rf conftest*
  9828. eval "ac_cv_lib_$ac_lib_var=no"
  9829. fi
  9830. rm -f conftest*
  9831. LIBS="$ac_save_LIBS"
  9832. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9833. echo "$ac_t""yes" 1>&6
  9834. FTLIB="$FTLIB -lfreetype "
  9835. else
  9836. echo "$ac_t""no" 1>&6
  9837. LDFLAGS=${ac_save_ldflags}
  9838. { echo "configure: error: *** Unable to locate FreeType library." 1>&2; exit 1; }
  9839. fi
  9840. LDFLAGS=${ac_save_ldflags}
  9841. fi # $USE_FREETYPE
  9842. # Done checking FreeType
  9843. # Enable NLS option
  9844. echo $ac_n "checking whether to use NLS""... $ac_c" 1>&6
  9845. echo "configure:12334: checking whether to use NLS" >&5
  9846. echo "$ac_t"""$with_nls"" 1>&6
  9847. case "$with_nls" in
  9848. "no") USE_NLS= ;;
  9849. "yes") USE_NLS="1" ;;
  9850. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9851. esac
  9852. INTLLIB=
  9853. HAVE_NLS=
  9854. if test -n "${USE_NLS}" ; then
  9855. cat >> confdefs.h <<\EOF
  9856. #define USE_NLS 1
  9857. EOF
  9858. echo $ac_n "checking for gettext""... $ac_c" 1>&6
  9859. echo "configure:12354: checking for gettext" >&5
  9860. cat > conftest.$ac_ext <<EOF
  9861. #line 12357 "configure"
  9862. #include "confdefs.h"
  9863. /* System header to define __stub macros and hopefully few prototypes,
  9864. which can conflict with char gettext(); below. */
  9865. #include <assert.h>
  9866. /* Override any gcc2 internal prototype to avoid an error. */
  9867. /* We use char because int might match the return type of a gcc2
  9868. builtin and then its argument prototype would still apply. */
  9869. char gettext();
  9870. int main() {
  9871. /* The GNU C library defines this for functions which it implements
  9872. to always fail with ENOSYS. Some functions are actually named
  9873. something starting with __ and the normal name is an alias. */
  9874. #if defined (__stub_gettext) || defined (__stub___gettext)
  9875. choke me
  9876. #else
  9877. gettext();
  9878. #endif
  9879. ; return 0; }
  9880. EOF
  9881. if { (eval echo configure:12380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9882. rm -rf conftest*
  9883. eval "ac_cv_func_gettext=yes"
  9884. else
  9885. echo "configure: failed program was:" >&5
  9886. cat conftest.$ac_ext >&5
  9887. rm -rf conftest*
  9888. eval "ac_cv_func_gettext=no"
  9889. fi
  9890. rm -f conftest*
  9891. if eval "test \"`echo '$ac_cv_func_'gettext`\" = yes"; then
  9892. echo "$ac_t""yes" 1>&6
  9893. INTLLIB=
  9894. else
  9895. echo "$ac_t""no" 1>&6
  9896. echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
  9897. echo "configure:12398: checking for gettext in -lintl" >&5
  9898. ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
  9899. ac_save_LIBS="$LIBS"
  9900. LIBS="-lintl $LIBS"
  9901. cat > conftest.$ac_ext <<EOF
  9902. #line 12404 "configure"
  9903. #include "confdefs.h"
  9904. /* Override any gcc2 internal prototype to avoid an error. */
  9905. /* We use char because int might match the return type of a gcc2
  9906. builtin and then its argument prototype would still apply. */
  9907. char gettext();
  9908. int main() {
  9909. gettext()
  9910. ; return 0; }
  9911. EOF
  9912. if { (eval echo configure:12415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9913. rm -rf conftest*
  9914. eval "ac_cv_lib_$ac_lib_var=yes"
  9915. else
  9916. echo "configure: failed program was:" >&5
  9917. cat conftest.$ac_ext >&5
  9918. rm -rf conftest*
  9919. eval "ac_cv_lib_$ac_lib_var=no"
  9920. fi
  9921. rm -f conftest*
  9922. LIBS="$ac_save_LIBS"
  9923. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9924. echo "$ac_t""yes" 1>&6
  9925. INTLLIB=-lintl
  9926. else
  9927. echo "$ac_t""no" 1>&6
  9928. { echo "configure: error: *** Unable to locate gettext() function." 1>&2; exit 1; }
  9929. fi
  9930. fi
  9931. HAVE_NLS=1
  9932. fi
  9933. # Enable C++ option
  9934. echo $ac_n "checking whether to use C++""... $ac_c" 1>&6
  9935. echo "configure:12450: checking whether to use C++" >&5
  9936. echo "$ac_t"""$with_cxx"" 1>&6
  9937. case "$with_cxx" in
  9938. "no") USE_CXX= ;;
  9939. "yes") USE_CXX="1" ;;
  9940. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9941. esac
  9942. if test -n "$USE_CXX"; then
  9943. for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
  9944. do
  9945. # Extract the first word of "$ac_prog", so it can be a program name with args.
  9946. set dummy $ac_prog; ac_word=$2
  9947. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  9948. echo "configure:12466: checking for $ac_word" >&5
  9949. if test -n "$CXX"; then
  9950. ac_cv_prog_CXX="$CXX" # Let the user override the test.
  9951. else
  9952. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  9953. ac_dummy="$PATH"
  9954. for ac_dir in $ac_dummy; do
  9955. test -z "$ac_dir" && ac_dir=.
  9956. if test -f $ac_dir/$ac_word; then
  9957. ac_cv_prog_CXX="$ac_prog"
  9958. break
  9959. fi
  9960. done
  9961. IFS="$ac_save_ifs"
  9962. fi
  9963. CXX="$ac_cv_prog_CXX"
  9964. if test -n "$CXX"; then
  9965. echo "$ac_t""$CXX" 1>&6
  9966. else
  9967. echo "$ac_t""no" 1>&6
  9968. fi
  9969. test -n "$CXX" && break
  9970. done
  9971. test -n "$CXX" || CXX="gcc"
  9972. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  9973. echo "configure:12495: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
  9974. ac_ext=C
  9975. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  9976. ac_cpp='$CXXCPP $CPPFLAGS'
  9977. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  9978. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  9979. cross_compiling=$ac_cv_prog_cxx_cross
  9980. cat > conftest.$ac_ext << EOF
  9981. #line 12506 "configure"
  9982. #include "confdefs.h"
  9983. int main(){return(0);}
  9984. EOF
  9985. if { (eval echo configure:12511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9986. ac_cv_prog_cxx_works=yes
  9987. # If we can't run a trivial program, we are probably using a cross compiler.
  9988. if (./conftest; exit) 2>/dev/null; then
  9989. ac_cv_prog_cxx_cross=no
  9990. else
  9991. ac_cv_prog_cxx_cross=yes
  9992. fi
  9993. else
  9994. echo "configure: failed program was:" >&5
  9995. cat conftest.$ac_ext >&5
  9996. ac_cv_prog_cxx_works=no
  9997. fi
  9998. rm -fr conftest*
  9999. ac_ext=c
  10000. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  10001. ac_cpp='$CPP $CPPFLAGS'
  10002. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  10003. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  10004. cross_compiling=$ac_cv_prog_cc_cross
  10005. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  10006. if test $ac_cv_prog_cxx_works = no; then
  10007. { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
  10008. fi
  10009. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  10010. echo "configure:12537: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  10011. echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
  10012. cross_compiling=$ac_cv_prog_cxx_cross
  10013. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  10014. echo "configure:12542: checking whether we are using GNU C++" >&5
  10015. cat > conftest.C <<EOF
  10016. #ifdef __GNUC__
  10017. yes;
  10018. #endif
  10019. EOF
  10020. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:12549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  10021. ac_cv_prog_gxx=yes
  10022. else
  10023. ac_cv_prog_gxx=no
  10024. fi
  10025. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  10026. if test $ac_cv_prog_gxx = yes; then
  10027. GXX=yes
  10028. else
  10029. GXX=
  10030. fi
  10031. ac_test_CXXFLAGS="${CXXFLAGS+set}"
  10032. ac_save_CXXFLAGS="$CXXFLAGS"
  10033. CXXFLAGS=
  10034. echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  10035. echo "configure:12567: checking whether ${CXX-g++} accepts -g" >&5
  10036. echo 'void f(){}' > conftest.cc
  10037. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  10038. ac_cv_prog_cxx_g=yes
  10039. else
  10040. ac_cv_prog_cxx_g=no
  10041. fi
  10042. rm -f conftest*
  10043. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  10044. if test "$ac_test_CXXFLAGS" = set; then
  10045. CXXFLAGS="$ac_save_CXXFLAGS"
  10046. elif test $ac_cv_prog_cxx_g = yes; then
  10047. if test "$GXX" = yes; then
  10048. CXXFLAGS="-g -O2"
  10049. else
  10050. CXXFLAGS="-g"
  10051. fi
  10052. else
  10053. if test "$GXX" = yes; then
  10054. CXXFLAGS="-O2"
  10055. else
  10056. CXXFLAGS=
  10057. fi
  10058. fi
  10059. for ac_declaration in \
  10060. ''\
  10061. '#include <stdlib.h>' \
  10062. 'extern "C" void std::exit (int) throw (); using std::exit;' \
  10063. 'extern "C" void std::exit (int); using std::exit;' \
  10064. 'extern "C" void exit (int) throw ();' \
  10065. 'extern "C" void exit (int);' \
  10066. 'void exit (int);'
  10067. do
  10068. cat > conftest.$ac_ext <<EOF
  10069. #line 12605 "configure"
  10070. #include "confdefs.h"
  10071. #include <stdlib.h>
  10072. $ac_declaration
  10073. int main() {
  10074. exit (42);
  10075. ; return 0; }
  10076. EOF
  10077. if { (eval echo configure:12613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10078. :
  10079. else
  10080. echo "configure: failed program was:" >&5
  10081. cat conftest.$ac_ext >&5
  10082. rm -rf conftest*
  10083. continue
  10084. fi
  10085. rm -f conftest*
  10086. cat > conftest.$ac_ext <<EOF
  10087. #line 12623 "configure"
  10088. #include "confdefs.h"
  10089. $ac_declaration
  10090. int main() {
  10091. exit (42);
  10092. ; return 0; }
  10093. EOF
  10094. if { (eval echo configure:12630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10095. rm -rf conftest*
  10096. break
  10097. else
  10098. echo "configure: failed program was:" >&5
  10099. cat conftest.$ac_ext >&5
  10100. fi
  10101. rm -f conftest*
  10102. done
  10103. if test -n "$ac_declaration"; then
  10104. echo '#ifdef __cplusplus' >>confdefs.h
  10105. echo $ac_declaration >>confdefs.h
  10106. echo '#endif' >>confdefs.h
  10107. fi
  10108. else
  10109. CXX=
  10110. CXXFLAGS=
  10111. fi
  10112. # Done checking C++
  10113. # Enable openDWG option
  10114. echo $ac_n "checking whether to use openDWG""... $ac_c" 1>&6
  10115. echo "configure:12659: checking whether to use openDWG" >&5
  10116. echo "$ac_t"""$with_opendwg"" 1>&6
  10117. case "$with_opendwg" in
  10118. "no") USE_OPENDWG= ;;
  10119. "yes") USE_OPENDWG="1" ;;
  10120. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10121. esac
  10122. OPENDWGINCPATH=
  10123. OPENDWGLIBPATH=
  10124. OPENDWGLIB=
  10125. if test -n "${USE_OPENDWG}"; then
  10126. # With OPENDWG includes directory
  10127. echo $ac_n "checking for location of openDGW includes""... $ac_c" 1>&6
  10128. echo "configure:12679: checking for location of openDGW includes" >&5
  10129. case "$with_opendwg_includes" in
  10130. y | ye | yes | n | no)
  10131. { echo "configure: error: *** You must supply a directory to --with-opendwg-includes." 1>&2; exit 1; }
  10132. ;;
  10133. esac
  10134. echo "$ac_t""$with_opendwg_includes" 1>&6
  10135. if test -n "$with_opendwg_includes" ; then
  10136. for dir in $with_opendwg_includes; do
  10137. if test -d "$dir"; then
  10138. OPENDWGINCPATH="$OPENDWGINCPATH -I$dir"
  10139. else
  10140. { echo "configure: error: *** openDGW includes directory $dir does not exist." 1>&2; exit 1; }
  10141. fi
  10142. done
  10143. fi
  10144. ac_save_cppflags="$CPPFLAGS"
  10145. CPPFLAGS="$OPENDWGINCPATH $CPPFLAGS"
  10146. for ac_hdr in ad2.h
  10147. do
  10148. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10149. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10150. echo "configure:12705: checking for $ac_hdr" >&5
  10151. cat > conftest.$ac_ext <<EOF
  10152. #line 12708 "configure"
  10153. #include "confdefs.h"
  10154. #include <$ac_hdr>
  10155. EOF
  10156. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10157. { (eval echo configure:12713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10158. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10159. if test -z "$ac_err"; then
  10160. rm -rf conftest*
  10161. eval "ac_cv_header_$ac_safe=yes"
  10162. else
  10163. echo "$ac_err" >&5
  10164. echo "configure: failed program was:" >&5
  10165. cat conftest.$ac_ext >&5
  10166. rm -rf conftest*
  10167. eval "ac_cv_header_$ac_safe=no"
  10168. fi
  10169. rm -f conftest*
  10170. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10171. echo "$ac_t""yes" 1>&6
  10172. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10173. cat >> confdefs.h <<EOF
  10174. #define $ac_tr_hdr 1
  10175. EOF
  10176. else
  10177. echo "$ac_t""no" 1>&6
  10178. { echo "configure: error: *** Unable to locate openDWG includes." 1>&2; exit 1; }
  10179. fi
  10180. done
  10181. CPPFLAGS=$ac_save_cppflags
  10182. # With OPENDWG library directory
  10183. echo $ac_n "checking for location of openDWG library""... $ac_c" 1>&6
  10184. echo "configure:12747: checking for location of openDWG library" >&5
  10185. case "$with_opendwg_libs" in
  10186. y | ye | yes | n | no)
  10187. { echo "configure: error: *** You must supply a directory to --with-opendwg-libs." 1>&2; exit 1; }
  10188. ;;
  10189. esac
  10190. echo "$ac_t""$with_opendwg_libs" 1>&6
  10191. if test -n "$with_opendwg_libs"; then
  10192. for dir in $with_opendwg_libs; do
  10193. if test -d "$dir"; then
  10194. OPENDWGLIBPATH="$OPENDWGLIBPATH -L$dir"
  10195. else
  10196. { echo "configure: error: *** openDWG library directory $dir does not exist." 1>&2; exit 1; }
  10197. fi
  10198. done
  10199. fi
  10200. #search for ad2.a, ad3.a ... in openDWG toolkit directory:
  10201. #FIX ME how to program this test??
  10202. #LOC_CHECK_LIBS(ad?.a,adSeekLayer,openDWG,$OPENDWGLIBPATH,OPENDWGLIB,,)
  10203. #
  10204. #for now hack (but working):
  10205. TRUEOPENDWGLIBPATH=`echo "$OPENDWGLIBPATH" | cut -b3-`
  10206. adlib=`ls -1 "$TRUEOPENDWGLIBPATH"/ad?.a | tail -1`
  10207. OPENDWGLIB="$adlib"
  10208. fi # $USE_OPENDWG
  10209. # Done checking OPENDWG
  10210. # Enable pthread option
  10211. echo $ac_n "checking whether to use POSIX threads""... $ac_c" 1>&6
  10212. echo "configure:12788: checking whether to use POSIX threads" >&5
  10213. echo "$ac_t"""$with_pthread"" 1>&6
  10214. case "$with_pthread" in
  10215. "no") USE_PTHREAD= ;;
  10216. "yes") USE_PTHREAD="1" ;;
  10217. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10218. esac
  10219. PTHREADINCPATH=
  10220. PTHREADLIBPATH=
  10221. PTHREADLIB=
  10222. if test -n "$USE_PTHREAD"; then
  10223. # With pthread includes directory
  10224. echo $ac_n "checking for location of POSIX threads includes""... $ac_c" 1>&6
  10225. echo "configure:12808: checking for location of POSIX threads includes" >&5
  10226. case "$with_pthread_includes" in
  10227. y | ye | yes | n | no)
  10228. { echo "configure: error: *** You must supply a directory to --with-pthread-includes." 1>&2; exit 1; }
  10229. ;;
  10230. esac
  10231. echo "$ac_t""$with_pthread_includes" 1>&6
  10232. if test -n "$with_pthread_includes" ; then
  10233. for dir in $with_pthread_includes; do
  10234. if test -d "$dir"; then
  10235. PTHREADINCPATH="$PTHREADINCPATH -I$dir"
  10236. else
  10237. { echo "configure: error: *** POSIX threads includes directory $dir does not exist." 1>&2; exit 1; }
  10238. fi
  10239. done
  10240. fi
  10241. ac_save_cppflags="$CPPFLAGS"
  10242. CPPFLAGS="$PTHREADINCPATH $CPPFLAGS"
  10243. for ac_hdr in pthread.h
  10244. do
  10245. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10246. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10247. echo "configure:12834: checking for $ac_hdr" >&5
  10248. cat > conftest.$ac_ext <<EOF
  10249. #line 12837 "configure"
  10250. #include "confdefs.h"
  10251. #include <$ac_hdr>
  10252. EOF
  10253. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10254. { (eval echo configure:12842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10255. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10256. if test -z "$ac_err"; then
  10257. rm -rf conftest*
  10258. eval "ac_cv_header_$ac_safe=yes"
  10259. else
  10260. echo "$ac_err" >&5
  10261. echo "configure: failed program was:" >&5
  10262. cat conftest.$ac_ext >&5
  10263. rm -rf conftest*
  10264. eval "ac_cv_header_$ac_safe=no"
  10265. fi
  10266. rm -f conftest*
  10267. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10268. echo "$ac_t""yes" 1>&6
  10269. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10270. cat >> confdefs.h <<EOF
  10271. #define $ac_tr_hdr 1
  10272. EOF
  10273. else
  10274. echo "$ac_t""no" 1>&6
  10275. { echo "configure: error: *** Unable to locate POSIX threads includes." 1>&2; exit 1; }
  10276. fi
  10277. done
  10278. CPPFLAGS=$ac_save_cppflags
  10279. # With pthread library directory
  10280. echo $ac_n "checking for location of POSIX threads library""... $ac_c" 1>&6
  10281. echo "configure:12876: checking for location of POSIX threads library" >&5
  10282. case "$with_pthread_libs" in
  10283. y | ye | yes | n | no)
  10284. { echo "configure: error: *** You must supply a directory to --with-pthread-libs." 1>&2; exit 1; }
  10285. ;;
  10286. esac
  10287. echo "$ac_t""$with_pthread_libs" 1>&6
  10288. if test -n "$with_pthread_libs"; then
  10289. for dir in $with_pthread_libs; do
  10290. if test -d "$dir"; then
  10291. PTHREADLIBPATH="$PTHREADLIBPATH -L$dir"
  10292. else
  10293. { echo "configure: error: *** POSIX threads library directory $dir does not exist." 1>&2; exit 1; }
  10294. fi
  10295. done
  10296. fi
  10297. ac_save_libs="$LIBS"
  10298. ac_save_ldflags="$LDFLAGS"
  10299. LIBS=" $LIBS"
  10300. LDFLAGS=" $LDFLAGS"
  10301. echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
  10302. echo "configure:12901: checking for pthread_create" >&5
  10303. cat > conftest.$ac_ext <<EOF
  10304. #line 12904 "configure"
  10305. #include "confdefs.h"
  10306. /* System header to define __stub macros and hopefully few prototypes,
  10307. which can conflict with char pthread_create(); below. */
  10308. #include <assert.h>
  10309. /* Override any gcc2 internal prototype to avoid an error. */
  10310. /* We use char because int might match the return type of a gcc2
  10311. builtin and then its argument prototype would still apply. */
  10312. char pthread_create();
  10313. int main() {
  10314. /* The GNU C library defines this for functions which it implements
  10315. to always fail with ENOSYS. Some functions are actually named
  10316. something starting with __ and the normal name is an alias. */
  10317. #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
  10318. choke me
  10319. #else
  10320. pthread_create();
  10321. #endif
  10322. ; return 0; }
  10323. EOF
  10324. if { (eval echo configure:12927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10325. rm -rf conftest*
  10326. eval "ac_cv_func_pthread_create=yes"
  10327. else
  10328. echo "configure: failed program was:" >&5
  10329. cat conftest.$ac_ext >&5
  10330. rm -rf conftest*
  10331. eval "ac_cv_func_pthread_create=no"
  10332. fi
  10333. rm -f conftest*
  10334. if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
  10335. echo "$ac_t""yes" 1>&6
  10336. PTHREADLIB="$PTHREADLIB "
  10337. else
  10338. echo "$ac_t""no" 1>&6
  10339. ac_save_ldflags="$LDFLAGS"
  10340. LDFLAGS="$PTHREADLIBPATH $LDFLAGS"
  10341. echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
  10342. echo "configure:12954: checking for pthread_create in -lpthread" >&5
  10343. ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
  10344. ac_save_LIBS="$LIBS"
  10345. LIBS="-lpthread $LIBS"
  10346. cat > conftest.$ac_ext <<EOF
  10347. #line 12960 "configure"
  10348. #include "confdefs.h"
  10349. /* Override any gcc2 internal prototype to avoid an error. */
  10350. /* We use char because int might match the return type of a gcc2
  10351. builtin and then its argument prototype would still apply. */
  10352. char pthread_create();
  10353. int main() {
  10354. pthread_create()
  10355. ; return 0; }
  10356. EOF
  10357. if { (eval echo configure:12971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10358. rm -rf conftest*
  10359. eval "ac_cv_lib_$ac_lib_var=yes"
  10360. else
  10361. echo "configure: failed program was:" >&5
  10362. cat conftest.$ac_ext >&5
  10363. rm -rf conftest*
  10364. eval "ac_cv_lib_$ac_lib_var=no"
  10365. fi
  10366. rm -f conftest*
  10367. LIBS="$ac_save_LIBS"
  10368. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10369. echo "$ac_t""yes" 1>&6
  10370. PTHREADLIB="$PTHREADLIB -lpthread "
  10371. else
  10372. echo "$ac_t""no" 1>&6
  10373. LDFLAGS=${ac_save_ldflags}
  10374. { echo "configure: error: *** Unable to locate POSIX threads library." 1>&2; exit 1; }
  10375. fi
  10376. LDFLAGS=${ac_save_ldflags}
  10377. fi
  10378. LIBS=${ac_save_libs}
  10379. LDFLAGS=${ac_save_ldflags}
  10380. fi # $USE_PTHREAD
  10381. # Done checking pthread
  10382. # Enable OpenMP option
  10383. echo $ac_n "checking whether to use OpenMP""... $ac_c" 1>&6
  10384. echo "configure:13021: checking whether to use OpenMP" >&5
  10385. echo "$ac_t"""$with_openmp"" 1>&6
  10386. case "$with_openmp" in
  10387. "no") USE_OPENMP= ;;
  10388. "yes") USE_OPENMP="1" ;;
  10389. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10390. esac
  10391. OMPINCPATH=
  10392. OMPLIBPATH=
  10393. OMPLIB=
  10394. OMPCFLAGS=
  10395. if test -n "$USE_OPENMP"; then
  10396. # With OpenMP includes directory
  10397. echo $ac_n "checking for location of OpenMP includes""... $ac_c" 1>&6
  10398. echo "configure:13042: checking for location of OpenMP includes" >&5
  10399. case "$with_openmp_includes" in
  10400. y | ye | yes | n | no)
  10401. { echo "configure: error: *** You must supply a directory to --with-openmp-includes." 1>&2; exit 1; }
  10402. ;;
  10403. esac
  10404. echo "$ac_t""$with_openmp_includes" 1>&6
  10405. if test -n "$with_openmp_includes" ; then
  10406. for dir in $with_openmp_includes; do
  10407. if test -d "$dir"; then
  10408. OMPINCPATH="$OMPINCPATH -I$dir"
  10409. else
  10410. { echo "configure: error: *** OpenMP includes directory $dir does not exist." 1>&2; exit 1; }
  10411. fi
  10412. done
  10413. fi
  10414. ac_save_cppflags="$CPPFLAGS"
  10415. CPPFLAGS="$OMPINCPATH $CPPFLAGS"
  10416. for ac_hdr in omp.h
  10417. do
  10418. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10419. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10420. echo "configure:13068: checking for $ac_hdr" >&5
  10421. cat > conftest.$ac_ext <<EOF
  10422. #line 13071 "configure"
  10423. #include "confdefs.h"
  10424. #include <$ac_hdr>
  10425. EOF
  10426. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10427. { (eval echo configure:13076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10428. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10429. if test -z "$ac_err"; then
  10430. rm -rf conftest*
  10431. eval "ac_cv_header_$ac_safe=yes"
  10432. else
  10433. echo "$ac_err" >&5
  10434. echo "configure: failed program was:" >&5
  10435. cat conftest.$ac_ext >&5
  10436. rm -rf conftest*
  10437. eval "ac_cv_header_$ac_safe=no"
  10438. fi
  10439. rm -f conftest*
  10440. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10441. echo "$ac_t""yes" 1>&6
  10442. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10443. cat >> confdefs.h <<EOF
  10444. #define $ac_tr_hdr 1
  10445. EOF
  10446. else
  10447. echo "$ac_t""no" 1>&6
  10448. { echo "configure: error: *** Unable to locate OpenMP includes." 1>&2; exit 1; }
  10449. fi
  10450. done
  10451. CPPFLAGS=$ac_save_cppflags
  10452. # With OpenMP library directory
  10453. # GCC et al.: -lgomp
  10454. # Solaris cc: -lmtsk
  10455. # AIX xlc: -lxlsmp
  10456. # SGI IRIX 6.5 MIPSpro C/C++: -lmp
  10457. echo $ac_n "checking for location of OpenMP library""... $ac_c" 1>&6
  10458. echo "configure:13114: checking for location of OpenMP library" >&5
  10459. case "$with_openmp_libs" in
  10460. y | ye | yes | n | no)
  10461. { echo "configure: error: *** You must supply a directory to --with-openmp-libs." 1>&2; exit 1; }
  10462. ;;
  10463. esac
  10464. echo "$ac_t""$with_openmp_libs" 1>&6
  10465. if test -n "$with_openmp_libs"; then
  10466. for dir in $with_openmp_libs; do
  10467. if test -d "$dir"; then
  10468. OMPLIBPATH="$OMPLIBPATH -L$dir"
  10469. else
  10470. { echo "configure: error: *** OpenMP library directory $dir does not exist." 1>&2; exit 1; }
  10471. fi
  10472. done
  10473. fi
  10474. ac_save_libs="$LIBS"
  10475. ac_save_ldflags="$LDFLAGS"
  10476. LIBS=" $LIBS"
  10477. LDFLAGS=" $LDFLAGS"
  10478. echo $ac_n "checking for GOMP_parallel_start""... $ac_c" 1>&6
  10479. echo "configure:13139: checking for GOMP_parallel_start" >&5
  10480. cat > conftest.$ac_ext <<EOF
  10481. #line 13142 "configure"
  10482. #include "confdefs.h"
  10483. /* System header to define __stub macros and hopefully few prototypes,
  10484. which can conflict with char GOMP_parallel_start(); below. */
  10485. #include <assert.h>
  10486. /* Override any gcc2 internal prototype to avoid an error. */
  10487. /* We use char because int might match the return type of a gcc2
  10488. builtin and then its argument prototype would still apply. */
  10489. char GOMP_parallel_start();
  10490. int main() {
  10491. /* The GNU C library defines this for functions which it implements
  10492. to always fail with ENOSYS. Some functions are actually named
  10493. something starting with __ and the normal name is an alias. */
  10494. #if defined (__stub_GOMP_parallel_start) || defined (__stub___GOMP_parallel_start)
  10495. choke me
  10496. #else
  10497. GOMP_parallel_start();
  10498. #endif
  10499. ; return 0; }
  10500. EOF
  10501. if { (eval echo configure:13165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10502. rm -rf conftest*
  10503. eval "ac_cv_func_GOMP_parallel_start=yes"
  10504. else
  10505. echo "configure: failed program was:" >&5
  10506. cat conftest.$ac_ext >&5
  10507. rm -rf conftest*
  10508. eval "ac_cv_func_GOMP_parallel_start=no"
  10509. fi
  10510. rm -f conftest*
  10511. if eval "test \"`echo '$ac_cv_func_'GOMP_parallel_start`\" = yes"; then
  10512. echo "$ac_t""yes" 1>&6
  10513. OMPLIB="$OMPLIB "
  10514. else
  10515. echo "$ac_t""no" 1>&6
  10516. ac_save_ldflags="$LDFLAGS"
  10517. LDFLAGS="$OMPLIBPATH $LDFLAGS"
  10518. echo $ac_n "checking for GOMP_parallel_start in -lgomp""... $ac_c" 1>&6
  10519. echo "configure:13192: checking for GOMP_parallel_start in -lgomp" >&5
  10520. ac_lib_var=`echo gomp'_'GOMP_parallel_start | sed 'y%./+-%__p_%'`
  10521. ac_save_LIBS="$LIBS"
  10522. LIBS="-lgomp $LIBS"
  10523. cat > conftest.$ac_ext <<EOF
  10524. #line 13198 "configure"
  10525. #include "confdefs.h"
  10526. /* Override any gcc2 internal prototype to avoid an error. */
  10527. /* We use char because int might match the return type of a gcc2
  10528. builtin and then its argument prototype would still apply. */
  10529. char GOMP_parallel_start();
  10530. int main() {
  10531. GOMP_parallel_start()
  10532. ; return 0; }
  10533. EOF
  10534. if { (eval echo configure:13209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10535. rm -rf conftest*
  10536. eval "ac_cv_lib_$ac_lib_var=yes"
  10537. else
  10538. echo "configure: failed program was:" >&5
  10539. cat conftest.$ac_ext >&5
  10540. rm -rf conftest*
  10541. eval "ac_cv_lib_$ac_lib_var=no"
  10542. fi
  10543. rm -f conftest*
  10544. LIBS="$ac_save_LIBS"
  10545. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10546. echo "$ac_t""yes" 1>&6
  10547. OMPLIB="$OMPLIB -lgomp "
  10548. else
  10549. echo "$ac_t""no" 1>&6
  10550. LDFLAGS=${ac_save_ldflags}
  10551. { echo "configure: error: *** Unable to locate OpenMP library." 1>&2; exit 1; }
  10552. fi
  10553. LDFLAGS=${ac_save_ldflags}
  10554. fi
  10555. LIBS=${ac_save_libs}
  10556. LDFLAGS=${ac_save_ldflags}
  10557. # compiler dependent
  10558. #if test ${CC} = "gcc" ; then
  10559. if test x$GCC = xyes ; then
  10560. # GNU C compiler (>= 4.2.1)
  10561. OMPCFLAGS=-fopenmp
  10562. elif test ${CC} = "icc" ; then
  10563. # Intel compiler
  10564. OMPCFLAGS=-openmp
  10565. elif test ${CC} = "opencc" ; then
  10566. # AMD's x86 Open64 compiler
  10567. OMPCFLAGS=-mp
  10568. elif test ${CC} = "pgcc" ; then
  10569. # Portland Group's compiler
  10570. OMPCFLAGS=-mp
  10571. # ... anybody else?
  10572. fi
  10573. # try to build a test program with "$CC $OMPCLFAGS" to confirm it works
  10574. #...how?
  10575. #echo "int main() {return 0;}" > test.c
  10576. #$CC $OMPCLFAGS test.c -o test
  10577. fi # $USE_OPENMP
  10578. # Done checking OpenMP
  10579. # Enable OpenCL option
  10580. echo $ac_n "checking whether to use OpenCL""... $ac_c" 1>&6
  10581. echo "configure:13282: checking whether to use OpenCL" >&5
  10582. echo "$ac_t"""$with_opencl"" 1>&6
  10583. case "$with_opencl" in
  10584. "no") USE_OPENCL= ;;
  10585. "yes") USE_OPENCL="1" ;;
  10586. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10587. esac
  10588. OCLINCPATH=
  10589. OCLLIBPATH=
  10590. OCLLIB=
  10591. if test -n "$USE_OPENCL"; then
  10592. # With OpenCL includes directory
  10593. echo $ac_n "checking for location of OpenCL includes""... $ac_c" 1>&6
  10594. echo "configure:13302: checking for location of OpenCL includes" >&5
  10595. case "$with_opencl_includes" in
  10596. y | ye | yes | n | no)
  10597. { echo "configure: error: *** You must supply a directory to --with-opencl-includes." 1>&2; exit 1; }
  10598. ;;
  10599. esac
  10600. echo "$ac_t""$with_opencl_includes" 1>&6
  10601. if test -n "$with_opencl_includes" ; then
  10602. for dir in $with_opencl_includes; do
  10603. if test -d "$dir"; then
  10604. OCLINCPATH="$OCLINCPATH -I$dir"
  10605. else
  10606. { echo "configure: error: *** OpenCL includes directory $dir does not exist." 1>&2; exit 1; }
  10607. fi
  10608. done
  10609. fi
  10610. if test -n "$MACOSX_APP" ; then
  10611. ac_save_cppflags="$CPPFLAGS"
  10612. CPPFLAGS="$OCLINCPATH $CPPFLAGS"
  10613. for ac_hdr in OpenCL/opencl.h
  10614. do
  10615. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10616. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10617. echo "configure:13329: checking for $ac_hdr" >&5
  10618. cat > conftest.$ac_ext <<EOF
  10619. #line 13332 "configure"
  10620. #include "confdefs.h"
  10621. #include <$ac_hdr>
  10622. EOF
  10623. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10624. { (eval echo configure:13337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10625. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10626. if test -z "$ac_err"; then
  10627. rm -rf conftest*
  10628. eval "ac_cv_header_$ac_safe=yes"
  10629. else
  10630. echo "$ac_err" >&5
  10631. echo "configure: failed program was:" >&5
  10632. cat conftest.$ac_ext >&5
  10633. rm -rf conftest*
  10634. eval "ac_cv_header_$ac_safe=no"
  10635. fi
  10636. rm -f conftest*
  10637. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10638. echo "$ac_t""yes" 1>&6
  10639. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10640. cat >> confdefs.h <<EOF
  10641. #define $ac_tr_hdr 1
  10642. EOF
  10643. else
  10644. echo "$ac_t""no" 1>&6
  10645. { echo "configure: error: *** Unable to locate OpenCL includes." 1>&2; exit 1; }
  10646. fi
  10647. done
  10648. CPPFLAGS=$ac_save_cppflags
  10649. # With OpenCL library directory
  10650. ### FIXME: ###
  10651. #LOC_CHECK_FRAMEWORK_PATH(opencl,OpenCL,OPENCLPATH)
  10652. # last term in following would become ',$OPENCLPATH)' if above is uncommented
  10653. ac_save_libs="$LIBS"
  10654. ac_save_ldflags="$LDFLAGS"
  10655. LIBS="-framework OpenCL $LIBS"
  10656. LDFLAGS=" $LDFLAGS"
  10657. echo $ac_n "checking for clGetPlatformInfo""... $ac_c" 1>&6
  10658. echo "configure:13377: checking for clGetPlatformInfo" >&5
  10659. cat > conftest.$ac_ext <<EOF
  10660. #line 13380 "configure"
  10661. #include "confdefs.h"
  10662. /* System header to define __stub macros and hopefully few prototypes,
  10663. which can conflict with char clGetPlatformInfo(); below. */
  10664. #include <assert.h>
  10665. /* Override any gcc2 internal prototype to avoid an error. */
  10666. /* We use char because int might match the return type of a gcc2
  10667. builtin and then its argument prototype would still apply. */
  10668. char clGetPlatformInfo();
  10669. int main() {
  10670. /* The GNU C library defines this for functions which it implements
  10671. to always fail with ENOSYS. Some functions are actually named
  10672. something starting with __ and the normal name is an alias. */
  10673. #if defined (__stub_clGetPlatformInfo) || defined (__stub___clGetPlatformInfo)
  10674. choke me
  10675. #else
  10676. clGetPlatformInfo();
  10677. #endif
  10678. ; return 0; }
  10679. EOF
  10680. if { (eval echo configure:13403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10681. rm -rf conftest*
  10682. eval "ac_cv_func_clGetPlatformInfo=yes"
  10683. else
  10684. echo "configure: failed program was:" >&5
  10685. cat conftest.$ac_ext >&5
  10686. rm -rf conftest*
  10687. eval "ac_cv_func_clGetPlatformInfo=no"
  10688. fi
  10689. rm -f conftest*
  10690. if eval "test \"`echo '$ac_cv_func_'clGetPlatformInfo`\" = yes"; then
  10691. echo "$ac_t""yes" 1>&6
  10692. OCLLIB="$OCLLIB -framework OpenCL"
  10693. else
  10694. echo "$ac_t""no" 1>&6
  10695. { echo "configure: error: *** Unable to locate OpenCL library." 1>&2; exit 1; }
  10696. fi
  10697. LIBS=${ac_save_libs}
  10698. LDFLAGS=${ac_save_ldflags}
  10699. else
  10700. ac_save_cppflags="$CPPFLAGS"
  10701. CPPFLAGS="$OCLINCPATH $CPPFLAGS"
  10702. for ac_hdr in CL/cl.h
  10703. do
  10704. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10705. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10706. echo "configure:13442: checking for $ac_hdr" >&5
  10707. cat > conftest.$ac_ext <<EOF
  10708. #line 13445 "configure"
  10709. #include "confdefs.h"
  10710. #include <$ac_hdr>
  10711. EOF
  10712. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10713. { (eval echo configure:13450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10714. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10715. if test -z "$ac_err"; then
  10716. rm -rf conftest*
  10717. eval "ac_cv_header_$ac_safe=yes"
  10718. else
  10719. echo "$ac_err" >&5
  10720. echo "configure: failed program was:" >&5
  10721. cat conftest.$ac_ext >&5
  10722. rm -rf conftest*
  10723. eval "ac_cv_header_$ac_safe=no"
  10724. fi
  10725. rm -f conftest*
  10726. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10727. echo "$ac_t""yes" 1>&6
  10728. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10729. cat >> confdefs.h <<EOF
  10730. #define $ac_tr_hdr 1
  10731. EOF
  10732. else
  10733. echo "$ac_t""no" 1>&6
  10734. { echo "configure: error: *** Unable to locate OpenCL includes." 1>&2; exit 1; }
  10735. fi
  10736. done
  10737. CPPFLAGS=$ac_save_cppflags
  10738. # With OpenCL library directory
  10739. echo $ac_n "checking for location of OpenCL library""... $ac_c" 1>&6
  10740. echo "configure:13483: checking for location of OpenCL library" >&5
  10741. case "$with_opencl_libs" in
  10742. y | ye | yes | n | no)
  10743. { echo "configure: error: *** You must supply a directory to --with-opencl-libs." 1>&2; exit 1; }
  10744. ;;
  10745. esac
  10746. echo "$ac_t""$with_opencl_libs" 1>&6
  10747. if test -n "$with_opencl_libs"; then
  10748. for dir in $with_opencl_libs; do
  10749. if test -d "$dir"; then
  10750. OCLLIBPATH="$OCLLIBPATH -L$dir"
  10751. else
  10752. { echo "configure: error: *** OpenCL library directory $dir does not exist." 1>&2; exit 1; }
  10753. fi
  10754. done
  10755. fi
  10756. ac_save_ldflags="$LDFLAGS"
  10757. LDFLAGS="$OCLLIBPATH $LDFLAGS"
  10758. echo $ac_n "checking for clGetPlatformInfo in -lOpenCL""... $ac_c" 1>&6
  10759. echo "configure:13507: checking for clGetPlatformInfo in -lOpenCL" >&5
  10760. ac_lib_var=`echo OpenCL'_'clGetPlatformInfo | sed 'y%./+-%__p_%'`
  10761. ac_save_LIBS="$LIBS"
  10762. LIBS="-lOpenCL $LIBS"
  10763. cat > conftest.$ac_ext <<EOF
  10764. #line 13513 "configure"
  10765. #include "confdefs.h"
  10766. /* Override any gcc2 internal prototype to avoid an error. */
  10767. /* We use char because int might match the return type of a gcc2
  10768. builtin and then its argument prototype would still apply. */
  10769. char clGetPlatformInfo();
  10770. int main() {
  10771. clGetPlatformInfo()
  10772. ; return 0; }
  10773. EOF
  10774. if { (eval echo configure:13524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10775. rm -rf conftest*
  10776. eval "ac_cv_lib_$ac_lib_var=yes"
  10777. else
  10778. echo "configure: failed program was:" >&5
  10779. cat conftest.$ac_ext >&5
  10780. rm -rf conftest*
  10781. eval "ac_cv_lib_$ac_lib_var=no"
  10782. fi
  10783. rm -f conftest*
  10784. LIBS="$ac_save_LIBS"
  10785. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10786. echo "$ac_t""yes" 1>&6
  10787. OCLLIB="$OCLLIB -lOpenCL "
  10788. else
  10789. echo "$ac_t""no" 1>&6
  10790. LDFLAGS=${ac_save_ldflags}
  10791. { echo "configure: error: *** Unable to locate OpenCL library." 1>&2; exit 1; }
  10792. fi
  10793. LDFLAGS=${ac_save_ldflags}
  10794. # expanded symbol check: yes? no?
  10795. #LOC_CHECK_FUNC(clGetPlatformInfo,OpenCL functions,OCLLIB,,,,,[
  10796. #LOC_CHECK_LIBS(OpenCL,clGetPlatformInfo,OpenCL,$OCLLIBPATH,OCLLIB,,,)
  10797. #])
  10798. fi
  10799. fi # $USE_OPENCL
  10800. # Done checking OpenCL
  10801. # Enable LFS (from cdr-tools, tar, and autoconf 2.68)
  10802. # Check whether --enable-largefile or --disable-largefile was given.
  10803. if test "${enable_largefile+set}" = set; then
  10804. enableval="$enable_largefile"
  10805. :
  10806. fi
  10807. LFS_CFLAGS=
  10808. if test "$enable_largefile" != no; then
  10809. ac_save_cflags=$CFLAGS
  10810. if test "`which getconf 2>&5`" ; then
  10811. LFS_CFLAGS=`getconf LFS_CFLAGS 2>&5`
  10812. CFLAGS="$LFS_CFLAGS $ac_save_cflags"
  10813. fi
  10814. echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
  10815. echo "configure:13584: checking for special C compiler options needed for large files" >&5
  10816. ac_cv_sys_largefile_CC=no
  10817. largefile_cc_opt=""
  10818. if test "$GCC" != yes; then
  10819. # IRIX 6.2 and later do not support large files by default,
  10820. # so use the C compiler's -n32 option if that helps.
  10821. cat > conftest.$ac_ext <<EOF
  10822. #line 13592 "configure"
  10823. #include "confdefs.h"
  10824. #include <sys/types.h>
  10825. /* Check that off_t can represent 2**63 - 1 correctly.
  10826. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  10827. since some C++ compilers masquerading as C compilers
  10828. incorrectly reject 9223372036854775807. */
  10829. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  10830. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  10831. && LARGE_OFF_T % 2147483647 == 1)
  10832. ? 1 : -1];
  10833. int main() {
  10834. ; return 0; }
  10835. EOF
  10836. if { (eval echo configure:13608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10837. :
  10838. else
  10839. echo "configure: failed program was:" >&5
  10840. cat conftest.$ac_ext >&5
  10841. rm -rf conftest*
  10842. ac_save_CC="${CC-cc}"
  10843. CC="$CC -n32"
  10844. cat > conftest.$ac_ext <<EOF
  10845. #line 13617 "configure"
  10846. #include "confdefs.h"
  10847. #include <sys/types.h>
  10848. /* Check that off_t can represent 2**63 - 1 correctly.
  10849. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  10850. since some C++ compilers masquerading as C compilers
  10851. incorrectly reject 9223372036854775807. */
  10852. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  10853. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  10854. && LARGE_OFF_T % 2147483647 == 1)
  10855. ? 1 : -1];
  10856. int main() {
  10857. ; return 0; }
  10858. EOF
  10859. if { (eval echo configure:13633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10860. rm -rf conftest*
  10861. ac_cv_sys_largefile_CC=' -n32'
  10862. else
  10863. echo "configure: failed program was:" >&5
  10864. cat conftest.$ac_ext >&5
  10865. fi
  10866. rm -f conftest*
  10867. CC="$ac_save_CC"
  10868. fi
  10869. rm -f conftest*
  10870. fi
  10871. echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
  10872. if test "$ac_cv_sys_largefile_CC" != no; then
  10873. CC="$CC$ac_cv_sys_largefile_CC"
  10874. largefile_cc_opt="$ac_cv_sys_largefile_CC"
  10875. if test "$LFS_CFLAGS" ; then
  10876. LFS_CFLAGS="$LFS_CFLAGS $ac_cv_sys_largefile_CC"
  10877. else
  10878. LFS_CFLAGS="$ac_cv_sys_largefile_CC"
  10879. CFLAGS="$LFS_CFLAGS $ac_save_cflags"
  10880. fi
  10881. fi
  10882. echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
  10883. echo "configure:13660: checking for _FILE_OFFSET_BITS value needed for large files" >&5
  10884. ac_cv_sys_file_offset_bits=no
  10885. cat > conftest.$ac_ext <<EOF
  10886. #line 13664 "configure"
  10887. #include "confdefs.h"
  10888. #include <sys/types.h>
  10889. /* Check that off_t can represent 2**63 - 1 correctly.
  10890. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  10891. since some C++ compilers masquerading as C compilers
  10892. incorrectly reject 9223372036854775807. */
  10893. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  10894. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  10895. && LARGE_OFF_T % 2147483647 == 1)
  10896. ? 1 : -1];
  10897. int main() {
  10898. ; return 0; }
  10899. EOF
  10900. if { (eval echo configure:13680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10901. :
  10902. else
  10903. echo "configure: failed program was:" >&5
  10904. cat conftest.$ac_ext >&5
  10905. rm -rf conftest*
  10906. cat > conftest.$ac_ext <<EOF
  10907. #line 13687 "configure"
  10908. #include "confdefs.h"
  10909. #define _FILE_OFFSET_BITS 64
  10910. #include <sys/types.h>
  10911. /* Check that off_t can represent 2**63 - 1 correctly.
  10912. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  10913. since some C++ compilers masquerading as C compilers
  10914. incorrectly reject 9223372036854775807. */
  10915. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  10916. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  10917. && LARGE_OFF_T % 2147483647 == 1)
  10918. ? 1 : -1];
  10919. int main() {
  10920. ; return 0; }
  10921. EOF
  10922. if { (eval echo configure:13705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10923. rm -rf conftest*
  10924. ac_cv_sys_file_offset_bits=64
  10925. else
  10926. echo "configure: failed program was:" >&5
  10927. cat conftest.$ac_ext >&5
  10928. fi
  10929. rm -f conftest*
  10930. fi
  10931. rm -f conftest*
  10932. echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
  10933. if test "$ac_cv_sys_file_offset_bits" != no; then
  10934. cat >> confdefs.h <<EOF
  10935. #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
  10936. EOF
  10937. if test "$LFS_CFLAGS" ; then
  10938. LFS_CFLAGS="$LFS_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
  10939. else
  10940. LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
  10941. fi
  10942. fi
  10943. echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
  10944. echo "configure:13731: checking for _LARGE_FILES value needed for large files" >&5
  10945. ac_cv_sys_large_files=no
  10946. cat > conftest.$ac_ext <<EOF
  10947. #line 13735 "configure"
  10948. #include "confdefs.h"
  10949. #include <sys/types.h>
  10950. /* Check that off_t can represent 2**63 - 1 correctly.
  10951. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  10952. since some C++ compilers masquerading as C compilers
  10953. incorrectly reject 9223372036854775807. */
  10954. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  10955. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  10956. && LARGE_OFF_T % 2147483647 == 1)
  10957. ? 1 : -1];
  10958. int main() {
  10959. ; return 0; }
  10960. EOF
  10961. if { (eval echo configure:13751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10962. :
  10963. else
  10964. echo "configure: failed program was:" >&5
  10965. cat conftest.$ac_ext >&5
  10966. rm -rf conftest*
  10967. cat > conftest.$ac_ext <<EOF
  10968. #line 13758 "configure"
  10969. #include "confdefs.h"
  10970. #define _LARGE_FILES 1
  10971. #include <sys/types.h>
  10972. /* Check that off_t can represent 2**63 - 1 correctly.
  10973. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  10974. since some C++ compilers masquerading as C compilers
  10975. incorrectly reject 9223372036854775807. */
  10976. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  10977. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  10978. && LARGE_OFF_T % 2147483647 == 1)
  10979. ? 1 : -1];
  10980. int main() {
  10981. ; return 0; }
  10982. EOF
  10983. if { (eval echo configure:13776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10984. rm -rf conftest*
  10985. ac_cv_sys_large_files=1
  10986. else
  10987. echo "configure: failed program was:" >&5
  10988. cat conftest.$ac_ext >&5
  10989. fi
  10990. rm -f conftest*
  10991. fi
  10992. rm -f conftest*
  10993. echo "$ac_t""$ac_cv_sys_large_files" 1>&6
  10994. if test "$ac_cv_sys_large_files" != no; then
  10995. cat >> confdefs.h <<EOF
  10996. #define _LARGE_FILES $ac_cv_sys_large_files
  10997. EOF
  10998. if test "$LFS_CFLAGS" ; then
  10999. LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files"
  11000. else
  11001. LFS_CFLAGS="-D_LARGE_FILES=$ac_cv_sys_large_files"
  11002. fi
  11003. fi
  11004. echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
  11005. echo "configure:13802: checking for _LARGEFILE_SOURCE value needed for large files" >&5
  11006. ac_cv_sys_largefile_source=no
  11007. cat > conftest.$ac_ext <<EOF
  11008. #line 13806 "configure"
  11009. #include "confdefs.h"
  11010. #include <stdio.h>
  11011. int main() {
  11012. return !fseeko;
  11013. ; return 0; }
  11014. EOF
  11015. if { (eval echo configure:13813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11016. :
  11017. else
  11018. echo "configure: failed program was:" >&5
  11019. cat conftest.$ac_ext >&5
  11020. rm -rf conftest*
  11021. cat > conftest.$ac_ext <<EOF
  11022. #line 13820 "configure"
  11023. #include "confdefs.h"
  11024. #define _LARGEFILE_SOURCE 1
  11025. #include <stdio.h>
  11026. int main() {
  11027. return !fseeko;
  11028. ; return 0; }
  11029. EOF
  11030. if { (eval echo configure:13829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11031. rm -rf conftest*
  11032. ac_cv_sys_largefile_source=1
  11033. else
  11034. echo "configure: failed program was:" >&5
  11035. cat conftest.$ac_ext >&5
  11036. fi
  11037. rm -f conftest*
  11038. fi
  11039. rm -f conftest*
  11040. echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
  11041. if test "$ac_cv_sys_largefile_source" != no; then
  11042. cat >> confdefs.h <<EOF
  11043. #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
  11044. EOF
  11045. if test "$LFS_CFLAGS" ; then
  11046. LFS_CFLAGS="$LFS_CFLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
  11047. else
  11048. LFS_CFLAGS="-D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
  11049. fi
  11050. fi
  11051. CFLAGS=$ac_save_cflags
  11052. fi
  11053. ac_save_cflags=${CFLAGS}
  11054. CFLAGS="$LFS_CFLAGS ${ac_save_cflags}"
  11055. echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
  11056. echo "configure:13861: checking for _LARGEFILE_SOURCE value needed for large files" >&5
  11057. ac_cv_sys_largefile_source=no
  11058. cat > conftest.$ac_ext <<EOF
  11059. #line 13865 "configure"
  11060. #include "confdefs.h"
  11061. #include <stdio.h>
  11062. int main() {
  11063. return !fseeko;
  11064. ; return 0; }
  11065. EOF
  11066. if { (eval echo configure:13872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11067. :
  11068. else
  11069. echo "configure: failed program was:" >&5
  11070. cat conftest.$ac_ext >&5
  11071. rm -rf conftest*
  11072. cat > conftest.$ac_ext <<EOF
  11073. #line 13879 "configure"
  11074. #include "confdefs.h"
  11075. #define _LARGEFILE_SOURCE 1
  11076. #include <stdio.h>
  11077. int main() {
  11078. return !fseeko;
  11079. ; return 0; }
  11080. EOF
  11081. if { (eval echo configure:13888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11082. rm -rf conftest*
  11083. ac_cv_sys_largefile_source=1
  11084. else
  11085. echo "configure: failed program was:" >&5
  11086. cat conftest.$ac_ext >&5
  11087. fi
  11088. rm -f conftest*
  11089. fi
  11090. rm -f conftest*
  11091. echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
  11092. if test "$ac_cv_sys_largefile_source" != no; then
  11093. cat >> confdefs.h <<EOF
  11094. #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
  11095. EOF
  11096. if test "$LFS_CFLAGS" ; then
  11097. LFS_CFLAGS="$LFS_CFLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
  11098. else
  11099. LFS_CFLAGS="-D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
  11100. fi
  11101. fi
  11102. # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
  11103. # in glibc 2.1.3, but that breaks too many other things.
  11104. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
  11105. echo $ac_n "checking for fseeko""... $ac_c" 1>&6
  11106. echo "configure:13918: checking for fseeko" >&5
  11107. ac_cv_func_fseeko=no
  11108. cat > conftest.$ac_ext <<EOF
  11109. #line 13922 "configure"
  11110. #include "confdefs.h"
  11111. #include <stdio.h>
  11112. int main() {
  11113. return fseeko && fseeko (stdin, 0, 0);
  11114. ; return 0; }
  11115. EOF
  11116. if { (eval echo configure:13929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11117. rm -rf conftest*
  11118. ac_cv_func_fseeko=yes
  11119. else
  11120. echo "configure: failed program was:" >&5
  11121. cat conftest.$ac_ext >&5
  11122. fi
  11123. rm -f conftest*
  11124. echo "$ac_t""$ac_cv_func_fseeko" 1>&6
  11125. if test $ac_cv_func_fseeko != no; then
  11126. cat >> confdefs.h <<\EOF
  11127. #define HAVE_FSEEKO 1
  11128. EOF
  11129. fi
  11130. echo $ac_n "checking if system supports Large Files at all""... $ac_c" 1>&6
  11131. echo "configure:13946: checking if system supports Large Files at all" >&5
  11132. cat > conftest.$ac_ext <<EOF
  11133. #line 13949 "configure"
  11134. #include "confdefs.h"
  11135. #include <stdio.h>
  11136. #include <sys/types.h>
  11137. int main() {
  11138. /*
  11139. * Check that off_t can represent 2**63 - 1 correctly.
  11140. * We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11141. * since some C++ compilers masquerading as C compilers
  11142. * incorrectly reject 9223372036854775807.
  11143. *
  11144. * For MinGW, off64_t should be used and __MSVCRT_VERSION__ >= 0x0601
  11145. * (msvcrt.dll version 6.10 or higher) is needed for _fstat64 and _stat64.
  11146. */
  11147. #ifdef __MINGW32__
  11148. # define LARGE_OFF_T (((off64_t) 1 << 62) - 1 + ((off64_t) 1 << 62))
  11149. #else
  11150. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11151. #endif
  11152. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11153. && LARGE_OFF_T % 2147483647 == 1)
  11154. ? 1 : -1];
  11155. #ifdef __MINGW32__
  11156. return !fseeko64;
  11157. return !ftello64;
  11158. #else
  11159. return !fseeko;
  11160. return !ftello;
  11161. #endif
  11162. ; return 0; }
  11163. EOF
  11164. if { (eval echo configure:13981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11165. rm -rf conftest*
  11166. ac_cv_largefiles=yes
  11167. else
  11168. echo "configure: failed program was:" >&5
  11169. cat conftest.$ac_ext >&5
  11170. rm -rf conftest*
  11171. ac_cv_largefiles=no
  11172. fi
  11173. rm -f conftest*
  11174. echo "$ac_t""$ac_cv_largefiles" 1>&6
  11175. if test $ac_cv_largefiles = yes; then
  11176. cat >> confdefs.h <<\EOF
  11177. #define HAVE_LARGEFILES 1
  11178. EOF
  11179. USE_LARGEFILES=1
  11180. else
  11181. USE_LARGEFILES=
  11182. LFS_CFLAGS=
  11183. fi
  11184. CFLAGS=${ac_save_cflags}
  11185. # Done large file support
  11186. USE_TERMIO=
  11187. STRIPFLAG=
  11188. GRASS_HOME="${DSTDIR}"
  11189. trap '' 1 2 15
  11190. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  11191. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  11192. # Let make expand exec_prefix.
  11193. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  11194. # Any assignment to VPATH causes Sun make to only execute
  11195. # the first set of double-colon rules, so remove it if not needed.
  11196. # If there is a colon in the path, we need to keep it.
  11197. if test "x$srcdir" = x.; then
  11198. ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
  11199. fi
  11200. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  11201. DEFS=-DHAVE_CONFIG_H
  11202. # Without the "./", some shells look in PATH for config.status.
  11203. : ${CONFIG_STATUS=./config.status}
  11204. echo creating $CONFIG_STATUS
  11205. rm -f $CONFIG_STATUS
  11206. cat > $CONFIG_STATUS <<EOF
  11207. #! /bin/sh
  11208. # Generated automatically by configure.
  11209. # Run this file to recreate the current configuration.
  11210. # This directory was configured as follows,
  11211. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  11212. #
  11213. # $0 $ac_configure_args
  11214. #
  11215. # Compiler output produced by configure, useful for debugging
  11216. # configure, is in ./config.log if it exists.
  11217. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  11218. for ac_option
  11219. do
  11220. case "\$ac_option" in
  11221. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  11222. echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  11223. exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  11224. -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  11225. echo "$CONFIG_STATUS generated by autoconf version 2.13"
  11226. exit 0 ;;
  11227. -help | --help | --hel | --he | --h)
  11228. echo "\$ac_cs_usage"; exit 0 ;;
  11229. *) echo "\$ac_cs_usage"; exit 1 ;;
  11230. esac
  11231. done
  11232. ac_given_srcdir=$srcdir
  11233. ac_given_INSTALL="$INSTALL"
  11234. 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
  11235. EOF
  11236. cat >> $CONFIG_STATUS <<EOF
  11237. # Protect against being on the right side of a sed subst in config.status.
  11238. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  11239. s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  11240. $ac_vpsub
  11241. $extrasub
  11242. s%@SHELL@%$SHELL%g
  11243. s%@CFLAGS@%$CFLAGS%g
  11244. s%@CPPFLAGS@%$CPPFLAGS%g
  11245. s%@CXXFLAGS@%$CXXFLAGS%g
  11246. s%@FFLAGS@%$FFLAGS%g
  11247. s%@DEFS@%$DEFS%g
  11248. s%@LDFLAGS@%$LDFLAGS%g
  11249. s%@LIBS@%$LIBS%g
  11250. s%@exec_prefix@%$exec_prefix%g
  11251. s%@prefix@%$prefix%g
  11252. s%@program_transform_name@%$program_transform_name%g
  11253. s%@bindir@%$bindir%g
  11254. s%@sbindir@%$sbindir%g
  11255. s%@libexecdir@%$libexecdir%g
  11256. s%@datadir@%$datadir%g
  11257. s%@sysconfdir@%$sysconfdir%g
  11258. s%@sharedstatedir@%$sharedstatedir%g
  11259. s%@localstatedir@%$localstatedir%g
  11260. s%@libdir@%$libdir%g
  11261. s%@includedir@%$includedir%g
  11262. s%@oldincludedir@%$oldincludedir%g
  11263. s%@infodir@%$infodir%g
  11264. s%@mandir@%$mandir%g
  11265. s%@host@%$host%g
  11266. s%@host_alias@%$host_alias%g
  11267. s%@host_cpu@%$host_cpu%g
  11268. s%@host_vendor@%$host_vendor%g
  11269. s%@host_os@%$host_os%g
  11270. s%@CC@%$CC%g
  11271. s%@EXEEXT@%$EXEEXT%g
  11272. s%@MINGW32@%$MINGW32%g
  11273. s%@BINDIR@%$BINDIR%g
  11274. s%@pwd@%$pwd%g
  11275. s%@SRCDIR@%$SRCDIR%g
  11276. s%@DSTDIR@%$DSTDIR%g
  11277. s%@ARCH@%$ARCH%g
  11278. s%@GISBASE@%$GISBASE%g
  11279. s%@GRASS_BIN@%$GRASS_BIN%g
  11280. s%@SVN_VERSION@%$SVN_VERSION%g
  11281. s%@GRASS_VERSION_FILE@%$GRASS_VERSION_FILE%g
  11282. s%@GRASS_VERSION_MAJOR@%$GRASS_VERSION_MAJOR%g
  11283. s%@GRASS_VERSION_MINOR@%$GRASS_VERSION_MINOR%g
  11284. s%@GRASS_VERSION_RELEASE@%$GRASS_VERSION_RELEASE%g
  11285. s%@GRASS_VERSION_NUMBER@%$GRASS_VERSION_NUMBER%g
  11286. s%@GRASS_VERSION_DATE@%$GRASS_VERSION_DATE%g
  11287. s%@GRASS_VERSION_SVN@%$GRASS_VERSION_SVN%g
  11288. s%@NAME_VER@%$NAME_VER%g
  11289. s%@LIB_VER@%$LIB_VER%g
  11290. s%@MACOSX_APP@%$MACOSX_APP%g
  11291. s%@MACOSX_ARCHS@%$MACOSX_ARCHS%g
  11292. s%@MACOSX_SDK@%$MACOSX_SDK%g
  11293. s%@INSTDIR@%$INSTDIR%g
  11294. s%@GRASS_LIBRARY_TYPE@%$GRASS_LIBRARY_TYPE%g
  11295. s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g
  11296. s%@LD_LIBRARY_PATH_VAR@%$LD_LIBRARY_PATH_VAR%g
  11297. s%@SHLIB_LD@%$SHLIB_LD%g
  11298. s%@SHLIB_LD_FLAGS@%$SHLIB_LD_FLAGS%g
  11299. s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
  11300. s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
  11301. s%@STLIB_LD@%$STLIB_LD%g
  11302. s%@STLIB_SUFFIX@%$STLIB_SUFFIX%g
  11303. s%@INCLUDE_DIRS@%$INCLUDE_DIRS%g
  11304. s%@LIBRARY_DIRS@%$LIBRARY_DIRS%g
  11305. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  11306. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  11307. s%@INSTALL_DATA@%$INSTALL_DATA%g
  11308. s%@LEX@%$LEX%g
  11309. s%@LEXLIB@%$LEXLIB%g
  11310. s%@LEXPATH@%$LEXPATH%g
  11311. s%@YACC@%$YACC%g
  11312. s%@YACCPATH@%$YACCPATH%g
  11313. s%@RANLIB@%$RANLIB%g
  11314. s%@AR@%$AR%g
  11315. s%@ENV@%$ENV%g
  11316. s%@PERL@%$PERL%g
  11317. s%@CPP@%$CPP%g
  11318. s%@CROSS_COMPILING@%$CROSS_COMPILING%g
  11319. s%@X_CFLAGS@%$X_CFLAGS%g
  11320. s%@X_LIBS@%$X_LIBS%g
  11321. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  11322. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  11323. s%@XLIB@%$XLIB%g
  11324. s%@XTLIB@%$XTLIB%g
  11325. s%@USE_X11@%$USE_X11%g
  11326. s%@DBMIEXTRALIB@%$DBMIEXTRALIB%g
  11327. s%@HAVE_ASPRINTF@%$HAVE_ASPRINTF%g
  11328. s%@MATHLIB@%$MATHLIB%g
  11329. s%@DLLIB@%$DLLIB%g
  11330. s%@ICONVLIB@%$ICONVLIB%g
  11331. s%@SOCKLIB@%$SOCKLIB%g
  11332. s%@HAVE_SOCKET@%$HAVE_SOCKET%g
  11333. s%@ZLIBINCPATH@%$ZLIBINCPATH%g
  11334. s%@ZLIBLIBPATH@%$ZLIBLIBPATH%g
  11335. s%@ZLIB@%$ZLIB%g
  11336. s%@BZIP2INCPATH@%$BZIP2INCPATH%g
  11337. s%@BZIP2LIBPATH@%$BZIP2LIBPATH%g
  11338. s%@BZIP2LIB@%$BZIP2LIB%g
  11339. s%@ZSTDINCPATH@%$ZSTDINCPATH%g
  11340. s%@ZSTDLIBPATH@%$ZSTDLIBPATH%g
  11341. s%@ZSTDLIB@%$ZSTDLIB%g
  11342. s%@PROJINC@%$PROJINC%g
  11343. s%@PROJLIB@%$PROJLIB%g
  11344. s%@PROJSHARE@%$PROJSHARE%g
  11345. s%@NAD2BIN@%$NAD2BIN%g
  11346. s%@REGEXINCPATH@%$REGEXINCPATH%g
  11347. s%@REGEXLIBPATH@%$REGEXLIBPATH%g
  11348. s%@REGEXLIB@%$REGEXLIB%g
  11349. s%@USE_REGEX@%$USE_REGEX%g
  11350. s%@READLINEINCPATH@%$READLINEINCPATH%g
  11351. s%@READLINELIBPATH@%$READLINELIBPATH%g
  11352. s%@READLINELIB@%$READLINELIB%g
  11353. s%@HISTORYLIB@%$HISTORYLIB%g
  11354. s%@GDAL_CONFIG@%$GDAL_CONFIG%g
  11355. s%@GDAL_LIBS@%$GDAL_LIBS%g
  11356. s%@GDAL_CFLAGS@%$GDAL_CFLAGS%g
  11357. s%@USE_GDAL@%$USE_GDAL%g
  11358. s%@USE_OGR@%$USE_OGR%g
  11359. s%@LIBLAS_CONFIG@%$LIBLAS_CONFIG%g
  11360. s%@LIBLAS_LIBS@%$LIBLAS_LIBS%g
  11361. s%@LIBLAS_CFLAGS@%$LIBLAS_CFLAGS%g
  11362. s%@LIBLAS_INC@%$LIBLAS_INC%g
  11363. s%@USE_LIBLAS@%$USE_LIBLAS%g
  11364. s%@PDAL_CONFIG@%$PDAL_CONFIG%g
  11365. s%@PDAL_LIBS@%$PDAL_LIBS%g
  11366. s%@PDAL_CPPFLAGS@%$PDAL_CPPFLAGS%g
  11367. s%@PDAL_INC@%$PDAL_INC%g
  11368. s%@USE_PDAL@%$USE_PDAL%g
  11369. s%@NETCDF_CONFIG@%$NETCDF_CONFIG%g
  11370. s%@NETCDF_LIBS@%$NETCDF_LIBS%g
  11371. s%@NETCDF_CFLAGS@%$NETCDF_CFLAGS%g
  11372. s%@USE_NETCDF@%$USE_NETCDF%g
  11373. s%@GEOS_CONFIG@%$GEOS_CONFIG%g
  11374. s%@GEOS_LIBS@%$GEOS_LIBS%g
  11375. s%@GEOS_CFLAGS@%$GEOS_CFLAGS%g
  11376. s%@USE_GEOS@%$USE_GEOS%g
  11377. s%@TIFF_INCLUDE_DIRS@%$TIFF_INCLUDE_DIRS%g
  11378. s%@TIFF_LIBRARY_DIRS@%$TIFF_LIBRARY_DIRS%g
  11379. s%@TIFFLIB@%$TIFFLIB%g
  11380. s%@PNGINC@%$PNGINC%g
  11381. s%@PNGLIB@%$PNGLIB%g
  11382. s%@USE_PNG@%$USE_PNG%g
  11383. s%@USE_POSTGRES@%$USE_POSTGRES%g
  11384. s%@PQINCPATH@%$PQINCPATH%g
  11385. s%@PQLIBPATH@%$PQLIBPATH%g
  11386. s%@PQLIB@%$PQLIB%g
  11387. s%@MYSQLD_CONFIG@%$MYSQLD_CONFIG%g
  11388. s%@USE_MYSQL@%$USE_MYSQL%g
  11389. s%@MYSQLINCPATH@%$MYSQLINCPATH%g
  11390. s%@MYSQLLIBPATH@%$MYSQLLIBPATH%g
  11391. s%@MYSQLLIB@%$MYSQLLIB%g
  11392. s%@MYSQLDLIB@%$MYSQLDLIB%g
  11393. s%@USE_SQLITE@%$USE_SQLITE%g
  11394. s%@SQLITEINCPATH@%$SQLITEINCPATH%g
  11395. s%@SQLITELIBPATH@%$SQLITELIBPATH%g
  11396. s%@SQLITELIB@%$SQLITELIB%g
  11397. s%@USE_OPENGL@%$USE_OPENGL%g
  11398. s%@OPENGL_X11@%$OPENGL_X11%g
  11399. s%@OPENGL_AQUA@%$OPENGL_AQUA%g
  11400. s%@OPENGL_WINDOWS@%$OPENGL_WINDOWS%g
  11401. s%@OPENGLINC@%$OPENGLINC%g
  11402. s%@OPENGLLIB@%$OPENGLLIB%g
  11403. s%@OPENGLULIB@%$OPENGLULIB%g
  11404. s%@ODBCINC@%$ODBCINC%g
  11405. s%@ODBCLIB@%$ODBCLIB%g
  11406. s%@FFTWINC@%$FFTWINC%g
  11407. s%@FFTWLIB@%$FFTWLIB%g
  11408. s%@BLASLIB@%$BLASLIB%g
  11409. s%@BLASINC@%$BLASINC%g
  11410. s%@LAPACKLIB@%$LAPACKLIB%g
  11411. s%@LAPACKINC@%$LAPACKINC%g
  11412. s%@CAIRO_HAS_XRENDER@%$CAIRO_HAS_XRENDER%g
  11413. s%@CAIRO_HAS_XRENDER_SURFACE@%$CAIRO_HAS_XRENDER_SURFACE%g
  11414. s%@CAIROINC@%$CAIROINC%g
  11415. s%@CAIROLIB@%$CAIROLIB%g
  11416. s%@USE_CAIRO@%$USE_CAIRO%g
  11417. s%@FTINC@%$FTINC%g
  11418. s%@FTLIB@%$FTLIB%g
  11419. s%@INTLLIB@%$INTLLIB%g
  11420. s%@HAVE_NLS@%$HAVE_NLS%g
  11421. s%@CXX@%$CXX%g
  11422. s%@OPENDWGINCPATH@%$OPENDWGINCPATH%g
  11423. s%@OPENDWGLIBPATH@%$OPENDWGLIBPATH%g
  11424. s%@OPENDWGLIB@%$OPENDWGLIB%g
  11425. s%@USE_OPENDWG@%$USE_OPENDWG%g
  11426. s%@PTHREADINCPATH@%$PTHREADINCPATH%g
  11427. s%@PTHREADLIBPATH@%$PTHREADLIBPATH%g
  11428. s%@PTHREADLIB@%$PTHREADLIB%g
  11429. s%@USE_PTHREAD@%$USE_PTHREAD%g
  11430. s%@OMPINCPATH@%$OMPINCPATH%g
  11431. s%@OMPLIBPATH@%$OMPLIBPATH%g
  11432. s%@OMPLIB@%$OMPLIB%g
  11433. s%@OMPCFLAGS@%$OMPCFLAGS%g
  11434. s%@USE_OPENMP@%$USE_OPENMP%g
  11435. s%@OCLINCPATH@%$OCLINCPATH%g
  11436. s%@OCLLIBPATH@%$OCLLIBPATH%g
  11437. s%@OCLLIB@%$OCLLIB%g
  11438. s%@USE_OPENCL@%$USE_OPENCL%g
  11439. s%@USE_LARGEFILES@%$USE_LARGEFILES%g
  11440. s%@LFS_CFLAGS@%$LFS_CFLAGS%g
  11441. s%@USE_TERMIO@%$USE_TERMIO%g
  11442. s%@STRIPFLAG@%$STRIPFLAG%g
  11443. s%@GRASS_HOME@%$GRASS_HOME%g
  11444. CEOF
  11445. EOF
  11446. cat >> $CONFIG_STATUS <<\EOF
  11447. # Split the substitutions into bite-sized pieces for seds with
  11448. # small command number limits, like on Digital OSF/1 and HP-UX.
  11449. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  11450. ac_file=1 # Number of current file.
  11451. ac_beg=1 # First line for current file.
  11452. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  11453. ac_more_lines=:
  11454. ac_sed_cmds=""
  11455. while $ac_more_lines; do
  11456. if test $ac_beg -gt 1; then
  11457. sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  11458. else
  11459. sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  11460. fi
  11461. if test ! -s conftest.s$ac_file; then
  11462. ac_more_lines=false
  11463. rm -f conftest.s$ac_file
  11464. else
  11465. if test -z "$ac_sed_cmds"; then
  11466. ac_sed_cmds="sed -f conftest.s$ac_file"
  11467. else
  11468. ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  11469. fi
  11470. ac_file=`expr $ac_file + 1`
  11471. ac_beg=$ac_end
  11472. ac_end=`expr $ac_end + $ac_max_sed_cmds`
  11473. fi
  11474. done
  11475. if test -z "$ac_sed_cmds"; then
  11476. ac_sed_cmds=cat
  11477. fi
  11478. EOF
  11479. cat >> $CONFIG_STATUS <<EOF
  11480. CONFIG_FILES=\${CONFIG_FILES-"include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/version.h grass.pc"}
  11481. EOF
  11482. cat >> $CONFIG_STATUS <<\EOF
  11483. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  11484. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  11485. case "$ac_file" in
  11486. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  11487. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  11488. *) ac_file_in="${ac_file}.in" ;;
  11489. esac
  11490. # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  11491. # Remove last slash and all that follows it. Not all systems have dirname.
  11492. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  11493. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  11494. # The file is in a subdirectory.
  11495. test ! -d "$ac_dir" && mkdir "$ac_dir"
  11496. ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  11497. # A "../" for each directory in $ac_dir_suffix.
  11498. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  11499. else
  11500. ac_dir_suffix= ac_dots=
  11501. fi
  11502. case "$ac_given_srcdir" in
  11503. .) srcdir=.
  11504. if test -z "$ac_dots"; then top_srcdir=.
  11505. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  11506. /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  11507. *) # Relative path.
  11508. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  11509. top_srcdir="$ac_dots$ac_given_srcdir" ;;
  11510. esac
  11511. case "$ac_given_INSTALL" in
  11512. [/$]*) INSTALL="$ac_given_INSTALL" ;;
  11513. *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  11514. esac
  11515. echo creating "$ac_file"
  11516. rm -f "$ac_file"
  11517. configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  11518. case "$ac_file" in
  11519. *Makefile*) ac_comsub="1i\\
  11520. # $configure_input" ;;
  11521. *) ac_comsub= ;;
  11522. esac
  11523. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  11524. sed -e "$ac_comsub
  11525. s%@configure_input@%$configure_input%g
  11526. s%@srcdir@%$srcdir%g
  11527. s%@top_srcdir@%$top_srcdir%g
  11528. s%@INSTALL@%$INSTALL%g
  11529. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  11530. fi; done
  11531. rm -f conftest.s*
  11532. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  11533. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  11534. #
  11535. # ac_d sets the value in "#define NAME VALUE" lines.
  11536. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
  11537. ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
  11538. ac_dC='\3'
  11539. ac_dD='%g'
  11540. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  11541. ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  11542. ac_uB='\([ ]\)%\1#\2define\3'
  11543. ac_uC=' '
  11544. ac_uD='\4%g'
  11545. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  11546. ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  11547. ac_eB='$%\1#\2define\3'
  11548. ac_eC=' '
  11549. ac_eD='%g'
  11550. if test "${CONFIG_HEADERS+set}" != set; then
  11551. EOF
  11552. cat >> $CONFIG_STATUS <<EOF
  11553. CONFIG_HEADERS="include/config.h"
  11554. EOF
  11555. cat >> $CONFIG_STATUS <<\EOF
  11556. fi
  11557. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  11558. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  11559. case "$ac_file" in
  11560. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  11561. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  11562. *) ac_file_in="${ac_file}.in" ;;
  11563. esac
  11564. echo creating $ac_file
  11565. rm -f conftest.frag conftest.in conftest.out
  11566. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  11567. cat $ac_file_inputs > conftest.in
  11568. EOF
  11569. # Transform confdefs.h into a sed script conftest.vals that substitutes
  11570. # the proper values into config.h.in to produce config.h. And first:
  11571. # Protect against being on the right side of a sed subst in config.status.
  11572. # Protect against being in an unquoted here document in config.status.
  11573. rm -f conftest.vals
  11574. cat > conftest.hdr <<\EOF
  11575. s/[\\&%]/\\&/g
  11576. s%[\\$`]%\\&%g
  11577. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  11578. s%ac_d%ac_u%gp
  11579. s%ac_u%ac_e%gp
  11580. EOF
  11581. sed -n -f conftest.hdr confdefs.h > conftest.vals
  11582. rm -f conftest.hdr
  11583. # This sed command replaces #undef with comments. This is necessary, for
  11584. # example, in the case of _POSIX_SOURCE, which is predefined and required
  11585. # on some systems where configure will not decide to define it.
  11586. cat >> conftest.vals <<\EOF
  11587. s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  11588. EOF
  11589. # Break up conftest.vals because some shells have a limit on
  11590. # the size of here documents, and old seds have small limits too.
  11591. rm -f conftest.tail
  11592. while :
  11593. do
  11594. ac_lines=`grep -c . conftest.vals`
  11595. # grep -c gives empty output for an empty file on some AIX systems.
  11596. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  11597. # Write a limited-size here document to conftest.frag.
  11598. echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  11599. sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  11600. echo 'CEOF
  11601. sed -f conftest.frag conftest.in > conftest.out
  11602. rm -f conftest.in
  11603. mv conftest.out conftest.in
  11604. ' >> $CONFIG_STATUS
  11605. sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  11606. rm -f conftest.vals
  11607. mv conftest.tail conftest.vals
  11608. done
  11609. rm -f conftest.vals
  11610. cat >> $CONFIG_STATUS <<\EOF
  11611. rm -f conftest.frag conftest.h
  11612. echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
  11613. cat conftest.in >> conftest.h
  11614. rm -f conftest.in
  11615. if cmp -s $ac_file conftest.h 2>/dev/null; then
  11616. echo "$ac_file is unchanged"
  11617. rm -f conftest.h
  11618. else
  11619. # Remove last slash and all that follows it. Not all systems have dirname.
  11620. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  11621. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  11622. # The file is in a subdirectory.
  11623. test ! -d "$ac_dir" && mkdir "$ac_dir"
  11624. fi
  11625. rm -f $ac_file
  11626. mv conftest.h $ac_file
  11627. fi
  11628. fi; done
  11629. EOF
  11630. cat >> $CONFIG_STATUS <<EOF
  11631. EOF
  11632. cat >> $CONFIG_STATUS <<\EOF
  11633. exit 0
  11634. EOF
  11635. chmod +x $CONFIG_STATUS
  11636. rm -fr confdefs* $ac_clean_files
  11637. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  11638. echo "Copying config.status to config.status.${ARCH}"
  11639. cp -f config.status config.status.${ARCH}
  11640. # Display configuration status
  11641. echo ""
  11642. echo "GRASS is now configured for: ${host}"
  11643. echo ""
  11644. echo " Source directory: ${SRCDIR}"
  11645. echo " Build directory: ${DSTDIR}"
  11646. echo " Installation directory: ${INSTDIR}"
  11647. echo " Startup script in directory:${bindir}"
  11648. echo " C compiler: ${CC} ${CFLAGS}"
  11649. echo " C++ compiler: ${CXX} ${CXXFLAGS}"
  11650. echo " Building shared libraries: ${shared_ok}"
  11651. echo " OpenGL platform: ${OPENGL_TYPE}"
  11652. echo ""
  11653. echo " MacOSX application: `if test -n "${MACOSX_APP}" ; then echo yes ; else echo no ; fi`"
  11654. echo " MacOSX architectures: ${MACOSX_ARCHS}"
  11655. echo " MacOSX SDK: ${MACOSX_SDK}"
  11656. echo ""
  11657. echo " BLAS support: `if test -n "${USE_BLAS}" ; then echo yes ; else echo no ; fi`"
  11658. echo " BZIP2 support: `if test -n "${USE_BZIP2}" ; then echo yes ; else echo no ; fi`"
  11659. echo " C++ support: `if test -n "${USE_CXX}" ; then echo yes ; else echo no ; fi`"
  11660. echo " Cairo support: `if test -n "${USE_CAIRO}" ; then echo yes ; else echo no ; fi`"
  11661. echo " DWG support: `if test -n "${USE_OPENDWG}" ; then echo yes ; else echo no ; fi`"
  11662. echo " FFTW support: `if test -n "${USE_FFTW}" ; then echo yes ; else echo no ; fi`"
  11663. echo " FreeType support: `if test -n "${USE_FREETYPE}" ; then echo yes ; else echo no ; fi`"
  11664. echo " GDAL support: `if test -n "${USE_GDAL}" ; then echo yes ; else echo no ; fi`"
  11665. echo " GEOS support: `if test -n "${USE_GEOS}" ; then echo yes ; else echo no ; fi`"
  11666. echo " LAPACK support: `if test -n "${USE_LAPACK}" ; then echo yes ; else echo no ; fi`"
  11667. echo " Large File support (LFS): `if test -n "${USE_LARGEFILES}" ; then echo yes ; else echo no ; fi`"
  11668. echo " libLAS support: `if test -n "${USE_LIBLAS}" ; then echo yes ; else echo no ; fi`"
  11669. echo " MySQL support: `if test -n "${USE_MYSQL}" ; then echo yes ; else echo no ; fi`"
  11670. echo " NetCDF support: `if test -n "${USE_NETCDF}" ; then echo yes ; else echo no ; fi`"
  11671. echo " NLS support: `if test -n "${USE_NLS}" ; then echo yes ; else echo no ; fi`"
  11672. echo " ODBC support: `if test -n "${USE_ODBC}" ; then echo yes ; else echo no ; fi`"
  11673. echo " OGR support: `if test -n "${USE_OGR}" ; then echo yes ; else echo no ; fi`"
  11674. echo " OpenCL support: `if test -n "${USE_OPENCL}" ; then echo yes ; else echo no ; fi`"
  11675. echo " OpenGL support: `if test -n "${USE_OPENGL}" ; then echo yes ; else echo no ; fi`"
  11676. echo " OpenMP support: `if test -n "${USE_OPENMP}" ; then echo yes ; else echo no ; fi`"
  11677. echo " PDAL support: `if test -n "${USE_PDAL}" ; then echo yes ; else echo no ; fi`"
  11678. echo " PNG support: `if test -n "${USE_PNG}" ; then echo yes ; else echo no ; fi`"
  11679. echo " POSIX thread support: `if test -n "${USE_PTHREAD}" ; then echo yes ; else echo no ; fi`"
  11680. echo " PostgreSQL support: `if test -n "${USE_POSTGRES}" ; then echo yes ; else echo no ; fi`"
  11681. echo " Readline support: `if test -n "${USE_READLINE}" ; then echo yes ; else echo no ; fi`"
  11682. echo " Regex support: `if test -n "${USE_REGEX}" ; then echo yes ; else echo no ; fi`"
  11683. echo " SQLite support: `if test -n "${USE_SQLITE}" ; then echo yes ; else echo no ; fi`"
  11684. echo " TIFF support: `if test -n "${USE_TIFF}" ; then echo yes ; else echo no ; fi`"
  11685. echo " X11 support: `if test -n "${USE_X11}" ; then echo yes ; else echo no ; fi`"
  11686. echo " Zstandard support: `if test -n "${USE_ZSTD}" ; then echo yes ; else echo no ; fi`"
  11687. echo ""
  11688. # remove when the new PROJ API is stable
  11689. if test $PROJ4API = 0 ; then
  11690. echo "$ac_t"" using new PROJ 5+ API" 1>&6
  11691. else
  11692. echo "$ac_t"" using old PROJ 4 API" 1>&6
  11693. fi
  11694. echo ""