configure 379 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794
  1. #! /bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf version 2.13
  4. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  5. #
  6. # This configure script is free software; the Free Software Foundation
  7. # gives unlimited permission to copy, distribute and modify it.
  8. # Defaults:
  9. ac_help=
  10. ac_default_prefix=/usr/local
  11. # Any additions from configure.in:
  12. ac_default_prefix=/usr/local
  13. ac_help="$ac_help
  14. --enable-macosx-app create a MacOSX application"
  15. ac_help="$ac_help
  16. --enable-shared build and link with shared libraries [--enable-shared]"
  17. ac_help="$ac_help
  18. --enable-w11 use W11 library for Windows X11 emulation"
  19. ac_help="$ac_help
  20. --with-cxx support C++ functionality (default: yes)"
  21. ac_help="$ac_help
  22. --with-macosx-archs[=arch list]
  23. compile multiple architectures on MacOSX, ie.
  24. universal. Valid architectures are i386, ppc,
  25. x86_64 and ppc64. (default: no [native])"
  26. ac_help="$ac_help
  27. --with-macosx-sdk[=path/sdk]
  28. compile with a system SDK on MacOSX. (default: no)"
  29. ac_help="$ac_help
  30. --with-tiff support TIFF functionality (default: yes)"
  31. ac_help="$ac_help
  32. --with-png support PNG functionality (default: yes)"
  33. ac_help="$ac_help
  34. --with-postgres support PostgreSQL functionality (default: no)"
  35. ac_help="$ac_help
  36. --with-mysql support MySQL functionality (default: no)"
  37. ac_help="$ac_help
  38. --with-sqlite support SQLite functionality (default: yes)"
  39. ac_help="$ac_help
  40. --with-opengl support OpenGL functionality (default: yes)"
  41. ac_help="$ac_help
  42. --with-odbc support ODBC functionality (default: no)"
  43. ac_help="$ac_help
  44. --with-fftw support FFTW functionality (default: yes)"
  45. ac_help="$ac_help
  46. --with-blas support BLAS functionality (default: no)"
  47. ac_help="$ac_help
  48. --with-lapack support LAPACK functionality (default: no)"
  49. ac_help="$ac_help
  50. --with-cairo support Cairo functionality (default: yes)"
  51. ac_help="$ac_help
  52. --with-freetype support FreeType functionality (default: yes)"
  53. ac_help="$ac_help
  54. --with-nls support NLS functionality (default: no)"
  55. ac_help="$ac_help
  56. --with-readline support Readline functionality (default: no)"
  57. ac_help="$ac_help
  58. --with-opendwg support openDWG functionality (default: no)"
  59. ac_help="$ac_help
  60. --with-regex support regex functionality (default: yes)"
  61. ac_help="$ac_help
  62. --with-pthread support POSIX threads functionality (default: no)"
  63. ac_help="$ac_help
  64. --with-openmp support OpenMP functionality (default: no)"
  65. ac_help="$ac_help
  66. --with-opencl support OpenCL functionality (default: no)"
  67. ac_help="$ac_help
  68. --with-bzlib support BZIP2 functionality (default: no)"
  69. ac_help="$ac_help
  70. --with-zstd support Zstandard functionality (default: yes)"
  71. ac_help="$ac_help
  72. --with-gdal[=path/gdal-config]
  73. enable GDAL/OGR support (gdal-config with path,
  74. e.g. '--with-gdal=/usr/local/bin/gdal-config')"
  75. ac_help="$ac_help
  76. --with-liblas[=path/liblas-config]
  77. enable libLAS support (liblas-config with path,
  78. e.g. '--with-liblas=/usr/local/bin/liblas-config',
  79. default: no)"
  80. ac_help="$ac_help
  81. --with-pdal[=path/pdal-config]
  82. enable PDAL support (pdal-config with path,
  83. e.g. '--with-pdal=/usr/local/bin/pdal-config',
  84. default: no)"
  85. ac_help="$ac_help
  86. --with-wxwidgets[=path/wx-config]
  87. enable wxWidgets support (wx-config with path,
  88. e.g. '--with-wxwidgets=/usr/local/bin/wx-config',
  89. default: no)"
  90. ac_help="$ac_help
  91. --with-netcdf[=path/nc-config]
  92. enable NetCDF support (nc-config with path,
  93. e.g. '--with-nc=/usr/local/bin/nc-config',
  94. default: no)"
  95. ac_help="$ac_help
  96. --with-geos[=path/geos-config]
  97. enable GEOS support (geos-config with path,
  98. e.g. '--with-geos=/usr/local/bin/geos-config',
  99. default: no)"
  100. ac_help="$ac_help
  101. --with-includes=DIRS site include files are in DIRS"
  102. ac_help="$ac_help
  103. --with-libs=DIRS site library files are in DIRS"
  104. ac_help="$ac_help
  105. --with-zlib-includes=DIRS
  106. zlib include files are in DIRS"
  107. ac_help="$ac_help
  108. --with-zlib-libs=DIRS zlib library files are in DIRS"
  109. ac_help="$ac_help
  110. --with-bzlib-includes=DIRS
  111. BZIP2 include files are in DIRS"
  112. ac_help="$ac_help
  113. --with-bzlib-libs=DIRS BZIP2 library files are in DIRS"
  114. ac_help="$ac_help
  115. --with-zstd-includes=DIRS
  116. ZSTD include files are in DIRS"
  117. ac_help="$ac_help
  118. --with-zstd-libs=DIRS ZSTD library files are in DIRS"
  119. ac_help="$ac_help
  120. --with-readline-includes=DIRS
  121. Readline include files are in DIRS"
  122. ac_help="$ac_help
  123. --with-readline-libs=DIRS
  124. Readline library files are in DIRS"
  125. ac_help="$ac_help
  126. --with-tiff-includes=DIRS
  127. TIFF include files are in DIRS"
  128. ac_help="$ac_help
  129. --with-tiff-libs=DIRS TIFF library files are in DIRS"
  130. ac_help="$ac_help
  131. --with-png-includes=DIRS
  132. PNG include files are in DIRS"
  133. ac_help="$ac_help
  134. --with-png-libs=DIRS PNG library files are in DIRS"
  135. ac_help="$ac_help
  136. --with-postgres-includes=DIRS
  137. PostgreSQL include files are in DIRS"
  138. ac_help="$ac_help
  139. --with-postgres-libs=DIRS
  140. PostgreSQL library files are in DIRS"
  141. ac_help="$ac_help
  142. --with-mysql-includes=DIRS
  143. MySQL include files are in DIRS"
  144. ac_help="$ac_help
  145. --with-mysql-libs=DIRS MySQL library files are in DIRS"
  146. ac_help="$ac_help
  147. --with-sqlite-includes=DIRS
  148. SQLite include files are in DIRS"
  149. ac_help="$ac_help
  150. --with-sqlite-libs=DIRS SQLite library files are in DIRS"
  151. ac_help="$ac_help
  152. --with-opengl-includes=DIRS
  153. OpenGL include files are in DIRS"
  154. ac_help="$ac_help
  155. --with-opengl-libs=DIRS OpenGL library files are in DIRS"
  156. ac_help="$ac_help
  157. --with-opengl-framework=DIR
  158. OpenGL framework is in DIR"
  159. ac_help="$ac_help
  160. --with-odbc-includes=DIRS
  161. ODBC include files are in DIRS"
  162. ac_help="$ac_help
  163. --with-odbc-libs=DIRS ODBC library files are in DIRS"
  164. ac_help="$ac_help
  165. --with-fftw-includes=DIRS
  166. FFTW include files are in DIRS"
  167. ac_help="$ac_help
  168. --with-fftw-libs=DIRS FFTW library files are in DIRS"
  169. ac_help="$ac_help
  170. --with-blas-includes=DIRS
  171. BLAS include files are in DIRS"
  172. ac_help="$ac_help
  173. --with-blas-libs=DIRS BLAS library files are in DIRS"
  174. ac_help="$ac_help
  175. --with-lapack-includes=DIRS
  176. LAPACK include files are in DIRS"
  177. ac_help="$ac_help
  178. --with-lapack-libs=DIRS LAPACK library files are in DIRS"
  179. ac_help="$ac_help
  180. --with-cairo-includes=DIRS
  181. cairo include files are in DIRS"
  182. ac_help="$ac_help
  183. --with-cairo-libs=DIRS cairo library files are in DIRS"
  184. ac_help="$ac_help
  185. --with-cairo-ldflags=FLAGS
  186. cairo needs FLAGS when linking"
  187. ac_help="$ac_help
  188. --with-freetype-includes=DIRS
  189. FreeType include files are in DIRS"
  190. ac_help="$ac_help
  191. --with-freetype-libs=DIRS
  192. FreeType library files are in DIRS"
  193. ac_help="$ac_help
  194. --with-proj-includes=DIRS
  195. External PROJ.4 include files are in DIRS"
  196. ac_help="$ac_help
  197. --with-proj-libs=DIRS External PROJ.4 library files are in DIRS"
  198. ac_help="$ac_help
  199. --with-proj-share=DIR External PROJ.4 data files are in DIR"
  200. ac_help="$ac_help
  201. --with-opendwg-includes=DIRS
  202. openDWG include files are in DIRS"
  203. ac_help="$ac_help
  204. --with-opendwg-libs=DIRS
  205. openDWG library files are in DIRS"
  206. ac_help="$ac_help
  207. --with-regex-includes=DIRS
  208. regex include files are in DIRS"
  209. ac_help="$ac_help
  210. --with-regex-libs=DIRS regex library files are in DIRS"
  211. ac_help="$ac_help
  212. --with-pthread-includes=DIRS
  213. POSIX threads include files are in DIRS"
  214. ac_help="$ac_help
  215. --with-pthread-libs=DIRS
  216. POSIX threads library files are in DIRS"
  217. ac_help="$ac_help
  218. --with-openmp-includes=DIRS
  219. OpenMP include files are in DIRS"
  220. ac_help="$ac_help
  221. --with-openmp-libs=DIRS OpenMP library files are in DIRS"
  222. ac_help="$ac_help
  223. --with-opencl-includes=DIRS
  224. OpenCL include files are in DIRS"
  225. ac_help="$ac_help
  226. --with-opencl-libs=DIRS OpenCL library files are in DIRS"
  227. ac_help="$ac_help
  228. --with-x use the X Window System"
  229. ac_help="$ac_help
  230. --disable-largefile omit support for large files (LFS)"
  231. # Initialize some variables set by options.
  232. # The variables have the same names as the options, with
  233. # dashes changed to underlines.
  234. build=NONE
  235. cache_file=./config.cache
  236. exec_prefix=NONE
  237. host=NONE
  238. no_create=
  239. nonopt=NONE
  240. no_recursion=
  241. prefix=NONE
  242. program_prefix=NONE
  243. program_suffix=NONE
  244. program_transform_name=s,x,x,
  245. silent=
  246. site=
  247. srcdir=
  248. target=NONE
  249. verbose=
  250. x_includes=NONE
  251. x_libraries=NONE
  252. bindir='${exec_prefix}/bin'
  253. sbindir='${exec_prefix}/sbin'
  254. libexecdir='${exec_prefix}/libexec'
  255. datadir='${prefix}/share'
  256. sysconfdir='${prefix}/etc'
  257. sharedstatedir='${prefix}/com'
  258. localstatedir='${prefix}/var'
  259. libdir='${exec_prefix}/lib'
  260. includedir='${prefix}/include'
  261. oldincludedir='/usr/include'
  262. infodir='${prefix}/info'
  263. mandir='${prefix}/man'
  264. # Initialize some other variables.
  265. subdirs=
  266. MFLAGS= MAKEFLAGS=
  267. SHELL=${CONFIG_SHELL-/bin/sh}
  268. # Maximum number of lines to put in a shell here document.
  269. ac_max_here_lines=12
  270. ac_prev=
  271. for ac_option
  272. do
  273. # If the previous option needs an argument, assign it.
  274. if test -n "$ac_prev"; then
  275. eval "$ac_prev=\$ac_option"
  276. ac_prev=
  277. continue
  278. fi
  279. case "$ac_option" in
  280. -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  281. *) ac_optarg= ;;
  282. esac
  283. # Accept the important Cygnus configure options, so we can diagnose typos.
  284. case "$ac_option" in
  285. -bindir | --bindir | --bindi | --bind | --bin | --bi)
  286. ac_prev=bindir ;;
  287. -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  288. bindir="$ac_optarg" ;;
  289. -build | --build | --buil | --bui | --bu)
  290. ac_prev=build ;;
  291. -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  292. build="$ac_optarg" ;;
  293. -cache-file | --cache-file | --cache-fil | --cache-fi \
  294. | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  295. ac_prev=cache_file ;;
  296. -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  297. | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  298. cache_file="$ac_optarg" ;;
  299. -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  300. ac_prev=datadir ;;
  301. -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  302. | --da=*)
  303. datadir="$ac_optarg" ;;
  304. -disable-* | --disable-*)
  305. ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  306. # Reject names that are not valid shell variable names.
  307. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  308. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  309. fi
  310. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  311. eval "enable_${ac_feature}=no" ;;
  312. -enable-* | --enable-*)
  313. ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  314. # Reject names that are not valid shell variable names.
  315. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  316. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  317. fi
  318. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  319. case "$ac_option" in
  320. *=*) ;;
  321. *) ac_optarg=yes ;;
  322. esac
  323. eval "enable_${ac_feature}='$ac_optarg'" ;;
  324. -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  325. | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  326. | --exec | --exe | --ex)
  327. ac_prev=exec_prefix ;;
  328. -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  329. | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  330. | --exec=* | --exe=* | --ex=*)
  331. exec_prefix="$ac_optarg" ;;
  332. -gas | --gas | --ga | --g)
  333. # Obsolete; use --with-gas.
  334. with_gas=yes ;;
  335. -help | --help | --hel | --he)
  336. # Omit some internal or obsolete options to make the list less imposing.
  337. # This message is too long to be a string in the A/UX 3.1 sh.
  338. cat << EOF
  339. Usage: configure [options] [host]
  340. Options: [defaults in brackets after descriptions]
  341. Configuration:
  342. --cache-file=FILE cache test results in FILE
  343. --help print this message
  344. --no-create do not create output files
  345. --quiet, --silent do not print \`checking...' messages
  346. --version print the version of autoconf that created configure
  347. Directory and file names:
  348. --prefix=PREFIX install architecture-independent files in PREFIX
  349. [$ac_default_prefix]
  350. --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  351. [same as prefix]
  352. --bindir=DIR user executables in DIR [EPREFIX/bin]
  353. --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
  354. --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
  355. --datadir=DIR read-only architecture-independent data in DIR
  356. [PREFIX/share]
  357. --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
  358. --sharedstatedir=DIR modifiable architecture-independent data in DIR
  359. [PREFIX/com]
  360. --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
  361. --libdir=DIR object code libraries in DIR [EPREFIX/lib]
  362. --includedir=DIR C header files in DIR [PREFIX/include]
  363. --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
  364. --infodir=DIR info documentation in DIR [PREFIX/info]
  365. --mandir=DIR man documentation in DIR [PREFIX/man]
  366. --srcdir=DIR find the sources in DIR [configure dir or ..]
  367. --program-prefix=PREFIX prepend PREFIX to installed program names
  368. --program-suffix=SUFFIX append SUFFIX to installed program names
  369. --program-transform-name=PROGRAM
  370. run sed PROGRAM on installed program names
  371. EOF
  372. cat << EOF
  373. Host type:
  374. --build=BUILD configure for building on BUILD [BUILD=HOST]
  375. --host=HOST configure for HOST [guessed]
  376. --target=TARGET configure for TARGET [TARGET=HOST]
  377. Features and packages:
  378. --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  379. --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  380. --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  381. --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
  382. --x-includes=DIR X include files are in DIR
  383. --x-libraries=DIR X library files are in DIR
  384. EOF
  385. if test -n "$ac_help"; then
  386. echo "--enable and --with options recognized:$ac_help"
  387. fi
  388. exit 0 ;;
  389. -host | --host | --hos | --ho)
  390. ac_prev=host ;;
  391. -host=* | --host=* | --hos=* | --ho=*)
  392. host="$ac_optarg" ;;
  393. -includedir | --includedir | --includedi | --included | --include \
  394. | --includ | --inclu | --incl | --inc)
  395. ac_prev=includedir ;;
  396. -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  397. | --includ=* | --inclu=* | --incl=* | --inc=*)
  398. includedir="$ac_optarg" ;;
  399. -infodir | --infodir | --infodi | --infod | --info | --inf)
  400. ac_prev=infodir ;;
  401. -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  402. infodir="$ac_optarg" ;;
  403. -libdir | --libdir | --libdi | --libd)
  404. ac_prev=libdir ;;
  405. -libdir=* | --libdir=* | --libdi=* | --libd=*)
  406. libdir="$ac_optarg" ;;
  407. -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  408. | --libexe | --libex | --libe)
  409. ac_prev=libexecdir ;;
  410. -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  411. | --libexe=* | --libex=* | --libe=*)
  412. libexecdir="$ac_optarg" ;;
  413. -localstatedir | --localstatedir | --localstatedi | --localstated \
  414. | --localstate | --localstat | --localsta | --localst \
  415. | --locals | --local | --loca | --loc | --lo)
  416. ac_prev=localstatedir ;;
  417. -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  418. | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  419. | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  420. localstatedir="$ac_optarg" ;;
  421. -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  422. ac_prev=mandir ;;
  423. -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  424. mandir="$ac_optarg" ;;
  425. -nfp | --nfp | --nf)
  426. # Obsolete; use --without-fp.
  427. with_fp=no ;;
  428. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  429. | --no-cr | --no-c)
  430. no_create=yes ;;
  431. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  432. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  433. no_recursion=yes ;;
  434. -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  435. | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  436. | --oldin | --oldi | --old | --ol | --o)
  437. ac_prev=oldincludedir ;;
  438. -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  439. | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  440. | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  441. oldincludedir="$ac_optarg" ;;
  442. -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  443. ac_prev=prefix ;;
  444. -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  445. prefix="$ac_optarg" ;;
  446. -program-prefix | --program-prefix | --program-prefi | --program-pref \
  447. | --program-pre | --program-pr | --program-p)
  448. ac_prev=program_prefix ;;
  449. -program-prefix=* | --program-prefix=* | --program-prefi=* \
  450. | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  451. program_prefix="$ac_optarg" ;;
  452. -program-suffix | --program-suffix | --program-suffi | --program-suff \
  453. | --program-suf | --program-su | --program-s)
  454. ac_prev=program_suffix ;;
  455. -program-suffix=* | --program-suffix=* | --program-suffi=* \
  456. | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  457. program_suffix="$ac_optarg" ;;
  458. -program-transform-name | --program-transform-name \
  459. | --program-transform-nam | --program-transform-na \
  460. | --program-transform-n | --program-transform- \
  461. | --program-transform | --program-transfor \
  462. | --program-transfo | --program-transf \
  463. | --program-trans | --program-tran \
  464. | --progr-tra | --program-tr | --program-t)
  465. ac_prev=program_transform_name ;;
  466. -program-transform-name=* | --program-transform-name=* \
  467. | --program-transform-nam=* | --program-transform-na=* \
  468. | --program-transform-n=* | --program-transform-=* \
  469. | --program-transform=* | --program-transfor=* \
  470. | --program-transfo=* | --program-transf=* \
  471. | --program-trans=* | --program-tran=* \
  472. | --progr-tra=* | --program-tr=* | --program-t=*)
  473. program_transform_name="$ac_optarg" ;;
  474. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  475. | -silent | --silent | --silen | --sile | --sil)
  476. silent=yes ;;
  477. -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  478. ac_prev=sbindir ;;
  479. -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  480. | --sbi=* | --sb=*)
  481. sbindir="$ac_optarg" ;;
  482. -sharedstatedir | --sharedstatedir | --sharedstatedi \
  483. | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  484. | --sharedst | --shareds | --shared | --share | --shar \
  485. | --sha | --sh)
  486. ac_prev=sharedstatedir ;;
  487. -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  488. | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  489. | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  490. | --sha=* | --sh=*)
  491. sharedstatedir="$ac_optarg" ;;
  492. -site | --site | --sit)
  493. ac_prev=site ;;
  494. -site=* | --site=* | --sit=*)
  495. site="$ac_optarg" ;;
  496. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  497. ac_prev=srcdir ;;
  498. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  499. srcdir="$ac_optarg" ;;
  500. -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  501. | --syscon | --sysco | --sysc | --sys | --sy)
  502. ac_prev=sysconfdir ;;
  503. -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  504. | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  505. sysconfdir="$ac_optarg" ;;
  506. -target | --target | --targe | --targ | --tar | --ta | --t)
  507. ac_prev=target ;;
  508. -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  509. target="$ac_optarg" ;;
  510. -v | -verbose | --verbose | --verbos | --verbo | --verb)
  511. verbose=yes ;;
  512. -version | --version | --versio | --versi | --vers)
  513. echo "configure generated by autoconf version 2.13"
  514. exit 0 ;;
  515. -with-* | --with-*)
  516. ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  517. # Reject names that are not valid shell variable names.
  518. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  519. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  520. fi
  521. ac_package=`echo $ac_package| sed 's/-/_/g'`
  522. case "$ac_option" in
  523. *=*) ;;
  524. *) ac_optarg=yes ;;
  525. esac
  526. eval "with_${ac_package}='$ac_optarg'" ;;
  527. -without-* | --without-*)
  528. ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  529. # Reject names that are not valid shell variable names.
  530. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  531. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  532. fi
  533. ac_package=`echo $ac_package| sed 's/-/_/g'`
  534. eval "with_${ac_package}=no" ;;
  535. --x)
  536. # Obsolete; use --with-x.
  537. with_x=yes ;;
  538. -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  539. | --x-incl | --x-inc | --x-in | --x-i)
  540. ac_prev=x_includes ;;
  541. -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  542. | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  543. x_includes="$ac_optarg" ;;
  544. -x-libraries | --x-libraries | --x-librarie | --x-librari \
  545. | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  546. ac_prev=x_libraries ;;
  547. -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  548. | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  549. x_libraries="$ac_optarg" ;;
  550. -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  551. ;;
  552. *)
  553. if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  554. echo "configure: warning: $ac_option: invalid host type" 1>&2
  555. fi
  556. if test "x$nonopt" != xNONE; then
  557. { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  558. fi
  559. nonopt="$ac_option"
  560. ;;
  561. esac
  562. done
  563. if test -n "$ac_prev"; then
  564. { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  565. fi
  566. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  567. # File descriptor usage:
  568. # 0 standard input
  569. # 1 file creation
  570. # 2 errors and warnings
  571. # 3 some systems may open it to /dev/tty
  572. # 4 used on the Kubota Titan
  573. # 6 checking for... messages and results
  574. # 5 compiler messages saved in config.log
  575. if test "$silent" = yes; then
  576. exec 6>/dev/null
  577. else
  578. exec 6>&1
  579. fi
  580. exec 5>./config.log
  581. echo "\
  582. This file contains any messages produced by compilers while
  583. running configure, to aid debugging if configure makes a mistake.
  584. " 1>&5
  585. # Strip out --no-create and --no-recursion so they do not pile up.
  586. # Also quote any args containing shell metacharacters.
  587. ac_configure_args=
  588. for ac_arg
  589. do
  590. case "$ac_arg" in
  591. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  592. | --no-cr | --no-c) ;;
  593. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  594. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  595. *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  596. ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  597. *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  598. esac
  599. done
  600. # NLS nuisances.
  601. # Only set these to C if already set. These must not be set unconditionally
  602. # because not all systems understand e.g. LANG=C (notably SCO).
  603. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  604. # Non-C LC_CTYPE values break the ctype check.
  605. if test "${LANG+set}" = set; then LANG=C; export LANG; fi
  606. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  607. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  608. if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
  609. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  610. rm -rf conftest* confdefs.h
  611. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  612. echo > confdefs.h
  613. # A filename unique to this package, relative to the directory that
  614. # configure is in, which we can look for to find out if srcdir is correct.
  615. ac_unique_file=configure.in
  616. # Find the source files, if location was not specified.
  617. if test -z "$srcdir"; then
  618. ac_srcdir_defaulted=yes
  619. # Try the directory containing this script, then its parent.
  620. ac_prog=$0
  621. ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  622. test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  623. srcdir=$ac_confdir
  624. if test ! -r $srcdir/$ac_unique_file; then
  625. srcdir=..
  626. fi
  627. else
  628. ac_srcdir_defaulted=no
  629. fi
  630. if test ! -r $srcdir/$ac_unique_file; then
  631. if test "$ac_srcdir_defaulted" = yes; then
  632. { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  633. else
  634. { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  635. fi
  636. fi
  637. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  638. # Prefer explicitly selected file to automatically selected ones.
  639. if test -z "$CONFIG_SITE"; then
  640. if test "x$prefix" != xNONE; then
  641. CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  642. else
  643. CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  644. fi
  645. fi
  646. for ac_site_file in $CONFIG_SITE; do
  647. if test -r "$ac_site_file"; then
  648. echo "loading site script $ac_site_file"
  649. . "$ac_site_file"
  650. fi
  651. done
  652. ac_ext=c
  653. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  654. ac_cpp='$CPP $CPPFLAGS'
  655. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  656. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  657. cross_compiling=$ac_cv_prog_cc_cross
  658. ac_exeext=
  659. ac_objext=o
  660. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  661. # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  662. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  663. ac_n= ac_c='
  664. ' ac_t=' '
  665. else
  666. ac_n=-n ac_c= ac_t=
  667. fi
  668. else
  669. ac_n= ac_c='\c' ac_t=
  670. fi
  671. ac_aux_dir=
  672. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  673. if test -f $ac_dir/install-sh; then
  674. ac_aux_dir=$ac_dir
  675. ac_install_sh="$ac_aux_dir/install-sh -c"
  676. break
  677. elif test -f $ac_dir/install.sh; then
  678. ac_aux_dir=$ac_dir
  679. ac_install_sh="$ac_aux_dir/install.sh -c"
  680. break
  681. fi
  682. done
  683. if test -z "$ac_aux_dir"; then
  684. { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  685. fi
  686. ac_config_guess=$ac_aux_dir/config.guess
  687. ac_config_sub=$ac_aux_dir/config.sub
  688. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  689. # Make sure we can run config.sub.
  690. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
  691. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  692. fi
  693. echo $ac_n "checking host system type""... $ac_c" 1>&6
  694. echo "configure:766: checking host system type" >&5
  695. host_alias=$host
  696. case "$host_alias" in
  697. NONE)
  698. case $nonopt in
  699. NONE)
  700. if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
  701. else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  702. fi ;;
  703. *) host_alias=$nonopt ;;
  704. esac ;;
  705. esac
  706. host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
  707. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  708. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  709. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  710. echo "$ac_t""$host" 1>&6
  711. # Extract the first word of "gcc", so it can be a program name with args.
  712. set dummy gcc; ac_word=$2
  713. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  714. echo "configure:789: checking for $ac_word" >&5
  715. if test -n "$CC"; then
  716. ac_cv_prog_CC="$CC" # Let the user override the test.
  717. else
  718. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  719. ac_dummy="$PATH"
  720. for ac_dir in $ac_dummy; do
  721. test -z "$ac_dir" && ac_dir=.
  722. if test -f $ac_dir/$ac_word; then
  723. ac_cv_prog_CC="gcc"
  724. break
  725. fi
  726. done
  727. IFS="$ac_save_ifs"
  728. fi
  729. CC="$ac_cv_prog_CC"
  730. if test -n "$CC"; then
  731. echo "$ac_t""$CC" 1>&6
  732. else
  733. echo "$ac_t""no" 1>&6
  734. fi
  735. if test -z "$CC"; then
  736. # Extract the first word of "cc", so it can be a program name with args.
  737. set dummy cc; ac_word=$2
  738. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  739. echo "configure:816: checking for $ac_word" >&5
  740. if test -n "$CC"; then
  741. ac_cv_prog_CC="$CC" # Let the user override the test.
  742. else
  743. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  744. ac_prog_rejected=no
  745. ac_dummy="$PATH"
  746. for ac_dir in $ac_dummy; do
  747. test -z "$ac_dir" && ac_dir=.
  748. if test -f $ac_dir/$ac_word; then
  749. if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  750. ac_prog_rejected=yes
  751. continue
  752. fi
  753. ac_cv_prog_CC="cc"
  754. break
  755. fi
  756. done
  757. IFS="$ac_save_ifs"
  758. if test $ac_prog_rejected = yes; then
  759. # We found a bogon in the path, so make sure we never use it.
  760. set dummy $ac_cv_prog_CC
  761. shift
  762. if test $# -gt 0; then
  763. # We chose a different compiler from the bogus one.
  764. # However, it has the same basename, so the bogon will be chosen
  765. # first if we set CC to just the basename; use the full file name.
  766. shift
  767. set dummy "$ac_dir/$ac_word" "$@"
  768. shift
  769. ac_cv_prog_CC="$@"
  770. fi
  771. fi
  772. fi
  773. CC="$ac_cv_prog_CC"
  774. if test -n "$CC"; then
  775. echo "$ac_t""$CC" 1>&6
  776. else
  777. echo "$ac_t""no" 1>&6
  778. fi
  779. if test -z "$CC"; then
  780. case "`uname -s`" in
  781. *win32* | *WIN32*)
  782. # Extract the first word of "cl", so it can be a program name with args.
  783. set dummy cl; ac_word=$2
  784. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  785. echo "configure:864: checking for $ac_word" >&5
  786. if test -n "$CC"; then
  787. ac_cv_prog_CC="$CC" # Let the user override the test.
  788. else
  789. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  790. ac_dummy="$PATH"
  791. for ac_dir in $ac_dummy; do
  792. test -z "$ac_dir" && ac_dir=.
  793. if test -f $ac_dir/$ac_word; then
  794. ac_cv_prog_CC="cl"
  795. break
  796. fi
  797. done
  798. IFS="$ac_save_ifs"
  799. fi
  800. CC="$ac_cv_prog_CC"
  801. if test -n "$CC"; then
  802. echo "$ac_t""$CC" 1>&6
  803. else
  804. echo "$ac_t""no" 1>&6
  805. fi
  806. ;;
  807. esac
  808. fi
  809. test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  810. fi
  811. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  812. echo "configure:893: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  813. ac_ext=c
  814. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  815. ac_cpp='$CPP $CPPFLAGS'
  816. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  817. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  818. cross_compiling=$ac_cv_prog_cc_cross
  819. cat > conftest.$ac_ext << EOF
  820. #line 904 "configure"
  821. #include "confdefs.h"
  822. main(){return(0);}
  823. EOF
  824. if { (eval echo configure:909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  825. ac_cv_prog_cc_works=yes
  826. # If we can't run a trivial program, we are probably using a cross compiler.
  827. if (./conftest; exit) 2>/dev/null; then
  828. ac_cv_prog_cc_cross=no
  829. else
  830. ac_cv_prog_cc_cross=yes
  831. fi
  832. else
  833. echo "configure: failed program was:" >&5
  834. cat conftest.$ac_ext >&5
  835. ac_cv_prog_cc_works=no
  836. fi
  837. rm -fr conftest*
  838. ac_ext=c
  839. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  840. ac_cpp='$CPP $CPPFLAGS'
  841. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  842. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  843. cross_compiling=$ac_cv_prog_cc_cross
  844. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  845. if test $ac_cv_prog_cc_works = no; then
  846. { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  847. fi
  848. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  849. echo "configure:935: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  850. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  851. cross_compiling=$ac_cv_prog_cc_cross
  852. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  853. echo "configure:940: checking whether we are using GNU C" >&5
  854. cat > conftest.c <<EOF
  855. #ifdef __GNUC__
  856. yes;
  857. #endif
  858. EOF
  859. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  860. ac_cv_prog_gcc=yes
  861. else
  862. ac_cv_prog_gcc=no
  863. fi
  864. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  865. if test $ac_cv_prog_gcc = yes; then
  866. GCC=yes
  867. else
  868. GCC=
  869. fi
  870. ac_test_CFLAGS="${CFLAGS+set}"
  871. ac_save_CFLAGS="$CFLAGS"
  872. CFLAGS=
  873. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  874. echo "configure:965: checking whether ${CC-cc} accepts -g" >&5
  875. echo 'void f(){}' > conftest.c
  876. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  877. ac_cv_prog_cc_g=yes
  878. else
  879. ac_cv_prog_cc_g=no
  880. fi
  881. rm -f conftest*
  882. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  883. if test "$ac_test_CFLAGS" = set; then
  884. CFLAGS="$ac_save_CFLAGS"
  885. elif test $ac_cv_prog_cc_g = yes; then
  886. if test "$GCC" = yes; then
  887. CFLAGS="-g -O2"
  888. else
  889. CFLAGS="-g"
  890. fi
  891. else
  892. if test "$GCC" = yes; then
  893. CFLAGS="-O2"
  894. else
  895. CFLAGS=
  896. fi
  897. fi
  898. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  899. echo "configure:994: checking for Cygwin environment" >&5
  900. cat > conftest.$ac_ext <<EOF
  901. #line 997 "configure"
  902. #include "confdefs.h"
  903. int main() {
  904. #ifndef __CYGWIN__
  905. #define __CYGWIN__ __CYGWIN32__
  906. #endif
  907. return __CYGWIN__;
  908. ; return 0; }
  909. EOF
  910. if { (eval echo configure:1008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  911. rm -rf conftest*
  912. ac_cv_cygwin=yes
  913. else
  914. echo "configure: failed program was:" >&5
  915. cat conftest.$ac_ext >&5
  916. rm -rf conftest*
  917. ac_cv_cygwin=no
  918. fi
  919. rm -f conftest*
  920. rm -f conftest*
  921. echo "$ac_t""$ac_cv_cygwin" 1>&6
  922. CYGWIN=
  923. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  924. echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
  925. echo "configure:1024: checking for mingw32 environment" >&5
  926. cat > conftest.$ac_ext <<EOF
  927. #line 1027 "configure"
  928. #include "confdefs.h"
  929. int main() {
  930. return __MINGW32__;
  931. ; return 0; }
  932. EOF
  933. if { (eval echo configure:1034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  934. rm -rf conftest*
  935. ac_cv_mingw32=yes
  936. else
  937. echo "configure: failed program was:" >&5
  938. cat conftest.$ac_ext >&5
  939. rm -rf conftest*
  940. ac_cv_mingw32=no
  941. fi
  942. rm -f conftest*
  943. rm -f conftest*
  944. echo "$ac_t""$ac_cv_mingw32" 1>&6
  945. MINGW32=
  946. test "$ac_cv_mingw32" = yes && MINGW32=yes
  947. echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
  948. echo "configure:1052: checking for executable suffix" >&5
  949. if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
  950. ac_cv_exeext=.exe
  951. else
  952. ac_cv_exeext=no
  953. fi
  954. EXEEXT=""
  955. test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
  956. echo "$ac_t""${ac_cv_exeext}" 1>&6
  957. ac_exeext=$EXEEXT
  958. # Set WINDRES
  959. if test "$MINGW32" = yes ; then
  960. WINDRES=${WINDRES-windres}
  961. else
  962. WINDRES=
  963. fi
  964. # Check for custom PKG_CONFIG
  965. PKG_CONFIG=${PKG_CONFIG-pkg-config}
  966. # Check for full floating-point support, including Infinity and NaN
  967. IEEEFLAG=
  968. echo $ac_n "checking for full floating-point support""... $ac_c" 1>&6
  969. echo "configure:1084: checking for full floating-point support" >&5
  970. if test "$cross_compiling" = yes; then
  971. echo "$ac_t""unknown (cross-compiling)" 1>&6
  972. echo $ac_n "checking whether "cc -mieee" works""... $ac_c" 1>&6
  973. echo "configure:1089: checking whether "cc -mieee" works" >&5
  974. ac_save_cflags=${CFLAGS}
  975. CFLAGS="$CFLAGS -mieee"
  976. cat > conftest.$ac_ext <<EOF
  977. #line 1093 "configure"
  978. #include "confdefs.h"
  979. int main() {
  980. ; return 0; }
  981. EOF
  982. if { (eval echo configure:1100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  983. rm -rf conftest*
  984. echo "$ac_t""yes" 1>&6
  985. IEEEFLAG="-mieee"
  986. else
  987. echo "configure: failed program was:" >&5
  988. cat conftest.$ac_ext >&5
  989. rm -rf conftest*
  990. echo "$ac_t""no" 1>&6
  991. fi
  992. rm -f conftest*
  993. CFLAGS=${ac_save_cflags}
  994. else
  995. cat > conftest.$ac_ext <<EOF
  996. #line 1116 "configure"
  997. #include "confdefs.h"
  998. #include <float.h>
  999. int main(void) {
  1000. double one = 1.0;
  1001. double zero = 0.0;
  1002. if (one/zero > DBL_MAX) /* infinity */
  1003. if (zero/zero != zero/zero) /* NaN */
  1004. return 0;
  1005. return 1;
  1006. }
  1007. EOF
  1008. if { (eval echo configure:1130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1009. then
  1010. echo "$ac_t""yes" 1>&6
  1011. else
  1012. echo "configure: failed program was:" >&5
  1013. cat conftest.$ac_ext >&5
  1014. rm -fr conftest*
  1015. echo "$ac_t""no" 1>&6
  1016. ac_save_cflags=${CFLAGS}
  1017. CFLAGS=-mieee
  1018. echo $ac_n "checking for full floating-point support with -mieee""... $ac_c" 1>&6
  1019. echo "configure:1143: checking for full floating-point support with -mieee" >&5
  1020. if test "$cross_compiling" = yes; then
  1021. echo "$ac_t""unknown (cross-compiling)" 1>&6
  1022. { echo "configure: error: *** INTERNAL CONFIGURE ERROR" 1>&2; exit 1; }
  1023. else
  1024. cat > conftest.$ac_ext <<EOF
  1025. #line 1150 "configure"
  1026. #include "confdefs.h"
  1027. #include <float.h>
  1028. int main(void) {
  1029. double one = 1.0;
  1030. double zero = 0.0;
  1031. if (one/zero > DBL_MAX) /* infinity */
  1032. if (zero/zero != zero/zero) /* NaN */
  1033. return 0;
  1034. return 1;
  1035. }
  1036. EOF
  1037. if { (eval echo configure:1164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1038. then
  1039. echo "$ac_t""yes" 1>&6
  1040. IEEEFLAG="-mieee"
  1041. else
  1042. echo "configure: failed program was:" >&5
  1043. cat conftest.$ac_ext >&5
  1044. rm -fr conftest*
  1045. echo "$ac_t""no" 1>&6
  1046. echo "configure: warning: *** Incomplete floating-point support." 1>&2
  1047. fi
  1048. rm -fr conftest*
  1049. fi
  1050. CFLAGS=${ac_save_cflags}
  1051. fi
  1052. rm -fr conftest*
  1053. fi
  1054. CFLAGS="$CFLAGS $IEEEFLAG"
  1055. # Set BINDIR
  1056. if test -n "${bindir}"; then
  1057. BINDIR="${bindir}"
  1058. else
  1059. BINDIR=/usr/local/bin
  1060. fi
  1061. # Set SRCDIR and DSTDIR
  1062. # Extract the first word of "pwd", so it can be a program name with args.
  1063. set dummy pwd; ac_word=$2
  1064. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1065. echo "configure:1201: checking for $ac_word" >&5
  1066. case "$pwd" in
  1067. /*)
  1068. ac_cv_path_pwd="$pwd" # Let the user override the test with a path.
  1069. ;;
  1070. ?:/*)
  1071. ac_cv_path_pwd="$pwd" # Let the user override the test with a dos path.
  1072. ;;
  1073. *)
  1074. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1075. ac_dummy="$PATH"
  1076. for ac_dir in $ac_dummy; do
  1077. test -z "$ac_dir" && ac_dir=.
  1078. if test -f $ac_dir/$ac_word; then
  1079. ac_cv_path_pwd="$ac_dir/$ac_word"
  1080. break
  1081. fi
  1082. done
  1083. IFS="$ac_save_ifs"
  1084. test -z "$ac_cv_path_pwd" && ac_cv_path_pwd="pwd"
  1085. ;;
  1086. esac
  1087. pwd="$ac_cv_path_pwd"
  1088. if test -n "$pwd"; then
  1089. echo "$ac_t""$pwd" 1>&6
  1090. else
  1091. echo "$ac_t""no" 1>&6
  1092. fi
  1093. if test "$MINGW32" = yes -a "$cross_compiling" != yes ; then
  1094. winpwd="pwd -W"
  1095. else
  1096. winpwd="$pwd"
  1097. fi
  1098. echo $ac_n "checking for source directory""... $ac_c" 1>&6
  1099. echo "configure:1239: checking for source directory" >&5
  1100. if test -z "$srcdir" ; then
  1101. SRCDIR=`$pwd`
  1102. else
  1103. SRCDIR=`(cd "$srcdir" ; $pwd)`
  1104. fi
  1105. echo "$ac_t"""$SRCDIR"" 1>&6
  1106. echo $ac_n "checking for build directory""... $ac_c" 1>&6
  1107. echo "configure:1250: checking for build directory" >&5
  1108. DSTDIR=`$pwd`
  1109. WINDSTDIR=`$winpwd`
  1110. echo "$ac_t"""$DSTDIR"" 1>&6
  1111. # Set ARCH
  1112. ARCH=
  1113. if test -z "${host}"; then
  1114. ARCH="unknown"
  1115. else
  1116. ARCH="${host}"
  1117. fi
  1118. # Use absolute path for aux directory so that install-sh works
  1119. ac_aux_dir=
  1120. for ac_dir in "$SRCDIR" $srcdir/"$SRCDIR"; do
  1121. if test -f $ac_dir/install-sh; then
  1122. ac_aux_dir=$ac_dir
  1123. ac_install_sh="$ac_aux_dir/install-sh -c"
  1124. break
  1125. elif test -f $ac_dir/install.sh; then
  1126. ac_aux_dir=$ac_dir
  1127. ac_install_sh="$ac_aux_dir/install.sh -c"
  1128. break
  1129. fi
  1130. done
  1131. if test -z "$ac_aux_dir"; then
  1132. { echo "configure: error: can not find install-sh or install.sh in "$SRCDIR" $srcdir/"$SRCDIR"" 1>&2; exit 1; }
  1133. fi
  1134. ac_config_guess=$ac_aux_dir/config.guess
  1135. ac_config_sub=$ac_aux_dir/config.sub
  1136. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  1137. # Set GISBASE and GRASS_BIN
  1138. GISBASE="${WINDSTDIR}/dist.${ARCH}"
  1139. GRASS_BIN="${DSTDIR}/bin.${ARCH}"
  1140. # Set GRASS_VERSION_*
  1141. GRASS_VERSION_FILE=include/VERSION
  1142. GRASS_VERSION_MAJOR=`sed -n 1p "${GRASS_VERSION_FILE}"`
  1143. GRASS_VERSION_MINOR=`sed -n 2p "${GRASS_VERSION_FILE}"`
  1144. GRASS_VERSION_RELEASE=`sed -n 3p "${GRASS_VERSION_FILE}"`
  1145. GRASS_VERSION_DATE=`sed -n 4p "${GRASS_VERSION_FILE}"`
  1146. GRASS_VERSION_NUMBER=`echo ${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}`
  1147. NAME_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/\..*//'`
  1148. LIB_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/^\([0-9.]*\).*$/\1/'`
  1149. GRASS_VERSION_GIT="exported"
  1150. # get git short hash + date of last change in GRASS headers
  1151. # (and anything else in include)
  1152. GRASS_HEADERS_GIT_HASH=`date -u +%FT%T%z | sed 's/\(..\)$/:\1/'`
  1153. GRASS_HEADERS_GIT_DATE=`date -u +%FT%T%z | sed 's/\(..\)$/:\1/'`
  1154. # Extract the first word of "git", so it can be a program name with args.
  1155. set dummy git; ac_word=$2
  1156. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1157. echo "configure:1322: checking for $ac_word" >&5
  1158. case "$GIT" in
  1159. /*)
  1160. ac_cv_path_GIT="$GIT" # Let the user override the test with a path.
  1161. ;;
  1162. ?:/*)
  1163. ac_cv_path_GIT="$GIT" # Let the user override the test with a dos path.
  1164. ;;
  1165. *)
  1166. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1167. ac_dummy="$PATH"
  1168. for ac_dir in $ac_dummy; do
  1169. test -z "$ac_dir" && ac_dir=.
  1170. if test -f $ac_dir/$ac_word; then
  1171. ac_cv_path_GIT="$ac_dir/$ac_word"
  1172. break
  1173. fi
  1174. done
  1175. IFS="$ac_save_ifs"
  1176. test -z "$ac_cv_path_GIT" && ac_cv_path_GIT="no"
  1177. ;;
  1178. esac
  1179. GIT="$ac_cv_path_GIT"
  1180. if test -n "$GIT"; then
  1181. echo "$ac_t""$GIT" 1>&6
  1182. else
  1183. echo "$ac_t""no" 1>&6
  1184. fi
  1185. if test "$GIT" != "no" ; then
  1186. GRASS_VERSION_GIT=`$GIT rev-parse --short HEAD 2>/dev/null`
  1187. if test -z "$GRASS_VERSION_GIT"; then
  1188. GRASS_VERSION_GIT="exported"
  1189. fi
  1190. GRASS_HEADERS_GIT_HASH=`$GIT log -1 --pretty=format:"%h" -- "${SRCDIR}/include" 2>/dev/null`
  1191. if test -z "$GRASS_HEADERS_GIT_HASH"; then
  1192. GRASS_HEADERS_GIT_HASH=`date -u +%FT%T%z | sed 's/\(..\)$/:\1/'`
  1193. fi
  1194. GRASS_HEADERS_GIT_DATE=`date -d $($GIT log -1 --pretty=format:"%cI" -- "${SRCDIR}/include") -u +%FT%T%z | sed 's/\(..\)$/:\1/'` 2>/dev/null
  1195. if test -z "$GRASS_HEADERS_GIT_DATE"; then
  1196. GRASS_HEADERS_GIT_DATE=`date -u +%FT%T%z | sed 's/\(..\)$/:\1/'`
  1197. fi
  1198. fi
  1199. # Check for MacOSX App
  1200. # Check whether --enable-macosx-app or --disable-macosx-app was given.
  1201. if test "${enable_macosx_app+set}" = set; then
  1202. enableval="$enable_macosx_app"
  1203. :
  1204. else
  1205. enable_macosx_app=no
  1206. fi
  1207. echo $ac_n "checking for MacOSX App""... $ac_c" 1>&6
  1208. echo "configure:1391: checking for MacOSX App" >&5
  1209. case "$enable_macosx_app" in
  1210. yes) MACOSX_APP=1 ;;
  1211. no) MACOSX_APP= ;;
  1212. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  1213. esac
  1214. echo "$ac_t"""$enable_macosx_app"" 1>&6
  1215. # Check for MacOSX archs
  1216. echo $ac_n "checking for MacOSX architectures""... $ac_c" 1>&6
  1217. echo "configure:1403: checking for MacOSX architectures" >&5
  1218. MACOSX_ARCHS=
  1219. if test -z "$with_macosx_archs" ; then
  1220. echo "$ac_t""no" 1>&6
  1221. else
  1222. for a in $with_macosx_archs
  1223. do
  1224. # check if valid arch?
  1225. case "$a" in
  1226. i386|ppc|x86_64|ppc64)
  1227. MACOSX_ARCHS="$MACOSX_ARCHS -arch $a"
  1228. ;;
  1229. esac
  1230. done
  1231. echo "$ac_t""$MACOSX_ARCHS" 1>&6
  1232. LDFLAGS="$LDFLAGS $MACOSX_ARCHS"
  1233. CFLAGS="$CFLAGS $MACOSX_ARCHS"
  1234. CXXFLAGS="$CXXFLAGS $MACOSX_ARCHS"
  1235. fi
  1236. # Done checking MacOSX archs
  1237. # Check for MacOSX SDK
  1238. echo $ac_n "checking for MacOSX SDK""... $ac_c" 1>&6
  1239. echo "configure:1432: checking for MacOSX SDK" >&5
  1240. MACOSX_SDK=
  1241. if test -z "$with_macosx_sdk" ; then
  1242. echo "$ac_t""no" 1>&6
  1243. else
  1244. ac_safe=`echo "$with_macosx_sdk/SDKSettings.plist" | sed 'y%./+-%__p_%'`
  1245. echo $ac_n "checking for $with_macosx_sdk/SDKSettings.plist""... $ac_c" 1>&6
  1246. echo "configure:1442: checking for $with_macosx_sdk/SDKSettings.plist" >&5
  1247. if test "$cross_compiling" = yes; then
  1248. { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
  1249. else
  1250. if test -r $with_macosx_sdk/SDKSettings.plist; then
  1251. eval "ac_cv_file_$ac_safe=yes"
  1252. else
  1253. eval "ac_cv_file_$ac_safe=no"
  1254. fi
  1255. fi
  1256. if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  1257. echo "$ac_t""yes" 1>&6
  1258. MACOSX_SDK="-isysroot $with_macosx_sdk"
  1259. else
  1260. echo "$ac_t""no" 1>&6
  1261. { echo "configure: error: *** specified SDK does not exist or is not a SDK" 1>&2; exit 1; }
  1262. fi
  1263. LDFLAGS="$LDFLAGS $MACOSX_SDK"
  1264. CFLAGS="$CFLAGS $MACOSX_SDK"
  1265. CXXFLAGS="$CXXFLAGS $MACOSX_SDK"
  1266. fi
  1267. # Done checking MacOSX SDK
  1268. # Set INST_DIR
  1269. if test -n "$MACOSX_APP" ; then
  1270. INSTDIR='${prefix}'"/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app/Contents/MacOS"
  1271. else
  1272. INSTDIR='${prefix}'"/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}"
  1273. fi
  1274. # Get flags for building shared libraries
  1275. echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
  1276. echo "configure:1486: checking how to build libraries" >&5
  1277. # Check whether --enable-shared or --disable-shared was given.
  1278. if test "${enable_shared+set}" = set; then
  1279. enableval="$enable_shared"
  1280. shared_ok=$enableval
  1281. else
  1282. shared_ok=yes
  1283. fi
  1284. if test "${enable_shared+set}" = set; then
  1285. enableval="$enable_shared"
  1286. shared_ok=$enableval
  1287. else
  1288. shared_ok=yes
  1289. fi
  1290. if test "$shared_ok" = "yes" ; then
  1291. echo "$ac_t""shared" 1>&6
  1292. SHARED_BUILD=1
  1293. GRASS_LIBRARY_TYPE='shlib'
  1294. else
  1295. echo "$ac_t""static" 1>&6
  1296. SHARED_BUILD=0
  1297. cat >> confdefs.h <<\EOF
  1298. #define STATIC_BUILD 1
  1299. EOF
  1300. GRASS_LIBRARY_TYPE='stlib'
  1301. fi
  1302. ac_save_ldflags="$LDFLAGS"
  1303. SHLIB_CFLAGS=""
  1304. SHLIB_LD_FLAGS=""
  1305. SHLIB_SUFFIX=""
  1306. SHLIB_LD=""
  1307. STLIB_LD='${AR} cr'
  1308. STLIB_SUFFIX='.a'
  1309. GRASS_TRIM_DOTS='`echo ${LIB_VER} | tr -d .`'
  1310. GRASS_LIB_VERSIONS_OK=ok
  1311. LDFLAGS=""
  1312. LD_SEARCH_FLAGS=""
  1313. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1314. case $host in
  1315. *-linux-* | *-gnu* | *-kfreebsd*-gnu)
  1316. SHLIB_CFLAGS="-fPIC"
  1317. SHLIB_LD_FLAGS="-Wl,-soname,\$(notdir \$@)"
  1318. SHLIB_SUFFIX=".so"
  1319. SHLIB_LD="${CC} -shared"
  1320. LDFLAGS="-Wl,--export-dynamic"
  1321. LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
  1322. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1323. ;;
  1324. *-pc-cygwin)
  1325. SHLIB_SUFFIX=".dll"
  1326. SHLIB_LD="${CC} -shared"
  1327. LDFLAGS="-Wl,--export-dynamic"
  1328. LD_LIBRARY_PATH_VAR="PATH"
  1329. ;;
  1330. *-pc-mingw32 | *-w64-mingw32 | *-pc-msys)
  1331. SHLIB_SUFFIX=".dll"
  1332. SHLIB_LD="${CC} -shared"
  1333. LDFLAGS="-Wl,--export-dynamic,--enable-runtime-pseudo-reloc"
  1334. LD_LIBRARY_PATH_VAR="PATH"
  1335. ;;
  1336. *-apple-darwin*)
  1337. SHLIB_CFLAGS="-fno-common"
  1338. SHLIB_SUFFIX=".dylib"
  1339. SHLIB_LD="${CC} -dynamiclib -compatibility_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -current_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -install_name @rpath/lib\${LIB_NAME}\${SHLIB_SUFFIX}"
  1340. LDFLAGS="-Wl,-rpath,${INSTDIR}/lib,-rpath,\${GISBASE}/lib"
  1341. LD_LIBRARY_PATH_VAR="LD_RUN_PATH"
  1342. ;;
  1343. *-sun-solaris*)
  1344. # Note: If _REENTRANT isn't defined, then Solaris
  1345. # won't define thread-safe library routines.
  1346. cat >> confdefs.h <<\EOF
  1347. #define _REENTRANT 1
  1348. EOF
  1349. cat >> confdefs.h <<\EOF
  1350. #define _POSIX_PTHREAD_SEMANTICS 1
  1351. EOF
  1352. # Note: need the LIBS below, otherwise Tk won't find Tcl's
  1353. # symbols when dynamically loaded into tclsh.
  1354. if test "$GCC" = "yes" ; then
  1355. SHLIB_CFLAGS="-fPIC"
  1356. SHLIB_LD="$CC -shared"
  1357. LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1358. else
  1359. SHLIB_CFLAGS="-KPIC"
  1360. SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1361. LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1362. fi
  1363. SHLIB_SUFFIX=".so"
  1364. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1365. ;;
  1366. *-solaris2*)
  1367. # Note: Solaris is as of 2010 Oracle Solaris, not Sun Solaris
  1368. # Oracle Solaris derives from Solaris 2
  1369. # derives from SunOS 5
  1370. # derives from UNIX System V Release 4
  1371. # Note: If _REENTRANT isn't defined, then Solaris
  1372. # won't define thread-safe library routines.
  1373. cat >> confdefs.h <<\EOF
  1374. #define _REENTRANT 1
  1375. EOF
  1376. cat >> confdefs.h <<\EOF
  1377. #define _POSIX_PTHREAD_SEMANTICS 1
  1378. EOF
  1379. # Note: need the LIBS below, otherwise Tk won't find Tcl's
  1380. # symbols when dynamically loaded into tclsh.
  1381. if test "$GCC" = "yes" ; then
  1382. SHLIB_CFLAGS="-fPIC"
  1383. SHLIB_LD="$CC -shared"
  1384. LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1385. else
  1386. SHLIB_CFLAGS="-KPIC"
  1387. SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1388. LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1389. fi
  1390. SHLIB_SUFFIX=".so"
  1391. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1392. ;;
  1393. *-freebsd*)
  1394. # NOTE: only FreeBSD 4+ is supported
  1395. # FreeBSD 3.* and greater have ELF.
  1396. SHLIB_CFLAGS="-fPIC"
  1397. #SHLIB_LD="ld -Bshareable -x"
  1398. SHLIB_LD="${CC} -shared"
  1399. SHLIB_LD_FLAGS="-Wl,-soname,\$(notdir \$@)"
  1400. SHLIB_SUFFIX=".so"
  1401. LDFLAGS="-export-dynamic"
  1402. #LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1403. LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
  1404. # TODO: add optional pthread support with any combination of:
  1405. # CFLAGS="$CFLAGS -pthread"
  1406. # LDFLAGS="$LDFLAGS -lpthread"
  1407. # AC_DEFINE(_REENTRANT)
  1408. # AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
  1409. ;;
  1410. *-netbsd*)
  1411. # NetBSD has ELF.
  1412. SHLIB_CFLAGS="-fPIC"
  1413. SHLIB_LD="${CC} -shared"
  1414. SHLIB_LD_LIBS="${LIBS}"
  1415. LDFLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
  1416. SHLIB_LD_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
  1417. LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -L${LIB_RUNTIME_DIR}'
  1418. # some older NetBSD versions do not handle version numbers with dots.
  1419. #STLIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
  1420. #SHLIB_SUFFIX='${GRASS_TRIM_DOTS}.so'
  1421. #GRASS_LIB_VERSIONS_OK=nodots
  1422. # NetBSD 6 does handle version numbers with dots.
  1423. STLIB_SUFFIX=".a"
  1424. SHLIB_SUFFIX=".so"
  1425. # TODO: add optional pthread support with any combination of:
  1426. # CFLAGS="$CFLAGS -pthread"
  1427. # LDFLAGS="$LDFLAGS -lpthread"
  1428. # AC_DEFINE(_REENTRANT)
  1429. # AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
  1430. ;;
  1431. *aix*)
  1432. # NOTE: do we need to support aix < 6 ?
  1433. LIBS="$LIBS -lc"
  1434. SHLIB_CFLAGS=""
  1435. LDFLAGS=""
  1436. if test "$GCC" = "yes" ; then
  1437. SHLIB_CFLAGS="-fPIC"
  1438. SHLIB_LD="$CC -shared"
  1439. LD_SEARCH_FLAGS='-Wl,-bsvr4,-R,${LIB_RUNTIME_DIR}'
  1440. else
  1441. # assume xlc
  1442. SHLIB_CFLAGS="-qmkshrobj"
  1443. SHLIB_LD="$CC -shared"
  1444. LD_SEARCH_FLAGS='-Wl,-bsvr4,-R,${LIB_RUNTIME_DIR}'
  1445. fi
  1446. SHLIB_SUFFIX=".so"
  1447. LD_LIBRARY_PATH_VAR="LIBPATH"
  1448. GRASS_NEEDS_EXP_FILE=1
  1449. GRASS_EXPORT_FILE_SUFFIX='${LIB_VER}.exp'
  1450. ;;
  1451. *)
  1452. { echo "configure: error: ***Unknown platform: $host***" 1>&2; exit 1; }
  1453. ;;
  1454. esac
  1455. LDFLAGS="${ac_save_ldflags} $LDFLAGS"
  1456. # Enable options
  1457. # Check whether --enable-w11 or --disable-w11 was given.
  1458. if test "${enable_w11+set}" = set; then
  1459. enableval="$enable_w11"
  1460. :
  1461. else
  1462. enable_w11=no
  1463. fi
  1464. # With options
  1465. # Check whether --with-cxx or --without-cxx was given.
  1466. if test "${with_cxx+set}" = set; then
  1467. withval="$with_cxx"
  1468. :
  1469. else
  1470. with_cxx=yes
  1471. fi
  1472. #LOC_ARG_WITH(g77, GNU Fortran 77, no)
  1473. # Check whether --with-macosx-archs or --without-macosx-archs was given.
  1474. if test "${with_macosx_archs+set}" = set; then
  1475. withval="$with_macosx_archs"
  1476. :
  1477. else
  1478. with_macosx_archs="no"
  1479. fi
  1480. # Check whether --with-macosx-sdk or --without-macosx-sdk was given.
  1481. if test "${with_macosx_sdk+set}" = set; then
  1482. withval="$with_macosx_sdk"
  1483. :
  1484. else
  1485. with_macosx_sdk="no"
  1486. fi
  1487. # Check whether --with-tiff or --without-tiff was given.
  1488. if test "${with_tiff+set}" = set; then
  1489. withval="$with_tiff"
  1490. :
  1491. else
  1492. with_tiff=yes
  1493. fi
  1494. # Check whether --with-png or --without-png was given.
  1495. if test "${with_png+set}" = set; then
  1496. withval="$with_png"
  1497. :
  1498. else
  1499. with_png=yes
  1500. fi
  1501. # Check whether --with-postgres or --without-postgres was given.
  1502. if test "${with_postgres+set}" = set; then
  1503. withval="$with_postgres"
  1504. :
  1505. else
  1506. with_postgres=no
  1507. fi
  1508. # Check whether --with-mysql or --without-mysql was given.
  1509. if test "${with_mysql+set}" = set; then
  1510. withval="$with_mysql"
  1511. :
  1512. else
  1513. with_mysql=no
  1514. fi
  1515. # Check whether --with-sqlite or --without-sqlite was given.
  1516. if test "${with_sqlite+set}" = set; then
  1517. withval="$with_sqlite"
  1518. :
  1519. else
  1520. with_sqlite=yes
  1521. fi
  1522. # Check whether --with-opengl or --without-opengl was given.
  1523. if test "${with_opengl+set}" = set; then
  1524. withval="$with_opengl"
  1525. :
  1526. else
  1527. with_opengl=yes
  1528. fi
  1529. # Check whether --with-odbc or --without-odbc was given.
  1530. if test "${with_odbc+set}" = set; then
  1531. withval="$with_odbc"
  1532. :
  1533. else
  1534. with_odbc=no
  1535. fi
  1536. # Check whether --with-fftw or --without-fftw was given.
  1537. if test "${with_fftw+set}" = set; then
  1538. withval="$with_fftw"
  1539. :
  1540. else
  1541. with_fftw=yes
  1542. fi
  1543. # Check whether --with-blas or --without-blas was given.
  1544. if test "${with_blas+set}" = set; then
  1545. withval="$with_blas"
  1546. :
  1547. else
  1548. with_blas=no
  1549. fi
  1550. # Check whether --with-lapack or --without-lapack was given.
  1551. if test "${with_lapack+set}" = set; then
  1552. withval="$with_lapack"
  1553. :
  1554. else
  1555. with_lapack=no
  1556. fi
  1557. # Check whether --with-cairo or --without-cairo was given.
  1558. if test "${with_cairo+set}" = set; then
  1559. withval="$with_cairo"
  1560. :
  1561. else
  1562. with_cairo=yes
  1563. fi
  1564. # Check whether --with-freetype or --without-freetype was given.
  1565. if test "${with_freetype+set}" = set; then
  1566. withval="$with_freetype"
  1567. :
  1568. else
  1569. with_freetype=yes
  1570. fi
  1571. # Check whether --with-nls or --without-nls was given.
  1572. if test "${with_nls+set}" = set; then
  1573. withval="$with_nls"
  1574. :
  1575. else
  1576. with_nls=no
  1577. fi
  1578. # Check whether --with-readline or --without-readline was given.
  1579. if test "${with_readline+set}" = set; then
  1580. withval="$with_readline"
  1581. :
  1582. else
  1583. with_readline=no
  1584. fi
  1585. # Check whether --with-opendwg or --without-opendwg was given.
  1586. if test "${with_opendwg+set}" = set; then
  1587. withval="$with_opendwg"
  1588. :
  1589. else
  1590. with_opendwg=no
  1591. fi
  1592. # Check whether --with-regex or --without-regex was given.
  1593. if test "${with_regex+set}" = set; then
  1594. withval="$with_regex"
  1595. :
  1596. else
  1597. with_regex=yes
  1598. fi
  1599. # Check whether --with-pthread or --without-pthread was given.
  1600. if test "${with_pthread+set}" = set; then
  1601. withval="$with_pthread"
  1602. :
  1603. else
  1604. with_pthread=no
  1605. fi
  1606. # Check whether --with-openmp or --without-openmp was given.
  1607. if test "${with_openmp+set}" = set; then
  1608. withval="$with_openmp"
  1609. :
  1610. else
  1611. with_openmp=no
  1612. fi
  1613. # Check whether --with-opencl or --without-opencl was given.
  1614. if test "${with_opencl+set}" = set; then
  1615. withval="$with_opencl"
  1616. :
  1617. else
  1618. with_opencl=no
  1619. fi
  1620. # Check whether --with-bzlib or --without-bzlib was given.
  1621. if test "${with_bzlib+set}" = set; then
  1622. withval="$with_bzlib"
  1623. :
  1624. else
  1625. with_bzlib=no
  1626. fi
  1627. # Check whether --with-zstd or --without-zstd was given.
  1628. if test "${with_zstd+set}" = set; then
  1629. withval="$with_zstd"
  1630. :
  1631. else
  1632. with_zstd=yes
  1633. fi
  1634. # Check whether --with-gdal or --without-gdal was given.
  1635. if test "${with_gdal+set}" = set; then
  1636. withval="$with_gdal"
  1637. :
  1638. fi
  1639. # Check whether --with-liblas or --without-liblas was given.
  1640. if test "${with_liblas+set}" = set; then
  1641. withval="$with_liblas"
  1642. :
  1643. else
  1644. with_liblas="no"
  1645. fi
  1646. # Check whether --with-pdal or --without-pdal was given.
  1647. if test "${with_pdal+set}" = set; then
  1648. withval="$with_pdal"
  1649. :
  1650. else
  1651. with_pdal="no"
  1652. fi
  1653. # Check whether --with-wxwidgets or --without-wxwidgets was given.
  1654. if test "${with_wxwidgets+set}" = set; then
  1655. withval="$with_wxwidgets"
  1656. :
  1657. else
  1658. with_wxwidgets="no"
  1659. fi
  1660. # Check whether --with-netcdf or --without-netcdf was given.
  1661. if test "${with_netcdf+set}" = set; then
  1662. withval="$with_netcdf"
  1663. :
  1664. else
  1665. with_netcdf="no"
  1666. fi
  1667. # With includes and libs options
  1668. # Check whether --with-geos or --without-geos was given.
  1669. if test "${with_geos+set}" = set; then
  1670. withval="$with_geos"
  1671. :
  1672. else
  1673. with_geos="no"
  1674. fi
  1675. # Check whether --with-includes or --without-includes was given.
  1676. if test "${with_includes+set}" = set; then
  1677. withval="$with_includes"
  1678. :
  1679. fi
  1680. # Check whether --with-libs or --without-libs was given.
  1681. if test "${with_libs+set}" = set; then
  1682. withval="$with_libs"
  1683. :
  1684. fi
  1685. # Check whether --with-zlib-includes or --without-zlib-includes was given.
  1686. if test "${with_zlib_includes+set}" = set; then
  1687. withval="$with_zlib_includes"
  1688. :
  1689. fi
  1690. # Check whether --with-zlib-libs or --without-zlib-libs was given.
  1691. if test "${with_zlib_libs+set}" = set; then
  1692. withval="$with_zlib_libs"
  1693. :
  1694. fi
  1695. # Check whether --with-bzlib-includes or --without-bzlib-includes was given.
  1696. if test "${with_bzlib_includes+set}" = set; then
  1697. withval="$with_bzlib_includes"
  1698. :
  1699. fi
  1700. # Check whether --with-bzlib-libs or --without-bzlib-libs was given.
  1701. if test "${with_bzlib_libs+set}" = set; then
  1702. withval="$with_bzlib_libs"
  1703. :
  1704. fi
  1705. # Check whether --with-zstd-includes or --without-zstd-includes was given.
  1706. if test "${with_zstd_includes+set}" = set; then
  1707. withval="$with_zstd_includes"
  1708. :
  1709. fi
  1710. # Check whether --with-zstd-libs or --without-zstd-libs was given.
  1711. if test "${with_zstd_libs+set}" = set; then
  1712. withval="$with_zstd_libs"
  1713. :
  1714. fi
  1715. # Check whether --with-readline-includes or --without-readline-includes was given.
  1716. if test "${with_readline_includes+set}" = set; then
  1717. withval="$with_readline_includes"
  1718. :
  1719. fi
  1720. # Check whether --with-readline-libs or --without-readline-libs was given.
  1721. if test "${with_readline_libs+set}" = set; then
  1722. withval="$with_readline_libs"
  1723. :
  1724. fi
  1725. # Check whether --with-tiff-includes or --without-tiff-includes was given.
  1726. if test "${with_tiff_includes+set}" = set; then
  1727. withval="$with_tiff_includes"
  1728. :
  1729. fi
  1730. # Check whether --with-tiff-libs or --without-tiff-libs was given.
  1731. if test "${with_tiff_libs+set}" = set; then
  1732. withval="$with_tiff_libs"
  1733. :
  1734. fi
  1735. # Check whether --with-png-includes or --without-png-includes was given.
  1736. if test "${with_png_includes+set}" = set; then
  1737. withval="$with_png_includes"
  1738. :
  1739. fi
  1740. # Check whether --with-png-libs or --without-png-libs was given.
  1741. if test "${with_png_libs+set}" = set; then
  1742. withval="$with_png_libs"
  1743. :
  1744. fi
  1745. # Check whether --with-postgres-includes or --without-postgres-includes was given.
  1746. if test "${with_postgres_includes+set}" = set; then
  1747. withval="$with_postgres_includes"
  1748. :
  1749. fi
  1750. # Check whether --with-postgres-libs or --without-postgres-libs was given.
  1751. if test "${with_postgres_libs+set}" = set; then
  1752. withval="$with_postgres_libs"
  1753. :
  1754. fi
  1755. # Check whether --with-mysql-includes or --without-mysql-includes was given.
  1756. if test "${with_mysql_includes+set}" = set; then
  1757. withval="$with_mysql_includes"
  1758. :
  1759. fi
  1760. # Check whether --with-mysql-libs or --without-mysql-libs was given.
  1761. if test "${with_mysql_libs+set}" = set; then
  1762. withval="$with_mysql_libs"
  1763. :
  1764. fi
  1765. # Check whether --with-sqlite-includes or --without-sqlite-includes was given.
  1766. if test "${with_sqlite_includes+set}" = set; then
  1767. withval="$with_sqlite_includes"
  1768. :
  1769. fi
  1770. # Check whether --with-sqlite-libs or --without-sqlite-libs was given.
  1771. if test "${with_sqlite_libs+set}" = set; then
  1772. withval="$with_sqlite_libs"
  1773. :
  1774. fi
  1775. # Check whether --with-opengl-includes or --without-opengl-includes was given.
  1776. if test "${with_opengl_includes+set}" = set; then
  1777. withval="$with_opengl_includes"
  1778. :
  1779. fi
  1780. # Check whether --with-opengl-libs or --without-opengl-libs was given.
  1781. if test "${with_opengl_libs+set}" = set; then
  1782. withval="$with_opengl_libs"
  1783. :
  1784. fi
  1785. # Check whether --with-opengl-framework or --without-opengl-framework was given.
  1786. if test "${with_opengl_framework+set}" = set; then
  1787. withval="$with_opengl_framework"
  1788. :
  1789. fi
  1790. # Check whether --with-odbc-includes or --without-odbc-includes was given.
  1791. if test "${with_odbc_includes+set}" = set; then
  1792. withval="$with_odbc_includes"
  1793. :
  1794. fi
  1795. # Check whether --with-odbc-libs or --without-odbc-libs was given.
  1796. if test "${with_odbc_libs+set}" = set; then
  1797. withval="$with_odbc_libs"
  1798. :
  1799. fi
  1800. # Check whether --with-fftw-includes or --without-fftw-includes was given.
  1801. if test "${with_fftw_includes+set}" = set; then
  1802. withval="$with_fftw_includes"
  1803. :
  1804. fi
  1805. # Check whether --with-fftw-libs or --without-fftw-libs was given.
  1806. if test "${with_fftw_libs+set}" = set; then
  1807. withval="$with_fftw_libs"
  1808. :
  1809. fi
  1810. # Check whether --with-blas-includes or --without-blas-includes was given.
  1811. if test "${with_blas_includes+set}" = set; then
  1812. withval="$with_blas_includes"
  1813. :
  1814. fi
  1815. # Check whether --with-blas-libs or --without-blas-libs was given.
  1816. if test "${with_blas_libs+set}" = set; then
  1817. withval="$with_blas_libs"
  1818. :
  1819. fi
  1820. # Check whether --with-lapack-includes or --without-lapack-includes was given.
  1821. if test "${with_lapack_includes+set}" = set; then
  1822. withval="$with_lapack_includes"
  1823. :
  1824. fi
  1825. # Check whether --with-lapack-libs or --without-lapack-libs was given.
  1826. if test "${with_lapack_libs+set}" = set; then
  1827. withval="$with_lapack_libs"
  1828. :
  1829. fi
  1830. # Check whether --with-cairo-includes or --without-cairo-includes was given.
  1831. if test "${with_cairo_includes+set}" = set; then
  1832. withval="$with_cairo_includes"
  1833. :
  1834. fi
  1835. # Check whether --with-cairo-libs or --without-cairo-libs was given.
  1836. if test "${with_cairo_libs+set}" = set; then
  1837. withval="$with_cairo_libs"
  1838. :
  1839. fi
  1840. # Check whether --with-cairo-ldflags or --without-cairo-ldflags was given.
  1841. if test "${with_cairo_ldflags+set}" = set; then
  1842. withval="$with_cairo_ldflags"
  1843. :
  1844. fi
  1845. # Check whether --with-freetype-includes or --without-freetype-includes was given.
  1846. if test "${with_freetype_includes+set}" = set; then
  1847. withval="$with_freetype_includes"
  1848. :
  1849. fi
  1850. # Check whether --with-freetype-libs or --without-freetype-libs was given.
  1851. if test "${with_freetype_libs+set}" = set; then
  1852. withval="$with_freetype_libs"
  1853. :
  1854. fi
  1855. # Check whether --with-proj-includes or --without-proj-includes was given.
  1856. if test "${with_proj_includes+set}" = set; then
  1857. withval="$with_proj_includes"
  1858. :
  1859. fi
  1860. # Check whether --with-proj-libs or --without-proj-libs was given.
  1861. if test "${with_proj_libs+set}" = set; then
  1862. withval="$with_proj_libs"
  1863. :
  1864. fi
  1865. # Check whether --with-proj-share or --without-proj-share was given.
  1866. if test "${with_proj_share+set}" = set; then
  1867. withval="$with_proj_share"
  1868. :
  1869. fi
  1870. # Check whether --with-opendwg-includes or --without-opendwg-includes was given.
  1871. if test "${with_opendwg_includes+set}" = set; then
  1872. withval="$with_opendwg_includes"
  1873. :
  1874. fi
  1875. # Check whether --with-opendwg-libs or --without-opendwg-libs was given.
  1876. if test "${with_opendwg_libs+set}" = set; then
  1877. withval="$with_opendwg_libs"
  1878. :
  1879. fi
  1880. # Check whether --with-regex-includes or --without-regex-includes was given.
  1881. if test "${with_regex_includes+set}" = set; then
  1882. withval="$with_regex_includes"
  1883. :
  1884. fi
  1885. # Check whether --with-regex-libs or --without-regex-libs was given.
  1886. if test "${with_regex_libs+set}" = set; then
  1887. withval="$with_regex_libs"
  1888. :
  1889. fi
  1890. # Check whether --with-pthread-includes or --without-pthread-includes was given.
  1891. if test "${with_pthread_includes+set}" = set; then
  1892. withval="$with_pthread_includes"
  1893. :
  1894. fi
  1895. # Check whether --with-pthread-libs or --without-pthread-libs was given.
  1896. if test "${with_pthread_libs+set}" = set; then
  1897. withval="$with_pthread_libs"
  1898. :
  1899. fi
  1900. # Check whether --with-openmp-includes or --without-openmp-includes was given.
  1901. if test "${with_openmp_includes+set}" = set; then
  1902. withval="$with_openmp_includes"
  1903. :
  1904. fi
  1905. # Check whether --with-openmp-libs or --without-openmp-libs was given.
  1906. if test "${with_openmp_libs+set}" = set; then
  1907. withval="$with_openmp_libs"
  1908. :
  1909. fi
  1910. # Check whether --with-opencl-includes or --without-opencl-includes was given.
  1911. if test "${with_opencl_includes+set}" = set; then
  1912. withval="$with_opencl_includes"
  1913. :
  1914. fi
  1915. # Check whether --with-opencl-libs or --without-opencl-libs was given.
  1916. if test "${with_opencl_libs+set}" = set; then
  1917. withval="$with_opencl_libs"
  1918. :
  1919. fi
  1920. #LOC_ARG_WITH_FRAMEWORK(opencl, OpenCL)
  1921. # Put this early on so CPPFLAGS and LDFLAGS have any additional dirs
  1922. # With includes option
  1923. # Handle Fortran compiler choice
  1924. #LOC_CHECK_USE(g77, GNU Fortran 77, USE_G77)
  1925. # Done checking fortran
  1926. echo $ac_n "checking for additional include dirs""... $ac_c" 1>&6
  1927. echo "configure:2421: checking for additional include dirs" >&5
  1928. case "$with_includes" in
  1929. y | ye | yes | n | no)
  1930. { echo "configure: error: *** You must supply a directory to list --with-includes." 1>&2; exit 1; }
  1931. ;;
  1932. esac
  1933. echo "$ac_t""$with_includes" 1>&6
  1934. if test -n "$with_includes"; then
  1935. for dir in $with_includes; do
  1936. if test -d "$dir"; then
  1937. INCLUDE_DIRS="$INCLUDE_DIRS -I$dir"
  1938. else
  1939. { echo "configure: error: *** Include directory $dir does not exist." 1>&2; exit 1; }
  1940. fi
  1941. done
  1942. CPPFLAGS="$CPPFLAGS $INCLUDE_DIRS"
  1943. fi
  1944. # With libs option
  1945. echo $ac_n "checking for additional library dirs""... $ac_c" 1>&6
  1946. echo "configure:2444: checking for additional library dirs" >&5
  1947. case "$with_libs" in
  1948. y | ye | yes | n | no)
  1949. { echo "configure: error: *** You must supply a directory list to --with-libs." 1>&2; exit 1; }
  1950. ;;
  1951. esac
  1952. echo "$ac_t""$with_libs" 1>&6
  1953. if test -n "$with_libs"; then
  1954. for dir in $with_libs; do
  1955. if test -d "$dir"; then
  1956. LIBRARY_DIRS="$LIBRARY_DIRS -L$dir"
  1957. else
  1958. { echo "configure: error: *** Library directory $dir does not exist." 1>&2; exit 1; }
  1959. fi
  1960. done
  1961. LDFLAGS="$LDFLAGS $LIBRARY_DIRS"
  1962. fi
  1963. # Programs and standard headers, libraries, functions
  1964. # Find a good install program. We prefer a C program (faster),
  1965. # so one script is as good as another. But avoid the broken or
  1966. # incompatible versions:
  1967. # SysV /etc/install, /usr/sbin/install
  1968. # SunOS /usr/etc/install
  1969. # IRIX /sbin/install
  1970. # AIX /bin/install
  1971. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  1972. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  1973. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  1974. # ./install, which can be erroneously created by make from ./install.sh.
  1975. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  1976. echo "configure:2478: checking for a BSD compatible install" >&5
  1977. if test -z "$INSTALL"; then
  1978. IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
  1979. for ac_dir in $PATH; do
  1980. # Account for people who put trailing slashes in PATH elements.
  1981. case "$ac_dir/" in
  1982. /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  1983. *)
  1984. # OSF1 and SCO ODT 3.0 have their own names for install.
  1985. # Don't use installbsd from OSF since it installs stuff as root
  1986. # by default.
  1987. for ac_prog in ginstall scoinst install; do
  1988. if test -f $ac_dir/$ac_prog; then
  1989. if test $ac_prog = install &&
  1990. grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1991. # AIX install. It has an incompatible calling convention.
  1992. :
  1993. else
  1994. ac_cv_path_install="$ac_dir/$ac_prog -c"
  1995. break 2
  1996. fi
  1997. fi
  1998. done
  1999. ;;
  2000. esac
  2001. done
  2002. IFS="$ac_save_IFS"
  2003. if test "${ac_cv_path_install+set}" = set; then
  2004. INSTALL="$ac_cv_path_install"
  2005. else
  2006. # As a last resort, use the slow shell script. We don't cache a
  2007. # path for INSTALL within a source directory, because that will
  2008. # break other packages using the cache if that directory is
  2009. # removed, or if the path is relative.
  2010. INSTALL="$ac_install_sh"
  2011. fi
  2012. fi
  2013. echo "$ac_t""$INSTALL" 1>&6
  2014. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  2015. # It thinks the first close brace ends the variable substitution.
  2016. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  2017. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  2018. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  2019. # Extract the first word of "flex", so it can be a program name with args.
  2020. set dummy flex; ac_word=$2
  2021. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2022. echo "configure:2531: checking for $ac_word" >&5
  2023. if test -n "$LEX"; then
  2024. ac_cv_prog_LEX="$LEX" # Let the user override the test.
  2025. else
  2026. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2027. ac_dummy="$PATH"
  2028. for ac_dir in $ac_dummy; do
  2029. test -z "$ac_dir" && ac_dir=.
  2030. if test -f $ac_dir/$ac_word; then
  2031. ac_cv_prog_LEX="flex"
  2032. break
  2033. fi
  2034. done
  2035. IFS="$ac_save_ifs"
  2036. test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
  2037. fi
  2038. LEX="$ac_cv_prog_LEX"
  2039. if test -n "$LEX"; then
  2040. echo "$ac_t""$LEX" 1>&6
  2041. else
  2042. echo "$ac_t""no" 1>&6
  2043. fi
  2044. if test -z "$LEXLIB"
  2045. then
  2046. case "$LEX" in
  2047. flex*) ac_lib=fl ;;
  2048. *) ac_lib=l ;;
  2049. esac
  2050. echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
  2051. echo "configure:2562: checking for yywrap in -l$ac_lib" >&5
  2052. ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
  2053. ac_save_LIBS="$LIBS"
  2054. LIBS="-l$ac_lib $LIBS"
  2055. cat > conftest.$ac_ext <<EOF
  2056. #line 2568 "configure"
  2057. #include "confdefs.h"
  2058. /* Override any gcc2 internal prototype to avoid an error. */
  2059. /* We use char because int might match the return type of a gcc2
  2060. builtin and then its argument prototype would still apply. */
  2061. char yywrap();
  2062. int main() {
  2063. yywrap()
  2064. ; return 0; }
  2065. EOF
  2066. if { (eval echo configure:2579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2067. rm -rf conftest*
  2068. eval "ac_cv_lib_$ac_lib_var=yes"
  2069. else
  2070. echo "configure: failed program was:" >&5
  2071. cat conftest.$ac_ext >&5
  2072. rm -rf conftest*
  2073. eval "ac_cv_lib_$ac_lib_var=no"
  2074. fi
  2075. rm -f conftest*
  2076. LIBS="$ac_save_LIBS"
  2077. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2078. echo "$ac_t""yes" 1>&6
  2079. LEXLIB="-l$ac_lib"
  2080. else
  2081. echo "$ac_t""no" 1>&6
  2082. fi
  2083. fi
  2084. if test "$LEX" = "lex"; then
  2085. # Extract the first word of "lex", so it can be a program name with args.
  2086. set dummy lex; ac_word=$2
  2087. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2088. echo "configure:2604: checking for $ac_word" >&5
  2089. case "$LEXPATH" in
  2090. /*)
  2091. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a path.
  2092. ;;
  2093. ?:/*)
  2094. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a dos path.
  2095. ;;
  2096. *)
  2097. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2098. ac_dummy="$PATH"
  2099. for ac_dir in $ac_dummy; do
  2100. test -z "$ac_dir" && ac_dir=.
  2101. if test -f $ac_dir/$ac_word; then
  2102. ac_cv_path_LEXPATH="$ac_dir/$ac_word"
  2103. break
  2104. fi
  2105. done
  2106. IFS="$ac_save_ifs"
  2107. test -z "$ac_cv_path_LEXPATH" && ac_cv_path_LEXPATH="no"
  2108. ;;
  2109. esac
  2110. LEXPATH="$ac_cv_path_LEXPATH"
  2111. if test -n "$LEXPATH"; then
  2112. echo "$ac_t""$LEXPATH" 1>&6
  2113. else
  2114. echo "$ac_t""no" 1>&6
  2115. fi
  2116. if test "$LEXPATH" = "no"; then
  2117. { echo "configure: error: *** Unable to locate lex." 1>&2; exit 1; }
  2118. fi
  2119. fi
  2120. for ac_prog in 'bison -y' byacc
  2121. do
  2122. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2123. set dummy $ac_prog; ac_word=$2
  2124. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2125. echo "configure:2644: checking for $ac_word" >&5
  2126. if test -n "$YACC"; then
  2127. ac_cv_prog_YACC="$YACC" # Let the user override the test.
  2128. else
  2129. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2130. ac_dummy="$PATH"
  2131. for ac_dir in $ac_dummy; do
  2132. test -z "$ac_dir" && ac_dir=.
  2133. if test -f $ac_dir/$ac_word; then
  2134. ac_cv_prog_YACC="$ac_prog"
  2135. break
  2136. fi
  2137. done
  2138. IFS="$ac_save_ifs"
  2139. fi
  2140. YACC="$ac_cv_prog_YACC"
  2141. if test -n "$YACC"; then
  2142. echo "$ac_t""$YACC" 1>&6
  2143. else
  2144. echo "$ac_t""no" 1>&6
  2145. fi
  2146. test -n "$YACC" && break
  2147. done
  2148. test -n "$YACC" || YACC="yacc"
  2149. if test "$YACC" = "yacc"; then
  2150. # Extract the first word of "yacc", so it can be a program name with args.
  2151. set dummy yacc; ac_word=$2
  2152. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2153. echo "configure:2675: checking for $ac_word" >&5
  2154. case "$YACCPATH" in
  2155. /*)
  2156. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a path.
  2157. ;;
  2158. ?:/*)
  2159. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a dos path.
  2160. ;;
  2161. *)
  2162. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2163. ac_dummy="$PATH"
  2164. for ac_dir in $ac_dummy; do
  2165. test -z "$ac_dir" && ac_dir=.
  2166. if test -f $ac_dir/$ac_word; then
  2167. ac_cv_path_YACCPATH="$ac_dir/$ac_word"
  2168. break
  2169. fi
  2170. done
  2171. IFS="$ac_save_ifs"
  2172. test -z "$ac_cv_path_YACCPATH" && ac_cv_path_YACCPATH="no"
  2173. ;;
  2174. esac
  2175. YACCPATH="$ac_cv_path_YACCPATH"
  2176. if test -n "$YACCPATH"; then
  2177. echo "$ac_t""$YACCPATH" 1>&6
  2178. else
  2179. echo "$ac_t""no" 1>&6
  2180. fi
  2181. if test "$YACCPATH" = "no"; then
  2182. { echo "configure: error: *** Unable to locate yacc." 1>&2; exit 1; }
  2183. fi
  2184. fi
  2185. # Extract the first word of "ranlib", so it can be a program name with args.
  2186. set dummy ranlib; ac_word=$2
  2187. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2188. echo "configure:2713: checking for $ac_word" >&5
  2189. if test -n "$RANLIB"; then
  2190. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  2191. else
  2192. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2193. ac_dummy="$PATH"
  2194. for ac_dir in $ac_dummy; do
  2195. test -z "$ac_dir" && ac_dir=.
  2196. if test -f $ac_dir/$ac_word; then
  2197. ac_cv_prog_RANLIB="ranlib"
  2198. break
  2199. fi
  2200. done
  2201. IFS="$ac_save_ifs"
  2202. test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  2203. fi
  2204. RANLIB="$ac_cv_prog_RANLIB"
  2205. if test -n "$RANLIB"; then
  2206. echo "$ac_t""$RANLIB" 1>&6
  2207. else
  2208. echo "$ac_t""no" 1>&6
  2209. fi
  2210. for ac_prog in ar
  2211. do
  2212. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2213. set dummy $ac_prog; ac_word=$2
  2214. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2215. echo "configure:2742: checking for $ac_word" >&5
  2216. if test -n "$AR"; then
  2217. ac_cv_prog_AR="$AR" # Let the user override the test.
  2218. else
  2219. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2220. ac_dummy="$PATH"
  2221. for ac_dir in $ac_dummy; do
  2222. test -z "$ac_dir" && ac_dir=.
  2223. if test -f $ac_dir/$ac_word; then
  2224. ac_cv_prog_AR="$ac_prog"
  2225. break
  2226. fi
  2227. done
  2228. IFS="$ac_save_ifs"
  2229. fi
  2230. AR="$ac_cv_prog_AR"
  2231. if test -n "$AR"; then
  2232. echo "$ac_t""$AR" 1>&6
  2233. else
  2234. echo "$ac_t""no" 1>&6
  2235. fi
  2236. test -n "$AR" && break
  2237. done
  2238. for ac_prog in env
  2239. do
  2240. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2241. set dummy $ac_prog; ac_word=$2
  2242. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2243. echo "configure:2773: checking for $ac_word" >&5
  2244. if test -n "$ENV"; then
  2245. ac_cv_prog_ENV="$ENV" # Let the user override the test.
  2246. else
  2247. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2248. ac_dummy="$PATH"
  2249. for ac_dir in $ac_dummy; do
  2250. test -z "$ac_dir" && ac_dir=.
  2251. if test -f $ac_dir/$ac_word; then
  2252. ac_cv_prog_ENV="$ac_prog"
  2253. break
  2254. fi
  2255. done
  2256. IFS="$ac_save_ifs"
  2257. fi
  2258. ENV="$ac_cv_prog_ENV"
  2259. if test -n "$ENV"; then
  2260. echo "$ac_t""$ENV" 1>&6
  2261. else
  2262. echo "$ac_t""no" 1>&6
  2263. fi
  2264. test -n "$ENV" && break
  2265. done
  2266. # Extract the first word of "perl", so it can be a program name with args.
  2267. set dummy perl; ac_word=$2
  2268. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2269. echo "configure:2802: checking for $ac_word" >&5
  2270. case "$PERL" in
  2271. /*)
  2272. ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  2273. ;;
  2274. ?:/*)
  2275. ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
  2276. ;;
  2277. *)
  2278. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2279. ac_dummy="$PATH"
  2280. for ac_dir in $ac_dummy; do
  2281. test -z "$ac_dir" && ac_dir=.
  2282. if test -f $ac_dir/$ac_word; then
  2283. ac_cv_path_PERL="$ac_dir/$ac_word"
  2284. break
  2285. fi
  2286. done
  2287. IFS="$ac_save_ifs"
  2288. test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
  2289. ;;
  2290. esac
  2291. PERL="$ac_cv_path_PERL"
  2292. if test -n "$PERL"; then
  2293. echo "$ac_t""$PERL" 1>&6
  2294. else
  2295. echo "$ac_t""no" 1>&6
  2296. fi
  2297. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  2298. echo "configure:2833: checking how to run the C preprocessor" >&5
  2299. # On Suns, sometimes $CPP names a directory.
  2300. if test -n "$CPP" && test -d "$CPP"; then
  2301. CPP=
  2302. fi
  2303. if test -z "$CPP"; then
  2304. # This must be in double quotes, not single quotes, because CPP may get
  2305. # substituted into the Makefile and "${CC-cc}" will confuse make.
  2306. CPP="${CC-cc} -E"
  2307. # On the NeXT, cc -E runs the code through the compiler's parser,
  2308. # not just through cpp.
  2309. cat > conftest.$ac_ext <<EOF
  2310. #line 2846 "configure"
  2311. #include "confdefs.h"
  2312. #include <assert.h>
  2313. Syntax Error
  2314. EOF
  2315. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2316. { (eval echo configure:2852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2317. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2318. if test -z "$ac_err"; then
  2319. :
  2320. else
  2321. echo "$ac_err" >&5
  2322. echo "configure: failed program was:" >&5
  2323. cat conftest.$ac_ext >&5
  2324. rm -rf conftest*
  2325. CPP="${CC-cc} -E -traditional-cpp"
  2326. cat > conftest.$ac_ext <<EOF
  2327. #line 2863 "configure"
  2328. #include "confdefs.h"
  2329. #include <assert.h>
  2330. Syntax Error
  2331. EOF
  2332. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2333. { (eval echo configure:2869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2334. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2335. if test -z "$ac_err"; then
  2336. :
  2337. else
  2338. echo "$ac_err" >&5
  2339. echo "configure: failed program was:" >&5
  2340. cat conftest.$ac_ext >&5
  2341. rm -rf conftest*
  2342. CPP="${CC-cc} -nologo -E"
  2343. cat > conftest.$ac_ext <<EOF
  2344. #line 2880 "configure"
  2345. #include "confdefs.h"
  2346. #include <assert.h>
  2347. Syntax Error
  2348. EOF
  2349. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2350. { (eval echo configure:2886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2351. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2352. if test -z "$ac_err"; then
  2353. :
  2354. else
  2355. echo "$ac_err" >&5
  2356. echo "configure: failed program was:" >&5
  2357. cat conftest.$ac_ext >&5
  2358. rm -rf conftest*
  2359. CPP=/lib/cpp
  2360. fi
  2361. rm -f conftest*
  2362. fi
  2363. rm -f conftest*
  2364. fi
  2365. rm -f conftest*
  2366. ac_cv_prog_CPP="$CPP"
  2367. CPP="$ac_cv_prog_CPP"
  2368. else
  2369. ac_cv_prog_CPP="$CPP"
  2370. fi
  2371. echo "$ac_t""$CPP" 1>&6
  2372. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  2373. echo "configure:2910: checking for ANSI C header files" >&5
  2374. cat > conftest.$ac_ext <<EOF
  2375. #line 2913 "configure"
  2376. #include "confdefs.h"
  2377. #include <stdlib.h>
  2378. #include <stdarg.h>
  2379. #include <string.h>
  2380. #include <float.h>
  2381. EOF
  2382. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2383. { (eval echo configure:2921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2384. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2385. if test -z "$ac_err"; then
  2386. rm -rf conftest*
  2387. ac_cv_header_stdc=yes
  2388. else
  2389. echo "$ac_err" >&5
  2390. echo "configure: failed program was:" >&5
  2391. cat conftest.$ac_ext >&5
  2392. rm -rf conftest*
  2393. ac_cv_header_stdc=no
  2394. fi
  2395. rm -f conftest*
  2396. if test $ac_cv_header_stdc = yes; then
  2397. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  2398. cat > conftest.$ac_ext <<EOF
  2399. #line 2938 "configure"
  2400. #include "confdefs.h"
  2401. #include <string.h>
  2402. EOF
  2403. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2404. egrep "memchr" >/dev/null 2>&1; then
  2405. :
  2406. else
  2407. rm -rf conftest*
  2408. ac_cv_header_stdc=no
  2409. fi
  2410. rm -f conftest*
  2411. fi
  2412. if test $ac_cv_header_stdc = yes; then
  2413. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  2414. cat > conftest.$ac_ext <<EOF
  2415. #line 2956 "configure"
  2416. #include "confdefs.h"
  2417. #include <stdlib.h>
  2418. EOF
  2419. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2420. egrep "free" >/dev/null 2>&1; then
  2421. :
  2422. else
  2423. rm -rf conftest*
  2424. ac_cv_header_stdc=no
  2425. fi
  2426. rm -f conftest*
  2427. fi
  2428. if test $ac_cv_header_stdc = yes; then
  2429. # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  2430. if test "$cross_compiling" = yes; then
  2431. :
  2432. else
  2433. cat > conftest.$ac_ext <<EOF
  2434. #line 2977 "configure"
  2435. #include "confdefs.h"
  2436. #include <ctype.h>
  2437. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  2438. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  2439. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  2440. int main () { int i; for (i = 0; i < 256; i++)
  2441. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  2442. exit (0); }
  2443. EOF
  2444. if { (eval echo configure:2988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2445. then
  2446. :
  2447. else
  2448. echo "configure: failed program was:" >&5
  2449. cat conftest.$ac_ext >&5
  2450. rm -fr conftest*
  2451. ac_cv_header_stdc=no
  2452. fi
  2453. rm -fr conftest*
  2454. fi
  2455. fi
  2456. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  2457. if test $ac_cv_header_stdc = yes; then
  2458. cat >> confdefs.h <<\EOF
  2459. #define STDC_HEADERS 1
  2460. EOF
  2461. fi
  2462. #AC_CHECK_HEADERS(curses.h limits.h termio.h termios.h unistd.h values.h)
  2463. for ac_hdr in limits.h termio.h termios.h unistd.h values.h f2c.h g2c.h
  2464. do
  2465. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2466. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2467. echo "configure:3015: checking for $ac_hdr" >&5
  2468. cat > conftest.$ac_ext <<EOF
  2469. #line 3018 "configure"
  2470. #include "confdefs.h"
  2471. #include <$ac_hdr>
  2472. EOF
  2473. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2474. { (eval echo configure:3023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2475. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2476. if test -z "$ac_err"; then
  2477. rm -rf conftest*
  2478. eval "ac_cv_header_$ac_safe=yes"
  2479. else
  2480. echo "$ac_err" >&5
  2481. echo "configure: failed program was:" >&5
  2482. cat conftest.$ac_ext >&5
  2483. rm -rf conftest*
  2484. eval "ac_cv_header_$ac_safe=no"
  2485. fi
  2486. rm -f conftest*
  2487. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2488. echo "$ac_t""yes" 1>&6
  2489. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2490. cat >> confdefs.h <<EOF
  2491. #define $ac_tr_hdr 1
  2492. EOF
  2493. else
  2494. echo "$ac_t""no" 1>&6
  2495. fi
  2496. done
  2497. for ac_hdr in sys/ioctl.h sys/mtio.h sys/resource.h sys/time.h
  2498. do
  2499. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2500. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2501. echo "configure:3052: checking for $ac_hdr" >&5
  2502. cat > conftest.$ac_ext <<EOF
  2503. #line 3055 "configure"
  2504. #include "confdefs.h"
  2505. #include <$ac_hdr>
  2506. EOF
  2507. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2508. { (eval echo configure:3060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2509. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2510. if test -z "$ac_err"; then
  2511. rm -rf conftest*
  2512. eval "ac_cv_header_$ac_safe=yes"
  2513. else
  2514. echo "$ac_err" >&5
  2515. echo "configure: failed program was:" >&5
  2516. cat conftest.$ac_ext >&5
  2517. rm -rf conftest*
  2518. eval "ac_cv_header_$ac_safe=no"
  2519. fi
  2520. rm -f conftest*
  2521. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2522. echo "$ac_t""yes" 1>&6
  2523. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2524. cat >> confdefs.h <<EOF
  2525. #define $ac_tr_hdr 1
  2526. EOF
  2527. else
  2528. echo "$ac_t""no" 1>&6
  2529. fi
  2530. done
  2531. for ac_hdr in sys/timeb.h sys/types.h sys/utsname.h
  2532. do
  2533. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2534. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2535. echo "configure:3089: checking for $ac_hdr" >&5
  2536. cat > conftest.$ac_ext <<EOF
  2537. #line 3092 "configure"
  2538. #include "confdefs.h"
  2539. #include <$ac_hdr>
  2540. EOF
  2541. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2542. { (eval echo configure:3097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2543. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2544. if test -z "$ac_err"; then
  2545. rm -rf conftest*
  2546. eval "ac_cv_header_$ac_safe=yes"
  2547. else
  2548. echo "$ac_err" >&5
  2549. echo "configure: failed program was:" >&5
  2550. cat conftest.$ac_ext >&5
  2551. rm -rf conftest*
  2552. eval "ac_cv_header_$ac_safe=no"
  2553. fi
  2554. rm -f conftest*
  2555. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2556. echo "$ac_t""yes" 1>&6
  2557. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2558. cat >> confdefs.h <<EOF
  2559. #define $ac_tr_hdr 1
  2560. EOF
  2561. else
  2562. echo "$ac_t""no" 1>&6
  2563. fi
  2564. done
  2565. for ac_hdr in libintl.h iconv.h
  2566. do
  2567. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2568. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2569. echo "configure:3126: checking for $ac_hdr" >&5
  2570. cat > conftest.$ac_ext <<EOF
  2571. #line 3129 "configure"
  2572. #include "confdefs.h"
  2573. #include <$ac_hdr>
  2574. EOF
  2575. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2576. { (eval echo configure:3134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2577. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2578. if test -z "$ac_err"; then
  2579. rm -rf conftest*
  2580. eval "ac_cv_header_$ac_safe=yes"
  2581. else
  2582. echo "$ac_err" >&5
  2583. echo "configure: failed program was:" >&5
  2584. cat conftest.$ac_ext >&5
  2585. rm -rf conftest*
  2586. eval "ac_cv_header_$ac_safe=no"
  2587. fi
  2588. rm -f conftest*
  2589. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2590. echo "$ac_t""yes" 1>&6
  2591. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2592. cat >> confdefs.h <<EOF
  2593. #define $ac_tr_hdr 1
  2594. EOF
  2595. else
  2596. echo "$ac_t""no" 1>&6
  2597. fi
  2598. done
  2599. for ac_hdr in langinfo.h
  2600. do
  2601. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2602. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2603. echo "configure:3163: checking for $ac_hdr" >&5
  2604. cat > conftest.$ac_ext <<EOF
  2605. #line 3166 "configure"
  2606. #include "confdefs.h"
  2607. #include <$ac_hdr>
  2608. EOF
  2609. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2610. { (eval echo configure:3171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2611. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2612. if test -z "$ac_err"; then
  2613. rm -rf conftest*
  2614. eval "ac_cv_header_$ac_safe=yes"
  2615. else
  2616. echo "$ac_err" >&5
  2617. echo "configure: failed program was:" >&5
  2618. cat conftest.$ac_ext >&5
  2619. rm -rf conftest*
  2620. eval "ac_cv_header_$ac_safe=no"
  2621. fi
  2622. rm -f conftest*
  2623. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2624. echo "$ac_t""yes" 1>&6
  2625. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2626. cat >> confdefs.h <<EOF
  2627. #define $ac_tr_hdr 1
  2628. EOF
  2629. else
  2630. echo "$ac_t""no" 1>&6
  2631. fi
  2632. done
  2633. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  2634. echo "configure:3197: checking whether time.h and sys/time.h may both be included" >&5
  2635. cat > conftest.$ac_ext <<EOF
  2636. #line 3200 "configure"
  2637. #include "confdefs.h"
  2638. #include <sys/types.h>
  2639. #include <sys/time.h>
  2640. #include <time.h>
  2641. int main() {
  2642. struct tm *tp;
  2643. ; return 0; }
  2644. EOF
  2645. if { (eval echo configure:3209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2646. rm -rf conftest*
  2647. ac_cv_header_time=yes
  2648. else
  2649. echo "configure: failed program was:" >&5
  2650. cat conftest.$ac_ext >&5
  2651. rm -rf conftest*
  2652. ac_cv_header_time=no
  2653. fi
  2654. rm -f conftest*
  2655. echo "$ac_t""$ac_cv_header_time" 1>&6
  2656. if test $ac_cv_header_time = yes; then
  2657. cat >> confdefs.h <<\EOF
  2658. #define TIME_WITH_SYS_TIME 1
  2659. EOF
  2660. fi
  2661. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  2662. echo "configure:3229: checking for off_t" >&5
  2663. cat > conftest.$ac_ext <<EOF
  2664. #line 3232 "configure"
  2665. #include "confdefs.h"
  2666. #include <sys/types.h>
  2667. #if STDC_HEADERS
  2668. #include <stdlib.h>
  2669. #include <stddef.h>
  2670. #endif
  2671. EOF
  2672. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2673. egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2674. rm -rf conftest*
  2675. ac_cv_type_off_t=yes
  2676. else
  2677. rm -rf conftest*
  2678. ac_cv_type_off_t=no
  2679. fi
  2680. rm -f conftest*
  2681. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  2682. if test $ac_cv_type_off_t = no; then
  2683. cat >> confdefs.h <<\EOF
  2684. #define off_t long
  2685. EOF
  2686. fi
  2687. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  2688. echo "configure:3259: checking for uid_t in sys/types.h" >&5
  2689. cat > conftest.$ac_ext <<EOF
  2690. #line 3262 "configure"
  2691. #include "confdefs.h"
  2692. #include <sys/types.h>
  2693. EOF
  2694. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2695. egrep "uid_t" >/dev/null 2>&1; then
  2696. rm -rf conftest*
  2697. ac_cv_type_uid_t=yes
  2698. else
  2699. rm -rf conftest*
  2700. ac_cv_type_uid_t=no
  2701. fi
  2702. rm -f conftest*
  2703. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  2704. if test $ac_cv_type_uid_t = no; then
  2705. cat >> confdefs.h <<\EOF
  2706. #define uid_t int
  2707. EOF
  2708. cat >> confdefs.h <<\EOF
  2709. #define gid_t int
  2710. EOF
  2711. fi
  2712. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  2713. echo "configure:3290: checking return type of signal handlers" >&5
  2714. cat > conftest.$ac_ext <<EOF
  2715. #line 3293 "configure"
  2716. #include "confdefs.h"
  2717. #include <sys/types.h>
  2718. #include <signal.h>
  2719. #ifdef signal
  2720. #undef signal
  2721. #endif
  2722. #ifdef __cplusplus
  2723. extern "C" void (*signal (int, void (*)(int)))(int);
  2724. #else
  2725. void (*signal ()) ();
  2726. #endif
  2727. int main() {
  2728. int i;
  2729. ; return 0; }
  2730. EOF
  2731. if { (eval echo configure:3310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2732. rm -rf conftest*
  2733. ac_cv_type_signal=void
  2734. else
  2735. echo "configure: failed program was:" >&5
  2736. cat conftest.$ac_ext >&5
  2737. rm -rf conftest*
  2738. ac_cv_type_signal=int
  2739. fi
  2740. rm -f conftest*
  2741. echo "$ac_t""$ac_cv_type_signal" 1>&6
  2742. cat >> confdefs.h <<EOF
  2743. #define RETSIGTYPE $ac_cv_type_signal
  2744. EOF
  2745. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  2746. echo "configure:3328: checking for Cygwin environment" >&5
  2747. cat > conftest.$ac_ext <<EOF
  2748. #line 3331 "configure"
  2749. #include "confdefs.h"
  2750. int main() {
  2751. #ifndef __CYGWIN__
  2752. #define __CYGWIN__ __CYGWIN32__
  2753. #endif
  2754. return __CYGWIN__;
  2755. ; return 0; }
  2756. EOF
  2757. if { (eval echo configure:3342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2758. rm -rf conftest*
  2759. ac_cv_cygwin=yes
  2760. else
  2761. echo "configure: failed program was:" >&5
  2762. cat conftest.$ac_ext >&5
  2763. rm -rf conftest*
  2764. ac_cv_cygwin=no
  2765. fi
  2766. rm -f conftest*
  2767. rm -f conftest*
  2768. echo "$ac_t""$ac_cv_cygwin" 1>&6
  2769. CYGWIN=
  2770. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  2771. for ac_func in ftime gethostname gettimeofday lseek nice time uname
  2772. do
  2773. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2774. echo "configure:3360: checking for $ac_func" >&5
  2775. cat > conftest.$ac_ext <<EOF
  2776. #line 3363 "configure"
  2777. #include "confdefs.h"
  2778. /* System header to define __stub macros and hopefully few prototypes,
  2779. which can conflict with char $ac_func(); below. */
  2780. #include <assert.h>
  2781. /* Override any gcc2 internal prototype to avoid an error. */
  2782. /* We use char because int might match the return type of a gcc2
  2783. builtin and then its argument prototype would still apply. */
  2784. char $ac_func();
  2785. int main() {
  2786. /* The GNU C library defines this for functions which it implements
  2787. to always fail with ENOSYS. Some functions are actually named
  2788. something starting with __ and the normal name is an alias. */
  2789. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2790. choke me
  2791. #else
  2792. $ac_func();
  2793. #endif
  2794. ; return 0; }
  2795. EOF
  2796. if { (eval echo configure:3386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2797. rm -rf conftest*
  2798. eval "ac_cv_func_$ac_func=yes"
  2799. else
  2800. echo "configure: failed program was:" >&5
  2801. cat conftest.$ac_ext >&5
  2802. rm -rf conftest*
  2803. eval "ac_cv_func_$ac_func=no"
  2804. fi
  2805. rm -f conftest*
  2806. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2807. echo "$ac_t""yes" 1>&6
  2808. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2809. cat >> confdefs.h <<EOF
  2810. #define $ac_tr_func 1
  2811. EOF
  2812. else
  2813. echo "$ac_t""no" 1>&6
  2814. fi
  2815. done
  2816. for ac_func in seteuid setpriority setreuid setruid
  2817. do
  2818. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2819. echo "configure:3412: checking for $ac_func" >&5
  2820. cat > conftest.$ac_ext <<EOF
  2821. #line 3415 "configure"
  2822. #include "confdefs.h"
  2823. /* System header to define __stub macros and hopefully few prototypes,
  2824. which can conflict with char $ac_func(); below. */
  2825. #include <assert.h>
  2826. /* Override any gcc2 internal prototype to avoid an error. */
  2827. /* We use char because int might match the return type of a gcc2
  2828. builtin and then its argument prototype would still apply. */
  2829. char $ac_func();
  2830. int main() {
  2831. /* The GNU C library defines this for functions which it implements
  2832. to always fail with ENOSYS. Some functions are actually named
  2833. something starting with __ and the normal name is an alias. */
  2834. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2835. choke me
  2836. #else
  2837. $ac_func();
  2838. #endif
  2839. ; return 0; }
  2840. EOF
  2841. if { (eval echo configure:3438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2842. rm -rf conftest*
  2843. eval "ac_cv_func_$ac_func=yes"
  2844. else
  2845. echo "configure: failed program was:" >&5
  2846. cat conftest.$ac_ext >&5
  2847. rm -rf conftest*
  2848. eval "ac_cv_func_$ac_func=no"
  2849. fi
  2850. rm -f conftest*
  2851. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2852. echo "$ac_t""yes" 1>&6
  2853. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2854. cat >> confdefs.h <<EOF
  2855. #define $ac_tr_func 1
  2856. EOF
  2857. else
  2858. echo "$ac_t""no" 1>&6
  2859. fi
  2860. done
  2861. for ac_func in drand48
  2862. do
  2863. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2864. echo "configure:3464: checking for $ac_func" >&5
  2865. cat > conftest.$ac_ext <<EOF
  2866. #line 3467 "configure"
  2867. #include "confdefs.h"
  2868. /* System header to define __stub macros and hopefully few prototypes,
  2869. which can conflict with char $ac_func(); below. */
  2870. #include <assert.h>
  2871. /* Override any gcc2 internal prototype to avoid an error. */
  2872. /* We use char because int might match the return type of a gcc2
  2873. builtin and then its argument prototype would still apply. */
  2874. char $ac_func();
  2875. int main() {
  2876. /* The GNU C library defines this for functions which it implements
  2877. to always fail with ENOSYS. Some functions are actually named
  2878. something starting with __ and the normal name is an alias. */
  2879. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2880. choke me
  2881. #else
  2882. $ac_func();
  2883. #endif
  2884. ; return 0; }
  2885. EOF
  2886. if { (eval echo configure:3490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2887. rm -rf conftest*
  2888. eval "ac_cv_func_$ac_func=yes"
  2889. else
  2890. echo "configure: failed program was:" >&5
  2891. cat conftest.$ac_ext >&5
  2892. rm -rf conftest*
  2893. eval "ac_cv_func_$ac_func=no"
  2894. fi
  2895. rm -f conftest*
  2896. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2897. echo "$ac_t""yes" 1>&6
  2898. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2899. cat >> confdefs.h <<EOF
  2900. #define $ac_tr_func 1
  2901. EOF
  2902. else
  2903. echo "$ac_t""no" 1>&6
  2904. fi
  2905. done
  2906. for ac_func in putenv setenv
  2907. do
  2908. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2909. echo "configure:3516: checking for $ac_func" >&5
  2910. cat > conftest.$ac_ext <<EOF
  2911. #line 3519 "configure"
  2912. #include "confdefs.h"
  2913. /* System header to define __stub macros and hopefully few prototypes,
  2914. which can conflict with char $ac_func(); below. */
  2915. #include <assert.h>
  2916. /* Override any gcc2 internal prototype to avoid an error. */
  2917. /* We use char because int might match the return type of a gcc2
  2918. builtin and then its argument prototype would still apply. */
  2919. char $ac_func();
  2920. int main() {
  2921. /* The GNU C library defines this for functions which it implements
  2922. to always fail with ENOSYS. Some functions are actually named
  2923. something starting with __ and the normal name is an alias. */
  2924. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2925. choke me
  2926. #else
  2927. $ac_func();
  2928. #endif
  2929. ; return 0; }
  2930. EOF
  2931. if { (eval echo configure:3542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2932. rm -rf conftest*
  2933. eval "ac_cv_func_$ac_func=yes"
  2934. else
  2935. echo "configure: failed program was:" >&5
  2936. cat conftest.$ac_ext >&5
  2937. rm -rf conftest*
  2938. eval "ac_cv_func_$ac_func=no"
  2939. fi
  2940. rm -f conftest*
  2941. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2942. echo "$ac_t""yes" 1>&6
  2943. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2944. cat >> confdefs.h <<EOF
  2945. #define $ac_tr_func 1
  2946. EOF
  2947. else
  2948. echo "$ac_t""no" 1>&6
  2949. fi
  2950. done
  2951. for ac_func in nanosleep
  2952. do
  2953. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2954. echo "configure:3568: checking for $ac_func" >&5
  2955. cat > conftest.$ac_ext <<EOF
  2956. #line 3571 "configure"
  2957. #include "confdefs.h"
  2958. /* System header to define __stub macros and hopefully few prototypes,
  2959. which can conflict with char $ac_func(); below. */
  2960. #include <assert.h>
  2961. /* Override any gcc2 internal prototype to avoid an error. */
  2962. /* We use char because int might match the return type of a gcc2
  2963. builtin and then its argument prototype would still apply. */
  2964. char $ac_func();
  2965. int main() {
  2966. /* The GNU C library defines this for functions which it implements
  2967. to always fail with ENOSYS. Some functions are actually named
  2968. something starting with __ and the normal name is an alias. */
  2969. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2970. choke me
  2971. #else
  2972. $ac_func();
  2973. #endif
  2974. ; return 0; }
  2975. EOF
  2976. if { (eval echo configure:3594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2977. rm -rf conftest*
  2978. eval "ac_cv_func_$ac_func=yes"
  2979. else
  2980. echo "configure: failed program was:" >&5
  2981. cat conftest.$ac_ext >&5
  2982. rm -rf conftest*
  2983. eval "ac_cv_func_$ac_func=no"
  2984. fi
  2985. rm -f conftest*
  2986. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2987. echo "$ac_t""yes" 1>&6
  2988. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2989. cat >> confdefs.h <<EOF
  2990. #define $ac_tr_func 1
  2991. EOF
  2992. else
  2993. echo "$ac_t""no" 1>&6
  2994. fi
  2995. done
  2996. if test "$cross_compiling" != "yes" ; then
  2997. echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
  2998. echo "configure:3619: checking whether setpgrp takes no argument" >&5
  2999. if test "$cross_compiling" = yes; then
  3000. { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
  3001. else
  3002. cat > conftest.$ac_ext <<EOF
  3003. #line 3625 "configure"
  3004. #include "confdefs.h"
  3005. #ifdef HAVE_UNISTD_H
  3006. #include <unistd.h>
  3007. #endif
  3008. /*
  3009. * If this system has a BSD-style setpgrp, which takes arguments, exit
  3010. * successfully.
  3011. */
  3012. main()
  3013. {
  3014. if (setpgrp(1,1) == -1)
  3015. exit(0);
  3016. else
  3017. exit(1);
  3018. }
  3019. EOF
  3020. if { (eval echo configure:3645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  3021. then
  3022. ac_cv_func_setpgrp_void=no
  3023. else
  3024. echo "configure: failed program was:" >&5
  3025. cat conftest.$ac_ext >&5
  3026. rm -fr conftest*
  3027. ac_cv_func_setpgrp_void=yes
  3028. fi
  3029. rm -fr conftest*
  3030. fi
  3031. echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
  3032. if test $ac_cv_func_setpgrp_void = yes; then
  3033. cat >> confdefs.h <<\EOF
  3034. #define SETPGRP_VOID 1
  3035. EOF
  3036. fi
  3037. else
  3038. CROSS_COMPILING=1
  3039. fi
  3040. echo $ac_n "checking for long long int""... $ac_c" 1>&6
  3041. echo "configure:3673: checking for long long int" >&5
  3042. cat > conftest.$ac_ext <<EOF
  3043. #line 3675 "configure"
  3044. #include "confdefs.h"
  3045. int main() {
  3046. long long int x;
  3047. ; return 0; }
  3048. EOF
  3049. if { (eval echo configure:3682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3050. rm -rf conftest*
  3051. echo "$ac_t""yes" 1>&6
  3052. cat >> confdefs.h <<\EOF
  3053. #define HAVE_LONG_LONG_INT 1
  3054. EOF
  3055. else
  3056. echo "configure: failed program was:" >&5
  3057. cat conftest.$ac_ext >&5
  3058. rm -rf conftest*
  3059. echo "$ac_t""no" 1>&6
  3060. fi
  3061. rm -f conftest*
  3062. echo $ac_n "checking for int64_t""... $ac_c" 1>&6
  3063. echo "configure:3702: checking for int64_t" >&5
  3064. cat > conftest.$ac_ext <<EOF
  3065. #line 3704 "configure"
  3066. #include "confdefs.h"
  3067. #include <sys/types.h>
  3068. int main() {
  3069. int64_t x;
  3070. ; return 0; }
  3071. EOF
  3072. if { (eval echo configure:3711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3073. rm -rf conftest*
  3074. echo "$ac_t""yes" 1>&6
  3075. cat >> confdefs.h <<\EOF
  3076. #define HAVE_INT64_T 1
  3077. EOF
  3078. else
  3079. echo "configure: failed program was:" >&5
  3080. cat conftest.$ac_ext >&5
  3081. rm -rf conftest*
  3082. echo "$ac_t""no" 1>&6
  3083. fi
  3084. rm -f conftest*
  3085. echo $ac_n "checking for W11""... $ac_c" 1>&6
  3086. echo "configure:3731: checking for W11" >&5
  3087. case "$enable_w11" in
  3088. yes|no) echo "$ac_t"""$enable_w11"" 1>&6 ;;
  3089. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  3090. esac
  3091. USE_X11=
  3092. USE_W11=
  3093. XLIB=
  3094. XTLIB=
  3095. if test "$enable_w11" = "yes" ; then
  3096. X_CFLAGS=-I${SRCDIR}/display/drivers/windows/libW11
  3097. X_LIBS='-L$(LIBDIR)'
  3098. USE_W11="1"
  3099. USE_X11="1"
  3100. XLIB=-lX11
  3101. CFLAGS="$CFLAGS -D__W98__"
  3102. else
  3103. # If we find X, set shell vars x_includes and x_libraries to the
  3104. # paths, otherwise set no_x=yes.
  3105. # Uses ac_ vars as temps to allow command line to override cache and checks.
  3106. # --without-x overrides everything else, but does not touch the cache.
  3107. echo $ac_n "checking for X""... $ac_c" 1>&6
  3108. echo "configure:3759: checking for X" >&5
  3109. # Check whether --with-x or --without-x was given.
  3110. if test "${with_x+set}" = set; then
  3111. withval="$with_x"
  3112. :
  3113. fi
  3114. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  3115. if test "x$with_x" = xno; then
  3116. # The user explicitly disabled X.
  3117. have_x=disabled
  3118. else
  3119. if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  3120. # Both variables are already set.
  3121. have_x=yes
  3122. else
  3123. # One or both of the vars are not set, and there is no cached value.
  3124. ac_x_includes=NO ac_x_libraries=NO
  3125. rm -fr conftestdir
  3126. if mkdir conftestdir; then
  3127. cd conftestdir
  3128. # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  3129. cat > Imakefile <<'EOF'
  3130. acfindx:
  3131. @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  3132. EOF
  3133. if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  3134. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  3135. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  3136. # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  3137. for ac_extension in a so sl; do
  3138. if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  3139. test -f $ac_im_libdir/libX11.$ac_extension; then
  3140. ac_im_usrlibdir=$ac_im_libdir; break
  3141. fi
  3142. done
  3143. # Screen out bogus values from the imake configuration. They are
  3144. # bogus both because they are the default anyway, and because
  3145. # using them would break gcc on systems where it needs fixed includes.
  3146. case "$ac_im_incroot" in
  3147. /usr/include) ;;
  3148. *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  3149. esac
  3150. case "$ac_im_usrlibdir" in
  3151. /usr/lib | /lib) ;;
  3152. *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  3153. esac
  3154. fi
  3155. cd ..
  3156. rm -fr conftestdir
  3157. fi
  3158. if test "$ac_x_includes" = NO; then
  3159. # Guess where to find include files, by looking for this one X11 .h file.
  3160. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  3161. # First, try using that file with no special directory specified.
  3162. cat > conftest.$ac_ext <<EOF
  3163. #line 3819 "configure"
  3164. #include "confdefs.h"
  3165. #include <$x_direct_test_include>
  3166. EOF
  3167. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3168. { (eval echo configure:3824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3169. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3170. if test -z "$ac_err"; then
  3171. rm -rf conftest*
  3172. # We can compile using X headers with no special include directory.
  3173. ac_x_includes=
  3174. else
  3175. echo "$ac_err" >&5
  3176. echo "configure: failed program was:" >&5
  3177. cat conftest.$ac_ext >&5
  3178. rm -rf conftest*
  3179. # Look for the header file in a standard set of common directories.
  3180. # Check X11 before X11Rn because it is often a symlink to the current release.
  3181. for ac_dir in \
  3182. /usr/X11/include \
  3183. /usr/X11R6/include \
  3184. /usr/X11R5/include \
  3185. /usr/X11R4/include \
  3186. \
  3187. /usr/include/X11 \
  3188. /usr/include/X11R6 \
  3189. /usr/include/X11R5 \
  3190. /usr/include/X11R4 \
  3191. \
  3192. /usr/local/X11/include \
  3193. /usr/local/X11R6/include \
  3194. /usr/local/X11R5/include \
  3195. /usr/local/X11R4/include \
  3196. \
  3197. /usr/local/include/X11 \
  3198. /usr/local/include/X11R6 \
  3199. /usr/local/include/X11R5 \
  3200. /usr/local/include/X11R4 \
  3201. \
  3202. /usr/X386/include \
  3203. /usr/x386/include \
  3204. /usr/XFree86/include/X11 \
  3205. \
  3206. /usr/include \
  3207. /usr/local/include \
  3208. /usr/unsupported/include \
  3209. /usr/athena/include \
  3210. /usr/local/x11r5/include \
  3211. /usr/lpp/Xamples/include \
  3212. \
  3213. /usr/openwin/include \
  3214. /usr/openwin/share/include \
  3215. ; \
  3216. do
  3217. if test -r "$ac_dir/$x_direct_test_include"; then
  3218. ac_x_includes=$ac_dir
  3219. break
  3220. fi
  3221. done
  3222. fi
  3223. rm -f conftest*
  3224. fi # $ac_x_includes = NO
  3225. if test "$ac_x_libraries" = NO; then
  3226. # Check for the libraries.
  3227. test -z "$x_direct_test_library" && x_direct_test_library=Xt
  3228. test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  3229. # See if we find them without any special options.
  3230. # Don't add to $LIBS permanently.
  3231. ac_save_LIBS="$LIBS"
  3232. LIBS="-l$x_direct_test_library $LIBS"
  3233. cat > conftest.$ac_ext <<EOF
  3234. #line 3893 "configure"
  3235. #include "confdefs.h"
  3236. int main() {
  3237. ${x_direct_test_function}()
  3238. ; return 0; }
  3239. EOF
  3240. if { (eval echo configure:3900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3241. rm -rf conftest*
  3242. LIBS="$ac_save_LIBS"
  3243. # We can link X programs with no special library path.
  3244. ac_x_libraries=
  3245. else
  3246. echo "configure: failed program was:" >&5
  3247. cat conftest.$ac_ext >&5
  3248. rm -rf conftest*
  3249. LIBS="$ac_save_LIBS"
  3250. # First see if replacing the include by lib works.
  3251. # Check X11 before X11Rn because it is often a symlink to the current release.
  3252. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  3253. /usr/X11/lib \
  3254. /usr/X11R6/lib \
  3255. /usr/X11R5/lib \
  3256. /usr/X11R4/lib \
  3257. \
  3258. /usr/lib/X11 \
  3259. /usr/lib/X11R6 \
  3260. /usr/lib/X11R5 \
  3261. /usr/lib/X11R4 \
  3262. \
  3263. /usr/local/X11/lib \
  3264. /usr/local/X11R6/lib \
  3265. /usr/local/X11R5/lib \
  3266. /usr/local/X11R4/lib \
  3267. \
  3268. /usr/local/lib/X11 \
  3269. /usr/local/lib/X11R6 \
  3270. /usr/local/lib/X11R5 \
  3271. /usr/local/lib/X11R4 \
  3272. \
  3273. /usr/X386/lib \
  3274. /usr/x386/lib \
  3275. /usr/XFree86/lib/X11 \
  3276. \
  3277. /usr/lib \
  3278. /usr/local/lib \
  3279. /usr/unsupported/lib \
  3280. /usr/athena/lib \
  3281. /usr/local/x11r5/lib \
  3282. /usr/lpp/Xamples/lib \
  3283. /lib/usr/lib/X11 \
  3284. \
  3285. /usr/openwin/lib \
  3286. /usr/openwin/share/lib \
  3287. ; \
  3288. do
  3289. for ac_extension in a so sl; do
  3290. if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  3291. ac_x_libraries=$ac_dir
  3292. break 2
  3293. fi
  3294. done
  3295. done
  3296. fi
  3297. rm -f conftest*
  3298. fi # $ac_x_libraries = NO
  3299. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  3300. # Didn't find X anywhere. Cache the known absence of X.
  3301. ac_cv_have_x="have_x=no"
  3302. else
  3303. # Record where we found X for the cache.
  3304. ac_cv_have_x="have_x=yes \
  3305. ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  3306. fi
  3307. fi
  3308. eval "$ac_cv_have_x"
  3309. fi # $with_x != no
  3310. if test "$have_x" != yes; then
  3311. echo "$ac_t""$have_x" 1>&6
  3312. no_x=yes
  3313. else
  3314. # If each of the values was on the command line, it overrides each guess.
  3315. test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  3316. test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  3317. # Update the cache value to reflect the command line values.
  3318. ac_cv_have_x="have_x=yes \
  3319. ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  3320. echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  3321. fi
  3322. if test "$no_x" = yes; then
  3323. # Not all programs may use this symbol, but it does not hurt to define it.
  3324. cat >> confdefs.h <<\EOF
  3325. #define X_DISPLAY_MISSING 1
  3326. EOF
  3327. X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  3328. else
  3329. if test -n "$x_includes"; then
  3330. X_CFLAGS="$X_CFLAGS -I$x_includes"
  3331. fi
  3332. # It would also be nice to do this for all -L options, not just this one.
  3333. if test -n "$x_libraries"; then
  3334. X_LIBS="$X_LIBS -L$x_libraries"
  3335. # For Solaris; some versions of Sun CC require a space after -R and
  3336. # others require no space. Words are not sufficient . . . .
  3337. case "`(uname -sr) 2>/dev/null`" in
  3338. "SunOS 5"*)
  3339. echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  3340. echo "configure:4005: checking whether -R must be followed by a space" >&5
  3341. ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  3342. cat > conftest.$ac_ext <<EOF
  3343. #line 4008 "configure"
  3344. #include "confdefs.h"
  3345. int main() {
  3346. ; return 0; }
  3347. EOF
  3348. if { (eval echo configure:4015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3349. rm -rf conftest*
  3350. ac_R_nospace=yes
  3351. else
  3352. echo "configure: failed program was:" >&5
  3353. cat conftest.$ac_ext >&5
  3354. rm -rf conftest*
  3355. ac_R_nospace=no
  3356. fi
  3357. rm -f conftest*
  3358. if test $ac_R_nospace = yes; then
  3359. echo "$ac_t""no" 1>&6
  3360. X_LIBS="$X_LIBS -R$x_libraries"
  3361. else
  3362. LIBS="$ac_xsave_LIBS -R $x_libraries"
  3363. cat > conftest.$ac_ext <<EOF
  3364. #line 4031 "configure"
  3365. #include "confdefs.h"
  3366. int main() {
  3367. ; return 0; }
  3368. EOF
  3369. if { (eval echo configure:4038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3370. rm -rf conftest*
  3371. ac_R_space=yes
  3372. else
  3373. echo "configure: failed program was:" >&5
  3374. cat conftest.$ac_ext >&5
  3375. rm -rf conftest*
  3376. ac_R_space=no
  3377. fi
  3378. rm -f conftest*
  3379. if test $ac_R_space = yes; then
  3380. echo "$ac_t""yes" 1>&6
  3381. X_LIBS="$X_LIBS -R $x_libraries"
  3382. else
  3383. echo "$ac_t""neither works" 1>&6
  3384. fi
  3385. fi
  3386. LIBS="$ac_xsave_LIBS"
  3387. esac
  3388. fi
  3389. # Check for system-dependent libraries X programs must link with.
  3390. # Do this before checking for the system-independent R6 libraries
  3391. # (-lICE), since we may need -lsocket or whatever for X linking.
  3392. if test "$ISC" = yes; then
  3393. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  3394. else
  3395. # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  3396. # libraries were built with DECnet support. And karl@cs.umb.edu says
  3397. # the Alpha needs dnet_stub (dnet does not exist).
  3398. echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  3399. echo "configure:4070: checking for dnet_ntoa in -ldnet" >&5
  3400. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3401. ac_save_LIBS="$LIBS"
  3402. LIBS="-ldnet $LIBS"
  3403. cat > conftest.$ac_ext <<EOF
  3404. #line 4076 "configure"
  3405. #include "confdefs.h"
  3406. /* Override any gcc2 internal prototype to avoid an error. */
  3407. /* We use char because int might match the return type of a gcc2
  3408. builtin and then its argument prototype would still apply. */
  3409. char dnet_ntoa();
  3410. int main() {
  3411. dnet_ntoa()
  3412. ; return 0; }
  3413. EOF
  3414. if { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3415. rm -rf conftest*
  3416. eval "ac_cv_lib_$ac_lib_var=yes"
  3417. else
  3418. echo "configure: failed program was:" >&5
  3419. cat conftest.$ac_ext >&5
  3420. rm -rf conftest*
  3421. eval "ac_cv_lib_$ac_lib_var=no"
  3422. fi
  3423. rm -f conftest*
  3424. LIBS="$ac_save_LIBS"
  3425. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3426. echo "$ac_t""yes" 1>&6
  3427. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  3428. else
  3429. echo "$ac_t""no" 1>&6
  3430. fi
  3431. if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  3432. echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  3433. echo "configure:4108: checking for dnet_ntoa in -ldnet_stub" >&5
  3434. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3435. ac_save_LIBS="$LIBS"
  3436. LIBS="-ldnet_stub $LIBS"
  3437. cat > conftest.$ac_ext <<EOF
  3438. #line 4114 "configure"
  3439. #include "confdefs.h"
  3440. /* Override any gcc2 internal prototype to avoid an error. */
  3441. /* We use char because int might match the return type of a gcc2
  3442. builtin and then its argument prototype would still apply. */
  3443. char dnet_ntoa();
  3444. int main() {
  3445. dnet_ntoa()
  3446. ; return 0; }
  3447. EOF
  3448. if { (eval echo configure:4125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3449. rm -rf conftest*
  3450. eval "ac_cv_lib_$ac_lib_var=yes"
  3451. else
  3452. echo "configure: failed program was:" >&5
  3453. cat conftest.$ac_ext >&5
  3454. rm -rf conftest*
  3455. eval "ac_cv_lib_$ac_lib_var=no"
  3456. fi
  3457. rm -f conftest*
  3458. LIBS="$ac_save_LIBS"
  3459. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3460. echo "$ac_t""yes" 1>&6
  3461. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  3462. else
  3463. echo "$ac_t""no" 1>&6
  3464. fi
  3465. fi
  3466. # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  3467. # to get the SysV transport functions.
  3468. # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  3469. # needs -lnsl.
  3470. # The nsl library prevents programs from opening the X display
  3471. # on Irix 5.2, according to dickey@clark.net.
  3472. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  3473. echo "configure:4153: checking for gethostbyname" >&5
  3474. cat > conftest.$ac_ext <<EOF
  3475. #line 4156 "configure"
  3476. #include "confdefs.h"
  3477. /* System header to define __stub macros and hopefully few prototypes,
  3478. which can conflict with char gethostbyname(); below. */
  3479. #include <assert.h>
  3480. /* Override any gcc2 internal prototype to avoid an error. */
  3481. /* We use char because int might match the return type of a gcc2
  3482. builtin and then its argument prototype would still apply. */
  3483. char gethostbyname();
  3484. int main() {
  3485. /* The GNU C library defines this for functions which it implements
  3486. to always fail with ENOSYS. Some functions are actually named
  3487. something starting with __ and the normal name is an alias. */
  3488. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  3489. choke me
  3490. #else
  3491. gethostbyname();
  3492. #endif
  3493. ; return 0; }
  3494. EOF
  3495. if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3496. rm -rf conftest*
  3497. eval "ac_cv_func_gethostbyname=yes"
  3498. else
  3499. echo "configure: failed program was:" >&5
  3500. cat conftest.$ac_ext >&5
  3501. rm -rf conftest*
  3502. eval "ac_cv_func_gethostbyname=no"
  3503. fi
  3504. rm -f conftest*
  3505. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  3506. echo "$ac_t""yes" 1>&6
  3507. :
  3508. else
  3509. echo "$ac_t""no" 1>&6
  3510. fi
  3511. if test $ac_cv_func_gethostbyname = no; then
  3512. echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  3513. echo "configure:4199: checking for gethostbyname in -lnsl" >&5
  3514. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  3515. ac_save_LIBS="$LIBS"
  3516. LIBS="-lnsl $LIBS"
  3517. cat > conftest.$ac_ext <<EOF
  3518. #line 4205 "configure"
  3519. #include "confdefs.h"
  3520. /* Override any gcc2 internal prototype to avoid an error. */
  3521. /* We use char because int might match the return type of a gcc2
  3522. builtin and then its argument prototype would still apply. */
  3523. char gethostbyname();
  3524. int main() {
  3525. gethostbyname()
  3526. ; return 0; }
  3527. EOF
  3528. if { (eval echo configure:4216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3529. rm -rf conftest*
  3530. eval "ac_cv_lib_$ac_lib_var=yes"
  3531. else
  3532. echo "configure: failed program was:" >&5
  3533. cat conftest.$ac_ext >&5
  3534. rm -rf conftest*
  3535. eval "ac_cv_lib_$ac_lib_var=no"
  3536. fi
  3537. rm -f conftest*
  3538. LIBS="$ac_save_LIBS"
  3539. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3540. echo "$ac_t""yes" 1>&6
  3541. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  3542. else
  3543. echo "$ac_t""no" 1>&6
  3544. fi
  3545. fi
  3546. # lieder@skyler.mavd.honeywell.com says without -lsocket,
  3547. # socket/setsockopt and other routines are undefined under SCO ODT
  3548. # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
  3549. # on later versions), says simon@lia.di.epfl.ch: it contains
  3550. # gethostby* variants that don't use the nameserver (or something).
  3551. # -lsocket must be given before -lnsl if both are needed.
  3552. # We assume that if connect needs -lnsl, so does gethostbyname.
  3553. echo $ac_n "checking for connect""... $ac_c" 1>&6
  3554. echo "configure:4245: checking for connect" >&5
  3555. cat > conftest.$ac_ext <<EOF
  3556. #line 4248 "configure"
  3557. #include "confdefs.h"
  3558. /* System header to define __stub macros and hopefully few prototypes,
  3559. which can conflict with char connect(); below. */
  3560. #include <assert.h>
  3561. /* Override any gcc2 internal prototype to avoid an error. */
  3562. /* We use char because int might match the return type of a gcc2
  3563. builtin and then its argument prototype would still apply. */
  3564. char connect();
  3565. int main() {
  3566. /* The GNU C library defines this for functions which it implements
  3567. to always fail with ENOSYS. Some functions are actually named
  3568. something starting with __ and the normal name is an alias. */
  3569. #if defined (__stub_connect) || defined (__stub___connect)
  3570. choke me
  3571. #else
  3572. connect();
  3573. #endif
  3574. ; return 0; }
  3575. EOF
  3576. if { (eval echo configure:4271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3577. rm -rf conftest*
  3578. eval "ac_cv_func_connect=yes"
  3579. else
  3580. echo "configure: failed program was:" >&5
  3581. cat conftest.$ac_ext >&5
  3582. rm -rf conftest*
  3583. eval "ac_cv_func_connect=no"
  3584. fi
  3585. rm -f conftest*
  3586. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  3587. echo "$ac_t""yes" 1>&6
  3588. :
  3589. else
  3590. echo "$ac_t""no" 1>&6
  3591. fi
  3592. if test $ac_cv_func_connect = no; then
  3593. echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  3594. echo "configure:4291: checking for connect in -lsocket" >&5
  3595. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  3596. ac_save_LIBS="$LIBS"
  3597. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  3598. cat > conftest.$ac_ext <<EOF
  3599. #line 4297 "configure"
  3600. #include "confdefs.h"
  3601. /* Override any gcc2 internal prototype to avoid an error. */
  3602. /* We use char because int might match the return type of a gcc2
  3603. builtin and then its argument prototype would still apply. */
  3604. char connect();
  3605. int main() {
  3606. connect()
  3607. ; return 0; }
  3608. EOF
  3609. if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3610. rm -rf conftest*
  3611. eval "ac_cv_lib_$ac_lib_var=yes"
  3612. else
  3613. echo "configure: failed program was:" >&5
  3614. cat conftest.$ac_ext >&5
  3615. rm -rf conftest*
  3616. eval "ac_cv_lib_$ac_lib_var=no"
  3617. fi
  3618. rm -f conftest*
  3619. LIBS="$ac_save_LIBS"
  3620. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3621. echo "$ac_t""yes" 1>&6
  3622. X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  3623. else
  3624. echo "$ac_t""no" 1>&6
  3625. fi
  3626. fi
  3627. # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  3628. echo $ac_n "checking for remove""... $ac_c" 1>&6
  3629. echo "configure:4331: checking for remove" >&5
  3630. cat > conftest.$ac_ext <<EOF
  3631. #line 4334 "configure"
  3632. #include "confdefs.h"
  3633. /* System header to define __stub macros and hopefully few prototypes,
  3634. which can conflict with char remove(); below. */
  3635. #include <assert.h>
  3636. /* Override any gcc2 internal prototype to avoid an error. */
  3637. /* We use char because int might match the return type of a gcc2
  3638. builtin and then its argument prototype would still apply. */
  3639. char remove();
  3640. int main() {
  3641. /* The GNU C library defines this for functions which it implements
  3642. to always fail with ENOSYS. Some functions are actually named
  3643. something starting with __ and the normal name is an alias. */
  3644. #if defined (__stub_remove) || defined (__stub___remove)
  3645. choke me
  3646. #else
  3647. remove();
  3648. #endif
  3649. ; return 0; }
  3650. EOF
  3651. if { (eval echo configure:4357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3652. rm -rf conftest*
  3653. eval "ac_cv_func_remove=yes"
  3654. else
  3655. echo "configure: failed program was:" >&5
  3656. cat conftest.$ac_ext >&5
  3657. rm -rf conftest*
  3658. eval "ac_cv_func_remove=no"
  3659. fi
  3660. rm -f conftest*
  3661. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  3662. echo "$ac_t""yes" 1>&6
  3663. :
  3664. else
  3665. echo "$ac_t""no" 1>&6
  3666. fi
  3667. if test $ac_cv_func_remove = no; then
  3668. echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  3669. echo "configure:4377: checking for remove in -lposix" >&5
  3670. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  3671. ac_save_LIBS="$LIBS"
  3672. LIBS="-lposix $LIBS"
  3673. cat > conftest.$ac_ext <<EOF
  3674. #line 4383 "configure"
  3675. #include "confdefs.h"
  3676. /* Override any gcc2 internal prototype to avoid an error. */
  3677. /* We use char because int might match the return type of a gcc2
  3678. builtin and then its argument prototype would still apply. */
  3679. char remove();
  3680. int main() {
  3681. remove()
  3682. ; return 0; }
  3683. EOF
  3684. if { (eval echo configure:4394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3685. rm -rf conftest*
  3686. eval "ac_cv_lib_$ac_lib_var=yes"
  3687. else
  3688. echo "configure: failed program was:" >&5
  3689. cat conftest.$ac_ext >&5
  3690. rm -rf conftest*
  3691. eval "ac_cv_lib_$ac_lib_var=no"
  3692. fi
  3693. rm -f conftest*
  3694. LIBS="$ac_save_LIBS"
  3695. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3696. echo "$ac_t""yes" 1>&6
  3697. X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  3698. else
  3699. echo "$ac_t""no" 1>&6
  3700. fi
  3701. fi
  3702. # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  3703. echo $ac_n "checking for shmat""... $ac_c" 1>&6
  3704. echo "configure:4417: checking for shmat" >&5
  3705. cat > conftest.$ac_ext <<EOF
  3706. #line 4420 "configure"
  3707. #include "confdefs.h"
  3708. /* System header to define __stub macros and hopefully few prototypes,
  3709. which can conflict with char shmat(); below. */
  3710. #include <assert.h>
  3711. /* Override any gcc2 internal prototype to avoid an error. */
  3712. /* We use char because int might match the return type of a gcc2
  3713. builtin and then its argument prototype would still apply. */
  3714. char shmat();
  3715. int main() {
  3716. /* The GNU C library defines this for functions which it implements
  3717. to always fail with ENOSYS. Some functions are actually named
  3718. something starting with __ and the normal name is an alias. */
  3719. #if defined (__stub_shmat) || defined (__stub___shmat)
  3720. choke me
  3721. #else
  3722. shmat();
  3723. #endif
  3724. ; return 0; }
  3725. EOF
  3726. if { (eval echo configure:4443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3727. rm -rf conftest*
  3728. eval "ac_cv_func_shmat=yes"
  3729. else
  3730. echo "configure: failed program was:" >&5
  3731. cat conftest.$ac_ext >&5
  3732. rm -rf conftest*
  3733. eval "ac_cv_func_shmat=no"
  3734. fi
  3735. rm -f conftest*
  3736. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  3737. echo "$ac_t""yes" 1>&6
  3738. :
  3739. else
  3740. echo "$ac_t""no" 1>&6
  3741. fi
  3742. if test $ac_cv_func_shmat = no; then
  3743. echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  3744. echo "configure:4463: checking for shmat in -lipc" >&5
  3745. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  3746. ac_save_LIBS="$LIBS"
  3747. LIBS="-lipc $LIBS"
  3748. cat > conftest.$ac_ext <<EOF
  3749. #line 4469 "configure"
  3750. #include "confdefs.h"
  3751. /* Override any gcc2 internal prototype to avoid an error. */
  3752. /* We use char because int might match the return type of a gcc2
  3753. builtin and then its argument prototype would still apply. */
  3754. char shmat();
  3755. int main() {
  3756. shmat()
  3757. ; return 0; }
  3758. EOF
  3759. if { (eval echo configure:4480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3760. rm -rf conftest*
  3761. eval "ac_cv_lib_$ac_lib_var=yes"
  3762. else
  3763. echo "configure: failed program was:" >&5
  3764. cat conftest.$ac_ext >&5
  3765. rm -rf conftest*
  3766. eval "ac_cv_lib_$ac_lib_var=no"
  3767. fi
  3768. rm -f conftest*
  3769. LIBS="$ac_save_LIBS"
  3770. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3771. echo "$ac_t""yes" 1>&6
  3772. X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  3773. else
  3774. echo "$ac_t""no" 1>&6
  3775. fi
  3776. fi
  3777. fi
  3778. # Check for libraries that X11R6 Xt/Xaw programs need.
  3779. ac_save_LDFLAGS="$LDFLAGS"
  3780. test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  3781. # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  3782. # check for ICE first), but we must link in the order -lSM -lICE or
  3783. # we get undefined symbols. So assume we have SM if we have ICE.
  3784. # These have to be linked with before -lX11, unlike the other
  3785. # libraries we check for below, so use a different variable.
  3786. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  3787. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  3788. echo "configure:4512: checking for IceConnectionNumber in -lICE" >&5
  3789. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  3790. ac_save_LIBS="$LIBS"
  3791. LIBS="-lICE $X_EXTRA_LIBS $LIBS"
  3792. cat > conftest.$ac_ext <<EOF
  3793. #line 4518 "configure"
  3794. #include "confdefs.h"
  3795. /* Override any gcc2 internal prototype to avoid an error. */
  3796. /* We use char because int might match the return type of a gcc2
  3797. builtin and then its argument prototype would still apply. */
  3798. char IceConnectionNumber();
  3799. int main() {
  3800. IceConnectionNumber()
  3801. ; return 0; }
  3802. EOF
  3803. if { (eval echo configure:4529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3804. rm -rf conftest*
  3805. eval "ac_cv_lib_$ac_lib_var=yes"
  3806. else
  3807. echo "configure: failed program was:" >&5
  3808. cat conftest.$ac_ext >&5
  3809. rm -rf conftest*
  3810. eval "ac_cv_lib_$ac_lib_var=no"
  3811. fi
  3812. rm -f conftest*
  3813. LIBS="$ac_save_LIBS"
  3814. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3815. echo "$ac_t""yes" 1>&6
  3816. X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  3817. else
  3818. echo "$ac_t""no" 1>&6
  3819. fi
  3820. LDFLAGS="$ac_save_LDFLAGS"
  3821. fi
  3822. if test "$no_x" != "yes"; then
  3823. USE_X11="1"
  3824. XLIB=-lX11
  3825. XTLIB=-lXt
  3826. fi
  3827. fi
  3828. # Note that some systems (FreeBSD for example) need an extra library for
  3829. # cuserid
  3830. ac_save_libs="$LIBS"
  3831. LIBS=""
  3832. echo $ac_n "checking for library containing cuserid""... $ac_c" 1>&6
  3833. echo "configure:4569: checking for library containing cuserid" >&5
  3834. ac_func_search_save_LIBS="$LIBS"
  3835. ac_cv_search_cuserid="no"
  3836. cat > conftest.$ac_ext <<EOF
  3837. #line 4574 "configure"
  3838. #include "confdefs.h"
  3839. /* Override any gcc2 internal prototype to avoid an error. */
  3840. /* We use char because int might match the return type of a gcc2
  3841. builtin and then its argument prototype would still apply. */
  3842. char cuserid();
  3843. int main() {
  3844. cuserid()
  3845. ; return 0; }
  3846. EOF
  3847. if { (eval echo configure:4585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3848. rm -rf conftest*
  3849. ac_cv_search_cuserid="none required"
  3850. else
  3851. echo "configure: failed program was:" >&5
  3852. cat conftest.$ac_ext >&5
  3853. fi
  3854. rm -f conftest*
  3855. test "$ac_cv_search_cuserid" = "no" && for i in compat; do
  3856. LIBS="-l$i $ac_func_search_save_LIBS"
  3857. cat > conftest.$ac_ext <<EOF
  3858. #line 4596 "configure"
  3859. #include "confdefs.h"
  3860. /* Override any gcc2 internal prototype to avoid an error. */
  3861. /* We use char because int might match the return type of a gcc2
  3862. builtin and then its argument prototype would still apply. */
  3863. char cuserid();
  3864. int main() {
  3865. cuserid()
  3866. ; return 0; }
  3867. EOF
  3868. if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3869. rm -rf conftest*
  3870. ac_cv_search_cuserid="-l$i"
  3871. break
  3872. else
  3873. echo "configure: failed program was:" >&5
  3874. cat conftest.$ac_ext >&5
  3875. fi
  3876. rm -f conftest*
  3877. done
  3878. LIBS="$ac_func_search_save_LIBS"
  3879. echo "$ac_t""$ac_cv_search_cuserid" 1>&6
  3880. if test "$ac_cv_search_cuserid" != "no"; then
  3881. test "$ac_cv_search_cuserid" = "none required" || LIBS="$ac_cv_search_cuserid $LIBS"
  3882. else :
  3883. fi
  3884. DBMIEXTRALIB="$LIBS"
  3885. LIBS="$ac_save_libs"
  3886. for ac_func in asprintf
  3887. do
  3888. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3889. echo "configure:4633: checking for $ac_func" >&5
  3890. cat > conftest.$ac_ext <<EOF
  3891. #line 4636 "configure"
  3892. #include "confdefs.h"
  3893. /* System header to define __stub macros and hopefully few prototypes,
  3894. which can conflict with char $ac_func(); below. */
  3895. #include <assert.h>
  3896. /* Override any gcc2 internal prototype to avoid an error. */
  3897. /* We use char because int might match the return type of a gcc2
  3898. builtin and then its argument prototype would still apply. */
  3899. char $ac_func();
  3900. int main() {
  3901. /* The GNU C library defines this for functions which it implements
  3902. to always fail with ENOSYS. Some functions are actually named
  3903. something starting with __ and the normal name is an alias. */
  3904. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3905. choke me
  3906. #else
  3907. $ac_func();
  3908. #endif
  3909. ; return 0; }
  3910. EOF
  3911. if { (eval echo configure:4659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3912. rm -rf conftest*
  3913. eval "ac_cv_func_$ac_func=yes"
  3914. else
  3915. echo "configure: failed program was:" >&5
  3916. cat conftest.$ac_ext >&5
  3917. rm -rf conftest*
  3918. eval "ac_cv_func_$ac_func=no"
  3919. fi
  3920. rm -f conftest*
  3921. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3922. echo "$ac_t""yes" 1>&6
  3923. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3924. cat >> confdefs.h <<EOF
  3925. #define $ac_tr_func 1
  3926. EOF
  3927. else
  3928. echo "$ac_t""no" 1>&6
  3929. fi
  3930. done
  3931. # Test if mathlib needs -lm flag or is included with libc
  3932. echo $ac_n "checking for atan""... $ac_c" 1>&6
  3933. echo "configure:4686: checking for atan" >&5
  3934. cat > conftest.$ac_ext <<EOF
  3935. #line 4689 "configure"
  3936. #include "confdefs.h"
  3937. /* System header to define __stub macros and hopefully few prototypes,
  3938. which can conflict with char atan(); below. */
  3939. #include <assert.h>
  3940. /* Override any gcc2 internal prototype to avoid an error. */
  3941. /* We use char because int might match the return type of a gcc2
  3942. builtin and then its argument prototype would still apply. */
  3943. char atan();
  3944. int main() {
  3945. /* The GNU C library defines this for functions which it implements
  3946. to always fail with ENOSYS. Some functions are actually named
  3947. something starting with __ and the normal name is an alias. */
  3948. #if defined (__stub_atan) || defined (__stub___atan)
  3949. choke me
  3950. #else
  3951. atan();
  3952. #endif
  3953. ; return 0; }
  3954. EOF
  3955. if { (eval echo configure:4712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3956. rm -rf conftest*
  3957. eval "ac_cv_func_atan=yes"
  3958. else
  3959. echo "configure: failed program was:" >&5
  3960. cat conftest.$ac_ext >&5
  3961. rm -rf conftest*
  3962. eval "ac_cv_func_atan=no"
  3963. fi
  3964. rm -f conftest*
  3965. if eval "test \"`echo '$ac_cv_func_'atan`\" = yes"; then
  3966. echo "$ac_t""yes" 1>&6
  3967. MATHLIB=
  3968. else
  3969. echo "$ac_t""no" 1>&6
  3970. echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6
  3971. echo "configure:4730: checking for atan in -lm" >&5
  3972. ac_lib_var=`echo m'_'atan | sed 'y%./+-%__p_%'`
  3973. ac_save_LIBS="$LIBS"
  3974. LIBS="-lm $LIBS"
  3975. cat > conftest.$ac_ext <<EOF
  3976. #line 4736 "configure"
  3977. #include "confdefs.h"
  3978. /* Override any gcc2 internal prototype to avoid an error. */
  3979. /* We use char because int might match the return type of a gcc2
  3980. builtin and then its argument prototype would still apply. */
  3981. char atan();
  3982. int main() {
  3983. atan()
  3984. ; return 0; }
  3985. EOF
  3986. if { (eval echo configure:4747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3987. rm -rf conftest*
  3988. eval "ac_cv_lib_$ac_lib_var=yes"
  3989. else
  3990. echo "configure: failed program was:" >&5
  3991. cat conftest.$ac_ext >&5
  3992. rm -rf conftest*
  3993. eval "ac_cv_lib_$ac_lib_var=no"
  3994. fi
  3995. rm -f conftest*
  3996. LIBS="$ac_save_LIBS"
  3997. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3998. echo "$ac_t""yes" 1>&6
  3999. MATHLIB=-lm
  4000. else
  4001. echo "$ac_t""no" 1>&6
  4002. { echo "configure: error: *** Failed check for math library." 1>&2; exit 1; }
  4003. fi
  4004. fi
  4005. echo $ac_n "checking for dlsym""... $ac_c" 1>&6
  4006. echo "configure:4774: checking for dlsym" >&5
  4007. cat > conftest.$ac_ext <<EOF
  4008. #line 4777 "configure"
  4009. #include "confdefs.h"
  4010. /* System header to define __stub macros and hopefully few prototypes,
  4011. which can conflict with char dlsym(); below. */
  4012. #include <assert.h>
  4013. /* Override any gcc2 internal prototype to avoid an error. */
  4014. /* We use char because int might match the return type of a gcc2
  4015. builtin and then its argument prototype would still apply. */
  4016. char dlsym();
  4017. int main() {
  4018. /* The GNU C library defines this for functions which it implements
  4019. to always fail with ENOSYS. Some functions are actually named
  4020. something starting with __ and the normal name is an alias. */
  4021. #if defined (__stub_dlsym) || defined (__stub___dlsym)
  4022. choke me
  4023. #else
  4024. dlsym();
  4025. #endif
  4026. ; return 0; }
  4027. EOF
  4028. if { (eval echo configure:4800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4029. rm -rf conftest*
  4030. eval "ac_cv_func_dlsym=yes"
  4031. else
  4032. echo "configure: failed program was:" >&5
  4033. cat conftest.$ac_ext >&5
  4034. rm -rf conftest*
  4035. eval "ac_cv_func_dlsym=no"
  4036. fi
  4037. rm -f conftest*
  4038. if eval "test \"`echo '$ac_cv_func_'dlsym`\" = yes"; then
  4039. echo "$ac_t""yes" 1>&6
  4040. DLLIB=
  4041. else
  4042. echo "$ac_t""no" 1>&6
  4043. echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
  4044. echo "configure:4818: checking for dlsym in -ldl" >&5
  4045. ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
  4046. ac_save_LIBS="$LIBS"
  4047. LIBS="-ldl $LIBS"
  4048. cat > conftest.$ac_ext <<EOF
  4049. #line 4824 "configure"
  4050. #include "confdefs.h"
  4051. /* Override any gcc2 internal prototype to avoid an error. */
  4052. /* We use char because int might match the return type of a gcc2
  4053. builtin and then its argument prototype would still apply. */
  4054. char dlsym();
  4055. int main() {
  4056. dlsym()
  4057. ; return 0; }
  4058. EOF
  4059. if { (eval echo configure:4835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4060. rm -rf conftest*
  4061. eval "ac_cv_lib_$ac_lib_var=yes"
  4062. else
  4063. echo "configure: failed program was:" >&5
  4064. cat conftest.$ac_ext >&5
  4065. rm -rf conftest*
  4066. eval "ac_cv_lib_$ac_lib_var=no"
  4067. fi
  4068. rm -f conftest*
  4069. LIBS="$ac_save_LIBS"
  4070. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4071. echo "$ac_t""yes" 1>&6
  4072. DLLIB=-ldl
  4073. else
  4074. echo "$ac_t""no" 1>&6
  4075. DLLIB=
  4076. fi
  4077. fi
  4078. echo $ac_n "checking for iconv""... $ac_c" 1>&6
  4079. echo "configure:4862: checking for iconv" >&5
  4080. cat > conftest.$ac_ext <<EOF
  4081. #line 4865 "configure"
  4082. #include "confdefs.h"
  4083. /* System header to define __stub macros and hopefully few prototypes,
  4084. which can conflict with char iconv(); below. */
  4085. #include <assert.h>
  4086. /* Override any gcc2 internal prototype to avoid an error. */
  4087. /* We use char because int might match the return type of a gcc2
  4088. builtin and then its argument prototype would still apply. */
  4089. char iconv();
  4090. int main() {
  4091. /* The GNU C library defines this for functions which it implements
  4092. to always fail with ENOSYS. Some functions are actually named
  4093. something starting with __ and the normal name is an alias. */
  4094. #if defined (__stub_iconv) || defined (__stub___iconv)
  4095. choke me
  4096. #else
  4097. iconv();
  4098. #endif
  4099. ; return 0; }
  4100. EOF
  4101. if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4102. rm -rf conftest*
  4103. eval "ac_cv_func_iconv=yes"
  4104. else
  4105. echo "configure: failed program was:" >&5
  4106. cat conftest.$ac_ext >&5
  4107. rm -rf conftest*
  4108. eval "ac_cv_func_iconv=no"
  4109. fi
  4110. rm -f conftest*
  4111. if eval "test \"`echo '$ac_cv_func_'iconv`\" = yes"; then
  4112. echo "$ac_t""yes" 1>&6
  4113. ICONVLIB=
  4114. else
  4115. echo "$ac_t""no" 1>&6
  4116. echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
  4117. echo "configure:4906: checking for iconv in -liconv" >&5
  4118. ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
  4119. ac_save_LIBS="$LIBS"
  4120. LIBS="-liconv $LIBS"
  4121. cat > conftest.$ac_ext <<EOF
  4122. #line 4912 "configure"
  4123. #include "confdefs.h"
  4124. /* Override any gcc2 internal prototype to avoid an error. */
  4125. /* We use char because int might match the return type of a gcc2
  4126. builtin and then its argument prototype would still apply. */
  4127. char iconv();
  4128. int main() {
  4129. iconv()
  4130. ; return 0; }
  4131. EOF
  4132. if { (eval echo configure:4923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4133. rm -rf conftest*
  4134. eval "ac_cv_lib_$ac_lib_var=yes"
  4135. else
  4136. echo "configure: failed program was:" >&5
  4137. cat conftest.$ac_ext >&5
  4138. rm -rf conftest*
  4139. eval "ac_cv_lib_$ac_lib_var=no"
  4140. fi
  4141. rm -f conftest*
  4142. LIBS="$ac_save_LIBS"
  4143. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4144. echo "$ac_t""yes" 1>&6
  4145. ICONVLIB=-liconv
  4146. else
  4147. echo "$ac_t""no" 1>&6
  4148. echo $ac_n "checking for iconv in -lgiconv""... $ac_c" 1>&6
  4149. echo "configure:4942: checking for iconv in -lgiconv" >&5
  4150. ac_lib_var=`echo giconv'_'iconv | sed 'y%./+-%__p_%'`
  4151. ac_save_LIBS="$LIBS"
  4152. LIBS="-lgiconv $LIBS"
  4153. cat > conftest.$ac_ext <<EOF
  4154. #line 4948 "configure"
  4155. #include "confdefs.h"
  4156. /* Override any gcc2 internal prototype to avoid an error. */
  4157. /* We use char because int might match the return type of a gcc2
  4158. builtin and then its argument prototype would still apply. */
  4159. char iconv();
  4160. int main() {
  4161. iconv()
  4162. ; return 0; }
  4163. EOF
  4164. if { (eval echo configure:4959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4165. rm -rf conftest*
  4166. eval "ac_cv_lib_$ac_lib_var=yes"
  4167. else
  4168. echo "configure: failed program was:" >&5
  4169. cat conftest.$ac_ext >&5
  4170. rm -rf conftest*
  4171. eval "ac_cv_lib_$ac_lib_var=no"
  4172. fi
  4173. rm -f conftest*
  4174. LIBS="$ac_save_LIBS"
  4175. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4176. echo "$ac_t""yes" 1>&6
  4177. ICONVLIB=-lgiconv
  4178. else
  4179. echo "$ac_t""no" 1>&6
  4180. echo $ac_n "checking for libiconv""... $ac_c" 1>&6
  4181. echo "configure:4978: checking for libiconv" >&5
  4182. cat > conftest.$ac_ext <<EOF
  4183. #line 4981 "configure"
  4184. #include "confdefs.h"
  4185. /* System header to define __stub macros and hopefully few prototypes,
  4186. which can conflict with char libiconv(); below. */
  4187. #include <assert.h>
  4188. /* Override any gcc2 internal prototype to avoid an error. */
  4189. /* We use char because int might match the return type of a gcc2
  4190. builtin and then its argument prototype would still apply. */
  4191. char libiconv();
  4192. int main() {
  4193. /* The GNU C library defines this for functions which it implements
  4194. to always fail with ENOSYS. Some functions are actually named
  4195. something starting with __ and the normal name is an alias. */
  4196. #if defined (__stub_libiconv) || defined (__stub___libiconv)
  4197. choke me
  4198. #else
  4199. libiconv();
  4200. #endif
  4201. ; return 0; }
  4202. EOF
  4203. if { (eval echo configure:5004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4204. rm -rf conftest*
  4205. eval "ac_cv_func_libiconv=yes"
  4206. else
  4207. echo "configure: failed program was:" >&5
  4208. cat conftest.$ac_ext >&5
  4209. rm -rf conftest*
  4210. eval "ac_cv_func_libiconv=no"
  4211. fi
  4212. rm -f conftest*
  4213. if eval "test \"`echo '$ac_cv_func_'libiconv`\" = yes"; then
  4214. echo "$ac_t""yes" 1>&6
  4215. ICONVLIB=
  4216. else
  4217. echo "$ac_t""no" 1>&6
  4218. echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6
  4219. echo "configure:5022: checking for libiconv in -liconv" >&5
  4220. ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'`
  4221. ac_save_LIBS="$LIBS"
  4222. LIBS="-liconv $LIBS"
  4223. cat > conftest.$ac_ext <<EOF
  4224. #line 5028 "configure"
  4225. #include "confdefs.h"
  4226. /* Override any gcc2 internal prototype to avoid an error. */
  4227. /* We use char because int might match the return type of a gcc2
  4228. builtin and then its argument prototype would still apply. */
  4229. char libiconv();
  4230. int main() {
  4231. libiconv()
  4232. ; return 0; }
  4233. EOF
  4234. if { (eval echo configure:5039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4235. rm -rf conftest*
  4236. eval "ac_cv_lib_$ac_lib_var=yes"
  4237. else
  4238. echo "configure: failed program was:" >&5
  4239. cat conftest.$ac_ext >&5
  4240. rm -rf conftest*
  4241. eval "ac_cv_lib_$ac_lib_var=no"
  4242. fi
  4243. rm -f conftest*
  4244. LIBS="$ac_save_LIBS"
  4245. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4246. echo "$ac_t""yes" 1>&6
  4247. ICONVLIB=-liconv
  4248. else
  4249. echo "$ac_t""no" 1>&6
  4250. echo $ac_n "checking for libiconv in -lgiconv""... $ac_c" 1>&6
  4251. echo "configure:5058: checking for libiconv in -lgiconv" >&5
  4252. ac_lib_var=`echo giconv'_'libiconv | sed 'y%./+-%__p_%'`
  4253. ac_save_LIBS="$LIBS"
  4254. LIBS="-lgiconv $LIBS"
  4255. cat > conftest.$ac_ext <<EOF
  4256. #line 5064 "configure"
  4257. #include "confdefs.h"
  4258. /* Override any gcc2 internal prototype to avoid an error. */
  4259. /* We use char because int might match the return type of a gcc2
  4260. builtin and then its argument prototype would still apply. */
  4261. char libiconv();
  4262. int main() {
  4263. libiconv()
  4264. ; return 0; }
  4265. EOF
  4266. if { (eval echo configure:5075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4267. rm -rf conftest*
  4268. eval "ac_cv_lib_$ac_lib_var=yes"
  4269. else
  4270. echo "configure: failed program was:" >&5
  4271. cat conftest.$ac_ext >&5
  4272. rm -rf conftest*
  4273. eval "ac_cv_lib_$ac_lib_var=no"
  4274. fi
  4275. rm -f conftest*
  4276. LIBS="$ac_save_LIBS"
  4277. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4278. echo "$ac_t""yes" 1>&6
  4279. ICONVLIB=-lgiconv
  4280. else
  4281. echo "$ac_t""no" 1>&6
  4282. echo "configure: warning: *** Unable to locate iconv() function." 1>&2
  4283. ICONVLIB=
  4284. fi
  4285. fi
  4286. fi
  4287. fi
  4288. fi
  4289. fi
  4290. have_socket=1
  4291. echo $ac_n "checking for socket""... $ac_c" 1>&6
  4292. echo "configure:5112: checking for socket" >&5
  4293. cat > conftest.$ac_ext <<EOF
  4294. #line 5115 "configure"
  4295. #include "confdefs.h"
  4296. /* System header to define __stub macros and hopefully few prototypes,
  4297. which can conflict with char socket(); below. */
  4298. #include <assert.h>
  4299. /* Override any gcc2 internal prototype to avoid an error. */
  4300. /* We use char because int might match the return type of a gcc2
  4301. builtin and then its argument prototype would still apply. */
  4302. char socket();
  4303. int main() {
  4304. /* The GNU C library defines this for functions which it implements
  4305. to always fail with ENOSYS. Some functions are actually named
  4306. something starting with __ and the normal name is an alias. */
  4307. #if defined (__stub_socket) || defined (__stub___socket)
  4308. choke me
  4309. #else
  4310. socket();
  4311. #endif
  4312. ; return 0; }
  4313. EOF
  4314. if { (eval echo configure:5138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4315. rm -rf conftest*
  4316. eval "ac_cv_func_socket=yes"
  4317. else
  4318. echo "configure: failed program was:" >&5
  4319. cat conftest.$ac_ext >&5
  4320. rm -rf conftest*
  4321. eval "ac_cv_func_socket=no"
  4322. fi
  4323. rm -f conftest*
  4324. if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
  4325. echo "$ac_t""yes" 1>&6
  4326. SOCKLIB=
  4327. else
  4328. echo "$ac_t""no" 1>&6
  4329. echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
  4330. echo "configure:5156: checking for socket in -lsocket" >&5
  4331. ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
  4332. ac_save_LIBS="$LIBS"
  4333. LIBS="-lsocket $LIBS"
  4334. cat > conftest.$ac_ext <<EOF
  4335. #line 5162 "configure"
  4336. #include "confdefs.h"
  4337. /* Override any gcc2 internal prototype to avoid an error. */
  4338. /* We use char because int might match the return type of a gcc2
  4339. builtin and then its argument prototype would still apply. */
  4340. char socket();
  4341. int main() {
  4342. socket()
  4343. ; return 0; }
  4344. EOF
  4345. if { (eval echo configure:5173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4346. rm -rf conftest*
  4347. eval "ac_cv_lib_$ac_lib_var=yes"
  4348. else
  4349. echo "configure: failed program was:" >&5
  4350. cat conftest.$ac_ext >&5
  4351. rm -rf conftest*
  4352. eval "ac_cv_lib_$ac_lib_var=no"
  4353. fi
  4354. rm -f conftest*
  4355. LIBS="$ac_save_LIBS"
  4356. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4357. echo "$ac_t""yes" 1>&6
  4358. SOCKLIB=-lsocket
  4359. else
  4360. echo "$ac_t""no" 1>&6
  4361. have_socket=0
  4362. echo "configure: warning: *** Unable to locate socket() function." 1>&2
  4363. fi
  4364. fi
  4365. if test "$have_socket" = 1 ; then
  4366. HAVE_SOCKET=1
  4367. cat >> confdefs.h <<\EOF
  4368. #define HAVE_SOCKET 1
  4369. EOF
  4370. else
  4371. HAVE_SOCKET=
  4372. fi
  4373. # Mandatory zlib dependency
  4374. ZLIBLIBPATH=
  4375. ZLIBINCPATH=
  4376. ZLIB=
  4377. # With zlib includes directory
  4378. echo $ac_n "checking for location of zlib includes""... $ac_c" 1>&6
  4379. echo "configure:5221: checking for location of zlib includes" >&5
  4380. case "$with_zlib_includes" in
  4381. y | ye | yes | n | no)
  4382. { echo "configure: error: *** You must supply a directory to --with-zlib-includes." 1>&2; exit 1; }
  4383. ;;
  4384. esac
  4385. echo "$ac_t""$with_zlib_includes" 1>&6
  4386. if test -n "$with_zlib_includes" ; then
  4387. for dir in $with_zlib_includes; do
  4388. if test -d "$dir"; then
  4389. ZLIBINCPATH="$ZLIBINCPATH -I$dir"
  4390. else
  4391. { echo "configure: error: *** zlib includes directory $dir does not exist." 1>&2; exit 1; }
  4392. fi
  4393. done
  4394. fi
  4395. ac_save_cppflags="$CPPFLAGS"
  4396. CPPFLAGS="$ZLIBINCPATH $CPPFLAGS"
  4397. for ac_hdr in zlib.h
  4398. do
  4399. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4400. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4401. echo "configure:5247: checking for $ac_hdr" >&5
  4402. cat > conftest.$ac_ext <<EOF
  4403. #line 5250 "configure"
  4404. #include "confdefs.h"
  4405. #include <$ac_hdr>
  4406. EOF
  4407. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4408. { (eval echo configure:5255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4409. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4410. if test -z "$ac_err"; then
  4411. rm -rf conftest*
  4412. eval "ac_cv_header_$ac_safe=yes"
  4413. else
  4414. echo "$ac_err" >&5
  4415. echo "configure: failed program was:" >&5
  4416. cat conftest.$ac_ext >&5
  4417. rm -rf conftest*
  4418. eval "ac_cv_header_$ac_safe=no"
  4419. fi
  4420. rm -f conftest*
  4421. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4422. echo "$ac_t""yes" 1>&6
  4423. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4424. cat >> confdefs.h <<EOF
  4425. #define $ac_tr_hdr 1
  4426. EOF
  4427. else
  4428. echo "$ac_t""no" 1>&6
  4429. { echo "configure: error: *** Unable to locate zlib includes." 1>&2; exit 1; }
  4430. fi
  4431. done
  4432. CPPFLAGS=$ac_save_cppflags
  4433. # With zlib library directory
  4434. echo $ac_n "checking for location of zlib library""... $ac_c" 1>&6
  4435. echo "configure:5289: checking for location of zlib library" >&5
  4436. case "$with_zlib_libs" in
  4437. y | ye | yes | n | no)
  4438. { echo "configure: error: *** You must supply a directory to --with-zlib-libs." 1>&2; exit 1; }
  4439. ;;
  4440. esac
  4441. echo "$ac_t""$with_zlib_libs" 1>&6
  4442. if test -n "$with_zlib_libs"; then
  4443. for dir in $with_zlib_libs; do
  4444. if test -d "$dir"; then
  4445. ZLIBLIBPATH="$ZLIBLIBPATH -L$dir"
  4446. else
  4447. { echo "configure: error: *** zlib library directory $dir does not exist." 1>&2; exit 1; }
  4448. fi
  4449. done
  4450. fi
  4451. ac_save_ldflags="$LDFLAGS"
  4452. LDFLAGS="$ZLIBLIBPATH $LDFLAGS"
  4453. echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
  4454. echo "configure:5314: checking for deflate in -lz" >&5
  4455. ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
  4456. ac_save_LIBS="$LIBS"
  4457. LIBS="-lz $LIBS"
  4458. cat > conftest.$ac_ext <<EOF
  4459. #line 5320 "configure"
  4460. #include "confdefs.h"
  4461. /* Override any gcc2 internal prototype to avoid an error. */
  4462. /* We use char because int might match the return type of a gcc2
  4463. builtin and then its argument prototype would still apply. */
  4464. char deflate();
  4465. int main() {
  4466. deflate()
  4467. ; return 0; }
  4468. EOF
  4469. if { (eval echo configure:5331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4470. rm -rf conftest*
  4471. eval "ac_cv_lib_$ac_lib_var=yes"
  4472. else
  4473. echo "configure: failed program was:" >&5
  4474. cat conftest.$ac_ext >&5
  4475. rm -rf conftest*
  4476. eval "ac_cv_lib_$ac_lib_var=no"
  4477. fi
  4478. rm -f conftest*
  4479. LIBS="$ac_save_LIBS"
  4480. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4481. echo "$ac_t""yes" 1>&6
  4482. ZLIB="$ZLIB -lz "
  4483. else
  4484. echo "$ac_t""no" 1>&6
  4485. LDFLAGS=${ac_save_ldflags}
  4486. { echo "configure: error: *** Unable to locate zlib library." 1>&2; exit 1; }
  4487. fi
  4488. LDFLAGS=${ac_save_ldflags}
  4489. #
  4490. # Done checking zlib
  4491. # bzip2 support
  4492. BZIP2LIBPATH=
  4493. BZIP2INCPATH=
  4494. BZIP2LIB=
  4495. echo $ac_n "checking whether to use bzlib""... $ac_c" 1>&6
  4496. echo "configure:5377: checking whether to use bzlib" >&5
  4497. echo "$ac_t"""$with_bzlib"" 1>&6
  4498. case "$with_bzlib" in
  4499. "no") USE_BZIP2= ;;
  4500. "yes") USE_BZIP2="1" ;;
  4501. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  4502. esac
  4503. if test -n "$USE_BZIP2"; then
  4504. # With bzip2 includes directory
  4505. echo $ac_n "checking for location of bzlib includes""... $ac_c" 1>&6
  4506. echo "configure:5393: checking for location of bzlib includes" >&5
  4507. case "$with_bzlib_includes" in
  4508. y | ye | yes | n | no)
  4509. { echo "configure: error: *** You must supply a directory to --with-bzlib-includes." 1>&2; exit 1; }
  4510. ;;
  4511. esac
  4512. echo "$ac_t""$with_bzlib_includes" 1>&6
  4513. if test -n "$with_bzlib_includes" ; then
  4514. for dir in $with_bzlib_includes; do
  4515. if test -d "$dir"; then
  4516. BZIP2INCPATH="$BZIP2INCPATH -I$dir"
  4517. else
  4518. { echo "configure: error: *** bzlib includes directory $dir does not exist." 1>&2; exit 1; }
  4519. fi
  4520. done
  4521. fi
  4522. ac_save_cppflags="$CPPFLAGS"
  4523. CPPFLAGS="$BZIP2INCPATH $CPPFLAGS"
  4524. for ac_hdr in bzlib.h
  4525. do
  4526. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4527. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4528. echo "configure:5419: checking for $ac_hdr" >&5
  4529. cat > conftest.$ac_ext <<EOF
  4530. #line 5422 "configure"
  4531. #include "confdefs.h"
  4532. #include <$ac_hdr>
  4533. EOF
  4534. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4535. { (eval echo configure:5427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4536. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4537. if test -z "$ac_err"; then
  4538. rm -rf conftest*
  4539. eval "ac_cv_header_$ac_safe=yes"
  4540. else
  4541. echo "$ac_err" >&5
  4542. echo "configure: failed program was:" >&5
  4543. cat conftest.$ac_ext >&5
  4544. rm -rf conftest*
  4545. eval "ac_cv_header_$ac_safe=no"
  4546. fi
  4547. rm -f conftest*
  4548. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4549. echo "$ac_t""yes" 1>&6
  4550. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4551. cat >> confdefs.h <<EOF
  4552. #define $ac_tr_hdr 1
  4553. EOF
  4554. else
  4555. echo "$ac_t""no" 1>&6
  4556. { echo "configure: error: *** Unable to locate bzlib includes." 1>&2; exit 1; }
  4557. fi
  4558. done
  4559. CPPFLAGS=$ac_save_cppflags
  4560. # With bzip2 library directory
  4561. echo $ac_n "checking for location of bzlib library""... $ac_c" 1>&6
  4562. echo "configure:5461: checking for location of bzlib library" >&5
  4563. case "$with_bzlib_libs" in
  4564. y | ye | yes | n | no)
  4565. { echo "configure: error: *** You must supply a directory to --with-bzlib-libs." 1>&2; exit 1; }
  4566. ;;
  4567. esac
  4568. echo "$ac_t""$with_bzlib_libs" 1>&6
  4569. if test -n "$with_bzlib_libs"; then
  4570. for dir in $with_bzlib_libs; do
  4571. if test -d "$dir"; then
  4572. BZIP2LIBPATH="$BZIP2LIBPATH -L$dir"
  4573. else
  4574. { echo "configure: error: *** bzlib library directory $dir does not exist." 1>&2; exit 1; }
  4575. fi
  4576. done
  4577. fi
  4578. ac_save_ldflags="$LDFLAGS"
  4579. LDFLAGS="$BZIP2LIBPATH $LDFLAGS"
  4580. echo $ac_n "checking for BZ2_bzBuffToBuffCompress in -lbz2""... $ac_c" 1>&6
  4581. echo "configure:5486: checking for BZ2_bzBuffToBuffCompress in -lbz2" >&5
  4582. ac_lib_var=`echo bz2'_'BZ2_bzBuffToBuffCompress | sed 'y%./+-%__p_%'`
  4583. ac_save_LIBS="$LIBS"
  4584. LIBS="-lbz2 $LIBS"
  4585. cat > conftest.$ac_ext <<EOF
  4586. #line 5492 "configure"
  4587. #include "confdefs.h"
  4588. /* Override any gcc2 internal prototype to avoid an error. */
  4589. /* We use char because int might match the return type of a gcc2
  4590. builtin and then its argument prototype would still apply. */
  4591. char BZ2_bzBuffToBuffCompress();
  4592. int main() {
  4593. BZ2_bzBuffToBuffCompress()
  4594. ; return 0; }
  4595. EOF
  4596. if { (eval echo configure:5503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4597. rm -rf conftest*
  4598. eval "ac_cv_lib_$ac_lib_var=yes"
  4599. else
  4600. echo "configure: failed program was:" >&5
  4601. cat conftest.$ac_ext >&5
  4602. rm -rf conftest*
  4603. eval "ac_cv_lib_$ac_lib_var=no"
  4604. fi
  4605. rm -f conftest*
  4606. LIBS="$ac_save_LIBS"
  4607. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4608. echo "$ac_t""yes" 1>&6
  4609. BZIP2LIB="$BZIP2LIB -lbz2 "
  4610. else
  4611. echo "$ac_t""no" 1>&6
  4612. LDFLAGS=${ac_save_ldflags}
  4613. { echo "configure: error: *** Unable to locate bzlib library." 1>&2; exit 1; }
  4614. fi
  4615. LDFLAGS=${ac_save_ldflags}
  4616. #
  4617. fi # $USE_BZIP2
  4618. # Done checking bzip2
  4619. # zstd support
  4620. ZSTDLIBPATH=
  4621. ZSTDINCPATH=
  4622. ZSTDLIB=
  4623. echo $ac_n "checking whether to use zstd""... $ac_c" 1>&6
  4624. echo "configure:5551: checking whether to use zstd" >&5
  4625. echo "$ac_t"""$with_zstd"" 1>&6
  4626. case "$with_zstd" in
  4627. "no") USE_ZSTD= ;;
  4628. "yes") USE_ZSTD="1" ;;
  4629. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  4630. esac
  4631. if test -n "$USE_ZSTD"; then
  4632. # With zstd includes directory
  4633. echo $ac_n "checking for location of zstd includes""... $ac_c" 1>&6
  4634. echo "configure:5567: checking for location of zstd includes" >&5
  4635. case "$with_zstd_includes" in
  4636. y | ye | yes | n | no)
  4637. { echo "configure: error: *** You must supply a directory to --with-zstd-includes." 1>&2; exit 1; }
  4638. ;;
  4639. esac
  4640. echo "$ac_t""$with_zstd_includes" 1>&6
  4641. if test -n "$with_zstd_includes" ; then
  4642. for dir in $with_zstd_includes; do
  4643. if test -d "$dir"; then
  4644. ZSTDINCPATH="$ZSTDINCPATH -I$dir"
  4645. else
  4646. { echo "configure: error: *** zstd includes directory $dir does not exist." 1>&2; exit 1; }
  4647. fi
  4648. done
  4649. fi
  4650. ac_save_cppflags="$CPPFLAGS"
  4651. CPPFLAGS="$ZSTDINCPATH $CPPFLAGS"
  4652. for ac_hdr in zstd.h
  4653. do
  4654. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4655. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4656. echo "configure:5592: checking for $ac_hdr" >&5
  4657. cat > conftest.$ac_ext <<EOF
  4658. #line 5595 "configure"
  4659. #include "confdefs.h"
  4660. #include <$ac_hdr>
  4661. EOF
  4662. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4663. { (eval echo configure:5600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4664. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4665. if test -z "$ac_err"; then
  4666. rm -rf conftest*
  4667. eval "ac_cv_header_$ac_safe=yes"
  4668. else
  4669. echo "$ac_err" >&5
  4670. echo "configure: failed program was:" >&5
  4671. cat conftest.$ac_ext >&5
  4672. rm -rf conftest*
  4673. eval "ac_cv_header_$ac_safe=no"
  4674. fi
  4675. rm -f conftest*
  4676. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4677. echo "$ac_t""yes" 1>&6
  4678. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4679. cat >> confdefs.h <<EOF
  4680. #define $ac_tr_hdr 1
  4681. EOF
  4682. else
  4683. echo "$ac_t""no" 1>&6
  4684. { echo "configure: error: *** Unable to locate zstd includes." 1>&2; exit 1; }
  4685. fi
  4686. done
  4687. CPPFLAGS=$ac_save_cppflags
  4688. # With zstd library directory
  4689. echo $ac_n "checking for location of zstd library""... $ac_c" 1>&6
  4690. echo "configure:5634: checking for location of zstd library" >&5
  4691. case "$with_zstd_libs" in
  4692. y | ye | yes | n | no)
  4693. { echo "configure: error: *** You must supply a directory to --with-zstd-libs." 1>&2; exit 1; }
  4694. ;;
  4695. esac
  4696. echo "$ac_t""$with_zstd_libs" 1>&6
  4697. if test -n "$with_zstd_libs"; then
  4698. for dir in $with_zstd_libs; do
  4699. if test -d "$dir"; then
  4700. ZSTDLIBPATH="$ZSTDLIBPATH -L$dir"
  4701. else
  4702. { echo "configure: error: *** zstd library directory $dir does not exist." 1>&2; exit 1; }
  4703. fi
  4704. done
  4705. fi
  4706. ac_save_ldflags="$LDFLAGS"
  4707. LDFLAGS="$ZSTDLIBPATH $LDFLAGS"
  4708. echo $ac_n "checking for ZSTD_compress in -lzstd""... $ac_c" 1>&6
  4709. echo "configure:5659: checking for ZSTD_compress in -lzstd" >&5
  4710. ac_lib_var=`echo zstd'_'ZSTD_compress | sed 'y%./+-%__p_%'`
  4711. ac_save_LIBS="$LIBS"
  4712. LIBS="-lzstd $LIBS"
  4713. cat > conftest.$ac_ext <<EOF
  4714. #line 5665 "configure"
  4715. #include "confdefs.h"
  4716. /* Override any gcc2 internal prototype to avoid an error. */
  4717. /* We use char because int might match the return type of a gcc2
  4718. builtin and then its argument prototype would still apply. */
  4719. char ZSTD_compress();
  4720. int main() {
  4721. ZSTD_compress()
  4722. ; return 0; }
  4723. EOF
  4724. if { (eval echo configure:5676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4725. rm -rf conftest*
  4726. eval "ac_cv_lib_$ac_lib_var=yes"
  4727. else
  4728. echo "configure: failed program was:" >&5
  4729. cat conftest.$ac_ext >&5
  4730. rm -rf conftest*
  4731. eval "ac_cv_lib_$ac_lib_var=no"
  4732. fi
  4733. rm -f conftest*
  4734. LIBS="$ac_save_LIBS"
  4735. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4736. echo "$ac_t""yes" 1>&6
  4737. ZSTDLIB="$ZSTDLIB -lzstd "
  4738. else
  4739. echo "$ac_t""no" 1>&6
  4740. LDFLAGS=${ac_save_ldflags}
  4741. { echo "configure: error: *** Unable to locate zstd library." 1>&2; exit 1; }
  4742. fi
  4743. LDFLAGS=${ac_save_ldflags}
  4744. #
  4745. fi # $USE_ZSTD
  4746. # Done checking zstd
  4747. # Mandatory PROJ dependency
  4748. PROJINC=
  4749. PROJLIB=
  4750. PROJSHARE=
  4751. PROJ4API=0
  4752. PROJMAJOR=4
  4753. # With PROJ includes directory
  4754. echo $ac_n "checking for location of External PROJ includes""... $ac_c" 1>&6
  4755. echo "configure:5728: checking for location of External PROJ includes" >&5
  4756. case "$with_proj_includes" in
  4757. y | ye | yes | n | no)
  4758. { echo "configure: error: *** You must supply a directory to --with-proj-includes." 1>&2; exit 1; }
  4759. ;;
  4760. esac
  4761. echo "$ac_t""$with_proj_includes" 1>&6
  4762. if test -n "$with_proj_includes" ; then
  4763. for dir in $with_proj_includes; do
  4764. if test -d "$dir"; then
  4765. PROJINC="$PROJINC -I$dir"
  4766. else
  4767. { echo "configure: error: *** External PROJ includes directory $dir does not exist." 1>&2; exit 1; }
  4768. fi
  4769. done
  4770. fi
  4771. # PROJ version check: if proj.h exists, it must be proj 5+
  4772. ac_save_cppflags="$CPPFLAGS"
  4773. CPPFLAGS="$PROJINC $CPPFLAGS"
  4774. for ac_hdr in proj.h
  4775. do
  4776. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4777. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4778. echo "configure:5755: checking for $ac_hdr" >&5
  4779. cat > conftest.$ac_ext <<EOF
  4780. #line 5758 "configure"
  4781. #include "confdefs.h"
  4782. #include <$ac_hdr>
  4783. EOF
  4784. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4785. { (eval echo configure:5763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4786. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4787. if test -z "$ac_err"; then
  4788. rm -rf conftest*
  4789. eval "ac_cv_header_$ac_safe=yes"
  4790. else
  4791. echo "$ac_err" >&5
  4792. echo "configure: failed program was:" >&5
  4793. cat conftest.$ac_ext >&5
  4794. rm -rf conftest*
  4795. eval "ac_cv_header_$ac_safe=no"
  4796. fi
  4797. rm -f conftest*
  4798. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4799. echo "$ac_t""yes" 1>&6
  4800. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4801. cat >> confdefs.h <<EOF
  4802. #define $ac_tr_hdr 1
  4803. EOF
  4804. else
  4805. echo "$ac_t""no" 1>&6
  4806. PROJ4API=1
  4807. fi
  4808. done
  4809. CPPFLAGS=$ac_save_cppflags
  4810. if test $PROJ4API = 0 ; then
  4811. echo $ac_n "checking External PROJ major version""... $ac_c" 1>&6
  4812. echo "configure:5795: checking External PROJ major version" >&5
  4813. ac_save_cppflags="$CPPFLAGS"
  4814. CPPFLAGS="$PROJINC $CPPFLAGS"
  4815. if test "$cross_compiling" = yes; then
  4816. proj_ver_major=0
  4817. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4818. else
  4819. cat > conftest.$ac_ext <<EOF
  4820. #line 5803 "configure"
  4821. #include "confdefs.h"
  4822. #include <stdio.h>
  4823. #include <proj.h>
  4824. int main(void) {
  4825. FILE *fp = fopen("conftestdata","w");
  4826. fprintf(fp, "%d", PROJ_VERSION_MAJOR);
  4827. return 0;
  4828. }
  4829. EOF
  4830. if { (eval echo configure:5815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4831. then
  4832. proj_ver_major=`cat conftestdata`
  4833. echo "$ac_t""$proj_ver_major" 1>&6
  4834. else
  4835. echo "configure: failed program was:" >&5
  4836. cat conftest.$ac_ext >&5
  4837. rm -fr conftest*
  4838. { echo "configure: error: *** Could not determine External PROJ major version." 1>&2; exit 1; }
  4839. fi
  4840. rm -fr conftest*
  4841. fi
  4842. CPPFLAGS=$ac_save_cppflags
  4843. echo $ac_n "checking External PROJ minor version""... $ac_c" 1>&6
  4844. echo "configure:5832: checking External PROJ minor version" >&5
  4845. ac_save_cppflags="$CPPFLAGS"
  4846. CPPFLAGS="$PROJINC $CPPFLAGS"
  4847. if test "$cross_compiling" = yes; then
  4848. proj_ver_minor=0
  4849. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4850. else
  4851. cat > conftest.$ac_ext <<EOF
  4852. #line 5840 "configure"
  4853. #include "confdefs.h"
  4854. #include <stdio.h>
  4855. #include <proj.h>
  4856. int main(void) {
  4857. FILE *fp = fopen("conftestdata","w");
  4858. fprintf(fp, "%d", PROJ_VERSION_MINOR);
  4859. return 0;
  4860. }
  4861. EOF
  4862. if { (eval echo configure:5852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4863. then
  4864. proj_ver_minor=`cat conftestdata`
  4865. echo "$ac_t""$proj_ver_minor" 1>&6
  4866. else
  4867. echo "configure: failed program was:" >&5
  4868. cat conftest.$ac_ext >&5
  4869. rm -fr conftest*
  4870. { echo "configure: error: *** Could not determine External PROJ minor version." 1>&2; exit 1; }
  4871. fi
  4872. rm -fr conftest*
  4873. fi
  4874. CPPFLAGS=$ac_save_cppflags
  4875. echo $ac_n "checking External PROJ patch version""... $ac_c" 1>&6
  4876. echo "configure:5869: checking External PROJ patch version" >&5
  4877. ac_save_cppflags="$CPPFLAGS"
  4878. CPPFLAGS="$PROJINC $CPPFLAGS"
  4879. if test "$cross_compiling" = yes; then
  4880. proj_ver_patch=0
  4881. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4882. else
  4883. cat > conftest.$ac_ext <<EOF
  4884. #line 5877 "configure"
  4885. #include "confdefs.h"
  4886. #include <stdio.h>
  4887. #include <proj.h>
  4888. int main(void) {
  4889. FILE *fp = fopen("conftestdata","w");
  4890. fprintf(fp, "%d", PROJ_VERSION_PATCH);
  4891. return 0;
  4892. }
  4893. EOF
  4894. if { (eval echo configure:5889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4895. then
  4896. proj_ver_patch=`cat conftestdata`
  4897. echo "$ac_t""$proj_ver_patch" 1>&6
  4898. else
  4899. echo "configure: failed program was:" >&5
  4900. cat conftest.$ac_ext >&5
  4901. rm -fr conftest*
  4902. { echo "configure: error: *** Could not determine External PROJ patch version." 1>&2; exit 1; }
  4903. fi
  4904. rm -fr conftest*
  4905. fi
  4906. CPPFLAGS=$ac_save_cppflags
  4907. echo "$ac_t""found PROJ version "${proj_ver_major}.${proj_ver_minor}.${proj_ver_patch}"" 1>&6
  4908. PROJMAJOR=${proj_ver_major}
  4909. # minimum required PROJ 5+ version to use the new PROJ API: 5.1.0
  4910. if test ${proj_ver_major} = 5 && test `expr ${proj_ver_minor} \< 1` = 1 ; then
  4911. echo "configure: warning: At least PROJ version "5.1.0" is required for the new API " 1>&2
  4912. PROJ4API=1
  4913. fi
  4914. else
  4915. echo $ac_n "checking External PROJ.4 version""... $ac_c" 1>&6
  4916. echo "configure:5914: checking External PROJ.4 version" >&5
  4917. ac_save_cppflags="$CPPFLAGS"
  4918. CPPFLAGS="$PROJINC $CPPFLAGS"
  4919. if test "$cross_compiling" = yes; then
  4920. proj_ver=0
  4921. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4922. else
  4923. cat > conftest.$ac_ext <<EOF
  4924. #line 5922 "configure"
  4925. #include "confdefs.h"
  4926. #include <stdio.h>
  4927. #include <proj_api.h>
  4928. int main(void) {
  4929. FILE *fp = fopen("conftestdata","w");
  4930. fprintf(fp, "%d", PJ_VERSION);
  4931. return 0;
  4932. }
  4933. EOF
  4934. if { (eval echo configure:5934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4935. then
  4936. proj_ver=`cat conftestdata`
  4937. echo "$ac_t""$proj_ver" 1>&6
  4938. else
  4939. echo "configure: failed program was:" >&5
  4940. cat conftest.$ac_ext >&5
  4941. rm -fr conftest*
  4942. { echo "configure: error: *** Could not determine External PROJ.4 version." 1>&2; exit 1; }
  4943. fi
  4944. rm -fr conftest*
  4945. fi
  4946. CPPFLAGS=$ac_save_cppflags
  4947. if test `expr ${proj_ver} \>= 600` = 1 ; then
  4948. PROJMAJOR=6
  4949. elif test `expr ${proj_ver} \>= 500` = 1 ; then
  4950. PROJMAJOR=5
  4951. elif test `expr ${proj_ver} \>= 400` = 1 ; then
  4952. PROJMAJOR=4
  4953. fi
  4954. echo "$ac_t""found PROJ version "${proj_ver}"" 1>&6
  4955. fi
  4956. if test $PROJ4API = 0 ; then
  4957. echo "$ac_t""using new PROJ version 5+ API" 1>&6
  4958. # With PROJ library directory
  4959. echo $ac_n "checking for location of External PROJ library""... $ac_c" 1>&6
  4960. echo "configure:5966: checking for location of External PROJ library" >&5
  4961. case "$with_proj_libs" in
  4962. y | ye | yes | n | no)
  4963. { echo "configure: error: *** You must supply a directory to --with-proj-libs." 1>&2; exit 1; }
  4964. ;;
  4965. esac
  4966. echo "$ac_t""$with_proj_libs" 1>&6
  4967. if test -n "$with_proj_libs"; then
  4968. for dir in $with_proj_libs; do
  4969. if test -d "$dir"; then
  4970. PROJLIB="$PROJLIB -L$dir"
  4971. else
  4972. { echo "configure: error: *** External PROJ library directory $dir does not exist." 1>&2; exit 1; }
  4973. fi
  4974. done
  4975. fi
  4976. ac_save_ldflags="$LDFLAGS"
  4977. LDFLAGS="$PROJLIB $LDFLAGS"
  4978. echo $ac_n "checking for proj_pj_info in -lproj""... $ac_c" 1>&6
  4979. echo "configure:5990: checking for proj_pj_info in -lproj" >&5
  4980. ac_lib_var=`echo proj'_'proj_pj_info | sed 'y%./+-%__p_%'`
  4981. ac_save_LIBS="$LIBS"
  4982. LIBS="-lproj $LIBS"
  4983. cat > conftest.$ac_ext <<EOF
  4984. #line 5996 "configure"
  4985. #include "confdefs.h"
  4986. /* Override any gcc2 internal prototype to avoid an error. */
  4987. /* We use char because int might match the return type of a gcc2
  4988. builtin and then its argument prototype would still apply. */
  4989. char proj_pj_info();
  4990. int main() {
  4991. proj_pj_info()
  4992. ; return 0; }
  4993. EOF
  4994. if { (eval echo configure:6007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4995. rm -rf conftest*
  4996. eval "ac_cv_lib_$ac_lib_var=yes"
  4997. else
  4998. echo "configure: failed program was:" >&5
  4999. cat conftest.$ac_ext >&5
  5000. rm -rf conftest*
  5001. eval "ac_cv_lib_$ac_lib_var=no"
  5002. fi
  5003. rm -f conftest*
  5004. LIBS="$ac_save_LIBS"
  5005. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5006. echo "$ac_t""yes" 1>&6
  5007. PROJLIB="$PROJLIB -lproj "
  5008. else
  5009. echo "$ac_t""no" 1>&6
  5010. LDFLAGS=${ac_save_ldflags}
  5011. { echo "configure: error: *** Unable to locate External PROJ library." 1>&2; exit 1; }
  5012. fi
  5013. LDFLAGS=${ac_save_ldflags}
  5014. else
  5015. echo "$ac_t""using old PROJ version 4 API" 1>&6
  5016. cat >> confdefs.h <<\EOF
  5017. #define USE_PROJ4API 1
  5018. EOF
  5019. ac_save_cppflags="$CPPFLAGS"
  5020. CPPFLAGS="$PROJINC $CPPFLAGS"
  5021. for ac_hdr in proj_api.h
  5022. do
  5023. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5024. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5025. echo "configure:6050: checking for $ac_hdr" >&5
  5026. cat > conftest.$ac_ext <<EOF
  5027. #line 6053 "configure"
  5028. #include "confdefs.h"
  5029. #include <$ac_hdr>
  5030. EOF
  5031. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5032. { (eval echo configure:6058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5033. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5034. if test -z "$ac_err"; then
  5035. rm -rf conftest*
  5036. eval "ac_cv_header_$ac_safe=yes"
  5037. else
  5038. echo "$ac_err" >&5
  5039. echo "configure: failed program was:" >&5
  5040. cat conftest.$ac_ext >&5
  5041. rm -rf conftest*
  5042. eval "ac_cv_header_$ac_safe=no"
  5043. fi
  5044. rm -f conftest*
  5045. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5046. echo "$ac_t""yes" 1>&6
  5047. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5048. cat >> confdefs.h <<EOF
  5049. #define $ac_tr_hdr 1
  5050. EOF
  5051. else
  5052. echo "$ac_t""no" 1>&6
  5053. { echo "configure: error: *** Unable to locate External PROJ includes." 1>&2; exit 1; }
  5054. fi
  5055. done
  5056. CPPFLAGS=$ac_save_cppflags
  5057. # PROJ version check for v4.x
  5058. if test "$cross_compiling" = yes; then
  5059. echo "configure: warning: *** Cannot check PROJ.4 version (cross-compiling)." 1>&2
  5060. else
  5061. echo $ac_n "checking External PROJ.4 version""... $ac_c" 1>&6
  5062. echo "configure:6094: checking External PROJ.4 version" >&5
  5063. ac_save_cppflags="$CPPFLAGS"
  5064. CPPFLAGS="$PROJINC $CPPFLAGS"
  5065. if test "$cross_compiling" = yes; then
  5066. proj_ver=0
  5067. echo "$ac_t""unknown (cross-compiling)" 1>&6
  5068. else
  5069. cat > conftest.$ac_ext <<EOF
  5070. #line 6102 "configure"
  5071. #include "confdefs.h"
  5072. #include <stdio.h>
  5073. #include <proj_api.h>
  5074. int main(void) {
  5075. FILE *fp = fopen("conftestdata","w");
  5076. fprintf(fp, "%d", PJ_VERSION);
  5077. return 0;
  5078. }
  5079. EOF
  5080. if { (eval echo configure:6114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  5081. then
  5082. proj_ver=`cat conftestdata`
  5083. echo "$ac_t""$proj_ver" 1>&6
  5084. else
  5085. echo "configure: failed program was:" >&5
  5086. cat conftest.$ac_ext >&5
  5087. rm -fr conftest*
  5088. { echo "configure: error: *** Could not determine External PROJ.4 version." 1>&2; exit 1; }
  5089. fi
  5090. rm -fr conftest*
  5091. fi
  5092. CPPFLAGS=$ac_save_cppflags
  5093. if test `expr ${proj_ver} \< 446` = 1 ; then
  5094. { echo "configure: error: *** PROJ.4.4.6 or later is required." 1>&2; exit 1; }
  5095. fi
  5096. fi
  5097. # With PROJ library directory
  5098. echo $ac_n "checking for location of External PROJ.4 library""... $ac_c" 1>&6
  5099. echo "configure:6139: checking for location of External PROJ.4 library" >&5
  5100. case "$with_proj_libs" in
  5101. y | ye | yes | n | no)
  5102. { echo "configure: error: *** You must supply a directory to --with-proj-libs." 1>&2; exit 1; }
  5103. ;;
  5104. esac
  5105. echo "$ac_t""$with_proj_libs" 1>&6
  5106. if test -n "$with_proj_libs"; then
  5107. for dir in $with_proj_libs; do
  5108. if test -d "$dir"; then
  5109. PROJLIB="$PROJLIB -L$dir"
  5110. else
  5111. { echo "configure: error: *** External PROJ.4 library directory $dir does not exist." 1>&2; exit 1; }
  5112. fi
  5113. done
  5114. fi
  5115. ac_save_ldflags="$LDFLAGS"
  5116. LDFLAGS="$PROJLIB $LDFLAGS"
  5117. echo $ac_n "checking for pj_get_def in -lproj""... $ac_c" 1>&6
  5118. echo "configure:6163: checking for pj_get_def in -lproj" >&5
  5119. ac_lib_var=`echo proj'_'pj_get_def | sed 'y%./+-%__p_%'`
  5120. ac_save_LIBS="$LIBS"
  5121. LIBS="-lproj $LIBS"
  5122. cat > conftest.$ac_ext <<EOF
  5123. #line 6169 "configure"
  5124. #include "confdefs.h"
  5125. /* Override any gcc2 internal prototype to avoid an error. */
  5126. /* We use char because int might match the return type of a gcc2
  5127. builtin and then its argument prototype would still apply. */
  5128. char pj_get_def();
  5129. int main() {
  5130. pj_get_def()
  5131. ; return 0; }
  5132. EOF
  5133. if { (eval echo configure:6180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5134. rm -rf conftest*
  5135. eval "ac_cv_lib_$ac_lib_var=yes"
  5136. else
  5137. echo "configure: failed program was:" >&5
  5138. cat conftest.$ac_ext >&5
  5139. rm -rf conftest*
  5140. eval "ac_cv_lib_$ac_lib_var=no"
  5141. fi
  5142. rm -f conftest*
  5143. LIBS="$ac_save_LIBS"
  5144. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5145. echo "$ac_t""yes" 1>&6
  5146. PROJLIB="$PROJLIB -lproj "
  5147. else
  5148. echo "$ac_t""no" 1>&6
  5149. LDFLAGS=${ac_save_ldflags}
  5150. { echo "configure: error: *** Unable to locate External PROJ.4 library." 1>&2; exit 1; }
  5151. fi
  5152. LDFLAGS=${ac_save_ldflags}
  5153. fi
  5154. # With PROJ share directory
  5155. echo $ac_n "checking for location of External PROJ data files""... $ac_c" 1>&6
  5156. echo "configure:6215: checking for location of External PROJ data files" >&5
  5157. case "$with_proj_share" in
  5158. y | ye | yes | n | no)
  5159. { echo "configure: error: *** You must supply a directory to --with-proj-share." 1>&2; exit 1; }
  5160. ;;
  5161. esac
  5162. echo "$ac_t""$with_proj_share" 1>&6
  5163. if test -n "$with_proj_share" ; then
  5164. if test -d "$with_proj_share"; then
  5165. PROJSHARE="$with_proj_share"
  5166. else
  5167. { echo "configure: error: *** External PROJ data directory $dir does not exist." 1>&2; exit 1; }
  5168. fi
  5169. fi
  5170. if test -z "$PROJSHARE" ; then
  5171. echo "configure: warning: *** External PROJ directory not specified; default will be used" 1>&2
  5172. PROJSHARE=/usr/share/proj
  5173. fi
  5174. # check if share/proj/epsg exists only for PROJ < 6
  5175. if test `expr ${PROJMAJOR} \< 6` = 1 ; then
  5176. # LOC_CHECK_SHARE does not work when cross compiling
  5177. if test "$cross_compiling" = "yes" ; then
  5178. echo $ac_n "checking for epsg""... $ac_c" 1>&6
  5179. echo "configure:6241: checking for epsg" >&5
  5180. echo "$ac_t""unknown (cross-compiling)" 1>&6
  5181. else
  5182. ac_safe=`echo "$PROJSHARE/epsg" | sed 'y%./+-%__p_%'`
  5183. echo $ac_n "checking for $PROJSHARE/epsg""... $ac_c" 1>&6
  5184. echo "configure:6248: checking for $PROJSHARE/epsg" >&5
  5185. if test "$cross_compiling" = yes; then
  5186. { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
  5187. else
  5188. if test -r $PROJSHARE/epsg; then
  5189. eval "ac_cv_file_$ac_safe=yes"
  5190. else
  5191. eval "ac_cv_file_$ac_safe=no"
  5192. fi
  5193. fi
  5194. if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  5195. echo "$ac_t""yes" 1>&6
  5196. :
  5197. else
  5198. echo "$ac_t""no" 1>&6
  5199. echo "configure: warning: *** Unable to locate PROJ data files." 1>&2
  5200. fi
  5201. fi
  5202. fi
  5203. # Done checking PROJ
  5204. # Enable regex option
  5205. echo $ac_n "checking whether to use regex""... $ac_c" 1>&6
  5206. echo "configure:6282: checking whether to use regex" >&5
  5207. echo "$ac_t"""$with_regex"" 1>&6
  5208. case "$with_regex" in
  5209. "no") USE_REGEX= ;;
  5210. "yes") USE_REGEX="1" ;;
  5211. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5212. esac
  5213. REGEXINCPATH=
  5214. REGEXLIBPATH=
  5215. REGEXLIB=
  5216. if test -n "$USE_REGEX"; then
  5217. # With regex includes directory
  5218. echo $ac_n "checking for location of regex includes""... $ac_c" 1>&6
  5219. echo "configure:6302: checking for location of regex includes" >&5
  5220. case "$with_regex_includes" in
  5221. y | ye | yes | n | no)
  5222. { echo "configure: error: *** You must supply a directory to --with-regex-includes." 1>&2; exit 1; }
  5223. ;;
  5224. esac
  5225. echo "$ac_t""$with_regex_includes" 1>&6
  5226. if test -n "$with_regex_includes" ; then
  5227. for dir in $with_regex_includes; do
  5228. if test -d "$dir"; then
  5229. REGEXINCPATH="$REGEXINCPATH -I$dir"
  5230. else
  5231. { echo "configure: error: *** regex includes directory $dir does not exist." 1>&2; exit 1; }
  5232. fi
  5233. done
  5234. fi
  5235. ac_save_cppflags="$CPPFLAGS"
  5236. CPPFLAGS="$REGEXINCPATH $CPPFLAGS"
  5237. for ac_hdr in regex.h
  5238. do
  5239. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5240. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5241. echo "configure:6328: checking for $ac_hdr" >&5
  5242. cat > conftest.$ac_ext <<EOF
  5243. #line 6331 "configure"
  5244. #include "confdefs.h"
  5245. #include <$ac_hdr>
  5246. EOF
  5247. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5248. { (eval echo configure:6336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5249. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5250. if test -z "$ac_err"; then
  5251. rm -rf conftest*
  5252. eval "ac_cv_header_$ac_safe=yes"
  5253. else
  5254. echo "$ac_err" >&5
  5255. echo "configure: failed program was:" >&5
  5256. cat conftest.$ac_ext >&5
  5257. rm -rf conftest*
  5258. eval "ac_cv_header_$ac_safe=no"
  5259. fi
  5260. rm -f conftest*
  5261. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5262. echo "$ac_t""yes" 1>&6
  5263. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5264. cat >> confdefs.h <<EOF
  5265. #define $ac_tr_hdr 1
  5266. EOF
  5267. else
  5268. echo "$ac_t""no" 1>&6
  5269. { echo "configure: error: *** Unable to locate regex includes." 1>&2; exit 1; }
  5270. fi
  5271. done
  5272. CPPFLAGS=$ac_save_cppflags
  5273. # With regex library directory
  5274. echo $ac_n "checking for location of regex library""... $ac_c" 1>&6
  5275. echo "configure:6370: checking for location of regex library" >&5
  5276. case "$with_regex_libs" in
  5277. y | ye | yes | n | no)
  5278. { echo "configure: error: *** You must supply a directory to --with-regex-libs." 1>&2; exit 1; }
  5279. ;;
  5280. esac
  5281. echo "$ac_t""$with_regex_libs" 1>&6
  5282. if test -n "$with_regex_libs"; then
  5283. for dir in $with_regex_libs; do
  5284. if test -d "$dir"; then
  5285. REGEXLIBPATH="$REGEXLIBPATH -L$dir"
  5286. else
  5287. { echo "configure: error: *** regex library directory $dir does not exist." 1>&2; exit 1; }
  5288. fi
  5289. done
  5290. fi
  5291. ac_save_libs="$LIBS"
  5292. ac_save_ldflags="$LDFLAGS"
  5293. LIBS=" $LIBS"
  5294. LDFLAGS=" $LDFLAGS"
  5295. echo $ac_n "checking for regcomp""... $ac_c" 1>&6
  5296. echo "configure:6395: checking for regcomp" >&5
  5297. cat > conftest.$ac_ext <<EOF
  5298. #line 6398 "configure"
  5299. #include "confdefs.h"
  5300. /* System header to define __stub macros and hopefully few prototypes,
  5301. which can conflict with char regcomp(); below. */
  5302. #include <assert.h>
  5303. /* Override any gcc2 internal prototype to avoid an error. */
  5304. /* We use char because int might match the return type of a gcc2
  5305. builtin and then its argument prototype would still apply. */
  5306. char regcomp();
  5307. int main() {
  5308. /* The GNU C library defines this for functions which it implements
  5309. to always fail with ENOSYS. Some functions are actually named
  5310. something starting with __ and the normal name is an alias. */
  5311. #if defined (__stub_regcomp) || defined (__stub___regcomp)
  5312. choke me
  5313. #else
  5314. regcomp();
  5315. #endif
  5316. ; return 0; }
  5317. EOF
  5318. if { (eval echo configure:6421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5319. rm -rf conftest*
  5320. eval "ac_cv_func_regcomp=yes"
  5321. else
  5322. echo "configure: failed program was:" >&5
  5323. cat conftest.$ac_ext >&5
  5324. rm -rf conftest*
  5325. eval "ac_cv_func_regcomp=no"
  5326. fi
  5327. rm -f conftest*
  5328. if eval "test \"`echo '$ac_cv_func_'regcomp`\" = yes"; then
  5329. echo "$ac_t""yes" 1>&6
  5330. REGEXLIB="$REGEXLIB "
  5331. else
  5332. echo "$ac_t""no" 1>&6
  5333. ac_save_ldflags="$LDFLAGS"
  5334. LDFLAGS="$REGEXLIBPATH $LDFLAGS"
  5335. echo $ac_n "checking for regcomp in -lregex""... $ac_c" 1>&6
  5336. echo "configure:6448: checking for regcomp in -lregex" >&5
  5337. ac_lib_var=`echo regex'_'regcomp | sed 'y%./+-%__p_%'`
  5338. ac_save_LIBS="$LIBS"
  5339. LIBS="-lregex $LIBS"
  5340. cat > conftest.$ac_ext <<EOF
  5341. #line 6454 "configure"
  5342. #include "confdefs.h"
  5343. /* Override any gcc2 internal prototype to avoid an error. */
  5344. /* We use char because int might match the return type of a gcc2
  5345. builtin and then its argument prototype would still apply. */
  5346. char regcomp();
  5347. int main() {
  5348. regcomp()
  5349. ; return 0; }
  5350. EOF
  5351. if { (eval echo configure:6465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5352. rm -rf conftest*
  5353. eval "ac_cv_lib_$ac_lib_var=yes"
  5354. else
  5355. echo "configure: failed program was:" >&5
  5356. cat conftest.$ac_ext >&5
  5357. rm -rf conftest*
  5358. eval "ac_cv_lib_$ac_lib_var=no"
  5359. fi
  5360. rm -f conftest*
  5361. LIBS="$ac_save_LIBS"
  5362. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5363. echo "$ac_t""yes" 1>&6
  5364. REGEXLIB="$REGEXLIB -lregex "
  5365. else
  5366. echo "$ac_t""no" 1>&6
  5367. LDFLAGS=${ac_save_ldflags}
  5368. { echo "configure: error: *** Unable to locate regex library." 1>&2; exit 1; }
  5369. fi
  5370. LDFLAGS=${ac_save_ldflags}
  5371. fi
  5372. LIBS=${ac_save_libs}
  5373. LDFLAGS=${ac_save_ldflags}
  5374. fi # $USE_REGEX
  5375. # Done checking regex
  5376. # Enable Readline option
  5377. echo $ac_n "checking whether to use Readline""... $ac_c" 1>&6
  5378. echo "configure:6515: checking whether to use Readline" >&5
  5379. echo "$ac_t"""$with_readline"" 1>&6
  5380. case "$with_readline" in
  5381. "no") USE_READLINE= ;;
  5382. "yes") USE_READLINE="1" ;;
  5383. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5384. esac
  5385. READLINEINCPATH=
  5386. READLINELIBPATH=
  5387. READLINELIB=
  5388. HISTORYLIB=
  5389. if test -n "$USE_READLINE"; then
  5390. # With Readline includes directory
  5391. echo $ac_n "checking for location of Readline includes""... $ac_c" 1>&6
  5392. echo "configure:6536: checking for location of Readline includes" >&5
  5393. case "$with_readline_includes" in
  5394. y | ye | yes | n | no)
  5395. { echo "configure: error: *** You must supply a directory to --with-readline-includes." 1>&2; exit 1; }
  5396. ;;
  5397. esac
  5398. echo "$ac_t""$with_readline_includes" 1>&6
  5399. if test -n "$with_readline_includes" ; then
  5400. for dir in $with_readline_includes; do
  5401. if test -d "$dir"; then
  5402. READLINEINCPATH="$READLINEINCPATH -I$dir"
  5403. else
  5404. { echo "configure: error: *** Readline includes directory $dir does not exist." 1>&2; exit 1; }
  5405. fi
  5406. done
  5407. fi
  5408. ac_save_cppflags="$CPPFLAGS"
  5409. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  5410. for ac_hdr in readline/readline.h
  5411. do
  5412. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5413. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5414. echo "configure:6562: checking for $ac_hdr" >&5
  5415. cat > conftest.$ac_ext <<EOF
  5416. #line 6565 "configure"
  5417. #include "confdefs.h"
  5418. #include <$ac_hdr>
  5419. EOF
  5420. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5421. { (eval echo configure:6570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5422. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5423. if test -z "$ac_err"; then
  5424. rm -rf conftest*
  5425. eval "ac_cv_header_$ac_safe=yes"
  5426. else
  5427. echo "$ac_err" >&5
  5428. echo "configure: failed program was:" >&5
  5429. cat conftest.$ac_ext >&5
  5430. rm -rf conftest*
  5431. eval "ac_cv_header_$ac_safe=no"
  5432. fi
  5433. rm -f conftest*
  5434. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5435. echo "$ac_t""yes" 1>&6
  5436. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5437. cat >> confdefs.h <<EOF
  5438. #define $ac_tr_hdr 1
  5439. EOF
  5440. else
  5441. echo "$ac_t""no" 1>&6
  5442. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  5443. fi
  5444. done
  5445. CPPFLAGS=$ac_save_cppflags
  5446. ac_save_cppflags="$CPPFLAGS"
  5447. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  5448. for ac_hdr in readline/history.h
  5449. do
  5450. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5451. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5452. echo "configure:6606: checking for $ac_hdr" >&5
  5453. cat > conftest.$ac_ext <<EOF
  5454. #line 6609 "configure"
  5455. #include "confdefs.h"
  5456. #include <$ac_hdr>
  5457. EOF
  5458. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5459. { (eval echo configure:6614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5460. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5461. if test -z "$ac_err"; then
  5462. rm -rf conftest*
  5463. eval "ac_cv_header_$ac_safe=yes"
  5464. else
  5465. echo "$ac_err" >&5
  5466. echo "configure: failed program was:" >&5
  5467. cat conftest.$ac_ext >&5
  5468. rm -rf conftest*
  5469. eval "ac_cv_header_$ac_safe=no"
  5470. fi
  5471. rm -f conftest*
  5472. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5473. echo "$ac_t""yes" 1>&6
  5474. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5475. cat >> confdefs.h <<EOF
  5476. #define $ac_tr_hdr 1
  5477. EOF
  5478. else
  5479. echo "$ac_t""no" 1>&6
  5480. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  5481. fi
  5482. done
  5483. CPPFLAGS=$ac_save_cppflags
  5484. # With Readline library directory
  5485. echo $ac_n "checking for location of Readline library""... $ac_c" 1>&6
  5486. echo "configure:6648: checking for location of Readline library" >&5
  5487. case "$with_readline_libs" in
  5488. y | ye | yes | n | no)
  5489. { echo "configure: error: *** You must supply a directory to --with-readline-libs." 1>&2; exit 1; }
  5490. ;;
  5491. esac
  5492. echo "$ac_t""$with_readline_libs" 1>&6
  5493. if test -n "$with_readline_libs"; then
  5494. for dir in $with_readline_libs; do
  5495. if test -d "$dir"; then
  5496. READLINELIBPATH="$READLINELIBPATH -L$dir"
  5497. else
  5498. { echo "configure: error: *** Readline library directory $dir does not exist." 1>&2; exit 1; }
  5499. fi
  5500. done
  5501. fi
  5502. ac_save_ldflags="$LDFLAGS"
  5503. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  5504. echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
  5505. echo "configure:6673: checking for readline in -lreadline" >&5
  5506. ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
  5507. ac_save_LIBS="$LIBS"
  5508. LIBS="-lreadline $LIBS"
  5509. cat > conftest.$ac_ext <<EOF
  5510. #line 6679 "configure"
  5511. #include "confdefs.h"
  5512. /* Override any gcc2 internal prototype to avoid an error. */
  5513. /* We use char because int might match the return type of a gcc2
  5514. builtin and then its argument prototype would still apply. */
  5515. char readline();
  5516. int main() {
  5517. readline()
  5518. ; return 0; }
  5519. EOF
  5520. if { (eval echo configure:6690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5521. rm -rf conftest*
  5522. eval "ac_cv_lib_$ac_lib_var=yes"
  5523. else
  5524. echo "configure: failed program was:" >&5
  5525. cat conftest.$ac_ext >&5
  5526. rm -rf conftest*
  5527. eval "ac_cv_lib_$ac_lib_var=no"
  5528. fi
  5529. rm -f conftest*
  5530. LIBS="$ac_save_LIBS"
  5531. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5532. echo "$ac_t""yes" 1>&6
  5533. READLINELIB="$READLINELIB -lreadline "
  5534. else
  5535. echo "$ac_t""no" 1>&6
  5536. LDFLAGS=${ac_save_ldflags}
  5537. { echo "configure: error: *** Unable to locate Readline library." 1>&2; exit 1; }
  5538. fi
  5539. LDFLAGS=${ac_save_ldflags}
  5540. ac_save_ldflags="$LDFLAGS"
  5541. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  5542. echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
  5543. echo "configure:6725: checking for add_history in -lhistory" >&5
  5544. ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
  5545. ac_save_LIBS="$LIBS"
  5546. LIBS="-lhistory $LIBS"
  5547. cat > conftest.$ac_ext <<EOF
  5548. #line 6731 "configure"
  5549. #include "confdefs.h"
  5550. /* Override any gcc2 internal prototype to avoid an error. */
  5551. /* We use char because int might match the return type of a gcc2
  5552. builtin and then its argument prototype would still apply. */
  5553. char add_history();
  5554. int main() {
  5555. add_history()
  5556. ; return 0; }
  5557. EOF
  5558. if { (eval echo configure:6742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5559. rm -rf conftest*
  5560. eval "ac_cv_lib_$ac_lib_var=yes"
  5561. else
  5562. echo "configure: failed program was:" >&5
  5563. cat conftest.$ac_ext >&5
  5564. rm -rf conftest*
  5565. eval "ac_cv_lib_$ac_lib_var=no"
  5566. fi
  5567. rm -f conftest*
  5568. LIBS="$ac_save_LIBS"
  5569. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5570. echo "$ac_t""yes" 1>&6
  5571. HISTORYLIB="$HISTORYLIB -lhistory "
  5572. else
  5573. echo "$ac_t""no" 1>&6
  5574. LDFLAGS=${ac_save_ldflags}
  5575. { echo "configure: error: *** Unable to locate History library." 1>&2; exit 1; }
  5576. fi
  5577. LDFLAGS=${ac_save_ldflags}
  5578. fi # $USE_READLINE
  5579. # Done checking Readline
  5580. # GDAL option
  5581. echo $ac_n "checking whether to use GDAL""... $ac_c" 1>&6
  5582. echo "configure:6784: checking whether to use GDAL" >&5
  5583. GDAL_LIBS=
  5584. GDAL_CFLAGS=
  5585. USE_GDAL=
  5586. USE_OGR=
  5587. if test "`basename xx/$with_gdal`" = "gdal-config" ; then
  5588. GDAL_CONFIG="$with_gdal"
  5589. fi
  5590. if test "$with_gdal" = "no" ; then
  5591. echo "$ac_t""no" 1>&6
  5592. else
  5593. echo "$ac_t""yes" 1>&6
  5594. # Extract the first word of "gdal-config", so it can be a program name with args.
  5595. set dummy gdal-config; ac_word=$2
  5596. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5597. echo "configure:6802: checking for $ac_word" >&5
  5598. case "$GDAL_CONFIG" in
  5599. /*)
  5600. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a path.
  5601. ;;
  5602. ?:/*)
  5603. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a dos path.
  5604. ;;
  5605. *)
  5606. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5607. ac_dummy="$PATH"
  5608. for ac_dir in $ac_dummy; do
  5609. test -z "$ac_dir" && ac_dir=.
  5610. if test -f $ac_dir/$ac_word; then
  5611. ac_cv_path_GDAL_CONFIG="$ac_dir/$ac_word"
  5612. break
  5613. fi
  5614. done
  5615. IFS="$ac_save_ifs"
  5616. test -z "$ac_cv_path_GDAL_CONFIG" && ac_cv_path_GDAL_CONFIG="no"
  5617. ;;
  5618. esac
  5619. GDAL_CONFIG="$ac_cv_path_GDAL_CONFIG"
  5620. if test -n "$GDAL_CONFIG"; then
  5621. echo "$ac_t""$GDAL_CONFIG" 1>&6
  5622. else
  5623. echo "$ac_t""no" 1>&6
  5624. fi
  5625. if test "$GDAL_CONFIG" = "no" ; then
  5626. { echo "configure: error: *** couldn't find gdal-config" 1>&2; exit 1; }
  5627. fi
  5628. if test "$GDAL_CONFIG" != "" ; then
  5629. GDAL_LIBS=`"$GDAL_CONFIG" --libs`
  5630. GDAL_DEP_LIBS=`"$GDAL_CONFIG" --dep-libs`
  5631. GDAL_CFLAGS=`"$GDAL_CONFIG" --cflags`
  5632. USE_GDAL=1
  5633. if test `"$GDAL_CONFIG" --ogr-enabled` = "yes" ; then
  5634. cat >> confdefs.h <<\EOF
  5635. #define HAVE_OGR 1
  5636. EOF
  5637. USE_OGR=1
  5638. fi
  5639. fi
  5640. GDAL=
  5641. ac_save_libs="$LIBS"
  5642. ac_save_cflags="$CFLAGS"
  5643. LIBS="$LIBS $GDAL_LIBS"
  5644. CFLAGS="$CFLAGS $GDAL_CFLAGS"
  5645. cat > conftest.$ac_ext <<EOF
  5646. #line 6857 "configure"
  5647. #include "confdefs.h"
  5648. #include <gdal.h>
  5649. int main() {
  5650. GDALOpen("foo", GA_ReadOnly);
  5651. ; return 0; }
  5652. EOF
  5653. if { (eval echo configure:6864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5654. :
  5655. else
  5656. echo "configure: failed program was:" >&5
  5657. cat conftest.$ac_ext >&5
  5658. rm -rf conftest*
  5659. LIBS="$LIBS $GDAL_DEP_LIBS"
  5660. cat > conftest.$ac_ext <<EOF
  5661. #line 6873 "configure"
  5662. #include "confdefs.h"
  5663. #include <gdal.h>
  5664. int main() {
  5665. GDALOpen("foo", GA_ReadOnly);
  5666. ; return 0; }
  5667. EOF
  5668. if { (eval echo configure:6880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5669. rm -rf conftest*
  5670. GDAL_LIBS="$GDAL_LIBS $GDAL_DEP_LIBS"
  5671. else
  5672. echo "configure: failed program was:" >&5
  5673. cat conftest.$ac_ext >&5
  5674. rm -rf conftest*
  5675. { echo "configure: error: *** Unable to locate GDAL library." 1>&2; exit 1; }
  5676. fi
  5677. rm -f conftest*
  5678. fi
  5679. rm -f conftest*
  5680. LIBS=${ac_save_libs}
  5681. CFLAGS=${ac_save_cflags}
  5682. cat >> confdefs.h <<\EOF
  5683. #define HAVE_GDAL 1
  5684. EOF
  5685. fi
  5686. # libLAS option
  5687. echo $ac_n "checking whether to use libLAS""... $ac_c" 1>&6
  5688. echo "configure:6912: checking whether to use libLAS" >&5
  5689. LIBLAS_LIBS=
  5690. LIBLAS_CFLAGS=
  5691. USE_LIBLAS=
  5692. if test "`basename xx/$with_liblas`" = "liblas-config" ; then
  5693. LIBLAS_CONFIG="$with_liblas"
  5694. fi
  5695. if test "$with_liblas" = "no" ; then
  5696. echo "$ac_t""no" 1>&6
  5697. else
  5698. echo "$ac_t""yes" 1>&6
  5699. # Extract the first word of "liblas-config", so it can be a program name with args.
  5700. set dummy liblas-config; ac_word=$2
  5701. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5702. echo "configure:6929: checking for $ac_word" >&5
  5703. case "$LIBLAS_CONFIG" in
  5704. /*)
  5705. ac_cv_path_LIBLAS_CONFIG="$LIBLAS_CONFIG" # Let the user override the test with a path.
  5706. ;;
  5707. ?:/*)
  5708. ac_cv_path_LIBLAS_CONFIG="$LIBLAS_CONFIG" # Let the user override the test with a dos path.
  5709. ;;
  5710. *)
  5711. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5712. ac_dummy="$PATH"
  5713. for ac_dir in $ac_dummy; do
  5714. test -z "$ac_dir" && ac_dir=.
  5715. if test -f $ac_dir/$ac_word; then
  5716. ac_cv_path_LIBLAS_CONFIG="$ac_dir/$ac_word"
  5717. break
  5718. fi
  5719. done
  5720. IFS="$ac_save_ifs"
  5721. test -z "$ac_cv_path_LIBLAS_CONFIG" && ac_cv_path_LIBLAS_CONFIG="no"
  5722. ;;
  5723. esac
  5724. LIBLAS_CONFIG="$ac_cv_path_LIBLAS_CONFIG"
  5725. if test -n "$LIBLAS_CONFIG"; then
  5726. echo "$ac_t""$LIBLAS_CONFIG" 1>&6
  5727. else
  5728. echo "$ac_t""no" 1>&6
  5729. fi
  5730. if test "$LIBLAS_CONFIG" = "no" ; then
  5731. { echo "configure: error: *** couldn't find liblas-config" 1>&2; exit 1; }
  5732. fi
  5733. if test "$LIBLAS_CONFIG" != "" ; then
  5734. LIBLAS_LIBS=`"$LIBLAS_CONFIG" --libs`
  5735. LIBLAS_CFLAGS=`"$LIBLAS_CONFIG" --cflags`
  5736. LIBLAS_INC=`"$LIBLAS_CONFIG" --includes`
  5737. USE_LIBLAS=1
  5738. fi
  5739. LIBLAS=
  5740. ac_save_libs="$LIBS"
  5741. ac_save_cflags="$CFLAGS"
  5742. ac_save_cppflags="$CPPFLAGS"
  5743. LIBS="$LIBS $LIBLAS_LIBS"
  5744. CFLAGS="$CFLAGS $LIBLAS_CFLAGS"
  5745. CPPFLAGS="$CPPFLAGS $LIBLAS_INC"
  5746. for ac_hdr in liblas/capi/liblas.h
  5747. do
  5748. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5749. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5750. echo "configure:6982: checking for $ac_hdr" >&5
  5751. cat > conftest.$ac_ext <<EOF
  5752. #line 6985 "configure"
  5753. #include "confdefs.h"
  5754. #include <$ac_hdr>
  5755. EOF
  5756. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5757. { (eval echo configure:6990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5758. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5759. if test -z "$ac_err"; then
  5760. rm -rf conftest*
  5761. eval "ac_cv_header_$ac_safe=yes"
  5762. else
  5763. echo "$ac_err" >&5
  5764. echo "configure: failed program was:" >&5
  5765. cat conftest.$ac_ext >&5
  5766. rm -rf conftest*
  5767. eval "ac_cv_header_$ac_safe=no"
  5768. fi
  5769. rm -f conftest*
  5770. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5771. echo "$ac_t""yes" 1>&6
  5772. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5773. cat >> confdefs.h <<EOF
  5774. #define $ac_tr_hdr 1
  5775. EOF
  5776. else
  5777. echo "$ac_t""no" 1>&6
  5778. fi
  5779. done
  5780. cat > conftest.$ac_ext <<EOF
  5781. #line 7016 "configure"
  5782. #include "confdefs.h"
  5783. #include <liblas/capi/liblas.h>
  5784. int main() {
  5785. LASReader_Create("foo");
  5786. ; return 0; }
  5787. EOF
  5788. if { (eval echo configure:7023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5789. :
  5790. else
  5791. echo "configure: failed program was:" >&5
  5792. cat conftest.$ac_ext >&5
  5793. rm -rf conftest*
  5794. cat > conftest.$ac_ext <<EOF
  5795. #line 7031 "configure"
  5796. #include "confdefs.h"
  5797. #include <liblas/capi/liblas.h>
  5798. int main() {
  5799. LASReader_Create("foo");
  5800. ; return 0; }
  5801. EOF
  5802. if { (eval echo configure:7038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5803. rm -rf conftest*
  5804. LAS_LIBS="$LAS_LIBS"
  5805. else
  5806. echo "configure: failed program was:" >&5
  5807. cat conftest.$ac_ext >&5
  5808. rm -rf conftest*
  5809. { echo "configure: error: *** Unable to locate libLAS library." 1>&2; exit 1; }
  5810. fi
  5811. rm -f conftest*
  5812. fi
  5813. rm -f conftest*
  5814. LIBS=${ac_save_libs}
  5815. CFLAGS=${ac_save_cflags}
  5816. CPPFLAGS=${ac_save_cppflags}
  5817. cat >> confdefs.h <<\EOF
  5818. #define HAVE_LIBLAS 1
  5819. EOF
  5820. fi
  5821. # PDAL option
  5822. echo $ac_n "checking whether to use PDAL""... $ac_c" 1>&6
  5823. echo "configure:7071: checking whether to use PDAL" >&5
  5824. # new and currently used way to switch language to C++
  5825. # AC_LANG_PUSH(C++)
  5826. ac_ext=C
  5827. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  5828. ac_cpp='$CXXCPP $CPPFLAGS'
  5829. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  5830. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  5831. cross_compiling=$ac_cv_prog_cxx_cross
  5832. PDAL_LIBS=
  5833. PDAL_CPPFLAGS=
  5834. USE_PDAL=
  5835. if test "`basename xx/$with_pdal`" = "pdal-config" ; then
  5836. PDAL_CONFIG="$with_pdal"
  5837. fi
  5838. if test "$with_pdal" = "no" ; then
  5839. echo "$ac_t""no" 1>&6
  5840. else
  5841. echo "$ac_t""yes" 1>&6
  5842. # Extract the first word of "pdal-config", so it can be a program name with args.
  5843. set dummy pdal-config; ac_word=$2
  5844. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5845. echo "configure:7099: checking for $ac_word" >&5
  5846. case "$PDAL_CONFIG" in
  5847. /*)
  5848. ac_cv_path_PDAL_CONFIG="$PDAL_CONFIG" # Let the user override the test with a path.
  5849. ;;
  5850. ?:/*)
  5851. ac_cv_path_PDAL_CONFIG="$PDAL_CONFIG" # Let the user override the test with a dos path.
  5852. ;;
  5853. *)
  5854. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5855. ac_dummy="$PATH"
  5856. for ac_dir in $ac_dummy; do
  5857. test -z "$ac_dir" && ac_dir=.
  5858. if test -f $ac_dir/$ac_word; then
  5859. ac_cv_path_PDAL_CONFIG="$ac_dir/$ac_word"
  5860. break
  5861. fi
  5862. done
  5863. IFS="$ac_save_ifs"
  5864. test -z "$ac_cv_path_PDAL_CONFIG" && ac_cv_path_PDAL_CONFIG="no"
  5865. ;;
  5866. esac
  5867. PDAL_CONFIG="$ac_cv_path_PDAL_CONFIG"
  5868. if test -n "$PDAL_CONFIG"; then
  5869. echo "$ac_t""$PDAL_CONFIG" 1>&6
  5870. else
  5871. echo "$ac_t""no" 1>&6
  5872. fi
  5873. if test "$PDAL_CONFIG" = "no" ; then
  5874. { echo "configure: error: *** could not find pdal-config" 1>&2; exit 1; }
  5875. fi
  5876. if test "$PDAL_CONFIG" != "" ; then
  5877. PDAL_LIBS=`"$PDAL_CONFIG" --libs`
  5878. PDAL_CPPFLAGS=`"$PDAL_CONFIG" --cxxflags`
  5879. PDAL_INC=`"$PDAL_CONFIG" --includes`
  5880. USE_PDAL=1
  5881. fi
  5882. PDAL=
  5883. ac_save_libs="$LIBS"
  5884. ac_save_cflags="$CFLAGS"
  5885. ac_save_cppflags="$CPPFLAGS"
  5886. LIBS="$LIBS $PDAL_LIBS"
  5887. CFLAGS="$CFLAGS $PDAL_CFLAGS"
  5888. CPPFLAGS="$CPPFLAGS $PDAL_CPPFLAGS $PDAL_INC"
  5889. cat > conftest.$ac_ext <<EOF
  5890. #line 7149 "configure"
  5891. #include "confdefs.h"
  5892. #include <pdal/PointTable.hpp>
  5893. int main() {
  5894. pdal::PointTable table;
  5895. ; return 0; }
  5896. EOF
  5897. if { (eval echo configure:7156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5898. :
  5899. else
  5900. echo "configure: failed program was:" >&5
  5901. cat conftest.$ac_ext >&5
  5902. rm -rf conftest*
  5903. cat > conftest.$ac_ext <<EOF
  5904. #line 7164 "configure"
  5905. #include "confdefs.h"
  5906. #include <pdal/PointTable.hpp>
  5907. int main() {
  5908. pdal::PointTable table;
  5909. ; return 0; }
  5910. EOF
  5911. if { (eval echo configure:7171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5912. rm -rf conftest*
  5913. PDAL_LIBS="$PDAL_LIBS"
  5914. else
  5915. echo "configure: failed program was:" >&5
  5916. cat conftest.$ac_ext >&5
  5917. rm -rf conftest*
  5918. { echo "configure: error: *** Unable to locate PDAL library." 1>&2; exit 1; }
  5919. fi
  5920. rm -f conftest*
  5921. fi
  5922. rm -f conftest*
  5923. LIBS=${ac_save_libs}
  5924. CFLAGS=${ac_save_cflags}
  5925. CPPFLAGS=${ac_save_cppflags}
  5926. cat >> confdefs.h <<\EOF
  5927. #define HAVE_PDAL 1
  5928. EOF
  5929. fi
  5930. # new and currently used way to switch language back to C
  5931. # AC_LANG_POP(C++)
  5932. ac_ext=c
  5933. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  5934. ac_cpp='$CPP $CPPFLAGS'
  5935. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  5936. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  5937. cross_compiling=$ac_cv_prog_cc_cross
  5938. ac_ext=c
  5939. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  5940. ac_cpp='$CPP $CPPFLAGS'
  5941. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  5942. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  5943. cross_compiling=$ac_cv_prog_cc_cross
  5944. # NetCDF option
  5945. echo $ac_n "checking whether to use NetCDF""... $ac_c" 1>&6
  5946. echo "configure:7221: checking whether to use NetCDF" >&5
  5947. NETCDF_LIBS=
  5948. NETCDF_CFLAGS=
  5949. USE_NETCDF=
  5950. if test "`basename xx/$with_netcdf`" = "nc-config" ; then
  5951. NETCDF_CONFIG="$with_netcdf"
  5952. fi
  5953. if test "$with_netcdf" = "no" ; then
  5954. echo "$ac_t""no" 1>&6
  5955. else
  5956. echo "$ac_t""yes" 1>&6
  5957. # Extract the first word of "nc-config", so it can be a program name with args.
  5958. set dummy nc-config; ac_word=$2
  5959. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5960. echo "configure:7238: checking for $ac_word" >&5
  5961. case "$NETCDF_CONFIG" in
  5962. /*)
  5963. ac_cv_path_NETCDF_CONFIG="$NETCDF_CONFIG" # Let the user override the test with a path.
  5964. ;;
  5965. ?:/*)
  5966. ac_cv_path_NETCDF_CONFIG="$NETCDF_CONFIG" # Let the user override the test with a dos path.
  5967. ;;
  5968. *)
  5969. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5970. ac_dummy="$PATH"
  5971. for ac_dir in $ac_dummy; do
  5972. test -z "$ac_dir" && ac_dir=.
  5973. if test -f $ac_dir/$ac_word; then
  5974. ac_cv_path_NETCDF_CONFIG="$ac_dir/$ac_word"
  5975. break
  5976. fi
  5977. done
  5978. IFS="$ac_save_ifs"
  5979. test -z "$ac_cv_path_NETCDF_CONFIG" && ac_cv_path_NETCDF_CONFIG="no"
  5980. ;;
  5981. esac
  5982. NETCDF_CONFIG="$ac_cv_path_NETCDF_CONFIG"
  5983. if test -n "$NETCDF_CONFIG"; then
  5984. echo "$ac_t""$NETCDF_CONFIG" 1>&6
  5985. else
  5986. echo "$ac_t""no" 1>&6
  5987. fi
  5988. if test "$NETCDF_CONFIG" = "no" ; then
  5989. { echo "configure: error: *** couldn't find nc-config" 1>&2; exit 1; }
  5990. fi
  5991. if test "$NETCDF_CONFIG" != "" ; then
  5992. NETCDF_LIBS=`"$NETCDF_CONFIG" --libs`
  5993. NETCDF_CFLAGS=`"$NETCDF_CONFIG" --cflags`
  5994. USE_NETCDF=1
  5995. fi
  5996. NETCDF=
  5997. ac_save_libs="$LIBS"
  5998. ac_save_cflags="$CFLAGS"
  5999. LIBS="$LIBS $NETCDF_LIBS"
  6000. CFLAGS="$CFLAGS $NETCDF_CFLAGS"
  6001. cat > conftest.$ac_ext <<EOF
  6002. #line 7285 "configure"
  6003. #include "confdefs.h"
  6004. #include <netcdf.h>
  6005. int main() {
  6006. nc_create("foo", NC_CLOBBER, NULL);
  6007. ; return 0; }
  6008. EOF
  6009. if { (eval echo configure:7292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6010. :
  6011. else
  6012. echo "configure: failed program was:" >&5
  6013. cat conftest.$ac_ext >&5
  6014. rm -rf conftest*
  6015. cat > conftest.$ac_ext <<EOF
  6016. #line 7300 "configure"
  6017. #include "confdefs.h"
  6018. #include <netcdf.h>
  6019. int main() {
  6020. nc_create("foo", NC_CLOBBER, NULL);
  6021. ; return 0; }
  6022. EOF
  6023. if { (eval echo configure:7307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6024. rm -rf conftest*
  6025. NETCDF_LIBS="$NETCDF_LIBS"
  6026. else
  6027. echo "configure: failed program was:" >&5
  6028. cat conftest.$ac_ext >&5
  6029. rm -rf conftest*
  6030. { echo "configure: error: *** Unable to locate NetCDF library." 1>&2; exit 1; }
  6031. fi
  6032. rm -f conftest*
  6033. fi
  6034. rm -f conftest*
  6035. LIBS=${ac_save_libs}
  6036. CFLAGS=${ac_save_cflags}
  6037. cat >> confdefs.h <<\EOF
  6038. #define HAVE_NETCDF 1
  6039. EOF
  6040. fi
  6041. # GEOS option
  6042. echo $ac_n "checking whether to use GEOS""... $ac_c" 1>&6
  6043. echo "configure:7338: checking whether to use GEOS" >&5
  6044. GEOS_LIBS=
  6045. GEOS_CFLAGS=
  6046. USE_GEOS=
  6047. # FIXME: "quote" $with_geos ?
  6048. if test "`basename xx/$with_geos`" = "geos-config" ; then
  6049. GEOS_CONFIG="$with_geos"
  6050. fi
  6051. if test "$with_geos" = "no" ; then
  6052. echo "$ac_t""no" 1>&6
  6053. else
  6054. echo "$ac_t""yes" 1>&6
  6055. # Extract the first word of "geos-config", so it can be a program name with args.
  6056. set dummy geos-config; ac_word=$2
  6057. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  6058. echo "configure:7356: checking for $ac_word" >&5
  6059. case "$GEOS_CONFIG" in
  6060. /*)
  6061. ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a path.
  6062. ;;
  6063. ?:/*)
  6064. ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a dos path.
  6065. ;;
  6066. *)
  6067. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  6068. ac_dummy="$PATH"
  6069. for ac_dir in $ac_dummy; do
  6070. test -z "$ac_dir" && ac_dir=.
  6071. if test -f $ac_dir/$ac_word; then
  6072. ac_cv_path_GEOS_CONFIG="$ac_dir/$ac_word"
  6073. break
  6074. fi
  6075. done
  6076. IFS="$ac_save_ifs"
  6077. test -z "$ac_cv_path_GEOS_CONFIG" && ac_cv_path_GEOS_CONFIG="no"
  6078. ;;
  6079. esac
  6080. GEOS_CONFIG="$ac_cv_path_GEOS_CONFIG"
  6081. if test -n "$GEOS_CONFIG"; then
  6082. echo "$ac_t""$GEOS_CONFIG" 1>&6
  6083. else
  6084. echo "$ac_t""no" 1>&6
  6085. fi
  6086. if test "$GEOS_CONFIG" = "no" ; then
  6087. { echo "configure: error: *** couldn't find geos-config" 1>&2; exit 1; }
  6088. fi
  6089. if test "$GEOS_CONFIG" != "" ; then
  6090. GEOS_LIBS=`"$GEOS_CONFIG" --clibs`
  6091. GEOS_CFLAGS=`"$GEOS_CONFIG" --cflags`
  6092. USE_GEOS=1
  6093. fi
  6094. ac_save_cppflags="$CPPFLAGS"
  6095. CPPFLAGS="$GEOS_CFLAGS $CPPFLAGS"
  6096. for ac_hdr in geos_c.h
  6097. do
  6098. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6099. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6100. echo "configure:7404: checking for $ac_hdr" >&5
  6101. cat > conftest.$ac_ext <<EOF
  6102. #line 7407 "configure"
  6103. #include "confdefs.h"
  6104. #include <$ac_hdr>
  6105. EOF
  6106. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6107. { (eval echo configure:7412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6108. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6109. if test -z "$ac_err"; then
  6110. rm -rf conftest*
  6111. eval "ac_cv_header_$ac_safe=yes"
  6112. else
  6113. echo "$ac_err" >&5
  6114. echo "configure: failed program was:" >&5
  6115. cat conftest.$ac_ext >&5
  6116. rm -rf conftest*
  6117. eval "ac_cv_header_$ac_safe=no"
  6118. fi
  6119. rm -f conftest*
  6120. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6121. echo "$ac_t""yes" 1>&6
  6122. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6123. cat >> confdefs.h <<EOF
  6124. #define $ac_tr_hdr 1
  6125. EOF
  6126. else
  6127. echo "$ac_t""no" 1>&6
  6128. { echo "configure: error: *** Unable to locate GEOS includes." 1>&2; exit 1; }
  6129. fi
  6130. done
  6131. CPPFLAGS=$ac_save_cppflags
  6132. ### 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
  6133. # if test "$MINGW32" = yes ; then
  6134. # LOC_CHECK_LIBS(geos_c_i,initGEOS,GEOS,$GEOS_LIBS,GEOS_LIBS)
  6135. # else
  6136. ac_save_ldflags="$LDFLAGS"
  6137. LDFLAGS="$GEOS_LIBS $LDFLAGS"
  6138. echo $ac_n "checking for initGEOS in -lgeos_c""... $ac_c" 1>&6
  6139. echo "configure:7451: checking for initGEOS in -lgeos_c" >&5
  6140. ac_lib_var=`echo geos_c'_'initGEOS | sed 'y%./+-%__p_%'`
  6141. ac_save_LIBS="$LIBS"
  6142. LIBS="-lgeos_c $LIBS"
  6143. cat > conftest.$ac_ext <<EOF
  6144. #line 7457 "configure"
  6145. #include "confdefs.h"
  6146. /* Override any gcc2 internal prototype to avoid an error. */
  6147. /* We use char because int might match the return type of a gcc2
  6148. builtin and then its argument prototype would still apply. */
  6149. char initGEOS();
  6150. int main() {
  6151. initGEOS()
  6152. ; return 0; }
  6153. EOF
  6154. if { (eval echo configure:7468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6155. rm -rf conftest*
  6156. eval "ac_cv_lib_$ac_lib_var=yes"
  6157. else
  6158. echo "configure: failed program was:" >&5
  6159. cat conftest.$ac_ext >&5
  6160. rm -rf conftest*
  6161. eval "ac_cv_lib_$ac_lib_var=no"
  6162. fi
  6163. rm -f conftest*
  6164. LIBS="$ac_save_LIBS"
  6165. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6166. echo "$ac_t""yes" 1>&6
  6167. GEOS_LIBS="$GEOS_LIBS -lgeos_c "
  6168. else
  6169. echo "$ac_t""no" 1>&6
  6170. LDFLAGS=${ac_save_ldflags}
  6171. { echo "configure: error: *** Unable to locate GEOS library." 1>&2; exit 1; }
  6172. fi
  6173. LDFLAGS=${ac_save_ldflags}
  6174. # fi
  6175. cat >> confdefs.h <<\EOF
  6176. #define HAVE_GEOS 1
  6177. EOF
  6178. fi
  6179. # Enable TIFF option
  6180. echo $ac_n "checking whether to use TIFF""... $ac_c" 1>&6
  6181. echo "configure:7512: checking whether to use TIFF" >&5
  6182. echo "$ac_t"""$with_tiff"" 1>&6
  6183. case "$with_tiff" in
  6184. "no") USE_TIFF= ;;
  6185. "yes") USE_TIFF="1" ;;
  6186. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6187. esac
  6188. TIFF_INCLUDE_DIRS=
  6189. TIFF_LIBRARY_DIRS=
  6190. TIFFLIB=
  6191. if test -n "$USE_TIFF"; then
  6192. # With TIFF includes directory
  6193. echo $ac_n "checking for location of TIFF includes""... $ac_c" 1>&6
  6194. echo "configure:7532: checking for location of TIFF includes" >&5
  6195. case "$with_tiff_includes" in
  6196. y | ye | yes | n | no)
  6197. { echo "configure: error: *** You must supply a directory to --with-tiff-includes." 1>&2; exit 1; }
  6198. ;;
  6199. esac
  6200. echo "$ac_t""$with_tiff_includes" 1>&6
  6201. if test -n "$with_tiff_includes" ; then
  6202. for dir in $with_tiff_includes; do
  6203. if test -d "$dir"; then
  6204. TIFF_INCLUDE_DIRS="$TIFF_INCLUDE_DIRS -I$dir"
  6205. else
  6206. { echo "configure: error: *** TIFF includes directory $dir does not exist." 1>&2; exit 1; }
  6207. fi
  6208. done
  6209. fi
  6210. ac_save_cppflags="$CPPFLAGS"
  6211. CPPFLAGS="$TIFF_INCLUDE_DIRS $CPPFLAGS"
  6212. for ac_hdr in tiffio.h
  6213. do
  6214. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6215. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6216. echo "configure:7558: checking for $ac_hdr" >&5
  6217. cat > conftest.$ac_ext <<EOF
  6218. #line 7561 "configure"
  6219. #include "confdefs.h"
  6220. #include <$ac_hdr>
  6221. EOF
  6222. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6223. { (eval echo configure:7566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6224. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6225. if test -z "$ac_err"; then
  6226. rm -rf conftest*
  6227. eval "ac_cv_header_$ac_safe=yes"
  6228. else
  6229. echo "$ac_err" >&5
  6230. echo "configure: failed program was:" >&5
  6231. cat conftest.$ac_ext >&5
  6232. rm -rf conftest*
  6233. eval "ac_cv_header_$ac_safe=no"
  6234. fi
  6235. rm -f conftest*
  6236. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6237. echo "$ac_t""yes" 1>&6
  6238. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6239. cat >> confdefs.h <<EOF
  6240. #define $ac_tr_hdr 1
  6241. EOF
  6242. else
  6243. echo "$ac_t""no" 1>&6
  6244. { echo "configure: error: *** Unable to locate TIFF includes." 1>&2; exit 1; }
  6245. fi
  6246. done
  6247. CPPFLAGS=$ac_save_cppflags
  6248. # With TIFF library directory
  6249. echo $ac_n "checking for location of TIFF library""... $ac_c" 1>&6
  6250. echo "configure:7600: checking for location of TIFF library" >&5
  6251. case "$with_tiff_libs" in
  6252. y | ye | yes | n | no)
  6253. { echo "configure: error: *** You must supply a directory to --with-tiff-libs." 1>&2; exit 1; }
  6254. ;;
  6255. esac
  6256. echo "$ac_t""$with_tiff_libs" 1>&6
  6257. if test -n "$with_tiff_libs"; then
  6258. for dir in $with_tiff_libs; do
  6259. if test -d "$dir"; then
  6260. TIFF_LIBRARY_DIRS="$TIFF_LIBRARY_DIRS -L$dir"
  6261. else
  6262. { echo "configure: error: *** TIFF library directory $dir does not exist." 1>&2; exit 1; }
  6263. fi
  6264. done
  6265. fi
  6266. ac_save_ldflags="$LDFLAGS"
  6267. LDFLAGS="$TIFF_LIBRARY_DIRS $LDFLAGS"
  6268. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6269. echo "configure:7631: checking for TIFFOpen in -ltiff" >&5
  6270. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6271. ac_save_LIBS="$LIBS"
  6272. LIBS="-ltiff $LIBS"
  6273. cat > conftest.$ac_ext <<EOF
  6274. #line 7637 "configure"
  6275. #include "confdefs.h"
  6276. /* Override any gcc2 internal prototype to avoid an error. */
  6277. /* We use char because int might match the return type of a gcc2
  6278. builtin and then its argument prototype would still apply. */
  6279. char TIFFOpen();
  6280. int main() {
  6281. TIFFOpen()
  6282. ; return 0; }
  6283. EOF
  6284. if { (eval echo configure:7648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6285. rm -rf conftest*
  6286. eval "ac_cv_lib_$ac_lib_var=yes"
  6287. else
  6288. echo "configure: failed program was:" >&5
  6289. cat conftest.$ac_ext >&5
  6290. rm -rf conftest*
  6291. eval "ac_cv_lib_$ac_lib_var=no"
  6292. fi
  6293. rm -f conftest*
  6294. LIBS="$ac_save_LIBS"
  6295. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6296. echo "$ac_t""yes" 1>&6
  6297. TIFFLIB="$TIFFLIB -ltiff "
  6298. else
  6299. echo "$ac_t""no" 1>&6
  6300. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6301. echo "configure:7667: checking for TIFFOpen in -ltiff" >&5
  6302. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6303. ac_save_LIBS="$LIBS"
  6304. LIBS="-ltiff $MATHLIB $LIBS"
  6305. cat > conftest.$ac_ext <<EOF
  6306. #line 7673 "configure"
  6307. #include "confdefs.h"
  6308. /* Override any gcc2 internal prototype to avoid an error. */
  6309. /* We use char because int might match the return type of a gcc2
  6310. builtin and then its argument prototype would still apply. */
  6311. char TIFFOpen();
  6312. int main() {
  6313. TIFFOpen()
  6314. ; return 0; }
  6315. EOF
  6316. if { (eval echo configure:7684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6317. rm -rf conftest*
  6318. eval "ac_cv_lib_$ac_lib_var=yes"
  6319. else
  6320. echo "configure: failed program was:" >&5
  6321. cat conftest.$ac_ext >&5
  6322. rm -rf conftest*
  6323. eval "ac_cv_lib_$ac_lib_var=no"
  6324. fi
  6325. rm -f conftest*
  6326. LIBS="$ac_save_LIBS"
  6327. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6328. echo "$ac_t""yes" 1>&6
  6329. TIFFLIB="$TIFFLIB -ltiff $MATHLIB"
  6330. else
  6331. echo "$ac_t""no" 1>&6
  6332. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6333. echo "configure:7703: checking for TIFFOpen in -ltiff" >&5
  6334. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6335. ac_save_LIBS="$LIBS"
  6336. LIBS="-ltiff $ZLIB $LIBS"
  6337. cat > conftest.$ac_ext <<EOF
  6338. #line 7709 "configure"
  6339. #include "confdefs.h"
  6340. /* Override any gcc2 internal prototype to avoid an error. */
  6341. /* We use char because int might match the return type of a gcc2
  6342. builtin and then its argument prototype would still apply. */
  6343. char TIFFOpen();
  6344. int main() {
  6345. TIFFOpen()
  6346. ; return 0; }
  6347. EOF
  6348. if { (eval echo configure:7720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6349. rm -rf conftest*
  6350. eval "ac_cv_lib_$ac_lib_var=yes"
  6351. else
  6352. echo "configure: failed program was:" >&5
  6353. cat conftest.$ac_ext >&5
  6354. rm -rf conftest*
  6355. eval "ac_cv_lib_$ac_lib_var=no"
  6356. fi
  6357. rm -f conftest*
  6358. LIBS="$ac_save_LIBS"
  6359. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6360. echo "$ac_t""yes" 1>&6
  6361. TIFFLIB="$TIFFLIB -ltiff $ZLIB"
  6362. else
  6363. echo "$ac_t""no" 1>&6
  6364. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6365. echo "configure:7739: checking for TIFFOpen in -ltiff" >&5
  6366. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6367. ac_save_LIBS="$LIBS"
  6368. LIBS="-ltiff $ZLIB $MATHLIB $LIBS"
  6369. cat > conftest.$ac_ext <<EOF
  6370. #line 7745 "configure"
  6371. #include "confdefs.h"
  6372. /* Override any gcc2 internal prototype to avoid an error. */
  6373. /* We use char because int might match the return type of a gcc2
  6374. builtin and then its argument prototype would still apply. */
  6375. char TIFFOpen();
  6376. int main() {
  6377. TIFFOpen()
  6378. ; return 0; }
  6379. EOF
  6380. if { (eval echo configure:7756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6381. rm -rf conftest*
  6382. eval "ac_cv_lib_$ac_lib_var=yes"
  6383. else
  6384. echo "configure: failed program was:" >&5
  6385. cat conftest.$ac_ext >&5
  6386. rm -rf conftest*
  6387. eval "ac_cv_lib_$ac_lib_var=no"
  6388. fi
  6389. rm -f conftest*
  6390. LIBS="$ac_save_LIBS"
  6391. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6392. echo "$ac_t""yes" 1>&6
  6393. TIFFLIB="$TIFFLIB -ltiff $ZLIB $MATHLIB"
  6394. else
  6395. echo "$ac_t""no" 1>&6
  6396. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6397. echo "configure:7775: checking for TIFFOpen in -ltiff" >&5
  6398. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6399. ac_save_LIBS="$LIBS"
  6400. LIBS="-ltiff -ljpeg $LIBS"
  6401. cat > conftest.$ac_ext <<EOF
  6402. #line 7781 "configure"
  6403. #include "confdefs.h"
  6404. /* Override any gcc2 internal prototype to avoid an error. */
  6405. /* We use char because int might match the return type of a gcc2
  6406. builtin and then its argument prototype would still apply. */
  6407. char TIFFOpen();
  6408. int main() {
  6409. TIFFOpen()
  6410. ; return 0; }
  6411. EOF
  6412. if { (eval echo configure:7792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6413. rm -rf conftest*
  6414. eval "ac_cv_lib_$ac_lib_var=yes"
  6415. else
  6416. echo "configure: failed program was:" >&5
  6417. cat conftest.$ac_ext >&5
  6418. rm -rf conftest*
  6419. eval "ac_cv_lib_$ac_lib_var=no"
  6420. fi
  6421. rm -f conftest*
  6422. LIBS="$ac_save_LIBS"
  6423. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6424. echo "$ac_t""yes" 1>&6
  6425. TIFFLIB="$TIFFLIB -ltiff -ljpeg"
  6426. else
  6427. echo "$ac_t""no" 1>&6
  6428. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6429. echo "configure:7811: checking for TIFFOpen in -ltiff" >&5
  6430. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6431. ac_save_LIBS="$LIBS"
  6432. LIBS="-ltiff -ljpeg $MATHLIB $LIBS"
  6433. cat > conftest.$ac_ext <<EOF
  6434. #line 7817 "configure"
  6435. #include "confdefs.h"
  6436. /* Override any gcc2 internal prototype to avoid an error. */
  6437. /* We use char because int might match the return type of a gcc2
  6438. builtin and then its argument prototype would still apply. */
  6439. char TIFFOpen();
  6440. int main() {
  6441. TIFFOpen()
  6442. ; return 0; }
  6443. EOF
  6444. if { (eval echo configure:7828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6445. rm -rf conftest*
  6446. eval "ac_cv_lib_$ac_lib_var=yes"
  6447. else
  6448. echo "configure: failed program was:" >&5
  6449. cat conftest.$ac_ext >&5
  6450. rm -rf conftest*
  6451. eval "ac_cv_lib_$ac_lib_var=no"
  6452. fi
  6453. rm -f conftest*
  6454. LIBS="$ac_save_LIBS"
  6455. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6456. echo "$ac_t""yes" 1>&6
  6457. TIFFLIB="$TIFFLIB -ltiff -ljpeg $MATHLIB"
  6458. else
  6459. echo "$ac_t""no" 1>&6
  6460. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6461. echo "configure:7847: checking for TIFFOpen in -ltiff" >&5
  6462. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6463. ac_save_LIBS="$LIBS"
  6464. LIBS="-ltiff -ljpeg $ZLIB $LIBS"
  6465. cat > conftest.$ac_ext <<EOF
  6466. #line 7853 "configure"
  6467. #include "confdefs.h"
  6468. /* Override any gcc2 internal prototype to avoid an error. */
  6469. /* We use char because int might match the return type of a gcc2
  6470. builtin and then its argument prototype would still apply. */
  6471. char TIFFOpen();
  6472. int main() {
  6473. TIFFOpen()
  6474. ; return 0; }
  6475. EOF
  6476. if { (eval echo configure:7864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6477. rm -rf conftest*
  6478. eval "ac_cv_lib_$ac_lib_var=yes"
  6479. else
  6480. echo "configure: failed program was:" >&5
  6481. cat conftest.$ac_ext >&5
  6482. rm -rf conftest*
  6483. eval "ac_cv_lib_$ac_lib_var=no"
  6484. fi
  6485. rm -f conftest*
  6486. LIBS="$ac_save_LIBS"
  6487. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6488. echo "$ac_t""yes" 1>&6
  6489. TIFFLIB="$TIFFLIB -ltiff -ljpeg $ZLIB"
  6490. else
  6491. echo "$ac_t""no" 1>&6
  6492. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6493. echo "configure:7883: checking for TIFFOpen in -ltiff" >&5
  6494. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6495. ac_save_LIBS="$LIBS"
  6496. LIBS="-ltiff -ljpeg $ZLIB $MATHLIB $LIBS"
  6497. cat > conftest.$ac_ext <<EOF
  6498. #line 7889 "configure"
  6499. #include "confdefs.h"
  6500. /* Override any gcc2 internal prototype to avoid an error. */
  6501. /* We use char because int might match the return type of a gcc2
  6502. builtin and then its argument prototype would still apply. */
  6503. char TIFFOpen();
  6504. int main() {
  6505. TIFFOpen()
  6506. ; return 0; }
  6507. EOF
  6508. if { (eval echo configure:7900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6509. rm -rf conftest*
  6510. eval "ac_cv_lib_$ac_lib_var=yes"
  6511. else
  6512. echo "configure: failed program was:" >&5
  6513. cat conftest.$ac_ext >&5
  6514. rm -rf conftest*
  6515. eval "ac_cv_lib_$ac_lib_var=no"
  6516. fi
  6517. rm -f conftest*
  6518. LIBS="$ac_save_LIBS"
  6519. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6520. echo "$ac_t""yes" 1>&6
  6521. TIFFLIB="$TIFFLIB -ltiff -ljpeg $ZLIB $MATHLIB"
  6522. else
  6523. echo "$ac_t""no" 1>&6
  6524. LDFLAGS=${ac_save_ldflags}
  6525. { echo "configure: error: *** Unable to locate TIFF library." 1>&2; exit 1; }
  6526. fi
  6527. fi
  6528. fi
  6529. fi
  6530. fi
  6531. fi
  6532. fi
  6533. fi
  6534. LDFLAGS=${ac_save_ldflags}
  6535. fi # $USE_TIFF
  6536. # Done checking TIFF
  6537. # Enable PNG option
  6538. echo $ac_n "checking whether to use PNG""... $ac_c" 1>&6
  6539. echo "configure:7998: checking whether to use PNG" >&5
  6540. echo "$ac_t"""$with_png"" 1>&6
  6541. case "$with_png" in
  6542. "no") USE_PNG= ;;
  6543. "yes") USE_PNG="1" ;;
  6544. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6545. esac
  6546. PNGINC=
  6547. PNGLIB=
  6548. if test -n "$USE_PNG"; then
  6549. # With PNG includes directory
  6550. echo $ac_n "checking for location of PNG includes""... $ac_c" 1>&6
  6551. echo "configure:8017: checking for location of PNG includes" >&5
  6552. case "$with_png_includes" in
  6553. y | ye | yes | n | no)
  6554. { echo "configure: error: *** You must supply a directory to --with-png-includes." 1>&2; exit 1; }
  6555. ;;
  6556. esac
  6557. echo "$ac_t""$with_png_includes" 1>&6
  6558. if test -n "$with_png_includes" ; then
  6559. for dir in $with_png_includes; do
  6560. if test -d "$dir"; then
  6561. PNGINC="$PNGINC -I$dir"
  6562. else
  6563. { echo "configure: error: *** PNG includes directory $dir does not exist." 1>&2; exit 1; }
  6564. fi
  6565. done
  6566. fi
  6567. ac_save_cppflags="$CPPFLAGS"
  6568. CPPFLAGS="$PNGINC $CPPFLAGS"
  6569. for ac_hdr in png.h
  6570. do
  6571. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6572. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6573. echo "configure:8043: checking for $ac_hdr" >&5
  6574. cat > conftest.$ac_ext <<EOF
  6575. #line 8046 "configure"
  6576. #include "confdefs.h"
  6577. #include <$ac_hdr>
  6578. EOF
  6579. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6580. { (eval echo configure:8051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6581. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6582. if test -z "$ac_err"; then
  6583. rm -rf conftest*
  6584. eval "ac_cv_header_$ac_safe=yes"
  6585. else
  6586. echo "$ac_err" >&5
  6587. echo "configure: failed program was:" >&5
  6588. cat conftest.$ac_ext >&5
  6589. rm -rf conftest*
  6590. eval "ac_cv_header_$ac_safe=no"
  6591. fi
  6592. rm -f conftest*
  6593. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6594. echo "$ac_t""yes" 1>&6
  6595. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6596. cat >> confdefs.h <<EOF
  6597. #define $ac_tr_hdr 1
  6598. EOF
  6599. else
  6600. echo "$ac_t""no" 1>&6
  6601. { echo "configure: error: *** Unable to locate PNG includes." 1>&2; exit 1; }
  6602. fi
  6603. done
  6604. CPPFLAGS=$ac_save_cppflags
  6605. # With PNG library directory
  6606. echo $ac_n "checking for location of PNG library""... $ac_c" 1>&6
  6607. echo "configure:8085: checking for location of PNG library" >&5
  6608. case "$with_png_libs" in
  6609. y | ye | yes | n | no)
  6610. { echo "configure: error: *** You must supply a directory to --with-png-libs." 1>&2; exit 1; }
  6611. ;;
  6612. esac
  6613. echo "$ac_t""$with_png_libs" 1>&6
  6614. if test -n "$with_png_libs"; then
  6615. for dir in $with_png_libs; do
  6616. if test -d "$dir"; then
  6617. PNGLIB="$PNGLIB -L$dir"
  6618. else
  6619. { echo "configure: error: *** PNG library directory $dir does not exist." 1>&2; exit 1; }
  6620. fi
  6621. done
  6622. fi
  6623. ac_save_ldflags="$LDFLAGS"
  6624. LDFLAGS="$PNGLIB $LDFLAGS"
  6625. echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
  6626. echo "configure:8110: checking for png_read_image in -lpng" >&5
  6627. ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
  6628. ac_save_LIBS="$LIBS"
  6629. LIBS="-lpng $ZLIB $MATHLIB $LIBS"
  6630. cat > conftest.$ac_ext <<EOF
  6631. #line 8116 "configure"
  6632. #include "confdefs.h"
  6633. /* Override any gcc2 internal prototype to avoid an error. */
  6634. /* We use char because int might match the return type of a gcc2
  6635. builtin and then its argument prototype would still apply. */
  6636. char png_read_image();
  6637. int main() {
  6638. png_read_image()
  6639. ; return 0; }
  6640. EOF
  6641. if { (eval echo configure:8127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6642. rm -rf conftest*
  6643. eval "ac_cv_lib_$ac_lib_var=yes"
  6644. else
  6645. echo "configure: failed program was:" >&5
  6646. cat conftest.$ac_ext >&5
  6647. rm -rf conftest*
  6648. eval "ac_cv_lib_$ac_lib_var=no"
  6649. fi
  6650. rm -f conftest*
  6651. LIBS="$ac_save_LIBS"
  6652. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6653. echo "$ac_t""yes" 1>&6
  6654. PNGLIB="$PNGLIB -lpng $ZLIB $MATHLIB"
  6655. else
  6656. echo "$ac_t""no" 1>&6
  6657. LDFLAGS=${ac_save_ldflags}
  6658. { echo "configure: error: *** Unable to locate PNG library." 1>&2; exit 1; }
  6659. fi
  6660. LDFLAGS=${ac_save_ldflags}
  6661. fi # $USE_PNG
  6662. # Done checking PNG
  6663. # Enable PostgreSQL option
  6664. echo $ac_n "checking whether to use PostgreSQL""... $ac_c" 1>&6
  6665. echo "configure:8169: checking whether to use PostgreSQL" >&5
  6666. echo "$ac_t"""$with_postgres"" 1>&6
  6667. case "$with_postgres" in
  6668. "no") USE_POSTGRES= ;;
  6669. "yes") USE_POSTGRES="1" ;;
  6670. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6671. esac
  6672. if test -n "$USE_POSTGRES"; then
  6673. cat >> confdefs.h <<\EOF
  6674. #define HAVE_POSTGRES 1
  6675. EOF
  6676. fi # $USE_POSTGRES
  6677. PQINCPATH=
  6678. PQLIBPATH=
  6679. PQLIB=
  6680. if test -n "$USE_POSTGRES"; then
  6681. # With PostgreSQL includes directory
  6682. echo $ac_n "checking for location of PostgreSQL includes""... $ac_c" 1>&6
  6683. echo "configure:8196: checking for location of PostgreSQL includes" >&5
  6684. case "$with_postgres_includes" in
  6685. y | ye | yes | n | no)
  6686. { echo "configure: error: *** You must supply a directory to --with-postgres-includes." 1>&2; exit 1; }
  6687. ;;
  6688. esac
  6689. echo "$ac_t""$with_postgres_includes" 1>&6
  6690. if test -n "$with_postgres_includes" ; then
  6691. for dir in $with_postgres_includes; do
  6692. if test -d "$dir"; then
  6693. PQINCPATH="$PQINCPATH -I$dir"
  6694. else
  6695. { echo "configure: error: *** PostgreSQL includes directory $dir does not exist." 1>&2; exit 1; }
  6696. fi
  6697. done
  6698. fi
  6699. ac_save_cppflags="$CPPFLAGS"
  6700. CPPFLAGS="$PQINCPATH $CPPFLAGS"
  6701. for ac_hdr in libpq-fe.h
  6702. do
  6703. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6704. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6705. echo "configure:8222: checking for $ac_hdr" >&5
  6706. cat > conftest.$ac_ext <<EOF
  6707. #line 8225 "configure"
  6708. #include "confdefs.h"
  6709. #include <$ac_hdr>
  6710. EOF
  6711. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6712. { (eval echo configure:8230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6713. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6714. if test -z "$ac_err"; then
  6715. rm -rf conftest*
  6716. eval "ac_cv_header_$ac_safe=yes"
  6717. else
  6718. echo "$ac_err" >&5
  6719. echo "configure: failed program was:" >&5
  6720. cat conftest.$ac_ext >&5
  6721. rm -rf conftest*
  6722. eval "ac_cv_header_$ac_safe=no"
  6723. fi
  6724. rm -f conftest*
  6725. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6726. echo "$ac_t""yes" 1>&6
  6727. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6728. cat >> confdefs.h <<EOF
  6729. #define $ac_tr_hdr 1
  6730. EOF
  6731. else
  6732. echo "$ac_t""no" 1>&6
  6733. { echo "configure: error: *** Unable to locate PostgreSQL includes." 1>&2; exit 1; }
  6734. fi
  6735. done
  6736. CPPFLAGS=$ac_save_cppflags
  6737. fi # $USE_POSTGRES
  6738. if test -n "$USE_POSTGRES"; then
  6739. # With PostgreSQL library directory
  6740. echo $ac_n "checking for location of PostgreSQL library""... $ac_c" 1>&6
  6741. echo "configure:8268: checking for location of PostgreSQL library" >&5
  6742. case "$with_postgres_libs" in
  6743. y | ye | yes | n | no)
  6744. { echo "configure: error: *** You must supply a directory to --with-postgres-libs." 1>&2; exit 1; }
  6745. ;;
  6746. esac
  6747. echo "$ac_t""$with_postgres_libs" 1>&6
  6748. if test -n "$with_postgres_libs"; then
  6749. for dir in $with_postgres_libs; do
  6750. if test -d "$dir"; then
  6751. PQLIBPATH="$PQLIBPATH -L$dir"
  6752. else
  6753. { echo "configure: error: *** PostgreSQL library directory $dir does not exist." 1>&2; exit 1; }
  6754. fi
  6755. done
  6756. fi
  6757. ac_save_ldflags="$LDFLAGS"
  6758. LDFLAGS="$PQLIBPATH $LDFLAGS"
  6759. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6760. echo "configure:8297: checking for PQsetdbLogin in -lpq" >&5
  6761. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6762. ac_save_LIBS="$LIBS"
  6763. LIBS="-lpq $LIBS"
  6764. cat > conftest.$ac_ext <<EOF
  6765. #line 8303 "configure"
  6766. #include "confdefs.h"
  6767. /* Override any gcc2 internal prototype to avoid an error. */
  6768. /* We use char because int might match the return type of a gcc2
  6769. builtin and then its argument prototype would still apply. */
  6770. char PQsetdbLogin();
  6771. int main() {
  6772. PQsetdbLogin()
  6773. ; return 0; }
  6774. EOF
  6775. if { (eval echo configure:8314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6776. rm -rf conftest*
  6777. eval "ac_cv_lib_$ac_lib_var=yes"
  6778. else
  6779. echo "configure: failed program was:" >&5
  6780. cat conftest.$ac_ext >&5
  6781. rm -rf conftest*
  6782. eval "ac_cv_lib_$ac_lib_var=no"
  6783. fi
  6784. rm -f conftest*
  6785. LIBS="$ac_save_LIBS"
  6786. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6787. echo "$ac_t""yes" 1>&6
  6788. PQLIB="$PQLIB -lpq "
  6789. else
  6790. echo "$ac_t""no" 1>&6
  6791. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6792. echo "configure:8333: checking for PQsetdbLogin in -lpq" >&5
  6793. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6794. ac_save_LIBS="$LIBS"
  6795. LIBS="-lpq -lssl -lcrypto $LIBS"
  6796. cat > conftest.$ac_ext <<EOF
  6797. #line 8339 "configure"
  6798. #include "confdefs.h"
  6799. /* Override any gcc2 internal prototype to avoid an error. */
  6800. /* We use char because int might match the return type of a gcc2
  6801. builtin and then its argument prototype would still apply. */
  6802. char PQsetdbLogin();
  6803. int main() {
  6804. PQsetdbLogin()
  6805. ; return 0; }
  6806. EOF
  6807. if { (eval echo configure:8350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6808. rm -rf conftest*
  6809. eval "ac_cv_lib_$ac_lib_var=yes"
  6810. else
  6811. echo "configure: failed program was:" >&5
  6812. cat conftest.$ac_ext >&5
  6813. rm -rf conftest*
  6814. eval "ac_cv_lib_$ac_lib_var=no"
  6815. fi
  6816. rm -f conftest*
  6817. LIBS="$ac_save_LIBS"
  6818. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6819. echo "$ac_t""yes" 1>&6
  6820. PQLIB="$PQLIB -lpq -lssl -lcrypto"
  6821. else
  6822. echo "$ac_t""no" 1>&6
  6823. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6824. echo "configure:8369: checking for PQsetdbLogin in -lpq" >&5
  6825. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6826. ac_save_LIBS="$LIBS"
  6827. LIBS="-lpq -lcrypt $LIBS"
  6828. cat > conftest.$ac_ext <<EOF
  6829. #line 8375 "configure"
  6830. #include "confdefs.h"
  6831. /* Override any gcc2 internal prototype to avoid an error. */
  6832. /* We use char because int might match the return type of a gcc2
  6833. builtin and then its argument prototype would still apply. */
  6834. char PQsetdbLogin();
  6835. int main() {
  6836. PQsetdbLogin()
  6837. ; return 0; }
  6838. EOF
  6839. if { (eval echo configure:8386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6840. rm -rf conftest*
  6841. eval "ac_cv_lib_$ac_lib_var=yes"
  6842. else
  6843. echo "configure: failed program was:" >&5
  6844. cat conftest.$ac_ext >&5
  6845. rm -rf conftest*
  6846. eval "ac_cv_lib_$ac_lib_var=no"
  6847. fi
  6848. rm -f conftest*
  6849. LIBS="$ac_save_LIBS"
  6850. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6851. echo "$ac_t""yes" 1>&6
  6852. PQLIB="$PQLIB -lpq -lcrypt"
  6853. else
  6854. echo "$ac_t""no" 1>&6
  6855. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6856. echo "configure:8405: checking for PQsetdbLogin in -lpq" >&5
  6857. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6858. ac_save_LIBS="$LIBS"
  6859. LIBS="-lpq -lcrypt -lssl -lcrypto $LIBS"
  6860. cat > conftest.$ac_ext <<EOF
  6861. #line 8411 "configure"
  6862. #include "confdefs.h"
  6863. /* Override any gcc2 internal prototype to avoid an error. */
  6864. /* We use char because int might match the return type of a gcc2
  6865. builtin and then its argument prototype would still apply. */
  6866. char PQsetdbLogin();
  6867. int main() {
  6868. PQsetdbLogin()
  6869. ; return 0; }
  6870. EOF
  6871. if { (eval echo configure:8422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6872. rm -rf conftest*
  6873. eval "ac_cv_lib_$ac_lib_var=yes"
  6874. else
  6875. echo "configure: failed program was:" >&5
  6876. cat conftest.$ac_ext >&5
  6877. rm -rf conftest*
  6878. eval "ac_cv_lib_$ac_lib_var=no"
  6879. fi
  6880. rm -f conftest*
  6881. LIBS="$ac_save_LIBS"
  6882. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6883. echo "$ac_t""yes" 1>&6
  6884. PQLIB="$PQLIB -lpq -lcrypt -lssl -lcrypto"
  6885. else
  6886. echo "$ac_t""no" 1>&6
  6887. LDFLAGS=${ac_save_ldflags}
  6888. { echo "configure: error: *** Unable to locate PostgreSQL library." 1>&2; exit 1; }
  6889. fi
  6890. fi
  6891. fi
  6892. fi
  6893. LDFLAGS=${ac_save_ldflags}
  6894. ac_save_ldflags="$LDFLAGS"
  6895. LDFLAGS="$LDFLAGS $PQLIBPATH"
  6896. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  6897. echo "configure:8479: checking for PQcmdTuples in -lpq" >&5
  6898. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  6899. ac_save_LIBS="$LIBS"
  6900. LIBS="-lpq $LIBS"
  6901. cat > conftest.$ac_ext <<EOF
  6902. #line 8485 "configure"
  6903. #include "confdefs.h"
  6904. /* Override any gcc2 internal prototype to avoid an error. */
  6905. /* We use char because int might match the return type of a gcc2
  6906. builtin and then its argument prototype would still apply. */
  6907. char PQcmdTuples();
  6908. int main() {
  6909. PQcmdTuples()
  6910. ; return 0; }
  6911. EOF
  6912. if { (eval echo configure:8496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6913. rm -rf conftest*
  6914. eval "ac_cv_lib_$ac_lib_var=yes"
  6915. else
  6916. echo "configure: failed program was:" >&5
  6917. cat conftest.$ac_ext >&5
  6918. rm -rf conftest*
  6919. eval "ac_cv_lib_$ac_lib_var=no"
  6920. fi
  6921. rm -f conftest*
  6922. LIBS="$ac_save_LIBS"
  6923. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6924. echo "$ac_t""yes" 1>&6
  6925. cat >> confdefs.h <<\EOF
  6926. #define HAVE_PQCMDTUPLES 1
  6927. EOF
  6928. else
  6929. echo "$ac_t""no" 1>&6
  6930. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  6931. echo "configure:8518: checking for PQcmdTuples in -lpq" >&5
  6932. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  6933. ac_save_LIBS="$LIBS"
  6934. LIBS="-lpq -lcrypt $LIBS"
  6935. cat > conftest.$ac_ext <<EOF
  6936. #line 8524 "configure"
  6937. #include "confdefs.h"
  6938. /* Override any gcc2 internal prototype to avoid an error. */
  6939. /* We use char because int might match the return type of a gcc2
  6940. builtin and then its argument prototype would still apply. */
  6941. char PQcmdTuples();
  6942. int main() {
  6943. PQcmdTuples()
  6944. ; return 0; }
  6945. EOF
  6946. if { (eval echo configure:8535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6947. rm -rf conftest*
  6948. eval "ac_cv_lib_$ac_lib_var=yes"
  6949. else
  6950. echo "configure: failed program was:" >&5
  6951. cat conftest.$ac_ext >&5
  6952. rm -rf conftest*
  6953. eval "ac_cv_lib_$ac_lib_var=no"
  6954. fi
  6955. rm -f conftest*
  6956. LIBS="$ac_save_LIBS"
  6957. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6958. echo "$ac_t""yes" 1>&6
  6959. cat >> confdefs.h <<\EOF
  6960. #define HAVE_PQCMDTUPLES 1
  6961. EOF
  6962. else
  6963. echo "$ac_t""no" 1>&6
  6964. fi
  6965. fi
  6966. LDFLAGS="${ac_save_ldflags}"
  6967. fi # $USE_POSTGRES
  6968. # Done checking PostgreSQL
  6969. # Enable MySQL option
  6970. echo $ac_n "checking whether to use MySQL""... $ac_c" 1>&6
  6971. echo "configure:8578: checking whether to use MySQL" >&5
  6972. echo "$ac_t"""$with_mysql"" 1>&6
  6973. case "$with_mysql" in
  6974. "no") USE_MYSQL= ;;
  6975. "yes") USE_MYSQL="1" ;;
  6976. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6977. esac
  6978. MYSQLINCPATH=
  6979. MYSQLLIBPATH=
  6980. MYSQLLIB=
  6981. if test -n "$USE_MYSQL"; then
  6982. # With MySQL includes directory
  6983. echo $ac_n "checking for location of MySQL includes""... $ac_c" 1>&6
  6984. echo "configure:8598: checking for location of MySQL includes" >&5
  6985. case "$with_mysql_includes" in
  6986. y | ye | yes | n | no)
  6987. { echo "configure: error: *** You must supply a directory to --with-mysql-includes." 1>&2; exit 1; }
  6988. ;;
  6989. esac
  6990. echo "$ac_t""$with_mysql_includes" 1>&6
  6991. if test -n "$with_mysql_includes" ; then
  6992. for dir in $with_mysql_includes; do
  6993. if test -d "$dir"; then
  6994. MYSQLINCPATH="$MYSQLINCPATH -I$dir"
  6995. else
  6996. { echo "configure: error: *** MySQL includes directory $dir does not exist." 1>&2; exit 1; }
  6997. fi
  6998. done
  6999. fi
  7000. ac_save_cppflags="$CPPFLAGS"
  7001. CPPFLAGS="$MYSQLINCPATH $CPPFLAGS"
  7002. for ac_hdr in mysql.h
  7003. do
  7004. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7005. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7006. echo "configure:8624: checking for $ac_hdr" >&5
  7007. cat > conftest.$ac_ext <<EOF
  7008. #line 8627 "configure"
  7009. #include "confdefs.h"
  7010. #include <$ac_hdr>
  7011. EOF
  7012. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7013. { (eval echo configure:8632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7014. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7015. if test -z "$ac_err"; then
  7016. rm -rf conftest*
  7017. eval "ac_cv_header_$ac_safe=yes"
  7018. else
  7019. echo "$ac_err" >&5
  7020. echo "configure: failed program was:" >&5
  7021. cat conftest.$ac_ext >&5
  7022. rm -rf conftest*
  7023. eval "ac_cv_header_$ac_safe=no"
  7024. fi
  7025. rm -f conftest*
  7026. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7027. echo "$ac_t""yes" 1>&6
  7028. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7029. cat >> confdefs.h <<EOF
  7030. #define $ac_tr_hdr 1
  7031. EOF
  7032. else
  7033. echo "$ac_t""no" 1>&6
  7034. { echo "configure: error: *** Unable to locate MySQL includes." 1>&2; exit 1; }
  7035. fi
  7036. done
  7037. CPPFLAGS=$ac_save_cppflags
  7038. fi # $USE_MYSQL
  7039. if test -n "$USE_MYSQL"; then
  7040. # With MySQL library directory
  7041. echo $ac_n "checking for location of MySQL library""... $ac_c" 1>&6
  7042. echo "configure:8669: checking for location of MySQL library" >&5
  7043. case "$with_mysql_libs" in
  7044. y | ye | yes | n | no)
  7045. { echo "configure: error: *** You must supply a directory to --with-mysql-libs." 1>&2; exit 1; }
  7046. ;;
  7047. esac
  7048. echo "$ac_t""$with_mysql_libs" 1>&6
  7049. if test -n "$with_mysql_libs"; then
  7050. for dir in $with_mysql_libs; do
  7051. if test -d "$dir"; then
  7052. MYSQLLIBPATH="$MYSQLLIBPATH -L$dir"
  7053. else
  7054. { echo "configure: error: *** MySQL library directory $dir does not exist." 1>&2; exit 1; }
  7055. fi
  7056. done
  7057. fi
  7058. ac_save_ldflags="$LDFLAGS"
  7059. LDFLAGS="$MYSQLLIBPATH $LDFLAGS"
  7060. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7061. echo "configure:8700: checking for mysql_query in -lmysqlclient" >&5
  7062. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7063. ac_save_LIBS="$LIBS"
  7064. LIBS="-lmysqlclient $LIBS"
  7065. cat > conftest.$ac_ext <<EOF
  7066. #line 8706 "configure"
  7067. #include "confdefs.h"
  7068. /* Override any gcc2 internal prototype to avoid an error. */
  7069. /* We use char because int might match the return type of a gcc2
  7070. builtin and then its argument prototype would still apply. */
  7071. char mysql_query();
  7072. int main() {
  7073. mysql_query()
  7074. ; return 0; }
  7075. EOF
  7076. if { (eval echo configure:8717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7077. rm -rf conftest*
  7078. eval "ac_cv_lib_$ac_lib_var=yes"
  7079. else
  7080. echo "configure: failed program was:" >&5
  7081. cat conftest.$ac_ext >&5
  7082. rm -rf conftest*
  7083. eval "ac_cv_lib_$ac_lib_var=no"
  7084. fi
  7085. rm -f conftest*
  7086. LIBS="$ac_save_LIBS"
  7087. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7088. echo "$ac_t""yes" 1>&6
  7089. MYSQLLIB="$MYSQLLIB -lmysqlclient "
  7090. else
  7091. echo "$ac_t""no" 1>&6
  7092. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7093. echo "configure:8736: checking for mysql_query in -lmysqlclient" >&5
  7094. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7095. ac_save_LIBS="$LIBS"
  7096. LIBS="-lmysqlclient $MATHLIB $LIBS"
  7097. cat > conftest.$ac_ext <<EOF
  7098. #line 8742 "configure"
  7099. #include "confdefs.h"
  7100. /* Override any gcc2 internal prototype to avoid an error. */
  7101. /* We use char because int might match the return type of a gcc2
  7102. builtin and then its argument prototype would still apply. */
  7103. char mysql_query();
  7104. int main() {
  7105. mysql_query()
  7106. ; return 0; }
  7107. EOF
  7108. if { (eval echo configure:8753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7109. rm -rf conftest*
  7110. eval "ac_cv_lib_$ac_lib_var=yes"
  7111. else
  7112. echo "configure: failed program was:" >&5
  7113. cat conftest.$ac_ext >&5
  7114. rm -rf conftest*
  7115. eval "ac_cv_lib_$ac_lib_var=no"
  7116. fi
  7117. rm -f conftest*
  7118. LIBS="$ac_save_LIBS"
  7119. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7120. echo "$ac_t""yes" 1>&6
  7121. MYSQLLIB="$MYSQLLIB -lmysqlclient $MATHLIB"
  7122. else
  7123. echo "$ac_t""no" 1>&6
  7124. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7125. echo "configure:8772: checking for mysql_query in -lmysqlclient" >&5
  7126. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7127. ac_save_LIBS="$LIBS"
  7128. LIBS="-lmysqlclient $SOCKLIB $LIBS"
  7129. cat > conftest.$ac_ext <<EOF
  7130. #line 8778 "configure"
  7131. #include "confdefs.h"
  7132. /* Override any gcc2 internal prototype to avoid an error. */
  7133. /* We use char because int might match the return type of a gcc2
  7134. builtin and then its argument prototype would still apply. */
  7135. char mysql_query();
  7136. int main() {
  7137. mysql_query()
  7138. ; return 0; }
  7139. EOF
  7140. if { (eval echo configure:8789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7141. rm -rf conftest*
  7142. eval "ac_cv_lib_$ac_lib_var=yes"
  7143. else
  7144. echo "configure: failed program was:" >&5
  7145. cat conftest.$ac_ext >&5
  7146. rm -rf conftest*
  7147. eval "ac_cv_lib_$ac_lib_var=no"
  7148. fi
  7149. rm -f conftest*
  7150. LIBS="$ac_save_LIBS"
  7151. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7152. echo "$ac_t""yes" 1>&6
  7153. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB"
  7154. else
  7155. echo "$ac_t""no" 1>&6
  7156. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7157. echo "configure:8808: checking for mysql_query in -lmysqlclient" >&5
  7158. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7159. ac_save_LIBS="$LIBS"
  7160. LIBS="-lmysqlclient $SOCKLIB $MATHLIB $LIBS"
  7161. cat > conftest.$ac_ext <<EOF
  7162. #line 8814 "configure"
  7163. #include "confdefs.h"
  7164. /* Override any gcc2 internal prototype to avoid an error. */
  7165. /* We use char because int might match the return type of a gcc2
  7166. builtin and then its argument prototype would still apply. */
  7167. char mysql_query();
  7168. int main() {
  7169. mysql_query()
  7170. ; return 0; }
  7171. EOF
  7172. if { (eval echo configure:8825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7173. rm -rf conftest*
  7174. eval "ac_cv_lib_$ac_lib_var=yes"
  7175. else
  7176. echo "configure: failed program was:" >&5
  7177. cat conftest.$ac_ext >&5
  7178. rm -rf conftest*
  7179. eval "ac_cv_lib_$ac_lib_var=no"
  7180. fi
  7181. rm -f conftest*
  7182. LIBS="$ac_save_LIBS"
  7183. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7184. echo "$ac_t""yes" 1>&6
  7185. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB $MATHLIB"
  7186. else
  7187. echo "$ac_t""no" 1>&6
  7188. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7189. echo "configure:8844: checking for mysql_query in -lmysqlclient" >&5
  7190. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7191. ac_save_LIBS="$LIBS"
  7192. LIBS="-lmysqlclient $ZLIB $LIBS"
  7193. cat > conftest.$ac_ext <<EOF
  7194. #line 8850 "configure"
  7195. #include "confdefs.h"
  7196. /* Override any gcc2 internal prototype to avoid an error. */
  7197. /* We use char because int might match the return type of a gcc2
  7198. builtin and then its argument prototype would still apply. */
  7199. char mysql_query();
  7200. int main() {
  7201. mysql_query()
  7202. ; return 0; }
  7203. EOF
  7204. if { (eval echo configure:8861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7205. rm -rf conftest*
  7206. eval "ac_cv_lib_$ac_lib_var=yes"
  7207. else
  7208. echo "configure: failed program was:" >&5
  7209. cat conftest.$ac_ext >&5
  7210. rm -rf conftest*
  7211. eval "ac_cv_lib_$ac_lib_var=no"
  7212. fi
  7213. rm -f conftest*
  7214. LIBS="$ac_save_LIBS"
  7215. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7216. echo "$ac_t""yes" 1>&6
  7217. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB"
  7218. else
  7219. echo "$ac_t""no" 1>&6
  7220. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7221. echo "configure:8880: checking for mysql_query in -lmysqlclient" >&5
  7222. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7223. ac_save_LIBS="$LIBS"
  7224. LIBS="-lmysqlclient $ZLIB $MATHLIB $LIBS"
  7225. cat > conftest.$ac_ext <<EOF
  7226. #line 8886 "configure"
  7227. #include "confdefs.h"
  7228. /* Override any gcc2 internal prototype to avoid an error. */
  7229. /* We use char because int might match the return type of a gcc2
  7230. builtin and then its argument prototype would still apply. */
  7231. char mysql_query();
  7232. int main() {
  7233. mysql_query()
  7234. ; return 0; }
  7235. EOF
  7236. if { (eval echo configure:8897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7237. rm -rf conftest*
  7238. eval "ac_cv_lib_$ac_lib_var=yes"
  7239. else
  7240. echo "configure: failed program was:" >&5
  7241. cat conftest.$ac_ext >&5
  7242. rm -rf conftest*
  7243. eval "ac_cv_lib_$ac_lib_var=no"
  7244. fi
  7245. rm -f conftest*
  7246. LIBS="$ac_save_LIBS"
  7247. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7248. echo "$ac_t""yes" 1>&6
  7249. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $MATHLIB"
  7250. else
  7251. echo "$ac_t""no" 1>&6
  7252. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7253. echo "configure:8916: checking for mysql_query in -lmysqlclient" >&5
  7254. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7255. ac_save_LIBS="$LIBS"
  7256. LIBS="-lmysqlclient $ZLIB $SOCKLIB $LIBS"
  7257. cat > conftest.$ac_ext <<EOF
  7258. #line 8922 "configure"
  7259. #include "confdefs.h"
  7260. /* Override any gcc2 internal prototype to avoid an error. */
  7261. /* We use char because int might match the return type of a gcc2
  7262. builtin and then its argument prototype would still apply. */
  7263. char mysql_query();
  7264. int main() {
  7265. mysql_query()
  7266. ; return 0; }
  7267. EOF
  7268. if { (eval echo configure:8933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7269. rm -rf conftest*
  7270. eval "ac_cv_lib_$ac_lib_var=yes"
  7271. else
  7272. echo "configure: failed program was:" >&5
  7273. cat conftest.$ac_ext >&5
  7274. rm -rf conftest*
  7275. eval "ac_cv_lib_$ac_lib_var=no"
  7276. fi
  7277. rm -f conftest*
  7278. LIBS="$ac_save_LIBS"
  7279. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7280. echo "$ac_t""yes" 1>&6
  7281. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB"
  7282. else
  7283. echo "$ac_t""no" 1>&6
  7284. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7285. echo "configure:8952: checking for mysql_query in -lmysqlclient" >&5
  7286. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7287. ac_save_LIBS="$LIBS"
  7288. LIBS="-lmysqlclient $ZLIB $SOCKLIB $MATHLIB $LIBS"
  7289. cat > conftest.$ac_ext <<EOF
  7290. #line 8958 "configure"
  7291. #include "confdefs.h"
  7292. /* Override any gcc2 internal prototype to avoid an error. */
  7293. /* We use char because int might match the return type of a gcc2
  7294. builtin and then its argument prototype would still apply. */
  7295. char mysql_query();
  7296. int main() {
  7297. mysql_query()
  7298. ; return 0; }
  7299. EOF
  7300. if { (eval echo configure:8969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7301. rm -rf conftest*
  7302. eval "ac_cv_lib_$ac_lib_var=yes"
  7303. else
  7304. echo "configure: failed program was:" >&5
  7305. cat conftest.$ac_ext >&5
  7306. rm -rf conftest*
  7307. eval "ac_cv_lib_$ac_lib_var=no"
  7308. fi
  7309. rm -f conftest*
  7310. LIBS="$ac_save_LIBS"
  7311. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7312. echo "$ac_t""yes" 1>&6
  7313. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB $MATHLIB"
  7314. else
  7315. echo "$ac_t""no" 1>&6
  7316. LDFLAGS=${ac_save_ldflags}
  7317. { echo "configure: error: *** Unable to locate MySQL library." 1>&2; exit 1; }
  7318. fi
  7319. fi
  7320. fi
  7321. fi
  7322. fi
  7323. fi
  7324. fi
  7325. fi
  7326. LDFLAGS=${ac_save_ldflags}
  7327. # Check for libmysqld (for embedded version of the driver)
  7328. # Extract the first word of "mysql_config", so it can be a program name with args.
  7329. set dummy mysql_config; ac_word=$2
  7330. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  7331. echo "configure:9059: checking for $ac_word" >&5
  7332. case "$MYSQLD_CONFIG" in
  7333. /*)
  7334. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a path.
  7335. ;;
  7336. ?:/*)
  7337. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a dos path.
  7338. ;;
  7339. *)
  7340. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  7341. ac_dummy="$PATH"
  7342. for ac_dir in $ac_dummy; do
  7343. test -z "$ac_dir" && ac_dir=.
  7344. if test -f $ac_dir/$ac_word; then
  7345. ac_cv_path_MYSQLD_CONFIG="$ac_dir/$ac_word"
  7346. break
  7347. fi
  7348. done
  7349. IFS="$ac_save_ifs"
  7350. test -z "$ac_cv_path_MYSQLD_CONFIG" && ac_cv_path_MYSQLD_CONFIG="no"
  7351. ;;
  7352. esac
  7353. MYSQLD_CONFIG="$ac_cv_path_MYSQLD_CONFIG"
  7354. if test -n "$MYSQLD_CONFIG"; then
  7355. echo "$ac_t""$MYSQLD_CONFIG" 1>&6
  7356. else
  7357. echo "$ac_t""no" 1>&6
  7358. fi
  7359. if test "$MYSQLD_CONFIG" = "no" ; then
  7360. { echo "configure: error: *** couldn't find mysql_config" 1>&2; exit 1; }
  7361. fi
  7362. if test "$MYSQLD_CONFIG" != "" ; then
  7363. ac_ext=C
  7364. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  7365. ac_cpp='$CXXCPP $CPPFLAGS'
  7366. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  7367. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  7368. cross_compiling=$ac_cv_prog_cxx_cross
  7369. ac_save_libs="$LIBS"
  7370. MYSQLDLIB=`"$MYSQLD_CONFIG" --libmysqld-libs`
  7371. LIBS="$MYSQLDLIB $LIBS"
  7372. echo $ac_n "checking for mysql_server_init""... $ac_c" 1>&6
  7373. echo "configure:9108: checking for mysql_server_init" >&5
  7374. cat > conftest.$ac_ext <<EOF
  7375. #line 9111 "configure"
  7376. #include "confdefs.h"
  7377. /* System header to define __stub macros and hopefully few prototypes,
  7378. which can conflict with char mysql_server_init(); below. */
  7379. #include <assert.h>
  7380. /* Override any gcc2 internal prototype to avoid an error. */
  7381. #ifdef __cplusplus
  7382. extern "C"
  7383. #endif
  7384. /* We use char because int might match the return type of a gcc2
  7385. builtin and then its argument prototype would still apply. */
  7386. char mysql_server_init();
  7387. int main() {
  7388. /* The GNU C library defines this for functions which it implements
  7389. to always fail with ENOSYS. Some functions are actually named
  7390. something starting with __ and the normal name is an alias. */
  7391. #if defined (__stub_mysql_server_init) || defined (__stub___mysql_server_init)
  7392. choke me
  7393. #else
  7394. mysql_server_init();
  7395. #endif
  7396. ; return 0; }
  7397. EOF
  7398. if { (eval echo configure:9137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7399. rm -rf conftest*
  7400. eval "ac_cv_func_mysql_server_init=yes"
  7401. else
  7402. echo "configure: failed program was:" >&5
  7403. cat conftest.$ac_ext >&5
  7404. rm -rf conftest*
  7405. eval "ac_cv_func_mysql_server_init=no"
  7406. fi
  7407. rm -f conftest*
  7408. if eval "test \"`echo '$ac_cv_func_'mysql_server_init`\" = yes"; then
  7409. echo "$ac_t""yes" 1>&6
  7410. :
  7411. else
  7412. echo "$ac_t""no" 1>&6
  7413. MYSQLDLIB="";
  7414. echo "configure: warning: libmysqld not found" 1>&2
  7415. fi
  7416. LIBS=$ac_save_libs
  7417. ac_ext=c
  7418. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  7419. ac_cpp='$CPP $CPPFLAGS'
  7420. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  7421. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  7422. cross_compiling=$ac_cv_prog_cc_cross
  7423. ac_ext=c
  7424. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  7425. ac_cpp='$CPP $CPPFLAGS'
  7426. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  7427. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  7428. cross_compiling=$ac_cv_prog_cc_cross
  7429. fi
  7430. fi # $USE_MYSQL
  7431. # Done checking MySQL
  7432. # Enable SQLite option
  7433. echo $ac_n "checking whether to use SQLite""... $ac_c" 1>&6
  7434. echo "configure:9189: checking whether to use SQLite" >&5
  7435. echo "$ac_t"""$with_sqlite"" 1>&6
  7436. case "$with_sqlite" in
  7437. "no") USE_SQLITE= ;;
  7438. "yes") USE_SQLITE="1" ;;
  7439. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  7440. esac
  7441. SQLITEINCPATH=
  7442. SQLITELIBPATH=
  7443. SQLITELIB=
  7444. if test -n "$USE_SQLITE"; then
  7445. # With SQLite includes directory
  7446. echo $ac_n "checking for location of SQLite includes""... $ac_c" 1>&6
  7447. echo "configure:9209: checking for location of SQLite includes" >&5
  7448. case "$with_sqlite_includes" in
  7449. y | ye | yes | n | no)
  7450. { echo "configure: error: *** You must supply a directory to --with-sqlite-includes." 1>&2; exit 1; }
  7451. ;;
  7452. esac
  7453. echo "$ac_t""$with_sqlite_includes" 1>&6
  7454. if test -n "$with_sqlite_includes" ; then
  7455. for dir in $with_sqlite_includes; do
  7456. if test -d "$dir"; then
  7457. SQLITEINCPATH="$SQLITEINCPATH -I$dir"
  7458. else
  7459. { echo "configure: error: *** SQLite includes directory $dir does not exist." 1>&2; exit 1; }
  7460. fi
  7461. done
  7462. fi
  7463. ac_save_cppflags="$CPPFLAGS"
  7464. CPPFLAGS="$SQLITEINCPATH $CPPFLAGS"
  7465. for ac_hdr in sqlite3.h
  7466. do
  7467. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7468. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7469. echo "configure:9235: checking for $ac_hdr" >&5
  7470. cat > conftest.$ac_ext <<EOF
  7471. #line 9238 "configure"
  7472. #include "confdefs.h"
  7473. #include <$ac_hdr>
  7474. EOF
  7475. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7476. { (eval echo configure:9243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7477. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7478. if test -z "$ac_err"; then
  7479. rm -rf conftest*
  7480. eval "ac_cv_header_$ac_safe=yes"
  7481. else
  7482. echo "$ac_err" >&5
  7483. echo "configure: failed program was:" >&5
  7484. cat conftest.$ac_ext >&5
  7485. rm -rf conftest*
  7486. eval "ac_cv_header_$ac_safe=no"
  7487. fi
  7488. rm -f conftest*
  7489. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7490. echo "$ac_t""yes" 1>&6
  7491. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7492. cat >> confdefs.h <<EOF
  7493. #define $ac_tr_hdr 1
  7494. EOF
  7495. else
  7496. echo "$ac_t""no" 1>&6
  7497. { echo "configure: error: *** Unable to locate SQLite includes." 1>&2; exit 1; }
  7498. fi
  7499. done
  7500. CPPFLAGS=$ac_save_cppflags
  7501. cat >> confdefs.h <<\EOF
  7502. #define HAVE_SQLITE 1
  7503. EOF
  7504. fi # $USE_SQLITE
  7505. if test -n "$USE_SQLITE"; then
  7506. # With SQLite library directory
  7507. echo $ac_n "checking for location of SQLite library""... $ac_c" 1>&6
  7508. echo "configure:9286: checking for location of SQLite library" >&5
  7509. case "$with_sqlite_libs" in
  7510. y | ye | yes | n | no)
  7511. { echo "configure: error: *** You must supply a directory to --with-sqlite-libs." 1>&2; exit 1; }
  7512. ;;
  7513. esac
  7514. echo "$ac_t""$with_sqlite_libs" 1>&6
  7515. if test -n "$with_sqlite_libs"; then
  7516. for dir in $with_sqlite_libs; do
  7517. if test -d "$dir"; then
  7518. SQLITELIBPATH="$SQLITELIBPATH -L$dir"
  7519. else
  7520. { echo "configure: error: *** SQLite library directory $dir does not exist." 1>&2; exit 1; }
  7521. fi
  7522. done
  7523. fi
  7524. ac_save_ldflags="$LDFLAGS"
  7525. LDFLAGS="$SQLITELIBPATH $LDFLAGS"
  7526. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7527. echo "configure:9315: checking for sqlite3_open in -lsqlite3" >&5
  7528. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7529. ac_save_LIBS="$LIBS"
  7530. LIBS="-lsqlite3 $LIBS"
  7531. cat > conftest.$ac_ext <<EOF
  7532. #line 9321 "configure"
  7533. #include "confdefs.h"
  7534. /* Override any gcc2 internal prototype to avoid an error. */
  7535. /* We use char because int might match the return type of a gcc2
  7536. builtin and then its argument prototype would still apply. */
  7537. char sqlite3_open();
  7538. int main() {
  7539. sqlite3_open()
  7540. ; return 0; }
  7541. EOF
  7542. if { (eval echo configure:9332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7543. rm -rf conftest*
  7544. eval "ac_cv_lib_$ac_lib_var=yes"
  7545. else
  7546. echo "configure: failed program was:" >&5
  7547. cat conftest.$ac_ext >&5
  7548. rm -rf conftest*
  7549. eval "ac_cv_lib_$ac_lib_var=no"
  7550. fi
  7551. rm -f conftest*
  7552. LIBS="$ac_save_LIBS"
  7553. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7554. echo "$ac_t""yes" 1>&6
  7555. SQLITELIB="$SQLITELIB -lsqlite3 "
  7556. else
  7557. echo "$ac_t""no" 1>&6
  7558. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7559. echo "configure:9351: checking for sqlite3_open in -lsqlite3" >&5
  7560. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7561. ac_save_LIBS="$LIBS"
  7562. LIBS="-lsqlite3 $DLLIB $LIBS"
  7563. cat > conftest.$ac_ext <<EOF
  7564. #line 9357 "configure"
  7565. #include "confdefs.h"
  7566. /* Override any gcc2 internal prototype to avoid an error. */
  7567. /* We use char because int might match the return type of a gcc2
  7568. builtin and then its argument prototype would still apply. */
  7569. char sqlite3_open();
  7570. int main() {
  7571. sqlite3_open()
  7572. ; return 0; }
  7573. EOF
  7574. if { (eval echo configure:9368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7575. rm -rf conftest*
  7576. eval "ac_cv_lib_$ac_lib_var=yes"
  7577. else
  7578. echo "configure: failed program was:" >&5
  7579. cat conftest.$ac_ext >&5
  7580. rm -rf conftest*
  7581. eval "ac_cv_lib_$ac_lib_var=no"
  7582. fi
  7583. rm -f conftest*
  7584. LIBS="$ac_save_LIBS"
  7585. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7586. echo "$ac_t""yes" 1>&6
  7587. SQLITELIB="$SQLITELIB -lsqlite3 $DLLIB"
  7588. else
  7589. echo "$ac_t""no" 1>&6
  7590. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7591. echo "configure:9387: checking for sqlite3_open in -lsqlite3" >&5
  7592. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7593. ac_save_LIBS="$LIBS"
  7594. LIBS="-lsqlite3 $MATHLIB $LIBS"
  7595. cat > conftest.$ac_ext <<EOF
  7596. #line 9393 "configure"
  7597. #include "confdefs.h"
  7598. /* Override any gcc2 internal prototype to avoid an error. */
  7599. /* We use char because int might match the return type of a gcc2
  7600. builtin and then its argument prototype would still apply. */
  7601. char sqlite3_open();
  7602. int main() {
  7603. sqlite3_open()
  7604. ; return 0; }
  7605. EOF
  7606. if { (eval echo configure:9404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7607. rm -rf conftest*
  7608. eval "ac_cv_lib_$ac_lib_var=yes"
  7609. else
  7610. echo "configure: failed program was:" >&5
  7611. cat conftest.$ac_ext >&5
  7612. rm -rf conftest*
  7613. eval "ac_cv_lib_$ac_lib_var=no"
  7614. fi
  7615. rm -f conftest*
  7616. LIBS="$ac_save_LIBS"
  7617. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7618. echo "$ac_t""yes" 1>&6
  7619. SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB"
  7620. else
  7621. echo "$ac_t""no" 1>&6
  7622. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7623. echo "configure:9423: checking for sqlite3_open in -lsqlite3" >&5
  7624. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7625. ac_save_LIBS="$LIBS"
  7626. LIBS="-lsqlite3 $MATHLIB $DLLIB $LIBS"
  7627. cat > conftest.$ac_ext <<EOF
  7628. #line 9429 "configure"
  7629. #include "confdefs.h"
  7630. /* Override any gcc2 internal prototype to avoid an error. */
  7631. /* We use char because int might match the return type of a gcc2
  7632. builtin and then its argument prototype would still apply. */
  7633. char sqlite3_open();
  7634. int main() {
  7635. sqlite3_open()
  7636. ; return 0; }
  7637. EOF
  7638. if { (eval echo configure:9440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7639. rm -rf conftest*
  7640. eval "ac_cv_lib_$ac_lib_var=yes"
  7641. else
  7642. echo "configure: failed program was:" >&5
  7643. cat conftest.$ac_ext >&5
  7644. rm -rf conftest*
  7645. eval "ac_cv_lib_$ac_lib_var=no"
  7646. fi
  7647. rm -f conftest*
  7648. LIBS="$ac_save_LIBS"
  7649. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7650. echo "$ac_t""yes" 1>&6
  7651. SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB $DLLIB"
  7652. else
  7653. echo "$ac_t""no" 1>&6
  7654. LDFLAGS=${ac_save_ldflags}
  7655. { echo "configure: error: *** Unable to locate SQLite library." 1>&2; exit 1; }
  7656. fi
  7657. fi
  7658. fi
  7659. fi
  7660. LDFLAGS=${ac_save_ldflags}
  7661. fi # $USE_SQLITE
  7662. # Done checking SQLite
  7663. # Enable OpenGL option
  7664. OPENGLINC=
  7665. OPENGLLIB=
  7666. OPENGLULIB=
  7667. USE_OPENGL=
  7668. OPENGL_X11=
  7669. OPENGL_AQUA=
  7670. OPENGL_WINDOWS=
  7671. echo $ac_n "checking whether to use OpenGL""... $ac_c" 1>&6
  7672. echo "configure:9515: checking whether to use OpenGL" >&5
  7673. echo "$ac_t"""$with_opengl"" 1>&6
  7674. case "$with_opengl" in
  7675. n|no)
  7676. OPENGL_TYPE=none
  7677. ;;
  7678. y|yes|x|x11|glx)
  7679. OPENGL_TYPE=X11
  7680. USE_OPENGL=1
  7681. OPENGL_X11=1
  7682. ;;
  7683. aqua|mac|osx|macosx|agl)
  7684. OPENGL_TYPE=Aqua
  7685. USE_OPENGL=1
  7686. OPENGL_AQUA=1
  7687. ;;
  7688. win|windows|mswin|wgl)
  7689. OPENGL_TYPE=Windows
  7690. USE_OPENGL=1
  7691. OPENGL_WINDOWS=1
  7692. ;;
  7693. *)
  7694. { echo "configure: error: *** Valid arguments for --with-opengl= are yes,no,x11,aqua,windows." 1>&2; exit 1; }
  7695. ;;
  7696. esac
  7697. if test -n "$USE_OPENGL" ; then
  7698. if test "$OPENGL_X11" = 1 ; then
  7699. # With OpenGL includes directory
  7700. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  7701. echo "configure:9549: checking for location of OpenGL includes" >&5
  7702. case "$with_opengl_includes" in
  7703. y | ye | yes | n | no)
  7704. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  7705. ;;
  7706. esac
  7707. echo "$ac_t""$with_opengl_includes" 1>&6
  7708. if test -n "$with_opengl_includes" ; then
  7709. for dir in $with_opengl_includes; do
  7710. if test -d "$dir"; then
  7711. OPENGLINC="$OPENGLINC -I$dir"
  7712. else
  7713. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  7714. fi
  7715. done
  7716. fi
  7717. ac_save_cppflags="$CPPFLAGS"
  7718. CPPFLAGS="$OPENGLINC $X_CFLAGS $CPPFLAGS"
  7719. for ac_hdr in GL/gl.h GL/glu.h
  7720. do
  7721. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7722. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7723. echo "configure:9575: checking for $ac_hdr" >&5
  7724. cat > conftest.$ac_ext <<EOF
  7725. #line 9578 "configure"
  7726. #include "confdefs.h"
  7727. #include <$ac_hdr>
  7728. EOF
  7729. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7730. { (eval echo configure:9583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7731. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7732. if test -z "$ac_err"; then
  7733. rm -rf conftest*
  7734. eval "ac_cv_header_$ac_safe=yes"
  7735. else
  7736. echo "$ac_err" >&5
  7737. echo "configure: failed program was:" >&5
  7738. cat conftest.$ac_ext >&5
  7739. rm -rf conftest*
  7740. eval "ac_cv_header_$ac_safe=no"
  7741. fi
  7742. rm -f conftest*
  7743. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7744. echo "$ac_t""yes" 1>&6
  7745. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7746. cat >> confdefs.h <<EOF
  7747. #define $ac_tr_hdr 1
  7748. EOF
  7749. else
  7750. echo "$ac_t""no" 1>&6
  7751. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  7752. fi
  7753. done
  7754. CPPFLAGS=$ac_save_cppflags
  7755. # With OpenGL library directory
  7756. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  7757. echo "configure:9617: checking for location of OpenGL library" >&5
  7758. case "$with_opengl_libs" in
  7759. y | ye | yes | n | no)
  7760. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  7761. ;;
  7762. esac
  7763. echo "$ac_t""$with_opengl_libs" 1>&6
  7764. if test -n "$with_opengl_libs"; then
  7765. for dir in $with_opengl_libs; do
  7766. if test -d "$dir"; then
  7767. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  7768. else
  7769. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  7770. fi
  7771. done
  7772. fi
  7773. ac_save_ldflags="$LDFLAGS"
  7774. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  7775. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7776. echo "configure:9646: checking for glBegin in -lGL" >&5
  7777. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7778. ac_save_LIBS="$LIBS"
  7779. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  7780. cat > conftest.$ac_ext <<EOF
  7781. #line 9652 "configure"
  7782. #include "confdefs.h"
  7783. /* Override any gcc2 internal prototype to avoid an error. */
  7784. /* We use char because int might match the return type of a gcc2
  7785. builtin and then its argument prototype would still apply. */
  7786. char glBegin();
  7787. int main() {
  7788. glBegin()
  7789. ; return 0; }
  7790. EOF
  7791. if { (eval echo configure:9663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7792. rm -rf conftest*
  7793. eval "ac_cv_lib_$ac_lib_var=yes"
  7794. else
  7795. echo "configure: failed program was:" >&5
  7796. cat conftest.$ac_ext >&5
  7797. rm -rf conftest*
  7798. eval "ac_cv_lib_$ac_lib_var=no"
  7799. fi
  7800. rm -f conftest*
  7801. LIBS="$ac_save_LIBS"
  7802. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7803. echo "$ac_t""yes" 1>&6
  7804. OPENGLLIB="$OPENGLLIB -lGL "
  7805. else
  7806. echo "$ac_t""no" 1>&6
  7807. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7808. echo "configure:9682: checking for glBegin in -lGL" >&5
  7809. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7810. ac_save_LIBS="$LIBS"
  7811. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lXext $LIBS"
  7812. cat > conftest.$ac_ext <<EOF
  7813. #line 9688 "configure"
  7814. #include "confdefs.h"
  7815. /* Override any gcc2 internal prototype to avoid an error. */
  7816. /* We use char because int might match the return type of a gcc2
  7817. builtin and then its argument prototype would still apply. */
  7818. char glBegin();
  7819. int main() {
  7820. glBegin()
  7821. ; return 0; }
  7822. EOF
  7823. if { (eval echo configure:9699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7824. rm -rf conftest*
  7825. eval "ac_cv_lib_$ac_lib_var=yes"
  7826. else
  7827. echo "configure: failed program was:" >&5
  7828. cat conftest.$ac_ext >&5
  7829. rm -rf conftest*
  7830. eval "ac_cv_lib_$ac_lib_var=no"
  7831. fi
  7832. rm -f conftest*
  7833. LIBS="$ac_save_LIBS"
  7834. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7835. echo "$ac_t""yes" 1>&6
  7836. OPENGLLIB="$OPENGLLIB -lGL -lXext"
  7837. else
  7838. echo "$ac_t""no" 1>&6
  7839. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7840. echo "configure:9718: checking for glBegin in -lGL" >&5
  7841. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7842. ac_save_LIBS="$LIBS"
  7843. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread $LIBS"
  7844. cat > conftest.$ac_ext <<EOF
  7845. #line 9724 "configure"
  7846. #include "confdefs.h"
  7847. /* Override any gcc2 internal prototype to avoid an error. */
  7848. /* We use char because int might match the return type of a gcc2
  7849. builtin and then its argument prototype would still apply. */
  7850. char glBegin();
  7851. int main() {
  7852. glBegin()
  7853. ; return 0; }
  7854. EOF
  7855. if { (eval echo configure:9735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7856. rm -rf conftest*
  7857. eval "ac_cv_lib_$ac_lib_var=yes"
  7858. else
  7859. echo "configure: failed program was:" >&5
  7860. cat conftest.$ac_ext >&5
  7861. rm -rf conftest*
  7862. eval "ac_cv_lib_$ac_lib_var=no"
  7863. fi
  7864. rm -f conftest*
  7865. LIBS="$ac_save_LIBS"
  7866. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7867. echo "$ac_t""yes" 1>&6
  7868. OPENGLLIB="$OPENGLLIB -lGL -lpthread"
  7869. else
  7870. echo "$ac_t""no" 1>&6
  7871. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7872. echo "configure:9754: checking for glBegin in -lGL" >&5
  7873. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7874. ac_save_LIBS="$LIBS"
  7875. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread -lXext $LIBS"
  7876. cat > conftest.$ac_ext <<EOF
  7877. #line 9760 "configure"
  7878. #include "confdefs.h"
  7879. /* Override any gcc2 internal prototype to avoid an error. */
  7880. /* We use char because int might match the return type of a gcc2
  7881. builtin and then its argument prototype would still apply. */
  7882. char glBegin();
  7883. int main() {
  7884. glBegin()
  7885. ; return 0; }
  7886. EOF
  7887. if { (eval echo configure:9771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7888. rm -rf conftest*
  7889. eval "ac_cv_lib_$ac_lib_var=yes"
  7890. else
  7891. echo "configure: failed program was:" >&5
  7892. cat conftest.$ac_ext >&5
  7893. rm -rf conftest*
  7894. eval "ac_cv_lib_$ac_lib_var=no"
  7895. fi
  7896. rm -f conftest*
  7897. LIBS="$ac_save_LIBS"
  7898. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7899. echo "$ac_t""yes" 1>&6
  7900. OPENGLLIB="$OPENGLLIB -lGL -lpthread -lXext"
  7901. else
  7902. echo "$ac_t""no" 1>&6
  7903. LDFLAGS=${ac_save_ldflags}
  7904. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  7905. fi
  7906. fi
  7907. fi
  7908. fi
  7909. LDFLAGS=${ac_save_ldflags}
  7910. ac_save_ldflags="$LDFLAGS"
  7911. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  7912. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  7913. echo "configure:9833: checking for gluBeginCurve in -lGLU" >&5
  7914. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  7915. ac_save_LIBS="$LIBS"
  7916. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  7917. cat > conftest.$ac_ext <<EOF
  7918. #line 9839 "configure"
  7919. #include "confdefs.h"
  7920. /* Override any gcc2 internal prototype to avoid an error. */
  7921. /* We use char because int might match the return type of a gcc2
  7922. builtin and then its argument prototype would still apply. */
  7923. char gluBeginCurve();
  7924. int main() {
  7925. gluBeginCurve()
  7926. ; return 0; }
  7927. EOF
  7928. if { (eval echo configure:9850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7929. rm -rf conftest*
  7930. eval "ac_cv_lib_$ac_lib_var=yes"
  7931. else
  7932. echo "configure: failed program was:" >&5
  7933. cat conftest.$ac_ext >&5
  7934. rm -rf conftest*
  7935. eval "ac_cv_lib_$ac_lib_var=no"
  7936. fi
  7937. rm -f conftest*
  7938. LIBS="$ac_save_LIBS"
  7939. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7940. echo "$ac_t""yes" 1>&6
  7941. OPENGLULIB="$OPENGLULIB -lGLU "
  7942. else
  7943. echo "$ac_t""no" 1>&6
  7944. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  7945. echo "configure:9869: checking for gluBeginCurve in -lGLU" >&5
  7946. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  7947. ac_save_LIBS="$LIBS"
  7948. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lstdc++ $LIBS"
  7949. cat > conftest.$ac_ext <<EOF
  7950. #line 9875 "configure"
  7951. #include "confdefs.h"
  7952. /* Override any gcc2 internal prototype to avoid an error. */
  7953. /* We use char because int might match the return type of a gcc2
  7954. builtin and then its argument prototype would still apply. */
  7955. char gluBeginCurve();
  7956. int main() {
  7957. gluBeginCurve()
  7958. ; return 0; }
  7959. EOF
  7960. if { (eval echo configure:9886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7961. rm -rf conftest*
  7962. eval "ac_cv_lib_$ac_lib_var=yes"
  7963. else
  7964. echo "configure: failed program was:" >&5
  7965. cat conftest.$ac_ext >&5
  7966. rm -rf conftest*
  7967. eval "ac_cv_lib_$ac_lib_var=no"
  7968. fi
  7969. rm -f conftest*
  7970. LIBS="$ac_save_LIBS"
  7971. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7972. echo "$ac_t""yes" 1>&6
  7973. OPENGLULIB="$OPENGLULIB -lGLU -lstdc++"
  7974. else
  7975. echo "$ac_t""no" 1>&6
  7976. LDFLAGS=${ac_save_ldflags}
  7977. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  7978. fi
  7979. fi
  7980. LDFLAGS=${ac_save_ldflags}
  7981. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  7982. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  7983. ac_save_libs="$LIBS"
  7984. ac_save_ldflags="$LDFLAGS"
  7985. LIBS=" $OPENGLLIB $LIBS"
  7986. LDFLAGS=" $LDFLAGS"
  7987. echo $ac_n "checking for glXCreatePbuffer""... $ac_c" 1>&6
  7988. echo "configure:9933: checking for glXCreatePbuffer" >&5
  7989. cat > conftest.$ac_ext <<EOF
  7990. #line 9936 "configure"
  7991. #include "confdefs.h"
  7992. /* System header to define __stub macros and hopefully few prototypes,
  7993. which can conflict with char glXCreatePbuffer(); below. */
  7994. #include <assert.h>
  7995. /* Override any gcc2 internal prototype to avoid an error. */
  7996. /* We use char because int might match the return type of a gcc2
  7997. builtin and then its argument prototype would still apply. */
  7998. char glXCreatePbuffer();
  7999. int main() {
  8000. /* The GNU C library defines this for functions which it implements
  8001. to always fail with ENOSYS. Some functions are actually named
  8002. something starting with __ and the normal name is an alias. */
  8003. #if defined (__stub_glXCreatePbuffer) || defined (__stub___glXCreatePbuffer)
  8004. choke me
  8005. #else
  8006. glXCreatePbuffer();
  8007. #endif
  8008. ; return 0; }
  8009. EOF
  8010. if { (eval echo configure:9959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8011. rm -rf conftest*
  8012. eval "ac_cv_func_glXCreatePbuffer=yes"
  8013. else
  8014. echo "configure: failed program was:" >&5
  8015. cat conftest.$ac_ext >&5
  8016. rm -rf conftest*
  8017. eval "ac_cv_func_glXCreatePbuffer=no"
  8018. fi
  8019. rm -f conftest*
  8020. if eval "test \"`echo '$ac_cv_func_'glXCreatePbuffer`\" = yes"; then
  8021. echo "$ac_t""yes" 1>&6
  8022. cat >> confdefs.h <<\EOF
  8023. #define HAVE_PBUFFERS 1
  8024. EOF
  8025. else
  8026. echo "$ac_t""no" 1>&6
  8027. { echo "configure: error: *** Unable to locate glXCreatePbuffer." 1>&2; exit 1; }
  8028. fi
  8029. LIBS=${ac_save_libs}
  8030. LDFLAGS=${ac_save_ldflags}
  8031. ac_save_libs="$LIBS"
  8032. ac_save_ldflags="$LDFLAGS"
  8033. LIBS=" $OPENGLLIB $LIBS"
  8034. LDFLAGS=" $LDFLAGS"
  8035. echo $ac_n "checking for glXCreateGLXPixmap""... $ac_c" 1>&6
  8036. echo "configure:9996: checking for glXCreateGLXPixmap" >&5
  8037. cat > conftest.$ac_ext <<EOF
  8038. #line 9999 "configure"
  8039. #include "confdefs.h"
  8040. /* System header to define __stub macros and hopefully few prototypes,
  8041. which can conflict with char glXCreateGLXPixmap(); below. */
  8042. #include <assert.h>
  8043. /* Override any gcc2 internal prototype to avoid an error. */
  8044. /* We use char because int might match the return type of a gcc2
  8045. builtin and then its argument prototype would still apply. */
  8046. char glXCreateGLXPixmap();
  8047. int main() {
  8048. /* The GNU C library defines this for functions which it implements
  8049. to always fail with ENOSYS. Some functions are actually named
  8050. something starting with __ and the normal name is an alias. */
  8051. #if defined (__stub_glXCreateGLXPixmap) || defined (__stub___glXCreateGLXPixmap)
  8052. choke me
  8053. #else
  8054. glXCreateGLXPixmap();
  8055. #endif
  8056. ; return 0; }
  8057. EOF
  8058. if { (eval echo configure:10022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8059. rm -rf conftest*
  8060. eval "ac_cv_func_glXCreateGLXPixmap=yes"
  8061. else
  8062. echo "configure: failed program was:" >&5
  8063. cat conftest.$ac_ext >&5
  8064. rm -rf conftest*
  8065. eval "ac_cv_func_glXCreateGLXPixmap=no"
  8066. fi
  8067. rm -f conftest*
  8068. if eval "test \"`echo '$ac_cv_func_'glXCreateGLXPixmap`\" = yes"; then
  8069. echo "$ac_t""yes" 1>&6
  8070. cat >> confdefs.h <<\EOF
  8071. #define HAVE_PIXMAPS 1
  8072. EOF
  8073. else
  8074. echo "$ac_t""no" 1>&6
  8075. { echo "configure: error: *** Unable to locate glXCreateGLXPixmap." 1>&2; exit 1; }
  8076. fi
  8077. LIBS=${ac_save_libs}
  8078. LDFLAGS=${ac_save_ldflags}
  8079. cat >> confdefs.h <<\EOF
  8080. #define OPENGL_X11 1
  8081. EOF
  8082. fi # $OPENGL_X11
  8083. if test "$OPENGL_AQUA" = 1 ; then
  8084. echo $ac_n "checking for location of OpenGL framework""... $ac_c" 1>&6
  8085. echo "configure:10065: checking for location of OpenGL framework" >&5
  8086. case "$with_opengl_framework" in
  8087. y | ye | yes | n | no)
  8088. { echo "configure: error: *** You must supply a directory to --with-opengl-framework." 1>&2; exit 1; }
  8089. ;;
  8090. esac
  8091. echo "$ac_t""$with_opengl_framework" 1>&6
  8092. if test -n "$with_opengl_framework"; then
  8093. if test -d $with_opengl_framework; then
  8094. OPENGLPATH="$OPENGLPATH -F$with_opengl_framework"
  8095. else
  8096. { echo "configure: error: *** OpenGL framework directory $dir does not exist." 1>&2; exit 1; }
  8097. fi
  8098. fi
  8099. ac_save_cppflags="$CPPFLAGS"
  8100. CPPFLAGS="$OPENGLPATH $CPPFLAGS"
  8101. for ac_hdr in OpenGL/gl.h OpenGL/glu.h
  8102. do
  8103. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8104. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8105. echo "configure:10089: checking for $ac_hdr" >&5
  8106. cat > conftest.$ac_ext <<EOF
  8107. #line 10092 "configure"
  8108. #include "confdefs.h"
  8109. #include <$ac_hdr>
  8110. EOF
  8111. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8112. { (eval echo configure:10097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8113. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8114. if test -z "$ac_err"; then
  8115. rm -rf conftest*
  8116. eval "ac_cv_header_$ac_safe=yes"
  8117. else
  8118. echo "$ac_err" >&5
  8119. echo "configure: failed program was:" >&5
  8120. cat conftest.$ac_ext >&5
  8121. rm -rf conftest*
  8122. eval "ac_cv_header_$ac_safe=no"
  8123. fi
  8124. rm -f conftest*
  8125. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8126. echo "$ac_t""yes" 1>&6
  8127. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8128. cat >> confdefs.h <<EOF
  8129. #define $ac_tr_hdr 1
  8130. EOF
  8131. else
  8132. echo "$ac_t""no" 1>&6
  8133. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  8134. fi
  8135. done
  8136. CPPFLAGS=$ac_save_cppflags
  8137. ac_save_libs="$LIBS"
  8138. ac_save_ldflags="$LDFLAGS"
  8139. LIBS="-framework OpenGL -framework AGL -framework ApplicationServices $LIBS"
  8140. LDFLAGS="$OPENGLPATH $LDFLAGS"
  8141. echo $ac_n "checking for glBegin""... $ac_c" 1>&6
  8142. echo "configure:10133: checking for glBegin" >&5
  8143. cat > conftest.$ac_ext <<EOF
  8144. #line 10136 "configure"
  8145. #include "confdefs.h"
  8146. /* System header to define __stub macros and hopefully few prototypes,
  8147. which can conflict with char glBegin(); below. */
  8148. #include <assert.h>
  8149. /* Override any gcc2 internal prototype to avoid an error. */
  8150. /* We use char because int might match the return type of a gcc2
  8151. builtin and then its argument prototype would still apply. */
  8152. char glBegin();
  8153. int main() {
  8154. /* The GNU C library defines this for functions which it implements
  8155. to always fail with ENOSYS. Some functions are actually named
  8156. something starting with __ and the normal name is an alias. */
  8157. #if defined (__stub_glBegin) || defined (__stub___glBegin)
  8158. choke me
  8159. #else
  8160. glBegin();
  8161. #endif
  8162. ; return 0; }
  8163. EOF
  8164. if { (eval echo configure:10159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8165. rm -rf conftest*
  8166. eval "ac_cv_func_glBegin=yes"
  8167. else
  8168. echo "configure: failed program was:" >&5
  8169. cat conftest.$ac_ext >&5
  8170. rm -rf conftest*
  8171. eval "ac_cv_func_glBegin=no"
  8172. fi
  8173. rm -f conftest*
  8174. if eval "test \"`echo '$ac_cv_func_'glBegin`\" = yes"; then
  8175. echo "$ac_t""yes" 1>&6
  8176. OPENGLLIB="$OPENGLLIB -framework OpenGL -framework AGL -framework ApplicationServices"
  8177. else
  8178. echo "$ac_t""no" 1>&6
  8179. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  8180. fi
  8181. LIBS=${ac_save_libs}
  8182. LDFLAGS=${ac_save_ldflags}
  8183. ac_save_libs="$LIBS"
  8184. ac_save_ldflags="$LDFLAGS"
  8185. LIBS=" $OPENGLLIB $LIBS"
  8186. LDFLAGS="$OPENGLPATH $LDFLAGS"
  8187. echo $ac_n "checking for gluBeginCurve""... $ac_c" 1>&6
  8188. echo "configure:10196: checking for gluBeginCurve" >&5
  8189. cat > conftest.$ac_ext <<EOF
  8190. #line 10199 "configure"
  8191. #include "confdefs.h"
  8192. /* System header to define __stub macros and hopefully few prototypes,
  8193. which can conflict with char gluBeginCurve(); below. */
  8194. #include <assert.h>
  8195. /* Override any gcc2 internal prototype to avoid an error. */
  8196. /* We use char because int might match the return type of a gcc2
  8197. builtin and then its argument prototype would still apply. */
  8198. char gluBeginCurve();
  8199. int main() {
  8200. /* The GNU C library defines this for functions which it implements
  8201. to always fail with ENOSYS. Some functions are actually named
  8202. something starting with __ and the normal name is an alias. */
  8203. #if defined (__stub_gluBeginCurve) || defined (__stub___gluBeginCurve)
  8204. choke me
  8205. #else
  8206. gluBeginCurve();
  8207. #endif
  8208. ; return 0; }
  8209. EOF
  8210. if { (eval echo configure:10222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8211. rm -rf conftest*
  8212. eval "ac_cv_func_gluBeginCurve=yes"
  8213. else
  8214. echo "configure: failed program was:" >&5
  8215. cat conftest.$ac_ext >&5
  8216. rm -rf conftest*
  8217. eval "ac_cv_func_gluBeginCurve=no"
  8218. fi
  8219. rm -f conftest*
  8220. if eval "test \"`echo '$ac_cv_func_'gluBeginCurve`\" = yes"; then
  8221. echo "$ac_t""yes" 1>&6
  8222. OPENGLLIB="$OPENGLLIB "
  8223. else
  8224. echo "$ac_t""no" 1>&6
  8225. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  8226. fi
  8227. LIBS=${ac_save_libs}
  8228. LDFLAGS=${ac_save_ldflags}
  8229. OPENGLINC="$OPENGLPATH"
  8230. OPENGLLIBPATH="$OPENGLPATH"
  8231. cat >> confdefs.h <<\EOF
  8232. #define OPENGL_AQUA 1
  8233. EOF
  8234. fi # $OPENGL_AQUA
  8235. if test "$OPENGL_WINDOWS" = 1 ; then
  8236. # With OpenGL includes directory
  8237. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  8238. echo "configure:10270: checking for location of OpenGL includes" >&5
  8239. case "$with_opengl_includes" in
  8240. y | ye | yes | n | no)
  8241. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  8242. ;;
  8243. esac
  8244. echo "$ac_t""$with_opengl_includes" 1>&6
  8245. if test -n "$with_opengl_includes" ; then
  8246. for dir in $with_opengl_includes; do
  8247. if test -d "$dir"; then
  8248. OPENGLINC="$OPENGLINC -I$dir"
  8249. else
  8250. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  8251. fi
  8252. done
  8253. fi
  8254. ac_save_cppflags="$CPPFLAGS"
  8255. CPPFLAGS="$OPENGLINC $CPPFLAGS"
  8256. for ac_hdr in GL/gl.h GL/glu.h
  8257. do
  8258. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8259. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8260. echo "configure:10296: checking for $ac_hdr" >&5
  8261. cat > conftest.$ac_ext <<EOF
  8262. #line 10299 "configure"
  8263. #include "confdefs.h"
  8264. #include <$ac_hdr>
  8265. EOF
  8266. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8267. { (eval echo configure:10304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8268. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8269. if test -z "$ac_err"; then
  8270. rm -rf conftest*
  8271. eval "ac_cv_header_$ac_safe=yes"
  8272. else
  8273. echo "$ac_err" >&5
  8274. echo "configure: failed program was:" >&5
  8275. cat conftest.$ac_ext >&5
  8276. rm -rf conftest*
  8277. eval "ac_cv_header_$ac_safe=no"
  8278. fi
  8279. rm -f conftest*
  8280. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8281. echo "$ac_t""yes" 1>&6
  8282. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8283. cat >> confdefs.h <<EOF
  8284. #define $ac_tr_hdr 1
  8285. EOF
  8286. else
  8287. echo "$ac_t""no" 1>&6
  8288. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  8289. fi
  8290. done
  8291. CPPFLAGS=$ac_save_cppflags
  8292. # With OpenGL library directory
  8293. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  8294. echo "configure:10338: checking for location of OpenGL library" >&5
  8295. case "$with_opengl_libs" in
  8296. y | ye | yes | n | no)
  8297. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  8298. ;;
  8299. esac
  8300. echo "$ac_t""$with_opengl_libs" 1>&6
  8301. if test -n "$with_opengl_libs"; then
  8302. for dir in $with_opengl_libs; do
  8303. if test -d "$dir"; then
  8304. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  8305. else
  8306. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  8307. fi
  8308. done
  8309. fi
  8310. ac_save_cflags="$CFLAGS"
  8311. CFLAGS="$CFLAGS $OPENGLINC"
  8312. ac_save_ldflags="$LDFLAGS"
  8313. ac_save_libs="$LIBS"
  8314. echo $ac_n "checking for OpenGL library""... $ac_c" 1>&6
  8315. echo "configure:10363: checking for OpenGL library" >&5
  8316. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  8317. LIBS="-lopengl32 "
  8318. cat > conftest.$ac_ext <<EOF
  8319. #line 10367 "configure"
  8320. #include "confdefs.h"
  8321. #include <GL/gl.h>
  8322. int main() {
  8323. glEnd();
  8324. ; return 0; }
  8325. EOF
  8326. if { (eval echo configure:10374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8327. rm -rf conftest*
  8328. echo "$ac_t""found" 1>&6
  8329. OPENGLLIB="$OPENGLLIB -lopengl32 "
  8330. else
  8331. echo "configure: failed program was:" >&5
  8332. cat conftest.$ac_ext >&5
  8333. rm -rf conftest*
  8334. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  8335. fi
  8336. rm -f conftest*
  8337. LIBS=${ac_save_libs}
  8338. LDFLAGS=${ac_save_ldflags}
  8339. ac_save_ldflags="$LDFLAGS"
  8340. ac_save_libs="$LIBS"
  8341. echo $ac_n "checking for GLU library""... $ac_c" 1>&6
  8342. echo "configure:10398: checking for GLU library" >&5
  8343. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  8344. LIBS="-lglu32 $OPENGLLIB "
  8345. cat > conftest.$ac_ext <<EOF
  8346. #line 10402 "configure"
  8347. #include "confdefs.h"
  8348. #include <GL/glu.h>
  8349. int main() {
  8350. gluNewQuadric();
  8351. ; return 0; }
  8352. EOF
  8353. if { (eval echo configure:10409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8354. rm -rf conftest*
  8355. echo "$ac_t""found" 1>&6
  8356. OPENGLULIB="$OPENGLULIB -lglu32 "
  8357. else
  8358. echo "configure: failed program was:" >&5
  8359. cat conftest.$ac_ext >&5
  8360. rm -rf conftest*
  8361. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  8362. fi
  8363. rm -f conftest*
  8364. LIBS=${ac_save_libs}
  8365. LDFLAGS=${ac_save_ldflags}
  8366. CFLAGS="${ac_save_cflags}"
  8367. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  8368. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  8369. cat >> confdefs.h <<\EOF
  8370. #define OPENGL_WINDOWS 1
  8371. EOF
  8372. fi # $OPENGL_WINDOWS
  8373. fi # $USE_OPENGL
  8374. # Done checking OpenGL
  8375. # Enable ODBC option
  8376. echo $ac_n "checking whether to use ODBC""... $ac_c" 1>&6
  8377. echo "configure:10458: checking whether to use ODBC" >&5
  8378. echo "$ac_t"""$with_odbc"" 1>&6
  8379. case "$with_odbc" in
  8380. "no") USE_ODBC= ;;
  8381. "yes") USE_ODBC="1" ;;
  8382. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8383. esac
  8384. ODBCINC=
  8385. ODBCLIB=
  8386. if test -n "$USE_ODBC"; then
  8387. # With ODBC includes directory
  8388. echo $ac_n "checking for location of ODBC includes""... $ac_c" 1>&6
  8389. echo "configure:10477: checking for location of ODBC includes" >&5
  8390. case "$with_odbc_includes" in
  8391. y | ye | yes | n | no)
  8392. { echo "configure: error: *** You must supply a directory to --with-odbc-includes." 1>&2; exit 1; }
  8393. ;;
  8394. esac
  8395. echo "$ac_t""$with_odbc_includes" 1>&6
  8396. if test -n "$with_odbc_includes" ; then
  8397. for dir in $with_odbc_includes; do
  8398. if test -d "$dir"; then
  8399. ODBCINC="$ODBCINC -I$dir"
  8400. else
  8401. { echo "configure: error: *** ODBC includes directory $dir does not exist." 1>&2; exit 1; }
  8402. fi
  8403. done
  8404. fi
  8405. ac_save_cppflags="$CPPFLAGS"
  8406. CPPFLAGS="$ODBCINC $CPPFLAGS"
  8407. for ac_hdr in sql.h
  8408. do
  8409. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8410. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8411. echo "configure:10503: checking for $ac_hdr" >&5
  8412. cat > conftest.$ac_ext <<EOF
  8413. #line 10506 "configure"
  8414. #include "confdefs.h"
  8415. #include <$ac_hdr>
  8416. EOF
  8417. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8418. { (eval echo configure:10511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8419. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8420. if test -z "$ac_err"; then
  8421. rm -rf conftest*
  8422. eval "ac_cv_header_$ac_safe=yes"
  8423. else
  8424. echo "$ac_err" >&5
  8425. echo "configure: failed program was:" >&5
  8426. cat conftest.$ac_ext >&5
  8427. rm -rf conftest*
  8428. eval "ac_cv_header_$ac_safe=no"
  8429. fi
  8430. rm -f conftest*
  8431. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8432. echo "$ac_t""yes" 1>&6
  8433. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8434. cat >> confdefs.h <<EOF
  8435. #define $ac_tr_hdr 1
  8436. EOF
  8437. else
  8438. echo "$ac_t""no" 1>&6
  8439. { echo "configure: error: *** Unable to locate ODBC includes." 1>&2; exit 1; }
  8440. fi
  8441. done
  8442. CPPFLAGS=$ac_save_cppflags
  8443. # With ODBC library directory
  8444. echo $ac_n "checking for location of ODBC library""... $ac_c" 1>&6
  8445. echo "configure:10545: checking for location of ODBC library" >&5
  8446. case "$with_odbc_libs" in
  8447. y | ye | yes | n | no)
  8448. { echo "configure: error: *** You must supply a directory to --with-odbc-libs." 1>&2; exit 1; }
  8449. ;;
  8450. esac
  8451. echo "$ac_t""$with_odbc_libs" 1>&6
  8452. if test -n "$with_odbc_libs"; then
  8453. for dir in $with_odbc_libs; do
  8454. if test -d "$dir"; then
  8455. ODBCLIB="$ODBCLIB -L$dir"
  8456. else
  8457. { echo "configure: error: *** ODBC library directory $dir does not exist." 1>&2; exit 1; }
  8458. fi
  8459. done
  8460. fi
  8461. ac_save_ldflags="$LDFLAGS"
  8462. LDFLAGS="$ODBCLIB $LDFLAGS"
  8463. echo $ac_n "checking for SQLConnect in -lodbc""... $ac_c" 1>&6
  8464. echo "configure:10570: checking for SQLConnect in -lodbc" >&5
  8465. ac_lib_var=`echo odbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  8466. ac_save_LIBS="$LIBS"
  8467. LIBS="-lodbc $ICONVLIB $LIBS"
  8468. cat > conftest.$ac_ext <<EOF
  8469. #line 10576 "configure"
  8470. #include "confdefs.h"
  8471. /* Override any gcc2 internal prototype to avoid an error. */
  8472. /* We use char because int might match the return type of a gcc2
  8473. builtin and then its argument prototype would still apply. */
  8474. char SQLConnect();
  8475. int main() {
  8476. SQLConnect()
  8477. ; return 0; }
  8478. EOF
  8479. if { (eval echo configure:10587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8480. rm -rf conftest*
  8481. eval "ac_cv_lib_$ac_lib_var=yes"
  8482. else
  8483. echo "configure: failed program was:" >&5
  8484. cat conftest.$ac_ext >&5
  8485. rm -rf conftest*
  8486. eval "ac_cv_lib_$ac_lib_var=no"
  8487. fi
  8488. rm -f conftest*
  8489. LIBS="$ac_save_LIBS"
  8490. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8491. echo "$ac_t""yes" 1>&6
  8492. ODBCLIB="$ODBCLIB -lodbc "
  8493. else
  8494. echo "$ac_t""no" 1>&6
  8495. LDFLAGS=${ac_save_ldflags}
  8496. ac_save_ldflags="$LDFLAGS"
  8497. LDFLAGS="$ODBCLIB $LDFLAGS"
  8498. echo $ac_n "checking for SQLConnect in -liodbc""... $ac_c" 1>&6
  8499. echo "configure:10612: checking for SQLConnect in -liodbc" >&5
  8500. ac_lib_var=`echo iodbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  8501. ac_save_LIBS="$LIBS"
  8502. LIBS="-liodbc $LIBS"
  8503. cat > conftest.$ac_ext <<EOF
  8504. #line 10618 "configure"
  8505. #include "confdefs.h"
  8506. /* Override any gcc2 internal prototype to avoid an error. */
  8507. /* We use char because int might match the return type of a gcc2
  8508. builtin and then its argument prototype would still apply. */
  8509. char SQLConnect();
  8510. int main() {
  8511. SQLConnect()
  8512. ; return 0; }
  8513. EOF
  8514. if { (eval echo configure:10629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8515. rm -rf conftest*
  8516. eval "ac_cv_lib_$ac_lib_var=yes"
  8517. else
  8518. echo "configure: failed program was:" >&5
  8519. cat conftest.$ac_ext >&5
  8520. rm -rf conftest*
  8521. eval "ac_cv_lib_$ac_lib_var=no"
  8522. fi
  8523. rm -f conftest*
  8524. LIBS="$ac_save_LIBS"
  8525. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8526. echo "$ac_t""yes" 1>&6
  8527. ODBCLIB="$ODBCLIB -liodbc "
  8528. else
  8529. echo "$ac_t""no" 1>&6
  8530. LDFLAGS=${ac_save_ldflags}
  8531. ac_save_cflags="$CFLAGS"
  8532. CFLAGS="$CFLAGS $ODBCINC"
  8533. ac_save_ldflags="$LDFLAGS"
  8534. ac_save_libs="$LIBS"
  8535. echo $ac_n "checking for ODBC library""... $ac_c" 1>&6
  8536. echo "configure:10654: checking for ODBC library" >&5
  8537. LDFLAGS="$ODBCLIB $LDFLAGS"
  8538. LIBS="-lodbc32 "
  8539. cat > conftest.$ac_ext <<EOF
  8540. #line 10658 "configure"
  8541. #include "confdefs.h"
  8542. #include <windows.h>
  8543. #include <sql.h>
  8544. int main() {
  8545. SQLAllocEnv((SQLHENV *)0);
  8546. ; return 0; }
  8547. EOF
  8548. if { (eval echo configure:10666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8549. rm -rf conftest*
  8550. echo "$ac_t""found" 1>&6
  8551. ODBCLIB="$ODBCLIB -lodbc32 "
  8552. else
  8553. echo "configure: failed program was:" >&5
  8554. cat conftest.$ac_ext >&5
  8555. rm -rf conftest*
  8556. { echo "configure: error: *** Unable to locate ODBC library." 1>&2; exit 1; }
  8557. fi
  8558. rm -f conftest*
  8559. LIBS=${ac_save_libs}
  8560. LDFLAGS=${ac_save_ldflags}
  8561. CFLAGS="${ac_save_cflags}"
  8562. fi
  8563. LDFLAGS=${ac_save_ldflags}
  8564. fi
  8565. LDFLAGS=${ac_save_ldflags}
  8566. fi # $USE_ODBC
  8567. # Done checking ODBC
  8568. # Enable FFTW option
  8569. echo $ac_n "checking whether to use FFTW""... $ac_c" 1>&6
  8570. echo "configure:10715: checking whether to use FFTW" >&5
  8571. echo "$ac_t"""$with_fftw"" 1>&6
  8572. case "$with_fftw" in
  8573. "no") USE_FFTW= ;;
  8574. "yes") USE_FFTW="1" ;;
  8575. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8576. esac
  8577. FFTWINC=
  8578. FFTWLIB=
  8579. if test -n "$USE_FFTW"; then
  8580. # With FFTW includes directory
  8581. echo $ac_n "checking for location of FFTW includes""... $ac_c" 1>&6
  8582. echo "configure:10734: checking for location of FFTW includes" >&5
  8583. case "$with_fftw_includes" in
  8584. y | ye | yes | n | no)
  8585. { echo "configure: error: *** You must supply a directory to --with-fftw-includes." 1>&2; exit 1; }
  8586. ;;
  8587. esac
  8588. echo "$ac_t""$with_fftw_includes" 1>&6
  8589. if test -n "$with_fftw_includes" ; then
  8590. for dir in $with_fftw_includes; do
  8591. if test -d "$dir"; then
  8592. FFTWINC="$FFTWINC -I$dir"
  8593. else
  8594. { echo "configure: error: *** FFTW includes directory $dir does not exist." 1>&2; exit 1; }
  8595. fi
  8596. done
  8597. fi
  8598. ac_save_cppflags="$CPPFLAGS"
  8599. CPPFLAGS="$FFTWINC $CPPFLAGS"
  8600. for ac_hdr in fftw3.h
  8601. do
  8602. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8603. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8604. echo "configure:10760: checking for $ac_hdr" >&5
  8605. cat > conftest.$ac_ext <<EOF
  8606. #line 10763 "configure"
  8607. #include "confdefs.h"
  8608. #include <$ac_hdr>
  8609. EOF
  8610. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8611. { (eval echo configure:10768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8612. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8613. if test -z "$ac_err"; then
  8614. rm -rf conftest*
  8615. eval "ac_cv_header_$ac_safe=yes"
  8616. else
  8617. echo "$ac_err" >&5
  8618. echo "configure: failed program was:" >&5
  8619. cat conftest.$ac_ext >&5
  8620. rm -rf conftest*
  8621. eval "ac_cv_header_$ac_safe=no"
  8622. fi
  8623. rm -f conftest*
  8624. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8625. echo "$ac_t""yes" 1>&6
  8626. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8627. cat >> confdefs.h <<EOF
  8628. #define $ac_tr_hdr 1
  8629. EOF
  8630. else
  8631. echo "$ac_t""no" 1>&6
  8632. ac_save_cppflags="$CPPFLAGS"
  8633. CPPFLAGS=" $CPPFLAGS"
  8634. for ac_hdr in fftw.h
  8635. do
  8636. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8637. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8638. echo "configure:10796: checking for $ac_hdr" >&5
  8639. cat > conftest.$ac_ext <<EOF
  8640. #line 10799 "configure"
  8641. #include "confdefs.h"
  8642. #include <$ac_hdr>
  8643. EOF
  8644. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8645. { (eval echo configure:10804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8646. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8647. if test -z "$ac_err"; then
  8648. rm -rf conftest*
  8649. eval "ac_cv_header_$ac_safe=yes"
  8650. else
  8651. echo "$ac_err" >&5
  8652. echo "configure: failed program was:" >&5
  8653. cat conftest.$ac_ext >&5
  8654. rm -rf conftest*
  8655. eval "ac_cv_header_$ac_safe=no"
  8656. fi
  8657. rm -f conftest*
  8658. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8659. echo "$ac_t""yes" 1>&6
  8660. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8661. cat >> confdefs.h <<EOF
  8662. #define $ac_tr_hdr 1
  8663. EOF
  8664. else
  8665. echo "$ac_t""no" 1>&6
  8666. ac_save_cppflags="$CPPFLAGS"
  8667. CPPFLAGS=" $CPPFLAGS"
  8668. for ac_hdr in dfftw.h
  8669. do
  8670. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8671. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8672. echo "configure:10832: checking for $ac_hdr" >&5
  8673. cat > conftest.$ac_ext <<EOF
  8674. #line 10835 "configure"
  8675. #include "confdefs.h"
  8676. #include <$ac_hdr>
  8677. EOF
  8678. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8679. { (eval echo configure:10840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8680. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8681. if test -z "$ac_err"; then
  8682. rm -rf conftest*
  8683. eval "ac_cv_header_$ac_safe=yes"
  8684. else
  8685. echo "$ac_err" >&5
  8686. echo "configure: failed program was:" >&5
  8687. cat conftest.$ac_ext >&5
  8688. rm -rf conftest*
  8689. eval "ac_cv_header_$ac_safe=no"
  8690. fi
  8691. rm -f conftest*
  8692. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8693. echo "$ac_t""yes" 1>&6
  8694. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8695. cat >> confdefs.h <<EOF
  8696. #define $ac_tr_hdr 1
  8697. EOF
  8698. else
  8699. echo "$ac_t""no" 1>&6
  8700. { echo "configure: error: *** Unable to locate FFTW includes." 1>&2; exit 1; }
  8701. fi
  8702. done
  8703. CPPFLAGS=$ac_save_cppflags
  8704. fi
  8705. done
  8706. CPPFLAGS=$ac_save_cppflags
  8707. fi
  8708. done
  8709. CPPFLAGS=$ac_save_cppflags
  8710. # With FFTW library directory
  8711. echo $ac_n "checking for location of FFTW library""... $ac_c" 1>&6
  8712. echo "configure:10886: checking for location of FFTW library" >&5
  8713. case "$with_fftw_libs" in
  8714. y | ye | yes | n | no)
  8715. { echo "configure: error: *** You must supply a directory to --with-fftw-libs." 1>&2; exit 1; }
  8716. ;;
  8717. esac
  8718. echo "$ac_t""$with_fftw_libs" 1>&6
  8719. if test -n "$with_fftw_libs"; then
  8720. for dir in $with_fftw_libs; do
  8721. if test -d "$dir"; then
  8722. FFTWLIB="$FFTWLIB -L$dir"
  8723. else
  8724. { echo "configure: error: *** FFTW library directory $dir does not exist." 1>&2; exit 1; }
  8725. fi
  8726. done
  8727. fi
  8728. ac_save_ldflags="$LDFLAGS"
  8729. LDFLAGS="$FFTWLIB $LDFLAGS"
  8730. echo $ac_n "checking for fftw_execute in -lfftw3""... $ac_c" 1>&6
  8731. echo "configure:10911: checking for fftw_execute in -lfftw3" >&5
  8732. ac_lib_var=`echo fftw3'_'fftw_execute | sed 'y%./+-%__p_%'`
  8733. ac_save_LIBS="$LIBS"
  8734. LIBS="-lfftw3 $MATHLIB $LIBS"
  8735. cat > conftest.$ac_ext <<EOF
  8736. #line 10917 "configure"
  8737. #include "confdefs.h"
  8738. /* Override any gcc2 internal prototype to avoid an error. */
  8739. /* We use char because int might match the return type of a gcc2
  8740. builtin and then its argument prototype would still apply. */
  8741. char fftw_execute();
  8742. int main() {
  8743. fftw_execute()
  8744. ; return 0; }
  8745. EOF
  8746. if { (eval echo configure:10928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8747. rm -rf conftest*
  8748. eval "ac_cv_lib_$ac_lib_var=yes"
  8749. else
  8750. echo "configure: failed program was:" >&5
  8751. cat conftest.$ac_ext >&5
  8752. rm -rf conftest*
  8753. eval "ac_cv_lib_$ac_lib_var=no"
  8754. fi
  8755. rm -f conftest*
  8756. LIBS="$ac_save_LIBS"
  8757. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8758. echo "$ac_t""yes" 1>&6
  8759. FFTWLIB="$FFTWLIB -lfftw3 $MATHLIB"
  8760. else
  8761. echo "$ac_t""no" 1>&6
  8762. LDFLAGS=${ac_save_ldflags}
  8763. ac_save_ldflags="$LDFLAGS"
  8764. LDFLAGS="$FFTWLIB $LDFLAGS"
  8765. echo $ac_n "checking for fftwnd_one in -lfftw""... $ac_c" 1>&6
  8766. echo "configure:10953: checking for fftwnd_one in -lfftw" >&5
  8767. ac_lib_var=`echo fftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  8768. ac_save_LIBS="$LIBS"
  8769. LIBS="-lfftw $MATHLIB $LIBS"
  8770. cat > conftest.$ac_ext <<EOF
  8771. #line 10959 "configure"
  8772. #include "confdefs.h"
  8773. /* Override any gcc2 internal prototype to avoid an error. */
  8774. /* We use char because int might match the return type of a gcc2
  8775. builtin and then its argument prototype would still apply. */
  8776. char fftwnd_one();
  8777. int main() {
  8778. fftwnd_one()
  8779. ; return 0; }
  8780. EOF
  8781. if { (eval echo configure:10970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8782. rm -rf conftest*
  8783. eval "ac_cv_lib_$ac_lib_var=yes"
  8784. else
  8785. echo "configure: failed program was:" >&5
  8786. cat conftest.$ac_ext >&5
  8787. rm -rf conftest*
  8788. eval "ac_cv_lib_$ac_lib_var=no"
  8789. fi
  8790. rm -f conftest*
  8791. LIBS="$ac_save_LIBS"
  8792. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8793. echo "$ac_t""yes" 1>&6
  8794. FFTWLIB="$FFTWLIB -lfftw $MATHLIB"
  8795. else
  8796. echo "$ac_t""no" 1>&6
  8797. LDFLAGS=${ac_save_ldflags}
  8798. ac_save_ldflags="$LDFLAGS"
  8799. LDFLAGS="$FFTWLIB $LDFLAGS"
  8800. echo $ac_n "checking for fftwnd_one in -ldfftw""... $ac_c" 1>&6
  8801. echo "configure:10995: checking for fftwnd_one in -ldfftw" >&5
  8802. ac_lib_var=`echo dfftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  8803. ac_save_LIBS="$LIBS"
  8804. LIBS="-ldfftw $MATHLIB $LIBS"
  8805. cat > conftest.$ac_ext <<EOF
  8806. #line 11001 "configure"
  8807. #include "confdefs.h"
  8808. /* Override any gcc2 internal prototype to avoid an error. */
  8809. /* We use char because int might match the return type of a gcc2
  8810. builtin and then its argument prototype would still apply. */
  8811. char fftwnd_one();
  8812. int main() {
  8813. fftwnd_one()
  8814. ; return 0; }
  8815. EOF
  8816. if { (eval echo configure:11012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8817. rm -rf conftest*
  8818. eval "ac_cv_lib_$ac_lib_var=yes"
  8819. else
  8820. echo "configure: failed program was:" >&5
  8821. cat conftest.$ac_ext >&5
  8822. rm -rf conftest*
  8823. eval "ac_cv_lib_$ac_lib_var=no"
  8824. fi
  8825. rm -f conftest*
  8826. LIBS="$ac_save_LIBS"
  8827. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8828. echo "$ac_t""yes" 1>&6
  8829. FFTWLIB="$FFTWLIB -ldfftw $MATHLIB"
  8830. else
  8831. echo "$ac_t""no" 1>&6
  8832. LDFLAGS=${ac_save_ldflags}
  8833. { echo "configure: error: *** Unable to locate FFTW library." 1>&2; exit 1; }
  8834. fi
  8835. LDFLAGS=${ac_save_ldflags}
  8836. fi
  8837. LDFLAGS=${ac_save_ldflags}
  8838. fi
  8839. LDFLAGS=${ac_save_ldflags}
  8840. fi # $USE_FFTW
  8841. # Done checking FFTW
  8842. # Enable BLAS option
  8843. echo $ac_n "checking whether to use BLAS""... $ac_c" 1>&6
  8844. echo "configure:11069: checking whether to use BLAS" >&5
  8845. echo "$ac_t"""$with_blas"" 1>&6
  8846. case "$with_blas" in
  8847. "no") USE_BLAS= ;;
  8848. "yes") USE_BLAS="1" ;;
  8849. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8850. esac
  8851. BLASLIB=
  8852. BLASINC=
  8853. if test -n "$USE_BLAS"; then
  8854. # With BLAS includes directory
  8855. # BLAS doesn't have includes (FORTRAN library)
  8856. # With BLAS library directory
  8857. echo $ac_n "checking for location of BLAS includes""... $ac_c" 1>&6
  8858. echo "configure:11090: checking for location of BLAS includes" >&5
  8859. case "$with_blas_includes" in
  8860. y | ye | yes | n | no)
  8861. { echo "configure: error: *** You must supply a directory to --with-blas-includes." 1>&2; exit 1; }
  8862. ;;
  8863. esac
  8864. echo "$ac_t""$with_blas_includes" 1>&6
  8865. if test -n "$with_blas_includes" ; then
  8866. for dir in $with_blas_includes; do
  8867. if test -d "$dir"; then
  8868. BLASINC="$BLASINC -I$dir"
  8869. else
  8870. { echo "configure: error: *** BLAS includes directory $dir does not exist." 1>&2; exit 1; }
  8871. fi
  8872. done
  8873. fi
  8874. echo $ac_n "checking for location of BLAS library""... $ac_c" 1>&6
  8875. echo "configure:11110: checking for location of BLAS library" >&5
  8876. case "$with_blas_libs" in
  8877. y | ye | yes | n | no)
  8878. { echo "configure: error: *** You must supply a directory to --with-blas-libs." 1>&2; exit 1; }
  8879. ;;
  8880. esac
  8881. echo "$ac_t""$with_blas_libs" 1>&6
  8882. if test -n "$with_blas_libs"; then
  8883. for dir in $with_blas_libs; do
  8884. if test -d "$dir"; then
  8885. BLASLIB="$BLASLIB -L$dir"
  8886. else
  8887. { echo "configure: error: *** BLAS library directory $dir does not exist." 1>&2; exit 1; }
  8888. fi
  8889. done
  8890. fi
  8891. # See if cblas.h exists (CBLAS,ATLAS,others)
  8892. save_CPPFLAGS="$CPPFLAGS"
  8893. CPPFLAGS="$BLASINC $CPPFLAGS"
  8894. for ac_hdr in cblas.h
  8895. do
  8896. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8897. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8898. echo "configure:11136: checking for $ac_hdr" >&5
  8899. cat > conftest.$ac_ext <<EOF
  8900. #line 11139 "configure"
  8901. #include "confdefs.h"
  8902. #include <$ac_hdr>
  8903. EOF
  8904. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8905. { (eval echo configure:11144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8906. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8907. if test -z "$ac_err"; then
  8908. rm -rf conftest*
  8909. eval "ac_cv_header_$ac_safe=yes"
  8910. else
  8911. echo "$ac_err" >&5
  8912. echo "configure: failed program was:" >&5
  8913. cat conftest.$ac_ext >&5
  8914. rm -rf conftest*
  8915. eval "ac_cv_header_$ac_safe=no"
  8916. fi
  8917. rm -f conftest*
  8918. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8919. echo "$ac_t""yes" 1>&6
  8920. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8921. cat >> confdefs.h <<EOF
  8922. #define $ac_tr_hdr 1
  8923. EOF
  8924. else
  8925. echo "$ac_t""no" 1>&6
  8926. fi
  8927. done
  8928. CPPFLAGS="$save_CPPFLAGS"
  8929. ac_save_ldflags="$LDFLAGS"
  8930. LDFLAGS="$BLASLIB $LDFLAGS"
  8931. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  8932. echo "configure:11179: checking for dnrm2_ in -lblas" >&5
  8933. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  8934. ac_save_LIBS="$LIBS"
  8935. LIBS="-lblas $MATHLIB $LIBS"
  8936. cat > conftest.$ac_ext <<EOF
  8937. #line 11185 "configure"
  8938. #include "confdefs.h"
  8939. /* Override any gcc2 internal prototype to avoid an error. */
  8940. /* We use char because int might match the return type of a gcc2
  8941. builtin and then its argument prototype would still apply. */
  8942. char dnrm2_();
  8943. int main() {
  8944. dnrm2_()
  8945. ; return 0; }
  8946. EOF
  8947. if { (eval echo configure:11196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8948. rm -rf conftest*
  8949. eval "ac_cv_lib_$ac_lib_var=yes"
  8950. else
  8951. echo "configure: failed program was:" >&5
  8952. cat conftest.$ac_ext >&5
  8953. rm -rf conftest*
  8954. eval "ac_cv_lib_$ac_lib_var=no"
  8955. fi
  8956. rm -f conftest*
  8957. LIBS="$ac_save_LIBS"
  8958. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8959. echo "$ac_t""yes" 1>&6
  8960. BLASLIB="$BLASLIB -lblas "
  8961. else
  8962. echo "$ac_t""no" 1>&6
  8963. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  8964. echo "configure:11215: checking for dnrm2_ in -lblas" >&5
  8965. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  8966. ac_save_LIBS="$LIBS"
  8967. LIBS="-lblas $MATHLIB -lg2c $LIBS"
  8968. cat > conftest.$ac_ext <<EOF
  8969. #line 11221 "configure"
  8970. #include "confdefs.h"
  8971. /* Override any gcc2 internal prototype to avoid an error. */
  8972. /* We use char because int might match the return type of a gcc2
  8973. builtin and then its argument prototype would still apply. */
  8974. char dnrm2_();
  8975. int main() {
  8976. dnrm2_()
  8977. ; return 0; }
  8978. EOF
  8979. if { (eval echo configure:11232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8980. rm -rf conftest*
  8981. eval "ac_cv_lib_$ac_lib_var=yes"
  8982. else
  8983. echo "configure: failed program was:" >&5
  8984. cat conftest.$ac_ext >&5
  8985. rm -rf conftest*
  8986. eval "ac_cv_lib_$ac_lib_var=no"
  8987. fi
  8988. rm -f conftest*
  8989. LIBS="$ac_save_LIBS"
  8990. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8991. echo "$ac_t""yes" 1>&6
  8992. BLASLIB="$BLASLIB -lblas -lg2c"
  8993. else
  8994. echo "$ac_t""no" 1>&6
  8995. LDFLAGS=${ac_save_ldflags}
  8996. { echo "configure: error: *** Unable to locate BLAS library." 1>&2; exit 1; }
  8997. fi
  8998. fi
  8999. LDFLAGS=${ac_save_ldflags}
  9000. blas_ok=no
  9001. # Check for ATLAS
  9002. save_LDFLAGS="$LDFLAGS"
  9003. LDFLAGS="$BLASLIB $LDFLAGS"
  9004. echo $ac_n "checking for ATL_xerbla in -latlas""... $ac_c" 1>&6
  9005. echo "configure:11276: checking for ATL_xerbla in -latlas" >&5
  9006. ac_lib_var=`echo atlas'_'ATL_xerbla | sed 'y%./+-%__p_%'`
  9007. ac_save_LIBS="$LIBS"
  9008. LIBS="-latlas $LIBS"
  9009. cat > conftest.$ac_ext <<EOF
  9010. #line 11282 "configure"
  9011. #include "confdefs.h"
  9012. /* Override any gcc2 internal prototype to avoid an error. */
  9013. /* We use char because int might match the return type of a gcc2
  9014. builtin and then its argument prototype would still apply. */
  9015. char ATL_xerbla();
  9016. int main() {
  9017. ATL_xerbla()
  9018. ; return 0; }
  9019. EOF
  9020. if { (eval echo configure:11293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9021. rm -rf conftest*
  9022. eval "ac_cv_lib_$ac_lib_var=yes"
  9023. else
  9024. echo "configure: failed program was:" >&5
  9025. cat conftest.$ac_ext >&5
  9026. rm -rf conftest*
  9027. eval "ac_cv_lib_$ac_lib_var=no"
  9028. fi
  9029. rm -f conftest*
  9030. LIBS="$ac_save_LIBS"
  9031. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9032. echo "$ac_t""yes" 1>&6
  9033. echo $ac_n "checking for sgemm_ in -lf77blas""... $ac_c" 1>&6
  9034. echo "configure:11308: checking for sgemm_ in -lf77blas" >&5
  9035. ac_lib_var=`echo f77blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9036. ac_save_LIBS="$LIBS"
  9037. LIBS="-lf77blas -latlas $LIBS"
  9038. cat > conftest.$ac_ext <<EOF
  9039. #line 11314 "configure"
  9040. #include "confdefs.h"
  9041. /* Override any gcc2 internal prototype to avoid an error. */
  9042. /* We use char because int might match the return type of a gcc2
  9043. builtin and then its argument prototype would still apply. */
  9044. char sgemm_();
  9045. int main() {
  9046. sgemm_()
  9047. ; return 0; }
  9048. EOF
  9049. if { (eval echo configure:11325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9050. rm -rf conftest*
  9051. eval "ac_cv_lib_$ac_lib_var=yes"
  9052. else
  9053. echo "configure: failed program was:" >&5
  9054. cat conftest.$ac_ext >&5
  9055. rm -rf conftest*
  9056. eval "ac_cv_lib_$ac_lib_var=no"
  9057. fi
  9058. rm -f conftest*
  9059. LIBS="$ac_save_LIBS"
  9060. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9061. echo "$ac_t""yes" 1>&6
  9062. echo $ac_n "checking for cblas_dgemm in -lcblas""... $ac_c" 1>&6
  9063. echo "configure:11340: checking for cblas_dgemm in -lcblas" >&5
  9064. ac_lib_var=`echo cblas'_'cblas_dgemm | sed 'y%./+-%__p_%'`
  9065. ac_save_LIBS="$LIBS"
  9066. LIBS="-lcblas -lf77blas -latlas $LIBS"
  9067. cat > conftest.$ac_ext <<EOF
  9068. #line 11346 "configure"
  9069. #include "confdefs.h"
  9070. /* Override any gcc2 internal prototype to avoid an error. */
  9071. /* We use char because int might match the return type of a gcc2
  9072. builtin and then its argument prototype would still apply. */
  9073. char cblas_dgemm();
  9074. int main() {
  9075. cblas_dgemm()
  9076. ; return 0; }
  9077. EOF
  9078. if { (eval echo configure:11357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9079. rm -rf conftest*
  9080. eval "ac_cv_lib_$ac_lib_var=yes"
  9081. else
  9082. echo "configure: failed program was:" >&5
  9083. cat conftest.$ac_ext >&5
  9084. rm -rf conftest*
  9085. eval "ac_cv_lib_$ac_lib_var=no"
  9086. fi
  9087. rm -f conftest*
  9088. LIBS="$ac_save_LIBS"
  9089. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9090. echo "$ac_t""yes" 1>&6
  9091. blas_ok=yes; BLASLIB="-lcblas -lf77blas -latlas"
  9092. else
  9093. echo "$ac_t""no" 1>&6
  9094. fi
  9095. else
  9096. echo "$ac_t""no" 1>&6
  9097. fi
  9098. else
  9099. echo "$ac_t""no" 1>&6
  9100. fi
  9101. LDFLAGS="$save_LDFLAGS"
  9102. # Do we have ATLAS?
  9103. if test $blas_ok = yes; then
  9104. cat >> confdefs.h <<\EOF
  9105. #define HAVE_LIBATLAS 1
  9106. EOF
  9107. fi
  9108. # BLAS in Apple vecLib framework? (Mac OS-X)
  9109. # not dependent on APP build
  9110. #if test -n "$MACOSX_APP"; then
  9111. if test $blas_ok = no; then
  9112. vlib_flags="-framework vecLib"
  9113. save_LIBS="$LIBS"
  9114. LIBS="$vlib_flags $LIBS"
  9115. echo $ac_n "checking for sgemm in $vlib_flags""... $ac_c" 1>&6
  9116. echo "configure:11403: checking for sgemm in $vlib_flags" >&5
  9117. cat > conftest.$ac_ext <<EOF
  9118. #line 11405 "configure"
  9119. #include "confdefs.h"
  9120. int main() {
  9121. sgemm
  9122. ; return 0; }
  9123. EOF
  9124. if { (eval echo configure:11412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9125. rm -rf conftest*
  9126. blas_ok=yes; BLASLIB="$vlib_flags"
  9127. else
  9128. echo "configure: failed program was:" >&5
  9129. cat conftest.$ac_ext >&5
  9130. rm -rf conftest*
  9131. BLASLIB=""
  9132. fi
  9133. rm -f conftest*
  9134. echo "$ac_t""$blas_ok" 1>&6
  9135. LIBS="$save_LIBS"
  9136. fi
  9137. #fi # $MACOSX_APP
  9138. # BLAS in PhiPACK libraries? (requires generic BLAS, too)
  9139. if test $blas_ok = no; then
  9140. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  9141. echo "configure:11430: checking for sgemm_ in -lblas" >&5
  9142. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9143. ac_save_LIBS="$LIBS"
  9144. LIBS="-lblas $LIBS"
  9145. cat > conftest.$ac_ext <<EOF
  9146. #line 11436 "configure"
  9147. #include "confdefs.h"
  9148. /* Override any gcc2 internal prototype to avoid an error. */
  9149. /* We use char because int might match the return type of a gcc2
  9150. builtin and then its argument prototype would still apply. */
  9151. char sgemm_();
  9152. int main() {
  9153. sgemm_()
  9154. ; return 0; }
  9155. EOF
  9156. if { (eval echo configure:11447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9157. rm -rf conftest*
  9158. eval "ac_cv_lib_$ac_lib_var=yes"
  9159. else
  9160. echo "configure: failed program was:" >&5
  9161. cat conftest.$ac_ext >&5
  9162. rm -rf conftest*
  9163. eval "ac_cv_lib_$ac_lib_var=no"
  9164. fi
  9165. rm -f conftest*
  9166. LIBS="$ac_save_LIBS"
  9167. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9168. echo "$ac_t""yes" 1>&6
  9169. echo $ac_n "checking for dgemm_ in -ldgemm""... $ac_c" 1>&6
  9170. echo "configure:11462: checking for dgemm_ in -ldgemm" >&5
  9171. ac_lib_var=`echo dgemm'_'dgemm_ | sed 'y%./+-%__p_%'`
  9172. ac_save_LIBS="$LIBS"
  9173. LIBS="-ldgemm -lblas $LIBS"
  9174. cat > conftest.$ac_ext <<EOF
  9175. #line 11468 "configure"
  9176. #include "confdefs.h"
  9177. /* Override any gcc2 internal prototype to avoid an error. */
  9178. /* We use char because int might match the return type of a gcc2
  9179. builtin and then its argument prototype would still apply. */
  9180. char dgemm_();
  9181. int main() {
  9182. dgemm_()
  9183. ; return 0; }
  9184. EOF
  9185. if { (eval echo configure:11479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9186. rm -rf conftest*
  9187. eval "ac_cv_lib_$ac_lib_var=yes"
  9188. else
  9189. echo "configure: failed program was:" >&5
  9190. cat conftest.$ac_ext >&5
  9191. rm -rf conftest*
  9192. eval "ac_cv_lib_$ac_lib_var=no"
  9193. fi
  9194. rm -f conftest*
  9195. LIBS="$ac_save_LIBS"
  9196. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9197. echo "$ac_t""yes" 1>&6
  9198. echo $ac_n "checking for sgemm_ in -lsgemm""... $ac_c" 1>&6
  9199. echo "configure:11494: checking for sgemm_ in -lsgemm" >&5
  9200. ac_lib_var=`echo sgemm'_'sgemm_ | sed 'y%./+-%__p_%'`
  9201. ac_save_LIBS="$LIBS"
  9202. LIBS="-lsgemm -lblas $LIBS"
  9203. cat > conftest.$ac_ext <<EOF
  9204. #line 11500 "configure"
  9205. #include "confdefs.h"
  9206. /* Override any gcc2 internal prototype to avoid an error. */
  9207. /* We use char because int might match the return type of a gcc2
  9208. builtin and then its argument prototype would still apply. */
  9209. char sgemm_();
  9210. int main() {
  9211. sgemm_()
  9212. ; return 0; }
  9213. EOF
  9214. if { (eval echo configure:11511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9215. rm -rf conftest*
  9216. eval "ac_cv_lib_$ac_lib_var=yes"
  9217. else
  9218. echo "configure: failed program was:" >&5
  9219. cat conftest.$ac_ext >&5
  9220. rm -rf conftest*
  9221. eval "ac_cv_lib_$ac_lib_var=no"
  9222. fi
  9223. rm -f conftest*
  9224. LIBS="$ac_save_LIBS"
  9225. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9226. echo "$ac_t""yes" 1>&6
  9227. blas_ok=yes; BLASLIB="-lsgemm -ldgemm -lblas"
  9228. else
  9229. echo "$ac_t""no" 1>&6
  9230. fi
  9231. else
  9232. echo "$ac_t""no" 1>&6
  9233. fi
  9234. else
  9235. echo "$ac_t""no" 1>&6
  9236. fi
  9237. fi
  9238. # BLAS in Sun Performance library?
  9239. if test $blas_ok = no; then
  9240. if test "x$GCC" != xyes; then # only works with Sun CC
  9241. echo $ac_n "checking for acosp in -lsunmath""... $ac_c" 1>&6
  9242. echo "configure:11545: checking for acosp in -lsunmath" >&5
  9243. ac_lib_var=`echo sunmath'_'acosp | sed 'y%./+-%__p_%'`
  9244. ac_save_LIBS="$LIBS"
  9245. LIBS="-lsunmath $LIBS"
  9246. cat > conftest.$ac_ext <<EOF
  9247. #line 11551 "configure"
  9248. #include "confdefs.h"
  9249. /* Override any gcc2 internal prototype to avoid an error. */
  9250. /* We use char because int might match the return type of a gcc2
  9251. builtin and then its argument prototype would still apply. */
  9252. char acosp();
  9253. int main() {
  9254. acosp()
  9255. ; return 0; }
  9256. EOF
  9257. if { (eval echo configure:11562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9258. rm -rf conftest*
  9259. eval "ac_cv_lib_$ac_lib_var=yes"
  9260. else
  9261. echo "configure: failed program was:" >&5
  9262. cat conftest.$ac_ext >&5
  9263. rm -rf conftest*
  9264. eval "ac_cv_lib_$ac_lib_var=no"
  9265. fi
  9266. rm -f conftest*
  9267. LIBS="$ac_save_LIBS"
  9268. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9269. echo "$ac_t""yes" 1>&6
  9270. echo $ac_n "checking for sgemm_ in -lsunperf""... $ac_c" 1>&6
  9271. echo "configure:11577: checking for sgemm_ in -lsunperf" >&5
  9272. ac_lib_var=`echo sunperf'_'sgemm_ | sed 'y%./+-%__p_%'`
  9273. ac_save_LIBS="$LIBS"
  9274. LIBS="-lsunperf -lsunmath $LIBS"
  9275. cat > conftest.$ac_ext <<EOF
  9276. #line 11583 "configure"
  9277. #include "confdefs.h"
  9278. /* Override any gcc2 internal prototype to avoid an error. */
  9279. /* We use char because int might match the return type of a gcc2
  9280. builtin and then its argument prototype would still apply. */
  9281. char sgemm_();
  9282. int main() {
  9283. sgemm_()
  9284. ; return 0; }
  9285. EOF
  9286. if { (eval echo configure:11594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9287. rm -rf conftest*
  9288. eval "ac_cv_lib_$ac_lib_var=yes"
  9289. else
  9290. echo "configure: failed program was:" >&5
  9291. cat conftest.$ac_ext >&5
  9292. rm -rf conftest*
  9293. eval "ac_cv_lib_$ac_lib_var=no"
  9294. fi
  9295. rm -f conftest*
  9296. LIBS="$ac_save_LIBS"
  9297. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9298. echo "$ac_t""yes" 1>&6
  9299. blas_ok=yes; BLASLIB="-xlic_lib=sunperf -lsunmath"
  9300. else
  9301. echo "$ac_t""no" 1>&6
  9302. fi
  9303. else
  9304. echo "$ac_t""no" 1>&6
  9305. fi
  9306. fi
  9307. fi
  9308. # Generic BLAS library
  9309. if test $blas_ok = no; then
  9310. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  9311. echo "configure:11624: checking for sgemm_ in -lblas" >&5
  9312. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9313. ac_save_LIBS="$LIBS"
  9314. LIBS="-lblas $LIBS"
  9315. cat > conftest.$ac_ext <<EOF
  9316. #line 11630 "configure"
  9317. #include "confdefs.h"
  9318. /* Override any gcc2 internal prototype to avoid an error. */
  9319. /* We use char because int might match the return type of a gcc2
  9320. builtin and then its argument prototype would still apply. */
  9321. char sgemm_();
  9322. int main() {
  9323. sgemm_()
  9324. ; return 0; }
  9325. EOF
  9326. if { (eval echo configure:11641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9327. rm -rf conftest*
  9328. eval "ac_cv_lib_$ac_lib_var=yes"
  9329. else
  9330. echo "configure: failed program was:" >&5
  9331. cat conftest.$ac_ext >&5
  9332. rm -rf conftest*
  9333. eval "ac_cv_lib_$ac_lib_var=no"
  9334. fi
  9335. rm -f conftest*
  9336. LIBS="$ac_save_LIBS"
  9337. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9338. echo "$ac_t""yes" 1>&6
  9339. blas_ok=yes; BLASLIB="-lblas"
  9340. else
  9341. echo "$ac_t""no" 1>&6
  9342. fi
  9343. fi
  9344. if test $blas_ok = yes; then
  9345. cat >> confdefs.h <<\EOF
  9346. #define HAVE_LIBBLAS 1
  9347. EOF
  9348. fi
  9349. fi # $USE_BLAS
  9350. # Done checking BLAS
  9351. # Enable LAPACK option
  9352. echo $ac_n "checking whether to use LAPACK""... $ac_c" 1>&6
  9353. echo "configure:11680: checking whether to use LAPACK" >&5
  9354. echo "$ac_t"""$with_lapack"" 1>&6
  9355. case "$with_lapack" in
  9356. "no") USE_LAPACK= ;;
  9357. "yes") USE_LAPACK="1" ;;
  9358. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9359. esac
  9360. LAPACKLIB=
  9361. LAPACKINC=
  9362. # LAPACK is useless without BLAS
  9363. if test -n "$USE_BLAS"; then
  9364. if test -n "$USE_LAPACK"; then
  9365. # With LAPACK includes directory
  9366. # LAPACK doesn't have includes (FORTRAN library)
  9367. # With LAPACK library directory
  9368. lapack_ok=no
  9369. echo $ac_n "checking for location of LAPACK includes""... $ac_c" 1>&6
  9370. echo "configure:11705: checking for location of LAPACK includes" >&5
  9371. case "$with_lapack_includes" in
  9372. y | ye | yes | n | no)
  9373. { echo "configure: error: *** You must supply a directory to --with-lapack-includes." 1>&2; exit 1; }
  9374. ;;
  9375. esac
  9376. echo "$ac_t""$with_lapack_includes" 1>&6
  9377. if test -n "$with_lapack_includes" ; then
  9378. for dir in $with_lapack_includes; do
  9379. if test -d "$dir"; then
  9380. LAPACKINC="$LAPACKINC -I$dir"
  9381. else
  9382. { echo "configure: error: *** LAPACK includes directory $dir does not exist." 1>&2; exit 1; }
  9383. fi
  9384. done
  9385. fi
  9386. echo $ac_n "checking for location of LAPACK library""... $ac_c" 1>&6
  9387. echo "configure:11725: checking for location of LAPACK library" >&5
  9388. case "$with_lapack_libs" in
  9389. y | ye | yes | n | no)
  9390. { echo "configure: error: *** You must supply a directory to --with-lapack-libs." 1>&2; exit 1; }
  9391. ;;
  9392. esac
  9393. echo "$ac_t""$with_lapack_libs" 1>&6
  9394. if test -n "$with_lapack_libs"; then
  9395. for dir in $with_lapack_libs; do
  9396. if test -d "$dir"; then
  9397. LAPACKLIB="$LAPACKLIB -L$dir"
  9398. else
  9399. { echo "configure: error: *** LAPACK library directory $dir does not exist." 1>&2; exit 1; }
  9400. fi
  9401. done
  9402. fi
  9403. # See if clapack.h exists (ATLAS)
  9404. save_CPPFLAGS="$CPPFLAGS"
  9405. CPPFLAGS="$LAPACKINC $CPPFLAGS"
  9406. for ac_hdr in clapack.h
  9407. do
  9408. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9409. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9410. echo "configure:11751: checking for $ac_hdr" >&5
  9411. cat > conftest.$ac_ext <<EOF
  9412. #line 11754 "configure"
  9413. #include "confdefs.h"
  9414. #include <$ac_hdr>
  9415. EOF
  9416. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9417. { (eval echo configure:11759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9418. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9419. if test -z "$ac_err"; then
  9420. rm -rf conftest*
  9421. eval "ac_cv_header_$ac_safe=yes"
  9422. else
  9423. echo "$ac_err" >&5
  9424. echo "configure: failed program was:" >&5
  9425. cat conftest.$ac_ext >&5
  9426. rm -rf conftest*
  9427. eval "ac_cv_header_$ac_safe=no"
  9428. fi
  9429. rm -f conftest*
  9430. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9431. echo "$ac_t""yes" 1>&6
  9432. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9433. cat >> confdefs.h <<EOF
  9434. #define $ac_tr_hdr 1
  9435. EOF
  9436. else
  9437. echo "$ac_t""no" 1>&6
  9438. fi
  9439. done
  9440. CPPFLAGS="$save_CPPFLAGS"
  9441. # LAPACK linked to by default?
  9442. if test lapack_ok=no; then
  9443. save_LIBS="$LIBS"; LIBS="$LIBS $BLASLIB $MATHLIB $FLIBS"
  9444. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  9445. echo $ac_n "checking for dsegv_""... $ac_c" 1>&6
  9446. echo "configure:11791: checking for dsegv_" >&5
  9447. cat > conftest.$ac_ext <<EOF
  9448. #line 11794 "configure"
  9449. #include "confdefs.h"
  9450. /* System header to define __stub macros and hopefully few prototypes,
  9451. which can conflict with char dsegv_(); below. */
  9452. #include <assert.h>
  9453. /* Override any gcc2 internal prototype to avoid an error. */
  9454. /* We use char because int might match the return type of a gcc2
  9455. builtin and then its argument prototype would still apply. */
  9456. char dsegv_();
  9457. int main() {
  9458. /* The GNU C library defines this for functions which it implements
  9459. to always fail with ENOSYS. Some functions are actually named
  9460. something starting with __ and the normal name is an alias. */
  9461. #if defined (__stub_dsegv_) || defined (__stub___dsegv_)
  9462. choke me
  9463. #else
  9464. dsegv_();
  9465. #endif
  9466. ; return 0; }
  9467. EOF
  9468. if { (eval echo configure:11817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9469. rm -rf conftest*
  9470. eval "ac_cv_func_dsegv_=yes"
  9471. else
  9472. echo "configure: failed program was:" >&5
  9473. cat conftest.$ac_ext >&5
  9474. rm -rf conftest*
  9475. eval "ac_cv_func_dsegv_=no"
  9476. fi
  9477. rm -f conftest*
  9478. if eval "test \"`echo '$ac_cv_func_'dsegv_`\" = yes"; then
  9479. echo "$ac_t""yes" 1>&6
  9480. lapack_ok=yes
  9481. else
  9482. echo "$ac_t""no" 1>&6
  9483. fi
  9484. LIBS="$save_LIBS"
  9485. LDFLAGS="$save_LDFLAGS"
  9486. fi
  9487. # Generic LAPACK library?
  9488. if test $lapack_ok = no; then
  9489. save_libs="$LIBS"; LIBS="$BLASLIB $MATHLIB $LIBS"
  9490. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  9491. echo $ac_n "checking for desgv_ in -llapack""... $ac_c" 1>&6
  9492. echo "configure:11844: checking for desgv_ in -llapack" >&5
  9493. ac_lib_var=`echo lapack'_'desgv_ | sed 'y%./+-%__p_%'`
  9494. ac_save_LIBS="$LIBS"
  9495. LIBS="-llapack $FLIBS $LIBS"
  9496. cat > conftest.$ac_ext <<EOF
  9497. #line 11850 "configure"
  9498. #include "confdefs.h"
  9499. /* Override any gcc2 internal prototype to avoid an error. */
  9500. /* We use char because int might match the return type of a gcc2
  9501. builtin and then its argument prototype would still apply. */
  9502. char desgv_();
  9503. int main() {
  9504. desgv_()
  9505. ; return 0; }
  9506. EOF
  9507. if { (eval echo configure:11861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9508. rm -rf conftest*
  9509. eval "ac_cv_lib_$ac_lib_var=yes"
  9510. else
  9511. echo "configure: failed program was:" >&5
  9512. cat conftest.$ac_ext >&5
  9513. rm -rf conftest*
  9514. eval "ac_cv_lib_$ac_lib_var=no"
  9515. fi
  9516. rm -f conftest*
  9517. LIBS="$ac_save_LIBS"
  9518. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9519. echo "$ac_t""yes" 1>&6
  9520. lapack_ok=yes; LAPACKLIB="-llapack"
  9521. else
  9522. echo "$ac_t""no" 1>&6
  9523. fi
  9524. LIBS="$save_LIBS"
  9525. LDFLAGS="$save_LDFLAGS"
  9526. fi
  9527. if test $lapack_ok = no; then
  9528. ac_save_ldflags="$LDFLAGS"
  9529. LDFLAGS="$LAPACKLIB $LDFLAGS"
  9530. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  9531. echo "configure:11893: checking for dgesv_ in -llapack" >&5
  9532. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  9533. ac_save_LIBS="$LIBS"
  9534. LIBS="-llapack $BLASLIB $MATHLIB $LIBS"
  9535. cat > conftest.$ac_ext <<EOF
  9536. #line 11899 "configure"
  9537. #include "confdefs.h"
  9538. /* Override any gcc2 internal prototype to avoid an error. */
  9539. /* We use char because int might match the return type of a gcc2
  9540. builtin and then its argument prototype would still apply. */
  9541. char dgesv_();
  9542. int main() {
  9543. dgesv_()
  9544. ; return 0; }
  9545. EOF
  9546. if { (eval echo configure:11910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9547. rm -rf conftest*
  9548. eval "ac_cv_lib_$ac_lib_var=yes"
  9549. else
  9550. echo "configure: failed program was:" >&5
  9551. cat conftest.$ac_ext >&5
  9552. rm -rf conftest*
  9553. eval "ac_cv_lib_$ac_lib_var=no"
  9554. fi
  9555. rm -f conftest*
  9556. LIBS="$ac_save_LIBS"
  9557. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9558. echo "$ac_t""yes" 1>&6
  9559. LAPACKLIB="$LAPACKLIB -llapack "
  9560. else
  9561. echo "$ac_t""no" 1>&6
  9562. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  9563. echo "configure:11929: checking for dgesv_ in -llapack" >&5
  9564. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  9565. ac_save_LIBS="$LIBS"
  9566. LIBS="-llapack $BLASLIB $MATHLIB -lg2c $LIBS"
  9567. cat > conftest.$ac_ext <<EOF
  9568. #line 11935 "configure"
  9569. #include "confdefs.h"
  9570. /* Override any gcc2 internal prototype to avoid an error. */
  9571. /* We use char because int might match the return type of a gcc2
  9572. builtin and then its argument prototype would still apply. */
  9573. char dgesv_();
  9574. int main() {
  9575. dgesv_()
  9576. ; return 0; }
  9577. EOF
  9578. if { (eval echo configure:11946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9579. rm -rf conftest*
  9580. eval "ac_cv_lib_$ac_lib_var=yes"
  9581. else
  9582. echo "configure: failed program was:" >&5
  9583. cat conftest.$ac_ext >&5
  9584. rm -rf conftest*
  9585. eval "ac_cv_lib_$ac_lib_var=no"
  9586. fi
  9587. rm -f conftest*
  9588. LIBS="$ac_save_LIBS"
  9589. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9590. echo "$ac_t""yes" 1>&6
  9591. LAPACKLIB="$LAPACKLIB -llapack -lg2c"
  9592. else
  9593. echo "$ac_t""no" 1>&6
  9594. LDFLAGS=${ac_save_ldflags}
  9595. { echo "configure: error: *** Unable to locate LAPACK library." 1>&2; exit 1; }
  9596. fi
  9597. fi
  9598. LDFLAGS=${ac_save_ldflags}
  9599. fi
  9600. cat >> confdefs.h <<\EOF
  9601. #define HAVE_LIBLAPACK 1
  9602. EOF
  9603. fi # $USE_LAPACK
  9604. fi # $USE_BLAS
  9605. # Done checking LAPACK
  9606. # Enable Cairo display driver option
  9607. echo $ac_n "checking whether to use Cairo""... $ac_c" 1>&6
  9608. echo "configure:12002: checking whether to use Cairo" >&5
  9609. echo "$ac_t"""$with_cairo"" 1>&6
  9610. case "$with_cairo" in
  9611. "no") USE_CAIRO= ;;
  9612. "yes") USE_CAIRO="1" ;;
  9613. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9614. esac
  9615. CAIROINC=
  9616. CAIROLIB=
  9617. if test -n "$USE_CAIRO"; then
  9618. cairo="cairo"
  9619. pkgs="cairo-ft cairo-fc cairo-pdf cairo-ps cairo-svg fontconfig"
  9620. if test -n "$USE_X11"; then
  9621. pkgs="$pkgs cairo-xlib cairo-xlib-xrender"
  9622. fi
  9623. for pkg in $pkgs ; do
  9624. if $PKG_CONFIG --exists $pkg ; then
  9625. cairo="$cairo $pkg"
  9626. fi
  9627. done
  9628. # With Cairo includes directory
  9629. #FIXME: somehow quote dirs with spaces in $cairo ?
  9630. CAIROINC=`$PKG_CONFIG --cflags $cairo`
  9631. echo $ac_n "checking for location of cairo includes""... $ac_c" 1>&6
  9632. echo "configure:12034: checking for location of cairo includes" >&5
  9633. case "$with_cairo_includes" in
  9634. y | ye | yes | n | no)
  9635. { echo "configure: error: *** You must supply a directory to --with-cairo-includes." 1>&2; exit 1; }
  9636. ;;
  9637. esac
  9638. echo "$ac_t""$with_cairo_includes" 1>&6
  9639. if test -n "$with_cairo_includes" ; then
  9640. for dir in $with_cairo_includes; do
  9641. if test -d "$dir"; then
  9642. CAIROINC="$CAIROINC -I$dir"
  9643. else
  9644. { echo "configure: error: *** cairo includes directory $dir does not exist." 1>&2; exit 1; }
  9645. fi
  9646. done
  9647. fi
  9648. ac_save_cppflags="$CPPFLAGS"
  9649. CPPFLAGS="$CAIROINC $CPPFLAGS"
  9650. for ac_hdr in cairo.h
  9651. do
  9652. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9653. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9654. echo "configure:12060: checking for $ac_hdr" >&5
  9655. cat > conftest.$ac_ext <<EOF
  9656. #line 12063 "configure"
  9657. #include "confdefs.h"
  9658. #include <$ac_hdr>
  9659. EOF
  9660. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9661. { (eval echo configure:12068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9662. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9663. if test -z "$ac_err"; then
  9664. rm -rf conftest*
  9665. eval "ac_cv_header_$ac_safe=yes"
  9666. else
  9667. echo "$ac_err" >&5
  9668. echo "configure: failed program was:" >&5
  9669. cat conftest.$ac_ext >&5
  9670. rm -rf conftest*
  9671. eval "ac_cv_header_$ac_safe=no"
  9672. fi
  9673. rm -f conftest*
  9674. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9675. echo "$ac_t""yes" 1>&6
  9676. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9677. cat >> confdefs.h <<EOF
  9678. #define $ac_tr_hdr 1
  9679. EOF
  9680. else
  9681. echo "$ac_t""no" 1>&6
  9682. { echo "configure: error: *** Unable to locate Cairo includes." 1>&2; exit 1; }
  9683. fi
  9684. done
  9685. CPPFLAGS=$ac_save_cppflags
  9686. # With Cairo library directory
  9687. CAIROLIB=`$PKG_CONFIG --libs $cairo`
  9688. echo $ac_n "checking for location of cairo library""... $ac_c" 1>&6
  9689. echo "configure:12104: checking for location of cairo library" >&5
  9690. case "$with_cairo_libs" in
  9691. y | ye | yes | n | no)
  9692. { echo "configure: error: *** You must supply a directory to --with-cairo-libs." 1>&2; exit 1; }
  9693. ;;
  9694. esac
  9695. echo "$ac_t""$with_cairo_libs" 1>&6
  9696. if test -n "$with_cairo_libs"; then
  9697. for dir in $with_cairo_libs; do
  9698. if test -d "$dir"; then
  9699. CAIROLIB="$CAIROLIB -L$dir"
  9700. else
  9701. { echo "configure: error: *** cairo library directory $dir does not exist." 1>&2; exit 1; }
  9702. fi
  9703. done
  9704. fi
  9705. echo $ac_n "checking for cairo linking flags""... $ac_c" 1>&6
  9706. echo "configure:12124: checking for cairo linking flags" >&5
  9707. case "$with_cairo_ldflags" in
  9708. y | ye | yes | n | no)
  9709. { echo "configure: error: *** You must supply a directory to --with-cairo-ldflags." 1>&2; exit 1; }
  9710. ;;
  9711. esac
  9712. echo "$ac_t""$with_cairo_ldflags" 1>&6
  9713. CAIROLIB="$CAIROLIB $with_cairo_ldflags"
  9714. ac_save_libs="$LIBS"
  9715. ac_save_ldflags="$LDFLAGS"
  9716. LIBS=" $CAIROLIB $LIBS"
  9717. LDFLAGS=" $LDFLAGS"
  9718. echo $ac_n "checking for cairo_create""... $ac_c" 1>&6
  9719. echo "configure:12140: checking for cairo_create" >&5
  9720. cat > conftest.$ac_ext <<EOF
  9721. #line 12143 "configure"
  9722. #include "confdefs.h"
  9723. /* System header to define __stub macros and hopefully few prototypes,
  9724. which can conflict with char cairo_create(); below. */
  9725. #include <assert.h>
  9726. /* Override any gcc2 internal prototype to avoid an error. */
  9727. /* We use char because int might match the return type of a gcc2
  9728. builtin and then its argument prototype would still apply. */
  9729. char cairo_create();
  9730. int main() {
  9731. /* The GNU C library defines this for functions which it implements
  9732. to always fail with ENOSYS. Some functions are actually named
  9733. something starting with __ and the normal name is an alias. */
  9734. #if defined (__stub_cairo_create) || defined (__stub___cairo_create)
  9735. choke me
  9736. #else
  9737. cairo_create();
  9738. #endif
  9739. ; return 0; }
  9740. EOF
  9741. if { (eval echo configure:12166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9742. rm -rf conftest*
  9743. eval "ac_cv_func_cairo_create=yes"
  9744. else
  9745. echo "configure: failed program was:" >&5
  9746. cat conftest.$ac_ext >&5
  9747. rm -rf conftest*
  9748. eval "ac_cv_func_cairo_create=no"
  9749. fi
  9750. rm -f conftest*
  9751. if eval "test \"`echo '$ac_cv_func_'cairo_create`\" = yes"; then
  9752. echo "$ac_t""yes" 1>&6
  9753. :
  9754. else
  9755. echo "$ac_t""no" 1>&6
  9756. { echo "configure: error: *** Unable to locate cairo_create." 1>&2; exit 1; }
  9757. fi
  9758. LIBS=${ac_save_libs}
  9759. LDFLAGS=${ac_save_ldflags}
  9760. ac_save_libs="$LIBS"
  9761. ac_save_ldflags="$LDFLAGS"
  9762. LIBS=" $CAIROLIB $LIBS"
  9763. LDFLAGS=" $LDFLAGS"
  9764. echo $ac_n "checking for cairo_xlib_surface_create_with_xrender_format""... $ac_c" 1>&6
  9765. echo "configure:12200: checking for cairo_xlib_surface_create_with_xrender_format" >&5
  9766. cat > conftest.$ac_ext <<EOF
  9767. #line 12203 "configure"
  9768. #include "confdefs.h"
  9769. /* System header to define __stub macros and hopefully few prototypes,
  9770. which can conflict with char cairo_xlib_surface_create_with_xrender_format(); below. */
  9771. #include <assert.h>
  9772. /* Override any gcc2 internal prototype to avoid an error. */
  9773. /* We use char because int might match the return type of a gcc2
  9774. builtin and then its argument prototype would still apply. */
  9775. char cairo_xlib_surface_create_with_xrender_format();
  9776. int main() {
  9777. /* The GNU C library defines this for functions which it implements
  9778. to always fail with ENOSYS. Some functions are actually named
  9779. something starting with __ and the normal name is an alias. */
  9780. #if defined (__stub_cairo_xlib_surface_create_with_xrender_format) || defined (__stub___cairo_xlib_surface_create_with_xrender_format)
  9781. choke me
  9782. #else
  9783. cairo_xlib_surface_create_with_xrender_format();
  9784. #endif
  9785. ; return 0; }
  9786. EOF
  9787. if { (eval echo configure:12226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9788. rm -rf conftest*
  9789. eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=yes"
  9790. else
  9791. echo "configure: failed program was:" >&5
  9792. cat conftest.$ac_ext >&5
  9793. rm -rf conftest*
  9794. eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=no"
  9795. fi
  9796. rm -f conftest*
  9797. if eval "test \"`echo '$ac_cv_func_'cairo_xlib_surface_create_with_xrender_format`\" = yes"; then
  9798. echo "$ac_t""yes" 1>&6
  9799. CAIRO_HAS_XRENDER=1
  9800. else
  9801. echo "$ac_t""no" 1>&6
  9802. CAIRO_HAS_XRENDER=
  9803. fi
  9804. LIBS=${ac_save_libs}
  9805. LDFLAGS=${ac_save_ldflags}
  9806. ac_save_libs="$LIBS"
  9807. ac_save_ldflags="$LDFLAGS"
  9808. LIBS=" $CAIROLIB $LIBS"
  9809. LDFLAGS=" $LDFLAGS"
  9810. echo $ac_n "checking for cairo_xlib_surface_get_xrender_format""... $ac_c" 1>&6
  9811. echo "configure:12259: checking for cairo_xlib_surface_get_xrender_format" >&5
  9812. cat > conftest.$ac_ext <<EOF
  9813. #line 12262 "configure"
  9814. #include "confdefs.h"
  9815. /* System header to define __stub macros and hopefully few prototypes,
  9816. which can conflict with char cairo_xlib_surface_get_xrender_format(); below. */
  9817. #include <assert.h>
  9818. /* Override any gcc2 internal prototype to avoid an error. */
  9819. /* We use char because int might match the return type of a gcc2
  9820. builtin and then its argument prototype would still apply. */
  9821. char cairo_xlib_surface_get_xrender_format();
  9822. int main() {
  9823. /* The GNU C library defines this for functions which it implements
  9824. to always fail with ENOSYS. Some functions are actually named
  9825. something starting with __ and the normal name is an alias. */
  9826. #if defined (__stub_cairo_xlib_surface_get_xrender_format) || defined (__stub___cairo_xlib_surface_get_xrender_format)
  9827. choke me
  9828. #else
  9829. cairo_xlib_surface_get_xrender_format();
  9830. #endif
  9831. ; return 0; }
  9832. EOF
  9833. if { (eval echo configure:12285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9834. rm -rf conftest*
  9835. eval "ac_cv_func_cairo_xlib_surface_get_xrender_format=yes"
  9836. else
  9837. echo "configure: failed program was:" >&5
  9838. cat conftest.$ac_ext >&5
  9839. rm -rf conftest*
  9840. eval "ac_cv_func_cairo_xlib_surface_get_xrender_format=no"
  9841. fi
  9842. rm -f conftest*
  9843. if eval "test \"`echo '$ac_cv_func_'cairo_xlib_surface_get_xrender_format`\" = yes"; then
  9844. echo "$ac_t""yes" 1>&6
  9845. CAIRO_HAS_XRENDER_SURFACE=1
  9846. else
  9847. echo "$ac_t""no" 1>&6
  9848. CAIRO_HAS_XRENDER_SURFACE=
  9849. fi
  9850. LIBS=${ac_save_libs}
  9851. LDFLAGS=${ac_save_ldflags}
  9852. CAIROLIB="$CAIROLIB $CAIROLDFLAGS"
  9853. fi # $USE_CAIRO
  9854. # Done checking Cairo
  9855. # Enable FreeType option
  9856. echo $ac_n "checking whether to use FreeType""... $ac_c" 1>&6
  9857. echo "configure:12327: checking whether to use FreeType" >&5
  9858. echo "$ac_t"""$with_freetype"" 1>&6
  9859. case "$with_freetype" in
  9860. "no") USE_FREETYPE= ;;
  9861. "yes") USE_FREETYPE="1" ;;
  9862. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9863. esac
  9864. FTINC=
  9865. FTLIB=
  9866. if test -n "$USE_FREETYPE"; then
  9867. # With FreeType includes directory
  9868. echo $ac_n "checking for location of FreeType includes""... $ac_c" 1>&6
  9869. echo "configure:12346: checking for location of FreeType includes" >&5
  9870. case "$with_freetype_includes" in
  9871. y | ye | yes | n | no)
  9872. { echo "configure: error: *** You must supply a directory to --with-freetype-includes." 1>&2; exit 1; }
  9873. ;;
  9874. esac
  9875. echo "$ac_t""$with_freetype_includes" 1>&6
  9876. if test -n "$with_freetype_includes" ; then
  9877. for dir in $with_freetype_includes; do
  9878. if test -d "$dir"; then
  9879. FTINC="$FTINC -I$dir"
  9880. else
  9881. { echo "configure: error: *** FreeType includes directory $dir does not exist." 1>&2; exit 1; }
  9882. fi
  9883. done
  9884. fi
  9885. ac_save_cppflags="$CPPFLAGS"
  9886. CPPFLAGS="$FTINC $CPPFLAGS"
  9887. for ac_hdr in ft2build.h
  9888. do
  9889. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9890. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9891. echo "configure:12372: checking for $ac_hdr" >&5
  9892. cat > conftest.$ac_ext <<EOF
  9893. #line 12375 "configure"
  9894. #include "confdefs.h"
  9895. #include <$ac_hdr>
  9896. EOF
  9897. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9898. { (eval echo configure:12380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9899. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9900. if test -z "$ac_err"; then
  9901. rm -rf conftest*
  9902. eval "ac_cv_header_$ac_safe=yes"
  9903. else
  9904. echo "$ac_err" >&5
  9905. echo "configure: failed program was:" >&5
  9906. cat conftest.$ac_ext >&5
  9907. rm -rf conftest*
  9908. eval "ac_cv_header_$ac_safe=no"
  9909. fi
  9910. rm -f conftest*
  9911. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9912. echo "$ac_t""yes" 1>&6
  9913. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9914. cat >> confdefs.h <<EOF
  9915. #define $ac_tr_hdr 1
  9916. EOF
  9917. else
  9918. echo "$ac_t""no" 1>&6
  9919. { echo "configure: error: *** Unable to locate FreeType includes." 1>&2; exit 1; }
  9920. fi
  9921. done
  9922. CPPFLAGS=$ac_save_cppflags
  9923. # With FreeType library directory
  9924. echo $ac_n "checking for location of FreeType library""... $ac_c" 1>&6
  9925. echo "configure:12414: checking for location of FreeType library" >&5
  9926. case "$with_freetype_libs" in
  9927. y | ye | yes | n | no)
  9928. { echo "configure: error: *** You must supply a directory to --with-freetype-libs." 1>&2; exit 1; }
  9929. ;;
  9930. esac
  9931. echo "$ac_t""$with_freetype_libs" 1>&6
  9932. if test -n "$with_freetype_libs"; then
  9933. for dir in $with_freetype_libs; do
  9934. if test -d "$dir"; then
  9935. FTLIB="$FTLIB -L$dir"
  9936. else
  9937. { echo "configure: error: *** FreeType library directory $dir does not exist." 1>&2; exit 1; }
  9938. fi
  9939. done
  9940. fi
  9941. ac_save_ldflags="$LDFLAGS"
  9942. LDFLAGS="$FTLIB $LDFLAGS"
  9943. echo $ac_n "checking for FT_Init_FreeType in -lfreetype""... $ac_c" 1>&6
  9944. echo "configure:12439: checking for FT_Init_FreeType in -lfreetype" >&5
  9945. ac_lib_var=`echo freetype'_'FT_Init_FreeType | sed 'y%./+-%__p_%'`
  9946. ac_save_LIBS="$LIBS"
  9947. LIBS="-lfreetype $LIBS"
  9948. cat > conftest.$ac_ext <<EOF
  9949. #line 12445 "configure"
  9950. #include "confdefs.h"
  9951. /* Override any gcc2 internal prototype to avoid an error. */
  9952. /* We use char because int might match the return type of a gcc2
  9953. builtin and then its argument prototype would still apply. */
  9954. char FT_Init_FreeType();
  9955. int main() {
  9956. FT_Init_FreeType()
  9957. ; return 0; }
  9958. EOF
  9959. if { (eval echo configure:12456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9960. rm -rf conftest*
  9961. eval "ac_cv_lib_$ac_lib_var=yes"
  9962. else
  9963. echo "configure: failed program was:" >&5
  9964. cat conftest.$ac_ext >&5
  9965. rm -rf conftest*
  9966. eval "ac_cv_lib_$ac_lib_var=no"
  9967. fi
  9968. rm -f conftest*
  9969. LIBS="$ac_save_LIBS"
  9970. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9971. echo "$ac_t""yes" 1>&6
  9972. FTLIB="$FTLIB -lfreetype "
  9973. else
  9974. echo "$ac_t""no" 1>&6
  9975. LDFLAGS=${ac_save_ldflags}
  9976. { echo "configure: error: *** Unable to locate FreeType library." 1>&2; exit 1; }
  9977. fi
  9978. LDFLAGS=${ac_save_ldflags}
  9979. fi # $USE_FREETYPE
  9980. # Done checking FreeType
  9981. # Enable NLS option
  9982. echo $ac_n "checking whether to use NLS""... $ac_c" 1>&6
  9983. echo "configure:12497: checking whether to use NLS" >&5
  9984. echo "$ac_t"""$with_nls"" 1>&6
  9985. case "$with_nls" in
  9986. "no") USE_NLS= ;;
  9987. "yes") USE_NLS="1" ;;
  9988. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9989. esac
  9990. INTLLIB=
  9991. HAVE_NLS=
  9992. if test -n "${USE_NLS}" ; then
  9993. cat >> confdefs.h <<\EOF
  9994. #define USE_NLS 1
  9995. EOF
  9996. echo $ac_n "checking for gettext""... $ac_c" 1>&6
  9997. echo "configure:12517: checking for gettext" >&5
  9998. cat > conftest.$ac_ext <<EOF
  9999. #line 12520 "configure"
  10000. #include "confdefs.h"
  10001. /* System header to define __stub macros and hopefully few prototypes,
  10002. which can conflict with char gettext(); below. */
  10003. #include <assert.h>
  10004. /* Override any gcc2 internal prototype to avoid an error. */
  10005. /* We use char because int might match the return type of a gcc2
  10006. builtin and then its argument prototype would still apply. */
  10007. char gettext();
  10008. int main() {
  10009. /* The GNU C library defines this for functions which it implements
  10010. to always fail with ENOSYS. Some functions are actually named
  10011. something starting with __ and the normal name is an alias. */
  10012. #if defined (__stub_gettext) || defined (__stub___gettext)
  10013. choke me
  10014. #else
  10015. gettext();
  10016. #endif
  10017. ; return 0; }
  10018. EOF
  10019. if { (eval echo configure:12543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10020. rm -rf conftest*
  10021. eval "ac_cv_func_gettext=yes"
  10022. else
  10023. echo "configure: failed program was:" >&5
  10024. cat conftest.$ac_ext >&5
  10025. rm -rf conftest*
  10026. eval "ac_cv_func_gettext=no"
  10027. fi
  10028. rm -f conftest*
  10029. if eval "test \"`echo '$ac_cv_func_'gettext`\" = yes"; then
  10030. echo "$ac_t""yes" 1>&6
  10031. INTLLIB=
  10032. else
  10033. echo "$ac_t""no" 1>&6
  10034. echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
  10035. echo "configure:12561: checking for gettext in -lintl" >&5
  10036. ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
  10037. ac_save_LIBS="$LIBS"
  10038. LIBS="-lintl $LIBS"
  10039. cat > conftest.$ac_ext <<EOF
  10040. #line 12567 "configure"
  10041. #include "confdefs.h"
  10042. /* Override any gcc2 internal prototype to avoid an error. */
  10043. /* We use char because int might match the return type of a gcc2
  10044. builtin and then its argument prototype would still apply. */
  10045. char gettext();
  10046. int main() {
  10047. gettext()
  10048. ; return 0; }
  10049. EOF
  10050. if { (eval echo configure:12578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10051. rm -rf conftest*
  10052. eval "ac_cv_lib_$ac_lib_var=yes"
  10053. else
  10054. echo "configure: failed program was:" >&5
  10055. cat conftest.$ac_ext >&5
  10056. rm -rf conftest*
  10057. eval "ac_cv_lib_$ac_lib_var=no"
  10058. fi
  10059. rm -f conftest*
  10060. LIBS="$ac_save_LIBS"
  10061. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10062. echo "$ac_t""yes" 1>&6
  10063. INTLLIB=-lintl
  10064. else
  10065. echo "$ac_t""no" 1>&6
  10066. { echo "configure: error: *** Unable to locate gettext() function." 1>&2; exit 1; }
  10067. fi
  10068. fi
  10069. HAVE_NLS=1
  10070. fi
  10071. # Enable C++ option
  10072. echo $ac_n "checking whether to use C++""... $ac_c" 1>&6
  10073. echo "configure:12613: checking whether to use C++" >&5
  10074. echo "$ac_t"""$with_cxx"" 1>&6
  10075. case "$with_cxx" in
  10076. "no") USE_CXX= ;;
  10077. "yes") USE_CXX="1" ;;
  10078. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10079. esac
  10080. if test -n "$USE_CXX"; then
  10081. for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
  10082. do
  10083. # Extract the first word of "$ac_prog", so it can be a program name with args.
  10084. set dummy $ac_prog; ac_word=$2
  10085. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  10086. echo "configure:12629: checking for $ac_word" >&5
  10087. if test -n "$CXX"; then
  10088. ac_cv_prog_CXX="$CXX" # Let the user override the test.
  10089. else
  10090. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  10091. ac_dummy="$PATH"
  10092. for ac_dir in $ac_dummy; do
  10093. test -z "$ac_dir" && ac_dir=.
  10094. if test -f $ac_dir/$ac_word; then
  10095. ac_cv_prog_CXX="$ac_prog"
  10096. break
  10097. fi
  10098. done
  10099. IFS="$ac_save_ifs"
  10100. fi
  10101. CXX="$ac_cv_prog_CXX"
  10102. if test -n "$CXX"; then
  10103. echo "$ac_t""$CXX" 1>&6
  10104. else
  10105. echo "$ac_t""no" 1>&6
  10106. fi
  10107. test -n "$CXX" && break
  10108. done
  10109. test -n "$CXX" || CXX="gcc"
  10110. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  10111. echo "configure:12658: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
  10112. ac_ext=C
  10113. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  10114. ac_cpp='$CXXCPP $CPPFLAGS'
  10115. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  10116. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  10117. cross_compiling=$ac_cv_prog_cxx_cross
  10118. cat > conftest.$ac_ext << EOF
  10119. #line 12669 "configure"
  10120. #include "confdefs.h"
  10121. int main(){return(0);}
  10122. EOF
  10123. if { (eval echo configure:12674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10124. ac_cv_prog_cxx_works=yes
  10125. # If we can't run a trivial program, we are probably using a cross compiler.
  10126. if (./conftest; exit) 2>/dev/null; then
  10127. ac_cv_prog_cxx_cross=no
  10128. else
  10129. ac_cv_prog_cxx_cross=yes
  10130. fi
  10131. else
  10132. echo "configure: failed program was:" >&5
  10133. cat conftest.$ac_ext >&5
  10134. ac_cv_prog_cxx_works=no
  10135. fi
  10136. rm -fr conftest*
  10137. ac_ext=c
  10138. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  10139. ac_cpp='$CPP $CPPFLAGS'
  10140. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  10141. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  10142. cross_compiling=$ac_cv_prog_cc_cross
  10143. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  10144. if test $ac_cv_prog_cxx_works = no; then
  10145. { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
  10146. fi
  10147. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  10148. echo "configure:12700: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  10149. echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
  10150. cross_compiling=$ac_cv_prog_cxx_cross
  10151. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  10152. echo "configure:12705: checking whether we are using GNU C++" >&5
  10153. cat > conftest.C <<EOF
  10154. #ifdef __GNUC__
  10155. yes;
  10156. #endif
  10157. EOF
  10158. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:12712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  10159. ac_cv_prog_gxx=yes
  10160. else
  10161. ac_cv_prog_gxx=no
  10162. fi
  10163. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  10164. if test $ac_cv_prog_gxx = yes; then
  10165. GXX=yes
  10166. else
  10167. GXX=
  10168. fi
  10169. ac_test_CXXFLAGS="${CXXFLAGS+set}"
  10170. ac_save_CXXFLAGS="$CXXFLAGS"
  10171. CXXFLAGS=
  10172. echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  10173. echo "configure:12730: checking whether ${CXX-g++} accepts -g" >&5
  10174. echo 'void f(){}' > conftest.cc
  10175. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  10176. ac_cv_prog_cxx_g=yes
  10177. else
  10178. ac_cv_prog_cxx_g=no
  10179. fi
  10180. rm -f conftest*
  10181. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  10182. if test "$ac_test_CXXFLAGS" = set; then
  10183. CXXFLAGS="$ac_save_CXXFLAGS"
  10184. elif test $ac_cv_prog_cxx_g = yes; then
  10185. if test "$GXX" = yes; then
  10186. CXXFLAGS="-g -O2"
  10187. else
  10188. CXXFLAGS="-g"
  10189. fi
  10190. else
  10191. if test "$GXX" = yes; then
  10192. CXXFLAGS="-O2"
  10193. else
  10194. CXXFLAGS=
  10195. fi
  10196. fi
  10197. for ac_declaration in \
  10198. ''\
  10199. '#include <stdlib.h>' \
  10200. 'extern "C" void std::exit (int) throw (); using std::exit;' \
  10201. 'extern "C" void std::exit (int); using std::exit;' \
  10202. 'extern "C" void exit (int) throw ();' \
  10203. 'extern "C" void exit (int);' \
  10204. 'void exit (int);'
  10205. do
  10206. cat > conftest.$ac_ext <<EOF
  10207. #line 12768 "configure"
  10208. #include "confdefs.h"
  10209. #include <stdlib.h>
  10210. $ac_declaration
  10211. int main() {
  10212. exit (42);
  10213. ; return 0; }
  10214. EOF
  10215. if { (eval echo configure:12776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10216. :
  10217. else
  10218. echo "configure: failed program was:" >&5
  10219. cat conftest.$ac_ext >&5
  10220. rm -rf conftest*
  10221. continue
  10222. fi
  10223. rm -f conftest*
  10224. cat > conftest.$ac_ext <<EOF
  10225. #line 12786 "configure"
  10226. #include "confdefs.h"
  10227. $ac_declaration
  10228. int main() {
  10229. exit (42);
  10230. ; return 0; }
  10231. EOF
  10232. if { (eval echo configure:12793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10233. rm -rf conftest*
  10234. break
  10235. else
  10236. echo "configure: failed program was:" >&5
  10237. cat conftest.$ac_ext >&5
  10238. fi
  10239. rm -f conftest*
  10240. done
  10241. if test -n "$ac_declaration"; then
  10242. echo '#ifdef __cplusplus' >>confdefs.h
  10243. echo $ac_declaration >>confdefs.h
  10244. echo '#endif' >>confdefs.h
  10245. fi
  10246. else
  10247. CXX=
  10248. CXXFLAGS=
  10249. fi
  10250. # Done checking C++
  10251. # Enable openDWG option
  10252. echo $ac_n "checking whether to use openDWG""... $ac_c" 1>&6
  10253. echo "configure:12822: checking whether to use openDWG" >&5
  10254. echo "$ac_t"""$with_opendwg"" 1>&6
  10255. case "$with_opendwg" in
  10256. "no") USE_OPENDWG= ;;
  10257. "yes") USE_OPENDWG="1" ;;
  10258. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10259. esac
  10260. OPENDWGINCPATH=
  10261. OPENDWGLIBPATH=
  10262. OPENDWGLIB=
  10263. if test -n "${USE_OPENDWG}"; then
  10264. # With OPENDWG includes directory
  10265. echo $ac_n "checking for location of openDGW includes""... $ac_c" 1>&6
  10266. echo "configure:12842: checking for location of openDGW includes" >&5
  10267. case "$with_opendwg_includes" in
  10268. y | ye | yes | n | no)
  10269. { echo "configure: error: *** You must supply a directory to --with-opendwg-includes." 1>&2; exit 1; }
  10270. ;;
  10271. esac
  10272. echo "$ac_t""$with_opendwg_includes" 1>&6
  10273. if test -n "$with_opendwg_includes" ; then
  10274. for dir in $with_opendwg_includes; do
  10275. if test -d "$dir"; then
  10276. OPENDWGINCPATH="$OPENDWGINCPATH -I$dir"
  10277. else
  10278. { echo "configure: error: *** openDGW includes directory $dir does not exist." 1>&2; exit 1; }
  10279. fi
  10280. done
  10281. fi
  10282. ac_save_cppflags="$CPPFLAGS"
  10283. CPPFLAGS="$OPENDWGINCPATH $CPPFLAGS"
  10284. for ac_hdr in ad2.h
  10285. do
  10286. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10287. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10288. echo "configure:12868: checking for $ac_hdr" >&5
  10289. cat > conftest.$ac_ext <<EOF
  10290. #line 12871 "configure"
  10291. #include "confdefs.h"
  10292. #include <$ac_hdr>
  10293. EOF
  10294. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10295. { (eval echo configure:12876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10296. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10297. if test -z "$ac_err"; then
  10298. rm -rf conftest*
  10299. eval "ac_cv_header_$ac_safe=yes"
  10300. else
  10301. echo "$ac_err" >&5
  10302. echo "configure: failed program was:" >&5
  10303. cat conftest.$ac_ext >&5
  10304. rm -rf conftest*
  10305. eval "ac_cv_header_$ac_safe=no"
  10306. fi
  10307. rm -f conftest*
  10308. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10309. echo "$ac_t""yes" 1>&6
  10310. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10311. cat >> confdefs.h <<EOF
  10312. #define $ac_tr_hdr 1
  10313. EOF
  10314. else
  10315. echo "$ac_t""no" 1>&6
  10316. { echo "configure: error: *** Unable to locate openDWG includes." 1>&2; exit 1; }
  10317. fi
  10318. done
  10319. CPPFLAGS=$ac_save_cppflags
  10320. # With OPENDWG library directory
  10321. echo $ac_n "checking for location of openDWG library""... $ac_c" 1>&6
  10322. echo "configure:12910: checking for location of openDWG library" >&5
  10323. case "$with_opendwg_libs" in
  10324. y | ye | yes | n | no)
  10325. { echo "configure: error: *** You must supply a directory to --with-opendwg-libs." 1>&2; exit 1; }
  10326. ;;
  10327. esac
  10328. echo "$ac_t""$with_opendwg_libs" 1>&6
  10329. if test -n "$with_opendwg_libs"; then
  10330. for dir in $with_opendwg_libs; do
  10331. if test -d "$dir"; then
  10332. OPENDWGLIBPATH="$OPENDWGLIBPATH -L$dir"
  10333. else
  10334. { echo "configure: error: *** openDWG library directory $dir does not exist." 1>&2; exit 1; }
  10335. fi
  10336. done
  10337. fi
  10338. #search for ad2.a, ad3.a ... in openDWG toolkit directory:
  10339. #FIX ME how to program this test??
  10340. #LOC_CHECK_LIBS(ad?.a,adSeekLayer,openDWG,$OPENDWGLIBPATH,OPENDWGLIB,,)
  10341. #
  10342. #for now hack (but working):
  10343. TRUEOPENDWGLIBPATH=`echo "$OPENDWGLIBPATH" | cut -b3-`
  10344. adlib=`ls -1 "$TRUEOPENDWGLIBPATH"/ad?.a | tail -1`
  10345. OPENDWGLIB="$adlib"
  10346. fi # $USE_OPENDWG
  10347. # Done checking OPENDWG
  10348. # Enable pthread option
  10349. echo $ac_n "checking whether to use POSIX threads""... $ac_c" 1>&6
  10350. echo "configure:12951: checking whether to use POSIX threads" >&5
  10351. echo "$ac_t"""$with_pthread"" 1>&6
  10352. case "$with_pthread" in
  10353. "no") USE_PTHREAD= ;;
  10354. "yes") USE_PTHREAD="1" ;;
  10355. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10356. esac
  10357. PTHREADINCPATH=
  10358. PTHREADLIBPATH=
  10359. PTHREADLIB=
  10360. if test -n "$USE_PTHREAD"; then
  10361. # With pthread includes directory
  10362. echo $ac_n "checking for location of POSIX threads includes""... $ac_c" 1>&6
  10363. echo "configure:12971: checking for location of POSIX threads includes" >&5
  10364. case "$with_pthread_includes" in
  10365. y | ye | yes | n | no)
  10366. { echo "configure: error: *** You must supply a directory to --with-pthread-includes." 1>&2; exit 1; }
  10367. ;;
  10368. esac
  10369. echo "$ac_t""$with_pthread_includes" 1>&6
  10370. if test -n "$with_pthread_includes" ; then
  10371. for dir in $with_pthread_includes; do
  10372. if test -d "$dir"; then
  10373. PTHREADINCPATH="$PTHREADINCPATH -I$dir"
  10374. else
  10375. { echo "configure: error: *** POSIX threads includes directory $dir does not exist." 1>&2; exit 1; }
  10376. fi
  10377. done
  10378. fi
  10379. ac_save_cppflags="$CPPFLAGS"
  10380. CPPFLAGS="$PTHREADINCPATH $CPPFLAGS"
  10381. for ac_hdr in pthread.h
  10382. do
  10383. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10384. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10385. echo "configure:12997: checking for $ac_hdr" >&5
  10386. cat > conftest.$ac_ext <<EOF
  10387. #line 13000 "configure"
  10388. #include "confdefs.h"
  10389. #include <$ac_hdr>
  10390. EOF
  10391. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10392. { (eval echo configure:13005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10393. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10394. if test -z "$ac_err"; then
  10395. rm -rf conftest*
  10396. eval "ac_cv_header_$ac_safe=yes"
  10397. else
  10398. echo "$ac_err" >&5
  10399. echo "configure: failed program was:" >&5
  10400. cat conftest.$ac_ext >&5
  10401. rm -rf conftest*
  10402. eval "ac_cv_header_$ac_safe=no"
  10403. fi
  10404. rm -f conftest*
  10405. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10406. echo "$ac_t""yes" 1>&6
  10407. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10408. cat >> confdefs.h <<EOF
  10409. #define $ac_tr_hdr 1
  10410. EOF
  10411. else
  10412. echo "$ac_t""no" 1>&6
  10413. { echo "configure: error: *** Unable to locate POSIX threads includes." 1>&2; exit 1; }
  10414. fi
  10415. done
  10416. CPPFLAGS=$ac_save_cppflags
  10417. # With pthread library directory
  10418. echo $ac_n "checking for location of POSIX threads library""... $ac_c" 1>&6
  10419. echo "configure:13039: checking for location of POSIX threads library" >&5
  10420. case "$with_pthread_libs" in
  10421. y | ye | yes | n | no)
  10422. { echo "configure: error: *** You must supply a directory to --with-pthread-libs." 1>&2; exit 1; }
  10423. ;;
  10424. esac
  10425. echo "$ac_t""$with_pthread_libs" 1>&6
  10426. if test -n "$with_pthread_libs"; then
  10427. for dir in $with_pthread_libs; do
  10428. if test -d "$dir"; then
  10429. PTHREADLIBPATH="$PTHREADLIBPATH -L$dir"
  10430. else
  10431. { echo "configure: error: *** POSIX threads library directory $dir does not exist." 1>&2; exit 1; }
  10432. fi
  10433. done
  10434. fi
  10435. ac_save_libs="$LIBS"
  10436. ac_save_ldflags="$LDFLAGS"
  10437. LIBS=" $LIBS"
  10438. LDFLAGS=" $LDFLAGS"
  10439. echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
  10440. echo "configure:13064: checking for pthread_create" >&5
  10441. cat > conftest.$ac_ext <<EOF
  10442. #line 13067 "configure"
  10443. #include "confdefs.h"
  10444. /* System header to define __stub macros and hopefully few prototypes,
  10445. which can conflict with char pthread_create(); below. */
  10446. #include <assert.h>
  10447. /* Override any gcc2 internal prototype to avoid an error. */
  10448. /* We use char because int might match the return type of a gcc2
  10449. builtin and then its argument prototype would still apply. */
  10450. char pthread_create();
  10451. int main() {
  10452. /* The GNU C library defines this for functions which it implements
  10453. to always fail with ENOSYS. Some functions are actually named
  10454. something starting with __ and the normal name is an alias. */
  10455. #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
  10456. choke me
  10457. #else
  10458. pthread_create();
  10459. #endif
  10460. ; return 0; }
  10461. EOF
  10462. if { (eval echo configure:13090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10463. rm -rf conftest*
  10464. eval "ac_cv_func_pthread_create=yes"
  10465. else
  10466. echo "configure: failed program was:" >&5
  10467. cat conftest.$ac_ext >&5
  10468. rm -rf conftest*
  10469. eval "ac_cv_func_pthread_create=no"
  10470. fi
  10471. rm -f conftest*
  10472. if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
  10473. echo "$ac_t""yes" 1>&6
  10474. PTHREADLIB="$PTHREADLIB "
  10475. else
  10476. echo "$ac_t""no" 1>&6
  10477. ac_save_ldflags="$LDFLAGS"
  10478. LDFLAGS="$PTHREADLIBPATH $LDFLAGS"
  10479. echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
  10480. echo "configure:13117: checking for pthread_create in -lpthread" >&5
  10481. ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
  10482. ac_save_LIBS="$LIBS"
  10483. LIBS="-lpthread $LIBS"
  10484. cat > conftest.$ac_ext <<EOF
  10485. #line 13123 "configure"
  10486. #include "confdefs.h"
  10487. /* Override any gcc2 internal prototype to avoid an error. */
  10488. /* We use char because int might match the return type of a gcc2
  10489. builtin and then its argument prototype would still apply. */
  10490. char pthread_create();
  10491. int main() {
  10492. pthread_create()
  10493. ; return 0; }
  10494. EOF
  10495. if { (eval echo configure:13134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10496. rm -rf conftest*
  10497. eval "ac_cv_lib_$ac_lib_var=yes"
  10498. else
  10499. echo "configure: failed program was:" >&5
  10500. cat conftest.$ac_ext >&5
  10501. rm -rf conftest*
  10502. eval "ac_cv_lib_$ac_lib_var=no"
  10503. fi
  10504. rm -f conftest*
  10505. LIBS="$ac_save_LIBS"
  10506. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10507. echo "$ac_t""yes" 1>&6
  10508. PTHREADLIB="$PTHREADLIB -lpthread "
  10509. else
  10510. echo "$ac_t""no" 1>&6
  10511. LDFLAGS=${ac_save_ldflags}
  10512. { echo "configure: error: *** Unable to locate POSIX threads library." 1>&2; exit 1; }
  10513. fi
  10514. LDFLAGS=${ac_save_ldflags}
  10515. fi
  10516. LIBS=${ac_save_libs}
  10517. LDFLAGS=${ac_save_ldflags}
  10518. fi # $USE_PTHREAD
  10519. # Done checking pthread
  10520. # Enable OpenMP option
  10521. echo $ac_n "checking whether to use OpenMP""... $ac_c" 1>&6
  10522. echo "configure:13184: checking whether to use OpenMP" >&5
  10523. echo "$ac_t"""$with_openmp"" 1>&6
  10524. case "$with_openmp" in
  10525. "no") USE_OPENMP= ;;
  10526. "yes") USE_OPENMP="1" ;;
  10527. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10528. esac
  10529. OMPINCPATH=
  10530. OMPLIBPATH=
  10531. OMPLIB=
  10532. OMPCFLAGS=
  10533. if test -n "$USE_OPENMP"; then
  10534. # With OpenMP includes directory
  10535. echo $ac_n "checking for location of OpenMP includes""... $ac_c" 1>&6
  10536. echo "configure:13205: checking for location of OpenMP includes" >&5
  10537. case "$with_openmp_includes" in
  10538. y | ye | yes | n | no)
  10539. { echo "configure: error: *** You must supply a directory to --with-openmp-includes." 1>&2; exit 1; }
  10540. ;;
  10541. esac
  10542. echo "$ac_t""$with_openmp_includes" 1>&6
  10543. if test -n "$with_openmp_includes" ; then
  10544. for dir in $with_openmp_includes; do
  10545. if test -d "$dir"; then
  10546. OMPINCPATH="$OMPINCPATH -I$dir"
  10547. else
  10548. { echo "configure: error: *** OpenMP includes directory $dir does not exist." 1>&2; exit 1; }
  10549. fi
  10550. done
  10551. fi
  10552. ac_save_cppflags="$CPPFLAGS"
  10553. CPPFLAGS="$OMPINCPATH $CPPFLAGS"
  10554. for ac_hdr in omp.h
  10555. do
  10556. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10557. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10558. echo "configure:13231: checking for $ac_hdr" >&5
  10559. cat > conftest.$ac_ext <<EOF
  10560. #line 13234 "configure"
  10561. #include "confdefs.h"
  10562. #include <$ac_hdr>
  10563. EOF
  10564. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10565. { (eval echo configure:13239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10566. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10567. if test -z "$ac_err"; then
  10568. rm -rf conftest*
  10569. eval "ac_cv_header_$ac_safe=yes"
  10570. else
  10571. echo "$ac_err" >&5
  10572. echo "configure: failed program was:" >&5
  10573. cat conftest.$ac_ext >&5
  10574. rm -rf conftest*
  10575. eval "ac_cv_header_$ac_safe=no"
  10576. fi
  10577. rm -f conftest*
  10578. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10579. echo "$ac_t""yes" 1>&6
  10580. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10581. cat >> confdefs.h <<EOF
  10582. #define $ac_tr_hdr 1
  10583. EOF
  10584. else
  10585. echo "$ac_t""no" 1>&6
  10586. { echo "configure: error: *** Unable to locate OpenMP includes." 1>&2; exit 1; }
  10587. fi
  10588. done
  10589. CPPFLAGS=$ac_save_cppflags
  10590. # With OpenMP library directory
  10591. # GCC et al.: -lgomp
  10592. # Solaris cc: -lmtsk
  10593. # AIX xlc: -lxlsmp
  10594. # SGI IRIX 6.5 MIPSpro C/C++: -lmp
  10595. echo $ac_n "checking for location of OpenMP library""... $ac_c" 1>&6
  10596. echo "configure:13277: checking for location of OpenMP library" >&5
  10597. case "$with_openmp_libs" in
  10598. y | ye | yes | n | no)
  10599. { echo "configure: error: *** You must supply a directory to --with-openmp-libs." 1>&2; exit 1; }
  10600. ;;
  10601. esac
  10602. echo "$ac_t""$with_openmp_libs" 1>&6
  10603. if test -n "$with_openmp_libs"; then
  10604. for dir in $with_openmp_libs; do
  10605. if test -d "$dir"; then
  10606. OMPLIBPATH="$OMPLIBPATH -L$dir"
  10607. else
  10608. { echo "configure: error: *** OpenMP library directory $dir does not exist." 1>&2; exit 1; }
  10609. fi
  10610. done
  10611. fi
  10612. ac_save_libs="$LIBS"
  10613. ac_save_ldflags="$LDFLAGS"
  10614. LIBS=" $LIBS"
  10615. LDFLAGS=" $LDFLAGS"
  10616. echo $ac_n "checking for GOMP_parallel_start""... $ac_c" 1>&6
  10617. echo "configure:13302: checking for GOMP_parallel_start" >&5
  10618. cat > conftest.$ac_ext <<EOF
  10619. #line 13305 "configure"
  10620. #include "confdefs.h"
  10621. /* System header to define __stub macros and hopefully few prototypes,
  10622. which can conflict with char GOMP_parallel_start(); below. */
  10623. #include <assert.h>
  10624. /* Override any gcc2 internal prototype to avoid an error. */
  10625. /* We use char because int might match the return type of a gcc2
  10626. builtin and then its argument prototype would still apply. */
  10627. char GOMP_parallel_start();
  10628. int main() {
  10629. /* The GNU C library defines this for functions which it implements
  10630. to always fail with ENOSYS. Some functions are actually named
  10631. something starting with __ and the normal name is an alias. */
  10632. #if defined (__stub_GOMP_parallel_start) || defined (__stub___GOMP_parallel_start)
  10633. choke me
  10634. #else
  10635. GOMP_parallel_start();
  10636. #endif
  10637. ; return 0; }
  10638. EOF
  10639. if { (eval echo configure:13328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10640. rm -rf conftest*
  10641. eval "ac_cv_func_GOMP_parallel_start=yes"
  10642. else
  10643. echo "configure: failed program was:" >&5
  10644. cat conftest.$ac_ext >&5
  10645. rm -rf conftest*
  10646. eval "ac_cv_func_GOMP_parallel_start=no"
  10647. fi
  10648. rm -f conftest*
  10649. if eval "test \"`echo '$ac_cv_func_'GOMP_parallel_start`\" = yes"; then
  10650. echo "$ac_t""yes" 1>&6
  10651. OMPLIB="$OMPLIB "
  10652. else
  10653. echo "$ac_t""no" 1>&6
  10654. ac_save_ldflags="$LDFLAGS"
  10655. LDFLAGS="$OMPLIBPATH $LDFLAGS"
  10656. echo $ac_n "checking for GOMP_parallel_start in -lgomp""... $ac_c" 1>&6
  10657. echo "configure:13355: checking for GOMP_parallel_start in -lgomp" >&5
  10658. ac_lib_var=`echo gomp'_'GOMP_parallel_start | sed 'y%./+-%__p_%'`
  10659. ac_save_LIBS="$LIBS"
  10660. LIBS="-lgomp $LIBS"
  10661. cat > conftest.$ac_ext <<EOF
  10662. #line 13361 "configure"
  10663. #include "confdefs.h"
  10664. /* Override any gcc2 internal prototype to avoid an error. */
  10665. /* We use char because int might match the return type of a gcc2
  10666. builtin and then its argument prototype would still apply. */
  10667. char GOMP_parallel_start();
  10668. int main() {
  10669. GOMP_parallel_start()
  10670. ; return 0; }
  10671. EOF
  10672. if { (eval echo configure:13372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10673. rm -rf conftest*
  10674. eval "ac_cv_lib_$ac_lib_var=yes"
  10675. else
  10676. echo "configure: failed program was:" >&5
  10677. cat conftest.$ac_ext >&5
  10678. rm -rf conftest*
  10679. eval "ac_cv_lib_$ac_lib_var=no"
  10680. fi
  10681. rm -f conftest*
  10682. LIBS="$ac_save_LIBS"
  10683. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10684. echo "$ac_t""yes" 1>&6
  10685. OMPLIB="$OMPLIB -lgomp "
  10686. else
  10687. echo "$ac_t""no" 1>&6
  10688. LDFLAGS=${ac_save_ldflags}
  10689. { echo "configure: error: *** Unable to locate OpenMP library." 1>&2; exit 1; }
  10690. fi
  10691. LDFLAGS=${ac_save_ldflags}
  10692. fi
  10693. LIBS=${ac_save_libs}
  10694. LDFLAGS=${ac_save_ldflags}
  10695. # compiler dependent
  10696. #if test ${CC} = "gcc" ; then
  10697. if test x$GCC = xyes ; then
  10698. # GNU C compiler (>= 4.2.1)
  10699. OMPCFLAGS=-fopenmp
  10700. elif test ${CC} = "icc" ; then
  10701. # Intel compiler
  10702. OMPCFLAGS=-openmp
  10703. elif test ${CC} = "opencc" ; then
  10704. # AMD's x86 Open64 compiler
  10705. OMPCFLAGS=-mp
  10706. elif test ${CC} = "pgcc" ; then
  10707. # Portland Group's compiler
  10708. OMPCFLAGS=-mp
  10709. # ... anybody else?
  10710. fi
  10711. # try to build a test program with "$CC $OMPCLFAGS" to confirm it works
  10712. #...how?
  10713. #echo "int main() {return 0;}" > test.c
  10714. #$CC $OMPCLFAGS test.c -o test
  10715. fi # $USE_OPENMP
  10716. # Done checking OpenMP
  10717. # Enable OpenCL option
  10718. echo $ac_n "checking whether to use OpenCL""... $ac_c" 1>&6
  10719. echo "configure:13445: checking whether to use OpenCL" >&5
  10720. echo "$ac_t"""$with_opencl"" 1>&6
  10721. case "$with_opencl" in
  10722. "no") USE_OPENCL= ;;
  10723. "yes") USE_OPENCL="1" ;;
  10724. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10725. esac
  10726. OCLINCPATH=
  10727. OCLLIBPATH=
  10728. OCLLIB=
  10729. if test -n "$USE_OPENCL"; then
  10730. # With OpenCL includes directory
  10731. echo $ac_n "checking for location of OpenCL includes""... $ac_c" 1>&6
  10732. echo "configure:13465: checking for location of OpenCL includes" >&5
  10733. case "$with_opencl_includes" in
  10734. y | ye | yes | n | no)
  10735. { echo "configure: error: *** You must supply a directory to --with-opencl-includes." 1>&2; exit 1; }
  10736. ;;
  10737. esac
  10738. echo "$ac_t""$with_opencl_includes" 1>&6
  10739. if test -n "$with_opencl_includes" ; then
  10740. for dir in $with_opencl_includes; do
  10741. if test -d "$dir"; then
  10742. OCLINCPATH="$OCLINCPATH -I$dir"
  10743. else
  10744. { echo "configure: error: *** OpenCL includes directory $dir does not exist." 1>&2; exit 1; }
  10745. fi
  10746. done
  10747. fi
  10748. if test -n "$MACOSX_APP" ; then
  10749. ac_save_cppflags="$CPPFLAGS"
  10750. CPPFLAGS="$OCLINCPATH $CPPFLAGS"
  10751. for ac_hdr in OpenCL/opencl.h
  10752. do
  10753. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10754. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10755. echo "configure:13492: checking for $ac_hdr" >&5
  10756. cat > conftest.$ac_ext <<EOF
  10757. #line 13495 "configure"
  10758. #include "confdefs.h"
  10759. #include <$ac_hdr>
  10760. EOF
  10761. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10762. { (eval echo configure:13500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10763. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10764. if test -z "$ac_err"; then
  10765. rm -rf conftest*
  10766. eval "ac_cv_header_$ac_safe=yes"
  10767. else
  10768. echo "$ac_err" >&5
  10769. echo "configure: failed program was:" >&5
  10770. cat conftest.$ac_ext >&5
  10771. rm -rf conftest*
  10772. eval "ac_cv_header_$ac_safe=no"
  10773. fi
  10774. rm -f conftest*
  10775. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10776. echo "$ac_t""yes" 1>&6
  10777. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10778. cat >> confdefs.h <<EOF
  10779. #define $ac_tr_hdr 1
  10780. EOF
  10781. else
  10782. echo "$ac_t""no" 1>&6
  10783. { echo "configure: error: *** Unable to locate OpenCL includes." 1>&2; exit 1; }
  10784. fi
  10785. done
  10786. CPPFLAGS=$ac_save_cppflags
  10787. # With OpenCL library directory
  10788. ### FIXME: ###
  10789. #LOC_CHECK_FRAMEWORK_PATH(opencl,OpenCL,OPENCLPATH)
  10790. # last term in following would become ',$OPENCLPATH)' if above is uncommented
  10791. ac_save_libs="$LIBS"
  10792. ac_save_ldflags="$LDFLAGS"
  10793. LIBS="-framework OpenCL $LIBS"
  10794. LDFLAGS=" $LDFLAGS"
  10795. echo $ac_n "checking for clGetPlatformInfo""... $ac_c" 1>&6
  10796. echo "configure:13540: checking for clGetPlatformInfo" >&5
  10797. cat > conftest.$ac_ext <<EOF
  10798. #line 13543 "configure"
  10799. #include "confdefs.h"
  10800. /* System header to define __stub macros and hopefully few prototypes,
  10801. which can conflict with char clGetPlatformInfo(); below. */
  10802. #include <assert.h>
  10803. /* Override any gcc2 internal prototype to avoid an error. */
  10804. /* We use char because int might match the return type of a gcc2
  10805. builtin and then its argument prototype would still apply. */
  10806. char clGetPlatformInfo();
  10807. int main() {
  10808. /* The GNU C library defines this for functions which it implements
  10809. to always fail with ENOSYS. Some functions are actually named
  10810. something starting with __ and the normal name is an alias. */
  10811. #if defined (__stub_clGetPlatformInfo) || defined (__stub___clGetPlatformInfo)
  10812. choke me
  10813. #else
  10814. clGetPlatformInfo();
  10815. #endif
  10816. ; return 0; }
  10817. EOF
  10818. if { (eval echo configure:13566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10819. rm -rf conftest*
  10820. eval "ac_cv_func_clGetPlatformInfo=yes"
  10821. else
  10822. echo "configure: failed program was:" >&5
  10823. cat conftest.$ac_ext >&5
  10824. rm -rf conftest*
  10825. eval "ac_cv_func_clGetPlatformInfo=no"
  10826. fi
  10827. rm -f conftest*
  10828. if eval "test \"`echo '$ac_cv_func_'clGetPlatformInfo`\" = yes"; then
  10829. echo "$ac_t""yes" 1>&6
  10830. OCLLIB="$OCLLIB -framework OpenCL"
  10831. else
  10832. echo "$ac_t""no" 1>&6
  10833. { echo "configure: error: *** Unable to locate OpenCL library." 1>&2; exit 1; }
  10834. fi
  10835. LIBS=${ac_save_libs}
  10836. LDFLAGS=${ac_save_ldflags}
  10837. else
  10838. ac_save_cppflags="$CPPFLAGS"
  10839. CPPFLAGS="$OCLINCPATH $CPPFLAGS"
  10840. for ac_hdr in CL/cl.h
  10841. do
  10842. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10843. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10844. echo "configure:13605: checking for $ac_hdr" >&5
  10845. cat > conftest.$ac_ext <<EOF
  10846. #line 13608 "configure"
  10847. #include "confdefs.h"
  10848. #include <$ac_hdr>
  10849. EOF
  10850. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10851. { (eval echo configure:13613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10852. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10853. if test -z "$ac_err"; then
  10854. rm -rf conftest*
  10855. eval "ac_cv_header_$ac_safe=yes"
  10856. else
  10857. echo "$ac_err" >&5
  10858. echo "configure: failed program was:" >&5
  10859. cat conftest.$ac_ext >&5
  10860. rm -rf conftest*
  10861. eval "ac_cv_header_$ac_safe=no"
  10862. fi
  10863. rm -f conftest*
  10864. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10865. echo "$ac_t""yes" 1>&6
  10866. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10867. cat >> confdefs.h <<EOF
  10868. #define $ac_tr_hdr 1
  10869. EOF
  10870. else
  10871. echo "$ac_t""no" 1>&6
  10872. { echo "configure: error: *** Unable to locate OpenCL includes." 1>&2; exit 1; }
  10873. fi
  10874. done
  10875. CPPFLAGS=$ac_save_cppflags
  10876. # With OpenCL library directory
  10877. echo $ac_n "checking for location of OpenCL library""... $ac_c" 1>&6
  10878. echo "configure:13646: checking for location of OpenCL library" >&5
  10879. case "$with_opencl_libs" in
  10880. y | ye | yes | n | no)
  10881. { echo "configure: error: *** You must supply a directory to --with-opencl-libs." 1>&2; exit 1; }
  10882. ;;
  10883. esac
  10884. echo "$ac_t""$with_opencl_libs" 1>&6
  10885. if test -n "$with_opencl_libs"; then
  10886. for dir in $with_opencl_libs; do
  10887. if test -d "$dir"; then
  10888. OCLLIBPATH="$OCLLIBPATH -L$dir"
  10889. else
  10890. { echo "configure: error: *** OpenCL library directory $dir does not exist." 1>&2; exit 1; }
  10891. fi
  10892. done
  10893. fi
  10894. ac_save_ldflags="$LDFLAGS"
  10895. LDFLAGS="$OCLLIBPATH $LDFLAGS"
  10896. echo $ac_n "checking for clGetPlatformInfo in -lOpenCL""... $ac_c" 1>&6
  10897. echo "configure:13670: checking for clGetPlatformInfo in -lOpenCL" >&5
  10898. ac_lib_var=`echo OpenCL'_'clGetPlatformInfo | sed 'y%./+-%__p_%'`
  10899. ac_save_LIBS="$LIBS"
  10900. LIBS="-lOpenCL $LIBS"
  10901. cat > conftest.$ac_ext <<EOF
  10902. #line 13676 "configure"
  10903. #include "confdefs.h"
  10904. /* Override any gcc2 internal prototype to avoid an error. */
  10905. /* We use char because int might match the return type of a gcc2
  10906. builtin and then its argument prototype would still apply. */
  10907. char clGetPlatformInfo();
  10908. int main() {
  10909. clGetPlatformInfo()
  10910. ; return 0; }
  10911. EOF
  10912. if { (eval echo configure:13687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10913. rm -rf conftest*
  10914. eval "ac_cv_lib_$ac_lib_var=yes"
  10915. else
  10916. echo "configure: failed program was:" >&5
  10917. cat conftest.$ac_ext >&5
  10918. rm -rf conftest*
  10919. eval "ac_cv_lib_$ac_lib_var=no"
  10920. fi
  10921. rm -f conftest*
  10922. LIBS="$ac_save_LIBS"
  10923. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10924. echo "$ac_t""yes" 1>&6
  10925. OCLLIB="$OCLLIB -lOpenCL "
  10926. else
  10927. echo "$ac_t""no" 1>&6
  10928. LDFLAGS=${ac_save_ldflags}
  10929. { echo "configure: error: *** Unable to locate OpenCL library." 1>&2; exit 1; }
  10930. fi
  10931. LDFLAGS=${ac_save_ldflags}
  10932. # expanded symbol check: yes? no?
  10933. #LOC_CHECK_FUNC(clGetPlatformInfo,OpenCL functions,OCLLIB,,,,,[
  10934. #LOC_CHECK_LIBS(OpenCL,clGetPlatformInfo,OpenCL,$OCLLIBPATH,OCLLIB,,,)
  10935. #])
  10936. fi
  10937. fi # $USE_OPENCL
  10938. # Done checking OpenCL
  10939. # Enable LFS (from cdr-tools, tar, and autoconf 2.68)
  10940. # Check whether --enable-largefile or --disable-largefile was given.
  10941. if test "${enable_largefile+set}" = set; then
  10942. enableval="$enable_largefile"
  10943. :
  10944. fi
  10945. LFS_CFLAGS=
  10946. if test "$enable_largefile" != no; then
  10947. ac_save_cflags=$CFLAGS
  10948. if test "`which getconf 2>&5`" ; then
  10949. LFS_CFLAGS=`getconf LFS_CFLAGS 2>&5`
  10950. CFLAGS="$LFS_CFLAGS $ac_save_cflags"
  10951. fi
  10952. echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
  10953. echo "configure:13747: checking for special C compiler options needed for large files" >&5
  10954. ac_cv_sys_largefile_CC=no
  10955. largefile_cc_opt=""
  10956. if test "$GCC" != yes; then
  10957. # IRIX 6.2 and later do not support large files by default,
  10958. # so use the C compiler's -n32 option if that helps.
  10959. cat > conftest.$ac_ext <<EOF
  10960. #line 13755 "configure"
  10961. #include "confdefs.h"
  10962. #include <sys/types.h>
  10963. /* Check that off_t can represent 2**63 - 1 correctly.
  10964. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  10965. since some C++ compilers masquerading as C compilers
  10966. incorrectly reject 9223372036854775807. */
  10967. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  10968. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  10969. && LARGE_OFF_T % 2147483647 == 1)
  10970. ? 1 : -1];
  10971. int main() {
  10972. ; return 0; }
  10973. EOF
  10974. if { (eval echo configure:13771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10975. :
  10976. else
  10977. echo "configure: failed program was:" >&5
  10978. cat conftest.$ac_ext >&5
  10979. rm -rf conftest*
  10980. ac_save_CC="${CC-cc}"
  10981. CC="$CC -n32"
  10982. cat > conftest.$ac_ext <<EOF
  10983. #line 13780 "configure"
  10984. #include "confdefs.h"
  10985. #include <sys/types.h>
  10986. /* Check that off_t can represent 2**63 - 1 correctly.
  10987. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  10988. since some C++ compilers masquerading as C compilers
  10989. incorrectly reject 9223372036854775807. */
  10990. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  10991. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  10992. && LARGE_OFF_T % 2147483647 == 1)
  10993. ? 1 : -1];
  10994. int main() {
  10995. ; return 0; }
  10996. EOF
  10997. if { (eval echo configure:13796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10998. rm -rf conftest*
  10999. ac_cv_sys_largefile_CC=' -n32'
  11000. else
  11001. echo "configure: failed program was:" >&5
  11002. cat conftest.$ac_ext >&5
  11003. fi
  11004. rm -f conftest*
  11005. CC="$ac_save_CC"
  11006. fi
  11007. rm -f conftest*
  11008. fi
  11009. echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
  11010. if test "$ac_cv_sys_largefile_CC" != no; then
  11011. CC="$CC$ac_cv_sys_largefile_CC"
  11012. largefile_cc_opt="$ac_cv_sys_largefile_CC"
  11013. if test "$LFS_CFLAGS" ; then
  11014. LFS_CFLAGS="$LFS_CFLAGS $ac_cv_sys_largefile_CC"
  11015. else
  11016. LFS_CFLAGS="$ac_cv_sys_largefile_CC"
  11017. CFLAGS="$LFS_CFLAGS $ac_save_cflags"
  11018. fi
  11019. fi
  11020. echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
  11021. echo "configure:13823: checking for _FILE_OFFSET_BITS value needed for large files" >&5
  11022. ac_cv_sys_file_offset_bits=no
  11023. cat > conftest.$ac_ext <<EOF
  11024. #line 13827 "configure"
  11025. #include "confdefs.h"
  11026. #include <sys/types.h>
  11027. /* Check that off_t can represent 2**63 - 1 correctly.
  11028. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11029. since some C++ compilers masquerading as C compilers
  11030. incorrectly reject 9223372036854775807. */
  11031. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11032. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11033. && LARGE_OFF_T % 2147483647 == 1)
  11034. ? 1 : -1];
  11035. int main() {
  11036. ; return 0; }
  11037. EOF
  11038. if { (eval echo configure:13843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11039. :
  11040. else
  11041. echo "configure: failed program was:" >&5
  11042. cat conftest.$ac_ext >&5
  11043. rm -rf conftest*
  11044. cat > conftest.$ac_ext <<EOF
  11045. #line 13850 "configure"
  11046. #include "confdefs.h"
  11047. #define _FILE_OFFSET_BITS 64
  11048. #include <sys/types.h>
  11049. /* Check that off_t can represent 2**63 - 1 correctly.
  11050. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11051. since some C++ compilers masquerading as C compilers
  11052. incorrectly reject 9223372036854775807. */
  11053. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11054. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11055. && LARGE_OFF_T % 2147483647 == 1)
  11056. ? 1 : -1];
  11057. int main() {
  11058. ; return 0; }
  11059. EOF
  11060. if { (eval echo configure:13868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11061. rm -rf conftest*
  11062. ac_cv_sys_file_offset_bits=64
  11063. else
  11064. echo "configure: failed program was:" >&5
  11065. cat conftest.$ac_ext >&5
  11066. fi
  11067. rm -f conftest*
  11068. fi
  11069. rm -f conftest*
  11070. echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
  11071. if test "$ac_cv_sys_file_offset_bits" != no; then
  11072. cat >> confdefs.h <<EOF
  11073. #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
  11074. EOF
  11075. if test "$LFS_CFLAGS" ; then
  11076. LFS_CFLAGS="$LFS_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
  11077. else
  11078. LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
  11079. fi
  11080. fi
  11081. echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
  11082. echo "configure:13894: checking for _LARGE_FILES value needed for large files" >&5
  11083. ac_cv_sys_large_files=no
  11084. cat > conftest.$ac_ext <<EOF
  11085. #line 13898 "configure"
  11086. #include "confdefs.h"
  11087. #include <sys/types.h>
  11088. /* Check that off_t can represent 2**63 - 1 correctly.
  11089. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11090. since some C++ compilers masquerading as C compilers
  11091. incorrectly reject 9223372036854775807. */
  11092. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11093. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11094. && LARGE_OFF_T % 2147483647 == 1)
  11095. ? 1 : -1];
  11096. int main() {
  11097. ; return 0; }
  11098. EOF
  11099. if { (eval echo configure:13914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11100. :
  11101. else
  11102. echo "configure: failed program was:" >&5
  11103. cat conftest.$ac_ext >&5
  11104. rm -rf conftest*
  11105. cat > conftest.$ac_ext <<EOF
  11106. #line 13921 "configure"
  11107. #include "confdefs.h"
  11108. #define _LARGE_FILES 1
  11109. #include <sys/types.h>
  11110. /* Check that off_t can represent 2**63 - 1 correctly.
  11111. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11112. since some C++ compilers masquerading as C compilers
  11113. incorrectly reject 9223372036854775807. */
  11114. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11115. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11116. && LARGE_OFF_T % 2147483647 == 1)
  11117. ? 1 : -1];
  11118. int main() {
  11119. ; return 0; }
  11120. EOF
  11121. if { (eval echo configure:13939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11122. rm -rf conftest*
  11123. ac_cv_sys_large_files=1
  11124. else
  11125. echo "configure: failed program was:" >&5
  11126. cat conftest.$ac_ext >&5
  11127. fi
  11128. rm -f conftest*
  11129. fi
  11130. rm -f conftest*
  11131. echo "$ac_t""$ac_cv_sys_large_files" 1>&6
  11132. if test "$ac_cv_sys_large_files" != no; then
  11133. cat >> confdefs.h <<EOF
  11134. #define _LARGE_FILES $ac_cv_sys_large_files
  11135. EOF
  11136. if test "$LFS_CFLAGS" ; then
  11137. LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files"
  11138. else
  11139. LFS_CFLAGS="-D_LARGE_FILES=$ac_cv_sys_large_files"
  11140. fi
  11141. fi
  11142. echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
  11143. echo "configure:13965: checking for _LARGEFILE_SOURCE value needed for large files" >&5
  11144. ac_cv_sys_largefile_source=no
  11145. cat > conftest.$ac_ext <<EOF
  11146. #line 13969 "configure"
  11147. #include "confdefs.h"
  11148. #include <stdio.h>
  11149. int main() {
  11150. return !fseeko;
  11151. ; return 0; }
  11152. EOF
  11153. if { (eval echo configure:13976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11154. :
  11155. else
  11156. echo "configure: failed program was:" >&5
  11157. cat conftest.$ac_ext >&5
  11158. rm -rf conftest*
  11159. cat > conftest.$ac_ext <<EOF
  11160. #line 13983 "configure"
  11161. #include "confdefs.h"
  11162. #define _LARGEFILE_SOURCE 1
  11163. #include <stdio.h>
  11164. int main() {
  11165. return !fseeko;
  11166. ; return 0; }
  11167. EOF
  11168. if { (eval echo configure:13992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11169. rm -rf conftest*
  11170. ac_cv_sys_largefile_source=1
  11171. else
  11172. echo "configure: failed program was:" >&5
  11173. cat conftest.$ac_ext >&5
  11174. fi
  11175. rm -f conftest*
  11176. fi
  11177. rm -f conftest*
  11178. echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
  11179. if test "$ac_cv_sys_largefile_source" != no; then
  11180. cat >> confdefs.h <<EOF
  11181. #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
  11182. EOF
  11183. if test "$LFS_CFLAGS" ; then
  11184. LFS_CFLAGS="$LFS_CFLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
  11185. else
  11186. LFS_CFLAGS="-D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
  11187. fi
  11188. fi
  11189. CFLAGS=$ac_save_cflags
  11190. fi
  11191. ac_save_cflags=${CFLAGS}
  11192. CFLAGS="$LFS_CFLAGS ${ac_save_cflags}"
  11193. echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
  11194. echo "configure:14024: checking for _LARGEFILE_SOURCE value needed for large files" >&5
  11195. ac_cv_sys_largefile_source=no
  11196. cat > conftest.$ac_ext <<EOF
  11197. #line 14028 "configure"
  11198. #include "confdefs.h"
  11199. #include <stdio.h>
  11200. int main() {
  11201. return !fseeko;
  11202. ; return 0; }
  11203. EOF
  11204. if { (eval echo configure:14035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11205. :
  11206. else
  11207. echo "configure: failed program was:" >&5
  11208. cat conftest.$ac_ext >&5
  11209. rm -rf conftest*
  11210. cat > conftest.$ac_ext <<EOF
  11211. #line 14042 "configure"
  11212. #include "confdefs.h"
  11213. #define _LARGEFILE_SOURCE 1
  11214. #include <stdio.h>
  11215. int main() {
  11216. return !fseeko;
  11217. ; return 0; }
  11218. EOF
  11219. if { (eval echo configure:14051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11220. rm -rf conftest*
  11221. ac_cv_sys_largefile_source=1
  11222. else
  11223. echo "configure: failed program was:" >&5
  11224. cat conftest.$ac_ext >&5
  11225. fi
  11226. rm -f conftest*
  11227. fi
  11228. rm -f conftest*
  11229. echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
  11230. if test "$ac_cv_sys_largefile_source" != no; then
  11231. cat >> confdefs.h <<EOF
  11232. #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
  11233. EOF
  11234. if test "$LFS_CFLAGS" ; then
  11235. LFS_CFLAGS="$LFS_CFLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
  11236. else
  11237. LFS_CFLAGS="-D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
  11238. fi
  11239. fi
  11240. # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
  11241. # in glibc 2.1.3, but that breaks too many other things.
  11242. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
  11243. echo $ac_n "checking for fseeko""... $ac_c" 1>&6
  11244. echo "configure:14081: checking for fseeko" >&5
  11245. ac_cv_func_fseeko=no
  11246. cat > conftest.$ac_ext <<EOF
  11247. #line 14085 "configure"
  11248. #include "confdefs.h"
  11249. #include <stdio.h>
  11250. int main() {
  11251. return fseeko && fseeko (stdin, 0, 0);
  11252. ; return 0; }
  11253. EOF
  11254. if { (eval echo configure:14092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11255. rm -rf conftest*
  11256. ac_cv_func_fseeko=yes
  11257. else
  11258. echo "configure: failed program was:" >&5
  11259. cat conftest.$ac_ext >&5
  11260. fi
  11261. rm -f conftest*
  11262. echo "$ac_t""$ac_cv_func_fseeko" 1>&6
  11263. if test $ac_cv_func_fseeko != no; then
  11264. cat >> confdefs.h <<\EOF
  11265. #define HAVE_FSEEKO 1
  11266. EOF
  11267. fi
  11268. echo $ac_n "checking if system supports Large Files at all""... $ac_c" 1>&6
  11269. echo "configure:14109: checking if system supports Large Files at all" >&5
  11270. cat > conftest.$ac_ext <<EOF
  11271. #line 14112 "configure"
  11272. #include "confdefs.h"
  11273. #include <stdio.h>
  11274. #include <sys/types.h>
  11275. int main() {
  11276. /*
  11277. * Check that off_t can represent 2**63 - 1 correctly.
  11278. * We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11279. * since some C++ compilers masquerading as C compilers
  11280. * incorrectly reject 9223372036854775807.
  11281. *
  11282. * For MinGW, off64_t should be used and __MSVCRT_VERSION__ >= 0x0601
  11283. * (msvcrt.dll version 6.10 or higher) is needed for _fstat64 and _stat64.
  11284. */
  11285. #ifdef __MINGW32__
  11286. # define LARGE_OFF_T (((off64_t) 1 << 62) - 1 + ((off64_t) 1 << 62))
  11287. #else
  11288. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11289. #endif
  11290. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11291. && LARGE_OFF_T % 2147483647 == 1)
  11292. ? 1 : -1];
  11293. #ifdef __MINGW32__
  11294. return !fseeko64;
  11295. return !ftello64;
  11296. #else
  11297. return !fseeko;
  11298. return !ftello;
  11299. #endif
  11300. ; return 0; }
  11301. EOF
  11302. if { (eval echo configure:14144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11303. rm -rf conftest*
  11304. ac_cv_largefiles=yes
  11305. else
  11306. echo "configure: failed program was:" >&5
  11307. cat conftest.$ac_ext >&5
  11308. rm -rf conftest*
  11309. ac_cv_largefiles=no
  11310. fi
  11311. rm -f conftest*
  11312. echo "$ac_t""$ac_cv_largefiles" 1>&6
  11313. if test $ac_cv_largefiles = yes; then
  11314. cat >> confdefs.h <<\EOF
  11315. #define HAVE_LARGEFILES 1
  11316. EOF
  11317. USE_LARGEFILES=1
  11318. else
  11319. USE_LARGEFILES=
  11320. LFS_CFLAGS=
  11321. fi
  11322. CFLAGS=${ac_save_cflags}
  11323. # Done large file support
  11324. USE_TERMIO=
  11325. STRIPFLAG=
  11326. GRASS_HOME="${DSTDIR}"
  11327. trap '' 1 2 15
  11328. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  11329. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  11330. # Let make expand exec_prefix.
  11331. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  11332. # Any assignment to VPATH causes Sun make to only execute
  11333. # the first set of double-colon rules, so remove it if not needed.
  11334. # If there is a colon in the path, we need to keep it.
  11335. if test "x$srcdir" = x.; then
  11336. ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
  11337. fi
  11338. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  11339. DEFS=-DHAVE_CONFIG_H
  11340. # Without the "./", some shells look in PATH for config.status.
  11341. : ${CONFIG_STATUS=./config.status}
  11342. echo creating $CONFIG_STATUS
  11343. rm -f $CONFIG_STATUS
  11344. cat > $CONFIG_STATUS <<EOF
  11345. #! /bin/sh
  11346. # Generated automatically by configure.
  11347. # Run this file to recreate the current configuration.
  11348. # This directory was configured as follows,
  11349. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  11350. #
  11351. # $0 $ac_configure_args
  11352. #
  11353. # Compiler output produced by configure, useful for debugging
  11354. # configure, is in ./config.log if it exists.
  11355. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  11356. for ac_option
  11357. do
  11358. case "\$ac_option" in
  11359. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  11360. echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  11361. exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  11362. -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  11363. echo "$CONFIG_STATUS generated by autoconf version 2.13"
  11364. exit 0 ;;
  11365. -help | --help | --hel | --he | --h)
  11366. echo "\$ac_cs_usage"; exit 0 ;;
  11367. *) echo "\$ac_cs_usage"; exit 1 ;;
  11368. esac
  11369. done
  11370. ac_given_srcdir=$srcdir
  11371. ac_given_INSTALL="$INSTALL"
  11372. trap 'rm -fr `echo "include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/grass/version.h grass.pc include/grass/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  11373. EOF
  11374. cat >> $CONFIG_STATUS <<EOF
  11375. # Protect against being on the right side of a sed subst in config.status.
  11376. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  11377. s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  11378. $ac_vpsub
  11379. $extrasub
  11380. s%@SHELL@%$SHELL%g
  11381. s%@CFLAGS@%$CFLAGS%g
  11382. s%@CPPFLAGS@%$CPPFLAGS%g
  11383. s%@CXXFLAGS@%$CXXFLAGS%g
  11384. s%@FFLAGS@%$FFLAGS%g
  11385. s%@DEFS@%$DEFS%g
  11386. s%@LDFLAGS@%$LDFLAGS%g
  11387. s%@LIBS@%$LIBS%g
  11388. s%@exec_prefix@%$exec_prefix%g
  11389. s%@prefix@%$prefix%g
  11390. s%@program_transform_name@%$program_transform_name%g
  11391. s%@bindir@%$bindir%g
  11392. s%@sbindir@%$sbindir%g
  11393. s%@libexecdir@%$libexecdir%g
  11394. s%@datadir@%$datadir%g
  11395. s%@sysconfdir@%$sysconfdir%g
  11396. s%@sharedstatedir@%$sharedstatedir%g
  11397. s%@localstatedir@%$localstatedir%g
  11398. s%@libdir@%$libdir%g
  11399. s%@includedir@%$includedir%g
  11400. s%@oldincludedir@%$oldincludedir%g
  11401. s%@infodir@%$infodir%g
  11402. s%@mandir@%$mandir%g
  11403. s%@host@%$host%g
  11404. s%@host_alias@%$host_alias%g
  11405. s%@host_cpu@%$host_cpu%g
  11406. s%@host_vendor@%$host_vendor%g
  11407. s%@host_os@%$host_os%g
  11408. s%@CC@%$CC%g
  11409. s%@EXEEXT@%$EXEEXT%g
  11410. s%@MINGW32@%$MINGW32%g
  11411. s%@WINDRES@%$WINDRES%g
  11412. s%@BINDIR@%$BINDIR%g
  11413. s%@pwd@%$pwd%g
  11414. s%@SRCDIR@%$SRCDIR%g
  11415. s%@DSTDIR@%$DSTDIR%g
  11416. s%@ARCH@%$ARCH%g
  11417. s%@GISBASE@%$GISBASE%g
  11418. s%@GRASS_BIN@%$GRASS_BIN%g
  11419. s%@GIT@%$GIT%g
  11420. s%@GRASS_VERSION_FILE@%$GRASS_VERSION_FILE%g
  11421. s%@GRASS_VERSION_MAJOR@%$GRASS_VERSION_MAJOR%g
  11422. s%@GRASS_VERSION_MINOR@%$GRASS_VERSION_MINOR%g
  11423. s%@GRASS_VERSION_RELEASE@%$GRASS_VERSION_RELEASE%g
  11424. s%@GRASS_VERSION_NUMBER@%$GRASS_VERSION_NUMBER%g
  11425. s%@GRASS_VERSION_DATE@%$GRASS_VERSION_DATE%g
  11426. s%@GRASS_VERSION_GIT@%$GRASS_VERSION_GIT%g
  11427. s%@GRASS_HEADERS_GIT_HASH@%$GRASS_HEADERS_GIT_HASH%g
  11428. s%@GRASS_HEADERS_GIT_DATE@%$GRASS_HEADERS_GIT_DATE%g
  11429. s%@NAME_VER@%$NAME_VER%g
  11430. s%@LIB_VER@%$LIB_VER%g
  11431. s%@MACOSX_APP@%$MACOSX_APP%g
  11432. s%@MACOSX_ARCHS@%$MACOSX_ARCHS%g
  11433. s%@MACOSX_SDK@%$MACOSX_SDK%g
  11434. s%@INSTDIR@%$INSTDIR%g
  11435. s%@GRASS_LIBRARY_TYPE@%$GRASS_LIBRARY_TYPE%g
  11436. s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g
  11437. s%@LD_LIBRARY_PATH_VAR@%$LD_LIBRARY_PATH_VAR%g
  11438. s%@SHLIB_LD@%$SHLIB_LD%g
  11439. s%@SHLIB_LD_FLAGS@%$SHLIB_LD_FLAGS%g
  11440. s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
  11441. s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
  11442. s%@STLIB_LD@%$STLIB_LD%g
  11443. s%@STLIB_SUFFIX@%$STLIB_SUFFIX%g
  11444. s%@INCLUDE_DIRS@%$INCLUDE_DIRS%g
  11445. s%@LIBRARY_DIRS@%$LIBRARY_DIRS%g
  11446. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  11447. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  11448. s%@INSTALL_DATA@%$INSTALL_DATA%g
  11449. s%@LEX@%$LEX%g
  11450. s%@LEXLIB@%$LEXLIB%g
  11451. s%@LEXPATH@%$LEXPATH%g
  11452. s%@YACC@%$YACC%g
  11453. s%@YACCPATH@%$YACCPATH%g
  11454. s%@RANLIB@%$RANLIB%g
  11455. s%@AR@%$AR%g
  11456. s%@ENV@%$ENV%g
  11457. s%@PERL@%$PERL%g
  11458. s%@CPP@%$CPP%g
  11459. s%@CROSS_COMPILING@%$CROSS_COMPILING%g
  11460. s%@X_CFLAGS@%$X_CFLAGS%g
  11461. s%@X_LIBS@%$X_LIBS%g
  11462. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  11463. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  11464. s%@XLIB@%$XLIB%g
  11465. s%@XTLIB@%$XTLIB%g
  11466. s%@USE_X11@%$USE_X11%g
  11467. s%@DBMIEXTRALIB@%$DBMIEXTRALIB%g
  11468. s%@HAVE_ASPRINTF@%$HAVE_ASPRINTF%g
  11469. s%@MATHLIB@%$MATHLIB%g
  11470. s%@DLLIB@%$DLLIB%g
  11471. s%@ICONVLIB@%$ICONVLIB%g
  11472. s%@SOCKLIB@%$SOCKLIB%g
  11473. s%@HAVE_SOCKET@%$HAVE_SOCKET%g
  11474. s%@ZLIBINCPATH@%$ZLIBINCPATH%g
  11475. s%@ZLIBLIBPATH@%$ZLIBLIBPATH%g
  11476. s%@ZLIB@%$ZLIB%g
  11477. s%@BZIP2INCPATH@%$BZIP2INCPATH%g
  11478. s%@BZIP2LIBPATH@%$BZIP2LIBPATH%g
  11479. s%@BZIP2LIB@%$BZIP2LIB%g
  11480. s%@ZSTDINCPATH@%$ZSTDINCPATH%g
  11481. s%@ZSTDLIBPATH@%$ZSTDLIBPATH%g
  11482. s%@ZSTDLIB@%$ZSTDLIB%g
  11483. s%@PROJINC@%$PROJINC%g
  11484. s%@PROJLIB@%$PROJLIB%g
  11485. s%@PROJSHARE@%$PROJSHARE%g
  11486. s%@REGEXINCPATH@%$REGEXINCPATH%g
  11487. s%@REGEXLIBPATH@%$REGEXLIBPATH%g
  11488. s%@REGEXLIB@%$REGEXLIB%g
  11489. s%@USE_REGEX@%$USE_REGEX%g
  11490. s%@READLINEINCPATH@%$READLINEINCPATH%g
  11491. s%@READLINELIBPATH@%$READLINELIBPATH%g
  11492. s%@READLINELIB@%$READLINELIB%g
  11493. s%@HISTORYLIB@%$HISTORYLIB%g
  11494. s%@GDAL_CONFIG@%$GDAL_CONFIG%g
  11495. s%@GDAL_LIBS@%$GDAL_LIBS%g
  11496. s%@GDAL_CFLAGS@%$GDAL_CFLAGS%g
  11497. s%@USE_GDAL@%$USE_GDAL%g
  11498. s%@USE_OGR@%$USE_OGR%g
  11499. s%@LIBLAS_CONFIG@%$LIBLAS_CONFIG%g
  11500. s%@LIBLAS_LIBS@%$LIBLAS_LIBS%g
  11501. s%@LIBLAS_CFLAGS@%$LIBLAS_CFLAGS%g
  11502. s%@LIBLAS_INC@%$LIBLAS_INC%g
  11503. s%@USE_LIBLAS@%$USE_LIBLAS%g
  11504. s%@PDAL_CONFIG@%$PDAL_CONFIG%g
  11505. s%@PDAL_LIBS@%$PDAL_LIBS%g
  11506. s%@PDAL_CPPFLAGS@%$PDAL_CPPFLAGS%g
  11507. s%@PDAL_INC@%$PDAL_INC%g
  11508. s%@USE_PDAL@%$USE_PDAL%g
  11509. s%@NETCDF_CONFIG@%$NETCDF_CONFIG%g
  11510. s%@NETCDF_LIBS@%$NETCDF_LIBS%g
  11511. s%@NETCDF_CFLAGS@%$NETCDF_CFLAGS%g
  11512. s%@USE_NETCDF@%$USE_NETCDF%g
  11513. s%@GEOS_CONFIG@%$GEOS_CONFIG%g
  11514. s%@GEOS_LIBS@%$GEOS_LIBS%g
  11515. s%@GEOS_CFLAGS@%$GEOS_CFLAGS%g
  11516. s%@USE_GEOS@%$USE_GEOS%g
  11517. s%@TIFF_INCLUDE_DIRS@%$TIFF_INCLUDE_DIRS%g
  11518. s%@TIFF_LIBRARY_DIRS@%$TIFF_LIBRARY_DIRS%g
  11519. s%@TIFFLIB@%$TIFFLIB%g
  11520. s%@PNGINC@%$PNGINC%g
  11521. s%@PNGLIB@%$PNGLIB%g
  11522. s%@USE_PNG@%$USE_PNG%g
  11523. s%@USE_POSTGRES@%$USE_POSTGRES%g
  11524. s%@PQINCPATH@%$PQINCPATH%g
  11525. s%@PQLIBPATH@%$PQLIBPATH%g
  11526. s%@PQLIB@%$PQLIB%g
  11527. s%@MYSQLD_CONFIG@%$MYSQLD_CONFIG%g
  11528. s%@USE_MYSQL@%$USE_MYSQL%g
  11529. s%@MYSQLINCPATH@%$MYSQLINCPATH%g
  11530. s%@MYSQLLIBPATH@%$MYSQLLIBPATH%g
  11531. s%@MYSQLLIB@%$MYSQLLIB%g
  11532. s%@MYSQLDLIB@%$MYSQLDLIB%g
  11533. s%@USE_SQLITE@%$USE_SQLITE%g
  11534. s%@SQLITEINCPATH@%$SQLITEINCPATH%g
  11535. s%@SQLITELIBPATH@%$SQLITELIBPATH%g
  11536. s%@SQLITELIB@%$SQLITELIB%g
  11537. s%@USE_OPENGL@%$USE_OPENGL%g
  11538. s%@OPENGL_X11@%$OPENGL_X11%g
  11539. s%@OPENGL_AQUA@%$OPENGL_AQUA%g
  11540. s%@OPENGL_WINDOWS@%$OPENGL_WINDOWS%g
  11541. s%@OPENGLINC@%$OPENGLINC%g
  11542. s%@OPENGLLIB@%$OPENGLLIB%g
  11543. s%@OPENGLULIB@%$OPENGLULIB%g
  11544. s%@ODBCINC@%$ODBCINC%g
  11545. s%@ODBCLIB@%$ODBCLIB%g
  11546. s%@FFTWINC@%$FFTWINC%g
  11547. s%@FFTWLIB@%$FFTWLIB%g
  11548. s%@BLASLIB@%$BLASLIB%g
  11549. s%@BLASINC@%$BLASINC%g
  11550. s%@LAPACKLIB@%$LAPACKLIB%g
  11551. s%@LAPACKINC@%$LAPACKINC%g
  11552. s%@CAIRO_HAS_XRENDER@%$CAIRO_HAS_XRENDER%g
  11553. s%@CAIRO_HAS_XRENDER_SURFACE@%$CAIRO_HAS_XRENDER_SURFACE%g
  11554. s%@CAIROINC@%$CAIROINC%g
  11555. s%@CAIROLIB@%$CAIROLIB%g
  11556. s%@USE_CAIRO@%$USE_CAIRO%g
  11557. s%@FTINC@%$FTINC%g
  11558. s%@FTLIB@%$FTLIB%g
  11559. s%@INTLLIB@%$INTLLIB%g
  11560. s%@HAVE_NLS@%$HAVE_NLS%g
  11561. s%@CXX@%$CXX%g
  11562. s%@OPENDWGINCPATH@%$OPENDWGINCPATH%g
  11563. s%@OPENDWGLIBPATH@%$OPENDWGLIBPATH%g
  11564. s%@OPENDWGLIB@%$OPENDWGLIB%g
  11565. s%@USE_OPENDWG@%$USE_OPENDWG%g
  11566. s%@PTHREADINCPATH@%$PTHREADINCPATH%g
  11567. s%@PTHREADLIBPATH@%$PTHREADLIBPATH%g
  11568. s%@PTHREADLIB@%$PTHREADLIB%g
  11569. s%@USE_PTHREAD@%$USE_PTHREAD%g
  11570. s%@OMPINCPATH@%$OMPINCPATH%g
  11571. s%@OMPLIBPATH@%$OMPLIBPATH%g
  11572. s%@OMPLIB@%$OMPLIB%g
  11573. s%@OMPCFLAGS@%$OMPCFLAGS%g
  11574. s%@USE_OPENMP@%$USE_OPENMP%g
  11575. s%@OCLINCPATH@%$OCLINCPATH%g
  11576. s%@OCLLIBPATH@%$OCLLIBPATH%g
  11577. s%@OCLLIB@%$OCLLIB%g
  11578. s%@USE_OPENCL@%$USE_OPENCL%g
  11579. s%@USE_LARGEFILES@%$USE_LARGEFILES%g
  11580. s%@LFS_CFLAGS@%$LFS_CFLAGS%g
  11581. s%@USE_TERMIO@%$USE_TERMIO%g
  11582. s%@STRIPFLAG@%$STRIPFLAG%g
  11583. s%@GRASS_HOME@%$GRASS_HOME%g
  11584. CEOF
  11585. EOF
  11586. cat >> $CONFIG_STATUS <<\EOF
  11587. # Split the substitutions into bite-sized pieces for seds with
  11588. # small command number limits, like on Digital OSF/1 and HP-UX.
  11589. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  11590. ac_file=1 # Number of current file.
  11591. ac_beg=1 # First line for current file.
  11592. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  11593. ac_more_lines=:
  11594. ac_sed_cmds=""
  11595. while $ac_more_lines; do
  11596. if test $ac_beg -gt 1; then
  11597. sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  11598. else
  11599. sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  11600. fi
  11601. if test ! -s conftest.s$ac_file; then
  11602. ac_more_lines=false
  11603. rm -f conftest.s$ac_file
  11604. else
  11605. if test -z "$ac_sed_cmds"; then
  11606. ac_sed_cmds="sed -f conftest.s$ac_file"
  11607. else
  11608. ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  11609. fi
  11610. ac_file=`expr $ac_file + 1`
  11611. ac_beg=$ac_end
  11612. ac_end=`expr $ac_end + $ac_max_sed_cmds`
  11613. fi
  11614. done
  11615. if test -z "$ac_sed_cmds"; then
  11616. ac_sed_cmds=cat
  11617. fi
  11618. EOF
  11619. cat >> $CONFIG_STATUS <<EOF
  11620. CONFIG_FILES=\${CONFIG_FILES-"include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/grass/version.h grass.pc"}
  11621. EOF
  11622. cat >> $CONFIG_STATUS <<\EOF
  11623. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  11624. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  11625. case "$ac_file" in
  11626. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  11627. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  11628. *) ac_file_in="${ac_file}.in" ;;
  11629. esac
  11630. # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  11631. # Remove last slash and all that follows it. Not all systems have dirname.
  11632. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  11633. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  11634. # The file is in a subdirectory.
  11635. test ! -d "$ac_dir" && mkdir "$ac_dir"
  11636. ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  11637. # A "../" for each directory in $ac_dir_suffix.
  11638. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  11639. else
  11640. ac_dir_suffix= ac_dots=
  11641. fi
  11642. case "$ac_given_srcdir" in
  11643. .) srcdir=.
  11644. if test -z "$ac_dots"; then top_srcdir=.
  11645. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  11646. /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  11647. *) # Relative path.
  11648. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  11649. top_srcdir="$ac_dots$ac_given_srcdir" ;;
  11650. esac
  11651. case "$ac_given_INSTALL" in
  11652. [/$]*) INSTALL="$ac_given_INSTALL" ;;
  11653. *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  11654. esac
  11655. echo creating "$ac_file"
  11656. rm -f "$ac_file"
  11657. configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  11658. case "$ac_file" in
  11659. *Makefile*) ac_comsub="1i\\
  11660. # $configure_input" ;;
  11661. *) ac_comsub= ;;
  11662. esac
  11663. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  11664. sed -e "$ac_comsub
  11665. s%@configure_input@%$configure_input%g
  11666. s%@srcdir@%$srcdir%g
  11667. s%@top_srcdir@%$top_srcdir%g
  11668. s%@INSTALL@%$INSTALL%g
  11669. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  11670. fi; done
  11671. rm -f conftest.s*
  11672. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  11673. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  11674. #
  11675. # ac_d sets the value in "#define NAME VALUE" lines.
  11676. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
  11677. ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
  11678. ac_dC='\3'
  11679. ac_dD='%g'
  11680. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  11681. ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  11682. ac_uB='\([ ]\)%\1#\2define\3'
  11683. ac_uC=' '
  11684. ac_uD='\4%g'
  11685. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  11686. ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  11687. ac_eB='$%\1#\2define\3'
  11688. ac_eC=' '
  11689. ac_eD='%g'
  11690. if test "${CONFIG_HEADERS+set}" != set; then
  11691. EOF
  11692. cat >> $CONFIG_STATUS <<EOF
  11693. CONFIG_HEADERS="include/grass/config.h"
  11694. EOF
  11695. cat >> $CONFIG_STATUS <<\EOF
  11696. fi
  11697. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  11698. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  11699. case "$ac_file" in
  11700. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  11701. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  11702. *) ac_file_in="${ac_file}.in" ;;
  11703. esac
  11704. echo creating $ac_file
  11705. rm -f conftest.frag conftest.in conftest.out
  11706. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  11707. cat $ac_file_inputs > conftest.in
  11708. EOF
  11709. # Transform confdefs.h into a sed script conftest.vals that substitutes
  11710. # the proper values into config.h.in to produce config.h. And first:
  11711. # Protect against being on the right side of a sed subst in config.status.
  11712. # Protect against being in an unquoted here document in config.status.
  11713. rm -f conftest.vals
  11714. cat > conftest.hdr <<\EOF
  11715. s/[\\&%]/\\&/g
  11716. s%[\\$`]%\\&%g
  11717. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  11718. s%ac_d%ac_u%gp
  11719. s%ac_u%ac_e%gp
  11720. EOF
  11721. sed -n -f conftest.hdr confdefs.h > conftest.vals
  11722. rm -f conftest.hdr
  11723. # This sed command replaces #undef with comments. This is necessary, for
  11724. # example, in the case of _POSIX_SOURCE, which is predefined and required
  11725. # on some systems where configure will not decide to define it.
  11726. cat >> conftest.vals <<\EOF
  11727. s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  11728. EOF
  11729. # Break up conftest.vals because some shells have a limit on
  11730. # the size of here documents, and old seds have small limits too.
  11731. rm -f conftest.tail
  11732. while :
  11733. do
  11734. ac_lines=`grep -c . conftest.vals`
  11735. # grep -c gives empty output for an empty file on some AIX systems.
  11736. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  11737. # Write a limited-size here document to conftest.frag.
  11738. echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  11739. sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  11740. echo 'CEOF
  11741. sed -f conftest.frag conftest.in > conftest.out
  11742. rm -f conftest.in
  11743. mv conftest.out conftest.in
  11744. ' >> $CONFIG_STATUS
  11745. sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  11746. rm -f conftest.vals
  11747. mv conftest.tail conftest.vals
  11748. done
  11749. rm -f conftest.vals
  11750. cat >> $CONFIG_STATUS <<\EOF
  11751. rm -f conftest.frag conftest.h
  11752. echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
  11753. cat conftest.in >> conftest.h
  11754. rm -f conftest.in
  11755. if cmp -s $ac_file conftest.h 2>/dev/null; then
  11756. echo "$ac_file is unchanged"
  11757. rm -f conftest.h
  11758. else
  11759. # Remove last slash and all that follows it. Not all systems have dirname.
  11760. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  11761. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  11762. # The file is in a subdirectory.
  11763. test ! -d "$ac_dir" && mkdir "$ac_dir"
  11764. fi
  11765. rm -f $ac_file
  11766. mv conftest.h $ac_file
  11767. fi
  11768. fi; done
  11769. EOF
  11770. cat >> $CONFIG_STATUS <<EOF
  11771. EOF
  11772. cat >> $CONFIG_STATUS <<\EOF
  11773. exit 0
  11774. EOF
  11775. chmod +x $CONFIG_STATUS
  11776. rm -fr confdefs* $ac_clean_files
  11777. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  11778. echo "Copying config.status to config.status.${ARCH}"
  11779. cp -f config.status config.status.${ARCH}
  11780. # Display configuration status
  11781. echo ""
  11782. echo "GRASS is now configured for: ${host}"
  11783. echo ""
  11784. echo " Source directory: ${SRCDIR}"
  11785. echo " Build directory: ${DSTDIR}"
  11786. echo " Installation directory: ${INSTDIR}"
  11787. echo " Startup script in directory:${bindir}"
  11788. echo " C compiler: ${CC} ${CFLAGS}"
  11789. echo " C++ compiler: ${CXX} ${CXXFLAGS}"
  11790. echo " Building shared libraries: ${shared_ok}"
  11791. echo " OpenGL platform: ${OPENGL_TYPE}"
  11792. echo ""
  11793. echo " MacOSX application: `if test -n "${MACOSX_APP}" ; then echo yes ; else echo no ; fi`"
  11794. echo " MacOSX architectures: ${MACOSX_ARCHS}"
  11795. echo " MacOSX SDK: ${MACOSX_SDK}"
  11796. echo ""
  11797. echo " BLAS support: `if test -n "${USE_BLAS}" ; then echo yes ; else echo no ; fi`"
  11798. echo " BZIP2 support: `if test -n "${USE_BZIP2}" ; then echo yes ; else echo no ; fi`"
  11799. echo " C++ support: `if test -n "${USE_CXX}" ; then echo yes ; else echo no ; fi`"
  11800. echo " Cairo support: `if test -n "${USE_CAIRO}" ; then echo yes ; else echo no ; fi`"
  11801. echo " DWG support: `if test -n "${USE_OPENDWG}" ; then echo yes ; else echo no ; fi`"
  11802. echo " FFTW support: `if test -n "${USE_FFTW}" ; then echo yes ; else echo no ; fi`"
  11803. echo " FreeType support: `if test -n "${USE_FREETYPE}" ; then echo yes ; else echo no ; fi`"
  11804. echo " GDAL support: `if test -n "${USE_GDAL}" ; then echo yes ; else echo no ; fi`"
  11805. echo " GEOS support: `if test -n "${USE_GEOS}" ; then echo yes ; else echo no ; fi`"
  11806. echo " LAPACK support: `if test -n "${USE_LAPACK}" ; then echo yes ; else echo no ; fi`"
  11807. echo " Large File support (LFS): `if test -n "${USE_LARGEFILES}" ; then echo yes ; else echo no ; fi`"
  11808. echo " libLAS support: `if test -n "${USE_LIBLAS}" ; then echo yes ; else echo no ; fi`"
  11809. echo " MySQL support: `if test -n "${USE_MYSQL}" ; then echo yes ; else echo no ; fi`"
  11810. echo " NetCDF support: `if test -n "${USE_NETCDF}" ; then echo yes ; else echo no ; fi`"
  11811. echo " NLS support: `if test -n "${USE_NLS}" ; then echo yes ; else echo no ; fi`"
  11812. echo " ODBC support: `if test -n "${USE_ODBC}" ; then echo yes ; else echo no ; fi`"
  11813. echo " OGR support: `if test -n "${USE_OGR}" ; then echo yes ; else echo no ; fi`"
  11814. echo " OpenCL support: `if test -n "${USE_OPENCL}" ; then echo yes ; else echo no ; fi`"
  11815. echo " OpenGL support: `if test -n "${USE_OPENGL}" ; then echo yes ; else echo no ; fi`"
  11816. echo " OpenMP support: `if test -n "${USE_OPENMP}" ; then echo yes ; else echo no ; fi`"
  11817. echo " PDAL support: `if test -n "${USE_PDAL}" ; then echo yes ; else echo no ; fi`"
  11818. echo " PNG support: `if test -n "${USE_PNG}" ; then echo yes ; else echo no ; fi`"
  11819. echo " POSIX thread support: `if test -n "${USE_PTHREAD}" ; then echo yes ; else echo no ; fi`"
  11820. echo " PostgreSQL support: `if test -n "${USE_POSTGRES}" ; then echo yes ; else echo no ; fi`"
  11821. echo " Readline support: `if test -n "${USE_READLINE}" ; then echo yes ; else echo no ; fi`"
  11822. echo " Regex support: `if test -n "${USE_REGEX}" ; then echo yes ; else echo no ; fi`"
  11823. echo " SQLite support: `if test -n "${USE_SQLITE}" ; then echo yes ; else echo no ; fi`"
  11824. echo " TIFF support: `if test -n "${USE_TIFF}" ; then echo yes ; else echo no ; fi`"
  11825. echo " X11 support: `if test -n "${USE_X11}" ; then echo yes ; else echo no ; fi`"
  11826. echo " Zstandard support: `if test -n "${USE_ZSTD}" ; then echo yes ; else echo no ; fi`"
  11827. echo ""
  11828. # remove when the new PROJ API is stable
  11829. if test $PROJ4API = 0 ; then
  11830. echo "$ac_t"" using new PROJ 5+ API" 1>&6
  11831. else
  11832. echo "$ac_t"" using old PROJ 4 API" 1>&6
  11833. fi
  11834. echo ""